diff --git a/api/arkui/stateManagement/decorators/decoratorState.d.ets b/ CODEOWNERS similarity index 43% rename from api/arkui/stateManagement/decorators/decoratorState.d.ets rename to CODEOWNERS index 5992f62fc190765f6d6452621ede8e88f398c081..0865e794573cff8cbce36c4ad5cafd14e1829d8e 100644 --- a/api/arkui/stateManagement/decorators/decoratorState.d.ets +++ b/ CODEOWNERS @@ -1,5 +1,5 @@ /* - * Copyright (C) 2025 Huawei Device Co., Ltd. + * 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 @@ -12,24 +12,25 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/** - * @file - * @kit ArkUI - * @arkts 1.2 - */ -import { DecoratedV1VariableBase, IDecoratedMutableVariable } from '../base/decoratorBase'; -import { PropDecoratedVariable } from './decoratorProp'; -import { WatchIdType, WatchFuncType } from './decoratorWatch'; +[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 -export declare interface __MkPropReturnType { - prop: PropDecoratedVariable; - watchId: WatchIdType; -} +[API打包工具] +build-tools/handleApiFiles.js @wangzhiyusss +arkui_transformer.py -export declare class StateDecoratedVariable extends DecoratedV1VariableBase - implements IDecoratedMutableVariable { - public constructor(varName: string, initValue: T, watchFunc?: WatchFuncType) - public get(): T - public set(newValue: T): void -} \ No newline at end of file +[int转number工具] +build-tools/intToNumber.js @wangzhiyusss diff --git a/BUILD.gn b/BUILD.gn index 6fc0f303ab6cca32b27ffde45518bb40a9004a7c..8ebf9aca615e0daf68b9a5f2c1a608b08c9f739a 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), ] @@ -60,14 +50,9 @@ action("ohos_base_split") { template("ohos_copy_internal") { forward_variables_from(invoker, "*") iv_input = invoker.iv_input + input_project_dir = invoker.input_project_dir _module_info_target = "${target_name}_info" - # fullSDK中api路径 - input_project_dir = interface_sdk_path_ets1 - if (sdk_type == "ets2") { - input_project_dir = interface_sdk_path_ets2 - } - # 调用build/templates/common/copy.gni中的ohos_copy方法 # 将处理完成的文件输出到中间产物对应位置 out/sdk/obj/interface/sdk-js/${target_name} action_with_pydeps(target_name) { @@ -112,13 +97,9 @@ template("ohos_copy_internal") { # 主要api处理template template("ohos_declaration_template") { forward_variables_from(invoker, "*") + input_project_dir = invoker.input_project_dir _module_info_target = "/ohos_declaration/${sdk_type}/${target_name}_info" - # fullSDK中api路径 - input_project_dir = interface_sdk_path_ets1 - if (sdk_type == "ets2") { - input_project_dir = interface_sdk_path_ets2 - } input_api_dir = input_project_dir + "/api" action_with_pydeps(target_name) { @@ -149,39 +130,125 @@ template("ohos_declaration_template") { } } +# 适配arkui处理noninterop标签的主要api处理template +template("ohos_handle_declaration_template") { + forward_variables_from(invoker, "*") + input_project_dir = invoker.input_project_dir + _module_info_target = "/ohos_sdk_arkui/${sdk_type}/${target_name}_info" + + action_with_pydeps(target_name) { + deps = [ + ":ohos_ets_dynamic", + ":ohos_ets_static" ] + deps += [ ":$_module_info_target" ] + inputs = [] + outputs = [ target_out_dir + "/ohos_sdk_arkui/${target_name}" ] + + script = "//interface/sdk-js/delete_arkui_label.py" + args = [ + "--root-build-dir", + rebase_path("//", root_build_dir), + "--input-interface-sdk", + rebase_path(input_project_dir), + "--output-arkui-interface-sdk", + rebase_path("$target_out_dir/ohos_sdk_arkui/${target_name}"), + "--node-js", + rebase_path(nodejs, root_build_dir) + ] + } + _target_name = target_name + generate_module_info(_module_info_target) { + module_type = "jsdoc" + module_install_name = "" + module_name = _target_name + module_source_dir = + target_out_dir + "/ohos_sdk_arkui/$_target_name" + install_enable = false + } +} + +# 最终打包SDK ets/api执行脚本 +ohos_handle_declaration_template("ohos_build_ets_sdk_api") { + sdk_type = "ets" + input_project_dir = "$ohos_ets_dynamic_path/api" +} + +# 最终打包SDK ets/arkts执行脚本 +ohos_handle_declaration_template("ohos_build_ets_sdk_arkts") { + sdk_type = "ets" + input_project_dir = "$ohos_ets_dynamic_path/arkts" +} + +# 最终打包SDK ets/component执行脚本 +ohos_handle_declaration_template("ohos_build_ets_sdk_component") { + sdk_type = "ets" + input_project_dir = "$ohos_ets_dynamic_path/component" +} + +# 最终打包SDK ets/kits执行脚本 +ohos_handle_declaration_template("ohos_build_ets_sdk_kits") { + sdk_type = "ets" + input_project_dir = "$ohos_ets_dynamic_path/kits" +} + +# 最终打包SDK ets2/api执行脚本 +ohos_handle_declaration_template("ohos_build_ets2_sdk_api") { + sdk_type = "ets2" + input_project_dir = "$ohos_ets_static_path/api" +} + +# 最终打包SDK ets2/arkts执行脚本 +ohos_handle_declaration_template("ohos_build_ets2_sdk_arkts") { + sdk_type = "ets2" + input_project_dir = "$ohos_ets_static_path/arkts" +} + +# 最终打包SDK ets2/kits执行脚本 +ohos_handle_declaration_template("ohos_build_ets2_sdk_kits") { + sdk_type = "ets2" + input_project_dir = "$ohos_ets_static_path/kits" +} + # ets/api执行脚本 ohos_declaration_template("ohos_declaration_ets") { sdk_type = "ets" + input_project_dir = interface_sdk_path_ets1 } # ets2/api执行脚本 ohos_declaration_template("ohos_declaration_ets2") { sdk_type = "ets2" + input_project_dir = interface_sdk_path_ets2 } # ets/api/@internal/full执行脚本 ohos_copy_internal("ets_internal_api") { sdk_type = "ets" iv_input = interface_sdk_path_ets1 + "/api/@internal/ets" + input_project_dir = interface_sdk_path_ets1 } # ets/arkts执行脚本 ohos_copy_internal("bundle_arkts") { sdk_type = "ets" iv_input = interface_sdk_path_ets1 + "/arkts" + input_project_dir = interface_sdk_path_ets1 } # ets1.2/arkts执行脚本 ohos_copy_internal("bundle_arkts_ets1.2") { sdk_type = "ets2" iv_input = interface_sdk_path_ets2 + "/arkts" + input_project_dir = interface_sdk_path_ets2 } ohos_copy_internal("ets_internal_api2") { sdk_type = "ets2" iv_input = interface_sdk_path_ets2 + "/api/@internal/ets" + input_project_dir = interface_sdk_path_ets2 } + if (!sdk_build_public) { # ets/build-tools/ets-loader/declarations脚本 ohos_copy("bundle_api") { @@ -198,39 +265,48 @@ if (!sdk_build_public) { ohos_copy_internal("ets_component") { sdk_type = "ets" iv_input = interface_sdk_path_ets1 + "/api/@internal/component/ets" + input_project_dir = interface_sdk_path_ets1 } + # ets1.2/arkui/component执行脚本 ohos_copy_internal("ets_component2") { sdk_type = "ets2" iv_input = interface_sdk_path + "/arkui_transformer_api" + input_project_dir = interface_sdk_path } # ets/kits执行脚本 ohos_copy_internal("bundle_kits") { sdk_type = "ets" iv_input = interface_sdk_path_ets1 + "/kits" + input_project_dir = interface_sdk_path_ets1 } + # ets2/kits执行脚本 ohos_copy_internal("bundle_kits2") { sdk_type = "ets2" iv_input = interface_sdk_path_ets2 + "/kits" + input_project_dir = interface_sdk_path_ets2 } # js/api执行脚本 ohos_declaration_template("ohos_declaration_common") { sdk_type = "ets" + input_project_dir = interface_sdk_path_ets1 } # js/api/@internal/full执行脚本 ohos_copy_internal("internal_full") { iv_input = interface_sdk_path_ets1 + "/api/common/full" + input_project_dir = interface_sdk_path_ets1 } # js/api/@internal/lite执行脚本呢 ohos_copy_internal("internal_lite") { iv_input = interface_sdk_path_ets1 + "/api/common/lite" + input_project_dir = interface_sdk_path_ets1 } # js/api/config执行脚本 @@ -264,113 +340,279 @@ ohos_copy("syscap_check") { module_install_name = "" } -action("ohos_ets_api_tmp") { - script = "//interface/sdk-js/ohos_copy_ets.py" +# 处理ets1.1的interop +ohos_copy("build_dynamic_sdk_interop") { + deps = [ ":build_sdk_interop1" ] + sources = [ "${interface_sdk_path}/ets1.1interop"] + outputs=[ target_out_dir + "/${target_name}" ] + module_source_dir = target_out_dir + "/${target_name}" + module_install_name = "" +} - args = [ - "--input", - rebase_path("//interface/sdk-js/api"), - "--output", - rebase_path("$ohos_ets_api_tmp_path"), - "--type", - "ets2", - "--source-root-dir", - rebase_path("//"), - "--node-js", - rebase_path(nodejs, root_build_dir), - ] +# 处理ets1.2 声明文件的interop +ohos_copy("build_static_declaration_sdk_interop") { + deps = [ ":build_sdk_interop2" ] + sources = [ "${interface_sdk_path}/ets1.2interop/declaration"] + outputs=[ target_out_dir + "/${target_name}" ] + module_source_dir = target_out_dir + "/${target_name}" + module_install_name = "" +} - outputs = [ "$ohos_ets_api_tmp_path" ] +# 处理ets1.2 胶水代码的interop +ohos_copy("build_static_bridge_sdk_interop") { + deps = [ ":build_sdk_interop2" ] + sources = [ "${interface_sdk_path}/ets1.2interop/bridge"] + outputs=[ target_out_dir + "/${target_name}" ] + module_source_dir = target_out_dir + "/${target_name}" + module_install_name = "" +} + +# 将ets1.2文件处理成ets1.2interop +action("build_sdk_interop2") { + interface_sdk_interop2_deps = "" + if (host_toolchain == toolchain_mac) { + interface_sdk_interop2_deps = ":build_ohos_ets($toolchain_mac)" + } else if (host_toolchain == toolchain_win) { + interface_sdk_interop2_deps = ":build_ohos_ets($toolchain_win)" + } else { + interface_sdk_interop2_deps = ":build_ohos_ets($toolchain_linux)" + } + deps = [interface_sdk_interop2_deps] + script = "//interface/sdk-js/compile_ets_ts.py" + if (host_os == "mac") { + if(host_cpu == "arm64") { + node_path = "//prebuilts/build-tools/common/nodejs/node-v16.20.2-darwin-arm64/bin/node" + } + else{ + node_path = "//prebuilts/build-tools/common/nodejs/node-v14.21.1-darwin-x64/bin/node" + } + } else { + node_path = "//prebuilts/build-tools/common/nodejs/node-v14.21.1-linux-x64/bin/node" + } + args=[ + "--root-build-dir", + rebase_path("//", root_build_dir), + "--tool-dir", + rebase_path(build_sdk_path, root_build_dir), + "--output-interface-sdk", + rebase_path(ohos_ets_static_path, root_build_dir), + "--output-interop-sdk", + rebase_path(interface_sdk_path, root_build_dir), + "--node-path", + rebase_path(node_path, root_build_dir) + ] + outputs = [ + interface_sdk_path + "/ets1.2interop/declaration", + interface_sdk_path + "/ets1.2interop/bridge" + ] } -action("ohos_ets_arkts_tmp") { - script = "//interface/sdk-js/ohos_copy_ets.py" +# 运行处理ets1.2interop工具所需要的依赖 +group("build_ohos_ets") { + external_deps = [ + ohos_ets_build_system_deps, + ohos_ets_stdlib_deps + ] + deps = [ + ":ohos_base_split", + ":ohos_ets_api", + ":ohos_ets_arkts", + ":ohos_ets_kits", + ohos_ets_koala_wrapper_deps, + ohos_ets_ark_link_deps, + ohos_ets_es2panda_deps, + ohos_ets_libes2panda_public_deps + ] +} +# 将ets1.1文件处理成ets1.1interop +action("build_sdk_interop1") { + deps = [ + ":ohos_base_split", + ":ohos_ets_dynamic" + ] + external_deps = [ + "runtime_core:declgen_ts2sts_compile_declgen" + ] + script="run_compile_declgen.py" args = [ - "--input", - rebase_path("//interface/sdk-js/arkts"), - "--output", - rebase_path("$ohos_ets_arkts_tmp_path"), - "--type", - "ets2", - "--source-root-dir", - rebase_path("//"), + "--root-build-dir", + rebase_path("//", root_build_dir), + "--current-os-dir", + current_os, + "--output-interface-sdk", + rebase_path(ohos_ets_dynamic_path, root_build_dir), + "--tool-dir", + rebase_path( + "${root_out_dir}/obj/arkcompiler/runtime_core/static_core/plugins/ets/tools/declgen_ts2sts/panda-declgen-1.0.0.tgz"), + "--output-interop-sdk", + rebase_path(interface_sdk_path, root_build_dir), "--node-js", rebase_path(nodejs, root_build_dir), ] - - outputs = [ "$ohos_ets_arkts_tmp_path" ] + outputs = [ "${interface_sdk_path}/ets1.1interop" ] } -action("ohos_ets_kits_tmp") { - script = "//interface/sdk-js/ohos_copy_ets.py" +ohos_copy("ohos_ets_dynamic_api_declaration") { + deps = [ ":ohos_declaration_ets" ] + sources = [ root_out_dir + "/ohos_declaration/ets/ohos_declaration_ets" ] + outputs = [ ohos_ets_dynamic_api_path ] +} - args = [ - "--input", - rebase_path("//interface/sdk-js/kits"), - "--output", - rebase_path("$ohos_ets_kits_tmp_path"), - "--type", - "ets2", - "--source-root-dir", - rebase_path("//"), - "--node-js", - rebase_path(nodejs, root_build_dir), +ohos_copy("ohos_ets_dynamic_api_internal") { + deps = [ + ":ets_internal_api", + ":ohos_ets_dynamic_api_declaration", ] + sources = [ target_out_dir + "/ets/ets_internal_api" ] + outputs = [ ohos_ets_dynamic_api_path + "/@internal/full" ] +} - outputs = [ "$ohos_ets_kits_tmp_path" ] +ohos_copy("ohos_ets_dynamic_arkts") { + deps = [ ":bundle_arkts" ] + sources = [ target_out_dir + "/ets/bundle_arkts" ] + outputs = [ ohos_ets_dynamic_arkts_path ] } -action("ohos_ets_api_arkui_tmp") { - deps = [ ":ohos_ets_api_tmp" ] - script = "//interface/sdk-js/arkui_transformer.py" +ohos_copy("ohos_ets_dynamic_component") { + deps = [ ":ets_component" ] + sources = [ target_out_dir + "/ets/ets_component" ] + outputs = [ ohos_ets_dynamic_component_path ] +} - 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" - } +ohos_copy("ohos_ets_dynamic_kits") { + deps = [ ":bundle_kits" ] + sources = [ target_out_dir + "/ets/bundle_kits" ] + outputs = [ ohos_ets_dynamic_kits_path ] +} + +ohos_copy("ohos_ets_static_api_declaration") { + deps = [ ":ohos_declaration_ets2" ] + sources = [ root_out_dir + "/ohos_declaration/ets2/ohos_declaration_ets2" ] + outputs = [ ohos_ets_static_api_path ] +} + +ohos_copy("ohos_ets_static_api_internal") { + deps = [ + ":ets_internal_api2", + ":ohos_ets_static_api_declaration" + ] + sources = [ target_out_dir + "/ets2/ets_internal_api2" ] + outputs = [ ohos_ets_static_api_path + "/@internal/full" ] +} + +ohos_copy("ohos_ets_static_arkts") { + deps = [ ":bundle_arkts_ets1.2" ] + sources = [ target_out_dir + "/ets2/bundle_arkts_ets1.2" ] + outputs = [ ohos_ets_static_arkts_path ] +} + +action("ohos_ets_static_component") { + deps = [ + ":ets_component2", + ":ohos_ets_static_api_declaration" + ] + script = "//interface/sdk-js/process_internal.py" args = [ "--input", - rebase_path(ohos_ets_api_tmp_path + "/@internal/component/ets", - root_build_dir), + rebase_path(interface_sdk_path + "/arkui_transformer_api", root_build_dir), + "--project-dir", + rebase_path(interface_sdk_path, root_build_dir), + "--base-dir", + rebase_path("//interface/sdk-js", root_build_dir), + "--remove", + rebase_path("//interface/sdk-js/remove_list.json", root_build_dir), + "--ispublic", + "${sdk_build_public}", + "--name", + "${target_name}", "--output", - rebase_path(ohos_ets_api_tmp_path + "/arkui/component", root_build_dir), - "--source_root_dir", - rebase_path("//", root_build_dir), - "--npm-path", - rebase_path(npm_path, root_build_dir), - "--node-js", - rebase_path(node_path, root_build_dir), + rebase_path(ohos_ets_static_api_path + "/arkui/component",root_build_dir) + ] + outputs = [ ohos_ets_static_api_path + "/arkui/component" ] +} + +ohos_copy("ohos_ets_static_kits") { + deps = [ ":bundle_kits2" ] + sources = [ target_out_dir + "/ets2/bundle_kits2" ] + outputs = [ ohos_ets_static_kits_path ] +} + +ohos_copy("ohos_ets_api") { + deps = [ + ":ohos_ets_static_api_declaration", + ":ohos_ets_static_api_internal", + ":ohos_ets_static_component", ] - outputs = [ "$ohos_ets_api_arkui_tmp_path" ] + sources = [ ohos_ets_static_api_path ] + outputs = [ ohos_ets_api_path ] + part_name = "sdk" + subsystem_name = "sdk" } ohos_copy("ohos_ets_arkts") { - deps = [ ":ohos_ets_arkts_tmp" ] - sources = [ ohos_ets_arkts_tmp_path ] + deps = [ ":ohos_ets_static_arkts" ] + sources = [ ohos_ets_static_arkts_path ] outputs = [ ohos_ets_arkts_path ] part_name = "sdk" subsystem_name = "sdk" } ohos_copy("ohos_ets_kits") { - deps = [ ":ohos_ets_kits_tmp" ] - sources = [ ohos_ets_kits_tmp_path ] + deps = [ ":ohos_ets_static_kits" ] + sources = [ ohos_ets_static_kits_path ] outputs = [ ohos_ets_kits_path ] part_name = "sdk" subsystem_name = "sdk" } -ohos_copy("ohos_ets_api") { - deps = [ ":ohos_ets_api_tmp" ] - sources = [ ohos_ets_api_tmp_path ] - outputs = [ ohos_ets_api_path ] - part_name = "sdk" - subsystem_name = "sdk" +# ets1.1 interop工具的SDK输入 +group("ohos_ets_dynamic") { + deps = [ + ":ohos_ets_dynamic_api_declaration", + ":ohos_ets_dynamic_api_internal", + ":ohos_ets_dynamic_arkts", + ":ohos_ets_dynamic_component", + ":ohos_ets_dynamic_kits" + ] } + +# ets1.2 interop工具的SDK输入 +group("ohos_ets_static") { + deps = [ + ":ohos_ets_static_api_declaration", + ":ohos_ets_static_api_internal", + ":ohos_ets_static_arkts", + ":ohos_ets_static_component", + ":ohos_ets_static_kits" + ] +} + +action("gen_api_check_plugin") { + deps = [ + "//developtools/ace_ets2bundle/arkui-plugins:ui_plugin" + ] + npm_path = "//prebuilts/build-tools/common/nodejs/current/bin/npm" + script = "build_api_check_plugin.py" + args = [ + "--source_path", + rebase_path(get_path_info("./build-tools/compile-plugins/api-check-plugin-static", "abspath")), + "--output_path", + rebase_path("$target_gen_dir"), + "--npm", + rebase_path(npm_path), + ] + outputs = [ "$target_gen_dir" ] +} + +ohos_copy("api_check_plugin") { + deps = [ + ":gen_api_check_plugin" + ] + sources = [ + rebase_path("$target_gen_dir") + ] + outputs = [ target_out_dir + "/$target_name" ] + module_source_dir = target_out_dir + "/$target_name" + module_install_name = "" +} \ No newline at end of file diff --git a/api/@internal/component/ets/alphabet_indexer.d.ts b/api/@internal/component/ets/alphabet_indexer.d.ts index c809c09254f1853b50106f97f4de2125743f9bab..b947e42ae773e629567d9902b91f49169186defb 100644 --- a/api/@internal/component/ets/alphabet_indexer.d.ts +++ b/api/@internal/component/ets/alphabet_indexer.d.ts @@ -285,7 +285,6 @@ declare type OnAlphabetIndexerSelectCallback = (index: number) => void; * @since 18 */ declare type OnAlphabetIndexerPopupSelectCallback = (index: number) => void; - /** * Defines an AlphabetIndexer callback when onRequestPopupData. * diff --git a/api/@internal/component/ets/animator.d.ts b/api/@internal/component/ets/animator.d.ts index 0772ad8411366a28aa656fb14a7e4fae80c2379b..8032b50b55774481479dfcf5cf8547f151fa9073 100644 --- a/api/@internal/component/ets/animator.d.ts +++ b/api/@internal/component/ets/animator.d.ts @@ -17,13 +17,17 @@ * @file * @kit ArkUI */ - +/*** if arkts 1.2 */ +import { CommonMethod, } from './common'; +import { Curve,AnimationStatus, FillMode,PlayMode} from './enums' +/*** endif */ /** * Customize spring properties. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SpringProp { /** @@ -34,7 +38,8 @@ declare class SpringProp { * @param { number } damping * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(mass: number, stiffness: number, damping: number); } @@ -44,7 +49,8 @@ declare class SpringProp { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare class SpringMotion { /** @@ -56,7 +62,8 @@ declare class SpringMotion { * @param { SpringProp } prop * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(start: number, end: number, velocity: number, prop: SpringProp); } @@ -66,7 +73,8 @@ declare class SpringMotion { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare class FrictionMotion { /** @@ -77,7 +85,8 @@ declare class FrictionMotion { * @param { number } velocity * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(friction: number, position: number, velocity: number); } @@ -87,7 +96,8 @@ declare class FrictionMotion { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ declare class ScrollMotion { /** @@ -100,7 +110,8 @@ declare class ScrollMotion { * @param { SpringProp } prop * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(position: number, velocity: number, min: number, max: number, prop: SpringProp); } @@ -111,7 +122,8 @@ declare class ScrollMotion { * @interface AnimatorInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ interface AnimatorInterface { /** @@ -121,7 +133,8 @@ interface AnimatorInterface { * @returns { AnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ (value: string): AnimatorAttribute; } @@ -132,7 +145,8 @@ interface AnimatorInterface { * @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..38c5838bcd099010af53d88482afb5eb40f47bb1 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, ResourceStr } 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; @@ -273,6 +285,7 @@ declare interface BadgeStyle { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fontSize?: number | ResourceStr; @@ -328,6 +341,7 @@ declare interface BadgeStyle { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ badgeSize?: number | ResourceStr; @@ -364,7 +378,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 +399,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 +422,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; @@ -442,6 +459,7 @@ declare interface BadgeStyle { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fontWeight?: number | FontWeight | ResourceStr; } @@ -478,7 +496,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 +540,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 +577,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 +619,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 +663,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 +708,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 +750,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 { /** @@ -772,6 +797,7 @@ declare interface BadgeParamWithString extends BadgeParam { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ value: ResourceStr; } @@ -808,7 +834,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 +886,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 +939,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 +977,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 {} diff --git a/api/@internal/component/ets/button.d.ts b/api/@internal/component/ets/button.d.ts index 1818a77db92979a7e9857f42cb4f43cea67d12d0..5980170db6393cf77796b81bfe690e5c81a08b5d 100644 --- a/api/@internal/component/ets/button.d.ts +++ b/api/@internal/component/ets/button.d.ts @@ -12,12 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - /** * Provides a button component. * @@ -53,114 +51,110 @@ * @since 11 */ declare enum ButtonType { - /** - * Capsule button (rounded corners default to half the height). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Capsule button (rounded corners default to half the height). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Capsule button (rounded corners default to half the height). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Capsule button (rounded corners default to half the height). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Capsule, - - /** - * Round buttons. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Round buttons. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Round buttons. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Round buttons. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Circle, - - /** - * Common button (no rounded corners by default). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Common button (no rounded corners by default). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Common button (no rounded corners by default). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Common button (no rounded corners by default). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Normal, - - /** - * Rounded rectangle button. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 15 - */ - ROUNDED_RECTANGLE = 3, + /** + * Capsule button (rounded corners default to half the height). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Capsule button (rounded corners default to half the height). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Capsule button (rounded corners default to half the height). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Capsule button (rounded corners default to half the height). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Capsule, + /** + * Round buttons. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Round buttons. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Round buttons. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Round buttons. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Circle, + /** + * Common button (no rounded corners by default). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Common button (no rounded corners by default). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Common button (no rounded corners by default). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Common button (no rounded corners by default). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Normal, + /** + * Rounded rectangle button. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 15 + */ + ROUNDED_RECTANGLE = 3 } - /** * Enum for button style type. * @@ -181,64 +175,61 @@ declare enum ButtonType { * @since 12 */ declare enum ButtonStyleMode { - /** - * Normal button (with normal background color). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * Normal button (with normal background color). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - NORMAL = 0, - - /** - * Emphasized button (with emphasized background color). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * Emphasized button (with emphasized background color). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - EMPHASIZED = 1, - - /** - * Textual button (with none background color). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * Textual button (with none background color). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - TEXTUAL = 2, + /** + * Normal button (with normal background color). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 11 + */ + /** + * Normal button (with normal background color). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + NORMAL = 0, + /** + * Emphasized button (with emphasized background color). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 11 + */ + /** + * Emphasized button (with emphasized background color). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + EMPHASIZED = 1, + /** + * Textual button (with none background color). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 11 + */ + /** + * Textual button (with none background color). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + TEXTUAL = 2 } - /** * Enum for button role. * @@ -250,29 +241,27 @@ declare enum ButtonStyleMode { * @since 12 */ declare enum ButtonRole { - /** - * Normal button. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - NORMAL = 0, - - /** - * Error button. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - ERROR = 1, + /** + * Normal button. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + NORMAL = 0, + /** + * Error button. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + ERROR = 1 } - /** * Defines the callback type used in ButtonConfiguration. * @@ -285,7 +274,6 @@ declare enum ButtonRole { * @since 12 */ declare type ButtonTriggerClickCallback = (xPos: number, yPos: number) => void; - /** * ButtonConfiguration used by button content modifier. * @@ -296,42 +284,38 @@ declare type ButtonTriggerClickCallback = (xPos: number, yPos: number) => void; * @atomicservice * @since 12 */ - declare interface ButtonConfiguration extends CommonConfiguration { - /** - * Button with inner text label. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - label: string; - - /** - * Indicates whether the button is pressed. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - pressed: boolean; - - /** - * Trigger button click x coordinate and y coordinate. - * - * @type { ButtonTriggerClickCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - triggerClick: ButtonTriggerClickCallback; + /** + * Button with inner text label. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + label: string; + /** + * Indicates whether the button is pressed. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + pressed: boolean; + /** + * Trigger button click x coordinate and y coordinate. + * + * @type { ButtonTriggerClickCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + triggerClick: ButtonTriggerClickCallback; } - /** * Enum for Control Size. * @@ -352,45 +336,43 @@ declare interface ButtonConfiguration extends CommonConfiguration { * @crossplatform * @form * @atomicservice - * @since 12 + * @since 12 */ role(value: ButtonRole): ButtonAttribute; @@ -1253,7 +1221,7 @@ declare class ButtonAttribute extends CommonMethod { * @since 11 */ labelStyle(value: LabelStyle): ButtonAttribute; - + /** * Sets the minimum zoom-out ratio of the button text. * @@ -1328,7 +1296,6 @@ declare class ButtonAttribute extends CommonMethod { * @since 11 */ declare const Button: ButtonInterface; - /** * Defines Button Component instance. * diff --git a/api/@internal/component/ets/calendar.d.ts b/api/@internal/component/ets/calendar.d.ts index ecac65717c5fb55fb559f20f98b5ff8e78ce7ef9..bf5216137e23a896816ae5a42843d442d194cf13 100644 --- a/api/@internal/component/ets/calendar.d.ts +++ b/api/@internal/component/ets/calendar.d.ts @@ -34,6 +34,7 @@ * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface CalendarDay { /** @@ -54,6 +55,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ index: number; @@ -75,6 +77,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ lunarMonth: string; @@ -94,6 +97,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ lunarDay: string; @@ -113,6 +117,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dayMark: string; @@ -132,6 +137,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dayMarkValue: string; @@ -151,6 +157,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ year: number; @@ -170,6 +177,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ month: number; @@ -189,6 +197,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ day: number; @@ -208,6 +217,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ isFirstOfLunar: boolean; @@ -229,6 +239,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ hasSchedule: boolean; @@ -248,6 +259,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ markLunarDay: boolean; } @@ -268,6 +280,7 @@ interface CalendarDay { * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface MonthData { /** @@ -286,6 +299,7 @@ interface MonthData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ year: number; @@ -305,6 +319,7 @@ interface MonthData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ month: number; @@ -324,6 +339,7 @@ interface MonthData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ data: CalendarDay[]; } @@ -344,6 +360,7 @@ interface MonthData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface CurrentDayStyle { /** @@ -362,6 +379,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dayColor?: ResourceColor; @@ -381,6 +399,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ lunarColor?: ResourceColor; @@ -400,6 +419,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ markLunarColor?: ResourceColor; @@ -419,6 +439,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dayFontSize?: number; @@ -438,6 +459,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ lunarDayFontSize?: number; @@ -457,6 +479,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dayHeight?: number; @@ -476,6 +499,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dayWidth?: number; @@ -495,6 +519,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ gregorianCalendarHeight?: number; @@ -514,6 +539,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dayYAxisOffset?: number; @@ -533,6 +559,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ lunarDayYAxisOffset?: number; @@ -552,6 +579,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ underscoreXAxisOffset?: number; @@ -571,6 +599,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ underscoreYAxisOffset?: number; @@ -590,6 +619,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ scheduleMarkerXAxisOffset?: number; @@ -609,6 +639,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ scheduleMarkerYAxisOffset?: number; @@ -628,6 +659,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ colSpace?: number; @@ -647,6 +679,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dailyFiveRowSpace?: number; @@ -666,6 +699,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ dailySixRowSpace?: number; @@ -685,6 +719,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ lunarHeight?: number; @@ -704,6 +739,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ underscoreWidth?: number; @@ -723,6 +759,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ underscoreLength?: number; @@ -742,6 +779,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ scheduleMarkerRadius?: number; @@ -761,6 +799,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ boundaryRowOffset?: number; @@ -780,6 +819,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ boundaryColOffset?: number; } @@ -800,6 +840,7 @@ interface CurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface NonCurrentDayStyle { /** @@ -818,6 +859,7 @@ interface NonCurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ nonCurrentMonthDayColor?: ResourceColor; @@ -837,6 +879,7 @@ interface NonCurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ nonCurrentMonthLunarColor?: ResourceColor; @@ -856,6 +899,7 @@ interface NonCurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ nonCurrentMonthWorkDayMarkColor?: ResourceColor; @@ -875,6 +919,7 @@ interface NonCurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ nonCurrentMonthOffDayMarkColor?: ResourceColor; } @@ -895,6 +940,7 @@ interface NonCurrentDayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface TodayStyle { /** @@ -913,6 +959,7 @@ interface TodayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ focusedDayColor?: ResourceColor; @@ -932,6 +979,7 @@ interface TodayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ focusedLunarColor?: ResourceColor; @@ -951,6 +999,7 @@ interface TodayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ focusedAreaBackgroundColor?: ResourceColor; @@ -970,6 +1019,7 @@ interface TodayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ focusedAreaRadius?: number; } @@ -990,6 +1040,7 @@ interface TodayStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface WeekStyle { /** @@ -1008,6 +1059,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekColor?: ResourceColor; @@ -1027,6 +1079,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekendDayColor?: ResourceColor; @@ -1046,6 +1099,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekendLunarColor?: ResourceColor; @@ -1065,6 +1119,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekFontSize?: number; @@ -1084,6 +1139,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekHeight?: number; @@ -1103,6 +1159,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekWidth?: number; @@ -1122,6 +1179,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekAndDayRowSpace?: number; } @@ -1142,6 +1200,7 @@ interface WeekStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface WorkStateStyle { /** @@ -1160,6 +1219,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ workDayMarkColor?: ResourceColor; @@ -1179,6 +1239,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ offDayMarkColor?: ResourceColor; @@ -1198,6 +1259,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ workDayMarkSize?: number; @@ -1217,6 +1279,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ offDayMarkSize?: number; @@ -1236,6 +1299,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ workStateWidth?: number; @@ -1255,6 +1319,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ workStateHorizontalMovingDistance?: number; @@ -1274,6 +1339,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ workStateVerticalMovingDistance?: number; } @@ -1294,6 +1360,7 @@ interface WorkStateStyle { * @systemapi * @form * @since 10 + * @deprecated since 20 */ declare interface CalendarSelectedDate { /** @@ -1312,6 +1379,7 @@ declare interface CalendarSelectedDate { * @systemapi * @form * @since 10 + * @deprecated since 20 */ year: number; @@ -1331,6 +1399,7 @@ declare interface CalendarSelectedDate { * @systemapi * @form * @since 10 + * @deprecated since 20 */ month: number; @@ -1350,6 +1419,7 @@ declare interface CalendarSelectedDate { * @systemapi * @form * @since 10 + * @deprecated since 20 */ day: number; } @@ -1370,6 +1440,7 @@ declare interface CalendarSelectedDate { * @systemapi * @form * @since 10 + * @deprecated since 20 */ declare interface CalendarRequestedData { /** @@ -1388,6 +1459,7 @@ declare interface CalendarRequestedData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ year: number; @@ -1407,6 +1479,7 @@ declare interface CalendarRequestedData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ month: number; @@ -1426,6 +1499,7 @@ declare interface CalendarRequestedData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ currentYear: number; @@ -1445,6 +1519,7 @@ declare interface CalendarRequestedData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ currentMonth: number; @@ -1464,6 +1539,7 @@ declare interface CalendarRequestedData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ monthState: number; } @@ -1482,6 +1558,7 @@ declare interface CalendarRequestedData { * @systemapi * @form * @since 10 + * @deprecated since 20 */ declare class CalendarController { /** @@ -1498,6 +1575,7 @@ declare class CalendarController { * @systemapi * @form * @since 10 + * @deprecated since 20 */ constructor(); @@ -1515,6 +1593,7 @@ declare class CalendarController { * @systemapi * @form * @since 10 + * @deprecated since 20 */ backToToday(); @@ -1534,6 +1613,7 @@ declare class CalendarController { * @systemapi * @form * @since 10 + * @deprecated since 20 */ goTo(value: { year: number; month: number; day: number }); } @@ -1554,6 +1634,7 @@ declare class CalendarController { * @systemapi * @form * @since 10 + * @deprecated since 20 */ interface CalendarInterface { /** @@ -1574,6 +1655,7 @@ interface CalendarInterface { * @systemapi * @form * @since 10 + * @deprecated since 20 */ (value: { date: { year: number; month: number; day: number }; @@ -1594,6 +1676,7 @@ interface CalendarInterface { * @systemapi * @form * @since 10 + * @deprecated since 20 */ declare class CalendarAttribute { /** @@ -1614,6 +1697,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ showLunar(value: boolean): CalendarAttribute; @@ -1635,6 +1719,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ showHoliday(value: boolean): CalendarAttribute; @@ -1656,6 +1741,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ needSlide(value: boolean): CalendarAttribute; @@ -1677,6 +1763,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ startOfWeek(value: number): CalendarAttribute; @@ -1698,6 +1785,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ offDays(value: number): CalendarAttribute; @@ -1719,6 +1807,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ direction(value: Axis): CalendarAttribute; @@ -1740,6 +1829,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ currentDayStyle(value: CurrentDayStyle): CalendarAttribute; @@ -1761,6 +1851,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ nonCurrentDayStyle(value: NonCurrentDayStyle): CalendarAttribute; @@ -1782,6 +1873,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ todayStyle(value: TodayStyle): CalendarAttribute; @@ -1803,6 +1895,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ weekStyle(value: WeekStyle): CalendarAttribute; @@ -1824,6 +1917,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ workStateStyle(value: WorkStateStyle): CalendarAttribute; @@ -1845,6 +1939,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ onSelectChange(event: (event: CalendarSelectedDate) => void): CalendarAttribute; @@ -1866,6 +1961,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ onRequestData( event: (event: CalendarRequestedData) => void, @@ -1886,6 +1982,7 @@ declare class CalendarAttribute { * @systemapi * @form * @since 10 + * @deprecated since 20 */ declare const Calendar: CalendarInterface; @@ -1903,5 +2000,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..a86fbe7dc893ecf0dd88cd402caf88ad2d179a7c 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,7 +192,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 */ interface CalendarPickerInterface { /** @@ -193,7 +211,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 */ (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,7 +251,8 @@ declare class CalendarPickerAttribute extends CommonMethod, offset?: Offset): CalendarPickerAttribute; @@ -262,7 +284,8 @@ declare class CalendarPickerAttribute extends CommonMethod): CalendarPickerAttribute; @@ -302,7 +326,8 @@ declare class CalendarPickerAttribute extends CommonMethod): CalendarPickerAttribute; @@ -313,7 +338,8 @@ declare class CalendarPickerAttribute extends CommonMethod>): 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,7 +700,8 @@ 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 { /** @@ -671,7 +717,8 @@ declare class CalendarPickerDialog { * @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..7934396c9e47be78f67a07236732bb841beee3ad 100644 --- a/api/@internal/component/ets/canvas.d.ts +++ b/api/@internal/component/ets/canvas.d.ts @@ -561,7 +561,7 @@ declare class CanvasPath { * @param { number } radius - Radius of the arc. * @param { number } startAngle - Start point of an arc, which starts to be calculated in the x-axis direction. The unit is radian. * @param { number } endAngle - The end point of the arc, in radians. - * @param { boolean } counterclockwise - If the value is true, the arc is drawn counterclockwise. Otherwise, + * @param { boolean } [counterclockwise] - If the value is true, the arc is drawn counterclockwise. Otherwise, * the arc is drawn clockwise. The default value is false. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 @@ -574,7 +574,7 @@ declare class CanvasPath { * @param { number } radius - Radius of the arc. * @param { number } startAngle - Start point of an arc, which starts to be calculated in the x-axis direction. The unit is radian. * @param { number } endAngle - The end point of the arc, in radians. - * @param { boolean } counterclockwise - If the value is true, the arc is drawn counterclockwise. Otherwise, + * @param { boolean } [counterclockwise] - If the value is true, the arc is drawn counterclockwise. Otherwise, * the arc is drawn clockwise. The default value is false. * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -588,7 +588,7 @@ declare class CanvasPath { * @param { number } radius - Radius of the arc. * @param { number } startAngle - Start point of an arc, which starts to be calculated in the x-axis direction. The unit is radian. * @param { number } endAngle - The end point of the arc, in radians. - * @param { boolean } counterclockwise - If the value is true, the arc is drawn counterclockwise. Otherwise, + * @param { boolean } [counterclockwise] - If the value is true, the arc is drawn counterclockwise. Otherwise, * the arc is drawn clockwise. The default value is false. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -603,7 +603,7 @@ declare class CanvasPath { * @param { number } radius - Radius of the arc. * @param { number } startAngle - Start point of an arc, which starts to be calculated in the x-axis direction. The unit is radian. * @param { number } endAngle - The end point of the arc, in radians. - * @param { boolean } counterclockwise - If the value is true, the arc is drawn counterclockwise. Otherwise, + * @param { boolean } [counterclockwise] - If the value is true, the arc is drawn counterclockwise. Otherwise, * the arc is drawn clockwise. The default value is false. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1017,7 +1017,8 @@ declare class CanvasPath { * @param { number } y - The y-axis coordinate of the start point of the rectangle. * @param { number } w - Width of the rectangle. * @param { number } h - Height of the rectangle. - * @param { number | Array } radii - A number or list specifying the radii of the circular arc to be used for the corners of the rectangle. The default value is 0. + * @param { number | Array } [radii] - A number or list specifying the radii of the circular arc to be used for the corners of the rectangle. + * The default value is 0. * @throws { BusinessError } 103701 - Parameter error. Possible causes: *
1. The param radii is a list that has zero or more than four elements. *
2. The param radii contains negative value. @@ -5259,13 +5260,13 @@ declare class CanvasRenderer extends CanvasPath { 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 12 + */ reset(): void; } @@ -5535,7 +5536,7 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * Unregister the listener that watches if the canvasrenderingcontext2d attached to the Canvas frameNode. * * @param { 'onAttach' } type Indicates the type of event. - * @param { Callback } callback Indicates the listener. + * @param { Callback } [callback] Indicates the listener. * @throws { BusinessError } 401 - Input parameter error. Possible causes: * 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; @@ -5567,7 +5568,7 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * Unregister the listener that watches if the canvasrenderingcontext2d detached from the Canvas frameNode. * * @param { 'onDetach' } type Indicates the type of event. - * @param { Callback } callback Indicates the listener. + * @param { Callback } [callback] Indicates the listener. * @throws { BusinessError } 401 - Input parameter error. Possible causes: * 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; diff --git a/api/@internal/component/ets/column.d.ts b/api/@internal/component/ets/column.d.ts index 96457a9ee06baefc0134795dfdcc5fd43ff59c03..4c7f1e96961c8274b65babb8f5b72d3d024214d5 100644 --- a/api/@internal/component/ets/column.d.ts +++ b/api/@internal/component/ets/column.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { PointLightStyle, Optional, CommonMethod } from './common'; -import { HorizontalAlign, FlexAlign } from './enums'; -import { Resource } from './../../global/resource'; -/*** endif */ - /** * Defines the space property with string, number and resource unit. * @@ -32,8 +26,7 @@ import { Resource } from './../../global/resource'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type SpaceType = string | number | Resource; @@ -45,8 +38,7 @@ declare type SpaceType = string | number | Resource; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface ColumnOptions { /** @@ -81,8 +73,18 @@ interface ColumnOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + */ + /** + * Vertical layout element spacing. + * + * Anonymous Object Rectification + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 */ space?: string | number; } @@ -95,8 +97,7 @@ interface ColumnOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface ColumnOptionsV2 { /** @@ -107,8 +108,7 @@ interface ColumnOptionsV2 { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ space?: SpaceType; } @@ -145,8 +145,7 @@ interface ColumnOptionsV2 { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface ColumnInterface { /** @@ -198,27 +197,27 @@ interface ColumnInterface { /** * Set the options. * + * Anonymous Object Rectification * @param { ColumnOptions } [options] - column options * @returns { ColumnAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options?: ColumnOptions): ColumnAttribute; /** * Set the options. * + * Anonymous Object Rectification * @param { ColumnOptions | ColumnOptionsV2 } [options] - column options * @returns { ColumnAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options?: ColumnOptions | ColumnOptionsV2): ColumnAttribute; } @@ -255,8 +254,7 @@ interface ColumnInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class ColumnAttribute extends CommonMethod { /** @@ -295,8 +293,7 @@ declare class ColumnAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ alignItems(value: HorizontalAlign): ColumnAttribute; @@ -336,8 +333,7 @@ declare class ColumnAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ justifyContent(value: FlexAlign): ColumnAttribute; /** @@ -347,8 +343,7 @@ declare class ColumnAttribute extends CommonMethod { * @returns { ColumnAttribute } The attribute of the column. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ pointLight(value: PointLightStyle): ColumnAttribute; /** @@ -360,8 +355,7 @@ declare class ColumnAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ reverse(isReversed: Optional): ColumnAttribute; } diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 97741bdba17eb8db24997bb58dae041a65f41ec0..180cfb98006356760afa91d70a8419e3437adc85 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -81,7 +81,7 @@ declare interface ComponentOptions { */ 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,23 +89,8 @@ 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: - *
Threshold percentage for displaying the character counter. - *
The character counter is displayed when the number of characters that have been entered is greater than - * the maximum number of characters multiplied by the threshold percentage value. - *
When displayed, the character counter is in the following format: - *
Number of characters that have been entered/Maximum number of characters allowed. - *
It is visible when the number of characters entered is greater than - * the character limit multiplied by the threshold percentage value. - *
Value range: [1, 100] - *
If the value is not an integer, it is rounded down to the nearest integer. - *
If the value exceeds the valid value range, the character counter is not displayed. - *
If the value is undefined, the character counter is displayed, but this parameter has no effect. - *

- * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -113,7 +98,7 @@ declare interface InputCounterOptions { * @since 12 */ 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. @@ -126,16 +111,6 @@ declare interface InputCounterOptions { /** * 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. - * - *

NOTE: - *
Whether to highlight the text box border and character counter subscript in red. - *
If options is not set, the text box border and character counter subscript turn red - *
when the number of characters entered reaches the limit. - *
If the character counter is displayed and thresholdPercentage is set to a valid value, - * the text box border and character counter subscript turn red when the number of entered characters exceeds the limit. - *
The value true (default) means to highlight the text box border and character counter subscript in red. - *

- * * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -753,23 +728,23 @@ declare const Provider: (aliasName?: string) => PropertyDecorator; declare const Consume: PropertyDecorator & ((value: string) => PropertyDecorator); /** -* Defining Consumer PropertyDecorator, aliasName is the only matching key and if aliasName is the default, the default attribute name is regarded as aliasName. -* And @Consumer will find the nearest @Provider. -* @syscap SystemCapability.ArkUI.ArkUI.Full -* @crossplatform -* @atomicservice -* @since 12 -*/ + * Defining Consumer PropertyDecorator, aliasName is the only matching key and if aliasName is the default, the default attribute name is regarded as aliasName. + * And @Consumer will find the nearest @Provider. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ declare const Consumer: (aliasName?: string) => PropertyDecorator; /** -* Defining Computed MethodDecorator. -* -* @syscap SystemCapability.ArkUI.ArkUI.Full -* @crossplatform -* @atomicservice -* @since 12 -*/ + * Defining Computed MethodDecorator. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ declare const Computed: MethodDecorator; /** @@ -972,7 +947,7 @@ declare const Extend: MethodDecorator & ((value: any) => MethodDecorator); * @atomicservice * @since 11 */ - declare const AnimatableExtend: MethodDecorator & ((value: Object) => MethodDecorator); +declare const AnimatableExtend: MethodDecorator & ((value: Object) => MethodDecorator); /** * Define Monitor MethodDecorator @@ -1078,13 +1053,7 @@ declare interface IMonitorValue { } /** - * The **AnimatableArithmetic** API defines the animation operation rules for - * non-number data types. To animate non-number data (such as arrays, structs, - * and colors), implement the addition, subtraction, multiplication, and - * equality judgment functions in the **AnimatableArithmetic\** API. - * In this way, the data can be involved in an interpolation operation of the - * animation and identify whether the data changes, that is, the non-number data - * is defined as the types that implement the **AnimatableArithmetic\** API. + * Define AnimatableArithmetic interface * * @interface AnimatableArithmetic * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1092,13 +1061,7 @@ declare interface IMonitorValue { * @since 10 */ /** - * The **AnimatableArithmetic** API defines the animation operation rules for - * non-number data types. To animate non-number data (such as arrays, structs, - * and colors), implement the addition, subtraction, multiplication, and - * equality judgment functions in the **AnimatableArithmetic\** API. - * In this way, the data can be involved in an interpolation operation of the - * animation and identify whether the data changes, that is, the non-number data - * is defined as the types that implement the **AnimatableArithmetic\** API. + * Define AnimatableArithmetic interface * * @interface AnimatableArithmetic * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1106,9 +1069,9 @@ declare interface IMonitorValue { * @atomicservice * @since 11 */ - declare interface AnimatableArithmetic { +declare interface AnimatableArithmetic { /** - * Defines the addition rule of the data type. + * Define plus method * * @param { AnimatableArithmetic } rhs - another value * @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface @@ -1117,7 +1080,7 @@ declare interface IMonitorValue { * @since 10 */ /** - * Defines the addition rule of the data type. + * Define plus method * * @param { AnimatableArithmetic } rhs - another value * @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface @@ -1126,10 +1089,10 @@ declare interface IMonitorValue { * @atomicservice * @since 11 */ - plus(rhs: AnimatableArithmetic): AnimatableArithmetic; + plus(rhs: AnimatableArithmetic): AnimatableArithmetic; /** - * Defines the subtraction rule of the data type. + * Define subtract method * * @param { AnimatableArithmetic } rhs - another value * @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface @@ -1138,7 +1101,7 @@ declare interface IMonitorValue { * @since 10 */ /** - * Defines the subtraction rule of the data type. + * Define subtract method * * @param { AnimatableArithmetic } rhs - another value * @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface @@ -1147,10 +1110,10 @@ declare interface IMonitorValue { * @atomicservice * @since 11 */ - subtract(rhs: AnimatableArithmetic): AnimatableArithmetic; + subtract(rhs: AnimatableArithmetic): AnimatableArithmetic; /** - * Defines the multiplication rule of the data type. + * Define multiply method * * @param { number } scale - scale value * @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface @@ -1159,7 +1122,7 @@ declare interface IMonitorValue { * @since 10 */ /** - * Defines the multiplication rule of the data type. + * Define multiply method * * @param { number } scale - scale value * @returns { AnimatableArithmetic } new value which implements AnimatableArithmetic interface @@ -1168,10 +1131,10 @@ declare interface IMonitorValue { * @atomicservice * @since 11 */ - multiply(scale: number): AnimatableArithmetic; + multiply(scale: number): AnimatableArithmetic; /** - * Defines the equality judgment rule of the data type. + * Define equals method * * @param { AnimatableArithmetic } rhs - another value * @returns { boolean } is equals @@ -1180,7 +1143,7 @@ declare interface IMonitorValue { * @since 10 */ /** - * Defines the equality judgment rule of the data type. + * Define equals method * * @param { AnimatableArithmetic } rhs - another value * @returns { boolean } is equals @@ -1222,7 +1185,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 @@ -1306,14 +1269,7 @@ declare const LocalStorageProp: (value: string) => PropertyDecorator; * Obtains the Context object associated with a component on the page. * * @param { Object } component - indicate the component on the page. - * If no component is passed in or the passed-in parameter type is invalid, the default context is returned. - * The default context is the context obtained by tracing the call chain of the API. - * If this API is used in an asynchronous callback or not initially called on the current page, the context of the - * instance may fail to be traced. In this case, undefined is returned. * @returns { Context } - * The context type depends on the ability type. - * For example, if this API is called on a page of the UIAbility, the return value type is UIAbilityContext; - * if this API is called on a page of the ExtensionAbility, the return value type is ExtensionContext. * @syscap SystemCapability.ArkUI.ArkUI.Full * @StageModelOnly * @since 9 @@ -1322,14 +1278,7 @@ declare const LocalStorageProp: (value: string) => PropertyDecorator; * Obtains the Context object associated with a component on the page. * * @param { Object } component - indicate the component on the page. - * If no component is passed in or the passed-in parameter type is invalid, the default context is returned. - * The default context is the context obtained by tracing the call chain of the API. - * If this API is used in an asynchronous callback or not initially called on the current page, the context of the - * instance may fail to be traced. In this case, undefined is returned. * @returns { Context } - * The context type depends on the ability type. - * For example, if this API is called on a page of the UIAbility, the return value type is UIAbilityContext; - * if this API is called on a page of the ExtensionAbility, the return value type is ExtensionContext. * @syscap SystemCapability.ArkUI.ArkUI.Full * @StageModelOnly * @crossplatform @@ -1339,14 +1288,7 @@ declare const LocalStorageProp: (value: string) => PropertyDecorator; * Obtains the Context object associated with a component on the page. * * @param { Object } component - indicate the component on the page. - * If no component is passed in or the passed-in parameter type is invalid, the default context is returned. - * The default context is the context obtained by tracing the call chain of the API. - * If this API is used in an asynchronous callback or not initially called on the current page, the context of the - * instance may fail to be traced. In this case, undefined is returned. * @returns { Context } - * The context type depends on the ability type. - * For example, if this API is called on a page of the UIAbility, the return value type is UIAbilityContext; - * if this API is called on a page of the ExtensionAbility, the return value type is ExtensionContext. * @syscap SystemCapability.ArkUI.ArkUI.Full * @StageModelOnly * @crossplatform @@ -1384,17 +1326,17 @@ declare const Reusable: ClassDecorator; */ declare const ReusableV2: ClassDecorator; - /** - * ReuseId callback type. It is used to compute reuseId. - * - * @typedef { function } ReuseIdCallback - * @returns { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - declare type ReuseIdCallback = () => string; +/** + * ReuseId callback type. It is used to compute reuseId. + * + * @typedef { function } ReuseIdCallback + * @returns { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ +declare type ReuseIdCallback = () => string; /** * Defining the reusable configuration parameters. @@ -1417,6 +1359,7 @@ declare interface ReuseOptions { */ reuseId? : ReuseIdCallback; } + /** * Get context. * @@ -1833,7 +1776,7 @@ declare interface ExpectedFrameRateRange { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 11 - */ + */ /** * The maximum animation drawing FPS. * The maximum value should be greater than or equal to the minimum value. @@ -1841,7 +1784,7 @@ declare interface ExpectedFrameRateRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 - */ + */ /** * The maximum animation drawing FPS. * The maximum value should be greater than or equal to the minimum value. @@ -1860,7 +1803,7 @@ declare interface ExpectedFrameRateRange { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 11 - */ + */ /** * The expected frame rate of dynamical callback rate range. * The value should be between the minimum and maximum value. @@ -1870,7 +1813,7 @@ declare interface ExpectedFrameRateRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 - */ + */ /** * The expected frame rate of dynamical callback rate range. * The value should be between the minimum and maximum value. @@ -1889,11 +1832,6 @@ declare interface ExpectedFrameRateRange { * global $r function * * @param { string } value - * The value format is 'belonging.type.name'. - * belonging: group to which the resource belongs, which can be 'sys' or 'app'. - * type: resource type, which can be 'boolean', 'color', 'float', 'intarray', 'integer', 'pattern', 'plural', - * 'strarray', 'string', or 'media'. - * name: resource name, which is determined during resource definition. * @param { any[] } params * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1903,11 +1841,6 @@ declare interface ExpectedFrameRateRange { * global $r function * * @param { string } value - * The value format is 'belonging.type.name'. - * belonging: group to which the resource belongs, which can be 'sys' or 'app'. - * type: resource type, which can be 'boolean', 'color', 'float', 'intarray', 'integer', 'pattern', 'plural', - * 'strarray', 'string', or 'media'. - * name: resource name, which is determined during resource definition. * @param { any[] } params * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1918,11 +1851,6 @@ declare interface ExpectedFrameRateRange { * global $r function * * @param { string } value - * The value format is 'belonging.type.name'. - * belonging: group to which the resource belongs, which can be 'sys' or 'app'. - * type: resource type, which can be 'boolean', 'color', 'float', 'intarray', 'integer', 'pattern', 'plural', - * 'strarray', 'string', or 'media'. - * name: resource name, which is determined during resource definition. * @param { any[] } params * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1934,11 +1862,6 @@ declare interface ExpectedFrameRateRange { * global $r function * * @param { string } value - * The value format is 'belonging.type.name'. - * belonging: group to which the resource belongs, which can be 'sys' or 'app'. - * type: resource type, which can be 'boolean', 'color', 'float', 'intarray', 'integer', 'pattern', 'plural', - * 'strarray', 'string', or 'media'. - * name: resource name, which is determined during resource definition. * @param { any[] } params * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1953,10 +1876,6 @@ declare function $r(value: string, ...params: any[]): Resource; * global $rawfile function * * @param { string } value - * name of the file in the resources/rawfile directory of the project. - * When referencing resources of the Resource type, make sure the data type is the same as that of the attribute method. - * For example, if an attribute method supports the string | Resource types, the data type of the Resource type must be - * string. * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -1965,10 +1884,6 @@ declare function $r(value: string, ...params: any[]): Resource; * global $rawfile function * * @param { string } value - * name of the file in the resources/rawfile directory of the project. - * When referencing resources of the Resource type, make sure the data type is the same as that of the attribute method. - * For example, if an attribute method supports the string | Resource types, the data type of the Resource type must be - * string. * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -1978,10 +1893,6 @@ declare function $r(value: string, ...params: any[]): Resource; * global $rawfile function * * @param { string } value - * name of the file in the resources/rawfile directory of the project. - * When referencing resources of the Resource type, make sure the data type is the same as that of the attribute method. - * For example, if an attribute method supports the string | Resource types, the data type of the Resource type must be - * string. * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1992,10 +1903,6 @@ declare function $r(value: string, ...params: any[]): Resource; * global $rawfile function * * @param { string } value - * name of the file in the resources/rawfile directory of the project. - * When referencing resources of the Resource type, make sure the data type is the same as that of the attribute method. - * For example, if an attribute method supports the string | Resource types, the data type of the Resource type must be - * string. * @returns { Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -2015,24 +1922,24 @@ declare function $rawfile(value: string): Resource; */ declare enum AccessibilitySamePageMode { /** - * the first page and root page event is not send.but if application load new page whith navigation,the page event will be sent. - * this mode is to solve skipping focus - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * the first page and root page event is not send.but if application load new page whith navigation,the page event will be sent. + * this mode is to solve skipping focus + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SEMI_SILENT = 0, - /** - * the all page event is not send - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ - FULL_SILENT = 1, + /** + * the all page event is not send + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ + FULL_SILENT = 1 } /** * Enum for accessibility component type @@ -2045,1130 +1952,1130 @@ declare enum AccessibilitySamePageMode { */ declare enum AccessibilityRoleType { /** - * ActionSheet component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * ActionSheet component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ ACTION_SHEET = 0, /** - * AlertDialog component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * AlertDialog component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ ALERT_DIALOG = 1, /** - * AlphabetIndexer component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * AlphabetIndexer component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ INDEXER_COMPONENT = 2, /** - * badge component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * badge component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ BADGE_COMPONENT = 3, /** - * blank component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * blank component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ BLANK = 4, /** - * button component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * button component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ BUTTON = 5, /** - * button component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * button component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ BACK_BUTTON = 6, /** - * sheet drag bar component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * sheet drag bar component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SHEET_DRAG_BAR = 7, /** - * calendar picker component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * calendar picker component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ CALENDAR_PICKER = 8, /** - * calendar component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * calendar component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ CALENDAR = 9, /** - * canvas component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * canvas component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ CANVAS = 10, /** - * canvas gradient component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * canvas gradient component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ CANVAS_GRADIENT = 11, /** - * canvas pattern component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * canvas pattern component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ CANVAS_PATTERN = 12, /** - * checkbox component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * checkbox component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ CHECKBOX = 13, /** - * checkbox group component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * checkbox group component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ CHECKBOX_GROUP = 14, /** - * circle component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * circle component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ CIRCLE = 15, /** - * column split component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * column split component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ COLUMN_SPLIT = 16, /** - * column component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * column component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ COLUMN = 17, /** - * canvas rendering context 2d component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * canvas rendering context 2d component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ CANVAS_RENDERING_CONTEXT_2D = 18, /** - * chart component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * chart component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ CHART = 19, /** - * counter component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * counter component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ COUNTER = 20, /** - * counter modal component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * counter modal component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ CONTAINER_MODAL = 21, /** - * data panel component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * data panel component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ DATA_PANEL = 22, /** - * data picker component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * data picker component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ DATE_PICKER = 23, /** - * dialog component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * dialog component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ DIALOG = 24, /** - * divider component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * divider component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ DIVIDER = 25, /** - * drag bar component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * drag bar component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ DRAG_BAR = 26, /** - * effect component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * effect component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ EFFECT_COMPONENT = 27, /** - * ellipse component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * ellipse component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ ELLIPSE = 28, /** - * flex component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * flex component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ FLEX = 29, /** - * flow item component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * flow item component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ FLOW_ITEM = 30, /** - * form component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * form component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ FORM_COMPONENT = 31, /** - * form link component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * form link component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ FORM_LINK = 32, /** - * gauge component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * gauge component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ GAUGE = 33, /** - * grid component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * grid component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ GRID = 34, /** - * grid col component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * grid col component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ GRID_COL = 35, /** - * grid container component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * grid container component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ GRID_CONTAINER = 36, /** - * grid item component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * grid item component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ GRID_ITEM = 37, /** - * grid row component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * grid row component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ GRID_ROW = 38, /** - * hyperlink component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * hyperlink component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ HYPERLINK = 39, /** - * image component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * image component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ IMAGE = 40, /** - * image animator component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * image animator component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ IMAGE_ANIMATOR = 41, /** - * image bitmap component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * image bitmap component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ IMAGE_BITMAP = 42, /** - * image data component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * image data component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ IMAGE_DATA = 43, /** - * image span component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * image span component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ IMAGE_SPAN = 44, /** - * label component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * label component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ LABEL = 45, /** - * line component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ - LINE = 46, - /** - * list component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * line component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ + LINE = 46, + /** + * list component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ LIST = 47, /** - * list item component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * list item component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ LIST_ITEM = 48, /** - * list item group component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * list item group component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ LIST_ITEM_GROUP = 49, /** - * loading progress component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * loading progress component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ LOADING_PROGRESS = 50, /** - * marquee component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * marquee component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ MARQUEE = 51, /** - * matrix2d component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * matrix2d component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ MATRIX2D = 52, /** - * menu component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * menu component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ MENU = 53, /** - * menu item component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * menu item component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ MENU_ITEM = 54, /** - * menu item group component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * menu item group component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ MENU_ITEM_GROUP = 55, /** - * navdestination component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * navdestination component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ NAV_DESTINATION = 56, /** - * navrouter component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * navrouter component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ NAV_ROUTER = 57, /** - * navigation component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * navigation component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ NAVIGATION = 58, /** - * navigation bar component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * navigation bar component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ NAVIGATION_BAR = 59, /** - * navigation menu component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * navigation menu component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ NAVIGATION_MENU = 60, /** - * navigator component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * navigator component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ NAVIGATOR = 61, /** - * offscreen canvas component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * offscreen canvas component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ OFFSCREEN_CANVAS = 62, /** - * offscreen canvas rendering context2d component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * offscreen canvas rendering context2d component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ OFFSCREEN_CANVAS_RENDERING_CONTEXT2D = 63, /** - * option component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * option component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ OPTION = 64, /** - * panel component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * panel component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ PANEL = 65, /** - * paper page component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * paper page component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ PAPER_PAGE = 66, /** - * path component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * path component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ PATH = 67, /** - * path 2d component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * path 2d component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ PATH2D = 68, /** - * pattern lock component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * pattern lock component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ PATTERN_LOCK = 69, /** - * picker component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * picker component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ PICKER = 70, /** - * picker view component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * picker view component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ PICKER_VIEW = 71, /** - * plugin component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * plugin component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ PLUGIN_COMPONENT = 72, /** - * polygon component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * polygon component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ POLYGON = 73, /** - * polyline component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * polyline component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ POLYLINE = 74, /** - * pop up component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * pop up component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ POPUP = 75, /** - * progress component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * progress component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ PROGRESS = 76, /** - * qr code component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * qr code component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ QRCODE = 77, /** - * radio component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * radio component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ RADIO = 78, /** - * rating component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * rating component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ RATING = 79, /** - * rect component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * rect component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ RECT = 80, /** - * refresh component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * refresh component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ REFRESH = 81, /** - * relative container component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * relative container component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ RELATIVE_CONTAINER = 82, /** - * remote window component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * remote window component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ REMOTE_WINDOW = 83, /** - * rich editor component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * rich editor component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ RICH_EDITOR = 84, /** - * rich text component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * rich text component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ RICH_TEXT = 85, /** - * rolepager component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * rolepager component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ ROLE_PAGER = 86, /** - * row component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * row component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ ROW = 87, /** - * row split component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * row split component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ ROW_SPLIT = 88, /** - * scroll component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * scroll component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SCROLL = 89, /** - * scroll bar component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * scroll bar component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SCROLL_BAR = 90, /** - * search component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * search component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SEARCH = 91, /** - * search field component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * search field component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SEARCH_FIELD = 92, /** - * select component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * select component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SELECT = 93, /** - * shape component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * shape component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SHAPE = 94, /** - * sidebar container component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * sidebar container component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SIDEBAR_CONTAINER = 95, /** - * slider component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * slider component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SLIDER = 96, /** - * span component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * span component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SPAN = 97, /** - * stack component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * stack component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ STACK = 98, /** - * stepper component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * stepper component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ STEPPER = 99, /** - * stepper item component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * stepper item component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ STEPPER_ITEM = 100, /** - * swiper component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * swiper component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SWIPER = 101, /** - * swiper indicator component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * swiper indicator component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SWIPER_INDICATOR = 102, /** - * switch component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * switch component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SWITCH = 103, /** - * symbol glyph component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * symbol glyph component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ SYMBOL_GLYPH = 104, /** - * tab content component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * tab content component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ TAB_CONTENT = 105, /** - * tab bar component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * tab bar component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ TAB_BAR = 106, /** - * tabs component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * tabs component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ TABS = 107, /** - * text component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * text component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ TEXT = 108, /** - * text clock component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * text clock component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ TEXT_CLOCK = 109, /** - * text entry component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * text entry component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ TEXT_ENTRY = 110, /** - * text input component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * text input component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ TEXT_INPUT = 111, /** - * text picker component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * text picker component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ TEXT_PICKER = 112, /** - * text timer component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * text timer component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ TEXT_TIMER = 113, /** - * text area component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * text area component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ TEXT_AREA = 114, /** - * text field component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * text field component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ TEXT_FIELD = 115, /** - * time picker component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * time picker component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ TIME_PICKER = 116, /** - * title bar component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * title bar component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ TITLE_BAR = 117, /** - * toggler component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * toggler component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ TOGGLER = 118, /** - * uiextensioncomponent component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * uiextensioncomponent component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ UI_EXTENSION_COMPONENT = 119, /** - * video component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * video component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ VIDEO = 120, /** - * water flow component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * water flow component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ WATER_FLOW = 121, /** - * web component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * web component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ WEB = 122, /** - * xcomponent component type - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * xcomponent component type + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ XCOMPONENT = 123, /** - * none component type: screen reader will not broadcast the component type. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ - ROLE_NONE = 124, + * none component type: screen reader will not broadcast the component type. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ + ROLE_NONE = 124 } /** @@ -3183,89 +3090,6 @@ declare enum AccessibilityRoleType { */ declare type AccessibilityFocusCallback = (isFocus: boolean) => void; -/** - * 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; - /** * Enum for FinishCallbackType. * @@ -3287,7 +3111,7 @@ declare type AccessibilityActionInterceptCallback = (action: AccessibilityAction */ declare enum FinishCallbackType { /** - * The callback is invoked when the entire animation is removed once it has finished. + * When the entire animation ends and will be removed immediately, the callback is triggered. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -3295,7 +3119,7 @@ declare enum FinishCallbackType { * @since 11 */ /** - * The callback is invoked when the entire animation is removed once it has finished. + * When the entire animation ends and will be removed immediately, the callback is triggered. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -3311,18 +3135,17 @@ declare enum FinishCallbackType { * @crossplatform * @form * @since 11 - */ - /** - * The callback is invoked when the animation logically enters the falling state, - * though it may still be in its long tail state. + */ + /** + * When the animation is logically down but may still be in its long tail, the callback is triggered. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 12 - */ - LOGICALLY = 1, + */ + LOGICALLY = 1 } /** @@ -3346,62 +3169,60 @@ declare enum FinishCallbackType { */ declare enum TouchTestStrategy { /** - * Do framework touch test. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * Custom dispatch has no effect; the system distributes events based on the hit status of the current node. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ + * Do framework touch test. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 11 + */ + /** + * Do framework touch test. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ DEFAULT = 0, /** - * Specify the component to do touch test and follow the framework touch test - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * The specified event is forwarded to a particular child node, and the system determines whether to - * distribute the event to other sibling nodes. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ + * Specify the component to do touch test and follow the framework touch test + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 11 + */ + /** + * Specify the component to do touch test and follow the framework touch test + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ FORWARD_COMPETITION = 1, /** - * Specify the component to do touch test and not follow the framework touch test - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * The specified event is forwarded to a particular child node, and the system no longer distributes - * the event to other sibling nodes. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ + * Specify the component to do touch test and not follow the framework touch test + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 11 + */ + /** + * Specify the component to do touch test and not follow the framework touch test + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ FORWARD = 2 } @@ -3482,7 +3303,6 @@ declare interface AnimateParam { /** * Animation playback speed. A larger value indicates faster animation playback, and a smaller value indicates slower * animation playback. The value 0 means that there is no animation. - *
Default value: **1.0**. * * @type { ?number } * @default 1.0 @@ -3492,7 +3312,6 @@ declare interface AnimateParam { /** * Animation playback speed. A larger value indicates faster animation playback, and a smaller value indicates slower * animation playback. The value 0 means that there is no animation. - *
Default value: **1.0**. * * @type { ?number } * @default 1.0 @@ -3553,7 +3372,7 @@ declare interface AnimateParam { curve?: Curve | string | ICurve; /** - * Animation delay time, in ms. By default, the animation has no delay. + * Animation plays with delay,when set to a negative number, the animation plays in advance. * * @type { ?number } * @default 0 @@ -3561,7 +3380,7 @@ declare interface AnimateParam { * @since 7 */ /** - * Animation delay time, in ms. By default, the animation has no delay. + * Animation delay time, in ms. * * @type { ?number } * @default 0 @@ -3570,7 +3389,7 @@ declare interface AnimateParam { * @since 10 */ /** - * Animation delay time, in ms. By default, the animation has no delay. + * Animation delay time, in ms. * * @type { ?number } * @default 0 @@ -3582,9 +3401,7 @@ declare interface AnimateParam { delay?: number; /** - * Number of times that the animation is played. By default, the animation is played once. - * The value **-1** indicates that the animation is played for an unlimited number of times. - * The value **0** indicates that there is no animation. + * Animation iterations. When set to -1, the animation playing it repeatedly. The value range is greater than or equal to -1. * * @type { ?number } * @default 1 @@ -3592,9 +3409,7 @@ declare interface AnimateParam { * @since 7 */ /** - * Number of times that the animation is played. By default, the animation is played once. - * The value **-1** indicates that the animation is played for an unlimited number of times. - * The value **0** indicates that there is no animation. + * Animation iterations. When set to -1, the animation playing it repeatedly. The value range is greater than or equal to -1. * * @type { ?number } * @default 1 @@ -3603,9 +3418,7 @@ declare interface AnimateParam { * @since 10 */ /** - * Number of times that the animation is played. By default, the animation is played once. - * The value **-1** indicates that the animation is played for an unlimited number of times. - * The value **0** indicates that there is no animation. + * Animation iterations. When set to -1, the animation playing it repeatedly. The value range is greater than or equal to -1. * * @type { ?number } * @default 1 @@ -3617,7 +3430,7 @@ declare interface AnimateParam { iterations?: number; /** - * Playback mode. By default, the animation is played from the beginning after the playback is complete. + * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. * * @type { ?PlayMode } * @default PlayMode.Normal @@ -3625,7 +3438,7 @@ declare interface AnimateParam { * @since 7 */ /** - * Playback mode. By default, the animation is played from the beginning after the playback is complete. + * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. * * @type { ?PlayMode } * @default PlayMode.Normal @@ -3634,7 +3447,7 @@ declare interface AnimateParam { * @since 9 */ /** - * Playback mode. By default, the animation is played from the beginning after the playback is complete. + * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. * * @type { ?PlayMode } * @default PlayMode.Normal @@ -3644,7 +3457,7 @@ declare interface AnimateParam { * @since 10 */ /** - * Playback mode. By default, the animation is played from the beginning after the playback is complete. + * Animation playback mode. By default, the animation is played from the beginning after the playback is complete. * * @type { ?PlayMode } * @default PlayMode.Normal @@ -3657,14 +3470,14 @@ declare interface AnimateParam { playMode?: PlayMode; /** - * Callback invoked when the animation playback is complete. + * Callback invoked when the animation playback is complete or the ability is about to enter the background. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Callback invoked when the animation playback is complete. + * Callback invoked when the animation playback is complete or the ability is about to enter the background. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3672,7 +3485,7 @@ declare interface AnimateParam { * @since 9 */ /** - * Callback invoked when the animation playback is complete. + * Callback invoked when the animation playback is complete or the ability is about to enter the background. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3681,7 +3494,7 @@ declare interface AnimateParam { * @since 10 */ /** - * Callback invoked when the animation playback is complete. + * Callback invoked when the animation playback is complete or the ability is about to enter the background. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3693,7 +3506,7 @@ declare interface AnimateParam { onFinish?: () => void; /** - * Type of the **onFinish** callback. + * Define the type of onFinish callback in animation. * * @type { ?FinishCallbackType } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3702,8 +3515,7 @@ declare interface AnimateParam { * @since 11 */ /** - * Type of the **onFinish** callback. - * Default value: FinishCallbackType.REMOVED. + * Define the type of onFinish callback in animation. * * @type { ?FinishCallbackType } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3715,14 +3527,14 @@ declare interface AnimateParam { finishCallbackType?: FinishCallbackType; /** - * Expected frame rate range of the animation. + * Indicates expectedFrameRateRange including minimum、maximum and expected frame rate. * * @type { ?ExpectedFrameRateRange } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 11 */ /** - * Expected frame rate range of the animation. + * Indicates expectedFrameRateRange including minimum、maximum and expected frame rate. * * @type { ?ExpectedFrameRateRange } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3761,24 +3573,20 @@ declare interface AnimateParam { */ interface ICurve { /** - * Implements calculation. + * Get curve value by fraction. * - * @param { number } fraction - Current normalized time. Value range: [0, 1]. - *

**NOTE**: - *
A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**. - *

+ * @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 * @form * @since 9 */ /** - * Implements calculation. + * Get curve value by fraction. * - * @param { number } fraction - Current normalized time. Value range: [0, 1]. - *

**NOTE**: - *
A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**. - *

+ * @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 @@ -3786,12 +3594,10 @@ interface ICurve { * @since 10 */ /** - * Implements calculation. + * Get curve value by fraction. * - * @param { number } fraction - Current normalized time. Value range: [0, 1]. - *

**NOTE**: - *
A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**. - *

+ * @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 @@ -3799,7 +3605,7 @@ interface ICurve { * @atomicservice * @since 11 */ - interpolate(fraction: number): number; + interpolate(fraction : number) : number; } /** @@ -3828,22 +3634,14 @@ interface ICurve { */ declare interface MotionPathOptions { /** - * Motion path of the translation animation. - * The **svg** path string is used. - * In the value, **start** and **end** can be used in place of the start point and end point, - * for example, **'Mstart.x start.y L50 50 Lend.x end.y Z'**. - * If this parameter is set to an empty string, the path animation is not set. + * The path info. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Motion path of the translation animation. - * The **svg** path string is used. - * In the value, **start** and **end** can be used in place of the start point and end point, - * for example, **'Mstart.x start.y L50 50 Lend.x end.y Z'**. - * If this parameter is set to an empty string, the path animation is not set. + * The path info. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3851,11 +3649,7 @@ declare interface MotionPathOptions { * @since 10 */ /** - * Motion path of the translation animation. - * The **svg** path string is used. - * In the value, **start** and **end** can be used in place of the start point and end point, - * for example, **'Mstart.x start.y L50 50 Lend.x end.y Z'**. - * If this parameter is set to an empty string, the path animation is not set. + * The path info. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3866,9 +3660,7 @@ declare interface MotionPathOptions { path: string; /** - * Start point of the motion path. - * Value range: [0, 1]. - * A value less than 0 or greater than 1 evaluates to the default value **0**. + * The origin point info in range [0,1). * * @type { ?number } * @default 0.0 @@ -3876,9 +3668,7 @@ declare interface MotionPathOptions { * @since 7 */ /** - * Start point of the motion path. - * Value range: [0, 1]. - * A value less than 0 or greater than 1 evaluates to the default value **0**. + * The origin point info in range [0,1). * * @type { ?number } * @default 0.0 @@ -3887,9 +3677,7 @@ declare interface MotionPathOptions { * @since 10 */ /** - * Start point of the motion path. - * Value range: [0, 1]. - * A value less than 0 or greater than 1 evaluates to the default value **0**. + * The origin point info in range [0,1). * * @type { ?number } * @default 0.0 @@ -3901,10 +3689,7 @@ declare interface MotionPathOptions { from?: number; /** - * End point of the motion path. - * Value range: [0, 1]. - * A value less than 0 or greater than 1 evaluates to the default value **1**, - * provided that the value of **to** is greater than or equal to the value of **from**. + * he distance point info in range (0,1]. * * @type { ?number } * @default 1.0 @@ -3912,10 +3697,7 @@ declare interface MotionPathOptions { * @since 7 */ /** - * End point of the motion path. - * Value range: [0, 1]. - * A value less than 0 or greater than 1 evaluates to the default value **1**, - * provided that the value of **to** is greater than or equal to the value of **from**. + * he distance point info in range (0,1]. * * @type { ?number } * @default 1.0 @@ -3924,10 +3706,7 @@ declare interface MotionPathOptions { * @since 10 */ /** - * End point of the motion path. - * Value range: [0, 1]. - * A value less than 0 or greater than 1 evaluates to the default value **1**, - * provided that the value of **to** is greater than or equal to the value of **from**. + * The distance point info in range (0,1]. * * @type { ?number } * @default 1.0 @@ -3939,7 +3718,7 @@ declare interface MotionPathOptions { to?: number; /** - * Whether to rotate along the path. + * The rotate info. * * @type { ?boolean } * @default false @@ -3947,7 +3726,7 @@ declare interface MotionPathOptions { * @since 7 */ /** - * Whether to rotate along the path. + * The rotate info. * * @type { ?boolean } * @default false @@ -3956,7 +3735,7 @@ declare interface MotionPathOptions { * @since 10 */ /** - * Whether to rotate along the path. + * The rotate info. * * @type { ?boolean } * @default false @@ -4002,10 +3781,7 @@ declare interface sharedTransitionOptions { * @since 7 */ /** - * Animation duration. - *
Default value: **1000**. - *
Unit: ms. - *
Value range: [0, +∞). + * Animation duration, in ms. * * @type { ?number } * @default 1000 @@ -4014,10 +3790,7 @@ declare interface sharedTransitionOptions { * @since 10 */ /** - * Animation duration. - *
Default value: **1000**. - *
Unit: ms. - *
Value range: [0, +∞). + * Animation duration, in ms. * * @type { ?number } * @default 1000 @@ -4029,7 +3802,7 @@ declare interface sharedTransitionOptions { duration?: number; /** - * Animation curve.
You are advised to specify the curve using the Curve or ICurve type. + * Animation duration, in ms. * * @type { ?(Curve | string | ICurve) } * @default 1000 @@ -4037,11 +3810,7 @@ declare interface sharedTransitionOptions { * @since 7 */ /** - * Animation curve.
You are advised to specify the curve using the **Curve** or - * ** ICurve** type.
For the string type, this parameter indicates an animation - * interpolation curve. For available values, see the **curve** parameter in - * AnimateParam. - *
Default value: **Curve.Linear**. + * Animation curve. * * @type { ?(Curve | string | ICurve) } * @default 1000 @@ -4050,11 +3819,7 @@ declare interface sharedTransitionOptions { * @since 10 */ /** - * Animation curve.
You are advised to specify the curve using the **Curve** or - * ** ICurve** type.
For the string type, this parameter indicates an animation - * interpolation curve. For available values, see the **curve** parameter in - * AnimateParam. - *
Default value: **Curve.Linear**. + * Animation curve. * * @type { ?(Curve | string | ICurve) } * @default 1000 @@ -4216,7 +3981,7 @@ declare interface GeometryTransitionOptions { 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,14 +3991,14 @@ 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 */ - hierarchyStrategy?: TransitionHierarchyStrategy + hierarchyStrategy?: TransitionHierarchyStrategy; } /** @@ -4777,18 +4542,6 @@ declare interface SweepGradientOptions { * @since 18 */ colors: Array<[ResourceColor, number]>; - - /** - * Defines color description in ColorMetrics format for gradients. - * This parameter takes precedence over colors parameter. - * - * @type { ?Array<[ColorMetrics, number]> } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - metricsColors?: Array<[ColorMetrics, number]>; /** * repeating:repeating. The default value is false @@ -4847,6 +4600,18 @@ declare interface SweepGradientOptions { * @since 18 */ repeating?: boolean; + + /** + * Defines color description in ColorMetrics format for gradients. + * This parameter takes precedence over colors parameter. + * + * @type { ?Array<[ColorMetrics, number]> } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + metricsColors?: Array<[ColorMetrics, number]>; } /** @@ -5152,7 +4917,7 @@ declare enum TransitionHierarchyStrategy { * @systemapi * @since 13 */ - ADAPTIVE = 1, + ADAPTIVE = 1 } /** @@ -5191,18 +4956,14 @@ declare enum TransitionHierarchyStrategy { */ declare interface TranslateOptions { /** - * Translation distance along the x-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of Length string type. + * The param of x direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Translation distance along the x-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of Length string type. + * The param of x direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5210,9 +4971,7 @@ declare interface TranslateOptions { * @since 9 */ /** - * Translation distance along the x-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of Length string type. + * The param of x direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5221,9 +4980,7 @@ declare interface TranslateOptions { * @since 10 */ /** - * Translation distance along the x-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of length string type. + * The param of x direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5235,18 +4992,14 @@ declare interface TranslateOptions { x?: number | string; /** - * Translation distance along the y-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of length string type. + * The param of y direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Translation distance along the y-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of length string type. + * The param of y direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5254,9 +5007,7 @@ declare interface TranslateOptions { * @since 9 */ /** - * Translation distance along the y-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of length string type. + * The param of y direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5265,9 +5016,7 @@ declare interface TranslateOptions { * @since 10 */ /** - * Translation distance along the y-axis. - * For the number type, the unit is VP, and the value range is (-∞, +∞). - * For the string type, the value follows the format of length string type. + * The param of y direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5279,16 +5028,14 @@ declare interface TranslateOptions { y?: number | string; /** - * Distance to translate along the z-axis. The value is a floating - * point number, the default value is 0.0, and the unit is px. + * The param of z direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Distance to translate along the z-axis. The value is a floating - * point number, the default value is 0.0, and the unit is px. + * The param of z direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5296,8 +5043,7 @@ declare interface TranslateOptions { * @since 9 */ /** - * Distance to translate along the z-axis. The value is a floating - * point number, the default value is 0.0, and the unit is px. + * The param of z direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5306,8 +5052,7 @@ declare interface TranslateOptions { * @since 10 */ /** - * Distance to translate along the z-axis. The value is a floating - * point number, the default value is 0.0, and the unit is px. + * The param of z direction. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5355,20 +5100,14 @@ declare interface TranslateOptions { */ declare interface ScaleOptions { /** - * Scale ratio along the x-axis. - * x > 1: The component is scaled up along the x-axis. - * 0 < x < 1: The component is scaled down along the x-axis. - * x < 0: The component is scaled in the reverse direction of the x-axis. + * The param of x direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Scale ratio along the x-axis. - * x > 1: The component is scaled up along the x-axis. - * 0 < x < 1: The component is scaled down along the x-axis. - * x < 0: The component is scaled in the reverse direction of the x-axis. + * The param of x direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5376,10 +5115,7 @@ declare interface ScaleOptions { * @since 9 */ /** - * Scale ratio along the x-axis. - * x > 1: The component is scaled up along the x-axis. - * 0 < x < 1: The component is scaled down along the x-axis. - * x < 0: The component is scaled in the reverse direction of the x-axis. + * The param of x direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5388,10 +5124,7 @@ declare interface ScaleOptions { * @since 10 */ /** - * Scale ratio along the x-axis. - * x > 1: The component is scaled up along the x-axis. - * 0 < x < 1: The component is scaled down along the x-axis. - * x < 0: The component is scaled in the reverse direction of the x-axis. + * The param of x direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5403,20 +5136,14 @@ declare interface ScaleOptions { x?: number; /** - * Scale ratio along the y-axis. - * y > 1: The component is scaled up along the y-axis. - * 0 < y < 1: The component is scaled down along the y-axis. - * y < 0: The component is scaled in the reverse direction of the y-axis. + * The param of y direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Scale ratio along the y-axis. - * y > 1: The component is scaled up along the y-axis. - * 0 < y < 1: The component is scaled down along the y-axis. - * y < 0: The component is scaled in the reverse direction of the y-axis. + * The param of y direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5424,10 +5151,7 @@ declare interface ScaleOptions { * @since 9 */ /** - * Scale ratio along the y-axis. - * y > 1: The component is scaled up along the y-axis. - * 0 < y < 1: The component is scaled down along the y-axis. - * y < 0: The component is scaled in the reverse direction of the y-axis. + * The param of y direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5436,10 +5160,7 @@ declare interface ScaleOptions { * @since 10 */ /** - * Scale ratio along the y-axis. - * y > 1: The component is scaled up along the y-axis. - * 0 < y < 1: The component is scaled down along the y-axis. - * y < 0: The component is scaled in the reverse direction of the y-axis. + * The param of y direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5451,18 +5172,14 @@ declare interface ScaleOptions { y?: number; /** - * Scale ratio along the z-axis. z > 1: The component is scaled up along the z-axis. - *
0 < z < 1: The component is scaled down along the z-axis. - *
z < 0: The component is scaled in the reverse direction of the z-axis. + * The param of z direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Scale ratio along the z-axis. z > 1: The component is scaled up along the z-axis. - *
0 < z < 1: The component is scaled down along the z-axis. - *
z < 0: The component is scaled in the reverse direction of the z-axis. + * The param of z direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5470,9 +5187,7 @@ declare interface ScaleOptions { * @since 9 */ /** - * Scale ratio along the z-axis. z > 1: The component is scaled up along the z-axis. - *
0 < z < 1: The component is scaled down along the z-axis. - *
z < 0: The component is scaled in the reverse direction of the z-axis. + * The param of z direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5481,9 +5196,7 @@ declare interface ScaleOptions { * @since 10 */ /** - * Scale ratio along the z-axis. z > 1: The component is scaled up along the z-axis. - *
0 < z < 1: The component is scaled down along the z-axis. - *
z < 0: The component is scaled in the reverse direction of the z-axis. + * The param of z direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5495,14 +5208,14 @@ declare interface ScaleOptions { z?: number; /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5510,7 +5223,7 @@ declare interface ScaleOptions { * @since 9 */ /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5519,7 +5232,7 @@ declare interface ScaleOptions { * @since 10 */ /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5531,14 +5244,14 @@ declare interface ScaleOptions { centerX?: number | string; /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5546,7 +5259,7 @@ declare interface ScaleOptions { * @since 9 */ /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5555,7 +5268,7 @@ declare interface ScaleOptions { * @since 10 */ /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5566,7 +5279,6 @@ declare interface ScaleOptions { */ centerY?: number | string; } - /** * Defines the align rule options of relative container. * @@ -5613,9 +5325,7 @@ declare interface AlignRuleOption { * @since 10 */ /** - * 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 } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5644,9 +5354,7 @@ declare interface AlignRuleOption { * @since 10 */ /** - * Right alignment. - *
anchor: ID of the component that functions as the anchor point. - *
align: alignment mode relative to the anchor component. + * The param of right align. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5675,9 +5383,7 @@ declare interface AlignRuleOption { * @since 10 */ /** - * Horizontal center alignment. - *
anchor: ID of the component that functions as the anchor point. - *
align: alignment mode relative to the anchor component. + * The param of middle align. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5706,9 +5412,7 @@ declare interface AlignRuleOption { * @since 10 */ /** - * Top 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 } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5736,9 +5440,7 @@ declare interface AlignRuleOption { * @since 10 */ /** - * Bottom alignment. - *
anchor: ID of the component that functions as the anchor point. - *
align: alignment mode relative to the anchor component. + * The param of bottom align. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5766,9 +5468,7 @@ declare interface AlignRuleOption { * @since 10 */ /** - * Vertical center alignment. - *
anchor: ID of the component that functions as the anchor point. - *
align: alignment mode relative to the anchor component. + * The param of center align. * * @type { ?object } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5790,8 +5490,7 @@ declare interface AlignRuleOption { * @since 11 */ /** - * Offset of the component under the anchor constraints. - *
The value is the ratio of the distance to the left/upper anchor to the total distance between anchors. + * Defines the bias ratio in horizontal and vertical direction. * * @type { ?Bias } * @default {horizontal:0.5,vertical:0.5} @@ -5815,25 +5514,25 @@ declare interface AlignRuleOption { */ declare interface LocalizedHorizontalAlignParam { /** - * ID of the component that serves as the anchor. + * The anchor of localized align param. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 - */ + */ anchor: string; /** - * Horizontal alignment mode relative to the anchor component. + * The align of localized align param. * * @type { HorizontalAlign } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 - */ + */ align: HorizontalAlign; } @@ -5848,25 +5547,25 @@ declare interface LocalizedHorizontalAlignParam { */ declare interface LocalizedVerticalAlignParam { /** - * ID of the component that serves as the anchor. + * The anchor of localized align param. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 - */ + */ anchor: string; /** - * Vertical alignment mode relative to the anchor component. + * The align of localized align param. * * @type { VerticalAlign } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 - */ + */ align: VerticalAlign; } @@ -5881,7 +5580,7 @@ declare interface LocalizedVerticalAlignParam { */ declare interface LocalizedAlignRuleOptions { /** - * Left alignment with left-to-right scripts and right alignment with right-to-left scripts in the horizontal direction. + * The param of start align. * * @type { ?LocalizedHorizontalAlignParam } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5892,7 +5591,7 @@ declare interface LocalizedAlignRuleOptions { start?: LocalizedHorizontalAlignParam; /** - * Right alignment with left-to-right scripts and left alignment with right-to-left scripts in the horizontal direction. + * The param of end align. * * @type { ?LocalizedHorizontalAlignParam } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5903,7 +5602,7 @@ declare interface LocalizedAlignRuleOptions { end?: LocalizedHorizontalAlignParam; /** - * Center alignment in the horizontal direction. + * The param of middle align. * * @type { ?LocalizedHorizontalAlignParam } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5914,7 +5613,7 @@ declare interface LocalizedAlignRuleOptions { middle?: LocalizedHorizontalAlignParam; /** - * Top alignment in the vertical direction. + * The param of top align. * * @type { ?LocalizedVerticalAlignParam } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5925,7 +5624,7 @@ declare interface LocalizedAlignRuleOptions { top?: LocalizedVerticalAlignParam; /** - * Bottom alignment in the vertical direction. + * The param of bottom align. * * @type { ?LocalizedVerticalAlignParam } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5936,7 +5635,7 @@ declare interface LocalizedAlignRuleOptions { bottom?: LocalizedVerticalAlignParam; /** - * Center alignment in the vertical direction. + * The param of center align. * * @type { ?LocalizedVerticalAlignParam } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5947,8 +5646,7 @@ declare interface LocalizedAlignRuleOptions { center?: LocalizedVerticalAlignParam; /** - * Offset of the component under the anchor constraints. - *
The value is the ratio of the distance to the left/upper anchor to the total distance between anchors. + * Defines the bias ratio in horizontal and vertical direction. * * @type { ?Bias } * @default {horizontal:0.5,vertical:0.5} @@ -5961,7 +5659,7 @@ declare interface LocalizedAlignRuleOptions { } /** - * Enumerates the chain styles in relative container. + * Defines the style of the chain in relative container. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -5971,34 +5669,34 @@ declare interface LocalizedAlignRuleOptions { */ declare enum ChainStyle { /** - * Child components are evenly distributed among constraint anchors. + * Elements of the chain will be spread out. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ - SPREAD, + SPREAD = 0, /** - * All child components except the first and last ones are evenly distributed among constraint anchors. + * Elements except chain's head and tail will be spread out. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ - SPREAD_INSIDE, + SPREAD_INSIDE = 1, /** - * There is no gap between child components in the chain. + * Elements of the chain will be packed together. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ - PACKED, + PACKED = 2 } /** @@ -6037,14 +5735,14 @@ declare enum ChainStyle { */ declare interface RotateOptions { /** - * X coordinate of the rotation axis vector. + * The param of x direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * X coordinate of the rotation axis vector. + * The param of x direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6052,7 +5750,7 @@ declare interface RotateOptions { * @since 9 */ /** - * X coordinate of the rotation axis vector. + * The param of x direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6061,7 +5759,7 @@ declare interface RotateOptions { * @since 10 */ /** - * X coordinate of the rotation axis vector. + * The param of x direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6073,14 +5771,14 @@ declare interface RotateOptions { x?: number; /** - * Y coordinate of the rotation axis vector. + * The param of y direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Y coordinate of the rotation axis vector. + * The param of y direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6088,7 +5786,7 @@ declare interface RotateOptions { * @since 9 */ /** - * Y coordinate of the rotation axis vector. + * The param of y direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6097,7 +5795,7 @@ declare interface RotateOptions { * @since 10 */ /** - * Y coordinate of the rotation axis vector. + * The param of y direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6109,14 +5807,14 @@ declare interface RotateOptions { y?: number; /** - * Z coordinate of the rotation axis vector. + * The param of z direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Z coordinate of the rotation axis vector. + * The param of z direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6124,7 +5822,7 @@ declare interface RotateOptions { * @since 9 */ /** - * Z coordinate of the rotation axis vector. + * The param of z direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6133,7 +5831,7 @@ declare interface RotateOptions { * @since 10 */ /** - * Z coordinate of the rotation axis vector. + * The param of z direction. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6145,14 +5843,14 @@ declare interface RotateOptions { z?: number; /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6160,7 +5858,7 @@ declare interface RotateOptions { * @since 9 */ /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6169,7 +5867,7 @@ declare interface RotateOptions { * @since 10 */ /** - * X coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of x. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6181,21 +5879,21 @@ declare interface RotateOptions { centerX?: number | string; /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6204,7 +5902,7 @@ declare interface RotateOptions { * @since 10 */ /** - * Y coordinate of the transformation center point (anchor). Unit is vp. + * The param of center point of y. * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6216,7 +5914,7 @@ declare interface RotateOptions { centerY?: number | string; /** - * Z-axis anchor, that is, the z-component of the 3D rotation center point. + * The param of center point of z. * * @type { ?number } * @default 0 @@ -6226,7 +5924,7 @@ declare interface RotateOptions { * @since 10 */ /** - * Z-axis anchor, that is, the z-component of the 3D rotation center point. + * The param of center point of z. * * @type { ?number } * @default 0 @@ -6239,10 +5937,7 @@ declare interface RotateOptions { centerZ?: number; /** - * Distance from the user to the z=0 plane. - * The axis and center of rotation are set based on the coordinate system, - * which remains where it is when the component is moved. - * + * The param of camera distance, value range (-∞, ∞). * @type { ?number } * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6251,10 +5946,7 @@ declare interface RotateOptions { * @since 10 */ /** - * Distance from the user to the z=0 plane. - * The axis and center of rotation are set based on the coordinate system, - * which remains where it is when the component is moved. - * + * The param of camera distance, value range (-∞, ∞). * @type { ?number } * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6303,7 +5995,7 @@ declare interface RotateOptions { } /** - * The param of rotate about angle. + * The rotation parameters containing multi-axis angle information. * * @interface RotateAngleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6325,7 +6017,7 @@ declare interface RotateAngleOptions { * @since 20 */ angleX?: number | string; - + /** * the angle of the y-axis direction. * @@ -6338,7 +6030,7 @@ declare interface RotateAngleOptions { * @since 20 */ angleY?: number | string; - + /** * the angle of the z-axis direction. * @@ -6351,7 +6043,7 @@ declare interface RotateAngleOptions { * @since 20 */ angleZ?: number | string; - + /** * The param of center point of x. * @@ -6364,7 +6056,7 @@ declare interface RotateAngleOptions { * @since 20 */ centerX?: number | string; - + /** * The param of center point of y. * @@ -6377,7 +6069,7 @@ declare interface RotateAngleOptions { * @since 20 */ centerY?: number | string; - + /** * The param of center point of z. * @@ -6390,7 +6082,7 @@ declare interface RotateAngleOptions { * @since 20 */ centerZ?: number; - + /** * The param of camera distance, value range (-∞, ∞). * @type { ?number } @@ -6415,10 +6107,7 @@ declare interface RotateAngleOptions { */ declare interface TransitionOptions { /** - * Transition type.
- * Default value: **TransitionType.All**. - *
**NOTE**
If **type** is not specified, the default value **TransitionType.All** - * is used, which means that the transition effect works for both component addition and deletion. + * Defines the param of type. * * @type { ?TransitionType } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6427,11 +6116,7 @@ declare interface TransitionOptions { */ type?: TransitionType; /** - * Opacity of the component during transition, which is the value of the - * start point of insertion and the end point of deletion. - *
Value range: [0, 1]. - *
**NOTE**
If the value specified is less than 0, the value **0** is used. - * If the value specified is greater than 1, the value **1** is used. + * Defines the param of opacity. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6440,11 +6125,7 @@ declare interface TransitionOptions { */ opacity?: number; /** - * Translation of the component during transition, - * which is the value of the start point of insertion and the end point of deletion. - * **x**: distance to translate along the x-axis. - * **y**: distance to translate along the y-axis. - * **z**: distance to translate along the z-axis. + * Defines the param of translate. * * @type { ?TranslateOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6453,15 +6134,7 @@ declare interface TransitionOptions { */ translate?: TranslateOptions; /** - * Scaling of the component during transition, which is the value of the start point of insertion and the end point - * of deletion. **x**: scale factor along the x-axis. **y**: scale factor along the y-axis. **z**: scale factor along - * the z-axis (not effective for the current 2D graphics). **centerX** and **centerY**: scale center point. The - * default values are both **"50%"**, indicating the center point of the page. If the center point is (0, 0), it - * refers to the upper left corner of the component. - *

**NOTE**: - *
If **centerX** or **centerY** is set to an invalid string (for example, **"illegalString"**), - * the default value **"0"** is used. - *

+ * Defines the param of scale. * * @type { ?ScaleOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6470,11 +6143,7 @@ declare interface TransitionOptions { */ scale?: ScaleOptions; /** - * Rotation of the component during transition, which is the value of the start point of insertion and the end point - * of deletion. **x**: X-component of the rotation vector. **y**: Y-component of the rotation vector. **z**: - * Z-component of the rotation vector. **centerX** and **centerY**: rotation center point. The default values are - * both **"50%"**, indicating the center point of the page.If the center point is (0, 0), it refers to the upper left - * corner of the component. + * Defines the param of rotate. * * @type { ?RotateOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6521,10 +6190,10 @@ declare enum TransitionEdge { * @atomicservice * @since 11 */ - TOP, + TOP = 0, /** - * Bottom edge of the window. + * Bottom edge * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6532,7 +6201,7 @@ declare enum TransitionEdge { * @since 10 */ /** - * Bottom edge of the window. + * Bottom edge * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6540,11 +6209,10 @@ declare enum TransitionEdge { * @atomicservice * @since 11 */ - BOTTOM, + BOTTOM = 1, /** - * Start edge of the window, which is the left edge for left-to-right - * scripts and the right edge for right-to-left scripts. + * Start edge * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6552,8 +6220,7 @@ declare enum TransitionEdge { * @since 10 */ /** - * Start edge of the window, which is the left edge for left-to-right - * scripts and the right edge for right-to-left scripts. + * Start edge * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6561,11 +6228,10 @@ declare enum TransitionEdge { * @atomicservice * @since 11 */ - START, + START = 2, /** - * End edge of the window, which is the right edge for left-to-right scripts - * and the left edge for right-to-left scripts. + * End edge * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6573,8 +6239,7 @@ declare enum TransitionEdge { * @since 10 */ /** - * End edge of the window, which is the right edge for left-to-right scripts - * and the left edge for right-to-left scripts. + * End edge * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6582,7 +6247,7 @@ declare enum TransitionEdge { * @atomicservice * @since 11 */ - END + END = 3 } /** @@ -6620,8 +6285,7 @@ declare type TransitionEffects = { /** * 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 @@ -6640,7 +6304,7 @@ declare class DrawModifier { drawBehind?(drawContext: DrawContext): void; /** - * drawContent Method. Executed when associated Node is drawing, the default drawContent method will be replaced + * 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 +6314,7 @@ declare class DrawModifier { * @since 12 */ drawContent?(drawContext: DrawContext): void; - + /** * drawFront Method. Executed after drawing associated Node. * @@ -6671,10 +6335,9 @@ declare class DrawModifier { * @since 20 */ drawForeground?(drawContext: DrawContext): void; - + /** * Invalidate the component, which will cause a re-render of the component. - * No overloading is allowed or needed. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6731,8 +6394,7 @@ declare class TransitionEffect< static readonly IDENTITY: TransitionEffect<"identity">; /** - * Applies a transition effect with the opacity changing from 0 to 1 when the component appears - * And from 1 to 0 when the component disappears. This is equivalent to **TransitionEffect.opacity(0)** + * Specifies a transition effect with transparency of 0, which is equivalent to TransitionEffect.opacity(0). * * @type { TransitionEffect<"opacity"> } * @readonly @@ -6743,8 +6405,7 @@ declare class TransitionEffect< * @since 10 */ /** - * Applies a transition effect with the opacity changing from 0 to 1 when the component appears - * And from 1 to 0 when the component disappears. This is equivalent to **TransitionEffect.opacity(0)** + * Specifies a transition effect with transparency of 0, which is equivalent to TransitionEffect.opacity(0). * * @type { TransitionEffect<"opacity"> } * @readonly @@ -6758,13 +6419,7 @@ declare class TransitionEffect< static readonly OPACITY: TransitionEffect<"opacity">; /** - * Applies a transition effect of sliding in from the start edge when the component - * appears and sliding out from the end edge when the component disappears. - * This means sliding in from the left edge and sliding out from the right edge for - * left-to-right scripts, and sliding in from the right edge and sliding out from - * the left edge for right-to-left scripts. This is equivalent to - * TransitionEffect.asymmetric(TransitionEffect.move(TransitionEdge.START), - * TransitionEffect.move(TransitionEdge.END)). + * Defines a slide transition effect * * @type { TransitionEffect< * "asymmetric", @@ -6779,13 +6434,7 @@ declare class TransitionEffect< * @since 10 */ /** - * Applies a transition effect of sliding in from the start edge when the component - * appears and sliding out from the end edge when the component disappears. - * This means sliding in from the left edge and sliding out from the right edge for - * left-to-right scripts, and sliding in from the right edge and sliding out from - * the left edge for right-to-left scripts. This is equivalent to - * TransitionEffect.asymmetric(TransitionEffect.move(TransitionEdge.START), - * TransitionEffect.move(TransitionEdge.END)). + * Defines a slide transition effect * * @type { TransitionEffect< * "asymmetric", @@ -6809,13 +6458,11 @@ declare class TransitionEffect< >; /** - * Applies a transition effect of sliding in from the right with first scaling down and then scaling up - * when the component appears and sliding out from the right - * with first scaling down and then scaling up when the component disappears. - * 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. - * + * 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<"slideSwitch"> } * @readonly * @static @@ -6825,13 +6472,11 @@ declare class TransitionEffect< * @since 10 */ /** - * Applies a transition effect of sliding in from the right with first scaling down and then scaling up - * when the component appears and sliding out from the right - * with first scaling down and then scaling up when the component disappears. - * 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. - * + * 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<"slideSwitch"> } * @readonly * @static @@ -6844,13 +6489,9 @@ declare class TransitionEffect< static readonly SLIDE_SWITCH: TransitionEffect<"slideSwitch">; /** - * Translation of the component during transition, which is the value of the start point - * of insertion and the end point of deletion. + * Creates a translate transition effect * - * @param { TranslateOptions } options - translate options. - *
-**x**: distance to translate along the x-axis. Unit is vp. - *
-**y**: distance to translate along the y-axis. Unit is vp. - *
-**z**: distance to translate along the z-axis. Unit is vp. + * @param { TranslateOptions } options - translate options * @returns { TransitionEffect<"translate"> } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6858,13 +6499,9 @@ declare class TransitionEffect< * @since 10 */ /** - * Translation of the component during transition, which is the value of the start point - * of insertion and the end point of deletion. + * Creates a translate transition effect * - * @param { TranslateOptions } options - translate options. - *
-**x**: distance to translate along the x-axis. Unit is vp. - *
-**y**: distance to translate along the y-axis. Unit is vp. - *
-**z**: distance to translate along the z-axis. Unit is vp. + * @param { TranslateOptions } options - translate options * @returns { TransitionEffect<"translate"> } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6875,20 +6512,19 @@ declare class TransitionEffect< static translate(options: TranslateOptions): TransitionEffect<"translate">; /** - * Rotation of the component during transition, which is the value of the start - * point of insertion and the end point of deletion. - *
- **x**: X-component of the rotation vector. - *
- **y**: Y-component of the rotation vector. - *
- **z**: Z-component of the rotation vector. - *
- **centerX** and **centerY**: rotation center point. The default values - * are both **"50%"**, indicating the center point of the page. - *
- If the center point is (0, 0), it refers to the upper left corner of the component. - *
- **centerZ**: z-axis anchor point, that is, the z-component of the 3D rotation - * center point. The default value is **0**. - *
- **perspective**: viewing distance. It is not supported for use in transition animations. - *
**Widget capability**: This API can be used in ArkTS widgets since API version 10. - * - * @param { RotateOptions } options - Rotate options. + * 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<"rotate"> } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6896,20 +6532,19 @@ declare class TransitionEffect< * @since 10 */ /** - * Rotation of the component during transition, which is the value of the start - * point of insertion and the end point of deletion. - *
- **x**: X-component of the rotation vector. - *
- **y**: Y-component of the rotation vector. - *
- **z**: Z-component of the rotation vector. - *
- **centerX** and **centerY**: rotation center point. The default values - * are both **"50%"**, indicating the center point of the page. - *
- If the center point is (0, 0), it refers to the upper left corner of the component. - *
- **centerZ**: z-axis anchor point, that is, the z-component of the 3D rotation - * center point. The default value is **0**. - *
- **perspective**: viewing distance. It is not supported for use in transition animations. - *
**Widget capability**: This API can be used in ArkTS widgets since API version 10. + * Creates a rotation transition effect * - * @param { RotateOptions } options - Rotate options. + * @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<"rotate"> } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6920,8 +6555,7 @@ declare class TransitionEffect< static rotate(options: RotateOptions): TransitionEffect<"rotate">; /** - * Scaling of the component during transition, which is the value of the start point of insertion and - * the end point of deletion. + * Creates a scale transition effect * * @param { ScaleOptions } options - scale options * @returns { TransitionEffect<"scale"> } @@ -6931,8 +6565,7 @@ declare class TransitionEffect< * @since 10 */ /** - * Scaling of the component during transition, which is the value of the start point of insertion and - * the end point of deletion. + * Creates a scale transition effect * * @param { ScaleOptions } options - scale options * @returns { TransitionEffect<"scale"> } @@ -6980,9 +6613,7 @@ declare class TransitionEffect< static opacity(alpha: number): TransitionEffect<"opacity">; /** - * Slide-in and slide-out of the component from the screen edge during transition. - * It is essentially a translation effect, which is the value of the start point of insertion - * and the end point of deletion. + * Creates a move transition effect * * @param { TransitionEdge } edge - the edge that component will move to * @returns { TransitionEffect<"move"> } @@ -6992,9 +6623,7 @@ declare class TransitionEffect< * @since 10 */ /** - * Slide-in and slide-out of the component from the screen edge during transition. - * It is essentially a translation effect, which is the value of the start point of insertion - * and the end point of deletion. + * Creates a move transition effect * * @param { TransitionEdge } edge - the edge that component will move to * @returns { TransitionEffect<"move"> } @@ -7081,7 +6710,7 @@ declare class TransitionEffect< animation(value: AnimateParam): TransitionEffect; /** - * Combination of transition effects. + * Combines another transition effect * * @param { TransitionEffect } transitionEffect - transition effect which is be combined * @returns { TransitionEffect } combined transition effect @@ -7091,7 +6720,7 @@ declare class TransitionEffect< * @since 10 */ /** - * Combination of transition effects. + * Combines another transition effect * * @param { TransitionEffect } transitionEffect - transition effect which is be combined * @returns { TransitionEffect } combined transition effect @@ -7401,7 +7030,7 @@ declare enum EffectType { * @atomicservice * @since 14 */ - WINDOW_EFFECT = 1, + WINDOW_EFFECT = 1 } /** @@ -7483,7 +7112,7 @@ declare enum PreDragStatus { * @atomicservice * @since 18 */ - PREPARING_FOR_DRAG_DETECTION = 7, + PREPARING_FOR_DRAG_DETECTION = 7 } /** @@ -7633,9 +7262,7 @@ declare interface DragItemInfo { declare function animateTo(value: AnimateParam, event: () => void): void; /** - * Implements immediate delivery of an explicit animation through a **UIContext** object. - * When multiple property animations are loaded at once, you can call this API to immediately - * execute the transition animation for state changes caused by the specified closure function. + * Define animation functions for immediate distribution. * * @param { AnimateParam } value - Set animation effect parameters. * @param { function } event - Specify the closure function that displays dynamic effects, @@ -7648,38 +7275,26 @@ declare function animateToImmediately(value: AnimateParam, event: () => void): v /** * Converts a value in vp units to a value in px. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Converts a value in vp units to a value in px. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Converts a value in vp units to a value in px. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7687,13 +7302,9 @@ declare function animateToImmediately(value: AnimateParam, event: () => void): v */ /** * Converts a value in vp units to a value in px. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7706,38 +7317,26 @@ declare function vp2px(value: number): number; /** * Converts a number in units of px to a number in units of vp. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * Converts a number in units of px to a number in units of vp. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** * Converts a number in units of px to a number in units of vp. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7745,13 +7344,9 @@ declare function vp2px(value: number): number; */ /** * Converts a number in units of px to a number in units of vp. - * By default, the virtual pixel ratio of the screen where the current UI instance is located is used for conversion. - * If no UI instance is available, the virtual pixel ratio of the default screen is used instead. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7766,9 +7361,7 @@ declare function px2vp(value: number): number; * Converts a number in fp units to a number in px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ @@ -7776,9 +7369,7 @@ declare function px2vp(value: number): number; * Converts a number in fp units to a number in px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 @@ -7787,9 +7378,7 @@ declare function px2vp(value: number): number; * Converts a number in fp units to a number in px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7799,9 +7388,7 @@ declare function px2vp(value: number): number; * Converts a number in fp units to a number in px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7816,9 +7403,7 @@ declare function fp2px(value: number): number; * Converts a number in units of px to a number in units of fp. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ @@ -7826,9 +7411,7 @@ declare function fp2px(value: number): number; * Converts a number in units of px to a number in units of fp. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 @@ -7837,9 +7420,7 @@ declare function fp2px(value: number): number; * Converts a number in units of px to a number in units of fp. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7849,9 +7430,7 @@ declare function fp2px(value: number): number; * Converts a number in units of px to a number in units of fp. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7866,9 +7445,7 @@ declare function px2fp(value: number): number; * Converts a number in units of lpx to a number in units of px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ @@ -7876,9 +7453,7 @@ declare function px2fp(value: number): number; * Converts a number in units of lpx to a number in units of px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 @@ -7887,9 +7462,7 @@ declare function px2fp(value: number): number; * Converts a number in units of lpx to a number in units of px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7899,9 +7472,7 @@ declare function px2fp(value: number): number; * Converts a number in units of lpx to a number in units of px. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7916,9 +7487,7 @@ declare function lpx2px(value: number): number; * Converts a number in units of px to a number in units of lpx. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ @@ -7926,9 +7495,7 @@ declare function lpx2px(value: number): number; * Converts a number in units of px to a number in units of lpx. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 @@ -7937,9 +7504,7 @@ declare function lpx2px(value: number): number; * Converts a number in units of px to a number in units of lpx. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -7949,9 +7514,7 @@ declare function lpx2px(value: number): number; * Converts a number in units of px to a number in units of lpx. * * @param { number } value - * Value range of value: (-∞, +∞). * @returns { number } - * Value range of the return value: (-∞, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -8057,7 +7620,7 @@ declare namespace cursorControl { /** * Change the mouse cursor style by param: 'PointerStyle'. * - * @param { PointerStyle } value - Cursor style. + * @param { PointerStyle } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -8143,7 +7706,7 @@ declare interface EventTarget { * @since 10 */ /** - * Area information of the target element. + * Area of current target. * * @type { Area } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -8364,7 +7927,7 @@ declare enum SourceTool { * @atomicservice * @since 12 */ - MOUSE, + MOUSE = 3, /** * The touchpad type. @@ -8374,7 +7937,7 @@ declare enum SourceTool { * @atomicservice * @since 12 */ - TOUCHPAD, + TOUCHPAD = 4, /** * The joystick type. @@ -8384,7 +7947,7 @@ declare enum SourceTool { * @atomicservice * @since 12 */ - JOYSTICK, + JOYSTICK = 5 } /** @@ -8483,7 +8046,7 @@ declare enum RepeatMode { * @since 10 */ /** - * The source image's slices are tiled to fill the border box. Tiles may be compressed when needed. + * Round mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8508,7 +8071,7 @@ declare enum RepeatMode { * @form * @since 10 */ - /** + /** * The source image's slices are tiled to fill the border box. Extra space will be distributed in between tiles. * * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -8627,14 +8190,14 @@ declare enum BlurStyle { Thick, /** - * Material that creates the minimum depth of field effect. + * Defines the thin background material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Material that creates the minimum depth of field effect. + * Defines the thin background material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8642,17 +8205,17 @@ declare enum BlurStyle { * @atomicservice * @since 11 */ - BACKGROUND_THIN, + BACKGROUND_THIN = 3, /** - * Material that creates a medium shallow depth of field effect. + * Defines the thin regular material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Material that creates a medium shallow depth of field effect. + * Defines the thin regular material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8660,17 +8223,17 @@ declare enum BlurStyle { * @atomicservice * @since 11 */ - BACKGROUND_REGULAR, + BACKGROUND_REGULAR = 4, /** - * Material that creates a high shallow depth of field effect. + * Defines the thin thick material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Material that creates a high shallow depth of field effect. + * Defines the thin thick material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8678,17 +8241,17 @@ declare enum BlurStyle { * @atomicservice * @since 11 */ - BACKGROUND_THICK, + BACKGROUND_THICK = 5, /** - * Material that creates the maximum depth of field effect. + * Defines the thin ultra thick material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Material that creates the maximum depth of field effect. + * Defines the thin ultra thick material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8696,10 +8259,10 @@ declare enum BlurStyle { * @atomicservice * @since 11 */ - BACKGROUND_ULTRA_THICK, + BACKGROUND_ULTRA_THICK = 6, /** - * No blur. + * Defines none material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8707,18 +8270,18 @@ declare enum BlurStyle { * @since 10 */ /** - * No blur. + * Defines none material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 - */ - NONE, + */ + NONE = 7, /** - * Component ultra-thin material. + * Defines the ultra thin component material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8726,7 +8289,7 @@ declare enum BlurStyle { * @since 11 */ /** - * Component ultra-thin material. + * Defines the ultra thin component material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8745,7 +8308,7 @@ declare enum BlurStyle { * @since 11 */ /** - * Component thin material. + * Defines the thin component material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8764,7 +8327,7 @@ declare enum BlurStyle { * @since 11 */ /** - * Component regular material. + * Defines the regular component material. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8810,7 +8373,7 @@ declare enum BlurStyle { * @atomicservice * @since 12 */ - COMPONENT_ULTRA_THICK = 12, + COMPONENT_ULTRA_THICK = 12 } /** @@ -8851,7 +8414,7 @@ declare enum BlurStyleActivePolicy { * @atomicservice * @since 14 */ - ALWAYS_INACTIVE = 2, + ALWAYS_INACTIVE = 2 } /** @@ -8887,7 +8450,7 @@ declare enum ThemeColorMode { * @atomicservice * @since 11 */ - SYSTEM, + SYSTEM = 0, /** * Defines the light mode. @@ -8904,7 +8467,7 @@ declare enum ThemeColorMode { * @atomicservice * @since 11 */ - LIGHT, + LIGHT = 1, /** * Defines the dark mode. @@ -8921,7 +8484,7 @@ declare enum ThemeColorMode { * @atomicservice * @since 11 */ - DARK, + DARK = 2 } /** @@ -8943,40 +8506,38 @@ declare enum ThemeColorMode { */ declare enum AdaptiveColor { /** - * Adaptive color mode is not used. - * The default color is used as the mask color. Using a mode other than **DEFAULT** can be more time-consuming. + * Defines the fixed value color adaptive mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Adaptive color mode is not used. - * The default color is used as the mask color. Using a mode other than **DEFAULT** can be more time-consuming. + * Defines the fixed value color adaptive mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - DEFAULT, + DEFAULT = 0, /** - * Adaptive color mode is used. The average color value of the color picking area is used as the mask color. + * Defines the background average color adaptive mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Adaptive color mode is used. The average color value of the color picking area is used as the mask color. + * Defines the background average color adaptive mode. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - AVERAGE, + AVERAGE = 1 } /** @@ -8998,55 +8559,55 @@ declare enum AdaptiveColor { */ declare enum ModalTransition { /** - * Slide-up and slide-down animation for the modal. + * Use default animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Slide-up and slide-down animation for the modal. + * Use default animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - DEFAULT, + DEFAULT = 0, /** - * No transition animation for the modal. + * Use none animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * No transition animation for the modal. + * Use none animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - NONE, + NONE = 1, /** - * Opacity gradient animation for the modal. + * Use alpha animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Opacity gradient animation for the modal. + * Use alpha animation. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - ALPHA, + ALPHA = 2 } /** @@ -9195,8 +8756,7 @@ declare interface SystemAdaptiveOptions { */ declare interface BlurStyleOptions { /** - * Color mode used for the foreground blur. - *
Default value: **ThemeColorMode.SYSTEM**. + * color mode * * @type { ?ThemeColorMode } * @default ThemeColorMode.SYSTEM @@ -9204,8 +8764,7 @@ declare interface BlurStyleOptions { * @since 10 */ /** - * Color mode used for the foreground blur. - *
Default value: **ThemeColorMode.SYSTEM**. + * color mode * * @type { ?ThemeColorMode } * @default ThemeColorMode.SYSTEM @@ -9217,8 +8776,7 @@ declare interface BlurStyleOptions { colorMode?: ThemeColorMode; /** - * Adaptive color mode. - *
Default value: **AdaptiveColor.DEFAULT**. + * adaptive color * * @type { ?AdaptiveColor } * @default AdaptiveColor.DEFAULT @@ -9226,8 +8784,7 @@ declare interface BlurStyleOptions { * @since 10 */ /** - * Adaptive color mode. - *
Default value: **AdaptiveColor.DEFAULT**. + * adaptive color * * @type { ?AdaptiveColor } * @default AdaptiveColor.DEFAULT @@ -9239,9 +8796,9 @@ declare interface BlurStyleOptions { adaptiveColor?: AdaptiveColor; /** - * Foreground blur scale. - *
Default value: **1.0**. - *
Value range: [0.0, 1.0]. + * Define the scale of blur effect. + * The range of value is [0, 1]. The larger the value, the more obvious the blurring effect. + * A value of 0 indicates no blur effect and a value of 1 indicates a complete blur effect. * * @type { ?number } * @default 1.0 @@ -9293,9 +8850,7 @@ declare interface BlurStyleOptions { declare interface BackgroundEffectOptions { /** - * Blur radius. - * Value range: [0, +∞). - * Default value: **0**. + * Define the radius size of BackgroundEffect.The range of this value is [0, ∞) * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9303,9 +8858,7 @@ declare interface BackgroundEffectOptions { * @since 11 */ /** - * Blur radius. - * Value range: [0, +∞). - * Default value: **0**. + * Define the radius size of BackgroundEffect.The range of this value is [0, ∞) * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9316,9 +8869,7 @@ declare interface BackgroundEffectOptions { radius: number; /** - * Saturation. - * Value range: [0, +∞). - * Recommended value range: [0, 50]. + * Define the saturation of BackgroundEffect. Value range [0, ∞) * * @type { ?number } * @default 1 @@ -9327,9 +8878,7 @@ declare interface BackgroundEffectOptions { * @since 11 */ /** - * Saturation. - * Value range: [0, +∞). - * Recommended value range: [0, 50]. + * Define the saturation of BackgroundEffect. Value range [0, ∞) * * @type { ?number } * @default 1 @@ -9341,10 +8890,8 @@ declare interface BackgroundEffectOptions { saturation?: number; /** - * Brightness. - *
Value range: [0, +∞). - *
Default value: **1** Recommended value range: [0, 2]. - * + * Define the brightness of BackgroundEffect. Value range [0, ∞) + * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. * @type { ?number } * @default 1 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9352,10 +8899,8 @@ declare interface BackgroundEffectOptions { * @since 11 */ /** - * Brightness. - *
Value range: [0, +∞). - *
Default value: **1** Recommended value range: [0, 2]. - * + * Define the brightness of BackgroundEffect. Value range [0, ∞) + * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. * @type { ?number } * @default 1 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9366,7 +8911,7 @@ declare interface BackgroundEffectOptions { brightness?: number; /** - * Color. + * color the brightness of BackgroundEffect. * * @type { ?ResourceColor } * @default Color.Transparent @@ -9375,7 +8920,7 @@ declare interface BackgroundEffectOptions { * @since 11 */ /** - * Color. + * color the brightness of BackgroundEffect. * * @type { ?ResourceColor } * @default Color.Transparent @@ -9416,7 +8961,7 @@ declare interface BackgroundEffectOptions { * @crossplatform * @since 11 */ - /** + /** * Define the blurOptions of BackgroundEffect. * * @type { ?BlurOptions } @@ -9463,7 +9008,7 @@ declare interface BackgroundEffectOptions { * @since 12 */ declare interface ForegroundEffectOptions { - + /** * Define the radius size of ForegroundEffect.The range of this value is [0, ∞) * @@ -9473,7 +9018,7 @@ declare interface ForegroundEffectOptions { * @atomicservice * @since 12 */ - radius: number; + radius: number; } /** @@ -9503,7 +9048,7 @@ declare interface PickerTextStyle { * @since 10 */ /** - * Font color. + * Define the text color of picker. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9523,7 +9068,8 @@ declare interface PickerTextStyle { * @since 10 */ /** - * Text style. + * Define the text font of picker. + * Only support size and weight. * * @type { ?Font } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9699,24 +9245,24 @@ declare enum ShadowType { * @atomicservice * @since 11 */ - COLOR, + COLOR = 0, /** - * Blur. + * Define a blur type of shadow * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Blur. + * Define a blur type of shadow * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - BLUR, + BLUR = 1 } /** @@ -9755,14 +9301,14 @@ declare enum ShadowType { */ declare interface ShadowOptions { /** - * Blur radius of the shadow. + * Define the radius size of shadow * * @type { number | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Blur radius of the shadow. + * Define the radius size of shadow * * @type { number | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9770,7 +9316,7 @@ declare interface ShadowOptions { * @since 9 */ /** - * Blur radius of the shadow. + * Define the radius size of shadow * * @type { number | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9779,7 +9325,7 @@ declare interface ShadowOptions { * @since 10 */ /** - * Blur radius of the shadow. + * Define the radius size of shadow * * @type { number | Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9791,8 +9337,7 @@ declare interface ShadowOptions { radius: number | Resource; /** - * Shadow type. - *
Default value: **COLOR**. + * Define the type of shadow * * @type { ?ShadowType } * @default ShadowType.COLOR @@ -9801,8 +9346,7 @@ declare interface ShadowOptions { * @since 10 */ /** - * Shadow type. - *
Default value: **COLOR**. + * Define the type of shadow * * @type { ?ShadowType } * @default ShadowType.COLOR @@ -9814,14 +9358,14 @@ declare interface ShadowOptions { type?: ShadowType; /** - * Color of the shadow. Default value: **Black** + * Define the color of shadow * * @type { ?(Color | string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Color of the shadow. Default value: **Black** + * Define the color of shadow * * @type { ?(Color | string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9829,7 +9373,7 @@ declare interface ShadowOptions { * @since 9 */ /** - * Color of the shadow. Default value: **Black** + * Define the color of shadow * * @type { ?(Color | string | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9838,7 +9382,7 @@ declare interface ShadowOptions { * @since 10 */ /** - * Color of the shadow. Default value: **Black** + * Define the color or the color strategy of shadow * * @type { ?(Color | string | Resource| ColoringStrategy) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9850,14 +9394,14 @@ declare interface ShadowOptions { color?: Color | string | Resource | ColoringStrategy; /** - * Offset of the shadow along the x-axis. Unit is px. Default value is 0. + * Define the horizontal offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Offset of the shadow along the x-axis. Unit is px. Default value is 0. + * Define the horizontal offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9865,7 +9409,7 @@ declare interface ShadowOptions { * @since 9 */ /** - * Offset of the shadow along the x-axis. Unit is px. Default value is 0. + * Define the horizontal offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9874,7 +9418,7 @@ declare interface ShadowOptions { * @since 10 */ /** - * Offset of the shadow along the x-axis. Unit is px. Default value is 0. + * Define the horizontal offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9886,14 +9430,14 @@ declare interface ShadowOptions { offsetX?: number | Resource; /** - * Offset of the shadow along the y-axis. Unit is px. Default value is 0. + * Define the vertical offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Offset of the shadow along the y-axis. Unit is px. Default value is 0. + * Define the vertical offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9901,7 +9445,7 @@ declare interface ShadowOptions { * @since 9 */ /** - * Offset of the shadow along the y-axis. Unit is px. Default value is 0. + * Define the vertical offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9910,7 +9454,7 @@ declare interface ShadowOptions { * @since 10 */ /** - * Offset of the shadow along the y-axis. Unit is px. Default value is 0. + * Define the vertical offset size of shadow * * @type { ?(number | Resource) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9922,11 +9466,7 @@ declare interface ShadowOptions { offsetY?: number | Resource; /** - * Whether to fill the inside of the component with shadow. **true**: Fill - * the inside of the component with shadow. - *
**false**: Do not fill the inside of the component with shadow. - *
The default value is **false**. - *
**NOTE**
This attribute does not take effect in textShadow. + * Define whether the shadow should fill the area * * @type { ?boolean } * @default false @@ -9935,11 +9475,7 @@ declare interface ShadowOptions { * @since 11 */ /** - * Whether to fill the inside of the component with shadow. **true**: Fill - * the inside of the component with shadow. - *
**false**: Do not fill the inside of the component with shadow. - *
The default value is **false**. - *
**NOTE**
This attribute does not take effect in textShadow. + * Define whether the shadow should fill the area * * @type { ?boolean } * @default false @@ -9984,7 +9520,7 @@ declare enum ShadowStyle { * @atomicservice * @since 11 */ - OUTER_DEFAULT_XS, + OUTER_DEFAULT_XS = 0, /** * Defines the small default shadow style. @@ -10001,58 +9537,58 @@ declare enum ShadowStyle { * @atomicservice * @since 11 */ - OUTER_DEFAULT_SM, + OUTER_DEFAULT_SM = 1, /** - * Medium shadow. + * Defines the medium default shadow style. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Medium shadow. + * Defines the medium default shadow style. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - OUTER_DEFAULT_MD, + OUTER_DEFAULT_MD = 2, /** - * Large shadow. + * Defines the large default shadow style. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Large shadow. + * Defines the large default shadow style. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - OUTER_DEFAULT_LG, + OUTER_DEFAULT_LG = 3, /** - * Floating medium shadow. + * Defines the small floating shadow style. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Floating medium shadow. + * Defines the small floating shadow style. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - OUTER_FLOATING_SM, + OUTER_FLOATING_SM = 4, /** * Defines the medium floating shadow style. @@ -10062,14 +9598,14 @@ declare enum ShadowStyle { * @since 10 */ /** - * Floating medium shadow. + * Defines the medium floating shadow style. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - OUTER_FLOATING_MD, + OUTER_FLOATING_MD = 5 } /** @@ -10091,12 +9627,8 @@ declare enum ShadowStyle { */ declare interface MultiShadowOptions { /** - * Shadow blur radius. - * Unit: vp. - *

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

- * + * Current shadow radius. + * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10104,12 +9636,8 @@ declare interface MultiShadowOptions { * @since 10 */ /** - * Shadow blur radius. - * Unit: vp. - *

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

- * + * Current shadow radius. + * * @type { ?(number | Resource) } * @default 20 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10120,9 +9648,8 @@ declare interface MultiShadowOptions { radius?: number | Resource; /** - * Offset on the x-axis. - * Unit: vp. - * + * Current shadow offsetX. + * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10130,9 +9657,8 @@ declare interface MultiShadowOptions { * @since 10 */ /** - * Offset on the x-axis. - * Unit: vp. - * + * Current shadow offsetX. + * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10143,9 +9669,8 @@ declare interface MultiShadowOptions { offsetX?: number | Resource; /** - * Offset on the y-axis. - * Unit: vp. - * + * Current shadow offsetY + * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10153,9 +9678,8 @@ declare interface MultiShadowOptions { * @since 10 */ /** - * Offset on the y-axis. - * Unit: vp. - * + * Current shadow offsetY + * * @type { ?(number | Resource) } * @default 5 * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10174,7 +9698,7 @@ declare interface MultiShadowOptions { * @since 10 */ /** - * The types of expanded safe areas. + * Enumerates the safe area types. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10190,14 +9714,14 @@ declare enum SafeAreaType { * @since 10 */ /** - * Default non-safe area of the system, including the status bar and navigation bar. + * Default area of the system, including the status bar and navigation bar. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - SYSTEM, + SYSTEM = 0, /** * Notch or punch hole. @@ -10206,14 +9730,14 @@ declare enum SafeAreaType { * @since 10 */ /** - * Non-safe area of the device like Notch or punch hole. + * Notch or punch hole. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - CUTOUT, + CUTOUT = 1, /** * Soft keyboard area. @@ -10229,7 +9753,7 @@ declare enum SafeAreaType { * @atomicservice * @since 11 */ - KEYBOARD + KEYBOARD = 2 } /** @@ -10256,14 +9780,14 @@ declare enum SafeAreaEdge { * @since 10 */ /** - * Top edge. + * Top edge of the safe area. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - TOP, + TOP = 0, /** * Bottom edge of the safe area. @@ -10272,14 +9796,14 @@ declare enum SafeAreaEdge { * @since 10 */ /** - * Bottom edge. + * Bottom edge of the safe area. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - BOTTOM, + BOTTOM = 1, /** * Start edge of the safe area. @@ -10288,14 +9812,14 @@ declare enum SafeAreaEdge { * @since 10 */ /** - * Start edge. + * Start edge of the safe area. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - START, + START = 2, /** * End edge of the safe area. @@ -10304,18 +9828,18 @@ declare enum SafeAreaEdge { * @since 10 */ /** - * End edge. + * End edge of the safe area. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - END + END = 3 } /** - * Describe the types for expanding the safe area in layout. + * Enumerates the safe area types can be ignored. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10325,7 +9849,7 @@ declare enum SafeAreaEdge { */ declare enum LayoutSafeAreaType { /** - * Default non-safe area of the system, including the status bar and navigation bar. + * Default area of the system, including the status bar and navigation bar. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -10336,7 +9860,7 @@ declare enum LayoutSafeAreaType { } /** - * Define the edges for expanding the safe area in layout. + * Enumerates the safe area edges can be ignored. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10346,7 +9870,7 @@ declare enum LayoutSafeAreaType { */ declare enum LayoutSafeAreaEdge { /** - * Top edge. + * Top edge of the safe area. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -10356,7 +9880,7 @@ declare enum LayoutSafeAreaEdge { TOP = 0, /** - * Bottom edge. + * Bottom edge of the safe area. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -10435,55 +9959,55 @@ declare enum LayoutSafeAreaEdge { */ declare enum SheetSize { /** - * The sheet height is half of the screen height. + * Defines the sheet size medium height type. The height is half the screen height * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * The sheet height is half of the screen height. + * Defines the sheet size medium height type. The height is half the screen height * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - MEDIUM, + MEDIUM = 0, /** - * The sheet height is almost the screen height. + * Defines the sheet size large height type. The height is almost screen height. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * The sheet height is almost the screen height. + * Defines the sheet size large height type. The height is almost screen height. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - LARGE, + LARGE = 1, /** - * The sheet height automatically adapts to the content. + * Defines the sheet size fit content height type. The height fit content. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * The sheet height automatically adapts to the content. + * Defines the sheet size fit content height type. The height fit content. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ - FIT_CONTENT = 2, + FIT_CONTENT = 2 } /** @@ -10546,7 +10070,7 @@ declare interface BaseEvent { * @since 10 */ /** - * Display area of the element that triggers the gesture event. + * Defines the current target which fires this event. * * @type { EventTarget } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10582,7 +10106,7 @@ declare interface BaseEvent { * @since 10 */ /** - * Timestamp of the event. + * Event timestamp. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10618,7 +10142,7 @@ declare interface BaseEvent { * @since 10 */ /** - * Event input device. + * the event source info. * * @type { SourceType } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10639,7 +10163,7 @@ declare interface BaseEvent { * @atomicservice * @since 12 */ - axisHorizontal?: number; + axisHorizontal ?: number; /** * the Vertical axis coordinate. @@ -10651,7 +10175,7 @@ declare interface BaseEvent { * @atomicservice * @since 12 */ - axisVertical?: number; + axisVertical ?: number; /** * Touch pressure. @@ -10671,7 +10195,7 @@ declare interface BaseEvent { * @since 10 */ /** - * Press pressure. + * Touch pressure. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10700,7 +10224,7 @@ declare interface BaseEvent { * @since 10 */ /** - * Angle between the projection of the stylus on the device plane and the x-axis. + * The angle between pencil projection on plane-X-Y and axis-Z. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10729,7 +10253,7 @@ declare interface BaseEvent { * @since 10 */ /** - * Angle between the projection of the stylus on the device plane and the y-axis. + * The angle between pencil projection on plane-Y-Z and axis-Z. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10770,7 +10294,7 @@ declare interface BaseEvent { * @since 10 */ /** - * Event input source. + * The event tool type info. * * @type { SourceTool } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10873,11 +10397,9 @@ declare interface BorderImageOption { * @since 11 */ /** - * Slice width of the upper left corner, upper right corner, lower left corner, - * and lower right corner of the border image. + * Border image slice * * @type { ?(Length | EdgeWidths | LocalizedEdgeWidths) } - * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -10904,10 +10426,9 @@ declare interface BorderImageOption { * @since 10 */ /** - * Repeat mode of the source image's slices on the border. + * Border image repeat * * @type { ?RepeatMode } - * @default RepeatMode.Stretch * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -10934,13 +10455,7 @@ declare interface BorderImageOption { * @since 10 */ /** - * Source or gradient color of the border image. - * When the type is string, this parameter sets the border image source. - * For details about how to reference image resources, see Loading Image Resources. - * - *

NOTE: - *
The border image source applies only to container components, such as Row, Column, and Flex. - *

+ * Border image source * * @type { ?(string | Resource | LinearGradient) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10979,10 +10494,9 @@ declare interface BorderImageOption { * @since 11 */ /** - * Width of the border image. + * Border image width * * @type { ?(Length | EdgeWidths | LocalizedEdgeWidths) } - * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -11019,10 +10533,9 @@ declare interface BorderImageOption { * @since 11 */ /** - * Amount by which the border image is extended beyond the border box. + * Border image outset * * @type { ?(Length | EdgeWidths | LocalizedEdgeWidths) } - * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -11049,19 +10562,16 @@ declare interface BorderImageOption { * @since 10 */ /** - * Whether to fill the center of the border image. - * true: Fill the center of the border image. - * false: Do not fill the center of the border image. + * Border image center fill * * @type { ?boolean } - * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - fill?: boolean + fill?: boolean; } /** @@ -11083,10 +10593,11 @@ declare class LayoutPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form - * @atomicservice + * @atomicservice * @since 15 */ static readonly matchParent: LayoutPolicy; + /** * The component fills its content which means its size is as large as its children but it is constained by its parent. * @@ -11096,10 +10607,11 @@ declare class LayoutPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form - * @atomicservice + * @atomicservice * @since 20 */ static readonly wrapContent: LayoutPolicy; + /** * The component fills its content which means its size is as large as its children. * @@ -11109,7 +10621,7 @@ declare class LayoutPolicy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form - * @atomicservice + * @atomicservice * @since 20 */ static readonly fixAtIdealSize: LayoutPolicy; @@ -11185,7 +10697,7 @@ declare interface ClickEvent extends BaseEvent { * @since 10 */ /** - * X coordinate of the click relative to the upper left corner of the application screen. + * X coordinate of the click point relative to the left edge of the device screen. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11204,7 +10716,7 @@ declare interface ClickEvent extends BaseEvent { * @since 10 */ /** - * Y coordinate of the click relative to the upper left corner of the application screen. + * Y coordinate of the click point relative to the upper edge of the device screen. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11223,7 +10735,7 @@ declare interface ClickEvent extends BaseEvent { * @since 10 */ /** - * X coordinate of the click relative to the upper left corner of the application window. + * X coordinate of the click point relative to the left edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11242,7 +10754,7 @@ declare interface ClickEvent extends BaseEvent { * @since 10 */ /** - * Y coordinate of the click relative to the upper left corner of the application window. + * Y coordinate of the click point relative to the upper edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11253,7 +10765,7 @@ declare interface ClickEvent extends BaseEvent { windowY: number; /** - * X coordinate of the click relative to the upper left corner of the application window. + * X coordinate of the click point relative to the left edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11264,7 +10776,7 @@ declare interface ClickEvent extends BaseEvent { screenX: number; /** - * Y coordinate of the click relative to the upper left corner of the application window. + * Y coordinate of the click point relative to the upper edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11347,7 +10859,7 @@ declare interface ClickEvent extends BaseEvent { y: number; /** - * Whether the event is triggered by a left-hand or right-hand tap. + * Type of the touch hand. * * @type { InteractionHand } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11566,7 +11078,7 @@ declare interface MouseEvent extends BaseEvent { * @since 10 */ /** - * X coordinate of the mouse pointer relative to the upper left corner of the application screen. + * X coordinate of the mouse point relative to the left edge of the device screen. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11583,7 +11095,7 @@ declare interface MouseEvent extends BaseEvent { * @since 10 */ /** - * Y coordinate of the mouse pointer relative to the upper left corner of the application screen. + * Y coordinate of the mouse point relative to the upper edge of the device screen. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11600,7 +11112,7 @@ declare interface MouseEvent extends BaseEvent { * @since 10 */ /** - * X coordinate of the mouse pointer relative to the upper left corner of the application window. + * X coordinate of the mouse point relative to the left edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11617,7 +11129,7 @@ declare interface MouseEvent extends BaseEvent { * @since 10 */ /** - * Y coordinate of the mouse pointer relative to the upper left corner of the application window. + * Y coordinate of the mouse point relative to the upper edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11627,7 +11139,7 @@ declare interface MouseEvent extends BaseEvent { windowY: number; /** - * X coordinate of the mouse pointer relative to the upper left corner of the application window. + * X coordinate of the mouse point relative to the left edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11638,7 +11150,7 @@ declare interface MouseEvent extends BaseEvent { screenX: number; /** - * Y coordinate of the mouse pointer relative to the upper left corner of the application window. + * Y coordinate of the mouse point relative to the upper edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11656,7 +11168,7 @@ declare interface MouseEvent extends BaseEvent { * @since 8 */ /** - * X coordinate of the mouse pointer relative to the upper left corner of the component being clicked. + * X coordinate of the mouse point relative to the left edge of the mouse hit element. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11673,7 +11185,7 @@ declare interface MouseEvent extends BaseEvent { * @since 8 */ /** - * Y coordinate of the mouse pointer relative to the upper left corner of the component being clicked. + * Y coordinate of the mouse point relative to the upper edge of the mouse hit element. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11690,7 +11202,7 @@ declare interface MouseEvent extends BaseEvent { * @since 8 */ /** - * Stops the event from bubbling upwards or downwards. + * The blocking event pops up. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11720,9 +11232,9 @@ declare interface MouseEvent extends BaseEvent { * @since 15 */ rawDeltaY?: number; - + /** - * Array of all mouse buttons that are currently pressed. + * The pressed buttons of the mouse event. * * @type { ?MouseButton[] } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11900,7 +11412,7 @@ declare interface TouchObject { * @since 10 */ /** - * Unique identifier of a finger. + * Finger unique identifier. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11941,7 +11453,7 @@ declare interface TouchObject { * @since 10 */ /** - * X coordinate of the touch point relative to the upper left corner of the application screen. + * X coordinate of the touch point relative to the left edge of the device screen. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11960,7 +11472,7 @@ declare interface TouchObject { * @since 10 */ /** - * Y coordinate of the touch point relative to the upper left corner of the application screen. + * Y coordinate of the touch point relative to the upper edge of the device screen. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11979,7 +11491,7 @@ declare interface TouchObject { * @since 10 */ /** - * X coordinate of the touch point relative to the upper left corner of the application window. + * X coordinate of the touch point relative to the left edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -11998,7 +11510,7 @@ declare interface TouchObject { * @since 10 */ /** - * Y coordinate of the touch point relative to the upper left corner of the application window. + * Y coordinate of the touch point relative to the upper edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12009,7 +11521,7 @@ declare interface TouchObject { windowY: number; /** - * X coordinate of the touch point relative to the upper left corner of the application window. + * X coordinate of the touch point relative to the left edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12020,7 +11532,7 @@ declare interface TouchObject { screenX: number; /** - * Y coordinate of the touch point relative to the upper left corner of the application window. + * Y coordinate of the touch point relative to the upper edge of the current window. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12046,7 +11558,7 @@ declare interface TouchObject { * @since 10 */ /** - * X coordinate of the touch point relative to the upper left corner of the event responding component. + * X coordinate of the touch point relative to the left edge of the touched element. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12072,7 +11584,7 @@ declare interface TouchObject { * @since 10 */ /** - * Y coordinate of the touch point relative to the upper left corner of the event responding component. + * Y coordinate of the touch point relative to the upper edge of the touched element. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12083,7 +11595,7 @@ declare interface TouchObject { y: number; /** - * Whether the event is triggered by a left-hand or right-hand tap. + * Type of the touch hand. * * @type { InteractionHand } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12091,10 +11603,10 @@ declare interface TouchObject { * @atomicservice * @since 15 */ - hand?: InteractionHand; + hand?: InteractionHand; /** - * Time when the finger is pressed. + * Time stamp when the touch point is pressed. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12104,18 +11616,18 @@ declare interface TouchObject { */ pressedTime?: number; /** - * Pressure value of the finger press. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ + * Pressure of a specific touch point. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ pressure?: number; /** - * Width of the area pressed by the finger. + * Width of the contact area when touch is pressed of a specific touch point. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12126,7 +11638,7 @@ declare interface TouchObject { width?: number; /** - * Height of the area pressed by the finger. + * Height of the contact area when touch is pressed of a specific touch point. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12328,7 +11840,7 @@ declare interface TouchEvent extends BaseEvent { * @since 10 */ /** - * Finger information changed. + * Indicates the current changed finger information. * * @type { TouchObject[] } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12354,7 +11866,7 @@ declare interface TouchEvent extends BaseEvent { * @since 10 */ /** - * Stops the event from bubbling upwards or downwards. + * The blocking event pops up. * * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12373,7 +11885,7 @@ declare interface TouchEvent extends BaseEvent { * @since 10 */ /** - * Obtains all historical points of the current frame. + * Get the historical points. * * @returns { Array } - return all historical points. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12384,7 +11896,7 @@ declare interface TouchEvent extends BaseEvent { getHistoricalPoints(): Array; /** - * Blocks the default event. + * Prevent the default function. * * @type { function } * @throws { BusinessError } 100017 - Component does not support prevent function. @@ -12539,8 +12051,8 @@ declare interface AxisEvent extends BaseEvent { /** * Defines the callback type used in onSizeChange. - *
oldValue - the width and height of the component before the change. - *
newValue - the width and height of the component after the change. + * The value of oldValue is last size of the component. + * The value of newValue is new size of the component. * * @typedef { function } SizeChangeCallback * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12571,7 +12083,7 @@ 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 @@ -12683,10 +12195,6 @@ declare interface PixelMapMock { */ /** * Enum for Drag Behavior. - * - * NOTE:
- * DragBehavior serves to inform you about the intended method of data handling, - * whether it's a copy or a move, but it does not actually dictate the real processing of the data. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -12716,7 +12224,7 @@ declare enum DragBehavior { * @atomicservice * @since 18 */ - COPY, + COPY = 0, /** * If drag use move event, then set DragBehavior.MOVE. * @@ -12738,7 +12246,7 @@ declare enum DragBehavior { * @atomicservice * @since 18 */ - MOVE + MOVE = 1 } /** @@ -12805,11 +12313,13 @@ 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 + * @crossplatform * @atomicservice * @since 20 */ @@ -12951,7 +12461,7 @@ declare enum DragResult { /** * 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. * @@ -12976,7 +12486,7 @@ declare enum DragResult { */ declare enum BlendMode { /** - * The top image is superimposed on the bottom image without any blending. + * Hybrid mode does not take effect * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -12984,7 +12494,7 @@ declare enum BlendMode { * @since 11 */ /** - * The top image is superimposed on the bottom image without any blending. + * Hybrid mode does not take effect * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -12994,7 +12504,7 @@ declare enum BlendMode { */ NONE = 0, /** - * The target pixels covered by the source pixels are erased by being turned to completely transparent. + * Clear destination color covered by the source to 0. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13002,7 +12512,7 @@ declare enum BlendMode { * @since 11 */ /** - * The target pixels covered by the source pixels are erased by being turned to completely transparent. + * Clear destination color covered by the source to 0. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13012,22 +12522,22 @@ declare enum BlendMode { */ CLEAR = 1, /** - * r = s: Only the source pixels are displayed. + * r = s * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 11 - */ + */ /** - * r = s: Only the source pixels are displayed. + * r = s * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 12 - */ + */ SRC = 2, /** * r = d @@ -13036,7 +12546,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * r = d * @@ -13045,10 +12555,10 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ DST = 3, /** - * r = s + (1 - sa) * d: The source pixels are blended based on opacity and cover the target pixels. + * r = s + (1 - sa) * d * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13056,7 +12566,7 @@ declare enum BlendMode { * @since 11 */ /** - * r = s + (1 - sa) * d: The source pixels are blended based on opacity and cover the target pixels. + * r = s + (1 - sa) * d * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13066,25 +12576,25 @@ declare enum BlendMode { */ SRC_OVER = 4, /** - * r = d + (1 - da) * s: The target pixels are blended based on opacity and cover on the source pixels. + * r = d + (1 - da) * s * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 11 - */ + */ /** - * r = d + (1 - da) * s: The target pixels are blended based on opacity and cover on the source pixels. + * r = d + (1 - da) * s * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 12 - */ + */ DST_OVER = 5, /** - * r = s * da: Only the part of the source pixels that overlap with the target pixels is displayed. + * r = s * da * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13092,7 +12602,7 @@ declare enum BlendMode { * @since 11 */ /** - * r = s * da: Only the part of the source pixels that overlap with the target pixels is displayed. + * r = s * da * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13102,22 +12612,22 @@ declare enum BlendMode { */ SRC_IN = 6, /** - * r = d * sa: Only the part of the target pixels that overlap with the source pixels is displayed. + * r = d * sa * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 11 - */ + */ /** - * r = d * sa: Only the part of the target pixels that overlap with the source pixels is displayed. + * r = d * sa * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 12 - */ + */ DST_IN = 7, /** * r = s * (1 - da) @@ -13126,7 +12636,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * r = s * (1 - da) * @@ -13135,7 +12645,7 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ SRC_OUT = 8, /** * r = d * (1 - sa) @@ -13144,36 +12654,34 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** - * r = d * (1 - sa), retains the parts of the destination pixels that do not overlap with the source. + * r = d * (1 - sa) * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 12 - */ + */ DST_OUT = 9, /** - * r = s * da + d * (1 - sa): The part of the source pixels that overlap with the target pixels is displayed - * and the part of the target pixels that do not overlap with the source pixels are displayed. + * r = s * da + d * (1 - sa) * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 11 - */ + */ /** - * r = s * da + d * (1 - sa): The part of the source pixels that overlap with the target pixels is displayed - * and the part of the target pixels that do not overlap with the source pixels are displayed. + * r = s * da + d * (1 - sa) * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 12 - */ + */ SRC_ATOP = 10, /** * r = d * sa + s * (1 - da) @@ -13182,17 +12690,16 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** - * r = d * sa + s * (1 - da): The part of the target pixels that overlap with the source pixels - * and the part of the source pixels that do not overlap with the target pixels are displayed. + * r = d * sa + s * (1 - da) * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 12 - */ + */ DST_ATOP = 11, /** * r = s * (1 - da) + d * (1 - sa) @@ -13201,7 +12708,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * r = s * (1 - da) + d * (1 - sa) * @@ -13210,7 +12717,7 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ XOR = 12, /** * r = min(s + d, 1) @@ -13219,17 +12726,16 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** - * r = min(s + d, 1): - * New pixels resulting from adding the source pixels to the target pixels are displayed. + * r = min(s + d, 1) * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 12 - */ + */ PLUS = 13, /** * r = s * d @@ -13238,7 +12744,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * r = s * d * @@ -13247,7 +12753,7 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ MODULATE = 14, /** * r = s + d - s * d @@ -13256,7 +12762,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * r = s + d - s * d * @@ -13265,7 +12771,7 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ SCREEN = 15, /** * multiply or screen, depending on destination @@ -13274,7 +12780,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * multiply or screen, depending on destination * @@ -13283,7 +12789,7 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ OVERLAY = 16, /** * rc = s + d - max(s * da, d * sa), ra = kSrcOver @@ -13292,7 +12798,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * rc = s + d - max(s * da, d * sa), ra = kSrcOver * @@ -13301,7 +12807,7 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ DARKEN = 17, /** * rc = s + d - min(s * da, d * sa), ra = kSrcOver @@ -13310,7 +12816,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * rc = s + d - min(s * da, d * sa), ra = kSrcOver * @@ -13319,7 +12825,7 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ LIGHTEN = 18, /** * brighten destination to reflect source @@ -13328,7 +12834,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * brighten destination to reflect source * @@ -13337,7 +12843,7 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ COLOR_DODGE = 19, /** * darken destination to reflect source @@ -13346,7 +12852,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * darken destination to reflect source * @@ -13355,7 +12861,7 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ COLOR_BURN = 20, /** * multiply or screen, depending on source @@ -13364,7 +12870,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * multiply or screen, depending on source * @@ -13373,25 +12879,25 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ HARD_LIGHT = 21, /** - * The LIGHTEN or DARKEN mode is used, depending on the source pixels. + * lighten or darken, depending on source * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 11 - */ + */ /** - * The LIGHTEN or DARKEN mode is used, depending on the source pixels. + * lighten or darken, depending on source * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 12 - */ + */ SOFT_LIGHT = 22, /** * rc = s + d - 2 * (min(s * da, d * sa)), ra = kSrcOver @@ -13400,17 +12906,16 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** - * rc = s + d - 2 * (min(s * da, d * sa)), ra = kSrcOver: The final pixel is the result of subtracting - * the darker of the two pixels (source and target) from the lighter one. + * rc = s + d - 2 * (min(s * da, d * sa)), ra = kSrcOver * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 12 - */ + */ DIFFERENCE = 23, /** * rc = s + d - two(s * d), ra = kSrcOver @@ -13419,7 +12924,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * rc = s + d - two(s * d), ra = kSrcOver * @@ -13428,27 +12933,25 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ EXCLUSION = 24, /** - * r = s * (1 - da) + d * (1 - sa) + s * d: - * The final pixel is the result of multiplying the source pixel by the target pixel. + * r = s * (1 - da) + d * (1 - sa) + s * d * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 11 - */ + */ /** - * r = s * (1 - da) + d * (1 - sa) + s * d: - * The final pixel is the result of multiplying the source pixel by the target pixel. + * r = s * (1 - da) + d * (1 - sa) + s * d * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 12 - */ + */ MULTIPLY = 25, /** * hue of source with saturation and luminosity of destination @@ -13457,7 +12960,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * hue of source with saturation and luminosity of destination * @@ -13466,7 +12969,7 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ HUE = 26, /** * saturation of source with hue and luminosity of destination @@ -13475,7 +12978,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * saturation of source with hue and luminosity of destination * @@ -13484,7 +12987,7 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ SATURATION = 27, /** * hue and saturation of source with luminosity of destination @@ -13493,7 +12996,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * hue and saturation of source with luminosity of destination * @@ -13502,7 +13005,7 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ COLOR = 28, /** * luminosity of source with hue and saturation of destination @@ -13511,7 +13014,7 @@ declare enum BlendMode { * @crossplatform * @form * @since 11 - */ + */ /** * luminosity of source with hue and saturation of destination * @@ -13520,7 +13023,7 @@ declare enum BlendMode { * @form * @atomicservice * @since 12 - */ + */ LUMINOSITY = 29 } @@ -13549,7 +13052,7 @@ declare enum BlendMode { */ declare enum BlendApplyType { /** - * The content of the view is blended in sequence on the target image. + * Blend view's content in sequence over dst * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13557,7 +13060,7 @@ declare enum BlendApplyType { * @since 11 */ /** - * The content of the view is blended in sequence on the target image. + * Blend view's content in sequence over dst * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13568,8 +13071,8 @@ declare enum BlendApplyType { FAST = 0, /** - * The content of the component and its child components are drawn on the - * offscreen canvas, and then blended with the existing content on the canvas. + * Composite this views's contents into an + * offscreen image and then blend over dst * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13577,8 +13080,8 @@ declare enum BlendApplyType { * @since 11 */ /** - * The content of the component and its child components are drawn on the - * offscreen canvas, and then blended with the existing content on the canvas. + * Composite this views's contents into an + * offscreen image and then blend over dst * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -13586,7 +13089,7 @@ declare enum BlendApplyType { * @atomicservice * @since 12 */ - OFFSCREEN = 1, + OFFSCREEN = 1 } /** @@ -13761,29 +13264,29 @@ 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. - * @default COPY - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ + * 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 + * @crossplatform + * @atomicservice + * @since 18 + */ dragBehavior: DragBehavior; /** @@ -14000,7 +13503,7 @@ declare interface DragEvent { getVelocity(): number; /** - * Query the ModifierKey press state, support 'ctrl'|'alt'|'shift' + * Query the ModifierKey press state, support 'ctrl'|'alt'|'shift'|'fn' * * @param { Array } keys - indicate the keys of the ModifierKey. * @returns { boolean } @@ -14010,7 +13513,7 @@ declare interface DragEvent { * @since 12 */ /** - * Query the ModifierKey press state, support 'ctrl'|'alt'|'shift' + * Query the ModifierKey press state, support 'ctrl'|'alt'|'shift'|'fn' * * @param { Array } keys - indicate the keys of the ModifierKey. * @returns { boolean } @@ -14045,7 +13548,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 @@ -14431,7 +13934,7 @@ declare interface KeyEvent { intentionCode: IntentionCode; /** - * Get the modifier keys press state, support 'ctrl'|'alt'|'shift' + * Get the modifier keys press state, support 'ctrl'|'alt'|'shift'|'fn' * * @param { Array } keys - indicate the modifier keys. * @returns { boolean } @@ -14441,7 +13944,7 @@ declare interface KeyEvent { * @since 12 */ /** - * Get the modifier keys press state, support 'ctrl'|'alt'|'shift' + * Get the modifier keys press state, support 'ctrl'|'alt'|'shift'|'fn' * * @param { Array } keys - indicate the modifier keys. * @returns { boolean } @@ -14604,8 +14107,7 @@ declare interface CrownEvent { */ declare interface BindOptions { /** - * Background color of the sheet. - *
Default value: **Color.White**. + * Defines the background color * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -14613,8 +14115,7 @@ declare interface BindOptions { * @since 10 */ /** - * Background color of the sheet. - *
Default value: **Color.White**. + * Defines the background color * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -14625,7 +14126,7 @@ declare interface BindOptions { backgroundColor?: ResourceColor; /** - * Callback for when the sheet is displayed (after the animation ends). + * Callback function when overlay interface appears * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -14633,7 +14134,7 @@ declare interface BindOptions { * @since 10 */ /** - * Callback for when the sheet is displayed (after the animation ends). + * Callback function when overlay interface appears * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -14644,7 +14145,7 @@ declare interface BindOptions { onAppear?: () => void; /** - * Callback for when the sheet disappears (after the animation ends). + * Callback function when overlay interface exits * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -14652,7 +14153,7 @@ declare interface BindOptions { * @since 10 */ /** - * Callback for when the sheet disappears (after the animation ends). + * Callback function when overlay interface exits * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -14663,7 +14164,7 @@ declare interface BindOptions { onDisappear?: () => void; /** - * Callback for when the sheet is about to be displayed (before the animation starts). + * Callback function before overlay animation starts. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -14757,7 +14258,7 @@ declare interface ContentCoverOptions extends BindOptions { * @atomicservice * @since 11 */ - modalTransition?: ModalTransition, + modalTransition?: ModalTransition; /** * Callback function when the content cover interactive dismiss @@ -14870,31 +14371,31 @@ declare interface SheetTitleOptions { */ declare enum SheetType { /** - * Bottom sheet. + * Defines bottom sheet type. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Bottom sheet. + * Defines bottom sheet type. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 - */ + */ BOTTOM = 0, /** - * Center sheet. + * Defines center sheet type. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Center sheet. + * Defines center sheet type. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -14904,14 +14405,14 @@ declare enum SheetType { CENTER = 1, /** - * Popup sheet. The popup sheet cannot be dismissed with a pull-down gesture. + * Defines popup sheet type. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @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 @@ -14942,8 +14443,7 @@ declare enum SheetType { */ declare enum SheetMode { /** - * The sheet is displayed at the top of the window corresponding to the current **UIContext** instance, - * above all pages. It is displayed at the same level as dialog boxes. + * Sheet displays above all page levels. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -14953,23 +14453,14 @@ declare enum SheetMode { OVERLAY = 0, /** - * The sheet is displayed at the top of the current page. - *
**NOTE**
Currently, the sheet can only be mounted on a **Page** - * or **NavDestination** node, with priority given to the **NavDestination** - * node if it is present. This means that, the sheet can only be displayed at - * the top of these two types of pages.
In this mode, new pages can overlay - * the sheet, and when the user returns to the previous page, the sheet remains - * present without losing its content.
In this mode, you must ensure that - * the target page node, such as the **Page** node, has been attached to the tree - * before bringing up the sheet; otherwise, the sheet will not be able to be - * attached to the corresponding page node. + * Sheet displays within the current page. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ - EMBEDDED = 1, + EMBEDDED = 1 } /** @@ -15000,7 +14491,7 @@ declare enum ScrollSizeMode { * @atomicservice * @since 12 */ - CONTINUOUS = 1, + CONTINUOUS = 1 } /** @@ -15063,7 +14554,7 @@ declare enum SheetKeyboardAvoidMode { * @atomicservice * @since 20 */ - POPUP_SHEET = 4, + POPUP_SHEET = 4 } /** @@ -15139,7 +14630,7 @@ declare interface DismissSheetAction { } /** - * Defines sheet spring back action + * Defines sheet spring back action * * @interface SpringBackAction * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15202,9 +14693,7 @@ declare interface SheetOptions extends BindOptions { height?: SheetSize | Length; /** - * Whether to display the drag bar. - *
**NOTE**
By default, the drag bar is displayed only when the sheet's - * **detents** attribute is set to multiple heights and the settings take effect. + * Defines whether the control bar is displayed. * * @type { ?boolean } * @default true @@ -15213,9 +14702,7 @@ declare interface SheetOptions extends BindOptions { * @since 10 */ /** - * Whether to display the drag bar. - *
**NOTE**
By default, the drag bar is displayed only when the sheet's - * **detents** attribute is set to multiple heights and the settings take effect. + * Defines whether the control bar is displayed. * * @type { ?boolean } * @default true @@ -15247,8 +14734,8 @@ declare interface SheetOptions extends BindOptions { * @since 10 */ /** - * Mask color of the sheet. - * + * Defines sheet maskColor + * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -15259,28 +14746,14 @@ declare interface SheetOptions extends BindOptions { /** * Defines sheet detents + * * @type { ?[(SheetSize | Length), (SheetSize | Length)?, (SheetSize | Length)?] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * Array of heights where the sheet can rest. - *

**NOTE**: - *
Since API version 12, this attribute takes effect for a bottom sheet in landscape mode. - *
In earlier versions, this attribute takes effect only for the bottom sheet in portrait mode. - *
The first height in the tuple is the initial height. - *
The sheet can switch between heights by dragging. - *
After the sheet is dragged and released, it switches to the target height or remains at the current height, - * depending on the velocity and distance. - *
If the velocity exceeds the threshold, the sheet switches to the target height in the same direction as the - * velocity. - *
If the velocity is less than the threshold, the displacement distance is used for judgement. - *
If the displacement distance is greater than 1/2 of the distance between the current and target positions, - * the sheet switches to the target height in the same direction as the velocity; otherwise, the sheet remains at the - * current height. - *
Velocity threshold: 1000; Distance threshold: 50%. - *

+ * Defines sheet detents * * @type { ?[(SheetSize | Length), (SheetSize | Length)?, (SheetSize | Length)?] } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15291,8 +14764,8 @@ declare interface SheetOptions extends BindOptions { detents?: [(SheetSize | Length), (SheetSize | Length)?, (SheetSize | Length)?]; /** - * Background blur of the sheet. By default, there is no background blur. - * + * Defines sheet background blur Style + * * @type { ?BlurStyle } * @default BlurStyle.NONE * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15300,8 +14773,8 @@ declare interface SheetOptions extends BindOptions { * @since 11 */ /** - * Background blur of the sheet. By default, there is no background blur. - * + * Defines sheet background blur Style + * * @type { ?BlurStyle } * @default BlurStyle.NONE * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15333,23 +14806,15 @@ declare interface SheetOptions extends BindOptions { showClose?: boolean | Resource; /** - * Type of the sheet. - *
**NOTE**
The types supported by the sheet vary by window. - *
1. Width < 600 vp: bottom. - *
2. 600 vp <= Width: bottom, center, and popup (default). - *
3. Width >= 840 vp: bottom, center, and popup (default). + * Defines the sheet prefer type * * @type { ?(SheetType.CENTER | SheetType.POPUP) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ - /** - * Type of the sheet. - *
**NOTE**
The types supported by the sheet vary by window. - *
1. Width < 600 vp: bottom. - *
2. 600 vp <= Width: bottom, center, and popup (default). - *
3. Width >= 840 vp: bottom, center, and popup (default). + /** + * Defines the sheet prefer type * * @type { ?SheetType } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15360,7 +14825,7 @@ declare interface SheetOptions extends BindOptions { preferType?: SheetType; /** - * Title of the sheet. + * Defines the sheet title * * @type { ?(SheetTitleOptions | CustomBuilder) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15368,7 +14833,7 @@ declare interface SheetOptions extends BindOptions { * @since 11 */ /** - * Title of the sheet. + * Defines the sheet title * * @type { ?(SheetTitleOptions | CustomBuilder) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15379,12 +14844,7 @@ declare interface SheetOptions extends BindOptions { title?: SheetTitleOptions | CustomBuilder; /** - * Callback invoked when the user performs an interactive dismiss operation: pulling down or clicking - * the back button, the mask, or the close icon.
**NOTE**
If this callback is registered, the - * sheet is not dismissed immediately when the user performs the above operations. To dismiss the sheet, - * you must call **shouldDismiss.dismiss()** in the callback.
If this callback is not registered, the - * sheet is dismissed immediately when the user performs the above operations, without any additional - * behavior.
It is recommended that this API be used in scenarios where a secondary confirmation is required. + * Callback function when the sheet interactive dismiss * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15392,12 +14852,7 @@ declare interface SheetOptions extends BindOptions { * @since 11 */ /** - * Callback invoked when the user performs an interactive dismiss operation: pulling down or clicking - * the back button, the mask, or the close icon.
**NOTE**
If this callback is registered, the - * sheet is not dismissed immediately when the user performs the above operations. To dismiss the sheet, - * you must call **shouldDismiss.dismiss()** in the callback.
If this callback is not registered, the - * sheet is dismissed immediately when the user performs the above operations, without any additional - * behavior.
It is recommended that this API be used in scenarios where a secondary confirmation is required. + * Callback function when the sheet interactive dismiss * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15408,18 +14863,7 @@ declare interface SheetOptions extends BindOptions { shouldDismiss?: (sheetDismiss: SheetDismiss) => void; /** - * Callback invoked when the user performs an interactive dismiss operation: - * pulling down or clicking the back button, the mask, or the close icon, - * to obtain the type of dismiss operation and decide whether to dismiss the sheet. - *

**NOTE**: - *
If this callback is registered, the sheet is not dismissed immediately when the user performs the above - * operations. - *
Instead, you can use the DismissSheetAction parameter in the callback to determine the type of - * dismiss operation and decide whether to dismiss the sheet. - *
If this callback is not registered, the sheet is dismissed immediately when the user performs the above - * operations, without any additional behavior. - *
No further interception with onWillDismiss is allowed in an onWillDismiss callback. - *

+ * Callback function when the sheet will dismiss * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15429,17 +14873,9 @@ declare interface SheetOptions extends BindOptions { */ onWillDismiss?: Callback; - /** - * Callback invoked when the user performs a pull-down-to-dismiss gesture, to control the bounce effect. - *

**NOTE**: - *
If this callback is registered along with **shouldDismiss** or **onWillDismiss** you can control whether the - * sheet bounces back during the pull-down-to-dismiss operation by calling **springBack** in the callback. - *
If this callback is not registered but **shouldDismiss** or **onWillDismiss** is registered, the sheet will - * bounce back before remaining open or being dismissed based on the callback behavior. - *
If neither this callback nor **shouldDismiss** or **onWillDismiss** is registered, the sheet is dismissed by - * default during the pull-down-to-dismiss operation. - *

- * + /** + * Sheet springs back callback when dismiss + * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -15449,12 +14885,7 @@ declare interface SheetOptions extends BindOptions { onWillSpringBackWhenDismiss?: Callback; /** - * Whether to allow users to interact with the page pertaining to the sheet. - *
**NOTE**
The value **true** means that interactions are allowed, in which - * case no mask is not displayed. The value **false** means that interactions are not - * allowed, in which case a mask is displayed. If this parameter is not set, interactions - * are allowed for the popup sheet, but not for bottom and center sheets. If this parameter - * is set to **true**, the setting of **maskColor** does not take effect. + * Set whether interaction is allowed outside the sheet * * @type { ?boolean } * @default false @@ -15463,12 +14894,7 @@ declare interface SheetOptions extends BindOptions { * @since 11 */ /** - * Whether to allow users to interact with the page pertaining to the sheet. - *
**NOTE**
The value **true** means that interactions are allowed, in which - * case no mask is not displayed. The value **false** means that interactions are not - * allowed, in which case a mask is displayed. If this parameter is not set, interactions - * are allowed for the popup sheet, but not for bottom and center sheets. If this parameter - * is set to **true**, the setting of **maskColor** does not take effect. + * Set whether interaction is allowed outside the sheet * * @type { ?boolean } * @default false @@ -15480,8 +14906,7 @@ declare interface SheetOptions extends BindOptions { enableOutsideInteractive?: boolean; /** - * Width of the sheet. - * Percentage parameter method: Set the width of the sheet as a percentage of the width of the parent element. + * Defines the sheet's width. * * @type { ?Dimension } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15492,16 +14917,7 @@ declare interface SheetOptions extends BindOptions { width?: Dimension; /** - * Border width of the sheet. - * You can set the width for all four sides or set separate widths for individual sides. - * Default value: **0**. - * Percentage parameter method: - * Set the border width of the sheet as a percentage of the width of the parent element. - * If the left and right border widths of the sheet are greater than the width of the sheet, and the top - * and bottom border widths are greater than the height of the sheet, the display may not appear as expected. - *

**Note**: - *
For bottom sheets, the bottom border width setting is ineffective. - *

+ * Defines the sheet's border width. * * @type { ?(Dimension | EdgeWidths | LocalizedEdgeWidths) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15512,14 +14928,9 @@ declare interface SheetOptions extends BindOptions { borderWidth?: Dimension | EdgeWidths | LocalizedEdgeWidths; /** - * Border color of the sheet. - * **borderColor** must be used with **borderWidth** in pairs. - *

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

- * + * Defines the sheet's border color. + * * @type { ?(ResourceColor | EdgeColors | LocalizedEdgeColors) } - * @default Color.Black * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -15539,8 +14950,7 @@ declare interface SheetOptions extends BindOptions { borderStyle?: BorderStyle | EdgeStyles; /** - * Shadow of the sheet. - * Default value for 2-in-1 devices: **ShadowStyle.OUTER_FLOATING_SM**. + * Defines the sheet's shadow. * * @type { ?(ShadowOptions | ShadowStyle) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15551,14 +14961,7 @@ declare interface SheetOptions extends BindOptions { shadow?: ShadowOptions | ShadowStyle; /** - * Callback for changes in the height of the sheet. - *

**Note**: - *
For a bottom sheet, the height of each frame is only returned when there are changes in detents or during drag - * actions. - *
When the sheet is pulled up or making space for the soft keyboard, only the final height is returned. - *
For other types of sheets, the final height is only returned when the sheet is pulled up. - *
The return value is in px. - *

+ * Called when height of the sheet is changed * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -15569,7 +14972,7 @@ declare interface SheetOptions extends BindOptions { onHeightDidChange?: Callback; /** - * Determine the level sheet shows, whether sheet should be displayed within the page. + * Determine the level sheet shows, whether sheet should be displayed within the page * * @type { ?SheetMode } * @default SheetMode.OVERLAY @@ -15581,7 +14984,7 @@ declare interface SheetOptions extends BindOptions { mode?: SheetMode; /** - * Content update mode of the sheet when it is scrolled. + * Determine sheet scroll size mode. * * @type { ?ScrollSizeMode } * @default ScrollSizeMode.FELLOW_DETEND @@ -15590,16 +14993,12 @@ declare interface SheetOptions extends BindOptions { * @atomicservice * @since 12 */ - scrollSizeMode?: ScrollSizeMode; + scrollSizeMode?: ScrollSizeMode; /** - * Callback for changes in the detents of the sheet. - *

**NOTE**: - *
For a bottom sheet, the final height is returned when there are changes in detents. - *
The return value is in px. - *

+ * Called when detents of the sheet changed + * * @type { ?Callback } - * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -15684,23 +15083,23 @@ declare interface SheetOptions extends BindOptions { * @systemapi * @since 14 */ - offset?: Position + offset?: Position; - /** - * Sets whether the sheet edge has spring effect. - * - * @type { ?number } - * @default 3 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - effectEdge?: number + /** + * Sets whether the sheet edge has spring effect. + * + * @type { ?number } + * @default 3 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + effectEdge?: number; /** * Defines sheet radius - * + * * @type { ?(LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -15749,7 +15148,7 @@ declare interface SheetOptions extends BindOptions { /** * placement On target node * - * @type { ?boolean } + * @type { ?boolean } * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -16062,61 +15461,58 @@ declare interface PopupMessageOptions { * @atomicservice * @since 12 */ -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 - */ + * Press back + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ PRESS_BACK = 0, /** - * Touching the mask. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ + * Touch component outside + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ TOUCH_OUTSIDE = 1, /** - * Touching the Close button. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ + * Close button + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ CLOSE_BUTTON = 2, /** - * Slide down - *

NOTE: - *
This API is effective only in sheet transition. - *

- * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ + * Slide down + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ SLIDE_DOWN = 3, /** - * Slide, not slide down. - * Default means slide right, after mirroring it means slide left. - * Choosing to slide left or slide right is not supported. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - SLIDE = 4, + * Slide, not slide down. + * Default means slide right, after mirroring it means slide left. + * Choosing to slide left or slide right is not supported. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + SLIDE = 4 } /** @@ -16304,7 +15700,7 @@ declare interface PopupCommonOptions { /** * on State Change * - * @type { ?function } + * @type { ?PopupStateChangeCallback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -16483,7 +15879,7 @@ declare interface PopupCommonOptions { * @crossplatform * @atomicservice * @since 18 - */ + */ onWillDismiss?: boolean | Callback; /** @@ -16530,7 +15926,7 @@ declare interface PopupCommonOptions { * @crossplatform * @atomicservice * @since 20 - */ + */ outlineWidth?: Dimension; /** @@ -16722,7 +16118,7 @@ declare interface PopupOptions { * @since 10 */ /** - * Content of the popup message. + * Information in the pop-up window. * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -17051,7 +16447,7 @@ declare interface PopupOptions { * @since 10 */ /** - * Parameters of the popup message. + * Sets the options of popup message. * * @type { ?PopupMessageOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -17059,7 +16455,7 @@ declare interface PopupOptions { * @atomicservice * @since 11 */ - messageOptions?: PopupMessageOptions + messageOptions?: PopupMessageOptions; /** * Sets the space of between the popup and target. @@ -17078,7 +16474,7 @@ declare interface PopupOptions { * @atomicservice * @since 11 */ - targetSpace?: Length + targetSpace?: Length; /** * whether show arrow @@ -17116,7 +16512,7 @@ declare interface PopupOptions { * @atomicservice * @since 11 */ - offset?: Position + offset?: Position; /** * Set the background color of the popup. @@ -17196,7 +16592,7 @@ declare interface PopupOptions { */ arrowPointPosition?: ArrowPointPosition; - /** + /** * The width of the arrow. * * @type { ?Dimension } @@ -17322,7 +16718,7 @@ declare interface PopupOptions { * @since 12 */ onWillDismiss?: boolean | Callback; - + /** * Determine if it is compatible popup's half folded. * @@ -17379,7 +16775,7 @@ declare interface PopupOptions { * @crossplatform * @atomicservice * @since 20 - */ + */ outlineWidth?: Dimension; /** @@ -17392,7 +16788,7 @@ declare interface PopupOptions { * @since 20 */ borderWidth?: Dimension; - + /** * The LinearGradient of popup's outline. * @@ -17457,15 +16853,7 @@ declare interface CustomPopupOptions { * @since 10 */ /** - * Popup builder. - *

NOTE: - *
The popup attribute is a universal attribute. A custom popup does not support display of another popup. - *
The position attribute cannot be used for the first-layer container in the builder. - *
If the position attribute is used, the popup will not be displayed. - *
If a custom component is used in the builder, the aboutToAppear and aboutToDisappear lifecycle callbacks - * of the custom component are irrelevant to the visibility of the popup. As such, the lifecycle of the - * custom component cannot be used to determine whether the popup is displayed or not. - *

+ * builder of popup * * @type { CustomBuilder } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -17491,11 +16879,9 @@ declare interface CustomPopupOptions { * @since 10 */ /** - * Preferred position of the popup. If the set position is insufficient for holding the popup, - * it will be automatically adjusted. + * placement of popup * * @type { ?Placement } - * @default Placement.Bottom * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -17525,16 +16911,14 @@ declare interface CustomPopupOptions { * background color of popup * * @type { ?(Color | string | Resource | number) } - * @default '#4d4d4d' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Color of the popup. To remove the background blur, set backgroundBlurStyle to BlurStyle.NONE. + * background color of popup * * @type { ?(Color | string | Resource | number) } - * @default TRANSPARENT plus COMPONENT_ULTRA_THICK * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -17561,7 +16945,6 @@ declare interface CustomPopupOptions { * whether show arrow * * @type { ?boolean } - * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -17585,15 +16968,9 @@ declare interface CustomPopupOptions { * @since 10 */ /** - * Whether to automatically dismiss the popup when an operation is performed on the page. - *

NOTE: - *
To enable the popup to disappear upon a click on it, place a layout component in the builder place the - * component in the layout component, and modify the value of the bindPopup variable (show: boolean) - * in the onClick event of the layout component. - *

+ * whether hide popup when click mask * * @type { ?boolean } - * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -17617,7 +16994,7 @@ declare interface CustomPopupOptions { * @since 10 */ /** - * Callback for the popup status change event. + * on State Change * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -17664,13 +17041,6 @@ declare interface CustomPopupOptions { /** * The offset of the sharp corner of popup. * - * Offset of the popup arrow relative to the popup. When the arrow is at the top or bottom of the popup: - *
The value 0 indicates that the arrow is located on the leftmost, and any other value indicates the distance - * from the arrow to the leftmost; the arrow is centered by default. When the arrow is on the left or right - * side of the popup: The value indicates the distance from the arrow to the top; the arrow is centered by - * default. When the popup is displayed on either edge of the screen, it will automatically deviate leftward - * or rightward to stay within the safe area. When the value is 0, the arrow always points to the bound component. - * * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -17698,7 +17068,6 @@ declare interface CustomPopupOptions { * Whether to display in the sub window. * * @type { ?boolean } - * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -17717,9 +17086,9 @@ declare interface CustomPopupOptions { * @since 10 */ /** - * Whether to apply a mask to the popup. - *
The value true means to apply a transparent mask to the popup, false means not to apply a mask to the popup, - * and a color value means to apply a mask in the corresponding color to the popup. + * 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 | { color: ResourceColor }) } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -17746,7 +17115,7 @@ declare interface CustomPopupOptions { * @atomicservice * @since 11 */ - targetSpace?: Length + targetSpace?: Length; /** * Sets the position offset of the popup. @@ -17765,7 +17134,7 @@ declare interface CustomPopupOptions { * @atomicservice * @since 11 */ - offset?: Position + offset?: Position; /** * Set the width of the popup. @@ -17776,7 +17145,7 @@ declare interface CustomPopupOptions { * @since 11 */ /** - * Width of the popup. + * Set the width of the popup. * * @type { ?Dimension } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -17795,8 +17164,7 @@ declare interface CustomPopupOptions { * @since 11 */ /** - * Position of the popup arrow relative to its parent component. Available positions are Start, Center, and End, - * in both vertical and horizontal directions. All these positions are within the parent component area. + * The position of the sharp corner of popup. * * @type { ?ArrowPointPosition } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -17816,15 +17184,10 @@ declare interface CustomPopupOptions { * @since 11 */ /** - * Arrow thickness. If the arrow thickness exceeds the length of the edge minus twice the size of the popup - * rounded corner, the arrow is not drawn. + * The width of the arrow. * * @type { ?Dimension } * @default 16.0_vp. - *

NOTE: - *
This parameter cannot be set in percentage. - *

- * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -17846,10 +17209,6 @@ declare interface CustomPopupOptions { * * @type { ?Dimension } * @default 8.0_vp. - *

NOTE: - *
This parameter cannot be set in percentage. - *

- * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -17867,7 +17226,7 @@ declare interface CustomPopupOptions { * @since 11 */ /** - * Rounded corner radius of the popup. + * The round corners of the popup. * * @type { ?Dimension } * @default 20.0_vp. @@ -17888,7 +17247,7 @@ declare interface CustomPopupOptions { * @since 11 */ /** - * Popup shadow. + * The style of popup Shadow. * * @type { ?(ShadowOptions | ShadowStyle) } * @default ShadowStyle.OUTER_DEFAULT_MD. @@ -17909,7 +17268,7 @@ declare interface CustomPopupOptions { * @since 11 */ /** - * Background blur style of the popup. + * Defines popup background blur Style * * @type { ?BlurStyle } * @default BlurStyle.COMPONENT_ULTRA_THICK @@ -17953,27 +17312,17 @@ declare interface CustomPopupOptions { transition?: TransitionEffect; /** - * Whether to perform dismissal event interception and interception callback. - * 1. If this parameter is set to false, the system does not respond to the dismissal event initiated by - * touching the Back button, swiping left or right on the screen, or pressing the Esc key; and the system - * dismisses the popup only when show is set to false. If this parameter is set to true, the system responds - * to the dismissal event as expected. - * 2. If this parameter is set to a function, the dismissal event is intercepted and the callback function - * is executed. - *

NOTE: - *
No more onWillDismiss callback is allowed in an onWillDismiss callback. - *

+ * Callback function when the popup interactive dismiss * * @type { ?(boolean | Callback) } - * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 - */ + */ onWillDismiss?: boolean | Callback; - /** + /** * Determine if it is compatible popup's half folded. * * @type { ?boolean } @@ -18029,7 +17378,7 @@ declare interface CustomPopupOptions { * @crossplatform * @atomicservice * @since 20 - */ + */ outlineWidth?: Dimension; /** @@ -18042,7 +17391,7 @@ declare interface CustomPopupOptions { * @since 20 */ borderWidth?: Dimension; - + /** * The LinearGradient of popup's outline. * @@ -18098,7 +17447,7 @@ declare enum MenuPreviewMode { * @crossplatform * @atomicservice * @since 12 - */ + */ NONE = 0, /** * Defines image type preview content. @@ -18108,7 +17457,7 @@ declare enum MenuPreviewMode { * @since 11 */ /** - * The preview is a screenshot of the component on which a long-press triggers the context menu. + * Defines image type preview content. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -18175,6 +17524,7 @@ interface ContextMenuAnimationOptions { * @since 12 */ scale?: AnimationRange; + /** * Defines the transition effect of menu preview opening and closing. * @@ -18201,7 +17551,6 @@ interface ContextMenuAnimationOptions { * Sets whether support to interrupt the process of hover scale. * * @type { ?boolean } - * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -18211,14 +17560,14 @@ interface ContextMenuAnimationOptions { } /** - * Defines the type of border radius. - * - * @typedef { Length | BorderRadiuses | LocalizedBorderRadiuses } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 19 - */ + * Defines the type of border radius. + * + * @typedef { Length | BorderRadiuses | LocalizedBorderRadiuses } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 19 + */ type BorderRadiusType = Length | BorderRadiuses | LocalizedBorderRadiuses; /** @@ -18238,7 +17587,7 @@ declare enum HapticFeedbackMode { * @crossplatform * @atomicservice * @since 18 - */ + */ DISABLED = 0, /** * Defines menu always haptic feedback. @@ -18299,6 +17648,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 * @@ -18423,26 +17855,10 @@ declare interface ContextMenuOptions { * @since 10 */ /** - * Offset for showing the context menu, which should not cause the menu to extend beyond the screen. - *

NOTE: - *
When the menu is displayed relative to the parent component area, the width or height of the area is - * automatically counted into the offset based on the placement attribute of the menu. When the menu is - * displayed above the parent component (that is, placement is set to Placement.TopLeft, Placement.Top, or - * Placement.TopRight), a positive value of x indicates rightward movement relative to the parent component, - * and a positive value of y indicates upward movement. When the menu is displayed below the parent component - * (that is, placement is set to Placement.BottomLeft, Placement.Bottom, or Placement.BottomRight), a positive - * value of x indicates rightward movement relative to the parent component, and a positive value of y indicates - * downward movement. When the menu is displayed on the left of the parent component (that is, placement is set - * to Placement.LeftTop, Placement.Left, or Placement.LeftBottom), a positive value of x indicates leftward - * movement relative to the parent component, and a positive value of y indicates downward movement. When the - * menu is displayed on the right of the parent component (that is, placement is set to Placement.RightTop, - * Placement.Right, or Placement.RightBottom), a positive value of x indicates rightward movement relative to - * the parent component, and a positive value of y indicates downward movement. If the display position of the - * menu is adjusted (different from the main direction of the initial placement value), the offset value is invalid. - *

+ * Sets the position offset of the context menu window. * * @type { ?Position } - * @default {x:0,y:0} - Percentage values are not supported. + * @default - * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -18460,15 +17876,10 @@ declare interface ContextMenuOptions { * @since 10 */ /** - * Preferred position of the context menu. If the set position is insufficient for holding the component, it will be - * automatically adjusted. - *

NOTE: - *
If a menu is displayed by pressing and holding or right-clicking, the menu is displayed at the clicked - * position. - *

+ * Sets the placement of the context menu window. * * @type { ?Placement } - * @default Placement.BottomLeft + * @default - * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -18477,7 +17888,7 @@ declare interface ContextMenuOptions { placement?: Placement; /** - * whether show arrow belong to the menu. + * whether show arrow belong to the menu, default: false, not show arrow * * @type { ?boolean } * @default false @@ -18485,14 +17896,7 @@ declare interface ContextMenuOptions { * @since 10 */ /** - * whether show arrow belong to the menu. - *

NOTE: - *
When enableArrow is true, an arrow is displayed in the position specified by placement. - *
If placement is not set or its value is invalid, the arrow is displayed above the target. - *
If the position is insufficient for holding the arrow, it is automatically adjusted. - *
When enableArrow is undefined, no arrow is displayed. - *
This API is supported in bindContextMenu since API version 10 and bindMenu since API version 12. - *

+ * whether show arrow belong to the menu, default: false, not show arrow * * @type { ?boolean } * @default false @@ -18507,46 +17911,25 @@ declare interface ContextMenuOptions { * The horizontal offset to the left of menu or vertical offset to the top of menu * * @type { ?Length } - * @default 0vp + * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * Offset of the arrow relative to the context menu. The offset settings take effect only when the value is valid, - * can be converted to a number greater than 0, and does not cause the arrow to extend beyond the safe area of - * the context menu. - *

NOTE: - *
The safe distance of the arrow from the four sides of the menu is the sum of the menu's corner radius and - * half the width of the arrow. The value of placement determines whether the offset is horizontal or vertical. - * When the arrow is in the horizontal direction of the menu, the offset is the distance from the arrow to the - * leftmost arrow's safe distance. When the arrow is in the vertical direction of the menu, the offset is the - * distance from the arrow to the topmost arrow's safe distance. The default position where the arrow is - * displayed varies with the value of placement: Without any avoidance by the menu, when placement is set to - * Placement.Top or Placement.Bottom, the arrow is displayed horizontally and is centered by default; when - * placement is set to Placement.Left or Placement.Right, the arrow is displayed vertically and is centered by - * default; when placement is set to Placement.TopLeft or Placement.BottomLeft, the arrow is displayed - * horizontally by default, and the distance from the arrow to the left edge of the menu is the arrow's safe - * distance; when placement is set to Placement.TopRight or Placement.BottomRight, the arrow is displayed - * horizontally by default, and the distance from the arrow to the right edge of the menu is the arrow's safe - * distance; when placement is set to Placement.LeftTop or Placement.RightTop, the arrow is displayed vertically - * by default, and the distance from the arrow to the top edge of the menu is the arrow's safe distance; when - * placement is set to Placement.LeftBottom or Placement.RightBottom, the arrow is displayed vertically by - * default, and the distance from the arrow to the bottom edge of the menu is the arrow's safe distance. - *
This API is supported in bindContextMenu since API version 10 and bindMenu since API version 12. - *

+ * The horizontal offset to the left of menu or vertical offset to the top of menu * * @type { ?Length } - * @default 0vp + * @default 0 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ arrowOffset?: Length; - + /** * The preview content of context menu. - * + * * @type { ?(MenuPreviewMode | CustomBuilder) } * @default MenuPreviewMode.NONE * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -18554,14 +17937,7 @@ declare interface ContextMenuOptions { * @since 11 */ /** - * Preview displayed when the context menu is triggered by a long-press or use the isShown variable of - * bindContextMenu to display the preview content style of the menu. - *

NOTE: - *
This parameter has no effect when responseType is set to ResponseType.RightClick. - *
If preview is set to MenuPreviewMode.NONE or is not set, the enableArrow parameter is effective. - *
If preview is set to MenuPreviewMode.IMAGE or CustomBuilder, no arrow will be displayed even when - * enableArrow is true. - *

+ * The preview content of context menu. * * @type { ?(MenuPreviewMode | CustomBuilder) } * @default MenuPreviewMode.NONE @@ -18584,16 +17960,9 @@ declare interface ContextMenuOptions { previewBorderRadius?: BorderRadiusType; /** - * Border radius of the menu. - *

NOTE: - *
The value can be in percentage. - *
If the sum of the two maximum corner radii in the horizontal direction exceeds the menu's width, or if the sum - * of the two maximum corner radii in the vertical direction exceeds the menu's height, the default corner radius of - * the menu will be used. - *

+ * Defines the border radius of menu. * * @type { ?(Length | BorderRadiuses | LocalizedBorderRadiuses) } - * @default 8vp for 2-in-1 devices and 20vp for other devices * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -18610,7 +17979,7 @@ declare interface ContextMenuOptions { * @since 10 */ /** - * Callback triggered when the menu is displayed. + * Callback function when the context menu appears. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -18621,7 +17990,7 @@ declare interface ContextMenuOptions { onAppear?: () => void; /** - * Callback triggered when the menu is hidden. + * Callback function when the context menu disappear. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -18648,7 +18017,7 @@ declare interface ContextMenuOptions { * @since 11 */ /** - * Callback triggered when the menu is about to appear. + * Callback function before the context menu animation starts. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -18667,7 +18036,7 @@ declare interface ContextMenuOptions { * @since 11 */ /** - * Callback triggered when the menu is about to disappear. + * Callback function before the context menu popAnimation starts. * * @type { ?function } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -18676,7 +18045,7 @@ declare interface ContextMenuOptions { * @since 12 */ aboutToDisappear?: () => void; - + /** * The margin of menu's layoutRegion. * @@ -18687,7 +18056,7 @@ declare interface ContextMenuOptions { * @since 13 */ layoutRegionMargin?: Margin; - + /** * The preview animator options. * @@ -18717,7 +18086,7 @@ declare interface ContextMenuOptions { * @since 11 */ /** - * Background color of the menu. + * Defines the menu's background color * * @type { ?ResourceColor } * @default Color.Transparent @@ -18738,7 +18107,7 @@ declare interface ContextMenuOptions { * @since 11 */ /** - * Background blur style of the menu. + * Defines menu background blur Style * * @type { ?BlurStyle } * @default BlurStyle.COMPONENT_ULTRA_THICK @@ -18783,15 +18152,15 @@ declare interface ContextMenuOptions { transition?: TransitionEffect; /** - * Determine if it is compatible menu's half folded. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ + * Determine if it is compatible menu's half folded. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ enableHoverMode?: boolean; /** @@ -18806,14 +18175,14 @@ declare interface ContextMenuOptions { outlineColor?: ResourceColor | EdgeColors; /** - * The width of menu's outer border. - * - * @type { ?(Dimension | EdgeOutlineWidths) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ + * The width of menu's outer border. + * + * @type { ?(Dimension | EdgeOutlineWidths) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ outlineWidth?: Dimension | EdgeOutlineWidths; /** @@ -18981,7 +18350,6 @@ 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 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -18998,7 +18366,7 @@ declare interface MenuOptions extends ContextMenuOptions { * @since 10 */ /** - * Implements a ProgressMask object to set the progress, maximum value, and color of the mask. + * Defines the ProgressMask class. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19019,9 +18387,9 @@ declare class ProgressMask { /** * constructor. * - * @param { number } value - Current value of the progress mask. Value range: [0.0, +∞). - * @param { number } total - Maximum value of the progress mask. Value range: [0.0, +∞). - * @param { ResourceColor } color - Color of the progress mask. + * @param { number } value - indicates the current value of the progress. + * @param { number } total - indicates the total value of the progress. + * @param { ResourceColor } color - indicates the color of the mask. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -19038,9 +18406,9 @@ declare class ProgressMask { * @since 10 */ /** - * Updates the progress value of the progress mask. + * Update the current value of the progress. * - * @param { number } value - Current value of the progress mask. + * @param { number } value - indicates the current value of the progress. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -19059,14 +18427,14 @@ declare class ProgressMask { /** * Update the color of the mask. * - * @param { ResourceColor } value - Color of the progress mask. + * @param { ResourceColor } value - indicates the color of the mask. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ updateColor(value: ResourceColor): void; - + /** * Enable the breathe animation of mask. * @@ -19464,14 +18832,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. - *
If level is set to ClickEffectLevel.MIDDLE or ClickEffectLevel.HEAVY, the default value is 0.95. - *
If level is set to undefined or null (both of which evaluate to ClickEffectLevel.LIGHT), the default value is 0.90. - *
If scale is set to undefined or null, the default zoom ratio for the set level will be used. - *

+ * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -19697,7 +19058,7 @@ declare interface MenuElement { /** * Defines the attribute modifier. - * + * * @interface AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19705,7 +19066,7 @@ declare interface MenuElement { */ /** * Defines the attribute modifier. - * + * * @interface AttributeModifier * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19716,7 +19077,7 @@ declare interface AttributeModifier { /** * Defines the normal update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19724,7 +19085,7 @@ declare interface AttributeModifier { */ /** * Defines the normal update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19735,7 +19096,7 @@ declare interface AttributeModifier { /** * Defines the pressed update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19743,7 +19104,7 @@ declare interface AttributeModifier { */ /** * Defines the pressed update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19754,7 +19115,7 @@ declare interface AttributeModifier { /** * Defines the focused update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19762,7 +19123,7 @@ declare interface AttributeModifier { */ /** * Defines the focused update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19773,7 +19134,7 @@ declare interface AttributeModifier { /** * Defines the disabled update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19781,7 +19142,7 @@ declare interface AttributeModifier { */ /** * Defines the disabled update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19792,7 +19153,7 @@ declare interface AttributeModifier { /** * Defines the selected update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19800,7 +19161,7 @@ declare interface AttributeModifier { */ /** * Defines the selected update attribute function. - * + * * @param { T } instance * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19812,7 +19173,7 @@ declare interface AttributeModifier { /** * Defines the content modifier. - * + * * @interface ContentModifier * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19823,22 +19184,19 @@ 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 - * CheckBoxConfiguration of the Checkbox component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ - applyContent(): WrappedBuilder<[T]> + applyContent(): WrappedBuilder<[T]>; } /** * Defines the common configuration. - * + * * @interface CommonConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19846,7 +19204,7 @@ declare interface ContentModifier { * @since 12 */ 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. @@ -19861,14 +19219,14 @@ declare interface CommonConfiguration { /** * Obtains the contentModifier instance object - * + * * @type { ContentModifier } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ - contentModifier: ContentModifier + contentModifier: ContentModifier; } /** @@ -19892,7 +19250,7 @@ declare interface CommonConfiguration { */ declare enum OutlineStyle { /** - * Solid border. + * Shows as a solid line. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19900,7 +19258,7 @@ declare enum OutlineStyle { * @since 11 */ /** - * Solid border. + * Shows as a solid line. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19911,7 +19269,7 @@ declare enum OutlineStyle { SOLID = 0, /** - * Dashed border. + * Shows as a series of short square dashed lines. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19919,7 +19277,7 @@ declare enum OutlineStyle { * @since 11 */ /** - * Dashed border. + * Shows as a series of short square dashed lines. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19938,7 +19296,7 @@ declare enum OutlineStyle { * @since 11 */ /** - * Dotted border. The radius of a dot is half of **outlineWidth**. + * Displays as a series of dots with a radius of half the borderWidth. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -19946,7 +19304,7 @@ declare enum OutlineStyle { * @atomicservice * @since 12 */ - DOTTED = 2, + DOTTED = 2 } /** @@ -20066,6 +19424,7 @@ declare enum DragPreviewMode { * @since 18 */ ENABLE_MULTI_TILE_EFFECT = 6, + /** * Enable the touch point calculation position based on final preview rect. * @@ -20134,7 +19493,7 @@ declare enum MenuPolicy { DEFAULT = 0, /** - * The menu is always hidden. + * Hide pop up menu. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20144,14 +19503,14 @@ declare enum MenuPolicy { HIDE = 1, /** - * The menu is always displayed. + * Show pop up menu. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ - SHOW = 2, + SHOW = 2 } /** @@ -20210,80 +19569,77 @@ declare type SymbolGlyphModifier = import('../api/arkui/SymbolGlyphModifier').Sy */ declare interface DragPreviewOptions { /** - * Drag preview mode. - * - * @type { ?DragPreviewMode } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Drag preview mode. - * - * @type { ?(DragPreviewMode | Array) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Drag preview mode. - * - * @type { ?(DragPreviewMode | Array) } - * @default DragPreviewMode.AUTO - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ + * Drag preview mode. + * + * @type { ?DragPreviewMode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 11 + */ + /** + * Drag preview mode. + * + * @type { ?(DragPreviewMode | Array) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Drag preview mode. + * + * @type { ?(DragPreviewMode | Array) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ mode?: DragPreviewMode | Array; /** - * Drag preview modifier. - * - * @type { ?ImageModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Drag preview modifier. - * - * @type { ?ImageModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ + * Drag preview modifier. + * + * @type { ?ImageModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * Drag preview modifier. + * + * @type { ?ImageModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ modifier?: ImageModifier; /** - * The flag for number showing. - * - * @type { ?(boolean | number) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * The flag for number showing. - * - * @type { ?(boolean | number) } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ + * The flag for number showing. + * + * @type { ?(boolean | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + /** + * The flag for number showing. + * + * @type { ?(boolean | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ numberBadge?: boolean | number; /** - * Drag start animation effect from drag preview to the handle drag image. - * - * @type { ?DraggingSizeChangeEffect } - * @default DraggingSizeChangeEffect.DEFAULT - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 19 - */ + * Drag start animation effect from drag preview to the handle drag image. + * + * @type { ?DraggingSizeChangeEffect } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 19 + */ sizeChangeEffect?: DraggingSizeChangeEffect; } @@ -20297,58 +19653,54 @@ declare interface DragPreviewOptions { */ declare interface DragInteractionOptions { /** - * Define whether to gather selected nodes in grid or list. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ + * Define whether to gather selected nodes in grid or list. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ isMultiSelectionEnabled?: boolean; - + /** - * Define whether to execute animation before preview floating. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ + * Define whether to execute animation before preview floating. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ defaultAnimationBeforeLifting?: boolean; /** - * Config if auto scrolling should be triggered when the drag hovered on a scrollable controller's edge. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ + * Config if auto scrolling should be triggered when the drag hovered on a scrollable controller's edge. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 18 + */ enableEdgeAutoScroll?: boolean; /** - * Define whether to enable the haptic feedback when dragging, the default value is false. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ + * Define whether to enable the haptic feedback when dragging, the default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 18 + */ enableHapticFeedback?: boolean; /** - * Define whether to lifting trigger drag by finger. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 15 - */ + * Define whether to lifting trigger drag by finger. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 15 + */ isLiftingDisabled?: boolean; } @@ -20362,25 +19714,25 @@ declare interface DragInteractionOptions { */ declare interface PreviewConfiguration { /** - * Define whether to only use for lifting. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 15 - */ + * Define whether to only use for lifting. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 15 + */ onlyForLifting?: boolean; /** - * Define whether to delay create builder. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 15 - */ + * Define whether to delay create builder. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 15 + */ delayCreating?: boolean; } @@ -20403,7 +19755,7 @@ declare interface InvertOptions { /** * Defines the low value of threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20411,7 +19763,7 @@ declare interface InvertOptions { */ /** * Defines the low value of threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20421,27 +19773,27 @@ declare interface InvertOptions { low: number; /** - * Defines the high value of threshold - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Defines the high value of threshold - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ + * Defines the high value of threshold + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Defines the high value of threshold + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ high: number; /** * Defines the threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20449,7 +19801,7 @@ declare interface InvertOptions { */ /** * Defines the threshold - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20457,10 +19809,10 @@ declare interface InvertOptions { * @since 12 */ threshold: number; - + /** *Defines the threshold range - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20468,7 +19820,7 @@ declare interface InvertOptions { */ /** *Defines the threshold range - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20480,7 +19832,7 @@ declare interface InvertOptions { /** * Import the CircleShape type object for common method. - * + * * @typedef { import('../api/@ohos.arkui.shape').CircleShape } CircleShape * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20492,7 +19844,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 +19856,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 +19868,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 @@ -20637,10 +19989,12 @@ declare interface BackgroundOptions { * @since 20 */ 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 @@ -20724,9 +20078,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the width of the component. By default, the width required to fully hold the - * component content is used.If the width of the component is greater than that of - * the parent container, the component will be drawn beyond the parent container scope. + * Sets the width of the current component. * * @param { Length } value * @returns { T } @@ -20738,10 +20090,7 @@ declare class CommonMethod { */ width(value: Length): T; /** - * Sets the width of the component or its horizontal layout policy. By default, the - * component uses the width required for its content. If the width of the component is - * greater than that of the parent container, the component will be drawn beyond the - * parent container scope. + * Sets the width of the current component. * * @param { Length | LayoutPolicy } widthValue * @returns { T } @@ -20781,9 +20130,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the height of the component. By default, the height required to fully hold the - * component content is used. If the height of the component is greater than that of - * the parent container, the component will be drawn beyond the parent container scope. + * Sets the height of the current component. * * @param { Length } value * @returns { T } @@ -20795,10 +20142,7 @@ declare class CommonMethod { */ height(value: Length): T; /** - * Sets the height of the component or its vertical layout policy. By default, the - * component uses the height required for its content. If the height of the component - * is greater than that of the parent container, the component will be drawn beyond - * the parent container scope. + * Sets the height of the current component. * * @param { Length | LayoutPolicy } heightValue * @returns { T } @@ -20809,13 +20153,11 @@ declare class CommonMethod { * @since 15 */ height(heightValue: Length | LayoutPolicy): T; - + /** * Sets the drawModifier of the current component. * * @param { DrawModifier | undefined } modifier - drawModifier used to draw, or undefined if it is not available. - * Default value: undefined - * A custom modifier applies only to the FrameNode of the currently bound component, not to its subnodes. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -20826,7 +20168,6 @@ declare class CommonMethod { /** * Sets the custom property of the current component. - * This API does not work for custom components. * * @param { string } name - the name of the custom property. * @param { Optional } value - the value of the custom property. @@ -20849,9 +20190,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the safe area to be expanded to. - *
default:{types: [SafeAreaType.SYSTEM, SafeAreaType.CUTOUT, SafeAreaType.KEYBOARD], - * edges: [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM, SafeAreaEdge.START, SafeAreaEdge.END]} + * Expands the safe area. * * @param { Array } types - Indicates the types of the safe area. * @param { Array } edges - Indicates the edges of the safe area. @@ -20965,7 +20304,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the size of the component. + * The size of the current component. * * @param { SizeOptions } value * @returns { T } @@ -21008,8 +20347,8 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the constraint size of the component, which is used to limit the size range during component layout. - * Default value: **{minWidth: 0, maxWidth: Infinity, minHeight: 0, maxHeight: Infinity}**. + * constraint Size: + * minWidth: minimum Width, maxWidth: maximum Width, minHeight: minimum Height, maxHeight: maximum Height. * * @param { ConstraintSizeOptions } value * @returns { T } @@ -21051,11 +20390,9 @@ declare class CommonMethod { * @since 10 */ /** - * Sets how the component behaves during hit testing. + * Defines the component's hit test behavior in touch events. * * @param { HitTestMode } value - the hit test mode. - * @default HitTestMode.default - Both the node and its child nodes respond to the hit test of a touch event, - * but its sibling nodes are blocked from the hit test. The hit test for ancestor nodes is not affected. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21074,7 +20411,7 @@ declare class CommonMethod { * @since 11 */ /** - * Called to specify how to perform the touch test on the children of this component. + * Defines the pre-touch test of sub component in touch events. * * @param { function } event * @returns { T } @@ -21113,9 +20450,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the weight of the component during layout. A component with this attribute is allocated space - * along the main axis of its parent container (Row, Column, or Flex) based on its specified weight. - * Default value: **0**. + * Defines the weight of the component, according to which the remain part of main-axis is allocated self-adaptively * * @param { number | string } value * @returns { T } @@ -21128,8 +20463,7 @@ declare class CommonMethod { layoutWeight(value: number | string): T; /** - * Sets the weight of the component in a chain, which is used to re-lay out components that form the chain. - *
This API has effect only when the parent container is RelativeContainer. + * chain Weight * * @param { ChainWeightOptions } chainWeight * @returns { T } @@ -21179,8 +20513,7 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the padding of the component. - * Default value: **0**. + * Inner margin. * * @param { Padding | Length | LocalizedPadding } value * @returns { T } @@ -21193,9 +20526,7 @@ declare class CommonMethod { padding(value: Padding | Length | LocalizedPadding): T; /** - * Sets the safe area padding. It enables a container to add a component-level - * safe area for child components to expand into. - * Default value: **LengthMetrics.vp(0)** + * Inner safeArea padding. * * @param { Padding | LengthMetrics | LocalizedPadding } paddingValue - Indicates safeArea padding values * @returns { T } @@ -21206,7 +20537,7 @@ declare class CommonMethod { * @since 14 */ safeAreaPadding(paddingValue: Padding | LengthMetrics | LocalizedPadding): T; - + /** * Outer Margin. * @@ -21246,8 +20577,7 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the margin of the component. - * Default value: **0**. + * Outer Margin. * * @param { Margin | Length | LocalizedMargin } value * @returns { T } @@ -21285,13 +20615,13 @@ declare class CommonMethod { * @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 @@ -21367,10 +20697,9 @@ declare class CommonMethod { backgroundColor(color: Optional): T; /** - * Sets the pixel rounding policy for the current component in the specified direction. - *
If a direction is not set, the pixels are rounded to the nearest whole number in that direction. + * PixelRound * - * @param { PixelRoundPolicy } value - indicates the rounding policy for the bounds of the component. + * @param { PixelRoundPolicy } value - indicates the pixel round policy. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21454,7 +20783,7 @@ declare class CommonMethod { * @since 18 */ backgroundImage(src: ResourceStr | PixelMap, options?: BackgroundImageOptions): T; - + /** * Background image size * @@ -21485,7 +20814,7 @@ declare class CommonMethod { /** * Background image size * - * @param { SizeOptions | ImageSize } value - The width and height of the background image. + * @param { SizeOptions | ImageSize } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21540,26 +20869,22 @@ declare class CommonMethod { 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. + * Background blur style. + * blurStyle:Blur style type. * - * @param { BlurStyle } value - Settings of the background blur style - *
including the blur radius, mask color, mask opacity, saturation, and brightness. - * @param { BackgroundBlurStyleOptions } options - Background blur options. + * @param { BlurStyle } value + * @param { BackgroundBlurStyleOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * 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. + * Background blur style. + * blurStyle:Blur style type. * - * @param { BlurStyle } value - Settings of the background blur style - *
including the blur radius, mask color, mask opacity, saturation, and brightness. - * @param { BackgroundBlurStyleOptions } options - Background blur options. + * @param { BlurStyle } value + * @param { BackgroundBlurStyleOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21567,13 +20892,11 @@ declare class CommonMethod { * @since 10 */ /** - * 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. + * Background blur style. + * blurStyle:Blur style type. * - * @param { BlurStyle } value - Settings of the background blur style - *
including the blur radius, mask color, mask opacity, saturation, and brightness. - * @param { BackgroundBlurStyleOptions } options - Background blur options. + * @param { BlurStyle } value + * @param { BackgroundBlurStyleOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21625,9 +20948,9 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the background effect of the component, including the blur radius, brightness, saturation, and color. + * options:background effect options. * - * @param { BackgroundEffectOptions } options - Background effect, including saturation, brightness, and color. + * @param { BackgroundEffectOptions } options - options indicates the effect options. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21693,8 +21016,9 @@ declare class CommonMethod { */ foregroundEffect(options: ForegroundEffectOptions): T; + /** - * Sets a visual effect that is not a filter effect. + * Unified visual effect interface. * * @param { VisualEffect } effect - Visual effect parameters. * @returns { T } @@ -21706,7 +21030,7 @@ declare class CommonMethod { visualEffect(effect: VisualEffect): T; /** - * Sets the visual effect of the background filter. + * Filter applied to the background layer of the component. * * @param { Filter } filter - Filter effect parameters. * @returns { T } @@ -21718,7 +21042,7 @@ declare class CommonMethod { backgroundFilter(filter: Filter): T; /** - * Sets the visual effect of the foreground (content) filter. + * Filter applied to the foreground layer of the component. * * @param { Filter } filter - Filter effect parameters. * @returns { T } @@ -21730,7 +21054,7 @@ declare class CommonMethod { foregroundFilter(filter: Filter): T; /** - * Sets the visual effect of the compositing filter. + * Filter applied to the compositing layer of the component. * * @param { Filter } filter - Filter effect parameters. * @returns { T } @@ -21742,20 +21066,22 @@ declare class CommonMethod { compositingFilter(filter: Filter): T; /** - * Applies a foreground blur style to the component. + * Foreground blur style. + * blurStyle:Blur style type. * - * @param { BlurStyle } value - Settings of the foreground blur style. - * @param { ForegroundBlurStyleOptions } options - Foreground blur options. + * @param { BlurStyle } value + * @param { ForegroundBlurStyleOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Applies a foreground blur style to the component. + * Foreground blur style. + * blurStyle:Blur style type. * - * @param { BlurStyle } value - Settings of the foreground blur style. - * @param { ForegroundBlurStyleOptions } options - Foreground blur options. + * @param { BlurStyle } value + * @param { ForegroundBlurStyleOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21797,24 +21123,24 @@ declare class CommonMethod { /** * Sets the opacity of the component. * - * @param { number | Resource } value - Opacity of the component. The value ranges from 0 to 1. + * @param { number | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the opacity of the component. + * Opacity * - * @param { number | Resource } value - Opacity of the component. The value ranges from 0 to 1. + * @param { number | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the opacity of the component. + * Opacity * - * @param { number | Resource } value - Opacity of the component. The value ranges from 0 to 1. + * @param { number | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21822,9 +21148,9 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the opacity of the component. + * Opacity * - * @param { number | Resource } value - Opacity of the component. The value ranges from 0 to 1. + * @param { number | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21835,9 +21161,9 @@ declare class CommonMethod { opacity(value: number | Resource): T; /** - * Sets the opacity of the component. + * Opacity * - * @param { Optional } opacity - Opacity of the component. The value ranges from 0 to 1. + * @param { Optional } opacity * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -21878,7 +21204,8 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the border. + * Border + * width:Border width;color:Border color;radius:Border radius; * * @param { BorderOptions } value * @returns { T } @@ -21918,8 +21245,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the border style. - * Default value: **BorderStyle.Solid**. + * Border style * * @param { BorderStyle | EdgeStyles } value * @returns { T } @@ -21970,8 +21296,7 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the border width. - * Percentage values are not supported. + * Border width * * @param { Length | EdgeWidths | LocalizedEdgeWidths } value * @returns { T } @@ -22022,8 +21347,8 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the border color. - * Default value: **Color.Black**. + * Border color + * * @param { ResourceColor | EdgeColors | LocalizedEdgeColors } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -22073,8 +21398,7 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the radius of the border rounded corners. - *
The radius is restricted by the component size. The maximum value is half of the component width or height. + * Border radius * * @param { Length | BorderRadiuses | LocalizedBorderRadiuses } value * @returns { T } @@ -22106,9 +21430,9 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the border image of the component. + * Border image * - * @param { BorderImageOption } value - Border image or border gradient. + * @param { BorderImageOption } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22119,9 +21443,10 @@ declare class CommonMethod { borderImage(value: BorderImageOption): T; /** - * Sets the outline attributes in one declaration. + * Outline + * width:Outline width;color:Outline color;radius:Outline radius;style:Outline style; * - * @param { OutlineOptions } value - Outline attributes. + * @param { OutlineOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22129,9 +21454,10 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the outline attributes in one declaration. + * Outline + * width:Outline width;color:Outline color;radius:Outline radius;style:Outline style; * - * @param { OutlineOptions } value - Outline attributes. + * @param { OutlineOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22142,11 +21468,10 @@ declare class CommonMethod { outline(value: OutlineOptions): T; /** - * Sets the outline attributes in one declaration. Compared to outline, - * this API supports the **undefined** type for the **options** parameter. + * Outline + * width:Outline width;color:Outline color;radius:Outline radius;style:Outline style; * - * @param { Optional } options - Outline attributes.
If **options** is **undefined**, - * the component reverts to its original style with no outline. + * @param { Optional } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22157,10 +21482,10 @@ declare class CommonMethod { outline(options: Optional): T; /** - * Sets the style of the outline. + * Outline style + * The input parameter default value is OutlineStyle.SOLID * - * @param { OutlineStyle | EdgeOutlineStyles } value - Outline style. - *
Default value: **OutlineStyle.SOLID**. + * @param { OutlineStyle | EdgeOutlineStyles } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22168,10 +21493,9 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the style of the outline. + * Outline style * - * @param { OutlineStyle | EdgeOutlineStyles } value - Outline style. - *
Default value: **OutlineStyle.SOLID**. + * @param { OutlineStyle | EdgeOutlineStyles } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22182,13 +21506,9 @@ declare class CommonMethod { outlineStyle(value: OutlineStyle | EdgeOutlineStyles): T; /** - * Sets the style of the outline. Compared to outlineStyle, - * this API supports the **undefined** type for the **style** parameter. + * Outline style * - * @param { Optional } style - Outline style. - *
Default value: **OutlineStyle.SOLID**. - *
If **style** is **undefined**, the component reverts to its original - * style with no outline. + * @param { Optional } style * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22199,11 +21519,10 @@ declare class CommonMethod { outlineStyle(style: Optional): T; /** - * Sets the thickness of the outline. + * Outline width + * The input parameter default value is 0 * - * @param { Dimension | EdgeOutlineWidths } value - Outline thickness. Percentage values are not supported. - *
Default value: **0**Outline thickness. Percentage values are not supported. - *
Default value: **0**. + * @param { Dimension | EdgeOutlineWidths } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22211,11 +21530,9 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the thickness of the outline. + * Outline width * - * @param { Dimension | EdgeOutlineWidths } value - Outline thickness. Percentage values are not supported. - *
Default value: **0**Outline thickness. Percentage values are not supported. - *
Default value: **0**. + * @param { Dimension | EdgeOutlineWidths } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22226,12 +21543,9 @@ declare class CommonMethod { outlineWidth(value: Dimension | EdgeOutlineWidths): T; /** - * Sets the thickness of the outline. Compared to outlineWidth, - * this API supports the **undefined** type for the **width** parameter. + * Outline width * - * @param { Optional } width - Outline thickness. Percentage values are not supported. - *
Default value: **0**. - *
If **width** is **undefined**, the component reverts to its original style with no outline width. + * @param { Optional } width * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22242,10 +21556,10 @@ declare class CommonMethod { outlineWidth(width: Optional): T; /** - * Sets the color of the outline. + * Outline color + * The input parameter default value is Color.Black * - * @param { ResourceColor | EdgeColors } value - Outline color. - *
Default value: **Color.Black**. + * @param { ResourceColor | EdgeColors } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22253,10 +21567,9 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the color of the outline. + * Outline color * - * @param { ResourceColor | EdgeColors | LocalizedEdgeColors } value - Outline color. - *
Default value: **Color.Black**. + * @param { ResourceColor | EdgeColors | LocalizedEdgeColors } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22267,13 +21580,9 @@ declare class CommonMethod { outlineColor(value: ResourceColor | EdgeColors | LocalizedEdgeColors): T; /** - * Sets the color of the outline. Compared to outlineColor, - * this API supports the **undefined** type for the **color** parameter. + * Outline color * - * @param { Optional } color - Outline color. - *
Default value: **Color.Black**. - *
If **color** is **undefined**, the component reverts to its original style with the - * outline color of **Color.Black**. + * @param { Optional } color * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22284,12 +21593,10 @@ declare class CommonMethod { outlineColor(color: Optional): T; /** - * Sets the radius of the outline corners. + * Outline radius + * The input parameter default value is 0 * - * @param { Dimension | OutlineRadiuses } value - adius of the outline corners. Percentage - * values are not supported. - *
Default value: **0**. - *
Maximum effective value: Component width/2 + outlineWidth or component height/2 + outlineWidth. + * @param { Dimension | OutlineRadiuses } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22297,12 +21604,9 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the radius of the outline corners. + * Outline radius * - * @param { Dimension | OutlineRadiuses } value - adius of the outline corners. Percentage - * values are not supported. - *
Default value: **0**. - *
Maximum effective value: Component width/2 + outlineWidth or component height/2 + outlineWidth. + * @param { Dimension | OutlineRadiuses } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22313,15 +21617,9 @@ declare class CommonMethod { outlineRadius(value: Dimension | OutlineRadiuses): T; /** - * Sets the radius of the outline corners. Compared to outlineRadius, this API - * supports the **undefined** type for the **radius** parameter. + * Outline radius * - * @param { Optional } radius - Radius of the outline corners. Percentage - * values are not supported. - *
Default value: **0**. - *
Maximum effective value: Component width/2 + outlineWidth or component height/2 + outlineWidth. - *
If **radius** is **undefined**, the component reverts to its original style with the - * outline corner radius of 0. + * @param { Optional } radius * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22332,22 +21630,20 @@ declare class CommonMethod { outlineRadius(radius: Optional): T; /** - * Sets the foreground color of the component. - * If the component does not have a foreground color set, it inherits the color from its parent component by default. + * Provides the general foreground color capability of UI components, and assigns color values + * according to the characteristics of components. * - * @param { ResourceColor | ColoringStrategy } value - Foreground color. - *
The value can be a specific color or a coloring strategy. Property animations are supported. + * @param { ResourceColor | ColoringStrategy } value - indicates the color or color selection strategy * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the foreground color of the component. - * If the component does not have a foreground color set, it inherits the color from its parent component by default. + * Provides the general foreground color capability of UI components, and assigns color values + * according to the characteristics of components. * - * @param { ResourceColor | ColoringStrategy } value - Foreground color. - *
The value can be a specific color or a coloring strategy. Property animations are supported. + * @param { ResourceColor | ColoringStrategy } value - indicates the color or color selection strategy * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22357,13 +21653,10 @@ declare class CommonMethod { foregroundColor(value: ResourceColor | ColoringStrategy): T; /** - * Sets the foreground color of the component. - * If the component does not have a foreground color set, it inherits the color from its parent component by default. - * Compared to {@link foregroundColor}, this API supports the **undefined** type for the **color** parameter. + * Provides the general foreground color capability of UI components, and assigns color values + * according to the characteristics of components. * - * @param { Optional } color -Foreground color. - *
The value can be a specific color or a coloring strategy. Property animations are supported. - *
If **color** is set to **undefined**, the previous value is retained. + * @param { Optional } color - indicates the color or color selection strategy * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22400,13 +21693,8 @@ declare class CommonMethod { * @since 10 */ /** - * Called when a click event occurs. + * Trigger a click event when a click is clicked. * - *

NOTE: - *
Since API version 9, 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. - *

* @param { function } event * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -22418,17 +21706,10 @@ declare class CommonMethod { 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: - *
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. - *

* @param { function } event - this function callback executed when the click action is recognized * @param { number } distanceThreshold - the distance threshold of finger's movement when detecting a click action - * @default (2^31-1)vp * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22485,7 +21766,7 @@ declare class CommonMethod { /** * prompt for current component and descendants unable to handle accessibility hover event * - * @param { AccessibilityTransparentCallback } callback - A callback instance used when current component and + * @param { AccessibilityTransparentCallback } callback - A callback instance used when current component and * descendants not handled accessibility hover event * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -22494,7 +21775,7 @@ declare class CommonMethod { * @since 20 */ onAccessibilityHoverTransparent(callback: AccessibilityTransparentCallback): T; - + /** * Set hover effect. * @@ -22515,7 +21796,7 @@ declare class CommonMethod { /** * Set hover effect. * - * @param { HoverEffect } value - Hover effect of the component in hover state. + * @param { HoverEffect } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22533,7 +21814,7 @@ declare class CommonMethod { * @since 8 */ /** - * Triggered when the component is clicked by a mouse button or the mouse pointer moves on the component. + * Trigger a mouse event. * * @param { function } event * @returns { T } @@ -22561,7 +21842,7 @@ declare class CommonMethod { * @since 10 */ /** - * Invoked when a touch event is triggered. + * Trigger a touch event when touched. * * @param { function } event * @returns { T } @@ -22604,7 +21885,7 @@ declare class CommonMethod { /** * Keyboard input * - * @param { Callback } event - Callback for handling the key event. + * @param { Callback } event * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22627,7 +21908,7 @@ declare class CommonMethod { /** * Handle keyboard events before input method events. * - * @param { Callback } event - Callback for handling the key event. + * @param { Callback } event * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22689,10 +21970,7 @@ declare class CommonMethod { */ /** * Set focusable. - * 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 @@ -22725,7 +22003,7 @@ declare class CommonMethod { * @since 14 */ tabStop(isTabStop: boolean): T; - + /** * Trigger a event when got focus. * @@ -22756,7 +22034,7 @@ declare class CommonMethod { onFocus(event: () => void): T; /** - * Triggered when the current component loses focus. + * Trigger a event when lose focus. * * @param { function } event * @returns { T } @@ -22764,7 +22042,7 @@ declare class CommonMethod { * @since 8 */ /** - * Triggered when the current component loses focus. + * Trigger a event when lose focus. * * @param { function } event * @returns { T } @@ -22773,7 +22051,7 @@ declare class CommonMethod { * @since 10 */ /** - * Triggered when the current component loses focus. + * Trigger a event when lose focus. * * @param { function } event * @returns { T } @@ -22803,7 +22081,7 @@ declare class CommonMethod { */ /** * Set focus index by key tab. - * The tabIndex and focusScopeId cannot be used together. + * * @param { number } index * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -22833,7 +22111,7 @@ declare class CommonMethod { /** * Set default focused component when a page create. * - * @param { boolean } value - True means to set the component as the default focus, and the value false has no effect. + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22862,8 +22140,7 @@ declare class CommonMethod { /** * Set default focused component when focus on a focus group. * - * @param { boolean } value - True means the component is the default focus of the parent container, and - * false means the component is not the default focus of the parent container. + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22892,7 +22169,7 @@ declare class CommonMethod { /** * Set a component focused when the component be touched. * - * @param { boolean } value - True means the component is focusable on touch, false means the component is not focusable on touch. + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22904,7 +22181,7 @@ declare class CommonMethod { /** * Set the component's focusBox style. * - * @param { FocusBoxStyle } style - Component's focusBox style. + * @param { FocusBoxStyle } style * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -22914,44 +22191,44 @@ declare class CommonMethod { focusBox(style: FocusBoxStyle): T; /** - * Set container as a focus group with a specific identifier. - * - * @param { string } id - focus scope identifier. - * @param { boolean } [isGroup] - whether this scope is a focus group, the default value is false - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - focusScopeId(id: string, isGroup?: boolean): T; + * Set container as a focus group with a specific identifier. + * + * @param { string } id - focus scope identifier. + * @param { boolean } [isGroup] - whether this scope is a focus group, the default value is false + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + focusScopeId(id: string, isGroup?: boolean): T; /** - * Set container as a focus group with a specific identifier. - * - * @param { string } id - focus scope identifier. - * @param { boolean } [isGroup] - whether this scope is a focus group, the default value is false. - * @param { boolean } [arrowStepOut] - whether the arrow keys can move focus from inside the focus group to outside, - * only effective when isGroup is true, the default value is true. - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - focusScopeId(id: string, isGroup?: boolean, arrowStepOut?: boolean): T; + * Set container as a focus group with a specific identifier. + * + * @param { string } id - focus scope identifier. + * @param { boolean } [isGroup] - whether this scope is a focus group, the default value is false. + * @param { boolean } [arrowStepOut] - whether the arrow keys can move focus from inside the focus group to outside, + * only effective when isGroup is true, the default value is true. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + focusScopeId(id: string, isGroup?: boolean, arrowStepOut?: boolean): T; /** - * Set the focus priority of component in a specific focus scope. - * - * @param { string } scopeId - * @param { FocusPriority } [priority] - the default value is AUTO - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - focusScopePriority(scopeId: string, priority?: FocusPriority): T; + * Set the focus priority of component in a specific focus scope. + * + * @param { string } scopeId + * @param { FocusPriority } [priority] - the default value is AUTO + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + focusScopePriority(scopeId: string, priority?: FocusPriority): T; /** * animation @@ -22994,27 +22271,24 @@ declare class CommonMethod { animation(value: AnimateParam): T; /** - * Transition effects for when the component is inserted to show and removed to hide - * as well as the callback for the end of the transition animation. + * Transition parameter * - * @param { TransitionOptions | TransitionEffect } value - transition options or transition effect + * @param { TransitionOptions | TransitionEffect } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Transition effects for when the component is inserted to show and removed to hide - * as well as the callback for the end of the transition animation. + * Transition parameter * - * @param { TransitionOptions | TransitionEffect } value - transition options or transition effect + * @param { TransitionOptions | TransitionEffect } value - transition options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Transition effects for when the component is inserted to show and removed to hide - * as well as the callback for the end of the transition animation. + * Transition parameter * * @param { TransitionOptions | TransitionEffect } value - transition options or transition effect * @returns { T } @@ -23024,8 +22298,7 @@ declare class CommonMethod { * @since 10 */ /** - * Transition effects for when the component is inserted to show and removed to hide - * as well as the callback for the end of the transition animation. + * Transition parameter * * @param { TransitionOptions | TransitionEffect } value - transition options or transition effect * @returns { T } @@ -23171,7 +22444,7 @@ 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 { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -23182,7 +22455,7 @@ 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 { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23252,7 +22525,7 @@ declare class CommonMethod { linearGradientBlur(value: number, options: LinearGradientBlurOptions): T; /** - * Applies a linear gradient foreground blur effect to the component. + * Adds the content linear gradient blurring effect for the current component. The input parameter is the blurring radius. * * @param { Optional } blurRadius - 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. @@ -23265,21 +22538,9 @@ declare class CommonMethod { linearGradientBlur(blurRadius: Optional, options: Optional): T; /** - * Apply a motion blur effect to the component being scaled or moved. - * 1.Do not use this API in intra-component transitions, shared element transitions, - * implicit element transitions, or particle animations. Doing so may cause unexpected results. - * 2.The **radius** parameter of **motionBlur** must be set to **0** for the initial state. - * Otherwise, there may be unexpected results during a cold start. - * 3.This API must be used together with the **onFinish** parameter of **AnimateParam**. - * Its **radius** parameter must be set to **0** when the animation ends; otherwise, there may be unexpected results. - * 4.When using this API, do not frequently change the blur radius of the same component; - * otherwise, there may be unexpected results. - * For example, if you frequently click the image in the example, the blur effect may not work sometimes. - * 5.To avoid unexpected results, make sure the coordinates of - * the motion blur anchor point are the same as those of the animation scaling anchor point. - * 6.To avoid unexpected results, set the blur radius to a value less than 1. - * - * @param { MotionBlurOptions } value - Motion blur options. + * Component motion blur interface. + * + * @param { MotionBlurOptions } value - the attributes of motion blur. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23301,47 +22562,32 @@ declare class CommonMethod { motionBlur(motionBlur: Optional):T; /** - * Applies a brightness effect to the component. + * Adds a highlight effect to the current component. + * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. + * The component is displayed as all white (percentage). * - * @param { number } value - Brightness of the component. The value **1** indicates no effects. - * The value **0** indicates the complete darkness. If the value is less than **1**, the brightness - * decreases. If the value is greater than **1**, the brightness increases. A larger value indicates - * a higher brightness. A brightness of 2 turns the component completely white. - *
Default value: **1.0**
Recommended value range: [0, 2]. - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. - *
**Widget capability**: This API can be used in ArkTS widgets since API version 9. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Applies a brightness effect to the component. + * Adds a highlight effect to the current component. + * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. + * The component is displayed as all white (percentage). * - * @param { number } value - Brightness of the component. The value **1** indicates no effects. - * The value **0** indicates the complete darkness. If the value is less than **1**, the brightness - * decreases. If the value is greater than **1**, the brightness increases. A larger value indicates - * a higher brightness. A brightness of 2 turns the component completely white. - *
Default value: **1.0**
Recommended value range: [0, 2]. - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. - *
**Widget capability**: This API can be used in ArkTS widgets since API version 9. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Applies a brightness effect to the component. + * Adds a highlight effect to the current component. + * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. + * The component is displayed as all white (percentage). * - * @param { number } value - Brightness of the component. The value **1** indicates no effects. - * The value **0** indicates the complete darkness. If the value is less than **1**, the brightness - * decreases. If the value is greater than **1**, the brightness increases. A larger value indicates - * a higher brightness. A brightness of 2 turns the component completely white. - *
Default value: **1.0**
Recommended value range: [0, 2]. - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. - *
**Widget capability**: This API can be used in ArkTS widgets since API version 9. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23349,16 +22595,11 @@ declare class CommonMethod { * @since 10 */ /** - * Applies a brightness effect to the component. + * Adds a highlight effect to the current component. + * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. + * The component is displayed as all white (percentage). * - * @param { number } value - Brightness of the component. The value **1** indicates no effects. - * The value **0** indicates the complete darkness. If the value is less than **1**, the brightness - * decreases. If the value is greater than **1**, the brightness increases. A larger value indicates - * a higher brightness. A brightness of 2 turns the component completely white. - *
Default value: **1.0**
Recommended value range: [0, 2]. - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. - *
**Widget capability**: This API can be used in ArkTS widgets since API version 9. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23369,19 +22610,11 @@ declare class CommonMethod { brightness(value: number): T; /** - * Applies a brightness effect to the component. Compared to brightness, this - * API supports the **undefined** type for the **brightness** parameter. + * Adds a highlight effect to the current component. + * The input parameter is the highlight proportion. 0 indicates no highlight effect, and 1 indicates the maximum highlight proportion. + * The component is displayed as all white (percentage). * - * @param { Optional } brightness - Brightness of the component. The value **1** indicates - * no effects. The value **0** indicates the complete darkness. If the value is less than **1**, - * the brightness decreases. If the value is greater than **1**, the brightness increases. A larger - * value indicates a higher brightness. A brightness of 2 turns the component completely white. - *
Default value: **1.0**. - *
Recommended value range: [0, 2]. - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. - *
**Widget capability**: This API can be used in ArkTS widgets since API version 16. - *
If **brightness** is **undefined**, the brightness level is reset to **0**. + * @param { Optional } brightness * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23392,50 +22625,29 @@ declare class CommonMethod { brightness(brightness: Optional): T; /** - * Applies a contrast effect to the component. + * Adds a contrast effect to the current component. The input parameter is the contrast value. + * A larger contrast value indicates a sharper image. When the contrast value is 0, the image becomes gray. (%) * - * @param { number } value - Contrast of the component. The input parameter is a - * contrast value. If the value is **1**, the source image is displayed. If the - * value is greater than 1, a larger value indicates a higher contrast and a clearer - * image. If the value is less than 1, a smaller value indicates a lower contrast is. - * If the value is **0**, the image becomes all gray. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 10). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Applies a contrast effect to the component. + * Adds a contrast effect to the current component. The input parameter is the contrast value. + * A larger contrast value indicates a sharper image. When the contrast value is 0, the image becomes gray. (%) * - * @param { number } value - Contrast of the component. The input parameter is a - * contrast value. If the value is **1**, the source image is displayed. If the - * value is greater than 1, a larger value indicates a higher contrast and a clearer - * image. If the value is less than 1, a smaller value indicates a lower contrast is. - * If the value is **0**, the image becomes all gray. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 10). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Applies a contrast effect to the component. + * Adds a contrast effect to the current component. The input parameter is the contrast value. + * A larger contrast value indicates a sharper image. When the contrast value is 0, the image becomes gray. (%) * - * @param { number } value - Contrast of the component. The input parameter is a - * contrast value. If the value is **1**, the source image is displayed. If the - * value is greater than 1, a larger value indicates a higher contrast and a clearer - * image. If the value is less than 1, a smaller value indicates a lower contrast is. - * If the value is **0**, the image becomes all gray. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 10). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23443,17 +22655,10 @@ declare class CommonMethod { * @since 10 */ /** - * Applies a contrast effect to the component. + * Adds a contrast effect to the current component. The input parameter is the contrast value. + * A larger contrast value indicates a sharper image. When the contrast value is 0, the image becomes gray. (%) * - * @param { number } value - Contrast of the component. The input parameter is a - * contrast value. If the value is **1**, the source image is displayed. If the - * value is greater than 1, a larger value indicates a higher contrast and a clearer - * image. If the value is less than 1, a smaller value indicates a lower contrast is. - * If the value is **0**, the image becomes all gray. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 10). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23464,19 +22669,10 @@ declare class CommonMethod { contrast(value: number): T; /** - * Applies a contrast effect to the component. Compared to contrast, - * this API supports the **undefined** type for the **contrast** parameter. + * Adds a contrast effect to the current component. The input parameter is the contrast value. + * A larger contrast value indicates a sharper image. When the contrast value is 0, the image becomes gray. (%) * - * @param { Optional } contrast - Contrast of the component. The input parameter - * is a contrast value. If the value is **1**, the source image is displayed. If the value - * is greater than 1, a larger value indicates a higher contrast and a clearer image. If the - * value is less than 1, a smaller value indicates a lower contrast is. If the value is **0**, - * the image becomes all gray. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 10). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. - *
If **contrast** is **undefined**, the contrast effect is reset to **1.0**. + * @param { Optional } contrast * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23487,53 +22683,32 @@ declare class CommonMethod { contrast(contrast: Optional): T; /** - * Applies a grayscale effect to the component. - * - * @param { number } value - Grayscale conversion ratio of the component. - *
If the value is **1.0**, the component is completely converted to grayscale. - *
If the value is **0.0**, the component remains unchanged. Between **0** and **1**, - * the value applies a linear multiplier on the grayscale effect. The unit is percentage. - *
Default value: **0.0**. - *
Value range: [0.0, 1.0]. - *

**NOTE**: - *
A value less than **0.0** evaluates to the value **0.0**. - *
A value greater than **1.0** evaluates to the value **1.0**. - *

+ * Adds a grayscale effect to the current component. + * The value is the gray scale conversion ratio. If the input parameter is 1.0, the gray scale image is completely converted to the gray scale image. If the input parameter is 0.0, the image does not change. + * If the input parameter is between 0.0 and 1.0, the effect changes. (Percentage) + * + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Applies a grayscale effect to the component. - * - * @param { number } value - Grayscale conversion ratio of the component. - *
If the value is **1.0**, the component is completely converted to grayscale. - *
If the value is **0.0**, the component remains unchanged. Between **0** and **1**, - * the value applies a linear multiplier on the grayscale effect. The unit is percentage. - *
Default value: **0.0**. - *
Value range: [0.0, 1.0]. - *

**NOTE**: - *
A value less than **0.0** evaluates to the value **0.0**. - *
A value greater than **1.0** evaluates to the value **1.0**. - *

+ * Adds a grayscale effect to the current component. + * The value is the gray scale conversion ratio. If the input parameter is 1.0, the gray scale image is completely converted to the gray scale image. If the input parameter is 0.0, the image does not change. + * If the input parameter is between 0.0 and 1.0, the effect changes. (Percentage) + * + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Applies a grayscale effect to the component. - * - * @param { number } value - Grayscale conversion ratio of the component. - *
If the value is **1.0**, the component is completely converted to grayscale. - *
If the value is **0.0**, the component remains unchanged. Between **0** and **1**, - * the value applies a linear multiplier on the grayscale effect. The unit is percentage. - *
Default value: **0.0**. - *
Value range: [0.0, 1.0]. - *

**NOTE**: - *
A value less than **0.0** evaluates to the value **0.0**. - *
A value greater than **1.0** evaluates to the value **1.0**. - *

+ * Adds a grayscale effect to the current component. + * The value is the gray scale conversion ratio. If the input parameter is 1.0, the gray scale image is completely converted to the gray scale image. If the input parameter is 0.0, the image does not change. + * If the input parameter is between 0.0 and 1.0, the effect changes. (Percentage) + * + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23541,18 +22716,11 @@ declare class CommonMethod { * @since 10 */ /** - * Applies a grayscale effect to the component. - * - * @param { number } value - Grayscale conversion ratio of the component. - *
If the value is **1.0**, the component is completely converted to grayscale. - *
If the value is **0.0**, the component remains unchanged. Between **0** and **1**, - *
the value applies a linear multiplier on the grayscale effect. The unit is percentage. - *
Default value: **0.0**. - *
Value range: [0.0, 1.0]. - *

**NOTE**: - *
A value less than **0.0** evaluates to the value **0.0**. - *
A value greater than **1.0** evaluates to the value **1.0**. - *

+ * Adds a grayscale effect to the current component. + * The value is the gray scale conversion ratio. If the input parameter is 1.0, the gray scale image is completely converted to the gray scale image. If the input parameter is 0.0, the image does not change. + * If the input parameter is between 0.0 and 1.0, the effect changes. (Percentage) + * + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23563,19 +22731,11 @@ declare class CommonMethod { grayscale(value: number): T; /** - * Applies a grayscale effect to the component. - * Compared to grayscale, this API supports the **undefined** type for the **grayscale** parameter. + * Adds a grayscale effect to the current component. + * The value is the gray scale conversion ratio. If the input parameter is 1.0, the gray scale image is completely converted to the gray scale image. If the input parameter is 0.0, the image does not change. + * If the input parameter is between 0.0 and 1.0, the effect changes. (Percentage) * - * @param { Optional } grayscale - Grayscale conversion ratio of the component. - *
If the value is **1.0**, the component is completely converted to grayscale. - *
If the value is **0.0**, the component remains unchanged. Between **0** and **1**, - *
the value applies a linear multiplier on the grayscale effect. The unit is percentage. - *
Default value: **0.0**. - *
Value range: [0.0, 1.0]. - *

**NOTE** - *
A value less than **0.0** evaluates to the value **0.0**. - *
A value greater than **1.0** evaluates to the value **1.0**. - *

+ * @param { Optional } grayscale * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23586,26 +22746,26 @@ declare class CommonMethod { grayscale(grayscale: Optional): T; /** - * Applies a color blend effect to the component. + * Adds a color overlay effect for the current component. The input parameter is the superimposed color. * - * @param { Color | string | Resource } value - Color to blend with the component. + * @param { Color | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Applies a color blend effect to the component. + * Adds a color overlay effect for the current component. The input parameter is the superimposed color. * - * @param { Color | string | Resource } value - Color to blend with the component. + * @param { Color | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Applies a color blend effect to the component. + * Adds a color overlay effect for the current component. The input parameter is the superimposed color. * - * @param { Color | string | Resource } value - Color to blend with the component. + * @param { Color | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23613,9 +22773,9 @@ declare class CommonMethod { * @since 10 */ /** - * Applies a color blend effect to the component. + * Adds a color overlay effect for the current component. The input parameter is the superimposed color. * - * @param { Color | string | Resource } value - Color to blend with the component. + * @param { Color | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23626,11 +22786,9 @@ declare class CommonMethod { colorBlend(value: Color | string | Resource): T; /** - * Applies a color blend effect to the component. - * Compared to {@link colorBlend}, this API supports the **undefined** type for the **color** parameter. + * Adds a color overlay effect for the current component. The input parameter is the superimposed color. * - * @param { Optional } color - Color to blend with the component. - *
If **color** is **undefined**, the component reverts to its original effect with no color blending. + * @param { Optional } color * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23641,50 +22799,35 @@ declare class CommonMethod { colorBlend(color: Optional): T; /** - * Applies a saturation effect to the component. + * Adds a saturation effect to the current component. + * The saturation is the ratio of the color-containing component to the achromatic component (gray). + * The larger the color-containing component, the greater the saturation. + * The larger the achromatic component, the smaller the saturation. (Percentage) * - * @param { number } value - Saturation of the component. The saturation is the ratio of the - * chromatic component to the achromatic component (gray) in a color. If the value is **1**, - * the original image is displayed. If the value is greater than **1**, a higher percentage of - * the chromatic component indicates a higher saturation. If the value is less than **1**, a higher - * percentage of the achromatic component indicates a lower saturation. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 50). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Applies a saturation effect to the component. + * Adds a saturation effect to the current component. + * The saturation is the ratio of the color-containing component to the achromatic component (gray). + * The larger the color-containing component, the greater the saturation. + * The larger the achromatic component, the smaller the saturation. (Percentage) * - * @param { number } value - Saturation of the component. The saturation is the ratio of the - * chromatic component to the achromatic component (gray) in a color. If the value is **1**, - * the original image is displayed. If the value is greater than **1**, a higher percentage of - * the chromatic component indicates a higher saturation. If the value is less than **1**, a higher - * percentage of the achromatic component indicates a lower saturation. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 50). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Applies a saturation effect to the component. + * Adds a saturation effect to the current component. + * The saturation is the ratio of the color-containing component to the achromatic component (gray). + * The larger the color-containing component, the greater the saturation. + * The larger the achromatic component, the smaller the saturation. (Percentage) * - * @param { number } value - Saturation of the component. The saturation is the ratio of the - * chromatic component to the achromatic component (gray) in a color. If the value is **1**, - * the original image is displayed. If the value is greater than **1**, a higher percentage of - * the chromatic component indicates a higher saturation. If the value is less than **1**, a higher - * percentage of the achromatic component indicates a lower saturation. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 50). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23692,17 +22835,12 @@ declare class CommonMethod { * @since 10 */ /** - * Applies a saturation effect to the component. + * Adds a saturation effect to the current component. + * The saturation is the ratio of the color-containing component to the achromatic component (gray). + * The larger the color-containing component, the greater the saturation. + * The larger the achromatic component, the smaller the saturation. (Percentage) * - * @param { number } value - Saturation of the component. The saturation is the ratio of the - * chromatic component to the achromatic component (gray) in a color. If the value is **1**, - * the original image is displayed. If the value is greater than **1**, a higher percentage of - * the chromatic component indicates a higher saturation. If the value is less than **1**, a higher - * percentage of the achromatic component indicates a lower saturation. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 50). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23713,19 +22851,12 @@ declare class CommonMethod { saturate(value: number): T; /** - * Applies a saturation effect to the component. Compared to saturate, this API supports - * the **undefined** type for the **saturate** parameter. + * Adds a saturation effect to the current component. + * The saturation is the ratio of the color-containing component to the achromatic component (gray). + * The larger the color-containing component, the greater the saturation. + * The larger the achromatic component, the smaller the saturation. (Percentage) * - * @param { Optional } saturate - Saturation of the component. The saturation is the ratio of - * the chromatic component to the achromatic component (gray) in a color. If the value is **1**, the - * original image is displayed. If the value is greater than **1**, a higher percentage of the chromatic - * component indicates a higher saturation. If the value is less than **1**, a higher percentage of the - * achromatic component indicates a lower saturation. The unit is percentage. - *
Default value: **1.0**. - *
Recommended value range: [0, 50). - *
**NOTE** - *
A value less than 0 evaluates to the value **0**. - *
If **saturate** is **undefined**, the saturation effect is reset to **1.0**. + * @param { Optional } saturate * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23736,32 +22867,29 @@ declare class CommonMethod { saturate(saturate: Optional): T; /** - * Sepia conversion ratio of the component. + * Converts the image to sepia. Value defines the scale of the conversion. + * A value of 1 is completely sepia, and a value of 0 does not change the image. (Percentage) * - * @param { number } value - Sepia conversion ratio of the component. If the value is **1**, the image - * is completely sepia. If the value is **0**, the component remains unchanged. The unit is percentage. - *
Value range: [0, +∞). + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sepia conversion ratio of the component. + * Converts the image to sepia. Value defines the scale of the conversion. + * A value of 1 is completely sepia, and a value of 0 does not change the image. (Percentage) * - * @param { number } value - Sepia conversion ratio of the component. If the value is **1**, the image - * is completely sepia. If the value is **0**, the component remains unchanged. The unit is percentage. - *
Value range: [0, +∞). + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sepia conversion ratio of the component. + * Converts the image to sepia. Value defines the scale of the conversion. + * A value of 1 is completely sepia, and a value of 0 does not change the image. (Percentage) * - * @param { number } value - Sepia conversion ratio of the component. If the value is **1**, the image - * is completely sepia. If the value is **0**, the component remains unchanged. The unit is percentage. - *
Value range: [0, +∞). + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23769,11 +22897,10 @@ declare class CommonMethod { * @since 10 */ /** - * Sepia conversion ratio of the component. + * Converts the image to sepia. Value defines the scale of the conversion. + * A value of 1 is completely sepia, and a value of 0 does not change the image. (Percentage) * - * @param { number } value - Sepia conversion ratio of the component. If the value is **1**, the image - * is completely sepia. If the value is **0**, the component remains unchanged. The unit is percentage. - *
Value range: [0, +∞). + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23784,13 +22911,10 @@ declare class CommonMethod { sepia(value: number): T; /** - * Sepia conversion ratio of the component. Compared to sepia, - * this API supports the **undefined** type for the **sepia** parameter. + * Converts the image to sepia. Value defines the scale of the conversion. + * A value of 1 is completely sepia, and a value of 0 does not change the image. (Percentage) * - * @param { Optional } sepia - Sepia conversion ratio of the component. If the value is **1**, the - * image is completely sepia. If the value is **0**, the component remains unchanged. The unit is percentage. - *
If **sepia** is **undefined**, the component reverts to its original effect. - *
Value range: [0, +∞). + * @param { Optional } sepia * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23845,20 +22969,10 @@ declare class CommonMethod { invert(value: number | InvertOptions): T; /** - * Inverts the image. Compared to invert, - * this API supports the **undefined** type for the **options** parameter. + * Invert the input image. Value defines the scale of the conversion. 100% of the value is a complete reversal. + * A value of 0% does not change the image. (Percentage) * - * @param { Optional } options - How the image is inverted. - *
If the value is of the number type, - *
it indicates the inversion ratio. If the value is **1**, - *
the image is completely inverted. If the value is **0**, the image remains unchanged. - *
The unit is percentage.
Value range: [0, 1]
A value less than 0 evaluates to the value **0**. - *
If the value is of the InvertOptions type, the grayscale value of the background color is compared - *
with the threshold range. If the grayscale value is greater than the upper bound of the threshold range, - *
the **high** value is used. If the grayscale value is less than the lower bound of the threshold range, - *
the **low** value is used. If the grayscale value is within the threshold range, - *
the background color changes linearly from high to low.
If **options** is **undefined**, - *
the component reverts to its original effect. + * @param { Optional } options - value indicates the scale of the conversion or the options of invert. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23869,7 +22983,7 @@ declare class CommonMethod { invert(options: Optional): T; /** - * Applies a system bar effect to the component, which means to invert colors based on the background and add a blur. + * Sets system bar effect to the component. * * @returns { T } return the component attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -23879,35 +22993,32 @@ declare class CommonMethod { systemBarEffect(): T; /** - * Rotates the hue of the component. + * Adds the hue rotation effect to the current component. + * The input parameter is the rotation angle. When the input parameter is 0deg, the image does not change (the default value is 0deg), and the input parameter does not have a maximum value. + * If the value exceeds 360deg, the image is circled again. * - * @param { number | string } value - Hue rotation angle of the component. - *
A rotation of 360 degrees leaves the color unchanged. - *
A rotation of 180 degrees and then -180 degrees also leaves the color unchanged. - *
When the data type is number, the value **90** is equivalent to **'90deg'**. + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Rotates the hue of the component. + * Adds the hue rotation effect to the current component. + * The input parameter is the rotation angle. When the input parameter is 0deg, the image does not change (the default value is 0deg), and the input parameter does not have a maximum value. + * If the value exceeds 360deg, the image is circled again. * - * @param { number | string } value - Hue rotation angle of the component. - *
A rotation of 360 degrees leaves the color unchanged. - *
A rotation of 180 degrees and then -180 degrees also leaves the color unchanged. - *
When the data type is number, the value **90** is equivalent to **'90deg'**. + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Rotates the hue of the component. + * Adds the hue rotation effect to the current component. + * The input parameter is the rotation angle. When the input parameter is 0deg, the image does not change (the default value is 0deg), and the input parameter does not have a maximum value. + * If the value exceeds 360deg, the image is circled again. * - * @param { number | string } value - Hue rotation angle of the component. - *
A rotation of 360 degrees leaves the color unchanged. - *
A rotation of 180 degrees and then -180 degrees also leaves the color unchanged. - *
When the data type is number, the value **90** is equivalent to **'90deg'**. + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23915,12 +23026,11 @@ declare class CommonMethod { * @since 10 */ /** - * Rotates the hue of the component. + * Adds the hue rotation effect to the current component. + * The input parameter is the rotation angle. When the input parameter is 0deg, the image does not change (the default value is 0deg), and the input parameter does not have a maximum value. + * If the value exceeds 360deg, the image is circled again. * - * @param { number | string } value - Hue rotation angle of the component. - *
A rotation of 360 degrees leaves the color unchanged. - *
A rotation of 180 degrees and then -180 degrees also leaves the color unchanged. - *
When the data type is number, the value **90** is equivalent to **'90deg'**. + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23931,8 +23041,9 @@ declare class CommonMethod { hueRotate(value: number | string): T; /** - * Rotates the hue of the component. Compared to hueRotate, - * this API supports the **undefined** type for the **rotation** parameter. + * Adds the hue rotation effect to the current component. + * The input parameter is the rotation angle. When the input parameter is 0deg, the image does not change (the default value is 0deg), and the input parameter does not have a maximum value. + * If the value exceeds 360deg, the image is circled again. * * @param { Optional } rotation * @returns { T } @@ -23945,18 +23056,9 @@ declare class CommonMethod { hueRotate(rotation: Optional): T; /** - * Sets whether to draw shadows of child nodes in the component at the same layer, - * so that the shadows of elements at the same layer overlap. + * Add an attribute to control whether the shadows of the child nodes overlap each other. * - * @param { boolean } value - Whether to draw shadows of child nodes in the component - * at the same layer, so that the shadows of elements at the same layer overlap. - *
Default value: **false**. - *
**NOTE** - *
1. When this feature is disabled (default), if the shadow radius of a child node - * is large, the shadows of the child nodes may overlap. This overlap issue does not occur - * when the feature is enabled. - *
2. Avoid nesting **useShadowBatching**. When used in nested mode, **useShadowBatching** - * takes effect for the current child node only and cannot be recursively used. + * @param { boolean } value - true means the shadows of the child nodes overlap each other effect and drawn in batches. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23964,18 +23066,9 @@ declare class CommonMethod { * @since 11 */ /** - * Sets whether to draw shadows of child nodes in the component at the same layer, - * so that the shadows of elements at the same layer overlap. + * Add an attribute to control whether the shadows of the child nodes overlap each other. * - * @param { boolean } value - Whether to draw shadows of child nodes in the component - * at the same layer, so that the shadows of elements at the same layer overlap. - *
Default value: **false**. - *
**NOTE** - *
1. When this feature is disabled (default), if the shadow radius of a child node - * is large, the shadows of the child nodes may overlap. This overlap issue does not occur - * when the feature is enabled. - *
2. Avoid nesting **useShadowBatching**. When used in nested mode, **useShadowBatching** - * takes effect for the current child node only and cannot be recursively used. + * @param { boolean } value - true means the shadows of the child nodes overlap each other effect and drawn in batches. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23986,21 +23079,9 @@ declare class CommonMethod { useShadowBatching(value: boolean): T; /** - * Sets whether to draw shadows of child nodes in the component at the same layer, - * so that the shadows of elements at the same layer overlap. Compared to - * useShadowBatching11+, this API supports the - * **undefined** type for the **use** parameter. + * Add an attribute to control whether the shadows of the child nodes overlap each other. * - * @param { Optional } use - Whether to draw shadows of child nodes in the - * component at the same layer, so that the shadows of elements at the same layer overlap. - *
Default value: **false**. - *
**NOTE** - *
1. When this feature is disabled (default), if the shadow radius of a child node is large, - * the shadows of the child nodes may overlap. This overlap issue does not occur when the feature - * is enabled.
2. Avoid nesting **useShadowBatching**. When used in nested mode, - * **useShadowBatching** takes effect for the current child node only and cannot be recursively used. - *
If **use** is **undefined**, the component reverts to its original effect of not using - * shadow overlapping. + * @param { Optional } use - true means the shadows of the child nodes overlap each other effect and drawn in batches. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24010,18 +23091,13 @@ declare class CommonMethod { */ useShadowBatching(use: Optional): T; - /** - * Specifies whether to apply the effect defined by the parent - * [EffectComponent](ts-container-effectcomponent-sys.md) or the window. - * - * @param { Optional } useEffect - Whether to apply the effect defined by the parent - * **EffectComponent** or the window. - *
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 - * the parent **EffectComponent** or the window. - *
Default value: **EffectType.DEFAULT**. + /** + * Sets whether the component should apply the effects template defined by the parent effectComponent or window. + * If multiple parent effectComponents are found, the nearest one will be used. + * If no parent effectComponent is found, this method has no effect. + * + * @param { boolean } useEffect - true means the component should apply the effects template defined by the parent effectComponent or window. + * @param { EffectType } effectType - the effect type of the effects template, defined by the parent effectComponent or window. * @returns { T } return the component attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -24030,20 +23106,12 @@ declare class CommonMethod { useEffect(useEffect: boolean, effectType: EffectType): T; /** - * Specifies whether to apply the effect defined by the parent - * EffectComponent or - * the window. Compared to useEffect14+, - * this API supports the **undefined** type for the **useEffect** parameter. - * - * @param { Optional } useEffect - Whether to apply the effect defined by - * the parent **EffectComponent** or the window. - *
The value **true** means to apply the effect defined by the parent - * **EffectComponent** or the window. - *
Default value: **false**. - *
If **useEffect** is set to **undefined**, the previous value is retained. - * @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**. + * Sets whether the component should apply the effects template defined by the parent effectComponent or window. + * If multiple parent effectComponents are found, the nearest one will be used. + * If no parent effectComponent is found, this method has no effect. + * + * @param { Optional } useEffect - true means the component should apply the effects template defined by the parent effectComponent or window. + * @param { EffectType } [effectType] - the effect type of the effects template, defined by the parent effectComponent or window. * @returns { T } return the component attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -24052,12 +23120,11 @@ declare class CommonMethod { useEffect(useEffect: Optional, effectType?: EffectType): T; /** - * Specifies whether to combine the drawing of special effects, such as background blur. + * Sets whether the component should apply the effects template defined by the parent effectComponent. + * If multiple parent effectComponents are found, the nearest one will be used. + * If no parent effectComponent is found, this method has no effect. * - * @param { boolean } value - Whether the component inherits the special effect settings of the - * **EffectComponent** component.
The value **true** means that the component inherits the - * special effect settings of the **EffectComponent** component, and **false** means the opposite. - *
Default value: **false**. + * @param { boolean } value - true means the component should apply the effects template. * @returns { T } return the component attribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -24066,32 +23133,29 @@ declare class CommonMethod { useEffect(value: boolean): T; /** - * Applies a background blur effect to the component. You can customize the blur radius and grayscale parameters. + * 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 { number } value - Background blur effect to apply to the component. - *
The input parameter is the blur radius. The larger the radius is, the more blurred the background is. - *
If the value is **0**, the background is not blurred. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Applies a background blur effect to the component. You can customize the blur radius and grayscale parameters. + * 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 { number } value - Background blur effect to apply to the component. - *
The input parameter is the blur radius. The larger the radius is, the more blurred the background is. - *
If the value is **0**, the background is not blurred. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Applies a background blur effect to the component. You can customize the blur radius and grayscale parameters. + * 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 { number } value - Background blur effect to apply to the component. - *
The input parameter is the blur radius. The larger the radius is, the more blurred the background is. - *
If the value is **0**, the background is not blurred. + * @param { number } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24099,12 +23163,11 @@ declare class CommonMethod { * @since 10 */ /** - * Applies a background blur effect to the component. You can customize the blur radius and grayscale parameters. + * 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 { number } value - Background blur effect to apply to the component. - *
The input parameter is the blur radius. The larger the radius is, the more blurred the background is. - *
If the value is **0**, the background is not blurred. - * @param { BlurOptions } [options] - Grayscale parameters. + * @param { number } value - value indicates radius of backdrop blur. + * @param { BlurOptions } [options] - options indicates the backdrop blur options. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24129,7 +23192,7 @@ 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. * @@ -24146,30 +23209,18 @@ declare class CommonMethod { 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. + * Composite the contents of this view and its children into an offscreen cache before display in the screen. * - * @param { boolean } value - Whether the component and its child components are rendered - * off the screen as a whole before being blended with its parent. If the opacity of the - * component is not 1, the drawing effect may vary depending on the value. - *
Default value: **false**. - *
The value **true** means the component and its child components are rendered off - * the screen as a whole, and **false** means the opposite. + * @param { boolean } value - if this view and its children need to composite into an offscreen cache. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets whether the component and its child components are rendered off - * the screen as a whole before being blended with its parent. + * Composite the contents of this view and its children into an offscreen cache before display in the screen. * - * @param { boolean } value - Whether the component and its child components are rendered - * off the screen as a whole before being blended with its parent. If the opacity of the - * component is not 1, the drawing effect may vary depending on the value. - *
Default value: **false**. - *
The value **true** means the component and its child components are rendered off - * the screen as a whole, and **false** means the opposite. + * @param { boolean } value - if this view and its children need to composite into an offscreen cache. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24177,15 +23228,9 @@ declare class CommonMethod { * @since 11 */ /** - * Sets whether the component and its child components are rendered off - * the screen as a whole before being blended with its parent. + * Composite the contents of this view and its children into an offscreen cache before display in the screen. * - * @param { boolean } value - Whether the component and its child components are rendered - * off the screen as a whole before being blended with its parent. If the opacity of the - * component is not 1, the drawing effect may vary depending on the value. - *
Default value: **false**. - *
The value **true** means the component and its child components are rendered off - * the screen as a whole, and **false** means the opposite. + * @param { boolean } value - if this view and its children need to composite into an offscreen cache. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24196,16 +23241,9 @@ declare class CommonMethod { renderGroup(value: boolean): T; /** - * Sets whether the component and its child components are rendered off the screen as a whole - * before being blended with its parent. Compared to renderGroup10+, - * this API supports the **undefined** type for the **isGroup** parameter. + * Composite the contents of this view and its children into an offscreen cache before display in the screen. * - * @param { Optional } isGroup - Whether the component and its child components are rendered - * off the screen as a whole before being blended with its parent. If the opacity of the component is - * not 1, the drawing effect may vary depending on the value. - *
Default value: **false**. - *
If **isGroup** is **undefined**, the component reverts to its original effect of not enabling - * offscreen rendering as a whole before blending with the parent component. + * @param { Optional } isGroup - if this view and its children need to composite into an offscreen cache. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24216,15 +23254,10 @@ declare class CommonMethod { renderGroup(isGroup: Optional): T; /** - * Sets whether to freeze the component. When frozen, the component and its children are cached for - * repeated drawing after offscreen rendering, without updating internal attributes. + * Sets whether the component should remain stationary, reusing the results of the current frame's off-screen rendering. + * If the input parameter is true, the component and subcomponent changes do not affect the display. * - * @param { boolean } value - Whether to freeze the component. When frozen, the component and its children - * are cached for repeated drawing after offscreen rendering, without updating internal attributes. If the - * opacity of the component is not 1, the drawing effect may vary depending on the value. - *
Default value: **false**. - *
**true**: Freeze the component. - *
**false**: Do not freeze the component. + * @param { boolean } value - true means the component should remain stationary. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -24233,17 +23266,10 @@ declare class CommonMethod { freeze(value: boolean): T; /** - * Sets whether to freeze the component. When frozen, the component and its children are cached for repeated - * drawing after offscreen rendering, without updating internal attributes. Compared to freeze, - * this API supports the **undefined** type for the **freeze** parameter. + * Sets whether the component should remain stationary, reusing the results of the current frame's off-screen rendering. + * If the input parameter is true, the component and subcomponent changes do not affect the display. * - * @param { Optional } freeze - Whether to freeze the component. When frozen, the component and its - * children are cached for repeated drawing after offscreen rendering, without updating internal attributes. - * If the opacity of the component is not 1, the drawing effect may vary depending on the value. - *
Default value: **false**. - *
**true**: Freeze the component. - *
**false**: Do not freeze the component. - *
If **freeze** is set to **undefined**, the previous value is retained. + * @param { Optional } freeze - true means the component should remain stationary. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -24252,29 +23278,32 @@ declare class CommonMethod { freeze(freeze: Optional): T; /** - * Sets the translation effect for page transitions. + * Sets the translation effect during page transition. + * The value is the start point of entry and end point of exit. + * When this parameter is set together with slide, slide takes effect by default. * - * @param { TranslateOptions } value - Translation effect for page transitions - *
specifying the start value for entrance and the end value for exit. default:{x:0,y:0,z:0} + * @param { TranslateOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the translation effect for page transitions. + * Sets the translation effect during page transition. + * The value is the start point of entry and end point of exit. + * When this parameter is set together with slide, slide takes effect by default. * - * @param { TranslateOptions } value - Translation effect for page transitions - *
specifying the start value for entrance and the end value for exit. default:{x:0,y:0,z:0} + * @param { TranslateOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the translation effect for page transitions. + * Sets the translation effect during page transition. + * The value is the start point of entry and end point of exit. + * When this parameter is set together with slide, slide takes effect by default. * - * @param { TranslateOptions } value - Translation effect for page transitions - *
specifying the start value for entrance and the end value for exit. default:{x:0,y:0,z:0} + * @param { TranslateOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24282,10 +23311,9 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the translation effect for page transitions. + * Set component translation. * - * @param { TranslateOptions } value - Translation effect for page transitions - *
specifying the start value for entrance and the end value for exit. default:{x:0,y:0,z:0} + * @param { TranslateOptions } value default:{x:0,y:0,z:0} * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24296,14 +23324,9 @@ declare class CommonMethod { translate(value: TranslateOptions): T; /** - * Translates the component. - * Compared to {@link translate}, this API supports the **undefined** type for the **translate** parameter. - + * Set component translation. * - * @param { Optional } translate - How the component is translated in the coordinate - *
system (as shown below) with the upper left corner of the component as the coordinate origin. - *
Values of **x**, **y**, and **z** indicate the translation distance along the respective axis. - *
default:{x:0,y:0,z:0} + * @param { Optional } translate default:{x:0,y:0,z:0} * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24316,9 +23339,7 @@ declare class CommonMethod { /** * Sets the zoom effect during page transition. The value is the start point of entry and end point of exit. * - * @param { ScaleOptions } value - Scale ratio along the x-, y-, and z-axis. The default value is **1**. - *
**centerX** and **centerY** are used to set the scale center point. - *
default:{x:1,y:1,z:1,centerX:'50%',centerY:'50%'} + * @param { ScaleOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -24326,9 +23347,7 @@ declare class CommonMethod { /** * Sets the zoom effect during page transition. The value is the start point of entry and end point of exit. * - * @param { ScaleOptions } value - Scale ratio along the x-, y-, and z-axis. The default value is **1**. - *
**centerX** and **centerY** are used to set the scale center point. - *
default:{x:1,y:1,z:1,centerX:'50%',centerY:'50%'} + * @param { ScaleOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -24337,9 +23356,7 @@ declare class CommonMethod { /** * Sets the zoom effect during page transition. The value is the start point of entry and end point of exit. * - * @param { ScaleOptions } value - Scale ratio along the x-, y-, and z-axis. The default value is **1**. - *
**centerX** and **centerY** are used to set the scale center point. - *
default:{x:1,y:1,z:1,centerX:'50%',centerY:'50%'} + * @param { ScaleOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24347,11 +23364,9 @@ declare class CommonMethod { * @since 10 */ /** - * Scales the component. + * Set component scaling. * - * @param { ScaleOptions } value - Scale ratio along the x-, y-, and z-axis. The default value is **1**. - *
**centerX** and **centerY** are used to set the scale center point. - *
default:{x:1,y:1,z:1,centerX:'50%',centerY:'50%'} + * @param { ScaleOptions } value default:{x:1,y:1,z:1,centerX:'50%',centerY:'50%'} * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24362,13 +23377,9 @@ declare class CommonMethod { scale(value: ScaleOptions): T; /** - * Scales the component. - * Compared to {@link scale} , this API supports the **undefined** type for the **options** parameter. + * Set component scaling. * - * @param { Optional } options - Scale ratio along the x-, y-, and z-axis. - *
The default value is **1**. **centerX** and **centerY** are used to set the scale center point. - *
default:{x:1,y:1,z:1,centerX:'50%',centerY:'50%'} - *
If **options** is **undefined**, the component reverts to its original state with no scaling. + * @param { Optional } options default:{x:1,y:1,z:1,centerX:'50%',centerY:'50%'} * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24487,7 +23498,7 @@ declare class CommonMethod { rotate(value: RotateOptions): T; /** - * Rotates the component. This API supports the **undefined** type for the **options** parameter. + * Set component rotation. * * @param { Optional } options default:{x:0,y:0,z:0,centerX:'50%',centerY:'50%',centerZ:0,perspective:0} * @returns { T } @@ -24512,27 +23523,28 @@ declare class CommonMethod { */ rotate(options: Optional): T; + /** - * Sets the transformation matrix of the component. + * Sets the transformation matrix for the current component. * - * @param { object } value - Transformation matrix of the component. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the transformation matrix of the component. + * Sets the transformation matrix for the current component. * - * @param { object } value - Transformation matrix of the component. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the transformation matrix of the component. + * Sets the transformation matrix for the current component. * - * @param { object } value - Transformation matrix of the component. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24542,11 +23554,9 @@ declare class CommonMethod { transform(value: object): T; /** - * Sets the transformation matrix of the component. - * Compared to {@link transform}, this API supports the **undefined** type for the **transform** parameter. + * Sets the transformation matrix for the current component. * - * @param { Optional } transform - How the component is translated in the coordinate - *
system (as shown below) with the upper left corner of the component as the coordinate origin. + * @param { Optional } transform * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24731,7 +23741,7 @@ declare class CommonMethod { /** * Controls the display or hide of the current component. * - * @param { Visibility } value - Whether the component is visible. + * @param { Visibility } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24769,8 +23779,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the percentage of the parent container's remaining space that is allocated to the component. - * Default value: **0**. + * The percentage of the remaining space of the Flex container allocated to the component on which this property resides. * * @param { number } value * @returns { T } @@ -24810,8 +23819,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the percentage of the parent container's shrink size that is allocated to the component. - * Default value: 0 when the parent container is Column or Row, 1 when the parent container is Flex.. + * The proportion of the Flex container compression size assigned to the component on which this attribute resides. * * @param { number } value * @returns { T } @@ -24851,8 +23859,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the base size of the component in the main axis of the parent container. - * Default value: **'auto'**. + * The base dimension of the assembly on which this attribute is located in the direction of the principal axis in the Flex container. * * @param { number | string } value * @returns { T } @@ -24892,8 +23899,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the alignment mode of the child components along the cross axis of the parent container. - * Default value: **ItemAlign.Auto**. + * Overrides the default configuration of alignItems in the Flex Layout container. * * @param { ItemAlign } value * @returns { T } @@ -24908,7 +23914,7 @@ declare class CommonMethod { /** * Defines the align rules of child component in Stack container. * - * @param { LocalizedAlignment} alignment + * @param { LocalizedAlignment } alignment * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -24946,8 +23952,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the display priority for the component in the layout container. - *
This parameter is only effective in Row, Column, and Flex (single-line) container components. + * Sets the current component and displays the priority in the layout container. This parameter is valid only in Row, Column, and Flex single-row layouts. * * @param { number } value * @returns { T } @@ -25000,47 +24005,29 @@ declare class CommonMethod { zIndex(value: number): T; /** - * If the components of the two pages are configured with the same ID. - * The shared element transition is performed during transition. - * If the parameter is set to an empty string, the shared element transition does not occur. - * For details about the options parameter, see the options parameter description. + * If the components of the two pages are configured with the same ID, the shared element transition is performed during transition. If the parameter is set to an empty string, the shared element transition does not occur. For details about the options parameter, see the options parameter description. * - * @param { string } id - Transition of the shared element. - *
If the same **id** value is configured for a component on the two pages, - *
this component is considered as a shared element of the pages. - *
If the **id** value is an empty string, no transition will be applied to the component. - * @param { sharedTransitionOptions } options - Parameters of the shared element transition animation. + * @param { string } id + * @param { sharedTransitionOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * If the components of the two pages are configured with the same ID. - * The shared element transition is performed during transition. - * If the parameter is set to an empty string, the shared element transition does not occur. - * For details about the options parameter, see the options parameter description. + * If the components of the two pages are configured with the same ID, the shared element transition is performed during transition. If the parameter is set to an empty string, the shared element transition does not occur. For details about the options parameter, see the options parameter description. * - * @param { string } id - Transition of the shared element. - *
If the same **id** value is configured for a component on the two pages, - *
this component is considered as a shared element of the pages. - *
If the **id** value is an empty string, no transition will be applied to the component. - * @param { sharedTransitionOptions } options - Parameters of the shared element transition animation. + * @param { string } id + * @param { sharedTransitionOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * If the components of the two pages are configured with the same ID. - * The shared element transition is performed during transition. - * If the parameter is set to an empty string, the shared element transition does not occur. - * For details about the options parameter, see the options parameter description. + * If the components of the two pages are configured with the same ID, the shared element transition is performed during transition. If the parameter is set to an empty string, the shared element transition does not occur. For details about the options parameter, see the options parameter description. * - * @param { string } id - Transition of the shared element. - *
If the same **id** value is configured for a component on the two pages, - *
this component is considered as a shared element of the pages. - *
If the **id** value is an empty string, no transition will be applied to the component. - * @param { sharedTransitionOptions } options - Parameters of the shared element transition animation. + * @param { string } id + * @param { sharedTransitionOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -25077,8 +24064,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets how elements are laid out along the main axis of the container. - * Default value: **Direction.Auto**. + * Sets the sliding direction. The enumerated value supports logical AND (&) and logical OR (|). * * @param { Direction } value * @returns { T } @@ -25118,8 +24104,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the alignment mode of the component content in the drawing area. - * Default value: **Alignment.Center**. + * align * * @param { Alignment } value * @returns { T } @@ -25131,7 +24116,7 @@ declare class CommonMethod { */ align(value: Alignment): T; - /** + /** * align * * @param { Alignment | LocalizedAlignment } alignment @@ -25196,8 +24181,7 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the absolute position of the component relative to the position of the parent component. - *
The attribute is not available for a layout container whose width and height are zero. + * position * * @param { Position | Edges | LocalizedEdges } value * @returns { T } @@ -25248,8 +24232,7 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the anchor for locating the component, which is used to move the component - * further away from the position specified by position or offset. + * Sets the anchor point of the element when it is positioned. The base point is offset from the top start point of the element. * * @param { Position | LocalizedPosition} value * @returns { T } @@ -25304,9 +24287,8 @@ declare class CommonMethod { * @since 11 */ /** - * Sets the offset of the component relative to its original position. - *
The offset attribute does not affect the layout of the parent container. - * It adjusts the component position only during drawing. + * Coordinate offset relative to the layout completion position. + * Setting this attribute does not affect the layout of the parent container. The position is adjusted only during drawing. * * @param { Position | Edges | LocalizedEdges } value * @returns { T } @@ -25320,7 +24302,7 @@ declare class CommonMethod { /** * If the value is true, the component is available and can respond to operations such as clicking. - * If it is set to false, click operations are not responded. + * If it is set to false, click operations are not responded. * * @param { boolean } value * @returns { T } @@ -25329,7 +24311,7 @@ declare class CommonMethod { */ /** * If the value is true, the component is available and can respond to operations such as clicking. - * If it is set to false, click operations are not responded. + * If it is set to false, click operations are not responded. * * @param { boolean } value * @returns { T } @@ -25339,7 +24321,7 @@ declare class CommonMethod { */ /** * If the value is true, the component is available and can respond to operations such as clicking. - * If it is set to false, click operations are not responded. + * If it is set to false, click operations are not responded. * * @param { boolean } value * @returns { T } @@ -25350,7 +24332,7 @@ declare class CommonMethod { */ /** * If the value is true, the component is available and can respond to operations such as clicking. - * If it is set to false, click operations are not responded. + * If it is set to false, click operations are not responded. * * @param { boolean } value * @returns { T } @@ -25399,8 +24381,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the alignment rules in the relative container. - * This API is valid only when the container is RelativeContainer. + * Specifies the alignRules of relative container * * @param { AlignRuleOption } value * @returns { T } @@ -25413,11 +24394,7 @@ declare class CommonMethod { alignRules(value: AlignRuleOption): T; /** - * Sets the alignment rules in the relative container. - *
This API is valid only when the container is RelativeContainer. - *
This API takes the right-to-left scripts into account, using start and end instead of - * left and right for alignment in the horizontal direction. Prioritize this API in aligning - * child components in the relative container. + * Specifies the localized alignRules of relative container * * @param { LocalizedAlignRuleOptions } alignRule * @returns { T } @@ -25430,11 +24407,7 @@ declare class CommonMethod { alignRules(alignRule: LocalizedAlignRuleOptions): T; /** - * Sets the parameters of the chain in which the component is the head. - *
This parameter has effect only when the parent container is RelativeContainer. - *
The chain head is the first component in the chain that satisfies the chain formation rules. - * In a horizontal layout, it starts from the left (or from the right in a mirrored language - * layout). In a vertical layout, it starts from the top. + * Specifies the direction and style of chain in relative container * * @param { Axis } direction - indicates direction of the chain * @param { ChainStyle } style - indicates style of the chain @@ -25474,12 +24447,7 @@ declare class CommonMethod { * @since 10 */ /** - * Sets the aspect ratio of the component, which can be obtained using the following formula: width/height. - *
If only width and aspectRatio are set, the height is calculated using the following formula: width/aspectRatio. - *
If only height and aspectRatio are set, the width is calculated using the following formula: height x aspectRatio. - *
If width, height, and aspectRatio are all set, the explicitly set height is ignored, and the effective height is - * calculated using the following formula: width/aspectRatio. - *
This parameter takes effect only when a valid value greater than 0 is specified. + * Specifies the aspect ratio of the current component. * * @param { number } value * @returns { T } @@ -25546,9 +24514,6 @@ 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)) - * - * NOTE:
- * The global builder is not supported. * * @param { function } event * @returns { T } @@ -25794,7 +24759,6 @@ declare class CommonMethod { * Enable the selectable area can be dragged. * * @param { boolean } value - true means the area can be dragged, false means the area can't be dragged. - * The default value is false. * @returns { T } property value of type T. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -25921,7 +24885,7 @@ declare class CommonMethod { */ overlay(value: string | CustomBuilder | ComponentContent, options?: OverlayOptions): T; - /** + /** * Config toolbar for current component. * * @param { CustomBuilder } value @@ -25939,7 +24903,7 @@ declare class CommonMethod { * colors: Color description for gradients. * repeating: repeating. The default value is false * - * @param { object } value - Linear gradient. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -25951,7 +24915,7 @@ declare class CommonMethod { * colors: Color description for gradients. * repeating: repeating. The default value is false * - * @param { object } value - Linear gradient. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -25964,7 +24928,7 @@ declare class CommonMethod { * colors: Color description for gradients. * repeating: repeating. The default value is false * - * @param { object } value - Linear gradient. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -25978,7 +24942,7 @@ declare class CommonMethod { * colors: Color description for gradients. * repeating: repeating. The default value is false * - * @param { object } value - Linear gradient. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -25988,12 +24952,9 @@ declare class CommonMethod { */ /** * Linear Gradient - * angle: Angle of Linear Gradient. The default value is 180; - * direction: Direction of Linear Gradient. The default value is GradientDirection.Bottom; - * colors: Color description for gradients. - * repeating: repeating. The default value is false + * angle: Angle of Linear Gradient; direction:Direction of Linear Gradient; colors:Color description for gradients,repeating:repeating. * - * @param { object } value - Linear gradient. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26008,8 +24969,8 @@ declare class CommonMethod { * colors: Color description for gradients. * repeating: repeating. The default value is false * - * @param { object } value - Linear gradient. - *
If **options** is **undefined**, the linear gradient is disabled. + * Anonymous Object Rectification. + * @param { LinearGradientOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26026,8 +24987,7 @@ declare class CommonMethod { * colors: Color description for gradients. * repeating: repeating. The default value is false * - * @param { Optional } options - Linear gradient. - *
If **options** is **undefined**, the linear gradient is disabled. + * @param { Optional } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26038,80 +24998,47 @@ declare class CommonMethod { linearGradient(options: Optional): T; /** - * Creates a sweep gradient. - * - * @param { SweepGradientOptions } value - Sweep gradient, which can sweep around the specified - * center point in the 0–360 degree range. If the rotation angle exceeds the range, a monochrome - * color instead of a gradient will be drawn.
- **center**: center of the sweep gradient, that - * is, the coordinates relative to the upper left corner of the current component. - *
- **start**: start angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **end**: end angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **rotation**: rotation angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- colors: array of color stops, - * each of which consists of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. - *
**NOTE** - *
A value less than 0 is treated as **0**. A value greater than 360 is treated as **360**. - *
When **start**, **end**, or **rotation** is specified with a string, the string must be a number - * or a number followed by one of the following units: deg, rad, grad, and turn. Valid value examples - * are "90", "90deg", and "1.57rad". + * Angle Gradient + * center:is the center point of the angle gradient + * start:Start point of angle gradient. The default value is 0 + * end:End point of angle gradient. The default value is 0 + * number:number + * rotating:rotating. The default value is 0 + * colors:Color description for gradients + * repeating:repeating. The default value is false + * + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Creates a sweep gradient. + * Angle Gradient + * center:is the center point of the angle gradient + * start:Start point of angle gradient. The default value is 0 + * end:End point of angle gradient. The default value is 0 + * number:number + * rotating:rotating. The default value is 0 + * colors:Color description for gradients + * repeating:repeating. The default value is false * - * @param { SweepGradientOptions } value - Sweep gradient, which can sweep around the specified - * center point in the 0–360 degree range. If the rotation angle exceeds the range, a monochrome - * color instead of a gradient will be drawn.
- **center**: center of the sweep gradient, that - * is, the coordinates relative to the upper left corner of the current component. - *
- **start**: start angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **end**: end angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **rotation**: rotation angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- colors: array of color stops, - * each of which consists of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. - *
**NOTE** - *
A value less than 0 is treated as **0**. A value greater than 360 is treated as **360**. - *
When **start**, **end**, or **rotation** is specified with a string, the string must be a number - * or a number followed by one of the following units: deg, rad, grad, and turn. Valid value examples - * are "90", "90deg", and "1.57rad". + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Creates a sweep gradient. + * Angle Gradient + * center:is the center point of the angle gradient + * start:Start point of angle gradient. The default value is 0 + * end:End point of angle gradient. The default value is 0 + * number:number + * rotating:rotating. The default value is 0 + * colors:Color description for gradients + * repeating:repeating. The default value is false * - * @param { SweepGradientOptions } value - Sweep gradient, which can sweep around the specified - * center point in the 0–360 degree range. If the rotation angle exceeds the range, a monochrome - * color instead of a gradient will be drawn.
- **center**: center of the sweep gradient, that - * is, the coordinates relative to the upper left corner of the current component. - *
- **start**: start angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **end**: end angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **rotation**: rotation angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- colors: array of color stops, - * each of which consists of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. - *
**NOTE** - *
A value less than 0 is treated as **0**. A value greater than 360 is treated as **360**. - *
When **start**, **end**, or **rotation** is specified with a string, the string must be a number - * or a number followed by one of the following units: deg, rad, grad, and turn. Valid value examples - * are "90", "90deg", and "1.57rad". + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26119,27 +25046,16 @@ declare class CommonMethod { * @since 10 */ /** - * Creates a sweep gradient. + * Angle Gradient + * center:is the center point of the angle gradient + * start:Start point of angle gradient. The default value is 0 + * end:End point of angle gradient. The default value is 0 + * number:number + * rotating:rotating. The default value is 0 + * colors:Color description for gradients + * repeating:repeating. The default value is false * - * @param { SweepGradientOptions } value - Sweep gradient, which can sweep around the specified - * center point in the 0–360 degree range. If the rotation angle exceeds the range, a monochrome - * color instead of a gradient will be drawn.
- **center**: center of the sweep gradient, that - * is, the coordinates relative to the upper left corner of the current component. - *
- **start**: start angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **end**: end angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **rotation**: rotation angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- colors: array of color stops, - * each of which consists of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. - *
**NOTE** - *
A value less than 0 is treated as **0**. A value greater than 360 is treated as **360**. - *
When **start**, **end**, or **rotation** is specified with a string, the string must be a number - * or a number followed by one of the following units: deg, rad, grad, and turn. Valid value examples - * are "90", "90deg", and "1.57rad". + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26148,27 +25064,16 @@ declare class CommonMethod { * @since 11 */ /** - * Creates a sweep gradient. + * Angle Gradient + * center:is the center point of the angle gradient + * start:Start point of angle gradient + * end:End point of angle gradient + * number:number + * rotating:rotating + * colors:Color description for gradients + * repeating:repeating * - * @param { SweepGradientOptions } value - Sweep gradient, which can sweep around the specified - * center point in the 0–360 degree range. If the rotation angle exceeds the range, a monochrome - * color instead of a gradient will be drawn.
- **center**: center of the sweep gradient, that - * is, the coordinates relative to the upper left corner of the current component. - *
- **start**: start angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **end**: end angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **rotation**: rotation angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- colors: array of color stops, - * each of which consists of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. - *
**NOTE** - *
A value less than 0 is treated as **0**. A value greater than 360 is treated as **360**. - *
When **start**, **end**, or **rotation** is specified with a string, the string must be a number - * or a number followed by one of the following units: deg, rad, grad, and turn. Valid value examples - * are "90", "90deg", and "1.57rad". + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26177,27 +25082,16 @@ declare class CommonMethod { * @since 12 */ /** - * Creates a sweep gradient. + * Angle Gradient + * center:is the center point of the angle gradient + * start:Start point of angle gradient. The default value is 0 + * end:End point of angle gradient. The default value is 0 + * rotating:rotating. The default value is 0 + * colors:Color description for gradients + * repeating:repeating. The default value is false * - * @param { SweepGradientOptions } value - Sweep gradient, which can sweep around the specified - * center point in the 0–360 degree range. If the rotation angle exceeds the range, a monochrome - * color instead of a gradient will be drawn.
- **center**: center of the sweep gradient, that - * is, the coordinates relative to the upper left corner of the current component. - *
- **start**: start angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **end**: end angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- **rotation**: rotation angle of the sweep gradient. - *
Default value: **0**
If the angle is specified with a string, only the deg, grad, rad, - * and turn types are supported.
- colors: array of color stops, - * each of which consists of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. - *
**NOTE** - *
A value less than 0 is treated as **0**. A value greater than 360 is treated as **360**. - *
When **start**, **end**, or **rotation** is specified with a string, the string must be a number - * or a number followed by one of the following units: deg, rad, grad, and turn. Valid value examples - * are "90", "90deg", and "1.57rad". + * Anonymous Object Rectification. + * @param { SweepGradientOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26208,11 +25102,15 @@ declare class CommonMethod { sweepGradient(value: SweepGradientOptions): T; /** - * Creates a sweep gradient. Compared to sweepGradient, - * this API supports the **undefined** type for the **options** parameter. + * Angle Gradient + * center:is the center point of the angle gradient + * start:Start point of angle gradient. The default value is 0 + * end:End point of angle gradient. The default value is 0 + * rotating:rotating. The default value is 0 + * colors:Color description for gradients + * repeating:repeating. The default value is false * - * @param { Optional } options - Sweep gradient. - *
If **options** is **undefined**, the sweep gradient is disabled. + * @param { Optional } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26223,56 +25121,38 @@ declare class CommonMethod { sweepGradient(options: Optional): T; /** - * Creates a radial gradient. + * Radial Gradient + * center:Center point of radial gradient + * radius:Radius of Radial Gradient. value range [0, +∞) + * colors:Color description for gradients + * repeating: Refill. The default value is false * - * @param { object } value - Radial gradient. - *
- **center**: center of the radial gradient, that is, the coordinates relative - * to the upper left corner of the current component. - *
- **radius**: radius of the radial gradient. - *
Value range: [0, +∞). - *
**NOTE** - *
A value less than 0 is treated as **0**. - *
- colors: array of color stops, each of which consists - * of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Creates a radial gradient. + * Radial Gradient + * center:Center point of radial gradient + * radius:Radius of Radial Gradient. value range [0, +∞) + * colors:Color description for gradients + * repeating: Refill. The default value is false * - * @param { object } value - Radial gradient. - *
- **center**: center of the radial gradient, that is, the coordinates relative - * to the upper left corner of the current component. - *
- **radius**: radius of the radial gradient. - *
Value range: [0, +∞). - *
**NOTE** - *
A value less than 0 is treated as **0**. - *
- colors: array of color stops, each of which consists - * of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Creates a radial gradient. + * Radial Gradient + * center:Center point of radial gradient + * radius:Radius of Radial Gradient. value range [0, +∞) + * colors:Color description for gradients + * repeating: Refill. The default value is false * - * @param { object } value - Radial gradient. - *
- **center**: center of the radial gradient, that is, the coordinates relative - * to the upper left corner of the current component. - *
- **radius**: radius of the radial gradient. - *
Value range: [0, +∞). - *
**NOTE** - *
A value less than 0 is treated as **0**. - *
- colors: array of color stops, each of which consists - * of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26280,19 +25160,13 @@ declare class CommonMethod { * @since 10 */ /** - * Creates a radial gradient. + * Radial Gradient + * center:Center point of radial gradient + * radius:Radius of Radial Gradient. value range [0, +∞) + * colors:Color description for gradients + * repeating: Refill. The default value is false * - * @param { object } value - Radial gradient. - *
- **center**: center of the radial gradient, that is, the coordinates relative - * to the upper left corner of the current component. - *
- **radius**: radius of the radial gradient. - *
Value range: [0, +∞). - *
**NOTE** - *
A value less than 0 is treated as **0**. - *
- colors: array of color stops, each of which consists - * of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26301,19 +25175,13 @@ declare class CommonMethod { * @since 11 */ /** - * Creates a radial gradient. + * Radial Gradient + * center:Center point of radial gradient + * radius:Radius of Radial Gradient + * colors:Color description for gradients + * repeating: Refill * - * @param { object } value - Radial gradient. - *
- **center**: center of the radial gradient, that is, the coordinates relative - * to the upper left corner of the current component. - *
- **radius**: radius of the radial gradient. - *
Value range: [0, +∞). - *
**NOTE** - *
A value less than 0 is treated as **0**. - *
- colors: array of color stops, each of which consists - * of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. + * @param { object } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26322,20 +25190,14 @@ declare class CommonMethod { * @since 12 */ /** - * Creates a radial gradient. + * Radial Gradient + * center:Center point of radial gradient + * radius:Radius of Radial Gradient. value range [0, +∞) + * colors:Color description for gradients + * repeating: Refill. The default value is false * * Anonymous Object Rectification. - * @param { RadialGradientOptions } value - Radial gradient. - *
- **center**: center of the radial gradient, that is, the coordinates relative - * to the upper left corner of the current component. - *
- **radius**: radius of the radial gradient. - *
Value range: [0, +∞). - *
**NOTE** - *
A value less than 0 is treated as **0**. - *
- colors: array of color stops, each of which consists - * of a color and its stop position. Invalid colors are automatically skipped. - *
- **repeating**: whether the colors are repeated. - *
Default value: **false**. + * @param { RadialGradientOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26346,11 +25208,13 @@ declare class CommonMethod { radialGradient(value: RadialGradientOptions): T; /** - * Creates a radial gradient. Compared to radialGradient, - * this API supports the **undefined** type for the **options** parameter. + * Radial Gradient + * center:Center point of radial gradient + * radius:Radius of Radial Gradient. value range [0, +∞) + * colors:Color description for gradients + * repeating: Refill. The default value is false * - * @param { Optional } options - Radial gradient. - *
If **options** is **undefined**, the radial gradient is disabled. + * @param { Optional } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26361,26 +25225,38 @@ declare class CommonMethod { radialGradient(options: Optional): T; /** - * Set the motion path of the component. + * Set the motion path of the component + * path:Motion path for displacement animation, using the svg path string. + * from:Start point of the motion path. The default value is 0.0. + * to:End point of the motion path. The default value is 1.0. + * rotatable:Whether to follow the path for rotation. * - * @param { MotionPathOptions } value - Motion path of the component. + * @param { MotionPathOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Set the motion path of the component. + * Set the motion path of the component + * path:Motion path for displacement animation, using the svg path string. + * from:Start point of the motion path. The default value is 0.0. + * to:End point of the motion path. The default value is 1.0. + * rotatable:Whether to follow the path for rotation. * - * @param { MotionPathOptions } value - Motion path of the component. + * @param { MotionPathOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Set the motion path of the component. + * Set the motion path of the component + * path:Motion path for displacement animation, using the svg path string. + * from:Start point of the motion path. The default value is 0.0. + * to:End point of the motion path. The default value is 1.0. + * rotatable:Whether to follow the path for rotation. * - * @param { MotionPathOptions } value - Motion path of the component. + * @param { MotionPathOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26390,33 +25266,26 @@ declare class CommonMethod { motionPath(value: MotionPathOptions): T; /** - * Applies a shadow effect to the component. + * Add a shadow effect to the current component * - * @param { ShadowOptions } value - Shadow of the component. - *
When the value type is **ShadowOptions**, the blur radius, shadow color, - * and offset along the x-axis and y-axis can be specified. + * @param { ShadowOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Applies a shadow effect to the component. + * Add a shadow effect to the current component * - * @param { ShadowOptions } value - Shadow of the component. - *
When the value type is **ShadowOptions**, the blur radius, shadow color, - * and offset along the x-axis and y-axis can be specified. + * @param { ShadowOptions } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Applies a shadow effect to the component. + * Add a shadow effect to the current component * - * @param { ShadowOptions | ShadowStyle } value - Shadow of the component. - *
When the value type is **ShadowOptions**, the blur radius, shadow color, - * and offset along the x-axis and y-axis can be specified. - *
When the value type is **ShadowStyle**, the shadow style can be specified. + * @param { ShadowOptions | ShadowStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26424,12 +25293,9 @@ declare class CommonMethod { * @since 10 */ /** - * Applies a shadow effect to the component. + * Add a shadow effect to the current component * - * @param { ShadowOptions | ShadowStyle } value - Shadow of the component. - *
When the value type is **ShadowOptions**, the blur radius, shadow color, - * and offset along the x-axis and y-axis can be specified. - *
When the value type is **ShadowStyle**, the shadow style can be specified. + * @param { ShadowOptions | ShadowStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26440,14 +25306,9 @@ declare class CommonMethod { shadow(value: ShadowOptions | ShadowStyle): T; /** - * Applies a shadow effect to the component. - * Compared to {@link shadow}, this API supports the **undefined** type for the **options** parameter. + * Add a shadow effect to the current component * - * @param { Optional } options - Shadow of the component. - *
When the value type is **ShadowOptions**, the blur radius, shadow color, - * and offset along the x-axis and y-axis can be specified. - *
When the value type is **ShadowStyle**, the shadow style can be specified. - *
If **options** is **undefined**, the component reverts to its original effect with no shadow. + * @param { Optional } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26458,23 +25319,10 @@ declare class CommonMethod { shadow(options: Optional): T; /** - * Defines how the component's content (including the content of it child components) - * is blended with the existing content on the canvas (possibly offscreen canvas) below. + * Add a blendMode effect to the current component * - * @param { BlendMode } value - Blend mode. - *
Default value: **BlendMode.NONE**. - *
**NOTE** - *
When **BlendMode.NONE** is used, the blend effect is **BlendMode.SRC_OVER** - * by default, and **BlendApplyType** does not take effect. - * @param { BlendApplyType } [type] - Whether the blend mode is implemented offscreen. - *
Default value: **BlendApplyType.FAST**. - *
**NOTE** - *
1. **BlendApplyType.FAST**: The blend mode is not implemented offscreen. - *
2. **BlendApplyType.OFFSCREEN**: An offscreen canvas of the size of the current component - * is created. The content of the current component (including child components) is then drawn - * onto the offscreen canvas, and blended with the existing content on the canvas below using - * the specified blend mode. This approach may cause issues with screen capture for APIs such - * as linearGradientBlur12+, backgroundEffect, and brightness. + * @param { BlendMode } value - Different hybrid modes + * @param { BlendApplyType } [type] - Different blend apply type * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26482,23 +25330,10 @@ declare class CommonMethod { * @since 11 */ /** - * Defines how the component's content (including the content of it child components) - * is blended with the existing content on the canvas (possibly offscreen canvas) below. + * Add a blendMode effect to the current component * - * @param { BlendMode } value - Blend mode. - *
Default value: **BlendMode.NONE**. - *
**NOTE** - *
When **BlendMode.NONE** is used, the blend effect is **BlendMode.SRC_OVER** - * by default, and **BlendApplyType** does not take effect. - * @param { BlendApplyType } [type] - Whether the blend mode is implemented offscreen. - *
Default value: **BlendApplyType.FAST**. - *
**NOTE** - *
1. **BlendApplyType.FAST**: The blend mode is not implemented offscreen. - *
2. **BlendApplyType.OFFSCREEN**: An offscreen canvas of the size of the current component - * is created. The content of the current component (including child components) is then drawn - * onto the offscreen canvas, and blended with the existing content on the canvas below using - * the specified blend mode. This approach may cause issues with screen capture for APIs such - * as linearGradientBlur12+, backgroundEffect, and brightness. + * @param { BlendMode } value - Different hybrid modes + * @param { BlendApplyType } [type] - Different blend apply type * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26509,27 +25344,10 @@ declare class CommonMethod { blendMode(value: BlendMode, type?: BlendApplyType): T; /** - * Defines how the component's content (including the content of it child components) is - * blended with the existing content on the canvas (possibly offscreen canvas) below. - * Compared to blendMode11+, this API supports the **undefined** - * type for the **mode** parameter. + * Add a blendMode effect to the current component * - * @param { Optional } mode - Blend mode. - *
Default value: **BlendMode.NONE**. - *
If **mode** is **undefined**, the component reverts to its original effect of not - * enabling offscreen rendering as a whole before blending with the parent component. - *
**NOTE** - *
When **BlendMode.NONE** is used, the blend effect is **BlendMode.SRC_OVER** - * by default, and **BlendApplyType** does not take effect. - * @param { BlendApplyType } [type] - Whether the blend mode is implemented offscreen. - *
Default value: **BlendApplyType.FAST**. - *
**NOTE** - *
1. **BlendApplyType.FAST**: The blend mode is not implemented offscreen. - *
2. **BlendApplyType.OFFSCREEN**: An offscreen canvas of the size of the current component - * is created. The content of the current component (including child components) is then drawn - * onto the offscreen canvas, and blended with the existing content on the canvas below using - * the specified blend mode. This approach may cause issues with screen capture for APIs such - * as linearGradientBlur12+, backgroundEffect, and brightness. + * @param { Optional } mode - Different hybrid modes + * @param { BlendApplyType } [type] - Different blend apply type * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26541,7 +25359,7 @@ declare class CommonMethod { /** * 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 @@ -26554,14 +25372,9 @@ declare class CommonMethod { advancedBlendMode(effect: BlendMode | Blender, type?: BlendApplyType): T; /** - * Sets whether to clip the areas of child components that extend beyond this component's boundaries, - * That is, whether to perform clipping based on the edge contour of the parent container. + * Whether to crop the sub components beyond the current component range. * - * @param { boolean } value - Whether to perform clipping based on the edge contour of the parent container. - *
Default value: **false**. - *
**true**: Perform clipping. **false**: Do not perform clipping. - *
If this parameter is set to **true**. - *
child components exceeding the current component's bounds will not respond to bound gesture events. + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26572,15 +25385,9 @@ declare class CommonMethod { clip(value: boolean): T; /** - * Sets whether to clip the areas of child components that extend beyond this component's boundaries, - * That is, whether to perform clipping based on the edge contour of the parent container. - * This API supports the **undefined** type for the **clip** parameter. + * Whether to crop the sub components beyond the current component range. * - * @param { Optional } clip - Whether to perform clipping based on the edge contour of the parent container. - *
Default value: **false**. - *
If this parameter is set to **true**, - * child components exceeding the current component's bounds will not respond to bound gesture events. - *
If **clip** is set to **undefined**, clipping is disabled, and child components are not clipped. + * @param { Optional } clip * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26594,13 +25401,7 @@ declare class CommonMethod { * When the parameter is of the Shape type, the current component is cropped according to the specified shape. * When the parameter is of the boolean type, this parameter specifies whether to crop based on the edge contour. * - * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value - Clip mode. - *
If the value is a shape attribute, the component is clipped based on the specified shape. - *
If the value is of the Boolean type, - * it specifies whether to clip the component based on the boundaries of the parent container. - *
Default value: **false**. - *
If the value is a shape attribute, the clipped area can still respond to bound gesture events. - *
If the value is of the Boolean type, the clipped area will not respond to bound gesture events. + * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -26609,13 +25410,7 @@ declare class CommonMethod { * When the parameter is of the Shape type, the current component is cropped according to the specified shape. * When the parameter is of the boolean type, this parameter specifies whether to crop based on the edge contour. * - * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value - Clip mode. - *
If the value is a shape attribute, the component is clipped based on the specified shape. - *
If the value is of the Boolean type, - * it specifies whether to clip the component based on the boundaries of the parent container. - *
Default value: **false**. - *
If the value is a shape attribute, the clipped area can still respond to bound gesture events. - *
If the value is of the Boolean type, the clipped area will not respond to bound gesture events. + * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -26625,13 +25420,7 @@ declare class CommonMethod { * When the parameter is of the Shape type, the current component is cropped according to the specified shape. * When the parameter is of the boolean type, this parameter specifies whether to crop based on the edge contour. * - * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value - Clip mode. - *
If the value is a shape attribute, the component is clipped based on the specified shape. - *
If the value is of the Boolean type, - * it specifies whether to clip the component based on the boundaries of the parent container. - *
Default value: **false**. - *
If the value is a shape attribute, the clipped area can still respond to bound gesture events. - *
If the value is of the Boolean type, the clipped area will not respond to bound gesture events. + * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26642,13 +25431,7 @@ declare class CommonMethod { * When the parameter is of the Shape type, the current component is cropped according to the specified shape. * When the parameter is of the boolean type, this parameter specifies whether to crop based on the edge contour. * - * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value - Clip mode. - *
If the value is a shape attribute, the component is clipped based on the specified shape. - *
If the value is of the Boolean type, - * it specifies whether to clip the component based on the boundaries of the parent container. - *
Default value: **false**. - *
If the value is a shape attribute, the clipped area can still respond to bound gesture events. - *
If the value is of the Boolean type, the clipped area will not respond to bound gesture events. + * @param { boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26661,41 +25444,35 @@ declare class CommonMethod { clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): T; /** - * Clips this component based on the given shape. - * - * @param { CircleShape | EllipseShape | PathShape | RectShape } value - Shape that the component to be clipped into. - *
The clipped area remains responsive to bound gesture events. - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ + * The current component is cropped according to the specified shape. + * + * @param { CircleShape | EllipseShape | PathShape | RectShape } value - indicates the shape of the clip. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ clipShape(value: CircleShape | EllipseShape | PathShape | RectShape): T; /** - * Sets whether to clip this component based on the given shape. - * Compared to {@link clipShape}, this API supports the **undefined** type for the **shape** parameter. - * - * @param { Optional } shape - Shape that the component to - *
be clipped into. - *
The clipped area remains responsive to bound gesture events. - *
If **shape** is set to **undefined**, the previous value is retained. - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ + * The current component is cropped according to the specified shape. + * + * @param { Optional } shape - indicates the shape of the clip. + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ clipShape(shape: Optional): T; /** - * Adds a mask to the component to indicate the progress. + * Sets the mask of the current component. * - * @param { ProgressMask } value - Mask to add to the component, which allows for dynamic - * adjustment of progress, maximum value, and color settings. + * @param { ProgressMask } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26705,12 +25482,9 @@ declare class CommonMethod { mask(value: ProgressMask): T; /** - * Adds a mask to the component to indicate the progress. Compared to mask12+, - * this API supports the **undefined** type for the **mask** parameter. + * Sets the mask of the current component. * - * @param { Optional } mask - Mask to add to the component, which allows for dynamic - * adjustment of progress, maximum value, and color settings.
If **mask** is set to **undefined**, - * the component to revert to its original effect without the mask to indicate the progress. + * @param { Optional } mask * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26762,10 +25536,9 @@ declare class CommonMethod { mask(value: CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute | ProgressMask): T; /** - * Adds a mask of the specified shape to the component. + * Applies a mask of the specified shape to the current assembly. * - * @param { CircleShape | EllipseShape | PathShape | RectShape } value - Mask of the specified - * shape to add to the component. + * @param { CircleShape | EllipseShape | PathShape | RectShape } value - indicates the shape of the mask. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26776,11 +25549,9 @@ declare class CommonMethod { maskShape(value: CircleShape | EllipseShape | PathShape | RectShape): T; /** - * Adds a mask of the specified shape to the component. Compared to maskShape12+, - * this API supports the **undefined** type for the **shape** parameter. + * Applies a mask of the specified shape to the current assembly. * - * @param { Optional } shape - Mask of the specified shape to - * add to the component.
If **shape** is set to **undefined**, the previous value is retained. + * @param { Optional } shape - indicates the shape of the mask. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -26926,12 +25697,8 @@ declare class CommonMethod { */ /** * Popup control - *

NOTE: - *
The popup can be displayed only after the entire page is fully constructed. Therefore, to avoid incorrect - * display positions and shapes, do not set this parameter to true while the page is still being constructed. - *

* - * @param { boolean } show - Whether to show the popup, default is false. + * @param { boolean } show * @param { PopupOptions | CustomPopupOptions } popup * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -26989,7 +25756,7 @@ declare class CommonMethod { /** * Menu control * - * @param { boolean } isShow true means display menu, false means hide menu, default is false. + * @param { boolean } isShow true means display menu, false means hide menu. * @param { Array | CustomBuilder } content - Indicates the content of menu. * @param { MenuOptions } options - Indicates the options of menu. * @returns { T } @@ -27022,12 +25789,10 @@ declare class CommonMethod { * @since 10 */ /** - * Binds a context menu to this component, which is displayed when the user long-presses or right-clicks the - * component. Only custom menu items are supported. + * ContextMenu control * * @param { CustomBuilder } content - Indicates the content of context menu. - * @param { ResponseType } responseType - Indicates response type of context menu, Long pressing with a mouse device - * is not supported. + * @param { ResponseType } responseType - Indicates response type of context menu. * @param { ContextMenuOptions } options - Indicates the options of context menu. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -27038,15 +25803,9 @@ declare class CommonMethod { bindContextMenu(content: CustomBuilder, responseType: ResponseType, options?: ContextMenuOptions): T; /** - * Binds a context menu to the component, whose visibility is subject to the isShown settings. - * - * @param { boolean } isShown - true means display content, false means hide content, default is false. - *

NOTE: - *
The menu can be displayed properly only when the related page has been constructed. If this parameter is set - * to true before the construction is complete, display issues, such as misplacement, distortion, or failure to pop - * up, may occur. To trigger dragging by long presses is not supported. - *

+ * ContextMenu control * + * @param { boolean } isShown - true means display content, false means hide content. * @param { CustomBuilder } content - Indicates the content of context menu. * @param { ContextMenuOptions } [options] - Indicates the options of context menu. * @returns { T } @@ -27058,7 +25817,7 @@ declare class CommonMethod { bindContextMenu(isShown: boolean, content: CustomBuilder, options?: ContextMenuOptions): 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. @@ -27069,7 +25828,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. @@ -27083,7 +25842,7 @@ declare class CommonMethod { 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. @@ -27094,7 +25853,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. @@ -27108,7 +25867,7 @@ declare class CommonMethod { bindContentCover(isShow: boolean, builder: CustomBuilder, options?: ContentCoverOptions): T; /** - * Binds a sheet page to the component, whose visibility is subject to the isShow settings. + * Bind sheet * * @param { boolean } isShow - true means display sheet, false means hide sheet. * @param { CustomBuilder } builder - the sheet to be displayed. @@ -27119,7 +25878,7 @@ declare class CommonMethod { * @since 10 */ /** - * Binds a sheet page to the component, whose visibility is subject to the isShow settings. + * Bind sheet * * @param { boolean } isShow - true means display sheet, false means hide sheet. * @param { CustomBuilder } builder - the sheet to be displayed. @@ -27225,9 +25984,8 @@ declare class CommonMethod { /** * Trigger a visible area change event. * - * @param { Array } ratios - Threshold array. Each threshold represents a ratio of the component's visible area to the component's total area. - * The value range of the threshold is [0.0, 1.0]. - * @param { VisibleAreaChangeCallback } event - Callback for visible area changes of the component. + * @param { Array } ratios + * @param { VisibleAreaChangeCallback } event * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27236,7 +25994,6 @@ declare class CommonMethod { */ onVisibleAreaChange(ratios: Array, event: VisibleAreaChangeCallback): T; - /** * Set or reset the callback which is triggered when the visibleArea of component changed. * The interval between two visible area change callbacks will not be less than the expected update interval. @@ -27252,19 +26009,10 @@ declare class CommonMethod { onVisibleAreaApproximateChange(options: VisibleAreaEventOptions, event: VisibleAreaChangeCallback | undefined): void; /** - * Applies a spherical effect to the component. + * Set the spherical effect of the component. * - * @param { number } value - Spherical degree of the component. - *
The value ranges from 0 to 1. - *

**NOTE**: - *
1. If the value is **0**, the component remains unchanged. If the value is 1, the component is completely - * spherical. Between **0** and **1**, a larger value indicates a higher spherical degree. A value less than 0 is - * handled as the value **0**. A value greater than 1 is handled as the value **1**. - *
2. The component's shadow and outer stroke do not support spherical effects. - *
3. If the value is greater than 0, the component is frozen and not updated, and its content is drawn to the - * transparent offscreen buffer. To update the component attributes, set the value to **0**. - *

- * + * @param { number } value - set the degree of spherical effect, value range [0, 1]. + * If the value is 0, the component keep same, else the value is 1, component are fully spherical. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27276,17 +26024,8 @@ declare class CommonMethod { /** * Set the spherical effect of the component. * - * @param { Optional } effect - The value ranges from 0 to 1. - *

**NOTE**: - *
1. If the value is **0**, the component remains unchanged. If the value is 1, the component is completely - * spherical. Between **0** and **1**, a larger value indicates a higher spherical degree.A value less than 0 is - * handled as the value **0**. A value greater than 1 is handled as the value **1**. - *
2. The component's shadow and outer stroke do not support spherical effects. - *
3. If the value is greater than 0, the component is frozen and not updated, and its content is drawn to the - * transparent offscreen buffer. To update the component attributes, set the value to **0**. If **effect** is - * **undefined**, the spherical degree reverts to **0**. - *

- * + * @param { Optional } effect - set the degree of spherical effect, value range [0, 1]. + * If the value is 0, the component keep same, else the value is 1, component are fully spherical. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27296,14 +26035,10 @@ declare class CommonMethod { sphericalEffect(effect: Optional): T; /** - * Applies a light up effect to the component. + * Set the light up effect of the component * - * @param { number } value - Light up degree of the component. - *
The value ranges from 0 to 1. - *
If the value is **0**, the component is dark. If the value is **1**, the component is fully illuminated. - *
Between **0** and **1**, a larger value indicates higher luminance. - *
A value less than 0 is handled as the value **0**. - *
A value greater than 1 is handled as the value **1**. + * @param { number } value - set the degree to which the component lights up, value range [0, 1]. + * The color brightness in the component rendering content area is greater than the value and can be displayed, otherwise it will not be displayed. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27313,16 +26048,10 @@ declare class CommonMethod { lightUpEffect(value: number): T; /** - * Applies a light up effect to the component. Compared to lightUpEffect, - * this API supports the **undefined** type for the **degree** parameter. + * Set the light up effect of the component * - * @param { Optional } degree - Light up degree of the component. - *
The value ranges from 0 to 1. - *
If the value is **0**, the component is dark. If the value is **1**, the component is fully illuminated. - *
Between **0** and **1**, a larger value indicates higher luminance. - *
A value less than 0 is handled as the value **0**. - *
A value greater than 1 is handled as the value **1**. - *
If **degree** is **undefined**, the light up degree reverts to **1**. + * @param { Optional } degree - set the degree to which the component lights up, value range [0, 1]. + * The color brightness in the component rendering content area is greater than the value and can be displayed, otherwise it will not be displayed. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27332,26 +26061,9 @@ declare class CommonMethod { lightUpEffect(degree: Optional): T; /** - * Applies a pixel stretch effect to the component. - * - * @param { PixelStretchEffectOptions } options - Pixel stretch effect options. - *
The value includes the length by which a pixel is stretched toward the four edges. - *

**NOTE**: - *
1. If the length is a positive value, the original image is stretched, and the image size increases. The edge - * pixels grow by the set length toward the top, bottom, left, and right edges. - *
2. If the length is a negative value, the original image shrinks as follows, but the image size remains - * unchanged: - *
Shrinking mode: - *
(1) The image shrinks from the four edges by the absolute value of length set through **options**. - *
(2) The image is stretched back to the original size with edge pixels. - *
3. Constraints on **options**: - *
(1) The length values for the four edges must be all positive or all negative. That is, the four edges are - * stretched or shrink at the same time in the same direction. - *
(2) The length values must all be a percentage or a specific value. Combined use of the percentage and - * specific value is not allowed. - *
(3) If the input value is invalid, the image is displayed as {0, 0, 0, 0}, that is, the image is the same as - * the original image. - *

+ * Set the edge pixel stretch effect of the Component. + * + * @param { PixelStretchEffectOptions } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27361,27 +26073,9 @@ declare class CommonMethod { pixelStretchEffect(options: PixelStretchEffectOptions): T; /** - * Applies a pixel stretch effect to the component. Compared to pixelStretchEffect, - * this API supports the **undefined** type for the **options** parameter. + * Set the edge pixel stretch effect of the Component. * - * @param { Optional } options - Pixel stretch effect options. - *
The value includes the length by which a pixel is stretched toward the four edges. - *

**NOTE**: - *
1. If the length is a positive value, the original image is stretched, and the image size increases. The edge - * pixels grow by the set length toward the top, bottom, left, and right edges. - *
2. If the length is a negative value, the original image shrinks as follows, but the image size remains - * unchanged: - *
Shrinking mode: - *
(1) The image shrinks from the four edges by the absolute value of length set through **options**. - *
(2) The image is stretched back to the original size with edge pixels. - *
3. Constraints on **options**: - *
(1) The length values for the four edges must be all positive or all negative. That is, the four edges are - * stretched or shrink at the same time in the same direction. - *
(2) The length values must all be a percentage or a specific value. Combined use of the percentage and - * specific value is not allowed. - *
(3) If the input value is invalid, the image is displayed as {0, 0, 0, 0}, that is, the image is the same as - * the original image. - *

+ * @param { Optional } options * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27510,7 +26204,7 @@ declare class CommonMethod { * @since 12 */ accessibilityText(value: string): T; - + /** * Sets accessibility next focus id * @param { string } nextId - set component next accessibility focus id @@ -27522,7 +26216,7 @@ declare class CommonMethod { * @since 18 */ accessibilityNextFocusId(nextId: string): T; - + /** * Sets the accessibility default foucs flag * @param { boolean } focus - if the component is accessibility default focus,focus set true @@ -27534,7 +26228,7 @@ declare class CommonMethod { * @since 18 */ accessibilityDefaultFocus(focus: boolean): T; - + /** * Sets accessibility same page mode * @param { AccessibilitySamePageMode } pageMode - accessibility same page mode @@ -27576,7 +26270,7 @@ declare class CommonMethod { * @since 12 */ accessibilityText(text: Resource): T; - + /** * Sets accessibility role,role indicates the custom type of the component * @param { AccessibilityRoleType } role - set accessibility component type @@ -27820,7 +26514,7 @@ declare class CommonMethod { */ reuseId(id: string): T; - /** + /** * Reuse id is used for identify the reuse type of each @ComponentV2 custom component, which can give user control of sub-component recycle and reuse. * * @param { ReuseOptions } options - The configuration parameter for reusable custom component. @@ -27830,25 +26524,21 @@ declare class CommonMethod { * @atomicservice * @since 18 */ - reuse(options: ReuseOptions): T; + reuse(options: ReuseOptions): T; /** - * How the final state of the component's content is rendered during its width and height animation process. + * Sets how content is drawn within nodes duration animation * - * @param { RenderFit } fitMode - How the final state of the component's content is rendered during. - *
its width and height animation process. - *
If **renderFit** is not set, the default value **RenderFit.TOP_LEFT** is used. + * @param { RenderFit } fitMode - The render fit mode of content. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * How the final state of the component's content is rendered during its width and height animation process. + * Sets how content is drawn within nodes duration animation * - * @param { RenderFit } fitMode - How the final state of the component's content is rendered during. - *
its width and height animation process. - *
If **renderFit** is not set, the default value **RenderFit.TOP_LEFT** is used. + * @param { RenderFit } fitMode - The render fit mode of content. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27856,11 +26546,9 @@ declare class CommonMethod { * @since 11 */ /** - * How the final state of the component's content is rendered during its width and height animation process. + * Sets how content is drawn within nodes duration animation * - * @param { RenderFit } fitMode - How the final state of the component's content is rendered during. - *
its width and height animation process. - *
If **renderFit** is not set, the default value **RenderFit.TOP_LEFT** is used. + * @param { RenderFit } fitMode - The render fit mode of content. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27871,13 +26559,9 @@ declare class CommonMethod { renderFit(fitMode: RenderFit): T; /** - * How the final state of the component's content is rendered during its width and height animation process. - * Compared to {@link renderFit}, this API supports the **undefined** type for the **fitMode** parameter. + * Sets how content is drawn within nodes during animation * - * @param { Optional } fitMode - How the final state of the component's content is rendered during. - *
its width and height animation process. - *
If **fitMode** is set to **undefined**, the default value is used, - * which is equivalent to **RenderFit.TOP_LEFT**. + * @param { Optional } fitMode - The render fit mode of content. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27900,8 +26584,6 @@ declare class CommonMethod { * Sets the attribute modifier. * * @param { AttributeModifier } modifier - * The if/else syntax is supported. - * You need a custom class to implement the AttributeModifier API. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -27923,9 +26605,9 @@ declare class CommonMethod { gestureModifier(modifier: GestureModifier): T; /** - * Sets the background brightness of the component. + * Adds a background dynamic light up effect to the current component. * - * @param { BackgroundBrightnessOptions } params - Parameters for setting the background brightness. + * @param { BackgroundBrightnessOptions } params - params indicates BackgroundBrightnessOptions * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -27934,11 +26616,9 @@ declare class CommonMethod { backgroundBrightness(params: BackgroundBrightnessOptions): T; /** - * Sets the background brightness of the component. Compared to backgroundBrightness12+, - * this API supports the **undefined** type for the **options** parameter. + * Adds a background dynamic light up effect to the current component. * - * @param { Optional } options - Parameters for setting the background brightness. - *
If **options** is **undefined**, the background reverts to its default state with no brightness effect. + * @param { Optional } options - params indicates BackgroundBrightnessOptions * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -27968,7 +26648,7 @@ declare class CommonMethod { onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): T; /** - * Binds a custom gesture recognizer judgment callback to the component. + * When a gesture bound to this component will be accepted, a user-defined callback is triggered to get the result * * @param { GestureRecognizerJudgeBeginCallback } callback - A callback instance used when a gesture bound to this component will be accepted. * @returns { T } @@ -27980,29 +26660,21 @@ declare class CommonMethod { onGestureRecognizerJudgeBegin(callback: GestureRecognizerJudgeBeginCallback): T; /** - * Binds a custom gesture recognizer judgment callback to the component. - * - *

NOTE: - *
For a composite component, setting exposeInnerGesture to true exposes the internal gesture recognizer of the - *
composite component in the current parameter callback. Currently, only the Tabs component is supported. - * - *
Do not set exposeInnerGesture for other components. When exposeInnerGesture is set to false, this API provides the same functionality - *
as the onGestureRecognizerJudgeBegin API. - *

+ * When a gesture bound to this component will be accepted, a user-defined callback is triggered to get the result + * * @param { GestureRecognizerJudgeBeginCallback } callback - A callback instance used when a gesture bound to this component will be accepted. * @param { boolean } exposeInnerGesture - This parameter is a flag. This flag determines whether to expose internal gestures. - * @default false * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * + * * @since 13 */ onGestureRecognizerJudgeBegin(callback: GestureRecognizerJudgeBeginCallback, exposeInnerGesture: boolean): T; /** - * Provides a callback to set the parallel relationship between built-in gestures and gestures of other components in the response chain. + * In the touch test phase, the recognizer is selected to form a parallel relationship with other recognizers on the response chain. * * @param { ShouldBuiltInRecognizerParallelWithCallback } callback - A callback instance used when a component is doing touch test. * @returns { T } @@ -28023,11 +26695,9 @@ declare class CommonMethod { * @since 11 */ /** - * Sets whether the component exclusively handles events. - * true: The component exclusively handles events. false: The component does not exclusively handle events. + * Events are monopolized by components. * * @param { boolean } monopolize - indicate the monopoly of events - * @default false * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28171,7 +26841,7 @@ interface CommonInterface { */ /** * Constructor - * + * * @returns { CommonAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -28188,7 +26858,7 @@ interface CommonInterface { */ /** * Constructor - * + * * @returns { CommonAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28301,10 +26971,6 @@ declare type CustomBuilder = (() => any) | void; /** * Defines the OverlayOptions interface. - * - * NOTE:
- * When both align and offset are set, the effects are combined. - * The overlay is first aligned relative to the component and then offset from its current upper left corner. * * @typedef OverlayOptions * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -28342,7 +27008,6 @@ declare interface OverlayOptions { * Defines align type. * * @type { ?Alignment } - * @default TopStart * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -28350,7 +27015,7 @@ declare interface OverlayOptions { * @since 11 */ align?: Alignment; - + /** * Defines offset type. * @@ -28379,7 +27044,6 @@ declare interface OverlayOptions { * Defines offset type. * * @type { ?OverlayOffset } - * @default - the overlay is in the upper left corner of the component. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -28539,32 +27203,26 @@ declare class CommonShapeMethod extends CommonMethod { constructor(); /** - * Sets the stroke color. - * If this attribute is not set, the component does not have any stroke. - * If the value is invalid, no stroke will be drawn. + * border Color * - * @param { ResourceColor } value - Stroke color. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the stroke color. - * If this attribute is not set, the component does not have any stroke. - * If the value is invalid, no stroke will be drawn. + * border Color * - * @param { ResourceColor } value - Stroke color. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the stroke color. - * If this attribute is not set, the component does not have any stroke. - * If the value is invalid, no stroke will be drawn. + * border Color * - * @param { ResourceColor } value - Stroke color. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28572,11 +27230,9 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the stroke color. - * If this attribute is not set, the component does not have any stroke. - * If the value is invalid, no stroke will be drawn. + * border Color * - * @param { ResourceColor } value - Stroke color. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28587,32 +27243,26 @@ declare class CommonShapeMethod extends CommonMethod { stroke(value: ResourceColor): T; /** - * Sets the color of the fill area. - * An invalid value is handled as the default value. - * If this attribute and the universal attribute foregroundColor are both set, whichever is set later takes effect. + * Fill color. * - * @param { ResourceColor } value - Color of the fill area. Default value: Color.Black. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the color of the fill area. - * An invalid value is handled as the default value. - * If this attribute and the universal attribute foregroundColor are both set, whichever is set later takes effect. + * Fill color. * - * @param { ResourceColor } value - Color of the fill area. Default value: Color.Black. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the color of the fill area. - * An invalid value is handled as the default value. - * If this attribute and the universal attribute foregroundColor are both set, whichever is set later takes effect. + * Fill color. * - * @param { ResourceColor } value - Color of the fill area. Default value: Color.Black. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28620,11 +27270,9 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the color of the fill area. - * An invalid value is handled as the default value. - * If this attribute and the universal attribute foregroundColor are both set, whichever is set later takes effect. + * Fill color. * - * @param { ResourceColor } value - Color of the fill area. Default value: Color.Black. + * @param { ResourceColor } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28635,35 +27283,26 @@ declare class CommonShapeMethod extends CommonMethod { fill(value: ResourceColor): T; /** - * Sets the offset of the start point for drawing the stroke. - * An invalid value is handled as the default value. + * Offset from the start point of the border drawing. * - * @param { number | string } value - Offset of the start point for drawing the stroke. - * Default value: 0 - * Default unit: vp + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the offset of the start point for drawing the stroke. - * An invalid value is handled as the default value. + * Offset from the start point of the border drawing. * - * @param { number | string } value - Offset of the start point for drawing the stroke. - * Default value: 0 - * Default unit: vp + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the offset of the start point for drawing the stroke. - * An invalid value is handled as the default value. + * Offset from the start point of the border drawing. * - * @param { number | string } value - Offset of the start point for drawing the stroke. - * Default value: 0 - * Default unit: vp + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28671,12 +27310,9 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the offset of the start point for drawing the stroke. - * An invalid value is handled as the default value. + * Offset from the start point of the border drawing. * - * @param { number | string } value - Offset of the start point for drawing the stroke. - * Default value: 0 - * Default unit: vp + * @param { number | string } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28687,26 +27323,26 @@ declare class CommonShapeMethod extends CommonMethod { strokeDashOffset(value: number | string): T; /** - * Sets the cap style of the stroke. + * Path endpoint drawing style. * - * @param { LineCapStyle } value - Cap style of the stroke. Default value: LineCapStyle.Butt + * @param { LineCapStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the cap style of the stroke. + * Path endpoint drawing style. * - * @param { LineCapStyle } value - Cap style of the stroke. Default value: LineCapStyle.Butt + * @param { LineCapStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the cap style of the stroke. + * Path endpoint drawing style. * - * @param { LineCapStyle } value - Cap style of the stroke. Default value: LineCapStyle.Butt + * @param { LineCapStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28714,9 +27350,9 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the cap style of the stroke. + * Path endpoint drawing style. * - * @param { LineCapStyle } value - Cap style of the stroke. Default value: LineCapStyle.Butt + * @param { LineCapStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28727,29 +27363,26 @@ declare class CommonShapeMethod extends CommonMethod { strokeLineCap(value: LineCapStyle): T; /** - * Sets the join style of the stroke. - * This attribute does not work for the Circle component, which does not have corners. + * Border corner drawing style. * - * @param { LineJoinStyle } value - Join style of the stroke. Default value: LineJoinStyle.Miter + * @param { LineJoinStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the join style of the stroke. - * This attribute does not work for the Circle component, which does not have corners. + * Border corner drawing style. * - * @param { LineJoinStyle } value - Join style of the stroke. Default value: LineJoinStyle.Miter + * @param { LineJoinStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the join style of the stroke. - * This attribute does not work for the Circle component, which does not have corners. + * Border corner drawing style. * - * @param { LineJoinStyle } value - Join style of the stroke. Default value: LineJoinStyle.Miter + * @param { LineJoinStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28757,10 +27390,9 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the join style of the stroke. - * This attribute does not work for the Circle component, which does not have corners. + * Border corner drawing style. * - * @param { LineJoinStyle } value - Join style of the stroke. Default value: LineJoinStyle.Miter + * @param { LineJoinStyle } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28811,35 +27443,26 @@ declare class CommonShapeMethod extends CommonMethod { strokeMiterLimit(value: number | string): T; /** - * Sets the stroke opacity. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * Sets the opacity of the border. * - * @param { number | string | Resource } value - Stroke opacity. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the stroke opacity. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * Sets the opacity of the border. * - * @param { number | string | Resource } value - Stroke opacity. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the stroke opacity. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * Sets the opacity of the border. * - * @param { number | string | Resource } value - Stroke opacity. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28847,12 +27470,9 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the stroke opacity. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * Sets the opacity of the border. * - * @param { number | string | Resource } value - Stroke opacity. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28863,35 +27483,26 @@ declare class CommonShapeMethod extends CommonMethod { strokeOpacity(value: number | string | Resource): T; /** - * Sets the opacity of the fill area. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * fill Opacity * - * @param { number | string | Resource } value - Opacity of the fill area. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the opacity of the fill area. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * fill Opacity * - * @param { number | string | Resource } value - Opacity of the fill area. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the opacity of the fill area. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * fill Opacity * - * @param { number | string | Resource } value - Opacity of the fill area. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28899,12 +27510,9 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the opacity of the fill area. - * The value range is [0.0, 1.0]. - * A value less than 0.0 evaluates to the value 0.0. A value greater than 1.0 evaluates to the value 1.0. - * Any other value evaluates to the value 1.0. + * fill Opacity * - * @param { number | string | Resource } value - Opacity of the fill area. Default value: 1 + * @param { number | string | Resource } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28915,41 +27523,26 @@ declare class CommonShapeMethod extends CommonMethod { fillOpacity(value: number | string | Resource): T; /** - * Sets the stroke width. - * If this attribute is of the string type, percentage values are not supported and will be treated as 1 px. + * Sets the width of the dividing line. * - * @param { Length } value - Stroke width. - * The value must be greater than or equal to 0. - * Default value: 1. - * Default unit: vp. - * An invalid value is handled as the default value. + * @param { Length } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets the stroke width. - * If this attribute is of the string type, percentage values are not supported and will be treated as 1 px. + * Sets the width of the dividing line. * - * @param { Length } value - Stroke width. - * The value must be greater than or equal to 0. - * Default value: 1. - * Default unit: vp. - * An invalid value is handled as the default value. + * @param { Length } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the stroke width. - * If this attribute is of the string type, percentage values are not supported and will be treated as 1 px. + * Sets the width of the dividing line. * - * @param { Length } value - Stroke width. - * The value must be greater than or equal to 0. - * Default value: 1. - * Default unit: vp. - * An invalid value is handled as the default value. + * @param { Length } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28957,14 +27550,9 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets the stroke width. - * If this attribute is of the string type, percentage values are not supported and will be treated as 1 px. + * Sets the width of the dividing line. * - * @param { Length } value - Stroke width. - * The value must be greater than or equal to 0. - * Default value: 1. - * Default unit: vp. - * An invalid value is handled as the default value. + * @param { Length } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -28975,35 +27563,26 @@ declare class CommonShapeMethod extends CommonMethod { strokeWidth(value: Length): T; /** - * Specifies whether anti-aliasing is enabled. + * Indicates whether to enable anti-aliasing * - * @param { boolean } value - Whether anti-aliasing is enabled. - * true: Anti-aliasing is enabled. - * false: Anti-aliasing is disabled. - * Default value: true + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Specifies whether anti-aliasing is enabled. + * Indicates whether to enable anti-aliasing * - * @param { boolean } value - Whether anti-aliasing is enabled. - * true: Anti-aliasing is enabled. - * false: Anti-aliasing is disabled. - * Default value: true + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Specifies whether anti-aliasing is enabled. + * Indicates whether to enable anti-aliasing * - * @param { boolean } value - Whether anti-aliasing is enabled. - * true: Anti-aliasing is enabled. - * false: Anti-aliasing is disabled. - * Default value: true + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -29011,12 +27590,9 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Specifies whether anti-aliasing is enabled. + * Indicates whether to enable anti-aliasing * - * @param { boolean } value - Whether anti-aliasing is enabled. - * true: Anti-aliasing is enabled. - * false: Anti-aliasing is disabled. - * Default value: true + * @param { boolean } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -29027,35 +27603,26 @@ declare class CommonShapeMethod extends CommonMethod { antiAlias(value: boolean): T; /** - * Sets stroke dashes. - * The value must be greater than or equal to 0. Invalid values are treated as the default value. + * Sets the gap for the border. * - * @param { Array } value - Stroke dashes. - * Default value: [] - * Default unit: vp + * @param { Array } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Sets stroke dashes. - * The value must be greater than or equal to 0. Invalid values are treated as the default value. + * Sets the gap for the border. * - * @param { Array } value - Stroke dashes. - * Default value: [] - * Default unit: vp + * @param { Array } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets stroke dashes. - * The value must be greater than or equal to 0. Invalid values are treated as the default value. + * Sets the gap for the border. * - * @param { Array } value - Stroke dashes. - * Default value: [] - * Default unit: vp + * @param { Array } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -29063,12 +27630,9 @@ declare class CommonShapeMethod extends CommonMethod { * @since 10 */ /** - * Sets stroke dashes. - * The value must be greater than or equal to 0. Invalid values are treated as the default value. + * Sets the gap for the border. * - * @param { Array } value - Stroke dashes. - * Default value: [] - * Default unit: vp + * @param { Array } value * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -29216,7 +27780,7 @@ declare interface LinearGradient { } /** - * Defines the direction of pixel rounding at the component level. + * Defines the pixel round property. * * @interface PixelRoundPolicy * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29227,7 +27791,7 @@ declare interface LinearGradient { */ declare interface PixelRoundPolicy { /** - * Rounding for alignment with the start edge. + * start property. * * @type { ?PixelRoundCalcPolicy } * @default PixelRoundCalcPolicy.NO_FORCE_ROUND @@ -29240,7 +27804,7 @@ declare interface PixelRoundPolicy { start?: PixelRoundCalcPolicy; /** - * Rounding for alignment with the top edge. + * top property. * * @type { ?PixelRoundCalcPolicy } * @default PixelRoundCalcPolicy.NO_FORCE_ROUND @@ -29253,7 +27817,7 @@ declare interface PixelRoundPolicy { top?: PixelRoundCalcPolicy; /** - * Rounding for alignment with the end edge. + * end property. * * @type { ?PixelRoundCalcPolicy } * @default PixelRoundCalcPolicy.NO_FORCE_ROUND @@ -29266,7 +27830,7 @@ declare interface PixelRoundPolicy { end?: PixelRoundCalcPolicy; /** - * Rounding for alignment with the bottom edge. + * bottom property. * * @type { ?PixelRoundCalcPolicy } * @default PixelRoundCalcPolicy.NO_FORCE_ROUND @@ -29310,7 +27874,7 @@ declare interface LinearGradientBlurOptions { /** * Define motion blur anchor coordinates. - * + * * @interface MotionBlurAnchor * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -29340,7 +27904,7 @@ declare interface MotionBlurAnchor { /** * Define motion blur options. - * + * * @interface MotionBlurOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -29359,7 +27923,7 @@ declare interface MotionBlurOptions { radius: number; /** * Define motion blur anchor coordinates. - * + * * @type { MotionBlurAnchor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -29519,7 +28083,7 @@ declare interface LayoutChild { * @since 9 * @deprecated since 10 */ - measure(childConstraint: ConstraintSizeOptions), + measure(childConstraint: ConstraintSizeOptions); /** * Call this layout method in onLayout callback to assign layout info to sub component. @@ -29530,7 +28094,7 @@ declare interface LayoutChild { * @since 9 * @deprecated since 10 */ - layout(childLayoutInfo: LayoutInfo), + layout(childLayoutInfo: LayoutInfo); } /** @@ -29620,7 +28184,7 @@ declare interface GeometryInfo extends SizeResult { * @since 10 */ /** - * Provides the child component layout information. + * Sub component info passed from framework when layout happens. * * @interface Layoutable * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29668,7 +28232,7 @@ declare interface Layoutable { * @since 10 */ /** - * Applies the specified position information to the child component. + * Call this layout method in onLayout callback to assign layout info to sub component. * * @param { Position } position * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29676,10 +28240,10 @@ declare interface Layoutable { * @atomicservice * @since 11 */ - layout(position: Position): void, + layout(position: Position): void; /** - * Obtains the margin of the child component. + * Call this method to get the margin of sub component. * * @returns { DirectionalEdgesT } the margin of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29687,21 +28251,21 @@ declare interface Layoutable { * @atomicservice * @since 12 */ - getMargin() : DirectionalEdgesT, + getMargin() : DirectionalEdgesT; /** * Call this method to get the padding of sub component. * - * @returns { DirectionalEdgesT } Padding of the child component, unit is vp. + * @returns { DirectionalEdgesT } the padding of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ - getPadding() : DirectionalEdgesT, - + getPadding() : DirectionalEdgesT; + /** - * Obtains the border width of the child component. + * Call this method to get the borderWidth of sub component. * * @returns { DirectionalEdgesT } the borderWidth of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29709,7 +28273,7 @@ declare interface Layoutable { * @atomicservice * @since 12 */ - getBorderWidth() : DirectionalEdgesT, + getBorderWidth() : DirectionalEdgesT; } /** @@ -29731,7 +28295,7 @@ declare interface Layoutable { */ declare interface Measurable { /** - * Unique ID that the system assigns to the child component. + * Unique ID of the child component. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29751,30 +28315,30 @@ declare interface Measurable { * @since 10 */ /** - * Applies the size constraint to the child component. + * Call this measure method in onMeasure callback to supply sub component size. * * @param { ConstraintSizeOptions } constraint - * @returns { MeasureResult } Provides the measurement result of the component. + * @returns { MeasureResult } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - measure(constraint: ConstraintSizeOptions) : MeasureResult, + measure(constraint: ConstraintSizeOptions) : MeasureResult; /** - * Obtains the margin of the child component. + * Call this method to get the margin of sub component. * - * @returns { DirectionalEdgesT } Margin of the child component, unit is vp. + * @returns { DirectionalEdgesT } the margin of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ - getMargin() : DirectionalEdgesT, + getMargin() : DirectionalEdgesT; /** - * Obtains the padding of the child component. + * Call this method to get the padding of sub component. * * @returns { DirectionalEdgesT } the padding of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29782,18 +28346,18 @@ declare interface Measurable { * @atomicservice * @since 12 */ - getPadding() : DirectionalEdgesT, + getPadding() : DirectionalEdgesT; /** - * Obtains the border width of the child component. + * Call this method to get the borderWidth of sub component. * - * @returns { DirectionalEdgesT } Border width of the child component, unit is vp. + * @returns { DirectionalEdgesT } the borderWidth of sub component, unit is vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ - getBorderWidth() : DirectionalEdgesT, + getBorderWidth() : DirectionalEdgesT; } /** @@ -29805,7 +28369,7 @@ declare interface Measurable { * @since 10 */ /** - * Provides the component size information. + * Sub component SizeResult info. * * @interface SizeResult * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29823,7 +28387,7 @@ declare interface SizeResult { * @since 10 */ /** - * Width obtained from the measurement result. Unit: vp. + * Width obtained from the measurement result. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29842,7 +28406,7 @@ declare interface SizeResult { * @since 10 */ /** - * Height obtained from the measurement result. Unit: vp. + * Height obtained from the measurement result. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -29863,14 +28427,14 @@ declare interface SizeResult { * @since 10 */ /** - * Provides the measurement result of the component. + * Sub component MeasureResult info. * * @extends SizeResult * @interface MeasureResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since 12 */ declare interface MeasureResult extends SizeResult { @@ -29956,7 +28520,6 @@ declare type DrawContext = import('../api/arkui/Graphics').DrawContext; */ declare type VisualEffect = import('../api/@ohos.graphics.uiEffect').default.VisualEffect; - /** * Filter * @@ -29968,6 +28531,7 @@ declare type VisualEffect = import('../api/@ohos.graphics.uiEffect').default.Vis */ declare type Filter = import('../api/@ohos.graphics.uiEffect').default.Filter; + /** * Blender * @@ -30057,8 +28621,7 @@ declare type PromptActionDialogController = import('../api/@ohos.promptAction'). */ declare class CustomComponent extends BaseCustomComponent { /** - * Invoked when a reusable custom component is re-added to the node tree - * from the reuse cache to receive construction parameters of the component. + * aboutToReuse Method * * @param { object } params - Custom component init params. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30066,8 +28629,7 @@ declare class CustomComponent extends BaseCustomComponent { * @since 10 */ /** - * Invoked when a reusable custom component is re-added to the node tree - * from the reuse cache to receive construction parameters of the component. + * aboutToReuse Method * * @param { object } params - Custom component init params. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30076,8 +28638,7 @@ declare class CustomComponent extends BaseCustomComponent { * @since 11 */ /** - * Invoked when a reusable custom component is re-added to the node tree - * from the reuse cache to receive construction parameters of the component. + * aboutToReuse Method * * @param { Record } params - Custom component init params. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30126,9 +28687,9 @@ declare class CustomComponent extends BaseCustomComponent { */ 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. - * + * aboutToReuse Method for @ComponentV2, it is executed when fetching instance of custom component from RecyclePool. + * It is different from the @Reusable in CustomComponent, there is no param parameter in this callback. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -30148,7 +28709,7 @@ declare class CustomComponentV2 extends BaseCustomComponent { * @since 18 */ declare class BaseCustomComponent extends CommonAttribute { - /** + /** * Customize the pop-up content constructor . * * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30190,41 +28751,37 @@ declare class BaseCustomComponent extends CommonAttribute { build(): void; /** - * Invoked after a new instance of the custom component is created - * and before its build() function is executed. You can change state variables in aboutToAppear. - * The change will take effect when you execute the build() function next time. - * The aboutToAppear lifecycle callback of a custom component with a custom layout - * is invoked during the layout process. + * aboutToAppear Method + * + * The aboutToAppear function is executed after a new instance of the custom component is created, before its build() function is executed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Invoked after a new instance of the custom component is created - * and before its build() function is executed. You can change state variables in aboutToAppear. - * The change will take effect when you execute the build() function next time. - * The aboutToAppear lifecycle callback of a custom component with a custom layout - * is invoked during the layout process. + * aboutToAppear Method + * + * The aboutToAppear function is executed after a new instance of the custom component is created, before its build() function is executed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Invoked after a new instance of the custom component is created - * and before its build() function is executed. You can change state variables in aboutToAppear. - * The change will take effect when you execute the build() function next time. - * The aboutToAppear lifecycle callback of a custom component with a custom layout - * is invoked during the layout process. + * aboutToAppear Method + * + * The aboutToAppear function is executed after a new instance of the custom component is created, before its build() function is executed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Invoked after a new instance of the custom component is created - * and before its build() function is executed. You can change state variables in aboutToAppear. - * The change will take effect when you execute the build() function next time. - * The aboutToAppear lifecycle callback of a custom component with a custom layout - * is invoked during the layout process. + * aboutToAppear Method + * + * The aboutToAppear function is executed after a new instance of the custom component is created, before its build() function is executed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -30232,11 +28789,10 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 11 */ /** - * Invoked after a new instance of the custom component is created - * and before its build() function is executed. You can change state variables in aboutToAppear. - * The change will take effect when you execute the build() function next time. - * The aboutToAppear lifecycle callback of a custom component with a custom layout - * is invoked during the layout process. + * aboutToAppear Method and it is migrated from class CustomComponent. + * + * The aboutToAppear function is executed after a new instance of the custom component is created, before its build() function is executed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -30246,33 +28802,37 @@ declare class BaseCustomComponent extends CommonAttribute { aboutToAppear?(): void; /** - * Invoked when this component is about to disappear. - * Do not change state variables in the aboutToDisappear function as doing this can cause unexpected errors. - * For example, the modification of the @Link decorated variable may cause unstable application running. + * aboutToDisappear Method + * + * The aboutToDisappear function executes before a custom component is destroyed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Invoked when this component is about to disappear. - * Do not change state variables in the aboutToDisappear function as doing this can cause unexpected errors. - * For example, the modification of the @Link decorated variable may cause unstable application running. + * aboutToDisappear Method + * + * The aboutToDisappear function executes before a custom component is destroyed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Invoked when this component is about to disappear. - * Do not change state variables in the aboutToDisappear function as doing this can cause unexpected errors. - * For example, the modification of the @Link decorated variable may cause unstable application running. + * aboutToDisappear Method + * + * The aboutToDisappear function executes before a custom component is destroyed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Invoked when this component is about to disappear. - * Do not change state variables in the aboutToDisappear function as doing this can cause unexpected errors. - * For example, the modification of the @Link decorated variable may cause unstable application running. + * aboutToDisappear Method + * + * The aboutToDisappear function executes before a custom component is destroyed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -30280,9 +28840,10 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 11 */ /** - * Invoked when this component is about to disappear. - * Do not change state variables in the aboutToDisappear function as doing this can cause unexpected errors. - * For example, the modification of the @Link decorated variable may cause unstable application running. + * aboutToDisappear Method and it is migrated from class CustomComponent. + * + * The aboutToDisappear function executes before a custom component is destroyed. + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -30318,7 +28879,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 +28888,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 @@ -30405,37 +28966,37 @@ declare class BaseCustomComponent extends CommonAttribute { onMeasureSize?(selfLayoutInfo: GeometryInfo, children: Array, constraint: ConstraintSizeOptions): SizeResult; /** - * 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**. - * + * onPageShow Method + * + * The page is triggered once each time it is displayed, including scenarios such as the routing process and the application entering the foreground + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * 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**. - * + * onPageShow Method + * + * The page is triggered once each time it is displayed, including scenarios such as the routing process and the application entering the foreground + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * 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**. - * + * onPageShow Method + * + * The page is triggered once each time it is displayed, including scenarios such as the routing process and the application entering the foreground + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** - * 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**. - * + * onPageShow Method and it is migrated from class CustomComponent. + * + * The page is triggered once each time it is displayed, including scenarios such as the routing process and the application entering the foreground + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -30444,37 +29005,37 @@ declare class BaseCustomComponent extends CommonAttribute { onPageShow?(): void; /** - * 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**. - * + * onPageHide Method + * + * It is triggered once each time the page is hidden, including scenarios such as the routing process and the application entering the background + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * 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**. - * + * onPageHide Method + * + * It is triggered once each time the page is hidden, including scenarios such as the routing process and the application entering the background + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * 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**. - * + * onPageHide Method + * + * It is triggered once each time the page is hidden, including scenarios such as the routing process and the application entering the background + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ /** - * 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**. - * + * onPageHide Method and it is migrated from class CustomComponent. + * + * It is triggered once each time the page is hidden, including scenarios such as the routing process and the application entering the background + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -30553,11 +29114,8 @@ declare class BaseCustomComponent extends CommonAttribute { /** * onBackPress Method * - * Invoked when the user clicks the Back button. - * 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. - * + * Triggered when the user clicks the back button + * * @returns { void | boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -30565,11 +29123,8 @@ declare class BaseCustomComponent extends CommonAttribute { /** * onBackPress Method * - * Invoked when the user clicks the Back button. - * 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. - * + * Triggered when the user clicks the back button + * * @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. @@ -30580,11 +29135,8 @@ declare class BaseCustomComponent extends CommonAttribute { /** * onBackPress Method * - * Invoked when the user clicks the Back button. - * 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. - * + * Triggered when the user clicks the back button + * * @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. @@ -30594,11 +29146,10 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 11 */ /** - * Invoked when the user clicks the Back button. - * 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. - * + * onBackPress Method and it is migrated from class CustomComponent. + * + * Triggered when the user clicks the back button + * * @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. @@ -30674,9 +29225,6 @@ declare class BaseCustomComponent extends CommonAttribute { /** * Get uniqueId of the custom component. - * This unique ID is assigned by the system to each component. - * If this API is called before the component's corresponding node is created or after it has been destroyed, an - * invalid unique ID, which is -1, will be returned. * * @returns { number } - The uniqueId of the custom component. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30686,9 +29234,6 @@ declare class BaseCustomComponent extends CommonAttribute { */ /** * Get uniqueId of the custom component and it is migrated from class CustomComponent. - * This unique ID is assigned by the system to each component. - * If this API is called before the component's corresponding node is created or after it has been destroyed, an - * invalid unique ID, which is -1, will be returned. * * @returns { number } - The uniqueId of the custom component. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30699,7 +29244,7 @@ declare class BaseCustomComponent extends CommonAttribute { getUniqueId(): number; /** - * Queries the **NavDestination** information of this custom component. + * Queries the navigation destination information. * * @returns { NavDestinationInfo | undefined } The navigation destination information, or undefined if it is not available. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30707,7 +29252,7 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 11 */ /** - * Queries the **NavDestination** information of this custom component. + * Queries the navigation destination information. * * @returns { NavDestinationInfo | undefined } The navigation destination information, or undefined if it is not available. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30716,7 +29261,7 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 12 */ /** - * Queries the **NavDestination** information of this custom component. + * Queries the navigation destination information and it is migrated from class CustomComponent. * * @returns { NavDestinationInfo | undefined } The navigation destination information, or undefined if it is not available. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30740,8 +29285,8 @@ declare class BaseCustomComponent extends CommonAttribute { queryNavDestinationInfo(isInner: Optional): NavDestinationInfo | undefined; /** - * Queries the **Navigation** information of this custom component. - * + * Query the navigation information of the current custom component. + * * @returns { NavigationInfo | undefined } The navigation information, or undefined if it is not available * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -30749,8 +29294,8 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 12 */ /** - * Queries the **Navigation** information of this custom component. - * + * Query the navigation information of the current custom component and it is migrated from class CustomComponent. + * * @returns { NavigationInfo | undefined } The navigation information, or undefined if it is not available * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -30760,7 +29305,7 @@ declare class BaseCustomComponent extends CommonAttribute { queryNavigationInfo(): NavigationInfo | undefined; /** - * Obtains a **RouterPageInfo** instance. + * Query the router page information of the current custom component. * * @returns { RouterPageInfo | undefined } The router page information, or undefined if it is not available. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30769,7 +29314,7 @@ declare class BaseCustomComponent extends CommonAttribute { * @since 12 */ /** - * Obtains a **RouterPageInfo** instance. + * Query the router page information of the current custom component and it is migrated from class CustomComponent. * * @returns { RouterPageInfo | undefined } The router page information, or undefined if it is not available. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30777,7 +29322,7 @@ declare class BaseCustomComponent extends CommonAttribute { * @atomicservice * @since 18 */ - queryRouterPageInfo(): RouterPageInfo | undefined; + queryRouterPageInfo(): RouterPageInfo | undefined; /** * The callback method after the custom component is built. @@ -30799,7 +29344,7 @@ declare class BaseCustomComponent extends CommonAttribute { * @atomicservice * @since 18 */ - onDidBuild?(): void; + onDidBuild?(): void; /** * The dialog controller of the custom component. @@ -30870,7 +29415,7 @@ declare class View { * @since 10 */ /** - * Describe the position, width, and height of a component. + * Rect info. * * @interface RectResult * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30887,7 +29432,7 @@ declare interface RectResult { * @since 10 */ /** - * Horizontal coordinate. + * x:Horizontal coordinate relative to the component. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30905,7 +29450,7 @@ declare interface RectResult { * @since 10 */ /** - * Vertical coordinate. + * y:Vertical axis coordinate relative to the component. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30923,7 +29468,7 @@ declare interface RectResult { * @since 10 */ /** - * Content width. + * Get the width of the current textRect. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -30941,7 +29486,7 @@ declare interface RectResult { * @since 10 */ /** - * Content height. + * Get the height of the current textRect. * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -31003,7 +29548,7 @@ declare interface CaretOffset { * @since 12 */ x: number; - + /** * Get the y of the relative position. * @@ -31071,15 +29616,6 @@ declare abstract class TextContentControllerBase { /** * Get the index and relative position of the CaretOffset. * - *

NOTE: - *
If this API is called when the caret position is updated in the current frame, it will not take effect. - *
For the Search component, the returned position information is the offset of the first character - * relative to the search icon in the component. - *
If no text is entered in the Search component, - * 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 @@ -31099,15 +29635,7 @@ declare abstract class TextContentControllerBase { /** * Get the start and end positions of the text content. * - *

NOTE: - *
If no text is entered, the return value contains the position information, but the size is 0. - *
The position information is the offset of the first character relative to the editable area. - *
For the Search component, the returned position information is the offset of the first character - * relative to the search icon in the component. - *
If there is input, the width in the return value is the fixed width of the editable area. - *

- * - * @returns { RectResult } Text content rect.The unit of the return value is pixel. + * @returns { RectResult } Text content rect. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -31125,8 +29653,7 @@ 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 @@ -31230,7 +29757,7 @@ declare enum ContentClipMode { * @atomicservice * @since 14 */ - SAFE_AREA = 2, + SAFE_AREA = 2 } /** @@ -31254,10 +29781,9 @@ declare enum ContentClipMode { */ declare class ScrollableCommonMethod extends CommonMethod { /** - * Sets the scrollbar state. + * Scrollbar status. * - * @param { BarState } barState - Scrollbar state.
Default value: BarState.Auto for the List, Grid, - * and Scroll components and BarState.Off for the WaterFlow component + * @param { BarState } barState - Scrollbar status. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -31267,11 +29793,9 @@ declare class ScrollableCommonMethod extends CommonMethod { scrollBar(barState: BarState): T; /** - * Sets the scrollbar color. + * Color of the scrollbar. * - * @param { Color | number | string } color - Scrollbar color.
Default value: '\#182431' (40% opacity) - *
A number value indicates a HEX color in RGB or ARGB format, - * for example, 0xffffff. A string value indicates a color in RGB or ARGB format, for example, '#ffffff'. + * @param { Color | number | string } color - Color of the scrollbar. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -31281,7 +29805,7 @@ declare class ScrollableCommonMethod extends CommonMethod { scrollBarColor(color: Color | number | string): T; /** - * Sets the scrollbar width. + * Sets the scrollbar color. * * @param { number | string } value - Scrollbar width.
Default value: 4 *
Unit: vp @@ -31308,14 +29832,10 @@ declare class ScrollableCommonMethod extends CommonMethod { scrollBarMargin(margin: ScrollBarMargin): T; /** - * Sets the effect used when the scroll boundary is reached. + * Edge scrolling effect. * - * @param { EdgeEffect } edgeEffect - Effect used when the scroll boundary is reached. The spring and shadow effects are supported. - *
Default value: EdgeEffect.None for the Grid, Scroll, and WaterFlow components and EdgeEffect.Spring for the List component - * @param { EdgeEffectOptions } options - Whether to enable the scroll effect when the component content is smaller than the component itself. - * The value { alwaysEnabled: true } means to enable the scroll effect, and { alwaysEnabled: false } means the opposite. - *
Default value:
{ alwaysEnabled: false } for the List, Grid, and WaterFlow components, - * and { alwaysEnabled: true } for the Scroll component + * @param { EdgeEffect } edgeEffect - edge scrolling effect. + * @param { EdgeEffectOptions } options - edge scrolling effect options. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -31338,10 +29858,10 @@ declare class ScrollableCommonMethod extends CommonMethod { fadingEdge(enabled: Optional, options?: FadingEdgeOptions): T; /** - * Sets the nested scrolling options. + * 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 @@ -31350,10 +29870,10 @@ declare class ScrollableCommonMethod extends CommonMethod { nestedScroll(value: NestedScrollOptions): T; /** - * Sets whether to support scroll gestures. + * Whether to support scroll gestures by finger or mouse. * - * @param { boolean } value - Whether to support scroll gestures.
Default value: true - * @returns { T } + * @param { boolean } value - Whether to support scroll gestures by finger or mouse. + * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -31362,10 +29882,10 @@ declare class ScrollableCommonMethod extends CommonMethod { enableScrollInteraction(value: boolean): T; /** - * Sets the friction coefficient. + * Friction coefficient. * - * @param { number | Resource } value - Friction coefficient. - * @returns { T } + * @param { number | Resource } value - friction coefficient. + * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -31374,7 +29894,7 @@ declare class ScrollableCommonMethod extends CommonMethod { friction(value: number | Resource): T; /** - * Triggered when the scrollable component scrolls. + * Called when the scrollable scrolls. * * @param { function } event - callback of scrollable, * scrollOffset is offset per frame scrolling, ScrollState is current scroll state. @@ -31401,9 +29921,10 @@ declare class ScrollableCommonMethod extends CommonMethod { onWillScroll(handler: Optional): T; /** - * Triggered when the scrollable component scrolls. + * Called when the scrollable did scroll. * - * @param { OnScrollCallback } handler - Callback triggered when the scrollable component scrolls. + * @param { OnScrollCallback } handler - callback of scrollable, + * scrollOffset is offset this frame did scroll, scrollState is current scroll state. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -31416,7 +29937,7 @@ declare class ScrollableCommonMethod extends CommonMethod { /** * Called when the scrollable will end dragging. * - * @param { OnWillStopDraggingCallback } handler - callback of end dragging. + * @param { OnWillStopDraggingCallback } handler - callback of end dragging, * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -31427,7 +29948,7 @@ declare class ScrollableCommonMethod extends CommonMethod { onWillStopDragging(handler: OnWillStopDraggingCallback): T; /** - * Triggered when the scrollable component reaches the start position. + * Called when the scrollable reaches the start position. * * @param { function } event - Callback function, triggered when the scrollable reaches the start position. * @returns { T } @@ -31439,7 +29960,7 @@ declare class ScrollableCommonMethod extends CommonMethod { onReachStart(event: () => void): T; /** - * Triggered when the scrollable component reaches the end position. + * Called when the scrollable reaches the end position. * * @param { function } event - Callback function, triggered when the scrollable reaches the end position. * @returns { T } @@ -31451,7 +29972,7 @@ declare class ScrollableCommonMethod extends CommonMethod { onReachEnd(event: () => void): T; /** - * Triggered when the scrollable component starts scrolling initiated by the user's finger dragging the component or its scrollbar. + * Called when the scrollable starts scrolling. * * @param { function } event - Callback function, triggered when the scrollable starts scrolling. * @returns { T } @@ -31463,7 +29984,7 @@ declare class ScrollableCommonMethod extends CommonMethod { onScrollStart(event: () => void): T; /** - * Triggered when scrolling stops after the user's finger leaves the screen. + * Called when the scrollable stops scrolling. * * @param { function } event - Callback function, triggered when the scrollable stops scrolling. * @returns { T } @@ -31475,12 +29996,10 @@ declare class ScrollableCommonMethod extends CommonMethod { onScrollStop(event: () => void): T; /** - * Sets the maximum initial velocity at the start of the fling animation that occurs after gesture-driven scrolling ends. + * Limit the max speed when fling. * - * @param { number } speedLimit - Maximum initial velocity at the start of the fling animation. - *
Default value: 9000 - *
Unit: vp/s - *
Value range: (0, +∞). If this parameter is set to a value less than or equal to 0, the default value is used. + * @param { number } speedLimit - Max fling speed, the minimum value is 0, the maximum value is not limited. + * The unit is vp/s. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -31490,8 +30009,8 @@ declare class ScrollableCommonMethod extends CommonMethod { flingSpeedLimit(speedLimit: number): T; /** - * Sets the content clipping area for this scrollable component. - * + * Clip the content of the scrollable container, excluding background. + * * @param { ContentClipMode | RectShape } clip - A value from enum ContentClipMode or a customized clip rect. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -31512,12 +30031,12 @@ declare class ScrollableCommonMethod extends CommonMethod { * @since 18 */ 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 + * Controls whether the scrollable scrolls back to top when status bar is clicked. + * + * @param { boolean } backToTop - whether the scrollable scrolls back to top when status bar is clicked. + * The default value is false. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -31553,7 +30072,7 @@ 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 @@ -31564,30 +30083,30 @@ declare type OnWillScrollCallback = (scrollOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => void | ScrollResult; /** - * On scroll callback using in scrollable onDidScroll. - * - * @typedef { function } OnScrollCallback - * @param { number } scrollOffset - offset this frame did scroll. - * @param { ScrollState } scrollState - current scroll state. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ + * On scroll callback using in scrollable onDidScroll. + * + * @typedef { function } OnScrollCallback + * @param { number } scrollOffset - offset this frame did scroll. + * @param { ScrollState } scrollState - current scroll state. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ declare type OnScrollCallback = (scrollOffset: number, scrollState: ScrollState) => void; /** - * On scroll callback using in scrollable onWillStopDragging. - * - * @typedef { function } OnWillStopDraggingCallback - * @param { number } velocity - The velocity of the scroll view at the moment the touch was released. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ + * On scroll callback using in scrollable onWillStopDragging. + * + * @typedef { function } OnWillStopDraggingCallback + * @param { number } velocity - The veolicity of the scroll view at the moment the touch was released. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ declare type OnWillStopDraggingCallback = (velocity: number) => void; /** @@ -31668,10 +30187,7 @@ declare interface ItemDragEventHandler { */ 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. + * Set the move action. * * @param { Optional } handler * @returns { T } @@ -31683,10 +30199,7 @@ declare class DynamicNode { onMove(handler: Optional): T; /** - * 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 @@ -31697,8 +30210,7 @@ declare class DynamicNode { * @since 20 */ onMove(handler: Optional, eventHandler: ItemDragEventHandler): T; -} - + /** * Define EdgeEffect Options. * @@ -31794,7 +30306,7 @@ 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. @@ -31810,7 +30322,7 @@ 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. @@ -31839,7 +30351,7 @@ 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. @@ -31858,7 +30370,7 @@ 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. @@ -31881,10 +30393,10 @@ declare class ChildrenMainSize { declare interface BackgroundBrightnessOptions { /** - * Brightness change rate. A higher rate means that brightness decreases more quickly. - * If **rate** is set to **0**, **lightUpDegree** will not take effect, meaning no brightening effect will occur. + * Rate represents the rate at which lightUpDegree + * decreases with increasing pixel brightness. * - * @type { number } - The default value is 0.0, value range: (0.0, +∞). + * @type { number } -The default value is 0.0, value range: (0.0, +∞). * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 @@ -31892,9 +30404,11 @@ declare interface BackgroundBrightnessOptions { rate: number; /** - * Light up degree. A greater degree indicates a greater increase in brightness. + * LightUpDegree represents the degree of brightness + * of the rgb value changes when its brightness + * is 0. * - * @type { number } - The default value is 0.0, value range: [-1.0, 1.0]. + * @type { number } -The default value is 0.0, value range: [-1.0, 1.0]. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 @@ -31996,13 +30510,11 @@ declare interface LightSource { * @systemapi * @since 12 */ - color?: ResourceColor; + color?: ResourceColor; } /** - * wrapBuilder is a template function that returns a WrappedBuilder object. - * wrapBuilder only accepts a global @Builder decorated function as its argument. - * Of the WrappedBuilder object it returns, the builder attribute method can be used only inside the struct. + * Defining wrapBuilder function. * @param { function } builder * @returns { WrappedBuilder } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -32010,9 +30522,7 @@ declare interface LightSource { * @since 11 */ /** - * wrapBuilder is a template function that returns a WrappedBuilder object. - * wrapBuilder only accepts a global @Builder decorated function as its argument. - * Of the WrappedBuilder object it returns, the builder attribute method can be used only inside the struct. + * Defining wrapBuilder function. * @param { function } builder * @returns { WrappedBuilder } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -32023,13 +30533,13 @@ declare interface LightSource { declare function wrapBuilder(builder: (...args: Args) => void): WrappedBuilder; /** - * The WrappedBuilder object is also a template class. + * Defines the WrappedBuilder class. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * The WrappedBuilder object is also a template class. + * Defines the WrappedBuilder class. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -32037,14 +30547,12 @@ declare function wrapBuilder(builder: (...args: Args) => */ declare class WrappedBuilder { /** - * global @Builder decorated function. * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11 */ /** - * global @Builder decorated function. * @type { function } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -32153,6 +30661,7 @@ declare interface KeyframeAnimateParam { * Indicates expectedFrameRateRange of keyframe animation. * * @type { ?ExpectedFrameRateRange } + * @default { min: 0, expected: 0, max: 0 } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -32202,6 +30711,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,6 +30720,7 @@ declare interface KeyframeState { * Animation curve of this keyframe. * * @type { ?(Curve | string | ICurve) } + * @default Curve.EaseInOut * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -32247,7 +30758,7 @@ declare interface KeyframeState { * @atomicservice * @since 12 */ -declare interface Callback { +declare interface Callback { /** * Defines the callback info. * @@ -32274,7 +30785,7 @@ declare interface Callback { * @atomicservice * @since 12 */ -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. @@ -32289,7 +30800,7 @@ declare type HoverCallback = (isHover: boolean, event: HoverEvent) => void * @atomicservice * @since 12 */ -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. @@ -32408,7 +30919,7 @@ declare interface UICommonEvent { /** * 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 @@ -32453,7 +30964,7 @@ declare interface UICommonEvent { /** * 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 @@ -32463,29 +30974,29 @@ declare interface UICommonEvent { setOnHover(callback: HoverCallback | undefined): void; /** - * Set or reset the callback which is triggered when has a mouse event. - * - * @param { Callback | undefined } callback - The callback will be triggered when has mouse input. If set undefined will reset the target callback. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ + * Set or reset the callback which is triggered when has a mouse event. + * + * @param { Callback | undefined } callback - The callback will be triggered when has mouse input. If set undefined will reset the target callback. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ setOnMouse(callback: Callback | undefined): void; /** - * Sets the callback for the onSizeChange event. - * - * @param { SizeChangeCallback | undefined } callback - The callback will be triggered when the size of component changed. If set undefined will reset the target callback. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ + * Set or reset the callback which is triggered when the size of component changed. + * + * @param { SizeChangeCallback | undefined } callback - The callback will be triggered when the size of component changed. If set undefined will reset the target callback. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ setOnSizeChange(callback: SizeChangeCallback | undefined): void; /** - * Sets the onVisibleAreaChange callback that limits the callback interval. + * Set or reset the callback which is triggered when the visibleArea of component changed. * * @param { VisibleAreaEventOptions } options - The options for the visibility event. * @param { VisibleAreaChangeCallback | undefined } event - The callback will be triggered when the visibleArea of component changed and get close to any number in ratios defined by options. @@ -32592,7 +31103,7 @@ declare interface UIGestureEvent { addGesture(gesture: GestureHandler, priority?: GesturePriority, mask?: GestureMask): void; /** - * Adds a gesture that can be recognized at once by the component and its child component. + * 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. @@ -32604,7 +31115,7 @@ declare interface UIGestureEvent { addParallelGesture(gesture: GestureHandler, mask?: GestureMask): void; /** - * Remove a gesture from a component that has been bound with a specific tag through a modifier. + * Remove the gesture that is bound to the component and marked as tag. * * @param { string } tag - tag indicates the gesture's tag. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -32627,7 +31138,7 @@ declare interface UIGestureEvent { /** * Defines the gesture modifier. - * + * * @interface GestureModifier * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -32637,7 +31148,7 @@ declare interface UIGestureEvent { declare interface GestureModifier { /** * Defines the gesture update function. - * + * * @param { UIGestureEvent } event * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -32752,7 +31263,7 @@ declare interface FocusMovement { */ declare enum KeyboardAvoidMode { /** - * Automatically avoids the soft keyboard and compresses the height when reaching the maximum limit. + * Defines avoid keyboard when keyboard shows. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -32762,14 +31273,14 @@ declare enum KeyboardAvoidMode { DEFAULT = 0, /** - * Does not avoid the soft keyboard. + * Defines not avoid keyboard when keyboard shows. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 12 */ - NONE = 1, + NONE = 1 } /** @@ -32801,12 +31312,12 @@ declare enum HoverModeAreaType { * @atomicservice * @since 14 */ - BOTTOM_SCREEN = 1, + BOTTOM_SCREEN = 1 } /** * Defines a range of dates. - * + * * @interface DateRange * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform 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/content_slot.d.ts b/api/@internal/component/ets/content_slot.d.ts index bd90fd20c45908b87e2a06683be939ab9d27fd1e..8e45e9a32e92a657332800bd7bf9eb2786edacb5 100644 --- a/api/@internal/component/ets/content_slot.d.ts +++ b/api/@internal/component/ets/content_slot.d.ts @@ -71,4 +71,4 @@ interface ContentSlotInterface { * @atomicservice * @since 12 */ -declare const ContentSlot: ContentSlotInterface; \ No newline at end of file +declare const ContentSlot: ContentSlotInterface; diff --git a/api/@internal/component/ets/context_menu.d.ts b/api/@internal/component/ets/context_menu.d.ts index d730292d8564a43abe2d2699314940fbb13de728..d170cc40d5aca664bf350b8939fb9199dfe764a6 100644 --- a/api/@internal/component/ets/context_menu.d.ts +++ b/api/@internal/component/ets/context_menu.d.ts @@ -12,56 +12,54 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - /** * Defines Close contextMenu. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** * Defines Close contextMenu. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Defines Close contextMenu. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ declare class ContextMenu { - /** - * Invoking method close. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Invoking method close. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Invoking method close. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.ContextMenuController#close - */ - static close(); + /** + * Invoking method close. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Invoking method close. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Invoking method close. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.ContextMenuController#close + */ + static close(); } 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/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..606505938242c1f8347f043ba066a6e7aeba9916 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, Bindable } 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; @@ -285,6 +303,18 @@ declare interface DatePickerOptions { * @since 11 */ selected?: Date; + + /** + * Specifies the date selector check date or time selector check time. + * + * @type { ?(Date | Bindable) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + selected?: Date | Bindable; /** * Date columns to be displayed. @@ -300,7 +330,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 +358,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 +387,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 +415,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 +447,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 +464,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 +487,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 +502,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 +526,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 +542,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; @@ -525,7 +565,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 */ selectedTextStyle(value: PickerTextStyle): DatePickerAttribute; @@ -539,7 +580,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 */ selectedTextStyle(style: Optional): DatePickerAttribute; @@ -583,7 +625,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 +638,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 +652,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,7 +667,8 @@ 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; @@ -646,7 +692,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 +704,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 +717,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 +730,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 +761,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 +789,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; @@ -759,7 +811,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 */ lunarSwitch?: boolean; @@ -772,7 +825,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 */ lunarSwitchStyle?: LunarSwitchStyle; @@ -798,7 +852,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 */ showTime?: boolean; @@ -823,7 +878,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 +899,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 +920,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 +938,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 +956,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; @@ -917,7 +977,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 */ selectedTextStyle?: PickerTextStyle; @@ -938,7 +999,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 +1020,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 +1041,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 +1089,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 +1135,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 +1171,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 +1193,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 +1215,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 +1227,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 +1239,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 +1271,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 +1297,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 +1325,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 +1353,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 +1367,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 +1386,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 +1399,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 +1412,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 +1425,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 +1462,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/effect_component.d.ts b/api/@internal/component/ets/effect_component.d.ts index c09b5630fe460afc86cb7664c991a81a67f4f878..56bf5e879c6fa349028133d1814bd5f887fc1501 100644 --- a/api/@internal/component/ets/effect_component.d.ts +++ b/api/@internal/component/ets/effect_component.d.ts @@ -26,6 +26,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 10 + * @noninterop */ interface EffectComponentInterface { /** @@ -114,6 +115,7 @@ declare interface EffectComponentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 10 + * @noninterop */ declare class EffectComponentAttribute extends CommonMethod { /** @@ -135,6 +137,7 @@ declare class EffectComponentAttribute extends CommonMethodto render UI asynchronously @@ -63,7 +62,7 @@ declare interface TerminationInfo { * @atomicservice * @since 12 */ - code: number; + code: number; /** * Defines the additional termination information. @@ -73,7 +72,7 @@ declare interface TerminationInfo { * @atomicservice * @since 12 */ - want?: import('../api/@ohos.app.ability.Want').default; + want?: import('../api/@ohos.app.ability.Want').default; } /** diff --git a/api/@internal/component/ets/enums.d.ts b/api/@internal/component/ets/enums.d.ts index 94b9a985344692b96121c7377fee9da41acc2d33..d925d91a602b053b56712f4b686eddf3bf2ea1ae 100644 --- a/api/@internal/component/ets/enums.d.ts +++ b/api/@internal/component/ets/enums.d.ts @@ -629,20 +629,23 @@ declare enum ImageFit { Contain, /** - * Keep the aspect ratio to zoom out or zoom in so that both sides of the image are greater than or equal to the display boundary. + * Keep the aspect ratio to zoom out or zoom in so that both sides of the image are greater than or equal to the + * display boundary. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Keep the aspect ratio to zoom out or zoom in so that both sides of the image are greater than or equal to the display boundary. + * Keep the aspect ratio to zoom out or zoom in so that both sides of the image are greater than or equal to the + * display boundary. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Keep the aspect ratio to zoom out or zoom in so that both sides of the image are greater than or equal to the display boundary. + * Keep the aspect ratio to zoom out or zoom in so that both sides of the image are greater than or equal to the + * display boundary. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -650,7 +653,8 @@ declare enum ImageFit { * @since 10 */ /** - * Keep the aspect ratio to zoom out or zoom in so that both sides of the image are greater than or equal to the display boundary. + * Keep the aspect ratio to zoom out or zoom in so that both sides of the image are greater than or equal to the + * display boundary. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -787,7 +791,7 @@ declare enum ImageFit { * @since 11 */ None, - + /** * Top Start. * @@ -1641,7 +1645,7 @@ declare enum MouseAction { * @since 11 */ Hover, - + /** * Triggered when the mouse event is canceled. * @@ -1848,20 +1852,23 @@ declare enum Curve { Linear, /** - * Indicates that the animation starts at a low speed, then accelerates, and then slows down before it ends, CubicBezier(0.25, 0.1, 0.25, 1.0). + * Indicates that the animation starts at a low speed, then accelerates, and then slows down before it ends, + * CubicBezier(0.25, 0.1, 0.25, 1.0). * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Indicates that the animation starts at a low speed, then accelerates, and then slows down before it ends, CubicBezier(0.25, 0.1, 0.25, 1.0). + * Indicates that the animation starts at a low speed, then accelerates, and then slows down before it ends, + * CubicBezier(0.25, 0.1, 0.25, 1.0). * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Indicates that the animation starts at a low speed, then accelerates, and then slows down before it ends, CubicBezier(0.25, 0.1, 0.25, 1.0). + * Indicates that the animation starts at a low speed, then accelerates, and then slows down before it ends, + * CubicBezier(0.25, 0.1, 0.25, 1.0). * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1869,7 +1876,8 @@ declare enum Curve { * @since 10 */ /** - * Indicates that the animation starts at a low speed, then accelerates, and then slows down before it ends, CubicBezier(0.25, 0.1, 0.25, 1.0). + * Indicates that the animation starts at a low speed, then accelerates, and then slows down before it ends, + * CubicBezier(0.25, 0.1, 0.25, 1.0). * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -3310,20 +3318,23 @@ declare enum BarState { */ declare enum EdgeEffect { /** - * Elastic physical action, sliding to the edge can continue to slide for a distance based on the initial speed or touch event, and spring back when released. + * Elastic physical action, sliding to the edge can continue to slide for a distance based on the initial speed or + * touch event, and spring back when released. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Elastic physical action, sliding to the edge can continue to slide for a distance based on the initial speed or touch event, and spring back when released. + * Elastic physical action, sliding to the edge can continue to slide for a distance based on the initial speed or + * touch event, and spring back when released. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Elastic physical action, sliding to the edge can continue to slide for a distance based on the initial speed or touch event, and spring back when released. + * Elastic physical action, sliding to the edge can continue to slide for a distance based on the initial speed or + * touch event, and spring back when released. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -3331,7 +3342,8 @@ declare enum EdgeEffect { * @since 10 */ /** - * Elastic physical action, sliding to the edge can continue to slide for a distance based on the initial speed or touch event, and spring back when released. + * Elastic physical action, sliding to the edge can continue to slide for a distance based on the initial speed or + * touch event, and spring back when released. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -4269,20 +4281,23 @@ declare enum LineCapStyle { 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 line width and a height equal to the + * 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 line width and a height equal to the + * 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 line width and a height equal to the + * line width. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -4290,7 +4305,8 @@ 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 line width and a height equal to the + * line width. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -4606,14 +4622,16 @@ declare enum FlexAlign { /** * The elements are centered in the direction of the principal axis, - * and the first element is the same distance from the beginning of the row as the last element is from the end of the row. + * and the first element is the same distance from the beginning of the row as the last element is from the end of + * the row. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** * The elements are centered in the direction of the principal axis, - * and the first element is the same distance from the beginning of the row as the last element is from the end of the row. + * and the first element is the same distance from the beginning of the row as the last element is from the end of + * the row. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form @@ -4621,7 +4639,8 @@ declare enum FlexAlign { */ /** * The elements are centered in the direction of the principal axis, - * and the first element is the same distance from the beginning of the row as the last element is from the end of the row. + * and the first element is the same distance from the beginning of the row as the last element is from the end of + * the row. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -4630,7 +4649,8 @@ declare enum FlexAlign { */ /** * The elements are centered in the direction of the principal axis, - * and the first element is the same distance from the beginning of the row as the last element is from the end of the row. + * and the first element is the same distance from the beginning of the row as the last element is from the end of + * the row. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -4718,7 +4738,8 @@ declare enum FlexAlign { /** * Elastic elements are evenly distributed in the direction of the Flex principal axis, - * with the same distance between adjacent elements. Half the distance between adjacent elements as the distance between + * with the same distance between adjacent elements. Half the distance between adjacent elements as the distance + * between * the first element and the distance between the last element and the end of the row. * * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -4726,7 +4747,8 @@ declare enum FlexAlign { */ /** * Elastic elements are evenly distributed in the direction of the Flex principal axis, - * with the same distance between adjacent elements. Half the distance between adjacent elements as the distance between + * with the same distance between adjacent elements. Half the distance between adjacent elements as the distance + * between * the first element and the distance between the last element and the end of the row. * * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -4735,7 +4757,8 @@ declare enum FlexAlign { */ /** * Elastic elements are evenly distributed in the direction of the Flex principal axis, - * with the same distance between adjacent elements. Half the distance between adjacent elements as the distance between + * with the same distance between adjacent elements. Half the distance between adjacent elements as the distance + * between * the first element and the distance between the last element and the end of the row. * * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -4745,7 +4768,8 @@ declare enum FlexAlign { */ /** * Elastic elements are evenly distributed in the direction of the Flex principal axis, - * with the same distance between adjacent elements. Half the distance between adjacent elements as the distance between + * with the same distance between adjacent elements. Half the distance between adjacent elements as the distance + * between * the first element and the distance between the last element and the end of the row. * * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -4993,20 +5017,23 @@ declare enum ItemAlign { Baseline, /** - * Element In a Flex container, the fill is stretched across the axis and, when no dimension is set, to the container size. + * Element In a Flex container, the fill is stretched across the axis and, when no dimension is set, to the container + * size. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Element In a Flex container, the fill is stretched across the axis and, when no dimension is set, to the container size. + * Element In a Flex container, the fill is stretched across the axis and, when no dimension is set, to the container + * size. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Element In a Flex container, the fill is stretched across the axis and, when no dimension is set, to the container size. + * Element In a Flex container, the fill is stretched across the axis and, when no dimension is set, to the container + * size. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -5014,7 +5041,8 @@ declare enum ItemAlign { * @since 10 */ /** - * Element In a Flex container, the fill is stretched across the axis and, when no dimension is set, to the container size. + * Element In a Flex container, the fill is stretched across the axis and, when no dimension is set, to the container + * size. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -5333,20 +5361,23 @@ declare enum FlexWrap { NoWrap, /** - * The elements of the Flex container are arranged in multiple rows or columns, and the sub-items are allowed to exceed the container. + * The elements of the Flex container are arranged in multiple rows or columns, and the sub-items are allowed to + * exceed the container. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * The elements of the Flex container are arranged in multiple rows or columns, and the sub-items are allowed to exceed the container. + * The elements of the Flex container are arranged in multiple rows or columns, and the sub-items are allowed to + * exceed the container. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * The elements of the Flex container are arranged in multiple rows or columns, and the sub-items are allowed to exceed the container. + * The elements of the Flex container are arranged in multiple rows or columns, and the sub-items are allowed to + * exceed the container. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -5354,7 +5385,8 @@ declare enum FlexWrap { * @since 10 */ /** - * The elements of the Flex container are arranged in multiple rows or columns, and the sub-items are allowed to exceed the container. + * The elements of the Flex container are arranged in multiple rows or columns, and the sub-items are allowed to + * exceed the container. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -5365,20 +5397,23 @@ declare enum FlexWrap { Wrap, /** - * The elements of the Flex container are arranged in reverse multiple rows/columns, and children are allowed to exceed the container. + * The elements of the Flex container are arranged in reverse multiple rows/columns, and children are allowed to + * exceed the container. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * The elements of the Flex container are arranged in reverse multiple rows/columns, and children are allowed to exceed the container. + * The elements of the Flex container are arranged in reverse multiple rows/columns, and children are allowed to + * exceed the container. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * The elements of the Flex container are arranged in reverse multiple rows/columns, and children are allowed to exceed the container. + * The elements of the Flex container are arranged in reverse multiple rows/columns, and children are allowed to + * exceed the container. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -5386,7 +5421,8 @@ declare enum FlexWrap { * @since 10 */ /** - * The elements of the Flex container are arranged in reverse multiple rows/columns, and children are allowed to exceed the container. + * The elements of the Flex container are arranged in reverse multiple rows/columns, and children are allowed to + * exceed the container. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -5761,20 +5797,23 @@ declare enum ImageSize { Auto, /** - * Keep the aspect ratio to zoom in or out the image so that both sides of the image are greater than or equal to the display boundary. + * Keep the aspect ratio to zoom in or out the image so that both sides of the image are greater than or equal to the + * display boundary. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Keep the aspect ratio to zoom in or out the image so that both sides of the image are greater than or equal to the display boundary. + * Keep the aspect ratio to zoom in or out the image so that both sides of the image are greater than or equal to the + * display boundary. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Keep the aspect ratio to zoom in or out the image so that both sides of the image are greater than or equal to the display boundary. + * Keep the aspect ratio to zoom in or out the image so that both sides of the image are greater than or equal to the + * display boundary. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -5782,7 +5821,8 @@ declare enum ImageSize { * @since 10 */ /** - * Keep the aspect ratio to zoom in or out the image so that both sides of the image are greater than or equal to the display boundary. + * Keep the aspect ratio to zoom in or out the image so that both sides of the image are greater than or equal to the + * display boundary. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -6185,14 +6225,16 @@ declare enum GradientDirection { */ declare enum SharedTransitionEffectType { /** - * The location of the destination page element remains unchanged, and you can configure the transparency animation. Currently, + * The location of the destination page element remains unchanged, and you can configure the transparency animation. + * Currently, * only the static effect configured for redirecting to the target page takes effect. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * The location of the destination page element remains unchanged, and you can configure the transparency animation. Currently, + * The location of the destination page element remains unchanged, and you can configure the transparency animation. + * Currently, * only the static effect configured for redirecting to the target page takes effect. * * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -6200,7 +6242,8 @@ declare enum SharedTransitionEffectType { * @since 10 */ /** - * The location of the destination page element remains unchanged, and you can configure the transparency animation. Currently, + * The location of the destination page element remains unchanged, and you can configure the transparency animation. + * Currently, * only the static effect configured for redirecting to the target page takes effect. * * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -8050,9 +8093,8 @@ declare enum HitTestMode { * @since 11 */ None, - /** - * Blocks all lower priority siblings and parents node from receiving the event. + * Blocks all lower-priority siblings and parent nodes from receiving the event. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8060,10 +8102,9 @@ declare enum HitTestMode { * @since 20 */ BLOCK_HIERARCHY, - /** * Self not respond to the hit test for touch events, - * and all descebdants (children, grandchildren, etc.) not respond to the hit test for touch events too. + * and all descendants (children, grandchildren, etc.) not respond to the hit test for touch events too. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -8453,7 +8494,7 @@ declare enum FunctionKey { * @since 11 */ F12, - + /** * Tab key. * @@ -8708,7 +8749,7 @@ declare enum ClickEffectLevel { * Click effect level1. * The default scale number of this click effect level1 is 0.90. * The animation type is interpolatingSpring, velocity:10, mass:1, stiffness:410, damping:38. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -8717,7 +8758,7 @@ declare enum ClickEffectLevel { * Click effect level1. * The default scale number of this click effect level1 is 0.90. * The animation type is interpolatingSpring, velocity:10, mass:1, stiffness:410, damping:38. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -8729,7 +8770,7 @@ declare enum ClickEffectLevel { * Click effect level2. * The default scale number of this click effect level2 is 0.95. * The animation type is interpolatingSpring, velocity:10, mass:1, stiffness:350, damping:35. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -8738,7 +8779,7 @@ declare enum ClickEffectLevel { * Click effect level2. * The default scale number of this click effect level2 is 0.95. * The animation type is interpolatingSpring, velocity:10, mass:1, stiffness:350, damping:35. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -8750,7 +8791,7 @@ declare enum ClickEffectLevel { * Click effect level3. * The default scale number of this click effect level3 is 0.95. * The animation type is interpolatingSpring, velocity:0, mass:1, stiffness:240, damping:28. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -8759,7 +8800,7 @@ declare enum ClickEffectLevel { * Click effect level3. * The default scale number of this click effect level3 is 0.95. * The animation type is interpolatingSpring, velocity:0, mass:1, stiffness:240, damping:28. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9024,7 +9065,7 @@ declare enum ScrollSource { /** * Enum of RenderFit - * + * * @enum { number } RenderFit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -9032,7 +9073,7 @@ declare enum ScrollSource { */ /** * Enum of RenderFit - * + * * @enum { number } RenderFit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -9041,7 +9082,7 @@ declare enum ScrollSource { */ /** * Enum of RenderFit - * + * * @enum { number } RenderFit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -9052,14 +9093,14 @@ declare enum ScrollSource { declare enum RenderFit { /** * Without scaling the content area, the content area is drawn in the center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Without scaling the content area, the content area is drawn in the center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9067,7 +9108,7 @@ declare enum RenderFit { */ /** * Without scaling the content area, the content area is drawn in the center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9077,14 +9118,14 @@ declare enum RenderFit { CENTER = 0, /** * Without scaling the content area, the content area is drawn in the top center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Without scaling the content area, the content area is drawn in the top center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9092,7 +9133,7 @@ declare enum RenderFit { */ /** * Without scaling the content area, the content area is drawn in the top center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9102,14 +9143,14 @@ declare enum RenderFit { TOP = 1, /** * Without scaling the content area, the content area is drawn in the bottom center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Without scaling the content area, the content area is drawn in the bottom center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9117,7 +9158,7 @@ declare enum RenderFit { */ /** * Without scaling the content area, the content area is drawn in the bottom center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9127,14 +9168,14 @@ declare enum RenderFit { BOTTOM = 2, /** * Without scaling the content area, the content area is drawn in the left center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Without scaling the content area, the content area is drawn in the left center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9142,7 +9183,7 @@ declare enum RenderFit { */ /** * Without scaling the content area, the content area is drawn in the left center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9152,14 +9193,14 @@ declare enum RenderFit { LEFT = 3, /** * Without scaling the content area, the content area is drawn in the right center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Without scaling the content area, the content area is drawn in the right center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9167,7 +9208,7 @@ declare enum RenderFit { */ /** * Without scaling the content area, the content area is drawn in the right center of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9177,14 +9218,14 @@ declare enum RenderFit { RIGHT = 4, /** * Without scaling the content area, the content area is drawn in the top left of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Without scaling the content area, the content area is drawn in the top left of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9192,7 +9233,7 @@ declare enum RenderFit { */ /** * Without scaling the content area, the content area is drawn in the top left of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9202,14 +9243,14 @@ declare enum RenderFit { TOP_LEFT = 5, /** * Without scaling the content area, the content area is drawn in the top right of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Without scaling the content area, the content area is drawn in the top right of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9217,7 +9258,7 @@ declare enum RenderFit { */ /** * Without scaling the content area, the content area is drawn in the top right of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9227,14 +9268,14 @@ declare enum RenderFit { TOP_RIGHT = 6, /** * Without scaling the content area, the content area is drawn in the bottom left of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Without scaling the content area, the content area is drawn in the bottom left of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9242,7 +9283,7 @@ declare enum RenderFit { */ /** * Without scaling the content area, the content area is drawn in the bottom left of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9252,14 +9293,14 @@ declare enum RenderFit { BOTTOM_LEFT = 7, /** * Without scaling the content area, the content area is drawn in the bottom right of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Without scaling the content area, the content area is drawn in the bottom right of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9267,7 +9308,7 @@ declare enum RenderFit { */ /** * Without scaling the content area, the content area is drawn in the bottom right of the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9277,14 +9318,14 @@ declare enum RenderFit { BOTTOM_RIGHT = 8, /** * Scale the length and width of the content area to the node size to fill the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Scale the length and width of the content area to the node size to fill the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9292,7 +9333,7 @@ declare enum RenderFit { */ /** * Scale the length and width of the content area to the node size to fill the node. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9302,18 +9343,18 @@ declare enum RenderFit { RESIZE_FILL = 9, /** * Scale the length or width of the content to the length or width of the node, ensuring that one side is equal, - * the other side is less than or equal to the corresponding side of the node, and the content after scaling + * the other side is less than or equal to the corresponding side of the node, and the content after scaling * is centered. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Scale the length or width of the content to the length or width of the node, ensuring that one side is equal, - * the other side is less than or equal to the corresponding side of the node, and the content after scaling + * the other side is less than or equal to the corresponding side of the node, and the content after scaling * is centered. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9321,9 +9362,9 @@ declare enum RenderFit { */ /** * Scale the length or width of the content to the length or width of the node, ensuring that one side is equal, - * the other side is less than or equal to the corresponding side of the node, and the content after scaling + * the other side is less than or equal to the corresponding side of the node, and the content after scaling * is centered. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9337,7 +9378,7 @@ declare enum RenderFit { * is less than or equal to the height of the node, the scaled content area is displayed at the top; otherwise, * the width of the scaled content is less than or equal to the width of the node, the scaled content area is * displayed at the left. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -9348,7 +9389,7 @@ declare enum RenderFit { * is less than or equal to the height of the node, the scaled content area is displayed at the top; otherwise, * the width of the scaled content is less than or equal to the width of the node, the scaled content area is * displayed at the left. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9360,7 +9401,7 @@ declare enum RenderFit { * is less than or equal to the height of the node, the scaled content area is displayed at the top; otherwise, * the width of the scaled content is less than or equal to the width of the node, the scaled content area is * displayed at the left. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9374,7 +9415,7 @@ declare enum RenderFit { * is less than or equal to the height of the node, the scaled content area is displayed at the bottom; otherwise, * the width of the scaled content is less than or equal to the width of the node, the scaled content area is * displayed at the right. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -9385,7 +9426,7 @@ declare enum RenderFit { * is less than or equal to the height of the node, the scaled content area is displayed at the bottom; otherwise, * the width of the scaled content is less than or equal to the width of the node, the scaled content area is * displayed at the right. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9397,7 +9438,7 @@ declare enum RenderFit { * is less than or equal to the height of the node, the scaled content area is displayed at the bottom; otherwise, * the width of the scaled content is less than or equal to the width of the node, the scaled content area is * displayed at the right. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9407,18 +9448,18 @@ declare enum RenderFit { RESIZE_CONTAIN_BOTTOM_RIGHT = 12, /** * Scale the length or width of the content to the length or width of the node, ensuring that one side is equal, - * the other side is greater than or equal to the corresponding side of the node, and the content after scaling + * the other side is greater than or equal to the corresponding side of the node, and the content after scaling * displays the center area. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** * Scale the length or width of the content to the length or width of the node, ensuring that one side is equal, - * the other side is greater than or equal to the corresponding side of the node, and the content after scaling + * the other side is greater than or equal to the corresponding side of the node, and the content after scaling * displays the center area. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9426,9 +9467,9 @@ declare enum RenderFit { */ /** * Scale the length or width of the content to the length or width of the node, ensuring that one side is equal, - * the other side is greater than or equal to the corresponding side of the node, and the content after scaling + * the other side is greater than or equal to the corresponding side of the node, and the content after scaling * displays the center area. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9442,7 +9483,7 @@ declare enum RenderFit { * is greater than or equal to the height of the node, the scaled content area displays the top area; otherwise, * the width of the scaled content is greater than or equal to the width of the node, the scaled content area * displays the left area. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -9453,7 +9494,7 @@ declare enum RenderFit { * is greater than or equal to the height of the node, the scaled content area displays the top area; otherwise, * the width of the scaled content is greater than or equal to the width of the node, the scaled content area * displays the left area. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9465,7 +9506,7 @@ declare enum RenderFit { * is greater than or equal to the height of the node, the scaled content area displays the top area; otherwise, * the width of the scaled content is greater than or equal to the width of the node, the scaled content area * displays the left area. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9479,7 +9520,7 @@ declare enum RenderFit { * is greater than or equal to the height of the node, the scaled content area displays the bottom area; otherwise, * the width of the scaled content is greater than or equal to the width of the node, the scaled content area * displays the right area. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 @@ -9490,7 +9531,7 @@ declare enum RenderFit { * is greater than or equal to the height of the node, the scaled content area displays the bottom area; otherwise, * the width of the scaled content is greater than or equal to the width of the node, the scaled content area * displays the right area. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -9502,7 +9543,7 @@ declare enum RenderFit { * is greater than or equal to the height of the node, the scaled content area displays the bottom area; otherwise, * the width of the scaled content is greater than or equal to the width of the node, the scaled content area * displays the right area. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form @@ -9641,7 +9682,7 @@ declare enum LineBreakStrategy { * @atomicservice * @since 12 */ - HIGH_QUALITY = 1, + HIGH_QUALITY = 1, /** * Balanced folding. We will try our best to ensure that the width of each line in a paragraph @@ -9652,7 +9693,7 @@ declare enum LineBreakStrategy { * @atomicservice * @since 12 */ - BALANCED = 2, + BALANCED = 2, } /** @@ -9805,7 +9846,7 @@ declare type Nullable = T | undefined; /** - * Decide whether the width of select menu fit the trigger or content + * Decide whether the width of select menu fit the trigger or content * * @enum { string } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9813,7 +9854,7 @@ declare type Nullable = T | undefined; * @since 11 */ /** - * Decide whether the width of select menu fit the trigger or content + * Decide whether the width of select menu fit the trigger or content * * @enum { string } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10016,7 +10057,7 @@ declare enum EmbeddedType { * @atomicservice * @since 12 */ -declare enum MarqueeUpdateStrategy { +declare enum MarqueeUpdateStrategy { /** * Reset scroll position and restart scroll. * @@ -10040,7 +10081,7 @@ declare enum MarqueeUpdateStrategy { /** * Type of text decoration line style. - * + * * @enum {number} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -10050,7 +10091,7 @@ declare enum MarqueeUpdateStrategy { declare enum TextDecorationStyle { /** * Solid line. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -10060,7 +10101,7 @@ declare enum TextDecorationStyle { /** * Double lines. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -10070,7 +10111,7 @@ declare enum TextDecorationStyle { /** * Dotted line. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -10080,7 +10121,7 @@ declare enum TextDecorationStyle { /** * Dashed line. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -10090,7 +10131,7 @@ declare enum TextDecorationStyle { /** * Wavy line. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -10302,7 +10343,6 @@ declare enum AxisModel { ABS_X = 0, /** - * ABS_Y axis type. * * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -10366,40 +10406,6 @@ declare enum AxisModel { ABS_HAT0Y = 7, } -/** - * Page flip mode of Swiper and Tabs on mouse wheel event. - - * @enum { number } PageFlipMode - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 15 - */ -declare enum PageFlipMode { - /** - * Turn pages continuously according to the number of mouse wheel events. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 15 - */ - CONTINUOUS = 0, - - /** - * The page-turning animation remains unresponsive to other mouse wheel events until it completes. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 15 - */ - SINGLE = 1, -} - /** * Focus wrap mode of a list or grid when moving focus using the arrow keys. @@ -10505,6 +10511,40 @@ declare enum CrownSensitivity { HIGH = 2 } +/** + * Page flip mode of Swiper and Tabs on mouse wheel event. + + * @enum { number } PageFlipMode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 15 + */ +declare enum PageFlipMode { + /** + * Turn pages continuously according to the number of mouse wheel events. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 15 + */ + CONTINUOUS = 0, + + /** + * The page-turning animation remains unresponsive to other mouse wheel events until it completes. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 15 + */ + SINGLE = 1, +} + /** * Type of axis action. * @@ -10570,7 +10610,7 @@ declare enum AxisAction { * @atomicservice * @since 19 */ - declare enum FocusDrawLevel { +declare enum FocusDrawLevel { /** * Draw focus on node self level. * @@ -10647,7 +10687,7 @@ declare enum EventQueryType { } /** - * Follow position type. + * Tips show position type. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full diff --git a/api/@internal/component/ets/flow_item.d.ts b/api/@internal/component/ets/flow_item.d.ts index 83656920348360e55b7d6e14c4567918f07fc1e3..9f803bda91c39a3ecff5432178989610a91232d6 100644 --- a/api/@internal/component/ets/flow_item.d.ts +++ b/api/@internal/component/ets/flow_item.d.ts @@ -18,6 +18,7 @@ * @kit ArkUI */ + /** * Mesh container for static fixed-size layout scenarios. * diff --git a/api/@internal/component/ets/folder_stack.d.ts b/api/@internal/component/ets/folder_stack.d.ts index 0c93809ea69c22d58fd3ab6a78022366d2dcddde..571e3102b6c8ac2b6fa90c7edbcbbf18ce33f972 100644 --- a/api/@internal/component/ets/folder_stack.d.ts +++ b/api/@internal/component/ets/folder_stack.d.ts @@ -185,7 +185,6 @@ declare type OnFoldStatusChangeCallback = (event: OnFoldStatusChangeInfo) => voi */ declare type OnHoverStatusChangeCallback = (param: HoverEventParam) => void; -/** /** * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full diff --git a/api/@internal/component/ets/form_component.d.ts b/api/@internal/component/ets/form_component.d.ts index a0a4f51d1660d4a8b47e78dcabb4facfc9256c4a..3e9d4c6c3de7db22c733a5940009c217452ce57d 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 } + * @enum { int } * @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,8 +79,9 @@ declare enum FormDimension { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 + * @deprecated since 20 */ - Dimension_2_1, + Dimension_2_1 = 4, /** * 1 x 1 cards @@ -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,27 +119,20 @@ 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 } /** * Defines the FormRenderingMode enum. * - * @enum { number } + * @enum { int } * @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, } @@ -151,10 +160,11 @@ declare enum FormRenderingMode { /** * Defines the FormShape enum. * - * @enum { number } + * @enum { int } * @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,18 +194,20 @@ 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 { /** * The id the form. * - * @type { number | string } + * @type { long | 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; + id: long | string; /** * The name of the form. @@ -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,7 +313,8 @@ 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; } @@ -292,14 +325,15 @@ 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 { /** * Set a new value. * * @param { { - * id: number; + * id: long; * name: string; * bundle: string; * ability: string; @@ -338,7 +372,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,18 +384,20 @@ 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 { /** * The id of the form. * - * @type { number } + * @type { long } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - id: number; + id: long; /** * The string id of the form. @@ -368,7 +405,8 @@ 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; } @@ -376,33 +414,35 @@ interface FormCallbackInfo { /** * 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 { /** * The width of the form. * Anonymous Object Rectification * - * @type { number } + * @type { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - width: number; - + width: double; /** * The height of the form. * Anonymous Object Rectification * - * @type { number } + * @type { double } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - height: number; + height: double; } /** @@ -411,19 +451,21 @@ 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 { /** * Error code. * Anonymous Object Rectification * - * @type { number } + * @type { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - errcode: number; + errcode: int; /** * Error information. @@ -432,7 +474,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 +484,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 +499,13 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -542,13 +591,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 +618,8 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -589,7 +639,8 @@ declare class FormComponentAttribute extends CommonMethod): FormComponentAttribute; @@ -604,13 +655,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/grid.d.ts b/api/@internal/component/ets/grid.d.ts index 4ff5042993145c4d84caed5cd110a14f8e69a847..0464889341d3d118dd79440b127290887d38e6be 100644 --- a/api/@internal/component/ets/grid.d.ts +++ b/api/@internal/component/ets/grid.d.ts @@ -18,6 +18,7 @@ * @kit ArkUI */ + /** * The options to help grid layout * @@ -1235,18 +1236,6 @@ declare class GridAttribute extends ScrollableCommonMethod { */ focusWrapMode(mode: Optional): GridAttribute; - /** - * Set whether to synchronously load child nodes within one frame. - * - * @param { boolean } enable - Whether to synchronously load child nodes within one frame - * @returns { GridAttribute } The attribute of the grid. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - syncLoad(enable: boolean): GridAttribute; - /** * Called When sliding the grid. * @@ -1379,7 +1368,18 @@ 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; } /** diff --git a/api/@internal/component/ets/gridItem.d.ts b/api/@internal/component/ets/gridItem.d.ts index 3f6b51c3f778193238bf2c476fad04ca98b63068..bee0e059369c660e51330edbcbf93f42c7e1a94c 100644 --- a/api/@internal/component/ets/gridItem.d.ts +++ b/api/@internal/component/ets/gridItem.d.ts @@ -18,6 +18,7 @@ * @kit ArkUI */ + /** * Defines the grid item style. * diff --git a/api/@internal/component/ets/image.d.ts b/api/@internal/component/ets/image.d.ts index 5be59d65489a3688252714a71e6ca14a314771b0..9a930bd96e3702f2fbb3a4c8f0a9749fa00260ca 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. * @@ -55,6 +80,17 @@ declare type DrawingColorFilter = import('../api/@ohos.graphics.drawing').defaul */ 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. * @@ -66,6 +102,18 @@ declare type ResolutionQuality = import('../api/@ohos.multimedia.image').defaul */ 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,7 +332,8 @@ declare enum DynamicRangeMode { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ImageInterpolation { /** @@ -294,7 +364,8 @@ declare enum ImageInterpolation { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ None, @@ -326,7 +397,8 @@ declare enum ImageInterpolation { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Low, @@ -358,7 +430,8 @@ declare enum ImageInterpolation { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Medium, @@ -390,7 +463,8 @@ declare enum ImageInterpolation { * @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,7 +806,8 @@ interface ImageInterface { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageSourceSize { @@ -642,7 +854,8 @@ interface ImageSourceSize { * @crossplatform * @form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ width: 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 { /** @@ -795,7 +1012,8 @@ declare class ImageAttribute extends CommonMethod { * @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; @@ -969,6 +1189,7 @@ declare class ImageAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ fillColor(color: ResourceColor | ColorContent | ColorMetrics): ImageAttribute; @@ -1008,7 +1229,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 +1242,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 +1288,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 +1335,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 +1382,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; @@ -1173,7 +1399,8 @@ declare class ImageAttribute extends CommonMethod { * dynamicRangeMode.Standard. * @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,7 +1456,8 @@ 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; @@ -1292,7 +1520,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 +1568,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 +1616,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 +1654,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; @@ -1458,7 +1690,8 @@ declare class ImageAttribute 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): ImageAttribute; @@ -1469,7 +1702,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 +1716,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 +2035,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 +2085,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 +2135,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 +2170,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 +2182,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,7 +2214,8 @@ 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; @@ -1976,7 +2231,8 @@ 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; @@ -1987,7 +2243,8 @@ declare class ImageAttribute extends CommonMethod { * @returns { ImageAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enhancedImageQuality(imageQuality: ResolutionQuality): ImageAttribute; @@ -2000,7 +2257,8 @@ declare class ImageAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ orientation(orientation: ImageRotateOrientation) : ImageAttribute; } @@ -2099,10 +2357,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 +2395,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 +2424,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 +2454,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,7 +2476,8 @@ declare interface ImageError { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ message: string @@ -2213,6 +2490,7 @@ declare interface ImageError { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ error?: BusinessError; } @@ -2232,7 +2510,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 +2529,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 +2541,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..32f8826119dc8227a7be868565bc32aaf8f0d615 100644 --- a/api/@internal/component/ets/image_animator.d.ts +++ b/api/@internal/component/ets/image_animator.d.ts @@ -18,6 +18,13 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource } from "../../global/resource"; +import image from '../../@ohos.multimedia.image' +import { CommonMethod, PixelMap } from './common' +import { AnimationStatus,FillMode } from './enums' +/*** endif */ + /** * Defines the ImageAnimator Interface. * @@ -42,7 +49,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ImageAnimatorInterface { /** @@ -69,7 +77,8 @@ interface ImageAnimatorInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): ImageAnimatorAttribute; } @@ -98,7 +107,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 +152,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 +180,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 +208,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 +236,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 +264,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 +290,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 +320,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 { /** @@ -338,7 +355,8 @@ declare class ImageAnimatorAttribute extends CommonMethod): ImageAnimatorAttribute; @@ -369,7 +387,8 @@ declare class ImageAnimatorAttribute extends CommonMethod void): ImageAnimatorAttribute; @@ -617,7 +643,8 @@ declare class ImageAnimatorAttribute extends CommonMethod void): ImageAnimatorAttribute; @@ -646,7 +673,8 @@ declare class ImageAnimatorAttribute extends CommonMethod void): ImageAnimatorAttribute; @@ -677,7 +705,8 @@ declare class ImageAnimatorAttribute extends CommonMethod void): ImageAnimatorAttribute; @@ -708,7 +737,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/index-full.d.ts b/api/@internal/component/ets/index-full.d.ts index 61242b23f2018437b1cd0f7473230b81acb969e9..c7759460f30f6a5e9338b421c5796be38f59eec0 100644 --- a/api/@internal/component/ets/index-full.d.ts +++ b/api/@internal/component/ets/index-full.d.ts @@ -64,7 +64,6 @@ /// /// /// -/// /// /// /// @@ -150,4 +149,4 @@ /// /// /// -/// +/// \ No newline at end of file diff --git a/api/@internal/component/ets/indicatorcomponent.d.ts b/api/@internal/component/ets/indicatorcomponent.d.ts index 88e13f3b95623c813f011f370ef686e72c5b38ef..c8bce3374b74a44c11962df144bce2434be37e66 100644 --- a/api/@internal/component/ets/indicatorcomponent.d.ts +++ b/api/@internal/component/ets/indicatorcomponent.d.ts @@ -85,6 +85,7 @@ declare class IndicatorComponentController { * @form * @atomicservice * @since 15 + * @noninterop */ interface IndicatorComponentInterface { @@ -111,6 +112,7 @@ interface IndicatorComponentInterface { * @form * @atomicservice * @since 15 + * @noninterop */ declare class IndicatorComponentAttribute extends CommonMethod { /** @@ -200,6 +202,7 @@ declare class IndicatorComponentAttribute extends CommonMethodNOTE *
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) } @@ -2104,18 +2106,6 @@ declare class ListAttribute extends ScrollableCommonMethod { */ focusWrapMode(mode: Optional): ListAttribute; - /** - * Set whether to synchronously load child nodes within one frame. - * - * @param { boolean } enable - Whether to synchronously load child nodes within one frame - * @returns { ListAttribute } The attribute of the list. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - syncLoad(enable: boolean): ListAttribute; - /** * Called when the offset and status callback of the slide are set. * @@ -2584,7 +2574,19 @@ declare class ListAttribute extends ScrollableCommonMethod { * @atomicservice * @since 11 */ - onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): 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 + */ + onScrollFrameBegin(event: OnScrollFrameBeginCallback): ListAttribute; } /** diff --git a/api/@internal/component/ets/list_item.d.ts b/api/@internal/component/ets/list_item.d.ts index ae66c200dc373eae80da40e21983066e76c1ecf8..e495eebd63803fc142661dc4a33fa0f911c33f5c 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,7 @@ * @kit ArkUI */ + /** * Declare item ceiling attribute. * diff --git a/api/@internal/component/ets/list_item_group.d.ts b/api/@internal/component/ets/list_item_group.d.ts index 1033ca2cd06f270becb7cd3008d9d0c02ac887d2..d057851109a0731d8df10600c4b678f52783e225 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,7 @@ * @kit ArkUI */ + /** * Defines the list item group style. * diff --git a/api/@internal/component/ets/loading_progress.d.ts b/api/@internal/component/ets/loading_progress.d.ts index 3d0d2531998eea3d2c9ab73141f263c9914db687..d43e965b41ef87ece2bc06d3b7c6ece221cfa3d3 100644 --- a/api/@internal/component/ets/loading_progress.d.ts +++ b/api/@internal/component/ets/loading_progress.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod,ContentModifier,CommonConfiguration } from './common' +import { ResourceColor } from './units' +/*** endif */ + /** * Load style of progress bar. * @@ -50,7 +55,8 @@ * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare enum LoadingProgressStyle { /** @@ -81,7 +87,8 @@ declare enum LoadingProgressStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Default, @@ -113,7 +120,8 @@ declare enum LoadingProgressStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Circular, @@ -145,7 +153,8 @@ declare enum LoadingProgressStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ Orbital, } @@ -182,7 +191,8 @@ declare enum LoadingProgressStyle { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface LoadingProgressInterface { /** @@ -217,7 +227,8 @@ interface LoadingProgressInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ (): LoadingProgressAttribute; } @@ -254,7 +265,8 @@ interface LoadingProgressInterface { * @crossplatform * @form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare class LoadingProgressAttribute 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 } * @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..a2c3005f068cbd10b462750314bdb823a48ff3f5 100644 --- a/api/@internal/component/ets/menu.d.ts +++ b/api/@internal/component/ets/menu.d.ts @@ -12,12 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - /** * Defines the Menu Component. * @@ -41,35 +39,35 @@ * @crossplatform * @atomicservice * @since 11 + * @noninterop */ interface MenuInterface { - /** - * Creates the menu component. - * - * @returns { MenuAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Creates the menu component. - * - * @returns { MenuAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Creates the menu component. - * - * @returns { MenuAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - (): MenuAttribute; + /** + * Creates the menu component. + * + * @returns { MenuAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 9 + */ + /** + * Creates the menu component. + * + * @returns { MenuAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Creates the menu component. + * + * @returns { MenuAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + (): MenuAttribute; } - /** * Declare SubMenuExpandingMode * @@ -80,37 +78,34 @@ interface MenuInterface { * @since 12 */ declare enum SubMenuExpandingMode { - /** - * Sub-menu will expand besides main menu - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - SIDE_EXPAND = 0, - - /** - * Sub-menu will expand embedded in main menu - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - EMBEDDED_EXPAND = 1, - - /** - * Sub-menu will expand over main menu - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - STACK_EXPAND = 2, + /** + * Sub-menu will expand besides main menu + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + SIDE_EXPAND = 0, + /** + * Sub-menu will expand embedded in main menu + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + EMBEDDED_EXPAND = 1, + /** + * Sub-menu will expand over main menu + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + STACK_EXPAND = 2 } - /** * Defines the Menu component attribute functions. * @@ -134,135 +129,128 @@ declare enum SubMenuExpandingMode { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare class MenuAttribute extends CommonMethod { - /** - * Sets the Menu text size. - * - * @param { Length } value - Indicates the font size of menu item. - * @returns { MenuAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - * @deprecated since 10 - * @useinstead font - */ - fontSize(value: Length): MenuAttribute; - - /** - * Sets the font style. - * Family and style are not supported currently and will be fixed in future. - * - * @param { Font } value - Indicates the font style of menu item. - * @returns { MenuAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the font style. - * Family and style are not supported currently and will be fixed in future. - * - * @param { Font } value - Indicates the font style of menu item. - * @returns { MenuAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - font(value: Font): MenuAttribute; - - /** - * Sets the Menu font color. - * - * @param { ResourceColor } value - Indicates the font color of menu item. - * @returns { MenuAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the Menu font color. - * - * @param { ResourceColor } value - Indicates the font color of menu item. - * @returns { MenuAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - fontColor(value: ResourceColor): MenuAttribute; - - /** - * Sets the radius of the corner around the menu. - * When the radius is less than the menu width, the default border radius is used. - * - * @param { Dimension | BorderRadiuses } value - the border radius. - * @returns { MenuAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the radius of the corner around the menu. - * When the radius is less than the menu width, the default border radius is used. - * - * @param { Dimension | BorderRadiuses } value - the border radius. - * @returns { MenuAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - radius(value: Dimension | BorderRadiuses): MenuAttribute; - - /** - * Set the divider of menu item - * - * @param { DividerStyleOptions | undefined } options - * @returns { MenuAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - menuItemDivider(options: DividerStyleOptions | undefined): MenuAttribute; - - /** - * Set the divider of menu item group - * - * @param { DividerStyleOptions | undefined } options - * @returns { MenuAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - menuItemGroupDivider(options: DividerStyleOptions | undefined): MenuAttribute; - - /** - * Set the expanding mode of sub-menu - * - * @param { SubMenuExpandingMode } mode - * @returns { MenuAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - subMenuExpandingMode(mode: SubMenuExpandingMode): MenuAttribute; - - /** - * Set the expand symbol of sub-menu. - * - * @param { SymbolGlyphModifier } symbol - * @returns { MenuAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - subMenuExpandSymbol(symbol: SymbolGlyphModifier): MenuAttribute; + /** + * Sets the Menu text size. + * + * @param { Length } value - Indicates the font size of menu item. + * @returns { MenuAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 9 + * @deprecated since 10 + * @useinstead font + */ + fontSize(value: Length): MenuAttribute; + /** + * Sets the font style. + * Family and style are not supported currently and will be fixed in future. + * + * @param { Font } value - Indicates the font style of menu item. + * @returns { MenuAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the font style. + * Family and style are not supported currently and will be fixed in future. + * + * @param { Font } value - Indicates the font style of menu item. + * @returns { MenuAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + font(value: Font): MenuAttribute; + /** + * Sets the Menu font color. + * + * @param { ResourceColor } value - Indicates the font color of menu item. + * @returns { MenuAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the Menu font color. + * + * @param { ResourceColor } value - Indicates the font color of menu item. + * @returns { MenuAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + fontColor(value: ResourceColor): MenuAttribute; + /** + * Sets the radius of the corner around the menu. + * When the radius is less than the menu width, the default border radius is used. + * + * @param { Dimension | BorderRadiuses } value - the border radius. + * @returns { MenuAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the radius of the corner around the menu. + * When the radius is less than the menu width, the default border radius is used. + * + * @param { Dimension | BorderRadiuses } value - the border radius. + * @returns { MenuAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + radius(value: Dimension | BorderRadiuses): MenuAttribute; + /** + * Set the divider of menu item + * + * @param { DividerStyleOptions | undefined } options + * @returns { MenuAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + menuItemDivider(options: DividerStyleOptions | undefined): MenuAttribute; + /** + * Set the divider of menu item group + * + * @param { DividerStyleOptions | undefined } options + * @returns { MenuAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + menuItemGroupDivider(options: DividerStyleOptions | undefined): MenuAttribute; + /** + * Set the expanding mode of sub-menu + * + * @param { SubMenuExpandingMode } mode + * @returns { MenuAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + subMenuExpandingMode(mode: SubMenuExpandingMode): MenuAttribute; + /** + * Set the expand symbol of sub-menu. + * + * @param { SymbolGlyphModifier } symbol + * @returns { MenuAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + subMenuExpandSymbol(symbol: SymbolGlyphModifier): MenuAttribute; } - /** * Defines Menu Component. * @@ -285,7 +273,6 @@ declare class MenuAttribute extends CommonMethod { * @since 11 */ declare const Menu: MenuInterface; - /** * Defines Menu Component instance. * diff --git a/api/@internal/component/ets/menu_item.d.ts b/api/@internal/component/ets/menu_item.d.ts index 825be1c7b0e954a31ec00c6dd69a795cf3c62029..11da2f7299fee932e5467fc0b74d8569a98fc1c4 100644 --- a/api/@internal/component/ets/menu_item.d.ts +++ b/api/@internal/component/ets/menu_item.d.ts @@ -321,6 +321,7 @@ declare class MenuItemAttribute extends CommonMethod { */ selected(value: boolean): MenuItemAttribute; + /** * Whether the relevant check icon is displayed when a menu item is selected. * diff --git a/api/@internal/component/ets/menu_item_group.d.ts b/api/@internal/component/ets/menu_item_group.d.ts index e7e7b8920457ef5ec570d05854e16b40d1a57a36..59fc179231cd12015aab1dd13f4bfe15bb806757 100644 --- a/api/@internal/component/ets/menu_item_group.d.ts +++ b/api/@internal/component/ets/menu_item_group.d.ts @@ -12,12 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - /** * Defines the option of MenuItemGroup. * @@ -43,59 +41,57 @@ * @since 11 */ declare interface MenuItemGroupOptions { - /** - * Defines the header display info. - * - * @type { ?(ResourceStr | CustomBuilder) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Defines the header display info. - * - * @type { ?(ResourceStr | CustomBuilder) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Defines the header display info. - * - * @type { ?(ResourceStr | CustomBuilder) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - header?: ResourceStr | CustomBuilder; - - /** - * Defines the footer display info. - * - * @type { ?(ResourceStr | CustomBuilder) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Defines the footer display info. - * - * @type { ?(ResourceStr | CustomBuilder) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Defines the footer display info. - * - * @type { ?(ResourceStr | CustomBuilder) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - footer?: ResourceStr | CustomBuilder; + /** + * Defines the header display info. + * + * @type { ?(ResourceStr | CustomBuilder) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 9 + */ + /** + * Defines the header display info. + * + * @type { ?(ResourceStr | CustomBuilder) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Defines the header display info. + * + * @type { ?(ResourceStr | CustomBuilder) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + header?: ResourceStr | CustomBuilder; + /** + * Defines the footer display info. + * + * @type { ?(ResourceStr | CustomBuilder) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 9 + */ + /** + * Defines the footer display info. + * + * @type { ?(ResourceStr | CustomBuilder) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Defines the footer display info. + * + * @type { ?(ResourceStr | CustomBuilder) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + footer?: ResourceStr | CustomBuilder; } - /** * Defines the MenuItemGroup Component. * @@ -119,38 +115,38 @@ declare interface MenuItemGroupOptions { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ interface MenuItemGroupInterface { - /** - * Creates the MenuItemGroup component. - * - * @param { MenuItemGroupOptions } value - * @returns { MenuItemGroupAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Creates the MenuItemGroup component. - * - * @param { MenuItemGroupOptions } value - * @returns { MenuItemGroupAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Creates the MenuItemGroup component. - * - * @param { MenuItemGroupOptions } value - * @returns { MenuItemGroupAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - (value?: MenuItemGroupOptions): MenuItemGroupAttribute; + /** + * Creates the MenuItemGroup component. + * + * @param { MenuItemGroupOptions } value + * @returns { MenuItemGroupAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 9 + */ + /** + * Creates the MenuItemGroup component. + * + * @param { MenuItemGroupOptions } value + * @returns { MenuItemGroupAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Creates the MenuItemGroup component. + * + * @param { MenuItemGroupOptions } value + * @returns { MenuItemGroupAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + (value?: MenuItemGroupOptions): MenuItemGroupAttribute; } - /** * Defines the MenuItemGroup component attribute functions. * @@ -174,9 +170,10 @@ interface MenuItemGroupInterface { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ -declare class MenuItemGroupAttribute extends CommonMethod {} - +declare class MenuItemGroupAttribute extends CommonMethod { +} /** * Defines MenuItemGroup Component. * @@ -199,7 +196,6 @@ declare class MenuItemGroupAttribute extends CommonMethod { /** @@ -1372,6 +1374,7 @@ declare class NavDestinationAttribute extends CommonMethod { /** @@ -3686,6 +3691,7 @@ declare interface NavContentInfo { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Navigation: NavigationInterface; @@ -3709,5 +3715,6 @@ declare const Navigation: NavigationInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const NavigationInstance: NavigationAttribute; diff --git a/api/@internal/component/ets/node_container.d.ts b/api/@internal/component/ets/node_container.d.ts index 074ad34b57e164e1dc2971b4b2283886be3a61d0..023dcb4943cf2009eda87115e678c471ce4eee81 100644 --- a/api/@internal/component/ets/node_container.d.ts +++ b/api/@internal/component/ets/node_container.d.ts @@ -33,6 +33,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice + * @noninterop * @since 12 */ interface NodeContainerInterface { @@ -45,16 +46,16 @@ interface NodeContainerInterface { * @crossplatform * @since 11 */ - /** - * Constructor parameters - * - * @param { import('../api/@ohos.arkui.node').NodeController } controller - Indicates the controller of the NodeContainer. - * @returns { NodeContainerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ + /** + * Constructor parameters + * + * @param { import('../api/@ohos.arkui.node').NodeController } controller - Indicates the controller of the NodeContainer. + * @returns { NodeContainerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ (controller: import('../api/@ohos.arkui.node').NodeController): NodeContainerAttribute; } diff --git a/api/@internal/component/ets/particle.d.ts b/api/@internal/component/ets/particle.d.ts index 4b1f5247457883ee89aa229c5bd52c418959dd38..45f1903b93adac95556f1914e85855e368c7c6c0 100644 --- a/api/@internal/component/ets/particle.d.ts +++ b/api/@internal/component/ets/particle.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 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 @@ -1819,7 +1819,7 @@ declare enum DistributionType { /** * Gaussian distribution. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice @@ -1901,7 +1901,7 @@ declare enum ParticleUpdater { */ declare type SizeT = import('../api/arkui/Graphics').SizeT; - /** +/** * Defines the PositionT type. * * @typedef { import('../api/arkui/Graphics').PositionT } @@ -2056,7 +2056,7 @@ declare interface DisturbanceFieldOptions { */ noiseScale?: number; - /** + /** * Noise frequency with a value greater or equal 0. * * @type { ?number } @@ -2100,9 +2100,9 @@ declare enum DisturbanceFieldShape { * @atomicservice * @since 12 */ - RECT, + RECT = 0, - /** + /** * Shape circle. * * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -2110,7 +2110,7 @@ declare enum DisturbanceFieldShape { * @atomicservice * @since 12 */ - CIRCLE, + CIRCLE = 1, /** * Shape eclipse. @@ -2120,8 +2120,7 @@ declare enum DisturbanceFieldShape { * @atomicservice * @since 12 */ - ELLIPSE - + ELLIPSE = 2 } /** diff --git a/api/@internal/component/ets/pattern_lock.d.ts b/api/@internal/component/ets/pattern_lock.d.ts index 5abde1178a519bb625045f790d2380bebb58d81c..3512f08dae2bfe7d79c78149e750bc74d4e6b4d1 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,7 +127,8 @@ 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; } @@ -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; @@ -609,6 +649,18 @@ declare class PatternLockAttribute extends CommonMethod { */ 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/progress.d.ts b/api/@internal/component/ets/progress.d.ts index 4bd94cb93ac49b7025ded7408b59b14bd8a39e60..9b2aca0d3af7f4bd91b5976ec74af9944dbb1674 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; @@ -965,7 +1057,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 +1076,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 +1097,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 +1110,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 +1148,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 +1180,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 +1213,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 +1246,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 +1279,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 +1312,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 +1331,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 +1448,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 +1491,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 +1688,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 +1778,8 @@ declare class ProgressAttribute { /** @@ -1589,7 +1789,8 @@ declare interface ProgressConfiguration extends CommonConfiguration { /** @@ -176,7 +185,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 +226,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 +246,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/rect.d.ts b/api/@internal/component/ets/rect.d.ts index a382feb79cf29d864fca05a505c21f219dccf129..a025e7543cc16629f8719133df639af4f804c4aa 100644 --- a/api/@internal/component/ets/rect.d.ts +++ b/api/@internal/component/ets/rect.d.ts @@ -534,7 +534,7 @@ interface RectInterface { * Called when a rectangle is created. * * @param { {width?: number | string;height?: number | string;radius?: number | string | Array;} | - * {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value + * {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value * @returns { RectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 @@ -543,7 +543,7 @@ interface RectInterface { * Called when a rectangle is created. * * @param { {width?: number | string;height?: number | string;radius?: number | string | Array;} | - * {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value + * {width?: number | string;height?: number | string;radiusWidth?: number | string;radiusHeight?: number | string;} } value * @returns { RectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form diff --git a/api/@internal/component/ets/refresh.d.ts b/api/@internal/component/ets/refresh.d.ts index 11e2b9e59ad997bc279caeed16b8779d9cc8272f..858042f061ab9a0a1e01c171d5d6d2f8de8a7846 100644 --- a/api/@internal/component/ets/refresh.d.ts +++ b/api/@internal/component/ets/refresh.d.ts @@ -18,6 +18,7 @@ * @kit ArkUI */ + /** * The refresh status of the drop-down refresh. * 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..416297d030cd273d8a13160e54164492b234beb5 100644 --- a/api/@internal/component/ets/rich_editor.d.ts +++ b/api/@internal/component/ets/rich_editor.d.ts @@ -721,6 +721,18 @@ declare interface PasteEvent { * @since 12 */ preventDefault?: Callback; + + /** + * Override system paste event. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + preventDefault?: VoidCallback; } /** @@ -1942,7 +1954,7 @@ declare interface RichEditorGesture { * @crossplatform * @since 11 */ - /** + /** * Trigger a click event when a click is clicked. * * @type { ?Callback } @@ -2926,7 +2938,7 @@ declare interface SelectionMenuOptions { */ /** * Callback function when the selection menu disappears. - * + * * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -2935,6 +2947,18 @@ declare interface SelectionMenuOptions { */ onDisappear?: Callback; + /** + * Callback function when the selection menu disappears. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onDisappear?: VoidCallback; + /** * Menu type, default value is MenuType.SELECTION_MENU. * @@ -3233,7 +3257,7 @@ declare class RichEditorController extends RichEditorBaseController { * @atomicservice * @since 11 */ - /** + /** * Add a text span. * * @param { ResourceStr } content - text value. @@ -3580,6 +3604,19 @@ declare class RichEditorAttribute extends CommonMethod { */ onReady(callback: Callback): RichEditorAttribute; + /** + * Called when on ready. + * + * @param { VoidCallback } callback - The triggered function when rich editor is ready. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onReady(callback: VoidCallback): RichEditorAttribute; + /** * Called when the content is selected. * @@ -3754,6 +3791,19 @@ declare class RichEditorAttribute extends CommonMethod { */ onDeleteComplete(callback: Callback): RichEditorAttribute; + /** + * Notify that the deletion has been completed + * + * @param { VoidCallback } callback - The triggered function when text content has been deleted. + * @returns { RichEditorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onDeleteComplete(callback: VoidCallback): RichEditorAttribute; + /** * Allow replication. * @@ -3851,7 +3901,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 12 */ onPaste(callback: PasteEventCallback): RichEditorAttribute; @@ -4014,7 +4064,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 12 */ onCut(callback: Callback): RichEditorAttribute; @@ -4026,7 +4076,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 12 */ onCopy(callback: Callback): RichEditorAttribute; @@ -4168,6 +4218,18 @@ declare interface CutEvent { * @since 12 */ preventDefault?: Callback; + + /** + * Prevent system cut event. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + preventDefault?: VoidCallback; } /** @@ -4189,6 +4251,18 @@ declare interface CopyEvent { * @since 12 */ preventDefault?: Callback; + + /** + * Prevent system cut event. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + preventDefault?: VoidCallback; } /** diff --git a/api/@internal/component/ets/rich_text.d.ts b/api/@internal/component/ets/rich_text.d.ts index 2f0984f0502bbd2f849adde94e98e24ed6551ac8..0b0b823309bbb1c63a05ed9e32392ab4040f7966 100644 --- a/api/@internal/component/ets/rich_text.d.ts +++ b/api/@internal/component/ets/rich_text.d.ts @@ -18,6 +18,11 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod} from './common'; +import { Resource } from '../../global/resource'; +/*** endif */ + /** * Provides an interface for RichText component. * @@ -40,7 +45,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,11 +79,12 @@ interface RichTextInterface { /** * Set value. * - * @param { string | Resource } content + * @param { string | Resource} content * @returns { RichTextAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ (content: string | Resource): RichTextAttribute; } @@ -104,7 +111,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 +140,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 +170,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/screen.d.ts b/api/@internal/component/ets/screen.d.ts index 2a9afb3a50d418179dbbd721250a817e3adc5d77..3262d2c683eb7c1e8f0d13a07b30fdc3b10db22a 100644 --- a/api/@internal/component/ets/screen.d.ts +++ b/api/@internal/component/ets/screen.d.ts @@ -18,13 +18,18 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { CommonMethod} from './common'; +/*** endif */ + /** * Defines the interface of Screen. * * @interface ScreenInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface ScreenInterface { /** @@ -34,7 +39,8 @@ interface ScreenInterface { * @returns { ScreenAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ (screenId: number): ScreenAttribute; } @@ -45,7 +51,8 @@ interface ScreenInterface { * @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 ScreenAttribute extends CommonMethod { } diff --git a/api/@internal/component/ets/scroll.d.ts b/api/@internal/component/ets/scroll.d.ts index 51bc0c23d48bbb46be566432a8f2f10121177fa4..b6f8b26cdfc73aec620aa9972d23262f15ee828a 100644 --- a/api/@internal/component/ets/scroll.d.ts +++ b/api/@internal/component/ets/scroll.d.ts @@ -18,6 +18,8 @@ * @kit ArkUI */ + + /** * Content scroll direction. * @@ -506,6 +508,7 @@ declare class Scroller { */ scrollTo(options: ScrollOptions); + /** * Called when scrolling to the edge of the container. * @@ -543,6 +546,7 @@ declare class Scroller { * @since 12 */ scrollEdge(value: Edge, options?: ScrollEdgeOptions); + /** * Performs inertial scrolling based on the initial velocity passed in. @@ -683,7 +687,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 diff --git a/api/@internal/component/ets/scroll_bar.d.ts b/api/@internal/component/ets/scroll_bar.d.ts index 47db01d9f059443df8c860d123fb8cac851d7e4a..abf91c99ac4f42d1dc457d6cc1ba1a59fd15b147 100644 --- a/api/@internal/component/ets/scroll_bar.d.ts +++ b/api/@internal/component/ets/scroll_bar.d.ts @@ -18,6 +18,8 @@ * @kit ArkUI */ + + /** * Content scroll direction. * diff --git a/api/@internal/component/ets/select.d.ts b/api/@internal/component/ets/select.d.ts index 41fcdac73f4f97b4797cc06b6e43362cdfc818b7..9966fca79cce617b2b8f7d26e3820213beb4293c 100644 --- a/api/@internal/component/ets/select.d.ts +++ b/api/@internal/component/ets/select.d.ts @@ -428,6 +428,7 @@ declare class SelectAttribute extends CommonMethod { */ selected(numCount: Optional): SelectAttribute; + /** * Sets the text display of the select button itself. * diff --git a/api/@internal/component/ets/sidebar.d.ts b/api/@internal/component/ets/sidebar.d.ts index 4622bd4555f349a4cc90c0b81a16c5a9dfff62e3..2add0dfbfbbcca9f830764dbe1954a03bc436629 100644 --- a/api/@internal/component/ets/sidebar.d.ts +++ b/api/@internal/component/ets/sidebar.d.ts @@ -497,6 +497,7 @@ declare interface ButtonStyle { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ interface SideBarContainerInterface { /** @@ -651,6 +652,7 @@ interface DividerStyle { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare class SideBarContainerAttribute extends CommonMethod { /** @@ -1087,6 +1089,7 @@ declare class SideBarContainerAttribute extends CommonMethodNOTE: - *
The trigger occurs when an invalid value is restored to the default value, that is, when the value is set to - * less than min or greater than max. - *

- * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - End, - - /** - * Click the slider. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Click the slider. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Click the slider. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * The user moves the thumb by touching or clicking the track. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - Click, + /** + * Start dragging the slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Start dragging the slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Start dragging the slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * The user touches or clicks the thumb. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Begin, + /** + * Drag the slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Drag the slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Drag the slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * The user is dragging the slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Moving, + /** + * End dragging the slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * End dragging the slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * End dragging the slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * The user stops dragging the slider by lifting their finger or releasing the mouse device. + *

NOTE: + *
The trigger occurs when an invalid value is restored to the default value, that is, when the value is set to + * less than min or greater than max. + *

+ * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + End, + /** + * Click the slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Click the slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Click the slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * The user moves the thumb by touching or clicking the track. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Click } - /** * Interaction mode between the user and the slider. * @@ -306,39 +298,36 @@ declare enum SliderChangeMode { * @since 12 */ declare enum SliderInteraction { - /** - * Users can drag the slider or touch the track to move the slider. The slider moves as soon as the mouse or - * finger is pressed. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - SLIDE_AND_CLICK, - - /** - * Users are not allowed to move the slider by touching the slider. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - SLIDE_ONLY, - - /** - * Users can drag the slider or touch the track to move the slider. The slider moves when the mouse is released or - * finger is lifted, if the release/lift position coincides with the screen press position. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - SLIDE_AND_CLICK_UP = 2 + /** + * Users can drag the slider or touch the track to move the slider. The slider moves as soon as the mouse or + * finger is pressed. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + SLIDE_AND_CLICK = 0, + /** + * Users are not allowed to move the slider by touching the slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + SLIDE_ONLY = 1, + /** + * Users can drag the slider or touch the track to move the slider. The slider moves when the mouse is released or + * finger is lifted, if the release/lift position coincides with the screen press position. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + SLIDE_AND_CLICK_UP = 2 } - /** * Defines the callback type used in SlideRange. *

NOTE: @@ -359,29 +348,27 @@ declare enum SliderInteraction { * @since 12 */ declare interface SlideRange { - /** - * Start of the slide range. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - from?: number; - - /** - * End of the slide range. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - to?: number; + /** + * Start of the slide range. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + from?: number; + /** + * End of the slide range. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + to?: number; } - /** * Defines the options of Slider. * @@ -417,275 +404,268 @@ declare interface SlideRange { * @since 11 */ declare interface SliderOptions { - /** - * Current value of Slider. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Current value of Slider. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Current value of Slider. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Current progress. - * - * @type { ?number } - * @default same as the value of min - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - value?: number; - - /** - * Sets the min value of Slider. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the min value of Slider. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Sets the min value of Slider. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Minimum value. - * - * @type { ?number } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - min?: number; - - /** - * Sets the max value of Slider. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the max value of Slider. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Sets the max value of Slider. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Maximum value. - *

NOTE: - *
If the value of min is greater than or equal to the value of max, the min value defaults to 0, and the max - * value defaults to 100. If the value is not within the [min, max] range, the value of min or max is used, whichever - * is closer. - *

- * - * @type { ?number } - * @default 100 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - max?: number; - - /** - * Sets the step of each slide value. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the step of each slide value. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Sets the step of each slide value. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Step of the slider. - *

NOTE: - *
If this parameter is set to a value less than 0 or greater than the value of max, the default value is used. - *

- * - * @type { ?number } - * @default 1 - Value range: [0.01, max - min] - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - step?: number; - - /** - * Sets the slider style. - * - * @type { ?SliderStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the slider style. - * - * @type { ?SliderStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Sets the slider style. - * - * @type { ?SliderStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Style of the slider thumb and track. - * - * @type { ?SliderStyle } - * @default SliderStyle.OutSet - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - style?: SliderStyle; - - /** - * Sets the slider direction style. - * - * @type { ?Axis } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Sets the slider direction style. - * - * @type { ?Axis } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Sets the slider direction style. - * - * @type { ?Axis } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Whether the slider moves horizontally or vertically. - * - * @type { ?Axis } - * @default Axis.Horizontal - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - direction?: Axis; - - /** - * Set whether the direction of the slider needs to be reversed. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Set whether the direction of the slider needs to be reversed. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Set whether the direction of the slider needs to be reversed. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Whether the slider values are reversed. By default, the values increase from left to right for a horizontal - * slider and from top to bottom for a vertical slider. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - reverse?: boolean; + /** + * Current value of Slider. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Current value of Slider. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Current value of Slider. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Current progress. + * + * @type { ?number } + * @default same as the value of min + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + value?: number; + /** + * Sets the min value of Slider. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the min value of Slider. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Sets the min value of Slider. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Minimum value. + * + * @type { ?number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + min?: number; + /** + * Sets the max value of Slider. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the max value of Slider. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Sets the max value of Slider. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Maximum value. + *

NOTE: + *
If the value of min is greater than or equal to the value of max, the min value defaults to 0, and the max + * value defaults to 100. If the value is not within the [min, max] range, the value of min or max is used, whichever + * is closer. + *

+ * + * @type { ?number } + * @default 100 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + max?: number; + /** + * Sets the step of each slide value. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the step of each slide value. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Sets the step of each slide value. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Step of the slider. + *

NOTE: + *
If this parameter is set to a value less than 0 or greater than the value of max, the default value is used. + *

+ * + * @type { ?number } + * @default 1 - Value range: [0.01, max - min] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + step?: number; + /** + * Sets the slider style. + * + * @type { ?SliderStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the slider style. + * + * @type { ?SliderStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Sets the slider style. + * + * @type { ?SliderStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Style of the slider thumb and track. + * + * @type { ?SliderStyle } + * @default SliderStyle.OutSet + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + style?: SliderStyle; + /** + * Sets the slider direction style. + * + * @type { ?Axis } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Sets the slider direction style. + * + * @type { ?Axis } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Sets the slider direction style. + * + * @type { ?Axis } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Whether the slider moves horizontally or vertically. + * + * @type { ?Axis } + * @default Axis.Horizontal + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + direction?: Axis; + /** + * Set whether the direction of the slider needs to be reversed. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Set whether the direction of the slider needs to be reversed. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Set whether the direction of the slider needs to be reversed. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Whether the slider values are reversed. By default, the values increase from left to right for a horizontal + * slider and from top to bottom for a vertical slider. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + reverse?: boolean; } - /** * Declare SliderBlockType * @@ -704,58 +684,55 @@ declare interface SliderOptions { * @since 11 */ declare enum SliderBlockType { - /** - * Use the default block. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Round slider. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - DEFAULT, - - /** - * Use an image as the slider block. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Slider with an image background. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - IMAGE, - - /** - * Use a shape as the slider block. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Slider in a custom shape. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - SHAPE, + /** + * Use the default block. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Round slider. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + DEFAULT = 0, + /** + * Use an image as the slider block. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Slider with an image background. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + IMAGE = 1, + /** + * Use a shape as the slider block. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Slider in a custom shape. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + SHAPE = 2 } - /** * Defines the style of slider block. * @@ -774,70 +751,67 @@ declare enum SliderBlockType { * @since 11 */ declare interface SliderBlockStyle { - /** - * Sets the type of slider block. - * - * @type { SliderBlockType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Type of the slider in the block direction. - * - * @type { SliderBlockType } - * @default SliderBlockType.DEFAULT - indicating the round slider. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - type: SliderBlockType; - - /** - * Sets the image of slider block while the type is set to SliderBlockType.Image. - * - * @type { ?ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Image resource of the slider. The area size for displaying the image is subject to the blockSize attribute. - * Be mindful of the image size when selecting an image. - * - * @type { ?ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - image?: ResourceStr; - - /** - * Sets the shape of slider block while the type is set to SliderBlockType.Shape. - * - * @type { ?(CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Custom shape of the slider. - * - * @type { ?(CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - shape?: CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute; + /** + * Sets the type of slider block. + * + * @type { SliderBlockType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Type of the slider in the block direction. + * + * @type { SliderBlockType } + * @default SliderBlockType.DEFAULT - indicating the round slider. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + type: SliderBlockType; + /** + * Sets the image of slider block while the type is set to SliderBlockType.Image. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Image resource of the slider. The area size for displaying the image is subject to the blockSize attribute. + * Be mindful of the image size when selecting an image. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + image?: ResourceStr; + /** + * Sets the shape of slider block while the type is set to SliderBlockType.Shape. + * + * @type { ?(CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Custom shape of the slider. + * + * @type { ?(CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + shape?: CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute; } - /** * Defines the callback type used in SliderConfiguration. * - * @typedef {function} SliderTriggerChangeCallback + * @typedef {function} SliderTriggerChangeCallback * @param { number } value - Current progress. * @param { SliderChangeMode } mode - State triggered by the event. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -846,7 +820,6 @@ declare interface SliderBlockStyle { * @since 12 */ declare type SliderTriggerChangeCallback = (value: number, mode: SliderChangeMode) => void; - /** * You need a custom class to implement the ContentModifier API. * @@ -858,62 +831,57 @@ declare type SliderTriggerChangeCallback = (value: number, mode: SliderChangeMod * @since 12 */ declare interface SliderConfiguration extends CommonConfiguration { - /** - * Current progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - value: number; - - /** - * Minimum value. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - min: number; - - /** - * Maximum value. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - max: number; - - /** - * Step of the slider. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - step: number; - - /** - * Triggers slider changes. - * - * @type { SliderTriggerChangeCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - triggerChange: SliderTriggerChangeCallback; + /** + * Current progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + value: number; + /** + * Minimum value. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + min: number; + /** + * Maximum value. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + max: number; + /** + * Step of the slider. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + step: number; + /** + * Triggers slider changes. + * + * @type { SliderTriggerChangeCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + triggerChange: SliderTriggerChangeCallback; } - /** * Provides an interface for the slide bar component. * @@ -947,49 +915,91 @@ 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. @@ -1001,54 +1011,50 @@ interface SliderInterface { * @since 20 */ interface SliderCustomContentOptions { - /** - * The text used for accessibility purposes. This text will be read by screen readers - * to provide a more descriptive label for the slider content. - * - * @type { ?ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - accessibilityText?: ResourceStr; - - /** - * A more detailed description for accessibility. This can provide additional context - * about the slider content for users relying on assistive technologies. - * - * @type { ?ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - accessibilityDescription?: ResourceStr; - - /** - * The accessibility level of the slider content. This could be used to indicate the importance - * or priority of the content for assistive technologies. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - accessibilityLevel?: string; - - /** - * Indicates whether the slider content should be treated as an accessibility group. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - accessibilityGroup?: boolean; + /** + * The text used for accessibility purposes. This text will be read by screen readers + * to provide a more descriptive label for the slider content. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + accessibilityText?: ResourceStr; + /** + * A more detailed description for accessibility. This can provide additional context + * about the slider content for users relying on assistive technologies. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + accessibilityDescription?: ResourceStr; + /** + * The accessibility level of the slider content. This could be used to indicate the importance + * or priority of the content for assistive technologies. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + accessibilityLevel?: string; + /** + * Indicates whether the slider content should be treated as an accessibility group. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + accessibilityGroup?: boolean; } - /** * Options used for customizing the prefix part of the slider. * It extends the SliderCustomContentOptions to inherit accessibility customization options. @@ -1062,7 +1068,6 @@ interface SliderCustomContentOptions { */ interface SliderPrefixOptions extends SliderCustomContentOptions { } - /** * Options used for customizing the suffix part of the slider. * It extends the SliderCustomContentOptions to inherit accessibility customization options. @@ -1076,7 +1081,6 @@ interface SliderPrefixOptions extends SliderCustomContentOptions { */ interface SliderSuffixOptions extends SliderCustomContentOptions { } - /** * Defines the attribute functions of Slider. * @@ -1110,610 +1114,599 @@ interface SliderSuffixOptions extends SliderCustomContentOptions { * @form * @atomicservice * @since 11 + * @noninterop */ declare class SliderAttribute extends CommonMethod { - /** - * Called when the slider color of the slider bar is set. - * - * @param { ResourceColor } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the slider color of the slider bar is set. - * - * @param { ResourceColor } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the slider color of the slider bar is set. - * - * @param { ResourceColor } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the slider color of the slider bar is set. - * - * @param { ResourceColor } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - blockColor(value: ResourceColor): SliderAttribute; - - /** - * Called when the track color of the slider is set. - * - * @param { ResourceColor } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the track color of the slider is set. - * - * @param { ResourceColor } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the track color of the slider is set. - * - * @param { ResourceColor } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the track color of the slider is set. - * - * @param { ResourceColor } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - /** - * Called when the track color of the slider is set. - * - * @param { ResourceColor | LinearGradient } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - trackColor(value: ResourceColor | LinearGradient): SliderAttribute; - - /** - * Called when the slider of the slider bar is set to slide over the area color. - * - * @param { ResourceColor } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the slider of the slider bar is set to slide over the area color. - * - * @param { ResourceColor } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the slider of the slider bar is set to slide over the area color. - * - * @param { ResourceColor } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the slider of the slider bar is set to slide over the area color. - * - * @param { ResourceColor } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - selectedColor(value: ResourceColor): SliderAttribute; - /** - * Called when the slider of the slider bar is set to slide over the area color. - * - * @param { ResourceColor | LinearGradient } selectedColor - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 18 - */ - selectedColor(selectedColor: ResourceColor | LinearGradient): SliderAttribute; - - /** - * Called when the minimum label is set. - * - * @param { string } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 9 - * @useinstead min - */ - minLabel(value: string): SliderAttribute; - - /** - * Called when the maximum label is set. - * - * @param { string } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 9 - * @useinstead max - */ - maxLabel(value: string): SliderAttribute; - - /** - * Called when setting whether to display step size. - * - * @param { boolean } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when setting whether to display step size. - * - * @param { boolean } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when setting whether to display step size. - * - * @param { boolean } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when setting whether to display step size. - * - * @param { boolean } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - showSteps(value: boolean): SliderAttribute; - - /** - * Called when the percentage of bubble prompt is set when sliding. - * - * @param { boolean } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the percentage of bubble prompt is set when sliding. - * - * @param { boolean } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the percentage of bubble prompt is set when sliding. - * - * @param { boolean } value - Whether to display the bubble. - * @param { ResourceStr } content - Text content in the bubble. If the content is not specified, the current - * percentage is displayed by default. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the percentage of bubble prompt is set when sliding. - * - * @param { boolean } value - Whether to display the bubble. - * @param { ResourceStr } content - Text content in the bubble. If the content is not specified, the current - * percentage is displayed by default. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - showTips(value: boolean, content?: ResourceStr): SliderAttribute; - - /** - * Called when the thickness of track is set. - * - * @param { Length } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the thickness of track is set. - * - * @param { Length } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the thickness of track is set. - * - * @param { Length } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the thickness of track is set. - * - * @param { Length } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - trackThickness(value: Length): SliderAttribute; - - /** - * Called when the selection value changes. - * - * @param { function } callback - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the selection value changes. - * - * @param { function } callback - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the selection value changes. - * - * @param { function } callback - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Triggered when the slider is dragged or clicked. - *

NOTE: - *
The Begin and End states are triggered when the slider is clicked with a gesture. The Moving and Click states - * are triggered when the value of value changes. If the coherent action is a drag action, the Click state will - * not be triggered. - *

- * - * @param { function } callback - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - onChange(callback: (value: number, mode: SliderChangeMode) => void): SliderAttribute; - - /** - * Called when the border color of block is set. - * - * @param { ResourceColor } value - the border color of block. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the border color of block is set. - * - * @param { ResourceColor } value - the border color of block. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - blockBorderColor(value: ResourceColor): SliderAttribute; - - /** - * Called when the border width of block is set. - * - * @param { Length } value - the border width of block. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the border width of block is set. - * - * @param { Length } value - the border width of block. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - blockBorderWidth(value: Length): SliderAttribute; - - /** - * Called when the color of step is set. - * - * @param { ResourceColor } value - the color of step. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the color of step is set. - * - * @param { ResourceColor } value - the color of step. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - stepColor(value: ResourceColor): SliderAttribute; - - /** - * Called when the radius of track border is set. - * - * @param { Length } value - the radius of track border. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the radius of track border is set. - * - * @param { Length } value - the radius of track border. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - trackBorderRadius(value: Length): SliderAttribute; - - /** - * Called when the radius of selected part is set. - * - * @param { Dimension } value - the radius of selected part. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ + /** + * Called when the slider color of the slider bar is set. + * + * @param { ResourceColor } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the slider color of the slider bar is set. + * + * @param { ResourceColor } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the slider color of the slider bar is set. + * + * @param { ResourceColor } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the slider color of the slider bar is set. + * + * @param { ResourceColor } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + blockColor(value: ResourceColor): SliderAttribute; + /** + * Called when the track color of the slider is set. + * + * @param { ResourceColor } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the track color of the slider is set. + * + * @param { ResourceColor } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the track color of the slider is set. + * + * @param { ResourceColor } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the track color of the slider is set. + * + * @param { ResourceColor } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Called when the track color of the slider is set. + * + * @param { ResourceColor | LinearGradient } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + trackColor(value: ResourceColor | LinearGradient): SliderAttribute; + /** + * Called when the slider of the slider bar is set to slide over the area color. + * + * @param { ResourceColor } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the slider of the slider bar is set to slide over the area color. + * + * @param { ResourceColor } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the slider of the slider bar is set to slide over the area color. + * + * @param { ResourceColor } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the slider of the slider bar is set to slide over the area color. + * + * @param { ResourceColor } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + selectedColor(value: ResourceColor): SliderAttribute; + /** + * Called when the slider of the slider bar is set to slide over the area color. + * + * @param { ResourceColor | LinearGradient } selectedColor + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ + selectedColor(selectedColor: ResourceColor | LinearGradient): SliderAttribute; + /** + * Called when the minimum label is set. + * + * @param { string } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + * @deprecated since 9 + * @useinstead min + */ + minLabel(value: string): SliderAttribute; + /** + * Called when the maximum label is set. + * + * @param { string } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + * @deprecated since 9 + * @useinstead max + */ + maxLabel(value: string): SliderAttribute; + /** + * Called when setting whether to display step size. + * + * @param { boolean } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when setting whether to display step size. + * + * @param { boolean } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when setting whether to display step size. + * + * @param { boolean } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when setting whether to display step size. + * + * @param { boolean } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + 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. + * + * @param { boolean } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the percentage of bubble prompt is set when sliding. + * + * @param { boolean } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the percentage of bubble prompt is set when sliding. + * + * @param { boolean } value - Whether to display the bubble. + * @param { ResourceStr } content - Text content in the bubble. If the content is not specified, the current + * percentage is displayed by default. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the percentage of bubble prompt is set when sliding. + * + * @param { boolean } value - Whether to display the bubble. + * @param { ResourceStr } content - Text content in the bubble. If the content is not specified, the current + * percentage is displayed by default. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + showTips(value: boolean, content?: ResourceStr): SliderAttribute; + /** + * Called when the thickness of track is set. + * + * @param { Length } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the thickness of track is set. + * + * @param { Length } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the thickness of track is set. + * + * @param { Length } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the thickness of track is set. + * + * @param { Length } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + trackThickness(value: Length): SliderAttribute; + /** + * Called when the selection value changes. + * + * @param { function } callback + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the selection value changes. + * + * @param { function } callback + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the selection value changes. + * + * @param { function } callback + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Triggered when the slider is dragged or clicked. + *

NOTE: + *
The Begin and End states are triggered when the slider is clicked with a gesture. The Moving and Click states + * are triggered when the value of value changes. If the coherent action is a drag action, the Click state will + * not be triggered. + *

+ * + * @param { function } callback + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + onChange(callback: (value: number, mode: SliderChangeMode) => void): SliderAttribute; + /** + * Called when the border color of block is set. + * + * @param { ResourceColor } value - the border color of block. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the border color of block is set. + * + * @param { ResourceColor } value - the border color of block. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + blockBorderColor(value: ResourceColor): SliderAttribute; + /** + * Called when the border width of block is set. + * + * @param { Length } value - the border width of block. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the border width of block is set. + * + * @param { Length } value - the border width of block. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + blockBorderWidth(value: Length): SliderAttribute; + /** + * Called when the color of step is set. + * + * @param { ResourceColor } value - the color of step. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the color of step is set. + * + * @param { ResourceColor } value - the color of step. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + stepColor(value: ResourceColor): SliderAttribute; + /** + * Called when the radius of track border is set. + * + * @param { Length } value - the radius of track border. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the radius of track border is set. + * + * @param { Length } value - the radius of track border. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + trackBorderRadius(value: Length): SliderAttribute; + /** + * Called when the radius of selected part is set. + * + * @param { Dimension } value - the radius of selected part. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ selectedBorderRadius(value: Dimension): SliderAttribute; - - /** - * Called when the size of block is set. - * - * @param { SizeOptions } value - the size of block. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the size of block is set. - * - * @param { SizeOptions } value - the size of block. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - blockSize(value: SizeOptions): SliderAttribute; - - /** - * Called when the style of block is set. - * - * @param { SliderBlockStyle } value - the style of block. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the style of the slider in the block direction. - * - * @param { SliderBlockStyle } value - Style of the slider in the block direction. - *
Default value is SliderBlockType.DEFAULT, indicating the round slider. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - blockStyle(value: SliderBlockStyle): SliderAttribute; - - /** - * Called when the diameter of step is set. - * - * @param { Length } value - the diameter of step. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the diameter of step is set. - * - * @param { Length } value - the diameter of step. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - stepSize(value: Length): SliderAttribute; - - /** - * Sets the interaction mode between the user and the slider. - * - * @param { SliderInteraction } value - Interaction mode between the user and the slider. - *
Default value is SliderInteraction.SLIDE_AND_CLICK. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - sliderInteractionMode(value: SliderInteraction): SliderAttribute; - - /** - * Sets the min value when Slider response to drag event. - * - * @param { number } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - minResponsiveDistance(value: number): SliderAttribute; - - /** - * Creates a content modifier. - * - * @param { ContentModifier } modifier - Content modifier to apply to the slider. - * modifier: content modifier. You need a custom class to implement the ContentModifier API. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - contentModifier(modifier: ContentModifier): SliderAttribute; - - /** - * Set the valid slidable range. - * - * @param { SlideRange } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - slideRange(value: SlideRange): SliderAttribute; - - /** - * Set the sensitivity of rotating crown. - * - * @param { Optional } sensitivity - The sensitivity of rotating crown, default value is { MEDIUM }. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - digitalCrownSensitivity(sensitivity: Optional): SliderAttribute; - - /** - * Enable or disable haptic feedback. - * - * @param { boolean } enabled - Default value is true, set false to disable haptic feedback. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ - enableHapticFeedback(enabled: boolean): SliderAttribute; - - /** - * Sets the prefix part of the slider. - * The prefix is the content that appears before the main slider component. - * - * @param { ComponentContent } content - Custom components that will be displayed as the prefix. - * This can be any valid custom UI component structure. - * @param { SliderPrefixOptions } [options] - Optional options for customizing the prefix. - * These options can include accessibility settings. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - prefix(content: ComponentContent, options?: SliderPrefixOptions): SliderAttribute; - - /** - * Sets the suffix part of the slider. - * The suffix is the content that appears after the main slider component. - * - * @param { ComponentContent } content - Custom components that will be displayed as the suffix. - * This can be any valid custom UI component structure. - * @param { SliderSuffixOptions } [options] - Optional options for customizing the suffix. - * These options can include accessibility settings. - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - suffix(content: ComponentContent, options?: SliderSuffixOptions): SliderAttribute; + /** + * Called when the size of block is set. + * + * @param { SizeOptions } value - the size of block. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the size of block is set. + * + * @param { SizeOptions } value - the size of block. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + blockSize(value: SizeOptions): SliderAttribute; + /** + * Called when the style of block is set. + * + * @param { SliderBlockStyle } value - the style of block. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the style of the slider in the block direction. + * + * @param { SliderBlockStyle } value - Style of the slider in the block direction. + *
Default value is SliderBlockType.DEFAULT, indicating the round slider. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + blockStyle(value: SliderBlockStyle): SliderAttribute; + /** + * Called when the diameter of step is set. + * + * @param { Length } value - the diameter of step. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the diameter of step is set. + * + * @param { Length } value - the diameter of step. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + stepSize(value: Length): SliderAttribute; + /** + * Sets the interaction mode between the user and the slider. + * + * @param { SliderInteraction } value - Interaction mode between the user and the slider. + *
Default value is SliderInteraction.SLIDE_AND_CLICK. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + sliderInteractionMode(value: SliderInteraction): SliderAttribute; + /** + * Sets the min value when Slider response to drag event. + * + * @param { number } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + minResponsiveDistance(value: number): SliderAttribute; + /** + * Creates a content modifier. + * + * @param { ContentModifier } modifier - Content modifier to apply to the slider. + * modifier: content modifier. You need a custom class to implement the ContentModifier API. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + contentModifier(modifier: ContentModifier): SliderAttribute; + /** + * Set the valid slidable range. + * + * @param { SlideRange } value + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + slideRange(value: SlideRange): SliderAttribute; + /** + * Set the sensitivity of rotating crown. + * + * @param { Optional } sensitivity - The sensitivity of rotating crown, default value is { MEDIUM }. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + digitalCrownSensitivity(sensitivity: Optional): SliderAttribute; + /** + * Enable or disable haptic feedback. + * + * @param { boolean } enabled - Default value is true, set false to disable haptic feedback. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 18 + */ + enableHapticFeedback(enabled: boolean): SliderAttribute; + /** + * Sets the prefix part of the slider. + * The prefix is the content that appears before the main slider component. + * + * @param { ComponentContent } content - Custom components that will be displayed as the prefix. + * This can be any valid custom UI component structure. + * @param { SliderPrefixOptions } [options] - Optional options for customizing the prefix. + * These options can include accessibility settings. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + prefix(content: ComponentContent, options?: SliderPrefixOptions): SliderAttribute; + /** + * Sets the suffix part of the slider. + * The suffix is the content that appears after the main slider component. + * + * @param { ComponentContent } content - Custom components that will be displayed as the suffix. + * This can be any valid custom UI component structure. + * @param { SliderSuffixOptions } [options] - Optional options for customizing the suffix. + * These options can include accessibility settings. + * @returns { SliderAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + suffix(content: ComponentContent, options?: SliderSuffixOptions): SliderAttribute; } - /** * Defines Slider Component. * @@ -1745,7 +1738,6 @@ declare class SliderAttribute extends CommonMethod { * @since 11 */ declare const Slider: SliderInterface; - /** * Defines Slider Component instance. * diff --git a/api/@internal/component/ets/stepper.d.ts b/api/@internal/component/ets/stepper.d.ts index f81675778720e5127981089466b785adb87e7ccd..c4a4fd0e75e337aca5e250acafe64159e63d5c1a 100644 --- a/api/@internal/component/ets/stepper.d.ts +++ b/api/@internal/component/ets/stepper.d.ts @@ -41,6 +41,7 @@ * @crossplatform * @atomicservice * @since 11 + * @noninterop */ interface StepperInterface { /** @@ -96,6 +97,7 @@ interface StepperInterface { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare class StepperAttribute extends CommonMethod { /** @@ -264,6 +266,7 @@ declare class StepperAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Stepper: StepperInterface; @@ -287,5 +290,6 @@ declare const Stepper: StepperInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const StepperInstance: StepperAttribute; diff --git a/api/@internal/component/ets/stepper_item.d.ts b/api/@internal/component/ets/stepper_item.d.ts index 09673bc4925626bed75184c39964c2c1308f19cc..bae1bcb089405d44416ecbc7a9c5d43abda8399e 100644 --- a/api/@internal/component/ets/stepper_item.d.ts +++ b/api/@internal/component/ets/stepper_item.d.ts @@ -159,6 +159,7 @@ declare enum ItemState { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ interface StepperItemInterface { /** @@ -211,6 +212,7 @@ interface StepperItemInterface { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare class StepperItemAttribute extends CommonMethod { /** @@ -321,6 +323,7 @@ declare class StepperItemAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const StepperItemInstance: StepperItemAttribute; @@ -344,5 +347,6 @@ declare const StepperItemInstance: StepperItemAttribute; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const StepperItem: StepperItemInterface; diff --git a/api/@internal/component/ets/styled_string.d.ts b/api/@internal/component/ets/styled_string.d.ts index 33df80776477273c0172e59c707afe97016f7162..6aa3b2c4b1901f13fbc9e37c2fa4c5985c79cd4b 100644 --- a/api/@internal/component/ets/styled_string.d.ts +++ b/api/@internal/component/ets/styled_string.d.ts @@ -12,12 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - /** * Defines the StyledStringMarshallingValue Type. * @@ -29,8 +27,6 @@ * @since 19 */ declare type StyledStringMarshallingValue = UserDataSpan; - - /** * Defines the callback type used in marshalling. * @@ -44,7 +40,6 @@ declare type StyledStringMarshallingValue = UserDataSpan; * @since 19 */ declare type StyledStringMarshallCallback = (marshallableVal: StyledStringMarshallingValue) => ArrayBuffer; - /** * Defines the callback type used in unmarshalling. * @@ -58,7 +53,6 @@ declare type StyledStringMarshallCallback = (marshallableVal: StyledStringMarsha * @since 19 */ declare type StyledStringUnmarshallCallback = (buf: ArrayBuffer) => StyledStringMarshallingValue; - /** * StyledString * @@ -79,7 +73,6 @@ declare class StyledString { * @since 12 */ constructor(value: string | ImageAttachment | CustomSpan, styles?: Array); - /** * Get the length of the StyledString's characters. * @@ -91,7 +84,6 @@ declare class StyledString { * @since 12 */ readonly length: number; - /** * Get the literal content of the StyledString. * @@ -102,7 +94,6 @@ declare class StyledString { * @since 12 */ getString(): string; - /** * Get the attribute objects of the subStyledString. * @@ -110,7 +101,7 @@ declare class StyledString { * @param { number } length - the length of the subStyledString's characters. * @param { StyledStringKey } [styledKey] - the specified type. * @returns { Array } - * @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. @@ -120,7 +111,6 @@ declare class StyledString { * @since 12 */ getStyles(start: number, length: number, styledKey?: StyledStringKey): Array; - /** * Judge if two attribute strings are equal. * @@ -132,14 +122,13 @@ declare class StyledString { * @since 12 */ equals(other: StyledString): boolean; - /** * Get the substring of the StyledString. * * @param { number } start - the start position of the subStyledString. * @param { number } [length] - the length of the subStyledString's characters. * @returns { StyledString } - * @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. @@ -149,13 +138,12 @@ declare class StyledString { * @since 12 */ subStyledString(start: number, length?: number): StyledString; - /** * Returns StyledString from the provided HTML string. * * @param { string } html - the html text will be converted to a StyledString. * @returns { Promise } - * @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. @@ -165,13 +153,12 @@ declare class StyledString { * @since 12 */ static fromHtml(html: string): Promise; - /** * Returns HTML string from the provided StyledString. * * @param { StyledString } styledString - the StyledString will be converted to a HTML string. * @returns { string } Returns the HTML string converted from the provided StyledString. - * @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. @@ -181,7 +168,6 @@ declare class StyledString { * @since 14 */ static toHtml(styledString: StyledString): string; - /** * Returns ArrayBuffer from the serialized styled string. * @@ -193,7 +179,6 @@ declare class StyledString { * @since 19 */ static marshalling(styledString: StyledString, callback: StyledStringMarshallCallback): ArrayBuffer; - /** * Returns StyledString from the deserialized ArrayBuffer. * @@ -210,7 +195,6 @@ declare class StyledString { * @since 19 */ static unmarshalling(buffer: ArrayBuffer, callback: StyledStringUnmarshallCallback): Promise; - /** * Returns ArrayBuffer from the serialized styled string. * @@ -221,13 +205,12 @@ declare class StyledString { * @since 13 */ static marshalling(styledString: StyledString): ArrayBuffer; - /** * Returns StyledString from the deserialized ArrayBuffer. * * @param { ArrayBuffer } buffer - The buffer will be deserialized to a StyledString. * @returns { Promise } - * @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. @@ -238,7 +221,6 @@ declare class StyledString { */ static unmarshalling(buffer: ArrayBuffer): Promise; } - /** * StyleOptions * @@ -259,7 +241,6 @@ declare interface StyleOptions { * @since 12 */ start?: number; - /** * The length of the modifiedStyledString's characters. * @@ -270,7 +251,6 @@ declare interface StyleOptions { * @since 12 */ length?: number; - /** * The attribute key of the StyleOptions. * @@ -281,7 +261,6 @@ declare interface StyleOptions { * @since 12 */ styledKey: StyledStringKey; - /** * The attribute value of the StyleOptions. * @@ -293,7 +272,6 @@ declare interface StyleOptions { */ styledValue: StyledStringValue; } - /** * SpanStyle * @@ -314,7 +292,6 @@ declare interface SpanStyle { * @since 12 */ start: number; - /** * The length of the modifiedStyledString's characters. * @@ -325,7 +302,6 @@ declare interface SpanStyle { * @since 12 */ length: number; - /** * The attribute key of the SpanStyle. * @@ -336,7 +312,6 @@ declare interface SpanStyle { * @since 12 */ styledKey: StyledStringKey; - /** * The attribute value of the SpanStyle. * @@ -348,7 +323,6 @@ declare interface SpanStyle { */ styledValue: StyledStringValue; } - /** * Defines TextStyle. * @@ -358,7 +332,6 @@ declare interface SpanStyle { * @since 12 */ declare class TextStyle { - /** * constructor. * @@ -369,7 +342,6 @@ declare class TextStyle { * @since 12 */ constructor(value?: TextStyleInterface); - /** * Get the fontColor of the StyledString. * @@ -381,7 +353,6 @@ declare class TextStyle { * @since 12 */ readonly fontColor?: ResourceColor; - /** * Get the fontFamily of the StyledString. * @@ -393,7 +364,6 @@ declare class TextStyle { * @since 12 */ readonly fontFamily?: string; - /** * Get the fontSize of the StyledString. * If not undefined, the unit is vp. @@ -406,7 +376,6 @@ declare class TextStyle { * @since 12 */ readonly fontSize?: number; - /** * Get the fontWeight of the StyledString. * @@ -418,7 +387,6 @@ declare class TextStyle { * @since 12 */ readonly fontWeight?: number; - /** * Get the fontStyle of the StyledString. * @@ -430,7 +398,6 @@ declare class TextStyle { * @since 12 */ readonly fontStyle?: FontStyle; - /** * Get the stroke width of the StyledString with the unit 'vp'. * @@ -442,7 +409,6 @@ declare class TextStyle { * @since 20 */ readonly strokeWidth?: number; - /** * Get the stroke color of the StyledString. * @@ -454,7 +420,6 @@ declare class TextStyle { * @since 20 */ readonly strokeColor?: ResourceColor; - /** * Get the superscript style of the StyledString. * @@ -467,7 +432,6 @@ declare class TextStyle { */ readonly superscript?: SuperscriptStyle; } - /** * TextStyleInterface * @@ -488,7 +452,6 @@ declare interface TextStyleInterface { * @since 12 */ fontColor?: ResourceColor; - /** * The fontFamily value of the font property object. * @@ -499,7 +462,6 @@ declare interface TextStyleInterface { * @since 12 */ fontFamily?: ResourceStr; - /** * The fontSize value of the font property object. * @@ -510,7 +472,6 @@ declare interface TextStyleInterface { * @since 12 */ fontSize?: LengthMetrics; - /** * The fontWeight value of the font property object. * @@ -521,7 +482,6 @@ declare interface TextStyleInterface { * @since 12 */ fontWeight?: number | FontWeight | string; - /** * The fontStyle value of the font property object. * @@ -532,7 +492,6 @@ declare interface TextStyleInterface { * @since 12 */ fontStyle?: FontStyle; - /** * The stroke width of the text. * @@ -543,7 +502,6 @@ declare interface TextStyleInterface { * @since 20 */ strokeWidth?: LengthMetrics; - /** * The stroke color of the text. * @@ -554,7 +512,6 @@ declare interface TextStyleInterface { * @since 20 */ strokeColor?: ResourceColor; - /** * The superscript value of the font property object. * @@ -566,7 +523,6 @@ declare interface TextStyleInterface { */ superscript?: SuperscriptStyle; } - /** * Defines DecorationOptions for Decoration. * @@ -588,7 +544,6 @@ declare interface DecorationOptions { */ enableMultiType?: boolean; } - /** * Defines DecorationStyle. * @@ -598,7 +553,6 @@ declare interface DecorationOptions { * @since 12 */ declare class DecorationStyle { - /** * constructor. * @@ -609,7 +563,6 @@ declare class DecorationStyle { * @since 12 */ constructor(value: DecorationStyleInterface); - /** * constructor. * @@ -621,7 +574,6 @@ declare class DecorationStyle { * @since 20 */ constructor(value: DecorationStyleInterface, options?: DecorationOptions); - /** * Get the text decoration type of the StyledString. * @@ -633,7 +585,6 @@ declare class DecorationStyle { * @since 12 */ readonly type: TextDecorationType; - /** * Get the decorationColor of the StyledString. * @@ -645,7 +596,6 @@ declare class DecorationStyle { * @since 12 */ readonly color?: ResourceColor; - /** * Get the decorationStyle of the StyledString. * @@ -657,7 +607,6 @@ declare class DecorationStyle { * @since 12 */ readonly style?: TextDecorationStyle; - /** * Get the thickness scale of the StyledString. * @@ -669,7 +618,6 @@ declare class DecorationStyle { * @since 20 */ readonly thicknessScale?: number; - /** * Get the DecorationOptions of the StyledString. * @@ -682,7 +630,6 @@ declare class DecorationStyle { */ readonly options?: DecorationOptions; } - /** * DecorationStyleInterface * @@ -703,7 +650,6 @@ declare interface DecorationStyleInterface { * @since 12 */ type: TextDecorationType; - /** * The color value of the decoration property object. * @@ -714,7 +660,6 @@ declare interface DecorationStyleInterface { * @since 12 */ color?: ResourceColor; - /** * The style value of the decoration property object. * @@ -725,7 +670,6 @@ declare interface DecorationStyleInterface { * @since 12 */ style?: TextDecorationStyle; - /** * The thickness scale of the decoration * @@ -737,7 +681,6 @@ declare interface DecorationStyleInterface { */ thicknessScale?: number; } - /** * Defines BaselineOffsetStyle. * @@ -747,7 +690,6 @@ declare interface DecorationStyleInterface { * @since 12 */ declare class BaselineOffsetStyle { - /** * constructor. * @@ -758,7 +700,6 @@ declare class BaselineOffsetStyle { * @since 12 */ constructor(value: LengthMetrics); - /** * Get the baselineOffset value of the StyledString. * The unit is vp. @@ -772,7 +713,6 @@ declare class BaselineOffsetStyle { */ readonly baselineOffset: number; } - /** * Defines LetterSpacingStyle. * @@ -782,7 +722,6 @@ declare class BaselineOffsetStyle { * @since 12 */ declare class LetterSpacingStyle { - /** * constructor. * @@ -793,11 +732,10 @@ declare class LetterSpacingStyle { * @since 12 */ constructor(value: LengthMetrics); - /** * Get the letterSpacing value of the StyledString. * The unit is vp. - * + * * @type { number } - the letterSpacing value of the StyledString * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -807,7 +745,6 @@ declare class LetterSpacingStyle { */ readonly letterSpacing: number; } - /** * Defines TextShadowStyle. * @@ -817,7 +754,6 @@ declare class LetterSpacingStyle { * @since 12 */ declare class TextShadowStyle { - /** * constructor. * @@ -828,7 +764,6 @@ declare class TextShadowStyle { * @since 12 */ constructor(value: ShadowOptions | Array); - /** * Get the textShadow value of the StyledString. * @@ -841,7 +776,6 @@ declare class TextShadowStyle { */ readonly textShadow: Array; } - /** * Defines Sets the property string background color. * @@ -851,7 +785,6 @@ declare class TextShadowStyle { * @since 14 */ declare class BackgroundColorStyle { - /** * constructor. * @@ -862,7 +795,6 @@ declare class BackgroundColorStyle { * @since 14 */ constructor(textBackgroundStyle: TextBackgroundStyle); - /** * Get the textBackgroundStyle value of the StyledString. * @@ -875,7 +807,6 @@ declare class BackgroundColorStyle { */ readonly textBackgroundStyle: TextBackgroundStyle; } - /** * Defines GestureStyle. * @@ -885,7 +816,6 @@ declare class BackgroundColorStyle { * @since 12 */ declare class GestureStyle { - /** * constructor. * @@ -897,7 +827,6 @@ declare class GestureStyle { */ constructor(value?: GestureStyleInterface); } - /** * Defines the Gesture Events. * @@ -918,7 +847,6 @@ declare interface GestureStyleInterface { * @since 12 */ onClick?: Callback; - /** * Trigger a gesture event when long press event is complete. * @@ -929,7 +857,6 @@ declare interface GestureStyleInterface { * @since 12 */ onLongPress?: Callback; - /** * Trigger a touch event when touched. * @@ -941,7 +868,6 @@ declare interface GestureStyleInterface { */ onTouch?: Callback; } - /** * Defines ParagraphStyle. * @@ -951,7 +877,6 @@ declare interface GestureStyleInterface { * @since 12 */ declare class ParagraphStyle { - /** * constructor. * @@ -962,7 +887,6 @@ declare class ParagraphStyle { * @since 12 */ constructor(value?: ParagraphStyleInterface); - /** * Get the text alignment of the StyledString. * @@ -974,7 +898,6 @@ declare class ParagraphStyle { * @since 12 */ readonly textAlign?: TextAlign; - /** * Get the text vertical alignment of the StyledString. * @@ -986,7 +909,6 @@ declare class ParagraphStyle { * @since 20 */ readonly textVerticalAlign?: TextVerticalAlign; - /** * Get the first line indentation of the StyledString. * The unit is vp. @@ -999,7 +921,6 @@ declare class ParagraphStyle { * @since 12 */ readonly textIndent?: number; - /** * Get the maximum number of lines of the StyledString. * @@ -1011,7 +932,6 @@ declare class ParagraphStyle { * @since 12 */ readonly maxLines?: number; - /** * Get the overflow mode of the StyledString. * @@ -1023,7 +943,6 @@ declare class ParagraphStyle { * @since 12 */ readonly overflow?: TextOverflow; - /** * Get the wordBreak mode of the StyledString. * @@ -1035,7 +954,6 @@ declare class ParagraphStyle { * @since 12 */ readonly wordBreak?: WordBreak; - /** * Get the leading margin of the StyledString. * @@ -1047,7 +965,6 @@ declare class ParagraphStyle { * @since 12 */ readonly leadingMargin?: number | LeadingMarginPlaceholder; - /** * Get the paragraph spacing of the StyledString. * The unit is vp. @@ -1061,7 +978,6 @@ declare class ParagraphStyle { */ readonly paragraphSpacing?: number; } - /** * ParagraphStyleInterface * @@ -1082,7 +998,6 @@ declare interface ParagraphStyleInterface { * @since 12 */ textAlign?: TextAlign; - /** * Vertical alignment of text. * @@ -1093,7 +1008,6 @@ declare interface ParagraphStyleInterface { * @since 20 */ textVerticalAlign?: TextVerticalAlign; - /** * Set the first line indentation. * @@ -1104,7 +1018,6 @@ declare interface ParagraphStyleInterface { * @since 12 */ textIndent?: LengthMetrics; - /** * The maximum number of lines of content. * @@ -1115,7 +1028,6 @@ declare interface ParagraphStyleInterface { * @since 12 */ maxLines?: number; - /** * The overflow mode of the content. * @@ -1126,7 +1038,6 @@ declare interface ParagraphStyleInterface { * @since 12 */ overflow?: TextOverflow; - /** * Set word break type. * @@ -1137,7 +1048,6 @@ declare interface ParagraphStyleInterface { * @since 12 */ wordBreak?: WordBreak; - /** * Leading margin. * @@ -1148,7 +1058,6 @@ declare interface ParagraphStyleInterface { * @since 12 */ leadingMargin?: LengthMetrics | LeadingMarginPlaceholder; - /** * Set the paragraph spacing of the StyledString. * @@ -1160,7 +1069,6 @@ declare interface ParagraphStyleInterface { */ paragraphSpacing?: LengthMetrics; } - /** * Defines LineHeightStyle. * @@ -1170,7 +1078,6 @@ declare interface ParagraphStyleInterface { * @since 12 */ declare class LineHeightStyle { - /** * constructor. * @@ -1181,11 +1088,10 @@ declare class LineHeightStyle { * @since 12 */ constructor(lineHeight: LengthMetrics); - /** * Get the lineHeight value of the StyledString. * The unit is vp. - * + * * @type { number } - the lineHeight value of the StyledString * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -1195,7 +1101,6 @@ declare class LineHeightStyle { */ readonly lineHeight: number; } - /** * Defines the URLStyle hyperlink that allows setting a URL string. When clicking on the text to * which the span is attached, the URLStyle will try to open the URL. @@ -1206,7 +1111,6 @@ declare class LineHeightStyle { * @since 14 */ declare class UrlStyle { - /** * Constructor. * @@ -1217,7 +1121,6 @@ declare class UrlStyle { * @since 14 */ constructor(url: string); - /** * Get the URL value of the StyledString. * @@ -1230,7 +1133,6 @@ declare class UrlStyle { */ readonly url: string; } - /** * Defines the Span Type. * @@ -1242,7 +1144,6 @@ declare class UrlStyle { * @atomicservice * @since 12 */ - /** * Defines the Span Type. * @@ -1254,10 +1155,7 @@ declare class UrlStyle { * @atomicservice * @since 14 */ -declare type StyledStringValue = TextStyle | DecorationStyle | BaselineOffsetStyle | LetterSpacingStyle | -TextShadowStyle | GestureStyle | ImageAttachment | ParagraphStyle | LineHeightStyle | UrlStyle | CustomSpan | -UserDataSpan | BackgroundColorStyle; - +declare type StyledStringValue = TextStyle | DecorationStyle | BaselineOffsetStyle | LetterSpacingStyle | TextShadowStyle | GestureStyle | ImageAttachment | ParagraphStyle | LineHeightStyle | UrlStyle | CustomSpan | UserDataSpan | BackgroundColorStyle; /** * MutableStyledString * @@ -1274,7 +1172,7 @@ declare class MutableStyledString extends StyledString { * @param { number } start - the start position of the replacedString. * @param { number } length - the length of the replacedString's characters. * @param { string } other - must be unicode string. - * @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. @@ -1284,13 +1182,12 @@ declare class MutableStyledString extends StyledString { * @since 12 */ replaceString(start: number, length: number, other: string): void; - /** * Insert the string at the specified location. * * @param { number } start - the start position of the insertedString. * @param { string } other - must be unicode string. - * @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. @@ -1300,13 +1197,12 @@ declare class MutableStyledString extends StyledString { * @since 12 */ insertString(start: number, other: string): void; - /** * Remove the string of the specified range. * * @param { number } start - the start position of the removedString. * @param { number } length - the length of the removedString's characters. - * @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. @@ -1316,12 +1212,11 @@ declare class MutableStyledString extends StyledString { * @since 12 */ removeString(start: number, length: number): void; - /** * Replace the specified range string attribute. * * @param { SpanStyle } spanStyle - the SpanStyle Object. - * @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. @@ -1331,7 +1226,6 @@ declare class MutableStyledString extends StyledString { * @since 12 */ replaceStyle(spanStyle: SpanStyle): void; - /** * Add attributes to the specified range string. * @@ -1343,14 +1237,13 @@ declare class MutableStyledString extends StyledString { * @since 12 */ setStyle(spanStyle: SpanStyle): void; - /** * Delete the specified type attributes for the specified range string. * * @param { number } start - the start position of the removedAttributeStyledString. * @param { number } length - the length of the removedAttributeStyledString's characters. * @param { StyledStringKey } styledKey - the specified attribute type's key. - * @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. @@ -1360,13 +1253,12 @@ declare class MutableStyledString extends StyledString { * @since 12 */ removeStyle(start: number, length: number, styledKey: StyledStringKey): void; - /** * Delete all attributes for the specified range styledString. * * @param { number } start - the start position of the attributeRemovedStyledString's characters. * @param { number } length - the length of the attributeRemovedStyledString's characters. - * @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. @@ -1376,7 +1268,6 @@ declare class MutableStyledString extends StyledString { * @since 12 */ removeStyles(start: number, length: number): void; - /** * Delete all attributes. * @@ -1386,14 +1277,13 @@ declare class MutableStyledString extends StyledString { * @since 12 */ clearStyles(): void; - /** * Replace the StyledString of the specified range. * * @param { number } start - the start position of the replacedStyledString. * @param { number } length - the length of the replacedStyledString's characters. * @param { StyledString } other - new StyledString. - * @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. @@ -1403,13 +1293,12 @@ declare class MutableStyledString extends StyledString { * @since 12 */ replaceStyledString(start: number, length: number, other: StyledString): void; - /** * Insert new StyledString at the specified location. * * @param { number } start - the start position of the insertedStyledString. * @param { StyledString } other - new StyledString. - * @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. @@ -1419,7 +1308,6 @@ declare class MutableStyledString extends StyledString { * @since 12 */ insertStyledString(start: number, other: StyledString): void; - /** * Append new StyledString at the end. * @@ -1431,8 +1319,6 @@ declare class MutableStyledString extends StyledString { */ appendStyledString(other: StyledString): void; } - - /** * the attribute type of the StyledString * @@ -1452,7 +1338,6 @@ declare enum StyledStringKey { * @since 12 */ FONT = 0, - /** * The key of DecorationStyle. * @@ -1461,68 +1346,61 @@ declare enum StyledStringKey { * @atomicservice * @since 12 */ - DECORATION = 1, - - /** - * The key of BaselineOffsetStyle. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - BASELINE_OFFSET = 2, - - /** - * The key of LetterSpacingStyle. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - LETTER_SPACING = 3, - - /** - * The key of TextShadowStyle. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - TEXT_SHADOW = 4, - - /** - * The key of LineHeightStyle. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - LINE_HEIGHT = 5, - - /** - * The key of BackgroundColorStyle. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - BACKGROUND_COLOR = 6, - - /** - * The key of UrlStyle. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - URL = 7, - + DECORATION = 1, + /** + * The key of BaselineOffsetStyle. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + BASELINE_OFFSET = 2, + /** + * The key of LetterSpacingStyle. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + LETTER_SPACING = 3, + /** + * The key of TextShadowStyle. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + TEXT_SHADOW = 4, + /** + * The key of LineHeightStyle. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + LINE_HEIGHT = 5, + /** + * The key of BackgroundColorStyle. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + BACKGROUND_COLOR = 6, + /** + * The key of UrlStyle. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + URL = 7, /** * The key of GestureStyle. * @@ -1532,7 +1410,6 @@ declare enum StyledStringKey { * @since 12 */ GESTURE = 100, - /** * The key of ParagraphStyle. * @@ -1542,7 +1419,6 @@ declare enum StyledStringKey { * @since 12 */ PARAGRAPH_STYLE = 200, - /** * The key of ImageAttachment. * @@ -1552,7 +1428,6 @@ declare enum StyledStringKey { * @since 12 */ IMAGE = 300, - /** * The key of CustomSpan. * @@ -1562,7 +1437,6 @@ declare enum StyledStringKey { * @since 12 */ CUSTOM_SPAN = 400, - /** * The key of UserDataSpan. * @@ -1571,9 +1445,8 @@ declare enum StyledStringKey { * @atomicservice * @since 12 */ - USER_DATA = 500, + USER_DATA = 500 } - /** * Defines ImageAttachment. * @@ -1583,7 +1456,6 @@ declare enum StyledStringKey { * @since 12 */ declare class ImageAttachment { - /** * constructor. * @@ -1594,7 +1466,6 @@ declare class ImageAttachment { * @since 12 */ constructor(value: ImageAttachmentInterface); - /** * constructor supported by AttachmentType. * @@ -1605,7 +1476,6 @@ declare class ImageAttachment { * @since 15 */ constructor(attachment: Optional); - /** * Get the image content of the StyledString. * @@ -1617,7 +1487,6 @@ declare class ImageAttachment { * @since 12 */ readonly value: PixelMap; - /** * Get the imageSize of the StyledString. * @@ -1629,7 +1498,6 @@ declare class ImageAttachment { * @since 12 */ readonly size?: SizeOptions; - /** * Get the ImageSpanAlignment of the StyledString. * @@ -1641,7 +1509,6 @@ declare class ImageAttachment { * @since 12 */ readonly verticalAlign?: ImageSpanAlignment; - /** * Get the imageFit of the StyledString. * @@ -1653,7 +1520,6 @@ declare class ImageAttachment { * @since 12 */ readonly objectFit?: ImageFit; - /** * Get the imageAttachmentLayoutStyle of the StyledString. * @@ -1665,7 +1531,6 @@ declare class ImageAttachment { * @since 12 */ readonly layoutStyle?: ImageAttachmentLayoutStyle; - /** * Get the imageAttachment colorFilter of the StyledString. * @@ -1678,7 +1543,6 @@ declare class ImageAttachment { */ readonly colorFilter?: ColorFilterType; } - /** * Defines the ResourceImageAttachmentOptions. * @@ -1699,7 +1563,6 @@ declare interface ResourceImageAttachmentOptions { * @since 15 */ resourceValue: Optional; - /** * size of the ResourceImage. * @@ -1710,7 +1573,6 @@ declare interface ResourceImageAttachmentOptions { * @since 15 */ size?: SizeOptions; - /** * Image vertical align. * @@ -1721,7 +1583,6 @@ declare interface ResourceImageAttachmentOptions { * @since 15 */ verticalAlign?: ImageSpanAlignment; - /** * Sets the zoom type of the ImageAttachment. * @@ -1732,7 +1593,6 @@ declare interface ResourceImageAttachmentOptions { * @since 15 */ objectFit?: ImageFit; - /** * The Image Layout Style of the Resource Image. * @@ -1743,7 +1603,6 @@ declare interface ResourceImageAttachmentOptions { * @since 15 */ layoutStyle?: ImageAttachmentLayoutStyle; - /** * Sets the color filter effect on the image attachment. * @@ -1754,7 +1613,6 @@ declare interface ResourceImageAttachmentOptions { * @since 15 */ colorFilter?: ColorFilterType; - /** * Sets the synchronous or asynchronous mode for image loading. * The default parameter type is bool, and the default value is false. @@ -1767,7 +1625,6 @@ declare interface ResourceImageAttachmentOptions { */ syncLoad?: boolean; } - /** * Defines the ImageAttachmentInterface. * @@ -1788,7 +1645,6 @@ declare interface ImageAttachmentInterface { * @since 12 */ value: PixelMap; - /** * Image size. * @@ -1799,7 +1655,6 @@ declare interface ImageAttachmentInterface { * @since 12 */ size?: SizeOptions; - /** * Image vertical align. * @@ -1810,7 +1665,6 @@ declare interface ImageAttachmentInterface { * @since 12 */ verticalAlign?: ImageSpanAlignment; - /** * Image fit. * @@ -1821,7 +1675,6 @@ declare interface ImageAttachmentInterface { * @since 12 */ objectFit?: ImageFit; - /** * The Image Layout Style. * @@ -1832,7 +1685,6 @@ declare interface ImageAttachmentInterface { * @since 12 */ layoutStyle?: ImageAttachmentLayoutStyle; - /** * Sets the color filter effect on the image attachment. * @@ -1844,7 +1696,6 @@ declare interface ImageAttachmentInterface { */ colorFilter?: ColorFilterType; } - /** * Defines the Attachment Type. * @@ -1855,7 +1706,6 @@ declare interface ImageAttachmentInterface { * @since 15 */ declare type AttachmentType = ImageAttachmentInterface | ResourceImageAttachmentOptions; - /** * Defines the ColorFilter Type. * @@ -1866,7 +1716,6 @@ declare type AttachmentType = ImageAttachmentInterface | ResourceImageAttachment * @since 15 */ declare type ColorFilterType = ColorFilter | DrawingColorFilter; - /** * Defines the ImageAttachment Layout Style. * @@ -1887,7 +1736,6 @@ declare interface ImageAttachmentLayoutStyle { * @since 12 */ margin?: LengthMetrics | Margin; - /** * Inner margin. * @@ -1898,7 +1746,6 @@ declare interface ImageAttachmentLayoutStyle { * @since 12 */ padding?: LengthMetrics | Padding; - /** * Border radius. * @@ -1910,7 +1757,6 @@ declare interface ImageAttachmentLayoutStyle { */ borderRadius?: LengthMetrics | BorderRadiuses; } - /** * Defines the CustomSpanMetrics interface. * @@ -1933,7 +1779,6 @@ declare interface CustomSpanMetrics { * @since 12 */ width: number; - /** * CustomSpan Height. * The unit is vp. @@ -1946,7 +1791,6 @@ declare interface CustomSpanMetrics { */ height?: number; } - /** * Defines the CustomSpanDrawInfo interface. * @@ -1960,7 +1804,7 @@ declare interface CustomSpanDrawInfo { /** * CustomSpan's offset relative to the parent component. * The unit is px. - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1968,11 +1812,10 @@ declare interface CustomSpanDrawInfo { * @since 12 */ x: number; - /** * The top position of the line where customSpan is located. * The unit is px. - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1980,11 +1823,10 @@ declare interface CustomSpanDrawInfo { * @since 12 */ lineTop: number; - /** * The bottom position of the line where customSpan is located. * The unit is px. - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -1992,11 +1834,10 @@ declare interface CustomSpanDrawInfo { * @since 12 */ lineBottom: number; - /** * The baseline offset of the line where customSpan is located. * The unit is px. - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -2005,7 +1846,6 @@ declare interface CustomSpanDrawInfo { */ baseline: number; } - /** * Defines the CustomSpanMeasureInfo interface. * @@ -2019,7 +1859,7 @@ declare interface CustomSpanMeasureInfo { /** * Current component's fontSize value. * The unit is fp. - * + * * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -2028,7 +1868,6 @@ declare interface CustomSpanMeasureInfo { */ fontSize: number; } - /** * Defines CustomSpan. * @@ -2048,8 +1887,7 @@ declare abstract class CustomSpan { * @atomicservice * @since 12 */ - abstract onMeasure(measureInfo: CustomSpanMeasureInfo) : CustomSpanMetrics; - + abstract onMeasure(measureInfo: CustomSpanMeasureInfo): CustomSpanMetrics; /** * Draw the custom span. * @@ -2061,7 +1899,6 @@ declare abstract class CustomSpan { * @since 12 */ abstract onDraw(context: DrawContext, drawInfo: CustomSpanDrawInfo): void; - /** * Invalidate all components that use the object, which will cause a re-render of all components. * @@ -2072,7 +1909,6 @@ declare abstract class CustomSpan { */ invalidate(): void; } - /** * Defines UserDataSpan. Used to store and obtain user data. * @@ -2081,4 +1917,5 @@ declare abstract class CustomSpan { * @atomicservice * @since 12 */ -declare abstract class UserDataSpan {} \ No newline at end of file +declare abstract class UserDataSpan { +} diff --git a/api/@internal/component/ets/swiper.d.ts b/api/@internal/component/ets/swiper.d.ts index d5b6bf321f5c308a5dd851eb831b43829c366f52..bf63a8a7e52e1132d33a568b14796149665a55b4 100644 --- a/api/@internal/component/ets/swiper.d.ts +++ b/api/@internal/component/ets/swiper.d.ts @@ -1085,6 +1085,7 @@ declare enum SwiperDisplayMode { * @form * @atomicservice * @since 11 + * @noninterop */ interface SwiperInterface { /** @@ -1455,6 +1456,7 @@ declare type OnSwiperGestureSwipeCallback = (index: number, extraInfo: SwiperAni * @form * @atomicservice * @since 11 + * @noninterop */ declare class SwiperAttribute extends CommonMethod { /** @@ -2641,6 +2643,7 @@ declare type ContentWillScrollCallback = (result: SwiperContentWillScrollResult) * @form * @atomicservice * @since 11 + * @noninterop */ declare const Swiper: SwiperInterface; @@ -2666,5 +2669,6 @@ declare const Swiper: SwiperInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const SwiperInstance: SwiperAttribute; diff --git a/api/@internal/component/ets/tab_content.d.ts b/api/@internal/component/ets/tab_content.d.ts index 0b608df9b788f09b288528d740a3b94c946c3b78..fa475a42583812c3a4c36425f6acabc6613eab28 100644 --- a/api/@internal/component/ets/tab_content.d.ts +++ b/api/@internal/component/ets/tab_content.d.ts @@ -516,10 +516,9 @@ declare interface TabBarIconStyle { */ declare class TabBarSymbol { /** - * Symbol icon in the normal style. + * The properties of the symbol icon in the tab bar need to be unselected. * * @type { SymbolGlyphModifier } - * @default fontColor: #66182431, renderingStrategy: SymbolRenderingStrategy.MULTIPLE_OPACITY, fontSize: 24vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 @@ -537,10 +536,9 @@ declare class TabBarSymbol { normal: SymbolGlyphModifier; /** - * Symbol icon in the selected style. + * The properties of the symbol icon in the tab bar need to be unselected. * * @type { ?SymbolGlyphModifier } - * @default fontColor: #ff007dff, renderingStrategy: SymbolRenderingStrategy.MULTIPLE_OPACITY, fontSize: 24vp * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 diff --git a/api/@internal/component/ets/tabs.d.ts b/api/@internal/component/ets/tabs.d.ts index ed4700810d14fb40e538bc76fbb66768c8405947..ce3662c4b4b2da59c33cb232cabf4eac419554d0 100644 --- a/api/@internal/component/ets/tabs.d.ts +++ b/api/@internal/component/ets/tabs.d.ts @@ -101,7 +101,7 @@ declare enum BarMode { * @atomicservice * @since 11 */ - Fixed = 1, + Fixed = 1 } /** @@ -541,7 +541,7 @@ declare interface TabsOptions { * @atomicservice * @since 11 */ - controller?: TabsController + controller?: TabsController; /** * Set common attributes to tabbar. @@ -1333,7 +1333,7 @@ declare class TabsAttribute extends CommonMethod { */ barHeight(value: Length): TabsAttribute; - /** + /** * Called when the height of the bar graph is set. * Notice: barHeight only supports Number type on 7, supports Length type since 8. * @@ -1346,7 +1346,7 @@ declare class TabsAttribute extends CommonMethod { * @atomicservice * @since 20 */ - barHeight(height: Length, noMinHeightLimit: boolean): TabsAttribute; + barHeight(height: Length, noMinHeightLimit: boolean): TabsAttribute; /** * Sets the animation curve @@ -1364,7 +1364,7 @@ declare class TabsAttribute extends CommonMethod { * @atomicservice * @since 20 */ - animationCurve(curve: Curve | ICurve): TabsAttribute; + animationCurve(curve: Curve | ICurve): TabsAttribute; /** * Called when the animation duration of the bar graph is set. @@ -1472,16 +1472,16 @@ declare class TabsAttribute extends CommonMethod { onChange(event: Callback): TabsAttribute; /** - * Called when a new tab becomes selected. Animation is not necessarily complete. + * Called when a new tab becomes unselected. Animation is not necessarily complete. * - * @param { Callback } event - callback to notify which index has been selected + * @param { Callback } event - callback to notify which index has been unselected * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 18 */ - onSelected(event: Callback): TabsAttribute; + onUnselected(event: Callback): TabsAttribute; /** * Called when the tab is clicked. @@ -1515,18 +1515,6 @@ declare class TabsAttribute extends CommonMethod { */ onTabBarClick(event: Callback): TabsAttribute; - /** - * Called when a new tab becomes unselected. Animation is not necessarily complete. - * - * @param { Callback } event - callback to notify which index has been unselected - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onUnselected(event: Callback): TabsAttribute; - /** * Called when the tab content flip animation start. * @@ -1858,6 +1846,19 @@ declare class TabsAttribute extends CommonMethod { */ barBackgroundEffect(options: BackgroundEffectOptions): 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. + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 19 + */ + cachedMaxCount(count: number, mode: TabsCacheMode): TabsAttribute; + /** * Called when content will change. * @@ -1896,17 +1897,16 @@ declare class TabsAttribute extends CommonMethod { onContentWillChange(handler: OnTabsContentWillChangeCallback): TabsAttribute; /** - * Sets the maximum number of child components to be cached. + * Called when a new tab becomes selected. Animation is not necessarily complete. * - * @param { number } count - the maximum number of child components to be cached. - * @param { TabsCacheMode } mode - the mode of caching child components. + * @param { Callback } event - callback to notify which index has been selected * @returns { TabsAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 19 + * @since 18 */ - cachedMaxCount(count: number, mode: TabsCacheMode): TabsAttribute; + onSelected(event: Callback): TabsAttribute; } /** diff --git a/api/@internal/component/ets/text_clock.d.ts b/api/@internal/component/ets/text_clock.d.ts index 72059f918df764eb406996d59906dcddcb51ccc3..29a9c245dc6d74f1a14e0581a00ba86da8f24820 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 { /** @@ -410,6 +450,7 @@ declare class TextClockAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ format(value: ResourceStr): TextClockAttribute; @@ -456,7 +497,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 +528,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 +559,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 +590,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 +621,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 +652,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 +676,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 +706,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 +719,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 +733,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..3e09a8ca6cf04164be3ba6cd2445724522d3426e 100644 --- a/api/@internal/component/ets/text_common.d.ts +++ b/api/@internal/component/ets/text_common.d.ts @@ -147,13 +147,12 @@ declare interface TextDataDetectorConfig { /** * Text data detect result callback. * - * @type { ?function } + * @type { ?Callback } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 */ - onDetectResultUpdate?: (result: string) => void - +onDetectResultUpdate?: Callback; /** * The color of AI entity. * diff --git a/api/@internal/component/ets/text_picker.d.ts b/api/@internal/component/ets/text_picker.d.ts index 7ff3c71a6d42a4caba14433d049db9433b218d9e..49e7af9f00042be97a7369fbe065085f6c3e6594 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; @@ -402,7 +448,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 */ 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 { /** @@ -619,7 +676,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 */ defaultPickerItemHeight(value: number | string): TextPickerAttribute; @@ -634,7 +692,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 */ 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,7 +766,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 */ disappearTextStyle(style: Optional): TextPickerAttribute; @@ -726,7 +789,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,7 +804,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 */ textStyle(style: Optional): TextPickerAttribute; @@ -761,7 +826,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,7 +840,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 */ selectedTextStyle(style: Optional): TextPickerAttribute; @@ -787,7 +854,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 +867,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 +938,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 +954,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 +970,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 +986,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 +1016,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 +1035,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 +1048,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 +1061,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 +1080,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 +1093,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 +1114,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 +1128,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 +1168,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 +1196,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 +1223,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 +1254,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 +1281,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 +1303,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 +1323,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 +1343,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 +1361,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 +1379,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 +1399,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 +1414,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 +1430,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 +1457,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 +1484,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 +1511,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 +1523,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 +1547,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 +1569,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 +1590,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 +1611,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 +1633,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 +1655,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 +1667,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 +1679,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 +1701,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 +1718,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 +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 */ onWillAppear?: () => void; @@ -1648,7 +1756,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 +1770,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 +1783,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 +1796,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 +1816,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; @@ -1739,7 +1852,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..4fc274659814f7df5b5a9bf1e61eb70a2a638590 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 { /** @@ -205,6 +221,18 @@ declare interface TimePickerOptions { */ selected?: Date; + /** + * Specifies the time selector check time. + * + * @type { ?(Date | Bindable) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + selected?: Date | Bindable; + /** * Specifies the format of the TimePicker that need to be displayed. * @@ -222,7 +250,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 +262,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 +274,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 +302,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 +331,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 +354,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 +381,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 +410,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 +423,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 +443,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 +455,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 +477,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 +490,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 +512,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 +525,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 +547,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 +560,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 +573,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 +586,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 +628,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 +641,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 +653,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 +665,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 +678,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 +691,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 +722,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 +748,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 +768,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 +788,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 +800,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 +812,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 +832,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 +852,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 +872,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 +892,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 +919,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 +946,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 +973,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 +985,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 +1007,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 +1029,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 +1041,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 +1053,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 +1066,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 +1078,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 +1090,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 +1102,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 +1114,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 +1126,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 +1138,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 +1151,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 +1164,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 +1176,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 +1201,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/ui_extension_component.d.ts b/api/@internal/component/ets/ui_extension_component.d.ts index d3b85e3b247da9e8b788d09dc8573e8e123cf2a7..3d2f1f2e2754e5bb4db46be8f45184778899e9ca 100644 --- a/api/@internal/component/ets/ui_extension_component.d.ts +++ b/api/@internal/component/ets/ui_extension_component.d.ts @@ -21,7 +21,7 @@ /** * Enumeration of different types of DpiFollowStrategy. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 12 @@ -48,7 +48,7 @@ declare enum DpiFollowStrategy { /** * Enumeration of different types of WindowModeFollowStrategy. - * @enum { number } + * @enum { int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 18 @@ -61,14 +61,13 @@ declare enum WindowModeFollowStrategy { * @since 18 */ FOLLOW_HOST_WINDOW_MODE = 0, - /** * Followed the UIExtensionAbility. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 18 */ - FOLLOW_UI_EXTENSION_ABILITY_WINDOW_MODE = 1, + FOLLOW_UI_EXTENSION_ABILITY_WINDOW_MODE = 1 } /** @@ -177,7 +176,6 @@ declare interface TerminationInfo { * @since 18 */ declare type ReceiveCallback = import('../api/@ohos.base').Callback>; - /** * This interface is used for send data to the UIExtensionAbility.
* It is returned from onRemoteReady callback of UIExtensionComponent
diff --git a/api/@internal/component/ets/units.d.ts b/api/@internal/component/ets/units.d.ts index 13660a7d9124b7eaa9f893f136c0fa2d85effc18..4d08243160a021314841c18fbb0c74bfc317eb8d 100644 --- a/api/@internal/component/ets/units.d.ts +++ b/api/@internal/component/ets/units.d.ts @@ -363,9 +363,9 @@ declare type Padding = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ top?: Length; @@ -399,9 +399,9 @@ declare type Padding = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ right?: Length; @@ -435,9 +435,9 @@ declare type Padding = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ bottom?: Length; @@ -471,9 +471,9 @@ declare type Padding = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ left?: Length; }; @@ -536,7 +536,7 @@ declare interface LocalizedPadding { * @since 12 */ start?: LengthMetrics; -}; +} /** * Defines the margin property. @@ -644,9 +644,9 @@ declare type EdgeWidths = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ top?: Length; @@ -673,9 +673,9 @@ declare type EdgeWidths = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ right?: Length; @@ -702,9 +702,9 @@ declare type EdgeWidths = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ bottom?: Length; @@ -731,9 +731,9 @@ declare type EdgeWidths = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ left?: Length; }; @@ -796,7 +796,7 @@ declare interface LocalizedEdgeWidths { * @since 12 */ start?: LengthMetrics; -}; +} /** * Defines the outline width property. @@ -953,9 +953,9 @@ declare type BorderRadiuses = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ topLeft?: Length; @@ -982,9 +982,9 @@ declare type BorderRadiuses = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ topRight?: Length; @@ -1011,9 +1011,9 @@ declare type BorderRadiuses = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ bottomLeft?: Length; @@ -1040,9 +1040,9 @@ declare type BorderRadiuses = { * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ bottomRight?: Length; }; @@ -1057,7 +1057,7 @@ declare type BorderRadiuses = { * @atomicservice * @since 12 */ -declare interface LocalizedBorderRadiuses { +declare interface LocalizedBorderRadiuses { /** * top-start property. * @@ -1105,7 +1105,7 @@ declare interface LocalizedBorderRadiuses { * @since 12 */ bottomEnd?: LengthMetrics; -}; +} /** * Defines the outline radius property. @@ -1263,9 +1263,9 @@ declare type EdgeColors = { * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ top?: ResourceColor; @@ -1292,9 +1292,9 @@ declare type EdgeColors = { * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ right?: ResourceColor; @@ -1321,9 +1321,9 @@ declare type EdgeColors = { * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ bottom?: ResourceColor; @@ -1350,9 +1350,9 @@ declare type EdgeColors = { * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ left?: ResourceColor; }; @@ -1367,7 +1367,7 @@ declare type EdgeColors = { * @atomicservice * @since 12 */ -declare interface LocalizedEdgeColors { +declare interface LocalizedEdgeColors { /** * top property. * @@ -1415,7 +1415,7 @@ declare interface LocalizedEdgeColors { * @since 12 */ start?: ResourceColor; -}; +} /** * Defines the localized margin property. @@ -1480,9 +1480,9 @@ declare type EdgeStyles = { * @type { ?BorderStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ top?: BorderStyle; @@ -1509,9 +1509,9 @@ declare type EdgeStyles = { * @type { ?BorderStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ right?: BorderStyle; @@ -1538,9 +1538,9 @@ declare type EdgeStyles = { * @type { ?BorderStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ bottom?: BorderStyle; @@ -1567,9 +1567,9 @@ declare type EdgeStyles = { * @type { ?BorderStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ left?: BorderStyle; }; @@ -1844,9 +1844,9 @@ declare type LengthConstrain = { * @type { Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ minLength: Length; @@ -1873,9 +1873,9 @@ declare type LengthConstrain = { * @type { Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice * @since 11 - * @form */ maxLength: Length; }; diff --git a/api/@internal/component/ets/water_flow.d.ts b/api/@internal/component/ets/water_flow.d.ts index 6bb9e242a5ca65ccbc179991481b55175b594a1e..f39fb55bc8339232c03e08db30fd7fda1f6d6bee 100644 --- a/api/@internal/component/ets/water_flow.d.ts +++ b/api/@internal/component/ets/water_flow.d.ts @@ -44,7 +44,8 @@ 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 @@ -149,7 +150,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. @@ -185,8 +187,10 @@ 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 @@ -248,9 +252,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), @@ -805,18 +811,6 @@ 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; /** * Triggered when the first or last item displayed in the component changes. diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index f94ee18739a22d8f06fc82be483446ea5904dd05..0de70bb9c560c1b53ccb849eb2392c73e58afa16 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -18,6 +18,28 @@ * @kit ArkWeb */ +/*** if arkts 1.2 */ +import webview from '../../@ohos.web.webview'; +import image from '../../@ohos.multimedia.image'; +import { CommonMethod, Callback, TouchEvent, NestedScrollOptions, KeyEvent } from './common'; +import { CustomBuilder } from './builder' +import { Resource } from '../../global/resource'; +import { Position, ResourceStr } from './units'; +import { MenuType, EditMenuOptions } from './textCommon'; +import { CopyOptions, NestedScrollMode } from './enums'; +/*** 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. * @@ -71,7 +93,8 @@ type OnSslErrorEventCallback = (sslErrorEvent: SslErrorEvent) => void; * @param { LargestContentfulPaint } largestContentfulPaint - callback information of onLargestContentfulPaint. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnLargestContentfulPaintCallback = (largestContentfulPaint: LargestContentfulPaint) => void; @@ -82,7 +105,8 @@ type OnLargestContentfulPaintCallback = (largestContentfulPaint: LargestContentf * @param { FirstMeaningfulPaint } firstMeaningfulPaint - callback information of onFirstMeaningfulPaint. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnFirstMeaningfulPaintCallback = (firstMeaningfulPaint: FirstMeaningfulPaint) => void; @@ -96,7 +120,8 @@ type OnFirstMeaningfulPaintCallback = (firstMeaningfulPaint: FirstMeaningfulPain * false causes the Web to continue loading the url as usual. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnOverrideUrlLoadingCallback = (webResourceRequest: WebResourceRequest) => boolean; @@ -117,7 +142,8 @@ type OnIntelligentTrackingPreventionCallback = (details: IntelligentTrackingPrev * @typedef { function } OnNativeEmbedVisibilityChangeCallback * @param { NativeEmbedVisibilityInfo } nativeEmbedVisibilityInfo - callback information of onNativeEmbedVisibilityChange. * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnNativeEmbedVisibilityChangeCallback = (nativeEmbedVisibilityInfo: NativeEmbedVisibilityInfo) => void; @@ -127,7 +153,8 @@ type OnNativeEmbedVisibilityChangeCallback = (nativeEmbedVisibilityInfo: NativeE * @typedef NativeMediaPlayerConfig * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NativeMediaPlayerConfig { /** @@ -138,7 +165,8 @@ declare interface NativeMediaPlayerConfig { * Deflault value: false. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enable: boolean; @@ -150,7 +178,8 @@ declare interface NativeMediaPlayerConfig { * Deflault value: false. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ shouldOverlay: boolean; } @@ -161,7 +190,8 @@ declare interface NativeMediaPlayerConfig { * @typedef { function } OnRenderProcessNotRespondingCallback * @param { RenderProcessNotRespondingData } data - details of onRenderProcessNotResponding. * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnRenderProcessNotRespondingCallback = (data : RenderProcessNotRespondingData) => void; @@ -170,18 +200,20 @@ type OnRenderProcessNotRespondingCallback = (data : RenderProcessNotRespondingDa * * @typedef { function } OnRenderProcessRespondingCallback * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnRenderProcessRespondingCallback = () => void; /** - * The callback of ViewportFit Changed. +* The callback of ViewportFit Changed. * * @typedef { function } OnViewportFitChangedCallback * @param { ViewportFit } viewportFit - details of OnViewportFitChangedCallback. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnViewportFitChangedCallback = (viewportFit: ViewportFit) => void; @@ -232,7 +264,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,19 +274,21 @@ 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; /** * Set the enter key type when the system keyboard is used, the "enter" key related to the {@link inputMethodEngine}. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - enterKeyType?: number; + enterKeyType?: int; /** * Set the custom keyboard builder when the custom keyboard is used. @@ -261,7 +296,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 +307,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 +316,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,42 +326,47 @@ 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; /** * Deletes the specified length of characters from the back to the front in the Web input field. * - * @param { number } length - length of text, which will be deleted from back to front. + * @param { int } 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; + deleteForward(length: int): void; /** * Delete the specified length of characters in the Web input field from the beginning to the end. * - * @param { number } length - length of text, which will be deleted from front to back. + * @param { int } 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; + deleteBackward(length: int): void; /** * Send the function of the key. * - * @param { number } key - action indicates the "enter" key related to the {@link inputMethodEngine} + * @param { int } key - action indicates the "enter" key related to the {@link inputMethodEngine} * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - sendFunctionKey(key: number): void; + sendFunctionKey(key: int): void; /** * Close the custom keyboard. * * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ close(): void; } @@ -334,7 +377,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 +387,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; @@ -353,7 +398,8 @@ declare interface WebKeyboardCallbackInfo { * @type { Record } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ attributes: Record; } @@ -366,7 +412,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; @@ -384,7 +431,8 @@ type WebKeyboardCallback = (keyboardCallbackInfo: WebKeyboardCallbackInfo) => We * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MessageLevel { /** @@ -399,7 +447,8 @@ declare enum MessageLevel { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Debug, @@ -415,7 +464,8 @@ declare enum MessageLevel { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Error, @@ -431,7 +481,8 @@ declare enum MessageLevel { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Info, @@ -447,7 +498,8 @@ declare enum MessageLevel { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Log, @@ -463,7 +515,8 @@ declare enum MessageLevel { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Warn } @@ -490,7 +543,8 @@ declare enum MessageLevel { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum MixedMode { /** @@ -512,7 +566,8 @@ declare enum MixedMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ All = 0, @@ -535,7 +590,8 @@ declare enum MixedMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ Compatible = 1, @@ -558,7 +614,8 @@ declare enum MixedMode { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ None = 2 } @@ -587,7 +644,8 @@ type OnSafeBrowsingCheckResultCallback = (threatType: ThreatType) => void; * @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 HitTestType { /** @@ -601,7 +659,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ EditText = 0, @@ -616,7 +675,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Email = 1, @@ -631,7 +691,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ HttpAnchor = 2, @@ -646,7 +707,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ HttpAnchorImg = 3, @@ -661,7 +723,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Img = 4, @@ -676,7 +739,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Map = 5, @@ -691,7 +755,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Phone = 6, @@ -706,7 +771,8 @@ declare enum HitTestType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Unknown = 7 } @@ -835,7 +901,8 @@ declare enum CacheMode { * @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 OverScrollMode { /** @@ -843,7 +910,8 @@ declare enum OverScrollMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ NEVER = 0, @@ -852,7 +920,8 @@ declare enum OverScrollMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ALWAYS = 1 } @@ -863,7 +932,8 @@ declare enum OverScrollMode { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum BlurOnKeyboardHideMode { /** @@ -871,7 +941,8 @@ declare enum BlurOnKeyboardHideMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ SILENT = 0, @@ -880,7 +951,8 @@ declare enum BlurOnKeyboardHideMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ BLUR = 1 } @@ -898,7 +970,8 @@ declare enum BlurOnKeyboardHideMode { * @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 WebDarkMode { /** @@ -912,7 +985,8 @@ declare enum WebDarkMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Off = 0, @@ -927,7 +1001,8 @@ declare enum WebDarkMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ On = 1, @@ -942,7 +1017,8 @@ declare enum WebDarkMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Auto = 2 } @@ -960,7 +1036,8 @@ declare enum WebDarkMode { * @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 WebCaptureMode { /** @@ -972,7 +1049,8 @@ declare enum WebCaptureMode { * Capture of the home screen. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ HOME_SCREEN = 0 } @@ -1045,7 +1123,8 @@ declare enum ThreatType { * @typedef WebMediaOptions * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface WebMediaOptions { /** @@ -1060,12 +1139,13 @@ declare interface WebMediaOptions { * The maximum validity period is 60 seconds. Due to the approximate value, * the validity period may have a deviation of less than 1 second. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - resumeInterval?: number; + resumeInterval?: int; /** * Whether the audio of each web is exclusive. @@ -1081,7 +1161,8 @@ declare interface WebMediaOptions { * {@code true} means audio exclusivity for multiple web instances within the application, {@code false} otherwise. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ audioExclusive?: boolean; @@ -1091,6 +1172,7 @@ declare interface WebMediaOptions { * @type { ?AudioSessionType } * @syscap SystemCapability.Web.Webview.Core * @since 20 + * @arkts 1.1&1.2 */ audioSessionType?: AudioSessionType; } @@ -1116,7 +1198,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 { /** @@ -1132,7 +1215,8 @@ declare interface ScreenCaptureConfig { * @type { WebCaptureMode } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ captureMode: WebCaptureMode; } @@ -1156,7 +1240,8 @@ declare interface ScreenCaptureConfig { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class FullScreenExitHandler { /** @@ -1178,7 +1263,8 @@ declare class FullScreenExitHandler { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -1201,7 +1287,8 @@ declare class FullScreenExitHandler { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ exitFullScreen(): void; } @@ -1221,7 +1308,8 @@ declare class FullScreenExitHandler { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FullScreenEnterEvent { /** @@ -1239,7 +1327,8 @@ declare interface FullScreenEnterEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ handler: FullScreenExitHandler; @@ -1258,7 +1347,8 @@ declare interface FullScreenEnterEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ videoWidth?: number; @@ -1277,7 +1367,8 @@ declare interface FullScreenEnterEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ videoHeight?: number; } @@ -1299,7 +1390,8 @@ declare interface FullScreenEnterEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnFullScreenEnterCallback = (event: FullScreenEnterEvent) => void; @@ -1327,7 +1419,8 @@ type MouseInfoCallback = (event: NativeEmbedMouseInfo) => void; * @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 RenderExitReason { /** @@ -1341,7 +1434,8 @@ declare enum RenderExitReason { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ProcessAbnormalTermination = 0, @@ -1356,7 +1450,8 @@ declare enum RenderExitReason { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ProcessWasKilled = 1, @@ -1371,7 +1466,8 @@ declare enum RenderExitReason { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ProcessCrashed = 2, @@ -1386,7 +1482,8 @@ declare enum RenderExitReason { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ProcessOom = 3, @@ -1401,7 +1498,8 @@ declare enum RenderExitReason { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ProcessExitUnknown = 4 } @@ -1412,7 +1510,8 @@ declare enum RenderExitReason { * @typedef { function } OnContextMenuHideCallback * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ type OnContextMenuHideCallback = () => void; @@ -1429,7 +1528,8 @@ type OnContextMenuHideCallback = () => void; * @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 SslError { /** @@ -1443,7 +1543,8 @@ declare enum SslError { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Invalid = 0, @@ -1458,7 +1559,8 @@ declare enum SslError { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ HostMismatch = 1, @@ -1473,7 +1575,8 @@ declare enum SslError { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ DateInvalid = 2, @@ -1488,7 +1591,8 @@ declare enum SslError { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ Untrusted = 3 } @@ -1507,7 +1611,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 +1627,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 +1644,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 +1661,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 +1678,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 } @@ -1581,7 +1690,8 @@ declare enum FileSelectorMode { * @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 WebLayoutMode { /** @@ -1589,7 +1699,8 @@ declare enum WebLayoutMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -1598,7 +1709,8 @@ declare enum WebLayoutMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FIT_CONTENT = 1 } @@ -1608,14 +1720,16 @@ declare enum WebLayoutMode { * * @enum { number } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum RenderProcessNotRespondingReason { /** * Timeout for input sent to render process. * * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ INPUT_TIMEOUT = 0, @@ -1623,7 +1737,8 @@ declare enum RenderProcessNotRespondingReason { * The new webpage loading navigation response timed out. * * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NAVIGATION_COMMIT_TIMEOUT = 1 } @@ -1640,7 +1755,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 +1771,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 +1788,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 +1805,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 +1822,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 +1841,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 +1850,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 +1868,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 +1884,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 +1901,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 +1918,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 +1937,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 +1955,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 +1971,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 +1990,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 +2008,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 +2024,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(); @@ -1949,7 +2081,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 */ isHttpAuthInfoSaved(): boolean; } @@ -1965,7 +2098,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 +2113,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(); @@ -1994,7 +2129,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 */ handleConfirm(): void; @@ -2009,7 +2145,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 */ handleCancel(): void; @@ -2039,7 +2176,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 +2191,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(); @@ -2104,7 +2243,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 */ cancel(): void; @@ -2138,7 +2278,8 @@ declare class ClientAuthenticationHandler { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum ProtectedResourceType { /** @@ -2152,7 +2293,8 @@ declare enum ProtectedResourceType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ MidiSysex = 'TYPE_MIDI_SYSEX', @@ -2168,7 +2310,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 */ VIDEO_CAPTURE = 'TYPE_VIDEO_CAPTURE', @@ -2184,7 +2327,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 */ AUDIO_CAPTURE = 'TYPE_AUDIO_CAPTURE', @@ -2193,7 +2337,8 @@ declare enum ProtectedResourceType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SENSOR = 'TYPE_SENSOR' } @@ -2210,7 +2355,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 +2371,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 +2388,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 +2407,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 +2426,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 +2445,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 +2460,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 +2473,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(); @@ -2338,7 +2491,8 @@ declare class ScreenCaptureHandler { * @returns { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getOrigin(): string; @@ -2353,7 +2507,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 +2521,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 +2538,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 +2553,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(); @@ -2411,7 +2569,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 */ resend(): void; @@ -2426,7 +2585,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 */ cancel(): void; } @@ -2442,7 +2602,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 */ declare class ControllerHandler { /** @@ -2456,7 +2617,8 @@ declare class ControllerHandler { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -2468,12 +2630,13 @@ declare class ControllerHandler { * @since 9 */ /** - * Set WebController object. * Set to null if you don't need to open a new window. + * * @param { WebviewController } controller * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setWebController(controller: WebviewController): void; } @@ -2491,7 +2654,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 +2669,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 +2685,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 +2701,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 +2720,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 +2735,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,9 +2751,10 @@ declare enum ContextMenuMediaType { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - Image = 1, + Image = 1 /** * Video. @@ -2616,7 +2786,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 +2801,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 +2817,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 +2833,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 +2849,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 +2865,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 +2881,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 } @@ -2719,7 +2896,8 @@ declare enum ContextMenuInputFieldType { * @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 NativeEmbedStatus { /** @@ -2727,7 +2905,8 @@ declare enum NativeEmbedStatus { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CREATE = 0, @@ -2736,7 +2915,8 @@ declare enum NativeEmbedStatus { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UPDATE = 1, @@ -2745,7 +2925,8 @@ declare enum NativeEmbedStatus { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ DESTROY = 2, @@ -2754,7 +2935,8 @@ declare enum NativeEmbedStatus { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ENTER_BFCACHE = 3, @@ -2763,7 +2945,8 @@ declare enum NativeEmbedStatus { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ LEAVE_BFCACHE = 4 } @@ -2781,7 +2964,8 @@ declare enum NativeEmbedStatus { * @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 ContextMenuEditStateFlags { /** @@ -2795,7 +2979,8 @@ declare enum ContextMenuEditStateFlags { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -2810,7 +2995,8 @@ declare enum ContextMenuEditStateFlags { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CAN_CUT = 1 << 0, @@ -2825,7 +3011,8 @@ declare enum ContextMenuEditStateFlags { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CAN_COPY = 1 << 1, @@ -2840,7 +3027,8 @@ declare enum ContextMenuEditStateFlags { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CAN_PASTE = 1 << 2, @@ -2855,7 +3043,8 @@ declare enum ContextMenuEditStateFlags { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ CAN_SELECT_ALL = 1 << 3 } @@ -2929,7 +3118,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 +3129,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 +3141,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 } @@ -2961,7 +3153,8 @@ declare enum RenderMode { * @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 ViewportFit { /** @@ -2969,7 +3162,8 @@ declare enum ViewportFit { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -2979,7 +3173,8 @@ declare enum ViewportFit { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CONTAINS = 1, @@ -2989,7 +3184,8 @@ declare enum ViewportFit { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ COVER = 2 } @@ -3005,7 +3201,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,47 +3216,50 @@ 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(); /** * Horizontal offset coordinates of the menu within the Web component. * - * @returns { number } The context menu x coordinate. + * @returns { int } The context menu x coordinate. * @syscap SystemCapability.Web.Webview.Core * @since 9 */ /** * Horizontal offset coordinates of the menu within the Web component. * - * @returns { number } The context menu x coordinate. + * @returns { int } The context menu x coordinate. * Returns a non-negative integer if normal, otherwise returns -1. * 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; + x(): int; /** * Vertical offset coordinates for the menu within the Web component. * - * @returns { number } The context menu y coordinate. + * @returns { int } The context menu y coordinate. * @syscap SystemCapability.Web.Webview.Core * @since 9 */ /** * Vertical offset coordinates for the menu within the Web component. * - * @returns { number } The context menu y coordinate. + * @returns { int } The context menu y coordinate. * Returns a non-negative integer if normal, otherwise returns -1. * 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; + y(): int; /** * If the long-press location is the link returns the link's security-checked URL. @@ -3074,7 +3274,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 +3292,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 +3310,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 +3328,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 +3346,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 +3364,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 +3382,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 +3400,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,44 +3418,48 @@ 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; /** * Returns the context editable flags {@link ContextMenuEditStateFlags}. * - * @returns { number } + * @returns { int } * @syscap SystemCapability.Web.Webview.Core * @since 9 */ /** * Returns the context editable flags {@link ContextMenuEditStateFlags}. * - * @returns { number } + * @returns { int } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - getEditStateFlags(): number; + getEditStateFlags(): int; /** * Returns the selection menu preview width. * - * @returns { number } The preview menu width. + * @returns { int } 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; + getPreviewWidth(): int; /** * Returns the selection menu preview height. * - * @returns { number } The preview menu height. + * @returns { int } 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; + getPreviewHeight(): int; } /** @@ -3261,7 +3473,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 +3488,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 +3506,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 +3524,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 +3540,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 +3560,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 +3576,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 +3592,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; @@ -3414,7 +3634,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 +3664,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(); @@ -3461,7 +3683,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 */ getMessage(): string; @@ -3487,7 +3710,8 @@ declare class ConsoleMessage { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getSourceId(): string; @@ -3513,7 +3737,8 @@ declare class ConsoleMessage { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getLineNumber(): number; @@ -3531,7 +3756,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 */ getMessageLevel(): MessageLevel; } @@ -3561,7 +3787,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 +3810,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(); @@ -3609,7 +3837,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getRequestHeader(): Array
; @@ -3635,7 +3864,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 */ getRequestUrl(): string; @@ -3661,7 +3891,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ isRequestGesture(): boolean; @@ -3687,7 +3918,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ isMainFrame(): boolean; @@ -3713,7 +3945,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ isRedirect(): boolean; @@ -3739,7 +3972,8 @@ declare class WebResourceRequest { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getRequestMethod(): string; } @@ -3756,7 +3990,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 +4006,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(); @@ -3797,7 +4033,8 @@ declare class WebResourceResponse { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getResponseData(): string; @@ -3840,7 +4077,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 */ getResponseEncoding(): string; @@ -3858,7 +4096,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 */ getResponseMimeType(): string; @@ -3884,7 +4123,8 @@ declare class WebResourceResponse { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ getReasonMessage(): string; @@ -3928,7 +4168,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 */ getResponseCode(): number; @@ -3959,7 +4200,8 @@ declare class WebResourceResponse { * ArrayBuffer type indicate binary data. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setResponseData(data: string | number | Resource | ArrayBuffer): void; @@ -3984,7 +4226,8 @@ declare class WebResourceResponse { * @param { string } encoding the response encoding. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setResponseEncoding(encoding: string): void; @@ -4009,7 +4252,8 @@ declare class WebResourceResponse { * @param { string } mimeType the response MIME type. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setResponseMimeType(mimeType: string): void; @@ -4034,7 +4278,8 @@ declare class WebResourceResponse { * @param { string } reason the reason message. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setReasonMessage(reason: string): void; @@ -4084,7 +4329,8 @@ declare class WebResourceResponse { * @param { number } code the response code. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setResponseCode(code: number): void; @@ -4161,7 +4407,8 @@ declare class WebResourceResponse { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface Header { /** @@ -4186,7 +4433,8 @@ declare interface Header { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ headerKey: string; @@ -4212,7 +4460,8 @@ declare interface Header { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ headerValue: string; } @@ -4236,7 +4485,8 @@ declare interface Header { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class WebResourceError { /** @@ -4258,7 +4508,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 */ constructor(); @@ -4284,7 +4535,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 */ getErrorInfo(): string; @@ -4310,7 +4562,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 */ getErrorCode(): number; } @@ -4327,7 +4580,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 +4596,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 +4624,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; } @@ -4433,7 +4689,8 @@ declare class WebCookie { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare class EventResult { /** @@ -4441,12 +4698,13 @@ declare class EventResult { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); /** - * Set whether the event is consumed. + * Sets the event consumption result. * * @param { boolean } result - Whether to consume the gesture event. * {@code true} Indicates the consumption of the gesture event. @@ -4454,7 +4712,8 @@ declare class EventResult { * Default value: true. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ setGestureEventResult(result: boolean): void; @@ -4471,16 +4730,23 @@ declare class EventResult { * {@code false} Indicates the propagation of events farther along. * Default value: true. * @syscap SystemCapability.Web.Webview.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ setGestureEventResult(result: boolean, stopPropagation: boolean): void; /** * 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 +5014,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 +5044,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; @@ -4807,6 +5075,7 @@ declare interface WebOptions { * Controller, through which you can control various behaviors of Web components * (including page navigation, declaring cycle state, JavaScript interaction and other behaviors). * Since API Version 9, WebController is no longer maintained, so it is recommended to use WebviewController instead. + * * @type { WebController | WebviewController } * @syscap SystemCapability.Web.Webview.Core * @crossplatform @@ -4816,14 +5085,26 @@ declare interface WebOptions { controller: WebController | WebviewController; /** - * Rendering mode. - * RenderMode.ASYNC_RENDER (default, cannot be dynamically adjusted): The Web component is rendered asynchronously. - * RenderMode.SYNC_RENDER: The Web component is rendered synchronously within the current execution context. + * 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. + * RenderMode.SYNC_RENDER: The Web component is rendered synchronously within the current execution context. * * @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 +5127,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 +5141,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,36 +5320,38 @@ 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 { /** - * Sets Value. - * - * @param { WebOptions } value - * @returns { WebAttribute } - * @syscap SystemCapability.Web.Webview.Core - * @since 8 - */ - /** - * Sets Value. - * - * @param { WebOptions } value - * @returns { WebAttribute } - * @syscap SystemCapability.Web.Webview.Core - * @crossplatform - * @since 10 - */ - /** - * Sets Value. - * - * @param { WebOptions } value - * @returns { WebAttribute } - * @syscap SystemCapability.Web.Webview.Core - * @crossplatform - * @atomicservice - * @since 11 - */ + * Sets Value. + * + * @param { WebOptions } value + * @returns { WebAttribute } + * @syscap SystemCapability.Web.Webview.Core + * @since 8 + */ + /** + * Sets Value. + * + * @param { WebOptions } value + * @returns { WebAttribute } + * @syscap SystemCapability.Web.Webview.Core + * @crossplatform + * @since 10 + */ + /** + * Sets Value. + * + * @param { WebOptions } value + * @returns { WebAttribute } + * @syscap SystemCapability.Web.Webview.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ (value: WebOptions): WebAttribute; } @@ -5084,7 +5369,8 @@ interface WebInterface { * @typedef NativeEmbedInfo * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NativeEmbedInfo { /** @@ -5093,7 +5379,8 @@ declare interface NativeEmbedInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ id?: string; @@ -5103,7 +5390,8 @@ declare interface NativeEmbedInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ type?: string; @@ -5113,7 +5401,8 @@ declare interface NativeEmbedInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ src?: string; @@ -5123,29 +5412,32 @@ declare interface NativeEmbedInfo { * @type { ?Position } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ position?: Position; /** * The embed tag width. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - width?: number; + width?: int; /** * The embed tag height. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - height?: number; + height?: int; /** * The embed tag url. @@ -5153,7 +5445,8 @@ declare interface NativeEmbedInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ url?: string; @@ -5163,7 +5456,8 @@ declare interface NativeEmbedInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ tag?: string; @@ -5173,7 +5467,8 @@ declare interface NativeEmbedInfo { * @type { ?Map } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ params?: Map; } @@ -5192,7 +5487,8 @@ declare interface NativeEmbedInfo { * @typedef NativeEmbedDataInfo * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NativeEmbedDataInfo { /** @@ -5201,7 +5497,8 @@ declare interface NativeEmbedDataInfo { * @type { ?NativeEmbedStatus } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ status?: NativeEmbedStatus; @@ -5211,7 +5508,8 @@ declare interface NativeEmbedDataInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ surfaceId?: string; @@ -5221,7 +5519,8 @@ declare interface NativeEmbedDataInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ embedId?: string; @@ -5231,7 +5530,8 @@ declare interface NativeEmbedDataInfo { * @type { ?NativeEmbedInfo } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ info?: NativeEmbedInfo; } @@ -5241,7 +5541,8 @@ declare interface NativeEmbedDataInfo { * * @typedef NativeEmbedVisibilityInfo * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NativeEmbedVisibilityInfo { /** @@ -5249,7 +5550,8 @@ declare interface NativeEmbedVisibilityInfo { * * @type { boolean } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ visibility: boolean; @@ -5258,7 +5560,8 @@ declare interface NativeEmbedVisibilityInfo { * * @type { string } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ embedId: string; } @@ -5277,7 +5580,8 @@ declare interface NativeEmbedVisibilityInfo { * @typedef NativeEmbedTouchInfo * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NativeEmbedTouchInfo { /** @@ -5286,7 +5590,8 @@ declare interface NativeEmbedTouchInfo { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ embedId?: string; @@ -5296,7 +5601,8 @@ declare interface NativeEmbedTouchInfo { * @type { ?TouchEvent } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ touchEvent?: TouchEvent; @@ -5306,7 +5612,8 @@ declare interface NativeEmbedTouchInfo { * @type { ?EventResult } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ result?: EventResult; } @@ -5343,9 +5650,9 @@ declare interface NativeEmbedMouseInfo { * @type { ?EventResult } * @syscap SystemCapability.Web.Webview.Core * @since 20 - */ - result?: EventResult; -} + */ + result?: EventResult; + } /** * Defines the first content paint rendering of web page. @@ -5353,28 +5660,31 @@ declare interface NativeEmbedMouseInfo { * @typedef FirstMeaningfulPaint * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface FirstMeaningfulPaint { /** * Start time of navigation. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - navigationStartTime?: number; + navigationStartTime?: long; /** * Paint time of first meaningful content. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - firstMeaningfulPaintTime?: number; + firstMeaningfulPaintTime?: long; } /** @@ -5383,68 +5693,75 @@ declare interface FirstMeaningfulPaint { * @typedef LargestContentfulPaint * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface LargestContentfulPaint { /** * Start time of navigation. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - navigationStartTime?: number; + navigationStartTime?: long; /** * Paint time of largest image. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - largestImagePaintTime?: number; + largestImagePaintTime?: long; /** * Paint time of largest text. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - largestTextPaintTime?: number; + largestTextPaintTime?: long; /** * Bits per pixel of image. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - imageBPP?: number; + imageBPP?: double; /** * Load start time of largest image. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - largestImageLoadStartTime?: number; + largestImageLoadStartTime?: long; /** * Load end time of largest image. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - largestImageLoadEndTime?: number; + largestImageLoadEndTime?: long; } /** @@ -5452,7 +5769,8 @@ declare interface LargestContentfulPaint { * * @interface RenderProcessNotRespondingData * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface RenderProcessNotRespondingData { /** @@ -5460,25 +5778,28 @@ declare interface RenderProcessNotRespondingData { * * @type { string } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ jsStack: string; /** * Process id of render process not responding. * - * @type { number } + * @type { int } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - pid: number; + pid: int; /** * Reason for the render process not responding. * * @type { RenderProcessNotRespondingReason } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ reason: RenderProcessNotRespondingReason; } @@ -5490,7 +5811,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 +5822,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 +5835,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 +5846,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; } @@ -5559,9 +5884,9 @@ declare interface OnLoadFinishedEvent { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @since 20 - */ - url: string; -} + */ + url: string; + } /** * Defines the triggered function when the page loading progress changes. @@ -5570,19 +5895,21 @@ 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 { /** * The new progress of the page. * - * @type { number } + * @type { int } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - newProgress: number; + newProgress: int; } /** @@ -5592,7 +5919,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 */ declare interface OnTitleReceiveEvent { /** @@ -5602,14 +5930,15 @@ 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 */ title: string; /** * 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 +5953,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 +5964,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 +5976,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; } @@ -5657,7 +5989,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 */ declare interface OnAlertEvent { /** @@ -5667,7 +6000,8 @@ declare interface OnAlertEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -5678,7 +6012,8 @@ declare interface OnAlertEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ message: string; @@ -5689,7 +6024,8 @@ declare interface OnAlertEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ result: JsResult; } @@ -5709,7 +6045,8 @@ declare interface OnAlertEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnBeforeUnloadEvent { /** @@ -5727,7 +6064,8 @@ declare interface OnBeforeUnloadEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -5746,7 +6084,8 @@ declare interface OnBeforeUnloadEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ message: string; @@ -5765,7 +6104,8 @@ declare interface OnBeforeUnloadEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ result: JsResult; @@ -5787,7 +6127,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 +6138,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 +6150,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 +6162,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 +6175,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 +6186,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 +6198,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 +6210,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 +6222,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; } @@ -5886,7 +6235,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 */ declare interface OnConsoleEvent { /** @@ -5896,7 +6246,8 @@ declare interface OnConsoleEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ message: ConsoleMessage; } @@ -5908,7 +6259,8 @@ declare interface OnConsoleEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnErrorReceiveEvent { /** @@ -5918,7 +6270,8 @@ declare interface OnErrorReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ request: WebResourceRequest; @@ -5929,7 +6282,8 @@ declare interface OnErrorReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ error: WebResourceError; } @@ -5941,7 +6295,8 @@ declare interface OnErrorReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnHttpErrorReceiveEvent { /** @@ -5951,7 +6306,8 @@ declare interface OnHttpErrorReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ request: WebResourceRequest; @@ -5962,7 +6318,8 @@ declare interface OnHttpErrorReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ response: WebResourceResponse; } @@ -5974,7 +6331,8 @@ declare interface OnHttpErrorReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnDownloadStartEvent { /** @@ -5984,7 +6342,8 @@ declare interface OnDownloadStartEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -5995,7 +6354,8 @@ declare interface OnDownloadStartEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ userAgent: string; @@ -6014,7 +6374,8 @@ declare interface OnDownloadStartEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ contentDisposition: string; @@ -6025,7 +6386,8 @@ declare interface OnDownloadStartEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ mimetype: string; @@ -6036,7 +6398,8 @@ declare interface OnDownloadStartEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ contentLength: number; } @@ -6104,7 +6467,8 @@ declare interface OnRefreshAccessedHistoryEvent { * @typedef OnRenderExitedEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnRenderExitedEvent { /** @@ -6113,7 +6477,8 @@ declare interface OnRenderExitedEvent { * @type { RenderExitReason } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ renderExitReason: RenderExitReason; } @@ -6125,7 +6490,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 +6501,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 +6513,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; } @@ -6178,30 +6546,33 @@ declare interface OnResourceLoadEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnScaleChangeEvent { /** * Old scale of the page. * - * @type { number } + * @type { double } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - oldScale: number; + oldScale: double; /** * New scale of the page. * - * @type { number } + * @type { double } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - newScale: number; + newScale: double; } /** @@ -6211,7 +6582,8 @@ declare interface OnScaleChangeEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnHttpAuthRequestEvent { /** @@ -6221,7 +6593,8 @@ declare interface OnHttpAuthRequestEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ handler: HttpAuthHandler; @@ -6232,7 +6605,8 @@ declare interface OnHttpAuthRequestEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ host: string; @@ -6243,7 +6617,8 @@ declare interface OnHttpAuthRequestEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ realm: string; } @@ -6254,7 +6629,8 @@ declare interface OnHttpAuthRequestEvent { * @typedef OnInterceptRequestEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnInterceptRequestEvent { /** @@ -6263,7 +6639,8 @@ declare interface OnInterceptRequestEvent { * @type { WebResourceRequest } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ request: WebResourceRequest; } @@ -6276,7 +6653,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 +6664,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 +6677,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 +6687,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 +6699,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 +6709,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 +6720,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; } @@ -6389,30 +6773,33 @@ declare interface OnSearchResultReceiveEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnScrollEvent { /** * The X offset of the scroll. * - * @type { number } + * @type { double } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - xOffset: number; + xOffset: double; /** * The Y offset of the scroll. * - * @type { number } + * @type { double } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - yOffset: number; + yOffset: double; } /** @@ -6421,7 +6808,8 @@ declare interface OnScrollEvent { * @typedef OnSslErrorEventReceiveEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnSslErrorEventReceiveEvent { /** @@ -6430,7 +6818,8 @@ declare interface OnSslErrorEventReceiveEvent { * @type { SslErrorHandler } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ handler: SslErrorHandler; @@ -6440,7 +6829,8 @@ declare interface OnSslErrorEventReceiveEvent { * @type { SslError } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ error: SslError; @@ -6449,7 +6839,8 @@ declare interface OnSslErrorEventReceiveEvent { * * @type { ?Array } * @syscap SystemCapability.Web.Webview.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ certChainData?: Array; } @@ -6460,7 +6851,8 @@ declare interface OnSslErrorEventReceiveEvent { * @typedef OnClientAuthenticationEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnClientAuthenticationEvent { /** @@ -6469,7 +6861,8 @@ declare interface OnClientAuthenticationEvent { * @type { ClientAuthenticationHandler } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ handler : ClientAuthenticationHandler; @@ -6479,7 +6872,8 @@ declare interface OnClientAuthenticationEvent { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ host : string; @@ -6489,7 +6883,8 @@ declare interface OnClientAuthenticationEvent { * @type { number } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ port : number; @@ -6499,7 +6894,8 @@ declare interface OnClientAuthenticationEvent { * @type { Array } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ keyTypes : Array; @@ -6509,7 +6905,8 @@ declare interface OnClientAuthenticationEvent { * @type { Array } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ issuers : Array; } @@ -6520,7 +6917,8 @@ declare interface OnClientAuthenticationEvent { * @typedef OnWindowNewEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnWindowNewEvent { /** @@ -6529,7 +6927,8 @@ declare interface OnWindowNewEvent { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isAlert: boolean; @@ -6539,7 +6938,8 @@ declare interface OnWindowNewEvent { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isUserTrigger: boolean; @@ -6549,7 +6949,8 @@ declare interface OnWindowNewEvent { * @type { string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ targetUrl: string; @@ -6559,7 +6960,8 @@ declare interface OnWindowNewEvent { * @type { ControllerHandler } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ handler: ControllerHandler; } @@ -6612,6 +7014,16 @@ declare interface OnFaviconReceivedEvent { * @since 12 */ favicon: PixelMap; + + /** + * Received the Favicon icon for the image.PixelMap object. + * + * @type { image.PixelMap } + * @syscap SystemCapability.Web.Webview.Core + * @since 20 + * @arkts 1.2 + */ + favicon: image.PixelMap; } /** @@ -6621,7 +7033,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 +7044,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; } @@ -6642,7 +7056,8 @@ declare interface OnPageVisibleEvent { * @typedef OnDataResubmittedEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnDataResubmittedEvent { /** @@ -6651,7 +7066,8 @@ declare interface OnDataResubmittedEvent { * @type { DataResubmissionHandler } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ handler: DataResubmissionHandler; } @@ -6662,7 +7078,8 @@ declare interface OnDataResubmittedEvent { * @typedef OnAudioStateChangedEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnAudioStateChangedEvent { /** @@ -6671,7 +7088,8 @@ declare interface OnAudioStateChangedEvent { * @type { boolean } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ playing: boolean; } @@ -6682,28 +7100,31 @@ declare interface OnAudioStateChangedEvent { * @typedef OnFirstContentfulPaintEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnFirstContentfulPaintEvent { /** * The time at which navigation begins, expressed in microseconds. * - * @type { number } + * @type { long } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - navigationStartTick: number; + navigationStartTick: long; /** * The time it takes to draw content for the first time from navigation, expressed in milliseconds. * - * @type { number } + * @type { long } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - firstContentfulPaintMs: number; + firstContentfulPaintMs: long; } /** @@ -6713,7 +7134,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 { /** @@ -6723,7 +7145,8 @@ declare interface OnLoadInterceptEvent { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ data: WebResourceRequest; } @@ -6734,30 +7157,33 @@ declare interface OnLoadInterceptEvent { * @typedef OnOverScrollEvent * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface OnOverScrollEvent { /** * Based on the leftmost part of the page, the horizontal scroll offset is over. * Unit: vp. * - * @type { number } + * @type { double } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - xOffset: number; + xOffset: double; /** * Based on the top of the page, the vertical scroll offset is over. * Unit: vp. * - * @type { number } + * @type { double } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - yOffset: number; + yOffset: double; } /** @@ -6776,6 +7202,7 @@ declare interface OnOverScrollEvent { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare interface JavaScriptProxy { /** @@ -6794,6 +7221,7 @@ declare interface JavaScriptProxy { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ object: object; @@ -6815,6 +7243,7 @@ declare interface JavaScriptProxy { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ name: string; @@ -6836,6 +7265,7 @@ declare interface JavaScriptProxy { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ methodList: Array; @@ -6858,6 +7288,17 @@ declare interface JavaScriptProxy { */ controller: WebController | WebviewController; + /** + * Controller. + * + * @type { WebviewController } + * @syscap SystemCapability.Web.Webview.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + controller: WebviewController; + /** * The async method of the application side JavaScript object participating in the registration. * @@ -6874,6 +7315,7 @@ declare interface JavaScriptProxy { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ asyncMethodList?: Array; @@ -6884,7 +7326,8 @@ declare interface JavaScriptProxy { * @type { ?string } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ permission?: string; } @@ -6895,7 +7338,8 @@ declare interface JavaScriptProxy { * @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 WebKeyboardAvoidMode { /** @@ -6903,7 +7347,8 @@ declare enum WebKeyboardAvoidMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_VISUAL = 0, @@ -6913,7 +7358,8 @@ declare enum WebKeyboardAvoidMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ RESIZE_CONTENT = 1, @@ -6922,7 +7368,8 @@ declare enum WebKeyboardAvoidMode { * * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ OVERLAYS_CONTENT = 2 } @@ -6932,14 +7379,16 @@ declare enum WebKeyboardAvoidMode { * * @enum { number } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WebElementType { /** * Image,corresponding HTML image type. * * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 1, @@ -6948,7 +7397,7 @@ declare enum WebElementType { * * @syscap SystemCapability.Web.Webview.Core * @since 20 - */ + */ LINK = 2 } @@ -6957,14 +7406,16 @@ declare enum WebElementType { * * @enum { number } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ declare enum WebResponseType { /** * Long press. * * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ LONG_PRESS = 1 } @@ -7000,6 +7451,7 @@ declare enum WebBypassVsyncCondition { * @enum { number } * @syscap SystemCapability.Web.Webview.Core * @since 20 + * @arkts 1.1&1.2 */ declare enum AudioSessionType { /** @@ -7008,6 +7460,7 @@ declare enum AudioSessionType { * * @syscap SystemCapability.Web.Webview.Core * @since 20 + * @arkts 1.1&1.2 */ AMBIENT=3 } @@ -7035,7 +7488,8 @@ declare interface PreviewMenuOptions { * * @typedef SelectionMenuOptionsExt * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface SelectionMenuOptionsExt { /** @@ -7043,7 +7497,8 @@ declare interface SelectionMenuOptionsExt { * * @type { ?Callback } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ onAppear?: Callback; @@ -7052,7 +7507,8 @@ declare interface SelectionMenuOptionsExt { * * @type { ?Callback } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ onDisappear?: Callback; @@ -7061,7 +7517,8 @@ declare interface SelectionMenuOptionsExt { * * @type { ?CustomBuilder } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ preview?: CustomBuilder; @@ -7070,7 +7527,8 @@ declare interface SelectionMenuOptionsExt { * * @type { ?MenuType } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ menuType?: MenuType; @@ -7106,7 +7564,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 +7596,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; @@ -7174,7 +7634,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 */ fileAccess(fileAccess: boolean): WebAttribute; @@ -7209,7 +7670,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onlineImageAccess(onlineImageAccess: boolean): WebAttribute; @@ -7241,7 +7703,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ domStorageAccess(domStorageAccess: boolean): WebAttribute; @@ -7274,7 +7737,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ imageAccess(imageAccess: boolean): WebAttribute; @@ -7305,7 +7769,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ mixedMode(mixedMode: MixedMode): WebAttribute; @@ -7337,7 +7802,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 */ zoomAccess(zoomAccess: boolean): WebAttribute; @@ -7361,7 +7827,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; @@ -7427,6 +7894,7 @@ declare class WebAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ javaScriptProxy(javaScriptProxy: JavaScriptProxy): WebAttribute; @@ -7489,7 +7957,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 */ darkMode(mode: WebDarkMode): WebAttribute; @@ -7512,7 +7981,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 */ forceDarkAccess(access: boolean): WebAttribute; @@ -7541,7 +8011,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 */ mediaOptions(options: WebMediaOptions): WebAttribute; @@ -7587,7 +8058,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 */ overviewModeAccess(overviewModeAccess: boolean): WebAttribute; @@ -7601,7 +8073,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 */ overScrollMode(mode: OverScrollMode): WebAttribute; @@ -7612,7 +8085,8 @@ declare class WebAttribute extends CommonMethod { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ blurOnKeyboardHideMode(mode: BlurOnKeyboardHideMode): WebAttribute; @@ -7631,7 +8105,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 { int } textZoomRatio The ratio of the text zoom. The default value is 100, ranging from 1 to +∞. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 9 @@ -7639,13 +8113,14 @@ 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 { int } textZoomRatio The ratio of the text zoom. The default value is 100, ranging from 1 to +∞. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - textZoomRatio(textZoomRatio: number): WebAttribute; + textZoomRatio(textZoomRatio: int): WebAttribute; /** * Sets whether the Web access the database. @@ -7666,7 +8141,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; @@ -7681,15 +8157,16 @@ declare class WebAttribute extends CommonMethod { /** * Sets the initial scale for the Web. * - * @param { number } percent the initial scale for the Web. + * @param { double } percent the initial scale for the Web. * Value range: (0, 1000]. * Default value: 100. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - initialScale(percent: number): WebAttribute; + initialScale(percent: double): WebAttribute; /** * Sets the Web's user agent. @@ -7730,35 +8207,33 @@ 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 */ metaViewport(enabled: boolean): WebAttribute; /** * Triggered at the end of web page loading. - * This callback is only invoked for the main frame and not for subframes. * * @param { function } callback The triggered function at the end of web page loading. - * @returns { WebAttribute } The WebAttribute object representing the attributes of the web page. + * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 8 */ /** * Triggered at the end of web page loading. - * This callback is only invoked for the main frame and not for subframes. * * @param { function } callback The triggered function at the end of web page loading. - * @returns { WebAttribute } The WebAttribute object representing the attributes of the web page. + * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @since 10 */ /** * Triggered at the end of web page loading. - * This callback is only invoked for the main frame and not for subframes. * * @param { function } callback The triggered function at the end of web page loading. - * @returns { WebAttribute } The WebAttribute object representing the attributes of the web page. + * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice @@ -7773,7 +8248,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 +8289,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 +8351,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; @@ -7906,7 +8384,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 */ onTitleReceive(callback: Callback): WebAttribute; @@ -7927,7 +8406,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 +8437,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; @@ -7976,7 +8457,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 */ onRequestSelected(callback: () => void): WebAttribute; @@ -8010,7 +8492,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 */ onAlert(callback: Callback): WebAttribute; @@ -8048,7 +8531,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onBeforeUnload(callback: Callback): WebAttribute; @@ -8081,7 +8565,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 +8599,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; @@ -8146,7 +8632,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 */ onConsole(callback: Callback): WebAttribute; @@ -8185,7 +8672,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 */ onErrorReceive(callback: Callback): WebAttribute; @@ -8215,7 +8703,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 */ onHttpErrorReceive(callback: Callback): WebAttribute; @@ -8245,7 +8734,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 */ onDownloadStart(callback: Callback): WebAttribute; @@ -8338,7 +8828,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 */ onRenderExited(callback: Callback): WebAttribute; @@ -8373,7 +8864,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; @@ -8454,7 +8946,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onFullScreenExit(callback: () => void): WebAttribute; @@ -8492,7 +8985,8 @@ declare class WebAttribute extends CommonMethod { * @syscap SystemCapability.Web.Webview.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onFullScreenEnter(callback: OnFullScreenEnterCallback): WebAttribute; @@ -8522,7 +9016,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 */ onScaleChange(callback: Callback): WebAttribute; @@ -8552,7 +9047,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 */ onHttpAuthRequest(callback: Callback): WebAttribute; @@ -8580,7 +9076,8 @@ declare class WebAttribute extends CommonMethod { * @returns { WebAttribute } If the response value is null, the Web will continue to load the resources. Otherwise, the response value will be used * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onInterceptRequest(callback: Callback): WebAttribute; @@ -8612,7 +9109,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 +9138,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 +9169,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; @@ -8681,7 +9181,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 */ onContextMenuHide(callback: OnContextMenuHideCallback): WebAttribute; @@ -8704,7 +9205,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; @@ -8765,13 +9267,13 @@ 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 */ onScroll(callback: Callback): WebAttribute; /** - * Called to notify users when an SSL error occurs with a request for the main frame. - * To include errors with requests for subframes, use the OnSslErrorEvent API. + * Triggered when the Web page receives an ssl Error. * * @param { function } callback The triggered callback when the Web page receives an ssl Error. * @returns { WebAttribute } @@ -8779,8 +9281,7 @@ declare class WebAttribute extends CommonMethod { * @since 9 */ /** - * Called to notify users when an SSL error occurs with a request for the main frame. - * To include errors with requests for subframes, use the OnSslErrorEvent API. + * Triggered when the Web page receives an ssl Error. * * @param { function } callback The triggered callback when the Web page receives an ssl Error. * @returns { WebAttribute } @@ -8796,7 +9297,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 */ onSslErrorEventReceive(callback: Callback): WebAttribute; @@ -8836,7 +9338,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 */ onClientAuthenticationRequest(callback: Callback): WebAttribute; @@ -8873,7 +9376,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 */ onWindowNew(callback: Callback): WebAttribute; @@ -8893,7 +9397,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 */ onWindowExit(callback: () => void): WebAttribute; @@ -8914,7 +9419,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 */ multiWindowAccess(multiWindow: boolean): WebAttribute; @@ -8933,7 +9439,8 @@ declare class WebAttribute extends CommonMethod { * @returns { WebAttribute } True if the application consumes key events else false. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onInterceptKeyEvent(callback: (event: KeyEvent) => boolean): WebAttribute; @@ -8953,7 +9460,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 */ webStandardFont(family: string): WebAttribute; @@ -8973,7 +9481,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 */ webSerifFont(family: string): WebAttribute; @@ -8993,7 +9502,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 */ webSansSerifFont(family: string): WebAttribute; @@ -9013,7 +9523,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 */ webFixedFont(family: string): WebAttribute; @@ -9033,7 +9544,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 */ webFantasyFont(family: string): WebAttribute; @@ -9053,14 +9565,15 @@ 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 */ webCursiveFont(family: string): WebAttribute; /** * Set the default fixed font value of webview. The default value is 13, ranging from 1 to 72. * - * @param { number } size Font size. + * @param { int } size Font size. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 9 @@ -9068,21 +9581,22 @@ declare class WebAttribute extends CommonMethod { /** * Sets the default font size for the web page. * - * @param { number } size Default fixed font size to set, in px. + * @param { int } size Default fixed font size to set, in px. * The value ranges from -2^31 to 2^31-1. In actual rendering, * values greater than 72 are handled as 72, and values less than 1 are handled as 1. * Default value: 13. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - defaultFixedFontSize(size: number): WebAttribute; + defaultFixedFontSize(size: int): WebAttribute; /** * Set the default font value of webview. The default value is 16, ranging from 1 to 72. * - * @param { number } size Font size. + * @param { int } size Font size. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 9 @@ -9090,20 +9604,21 @@ declare class WebAttribute extends CommonMethod { /** * Sets the default font size for the web page. * - * @param { number } size Default font size to set, in px. + * @param { int } size Default font size to set, in px. * The value ranges from -2^31 to 2^31-1. In actual rendering, values greater than 72 are handled as 72, * and values less than 1 are handled as 1. Default value: 16. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - defaultFontSize(size: number): WebAttribute; + defaultFontSize(size: int): WebAttribute; /** * Set the minimum value of webview font. The default value is 8, ranging from 1 to 72. * - * @param { number } size Font size. + * @param { int } size Font size. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 9 @@ -9111,7 +9626,7 @@ declare class WebAttribute extends CommonMethod { /** * Sets the minimum font size for the web page. * - * @param { number } size Minimum font size to set, in px. + * @param { int } size Minimum font size to set, in px. * The value ranges from -2^31 to 2^31-1. In actual rendering, * values greater than 72 are handled as 72, and values less than 1 are handled as 1. * Default value: 8 @@ -9119,14 +9634,15 @@ 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 */ - minFontSize(size: number): WebAttribute; + minFontSize(size: int): WebAttribute; /** * Set the logical minimum value of webview font. The default value is 8, ranging from 1 to 72. * - * @param { number } size Font size. + * @param { int } size Font size. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 9 @@ -9134,16 +9650,17 @@ declare class WebAttribute extends CommonMethod { /** * Sets the minimum logical font size for the web page. * - * @param { number } size Minimum logical font size to set, in px. + * @param { int } size Minimum logical font size to set, in px. * The value ranges from -2^31 to 2^31-1. In actual rendering, * values greater than 72 are handled as 72, and values less than 1 are handled as 1. * Default value: 8 * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - minLogicalFontSize(size: number): WebAttribute; + minLogicalFontSize(size: int): WebAttribute; /** * Set the default text encodingFormat value of webview. The default value is UTF-8. @@ -9152,7 +9669,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 */ defaultTextEncodingFormat(textEncodingFormat: string): WebAttribute; @@ -9163,7 +9681,8 @@ declare class WebAttribute extends CommonMethod { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ forceDisplayScrollBar(enabled: boolean): WebAttribute; @@ -9219,7 +9738,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 */ horizontalScrollBarAccess(horizontalScrollBar: boolean): WebAttribute; @@ -9246,7 +9766,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 */ verticalScrollBarAccess(verticalScrollBar: boolean): WebAttribute; @@ -9341,7 +9862,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; @@ -9369,7 +9891,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 */ onDataResubmitted(callback: Callback): WebAttribute; @@ -9391,7 +9914,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 */ pinchSmooth(isEnabled: boolean): WebAttribute; @@ -9431,7 +9955,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 */ allowWindowOpenMethod(flag: boolean): WebAttribute; @@ -9459,7 +9984,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 */ onAudioStateChanged(callback: Callback): WebAttribute; @@ -9487,7 +10013,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 */ onFirstContentfulPaint(callback: Callback): WebAttribute; @@ -9498,7 +10025,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 */ onFirstMeaningfulPaint(callback: OnFirstMeaningfulPaintCallback): WebAttribute; @@ -9509,7 +10037,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 */ onLargestContentfulPaint(callback: OnLargestContentfulPaintCallback): WebAttribute; @@ -9539,7 +10068,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; @@ -9563,7 +10093,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 */ onControllerAttached(callback: () => void): WebAttribute; @@ -9588,7 +10119,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 */ onOverScroll(callback: Callback): WebAttribute; @@ -9681,7 +10213,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. *

@@ -9691,7 +10223,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 */ layoutMode(mode: WebLayoutMode): WebAttribute; @@ -9725,7 +10258,8 @@ declare class WebAttribute extends CommonMethod { * @returns { WebAttribute } the attribute of the scroll. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ nestedScroll(value: NestedScrollOptions | NestedScrollOptionsExt): WebAttribute; @@ -9742,7 +10276,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 */ enableNativeEmbedMode(mode: boolean): WebAttribute; @@ -9761,7 +10296,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 */ registerNativeEmbedRule(tag: string, type:string): WebAttribute; @@ -9778,7 +10314,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 */ onNativeEmbedLifecycleChange(callback: (event: NativeEmbedDataInfo) => void): WebAttribute; @@ -9793,7 +10330,8 @@ declare class WebAttribute extends CommonMethod { * @param { OnNativeEmbedVisibilityChangeCallback } callback - Callback triggered when embed visibility changes. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onNativeEmbedVisibilityChange(callback: OnNativeEmbedVisibilityChangeCallback): WebAttribute; @@ -9810,7 +10348,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 */ onNativeEmbedGestureEvent(callback: (event: NativeEmbedTouchInfo) => void): WebAttribute; @@ -9831,7 +10370,8 @@ declare class WebAttribute extends CommonMethod { * @returns { WebAttribute } the attribute of the scroll. * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ copyOptions(value: CopyOptions): WebAttribute; @@ -9843,7 +10383,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 */ onOverrideUrlLoading(callback: OnOverrideUrlLoadingCallback): WebAttribute; @@ -9857,7 +10398,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 */ textAutosizing(textAutosizing: boolean): WebAttribute; @@ -9871,7 +10413,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 */ enableNativeMediaPlayer(config: NativeMediaPlayerConfig): WebAttribute; @@ -9886,7 +10429,8 @@ declare class WebAttribute extends CommonMethod { * @param { OnRenderProcessNotRespondingCallback } callback The triggered function when render process not responding. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onRenderProcessNotResponding(callback: OnRenderProcessNotRespondingCallback): WebAttribute; @@ -9897,7 +10441,8 @@ declare class WebAttribute extends CommonMethod { * @param { OnRenderProcessRespondingCallback } callback The triggered function when the unresponsive render process becomes responsive. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ onRenderProcessResponding(callback: OnRenderProcessRespondingCallback): WebAttribute; @@ -9929,7 +10474,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 */ onViewportFitChanged(callback: OnViewportFitChangedCallback): WebAttribute; @@ -9944,7 +10490,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; @@ -9964,13 +10511,15 @@ declare class WebAttribute extends CommonMethod { /** * When the keyboard avoidance mode set by UIContext is {@link KeyboardAvoidMode.RESIZE} mode, * the interface function will not take effect. + * * @param { WebKeyboardAvoidMode } mode - The web keyboard avoid mode, which can be {@link WebKeyboardAvoidMode}. * Web soft keyboard avoidance is not recommended in nested scrolling scenes, * including RESIZE_VISUAL and RESIZE_CONTENT. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ keyboardAvoidMode(mode: WebKeyboardAvoidMode): WebAttribute; @@ -9996,7 +10545,8 @@ declare class WebAttribute extends CommonMethod { * and the input value is -1. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ editMenuOptions(editMenu: EditMenuOptions): WebAttribute; @@ -10006,7 +10556,8 @@ declare class WebAttribute extends CommonMethod { * @param { boolean } enabled - Default value is true, set false to disable haptic feedback. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ enableHapticFeedback(enabled: boolean): WebAttribute; @@ -10019,7 +10570,8 @@ declare class WebAttribute extends CommonMethod { * @param { SelectionMenuOptionsExt } [options] - Indicates the options of selection menu. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ bindSelectionMenu(elementType: WebElementType, content: CustomBuilder, responseType: WebResponseType, options?: SelectionMenuOptionsExt): WebAttribute; @@ -10030,7 +10582,8 @@ declare class WebAttribute extends CommonMethod { * @param { boolean} optimizeParserBudget Default value is false, set true to enable optimize parser budget. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ optimizeParserBudget(optimizeParserBudget: boolean): WebAttribute; @@ -10040,7 +10593,8 @@ declare class WebAttribute extends CommonMethod { * @param { boolean } follow The value true means to follow the system font weight, and false means the opposite. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ enableFollowSystemFontWeight(follow: boolean): WebAttribute; @@ -10050,7 +10604,8 @@ declare class WebAttribute extends CommonMethod { * @param { boolean } enabled Whether to enable AVSession. The value true means to enable AVSession, and false means the opposite. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ enableWebAVSession(enabled: boolean): WebAttribute; @@ -10090,7 +10645,8 @@ declare class WebAttribute extends CommonMethod { * @param { EmbedOptions } options The embed options, which can be {@link EmbedOptions}. * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core - * @since 16 + * @since arkts {'1.1':'16', '1.2':'20'} + * @arkts 1.1&1.2 */ nativeEmbedOptions(options?: EmbedOptions): WebAttribute; @@ -10278,15 +10834,6 @@ declare interface SslErrorEvent { * @since 12 */ isMainFrame: boolean; - - /** - * Certificate chain data in DER format. - * - * @type { ?Array } - * @syscap SystemCapability.Web.Webview.Core - * @since 20 - */ - certChainData?: Array; } /** @@ -10338,7 +10885,8 @@ declare interface ExpandedMenuItemOptions { * * @interface NestedScrollOptionsExt * @syscap SystemCapability.Web.Webview.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface NestedScrollOptionsExt { /** @@ -10346,7 +10894,8 @@ declare interface NestedScrollOptionsExt { * * @type { ?NestedScrollMode } * @syscap SystemCapability.Web.Webview.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ scrollUp?: NestedScrollMode; @@ -10355,7 +10904,8 @@ declare interface NestedScrollOptionsExt { * * @type { ?NestedScrollMode } * @syscap SystemCapability.Web.Webview.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ scrollDown?: NestedScrollMode; @@ -10364,7 +10914,8 @@ declare interface NestedScrollOptionsExt { * * @type { ?NestedScrollMode } * @syscap SystemCapability.Web.Webview.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ scrollRight?: NestedScrollMode; @@ -10373,7 +10924,8 @@ declare interface NestedScrollOptionsExt { * * @type { ?NestedScrollMode } * @syscap SystemCapability.Web.Webview.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ scrollLeft?: NestedScrollMode; } @@ -10383,7 +10935,8 @@ declare interface NestedScrollOptionsExt { * * @typedef EmbedOptions * @syscap SystemCapability.Web.Webview.Core - * @since 16 + * @since arkts {'1.1':'16', '1.2':'20'} + * @arkts 1.1&1.2 */ declare interface EmbedOptions { /** @@ -10395,7 +10948,8 @@ declare interface EmbedOptions { * @type { ?boolean } * @default false * @syscap SystemCapability.Web.Webview.Core - * @since 16 + * @since arkts {'1.1':'16', '1.2':'20'} + * @arkts 1.1&1.2 */ supportDefaultIntrinsicSize?: boolean; @@ -10438,4 +10992,5 @@ 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..a4e1de4455c4964b537b3fe4f3495eac7f3759eb 100644 --- a/api/@internal/component/ets/with_theme.d.ts +++ b/api/@internal/component/ets/with_theme.d.ts @@ -18,7 +18,6 @@ * @kit ArkUI */ - /** * CustomTheme. * diff --git a/api/@ohos.InputMethodSubtype.d.ts b/api/@ohos.InputMethodSubtype.d.ts index c86eeccd74ef19225e46894ee3987fa19f6eccd7..1cb08c348e1ec6b7b5718af3078f771ad76c11c0 100644 --- a/api/@ohos.InputMethodSubtype.d.ts +++ b/api/@ohos.InputMethodSubtype.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 @@ -23,7 +23,8 @@ * * @interface InputMethodSubtype * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export default interface InputMethodSubtype { /** @@ -32,19 +33,21 @@ export default interface InputMethodSubtype { * @type { ?string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly label?: string; /** * The label id of input method subtype. * - * @type { ?number } + * @type { ?double } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly labelId?: number; + readonly labelId?: double; /** * The name of input method. @@ -52,7 +55,8 @@ export default interface InputMethodSubtype { * @type { string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly name: string; @@ -62,7 +66,8 @@ export default interface InputMethodSubtype { * @type { string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly id: string; @@ -72,7 +77,8 @@ export default interface InputMethodSubtype { * @type { ?('upper' | 'lower') } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly mode?: 'upper' | 'lower'; @@ -82,7 +88,8 @@ export default interface InputMethodSubtype { * @type { string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly locale: string; @@ -92,7 +99,8 @@ export default interface InputMethodSubtype { * @type { string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly language: string; @@ -102,19 +110,21 @@ export default interface InputMethodSubtype { * @type { ?string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly icon?: string; /** * The icon id of input method subtype. * - * @type { ?number } + * @type { ?double } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly iconId?: number; + readonly iconId?: double; /** * The extra info of input method subtype. @@ -128,7 +138,8 @@ export default interface InputMethodSubtype { * * @type { ?object } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ extra?: object; } \ No newline at end of file diff --git a/api/@ohos.UiTest.d.ts b/api/@ohos.UiTest.d.ts index 7ffdeef4a48152cce565178019ac00ed12167bd2..5d8b1069b0130a9ee1028b6cd14722b481ddd1cb 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. * @@ -1078,14 +1067,14 @@ declare interface Point { /** * The x-coordinate of the coordinate point. * - * @type { number } + * @type { int } * @syscap SystemCapability.Test.UiTest * @crossplatform * @atomicservice * @since arkts {'1.1':'20','1.2':'20'} * @arkts 1.1&1.2 */ - x: number; + x: int; /** * The y-coordinate of the coordinate point. * @@ -1116,23 +1105,24 @@ declare interface Point { /** * The y-coordinate of the coordinate point. * - * @type { number } + * @type { int } * @syscap SystemCapability.Test.UiTest * @crossplatform * @atomicservice * @since arkts {'1.1':'20','1.2':'20'} * @arkts 1.1&1.2 */ - y: number; + y: int; /** * The displayId to which the coordinate point belongs, default is the displayId of the main scrren. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Test.UiTest * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ - displayId?: number; + displayId?: int; } /** @@ -1191,14 +1181,14 @@ declare interface Rect { /** * The x-coordinate of the top left corner of the rectangle. * - * @type { number } + * @type { int } * @syscap SystemCapability.Test.UiTest * @crossplatform * @atomicservice * @since arkts {'1.1':'20','1.2':'20'} * @arkts 1.1&1.2 */ - left: number; + left: int; /** * The y-coordinate of the top left corner of the rectangle. * @@ -1229,14 +1219,14 @@ declare interface Rect { /** * The y-coordinate of the top left corner of the rectangle. * - * @type { number } + * @type { int } * @syscap SystemCapability.Test.UiTest * @crossplatform * @atomicservice * @since arkts {'1.1':'20','1.2':'20'} * @arkts 1.1&1.2 */ - top: number; + top: int; /** * The x-coordinate at the bottom right corner of the rectangle. * @@ -1267,14 +1257,14 @@ declare interface Rect { /** * The x-coordinate at the bottom right corner of the rectangle. * - * @type { number } + * @type { int } * @syscap SystemCapability.Test.UiTest * @crossplatform * @atomicservice * @since arkts {'1.1':'20','1.2':'20'} * @arkts 1.1&1.2 */ - right: number; + right: int; /** * The y-coordinate at the bottom right corner of the rectangle. * @@ -1305,14 +1295,14 @@ declare interface Rect { /** * The y-coordinate at the bottom right corner of the rectangle. * - * @type { number } + * @type { int } * @syscap SystemCapability.Test.UiTest * @crossplatform * @atomicservice * @since arkts {'1.1':'20','1.2':'20'} * @arkts 1.1&1.2 */ - bottom: number; + bottom: int; /** * The displayId to which the rect belongs, default is the displayId of the main screen. * @@ -1423,7 +1413,7 @@ declare interface WindowFilter { * @arkts 1.1&1.2 */ active?: boolean; - + /** * Find the window in the specified ID display. By default, it searches all displays. * @@ -1807,14 +1797,14 @@ declare interface TouchPadSwipeOptions { /** * Speed(pixels per second) of touchpad multi-finger swipe, default is 2000, the value ranges from 200 to 40000,set it 2000 if out of range. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Test.UiTest * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @test * @arkts 1.1&1.2 */ - speed?: number; + speed?: int; } /** @@ -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; @@ -3128,7 +3122,7 @@ declare class Component { /** * Scroll on this {@link Component} to the top,applicable to scrollable one. * - * @param { number } [speed] - the speed of swipe(pixels per second),ranges from 200 to 40000.Set it default 600 if out of range or null or undefined. + * @param { int } [speed] - the speed of swipe(pixels per second),ranges from 200 to 40000.Set it default 600 if out of range or null or undefined. * @returns { Promise } * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter verification failed. * @throws { BusinessError } 17000002 - The async function is not called with await. @@ -3140,7 +3134,7 @@ declare class Component { * @test * @arkts 1.1&1.2 */ - scrollToTop(speed?: number): Promise; + scrollToTop(speed?: int): Promise; /** * Scroll on this {@link Component} to the bottom,applicable to scrollable one. @@ -3170,7 +3164,7 @@ declare class Component { /** * Scroll on this {@link Component} to the bottom,applicable to scrollable one. * - * @param { number } [speed] - the speed of swipe(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined. + * @param { int } [speed] - the speed of swipe(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined. * @returns { Promise } * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter verification failed. * @throws { BusinessError } 17000002 - The async function is not called with await. @@ -3182,7 +3176,7 @@ declare class Component { * @test * @arkts 1.1&1.2 */ - scrollToBottom(speed?: number): Promise; + scrollToBottom(speed?: int): Promise; /** * Get the bounds rect of this {@link Component}. @@ -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. * @@ -3323,64 +3318,65 @@ declare class Component { * @arkts 1.1&1.2 */ dragTo(target: Component): Promise; + + /** + * Pinch enlarge this {@link Component} to the target scale. + * + * @param { number } scale The scale of the pinch enlarge this {@link Component}'s size. + * @returns { Promise } + * @throws { BusinessError } 401 - if the input parameters are invalid. + * @throws { BusinessError } 17000002 - if the async function was not called with await. + * @throws { BusinessError } 17000004 - if the component is invisible or destroyed. + * @syscap SystemCapability.Test.UiTest + * @since 9 + * @test + */ + /** + * Pinch enlarge this {@link Component} to the target scale. + * + * @param { double } scale - the scale of the pinch enlarge this {@link Component}'s size, ranges greater than 1. + * @returns { Promise } + * @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. + * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed. + * @syscap SystemCapability.Test.UiTest + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @test + * @arkts 1.1&1.2 + */ + pinchOut(scale: double): Promise; + /** + * Pinch shrink this {@link Component} to the target scale. + * + * @param { number } scale The scale of the pinch shrink this {@link Component}'s size. + * @returns { Promise } + * @throws { BusinessError } 401 - if the input parameters are invalid. + * @throws { BusinessError } 17000002 - if the async function was not called with await. + * @throws { BusinessError } 17000004 - if the component is invisible or destroyed. + * @syscap SystemCapability.Test.UiTest + * @since 9 + * @test + */ + /** + * Pinch shrink this {@link Component} to the target scale. + * + * @param { double } scale - the scale of the pinch shrink this {@link Component}'s size, ranges from 0 to 1. + * @returns { Promise } + * @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. + * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed. + * @syscap SystemCapability.Test.UiTest + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @test + * @arkts 1.1&1.2 + */ + pinchIn(scale: double): Promise; - /** - * Pinch enlarge this {@link Component} to the target scale. - * - * @param { number } scale The scale of the pinch enlarge this {@link Component}'s size. - * @returns { Promise } - * @throws { BusinessError } 401 - if the input parameters are invalid. - * @throws { BusinessError } 17000002 - if the async function was not called with await. - * @throws { BusinessError } 17000004 - if the component is invisible or destroyed. - * @syscap SystemCapability.Test.UiTest - * @since 9 - * @test - */ - /** - * Pinch enlarge this {@link Component} to the target scale. - * - * @param { number } scale - the scale of the pinch enlarge this {@link Component}'s size, ranges greater than 1. - * @returns { Promise } - * @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. - * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed. - * @syscap SystemCapability.Test.UiTest - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @test - * @arkts 1.1&1.2 - */ - pinchOut(scale: number): Promise; - /** - * Pinch shrink this {@link Component} to the target scale. - * - * @param { number } scale The scale of the pinch shrink this {@link Component}'s size. - * @returns { Promise } - * @throws { BusinessError } 401 - if the input parameters are invalid. - * @throws { BusinessError } 17000002 - if the async function was not called with await. - * @throws { BusinessError } 17000004 - if the component is invisible or destroyed. - * @syscap SystemCapability.Test.UiTest - * @since 9 - * @test - */ - /** - * Pinch shrink this {@link Component} to the target scale. - * - * @param { number } scale - the scale of the pinch shrink this {@link Component}'s size, ranges from 0 to 1. - * @returns { Promise } - * @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. - * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed. - * @syscap SystemCapability.Test.UiTest - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @test - * @arkts 1.1&1.2 - */ - pinchIn(scale: number): Promise; /** * Scroll on this {@link Component}to find matched {@link Component},applicable to scrollable one. * @@ -3390,8 +3386,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 @@ -3444,18 +3438,17 @@ declare class Component { * * @param { On } on - the attribute requirements of the target {@link Component}. * @param { boolean } [vertical] - Whether the swipe direction is vertical, default is true. - * @param { number } [offset] - Offset from the swipe start/end point to the component border, default is 80. + * @param { int } [offset] - Offset from the swipe start/end point to the component border, default is 80. * @returns { Promise } the found result,or null if not found. * @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. * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed. * @syscap SystemCapability.Test.UiTest - * @atomicservice * @since 20 * @test * @arkts 1.2 */ - scrollSearch(on: On, vertical?: boolean, offset?: number): Promise; + scrollSearch(on: On, vertical?: boolean, offset?: int): Promise; /** * Get the original text attribute value. * If the accessibility property 'accessibilityLevel' of a component is set to 'no' or 'no-hide-descendants', @@ -3561,7 +3554,7 @@ declare class Driver { /** * Delay with specified duration. * - * @param { number } duration - the delay duration in milliseconds, not less than 0. + * @param { int } duration - the delay duration in milliseconds, not less than 0. * @returns { Promise } * @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. @@ -3572,7 +3565,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - delayMs(duration: number): Promise; + delayMs(duration: int): Promise; /** * Find the first matched {@link Component} on current UI. @@ -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 @@ -3693,17 +3684,16 @@ declare class Driver { * Find the first matched {@link Component} on current UI during the time given. * * @param { On } on - the attribute requirements of the target {@link Component}. - * @param { number } time - duration of finding in milliseconds, not less than 0. + * @param { int } time - duration of finding in milliseconds, not less than 0. * @returns { Promise } the first matched {@link Component} or undefined. * @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 */ - waitForComponent(on: On, time: number): Promise; + waitForComponent(on: On, time: int): Promise; /** * Find all the matched {@link Component}s on current UI. * @@ -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 @@ -3833,16 +3822,17 @@ declare class Driver { /** * Press the BACK key on the specified display. * - * @param { number } displayId - the Id of the specified display. + * @param { int } displayId - the Id of the specified display. * @returns { Promise } * @throws { BusinessError } 17000002 - The async function is not called with await. * @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; + pressBack(displayId: int): Promise; /** * Press the specified key. @@ -3858,7 +3848,7 @@ declare class Driver { /** * Press the specified key. * - * @param { number } keyCode - the target keyCode. + * @param { int } keyCode - the target keyCode. * @returns { Promise } * @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. @@ -3869,22 +3859,23 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - triggerKey(keyCode: number): Promise; + triggerKey(keyCode: int): Promise; /** * Press the specified key on the specified display. * - * @param { number } keyCode - the target keyCode. - * @param { number } displayId - the Id of the specified display. + * @param { int } keyCode - the target keyCode. + * @param { int } displayId - the Id of the specified display. * @returns { Promise } * @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 + * @since arkts {'1.1':'20','1.2':'20'} * @test + * @arkts 1.1&1.2 */ - triggerKey(keyCode: number, displayId: number): Promise; + triggerKey(keyCode: int, displayId: int): Promise; /** * Press two or three key combinations @@ -3902,9 +3893,9 @@ declare class Driver { /** * Press two or three key combinations * - * @param { number } key0 - the first keyCode. - * @param { number } key1 - the second keyCode. - * @param { number } [key2] - the third keyCode,set it default 0 if null or undefined. + * @param { int } key0 - the first keyCode. + * @param { int } key1 - the second keyCode. + * @param { int } [key2] - the third keyCode,set it default 0 if null or undefined. * @returns { Promise } * @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. @@ -3915,7 +3906,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - triggerCombineKeys(key0: number, key1: number, key2?: number): Promise; + triggerCombineKeys(key0: int, key1: int, key2?: int): Promise; /** * Press two or three key combinations on the specified display. @@ -3962,8 +3953,8 @@ declare class Driver { /** * Click on the specified location on the screen. * - * @param { number } x - the x-coordinate, not less than 0. - * @param { number } y - the y-coordinate, not less than 0. + * @param { int } x - the x-coordinate, not less than 0. + * @param { int } y - the y-coordinate, not less than 0. * @returns { Promise } * @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. @@ -3974,7 +3965,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - click(x: number, y: number): Promise; + click(x: int, y: int): Promise; /** * DoubleClick on the specified location on the screen. @@ -4004,8 +3995,8 @@ declare class Driver { /** * DoubleClick on the specified location on the screen. * - * @param { number } x - the x-coordinate, not less than 0. - * @param { number } y - the y-coordinate, not less than 0. + * @param { int } x - the x-coordinate, not less than 0. + * @param { int } y - the y-coordinate, not less than 0. * @returns { Promise } * @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. @@ -4016,7 +4007,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - doubleClick(x: number, y: number): Promise; + doubleClick(x: int, y: int): Promise; /** * LongClick on the specified location on the screen. @@ -4046,8 +4037,8 @@ declare class Driver { /** * LongClick on the specified location on the screen. * - * @param { number } x - the x-coordinate, not less than 0. - * @param { number } y - the y-coordinate, not less than 0. + * @param { int } x - the x-coordinate, not less than 0. + * @param { int } y - the y-coordinate, not less than 0. * @returns { Promise } * @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. @@ -4058,7 +4049,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - longClick(x: number, y: number): Promise; + longClick(x: int, y: int): Promise; /** * Swipe on the screen between the specified points. @@ -4094,11 +4085,11 @@ declare class Driver { /** * Swipe on the screen between the specified points. * - * @param { number } startx - the x-coordinate of the starting point, not less than 0. - * @param { number } starty - the y-coordinate of the starting point, not less than 0. - * @param { number } endx - the x-coordinate of the ending point, not less than 0. - * @param { number } endy - the y-coordinate of the ending point, not less than 0. - * @param { number } [speed] - the speed of swipe(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined. + * @param { int } startx - the x-coordinate of the starting point, not less than 0. + * @param { int } starty - the y-coordinate of the starting point, not less than 0. + * @param { int } endx - the x-coordinate of the ending point, not less than 0. + * @param { int } endy - the y-coordinate of the ending point, not less than 0. + * @param { int } [speed] - the speed of swipe(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined. * @returns { Promise } * @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. @@ -4109,7 +4100,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - swipe(startx: number, starty: number, endx: number, endy: number, speed?: number): Promise; + swipe(startx: int, starty: int, endx: int, endy: int, speed?: int): Promise; /** * Drag on the screen between the specified points. @@ -4129,11 +4120,11 @@ declare class Driver { /** * Drag on the screen between the specified points. * - * @param { number } startx - the x-coordinate of the starting point, not less than 0. - * @param { number } starty - the y-coordinate of the starting point, not less than 0. - * @param { number } endx - the x-coordinate of the ending point, not less than 0. - * @param { number } endy - the y-coordinate of the ending point, not less than 0. - * @param { number } [speed] the speed of drag(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined. + * @param { int } startx - the x-coordinate of the starting point, not less than 0. + * @param { int } starty - the y-coordinate of the starting point, not less than 0. + * @param { int } endx - the x-coordinate of the ending point, not less than 0. + * @param { int } endy - the y-coordinate of the ending point, not less than 0. + * @param { int } [speed] the speed of drag(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined. * @returns { Promise } * @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. @@ -4143,7 +4134,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - drag(startx: number, starty: number, endx: number, endy: number, speed?: number): Promise; + drag(startx: int, starty: int, endx: int, endy: int, speed?: int): Promise; /** * Click on the specified location on the screen. @@ -4375,16 +4366,17 @@ declare class Driver { /** * Get the size of the specified device display. * - * @param { number } displayId - the Id of the specified display. + * @param { int } displayId - the Id of the specified display. * @returns { Promise } the size of the device display. * @throws { BusinessError } 17000002 - The async function is not called with await. * @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; + getDisplaySize(displayId: int): Promise; /** * Get the density of the device display. @@ -4469,16 +4461,17 @@ declare class Driver { /** * Press the home key to the specified display. * - * @param { number } displayId - the Id of the specified display. + * @param { int } displayId - the Id of the specified display. * @returns { Promise } * @throws { BusinessError } 17000002 - The async function is not called with await. * @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; + pressHome(displayId: int): Promise; /** * Wait for the UI become idle. @@ -4495,8 +4488,8 @@ declare class Driver { /** * Wait for the UI become idle. * - * @param { number } idleTime - the threshold of UI idle time, in millisecond, not less than 0. - * @param { number } timeout - the maximum time to wait for idle, in millisecond, not less than 0. + * @param { int } idleTime - the threshold of UI idle time, in millisecond, not less than 0. + * @param { int } timeout - the maximum time to wait for idle, in millisecond, not less than 0. * @returns { Promise } true if wait for idle succeed in the timeout, false otherwise. * @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. @@ -4506,7 +4499,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - waitForIdle(idleTime: number, timeout: number): Promise; + waitForIdle(idleTime: int, timeout: int): Promise; /** * Inject fling on the device display. @@ -4542,8 +4535,8 @@ declare class Driver { * * @param { Point } from - the coordinate point where the finger touches the screen. * @param { Point } to - the coordinate point where the finger leaves the screen. - * @param { number } stepLen - the length of each step, in pixels. - * @param { number } [speed] - the speed of fling(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined. + * @param { int } stepLen - the length of each step, in pixels. + * @param { int } [speed] - the speed of fling(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined. * @returns { Promise } * @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. @@ -4554,7 +4547,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - fling(from: Point, to: Point, stepLen: number, speed: number): Promise; + fling(from: Point, to: Point, stepLen: int, speed: int): Promise; /** * Inject multi-pointer action on the device display. @@ -4572,7 +4565,7 @@ declare class Driver { * Inject multi-pointer action on the device display. * * @param { PointerMatrix } pointers - the two-dimensional array of pointers to inject. - * @param { number } [speed] - the speed of swipe(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined. + * @param { int } [speed] - the speed of swipe(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined. * @returns { Promise } true if the operation finished, false * @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. @@ -4583,7 +4576,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - injectMultiPointerAction(pointers: PointerMatrix, speed?: number): Promise; + injectMultiPointerAction(pointers: PointerMatrix, speed?: int): Promise; /** * Inject fling on the device display. @@ -4614,7 +4607,7 @@ declare class Driver { * Inject fling on the device display. * * @param { UiDirection } direction - the direction of this action. - * @param { number } speed - the speed of fling (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range. + * @param { int } speed - the speed of fling (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range. * @returns { Promise } * @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. @@ -4625,23 +4618,24 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - fling(direction: UiDirection, speed: number): Promise; + fling(direction: UiDirection, speed: int): Promise; /** * Inject fling on the specified device display. * * @param { UiDirection } direction - the direction of this action. - * @param { number } speed - the speed of fling (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range. - * @param { number } displayId - the Id of the specified display. - * @returns { Promise } + * @param { int } speed - the speed of fling (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range. + * @param { int } displayId - the Id of the specified display. + * @returns { Promise } * @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 + * @since arkts {'1.1':'20','1.2':'20'} * @test + * @arkts 1.1&1.2 */ - fling(direction: UiDirection, speed: number, displayId: number): Promise; + fling(direction: UiDirection, speed: int, displayId: int): Promise; /** * Click on the specified location on the screen with the specified mouse button, and press the specified key simultaneously if necessary. @@ -4662,8 +4656,8 @@ declare class Driver { * * @param { Point } p - the coordinate of the specified location. * @param { MouseButton } btnId - the button of Mouse. - * @param { number } [key1] - the first keyCode,set it default 0 if null or undefined. - * @param { number } [key2] - the second keyCode,set it default 0 if null or undefined. + * @param { int } [key1] - the first keyCode,set it default 0 if null or undefined. + * @param { int } [key2] - the second keyCode,set it default 0 if null or undefined. * @returns { Promise } * @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. @@ -4673,7 +4667,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - mouseClick(p: Point, btnId: MouseButton, key1?: number, key2?: number): Promise; + mouseClick(p: Point, btnId: MouseButton, key1?: int, key2?: int): Promise; /** * Move the mouse cursor to the specified location. @@ -4721,9 +4715,9 @@ declare class Driver { * * @param { Point } p - the coordinate of the specified location. * @param { boolean } down - whether the mouse wheel rolls down. - * @param { number } d - the number of cells that the mouse wheel scrolls, each cell will make the target point shift 120 pixels. - * @param { number } [key1] - the first keyCode,set it default 0 if null or undefined. - * @param { number } [key2] - the second keyCode,set it default 0 if null or undefined. + * @param { int } d - the number of cells that the mouse wheel scrolls, each cell will make the target point shift 120 pixels. + * @param { int } [key1] - the first keyCode,set it default 0 if null or undefined. + * @param { int } [key2] - the second keyCode,set it default 0 if null or undefined. * @returns { Promise } * @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. @@ -4733,17 +4727,17 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - mouseScroll(p: Point, down: boolean, d: number, key1?: number, key2?: number): Promise; + mouseScroll(p: Point, down: boolean, d: int, key1?: int, key2?: int): Promise; /** * The mouse wheel scrolls the specified cell at the specified position, and press the specified key simultaneously if necessary. * * @param { Point } p - the coordinate of the specified location. * @param { boolean } down - whether the mouse wheel rolls down. - * @param { number } d - the number of cells that the mouse wheel scrolls, each cell will make the target point shift 120 pixels. - * @param { number } [key1] - the first keyCode,set it default 0 if null or undefined. - * @param { number } [key2] - the second keyCode,set it default 0 if null or undefined. - * @param { number } [speed] - The Speed of mouse wheel rolls(cells per second),ranges from 1 to 500.Set it default 20 if out of range or null or undefined. + * @param { int } d - the number of cells that the mouse wheel scrolls, each cell will make the target point shift 120 pixels. + * @param { int } [key1] - the first keyCode,set it default 0 if null or undefined. + * @param { int } [key2] - the second keyCode,set it default 0 if null or undefined. + * @param { int } [speed] - The Speed of mouse wheel rolls(cells per second),ranges from 1 to 500.Set it default 20 if out of range or null or undefined. * @returns { Promise } * @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. @@ -4753,7 +4747,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - mouseScroll(p: Point, down: boolean, d: number, key1?: number, key2?: number, speed?: number): Promise; + mouseScroll(p: Point, down: boolean, d: int, key1?: int, key2?: int, speed?: int): Promise; /** * Capture the specified area of current screen and save as picture which PNG format. @@ -4810,8 +4804,8 @@ declare class Driver { * * @param { Point } p - the coordinate of the specified location. * @param { MouseButton } btnId - the button of Mouse. - * @param { number } [key1] - the first keyCode,set it default 0 if null or undefined. - * @param { number } [key2] - the second keyCode,set it default 0 if null or undefined. + * @param { int } [key1] - the first keyCode,set it default 0 if null or undefined. + * @param { int } [key2] - the second keyCode,set it default 0 if null or undefined. * @returns { Promise } * @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. @@ -4821,15 +4815,15 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - mouseDoubleClick(p: Point, btnId: MouseButton, key1?: number, key2?: number): Promise; + mouseDoubleClick(p: Point, btnId: MouseButton, key1?: int, key2?: int): Promise; /** * Long click on the specified location on the screen with the specified mouse button, and press the specified key simultaneously if necessary. * * @param { Point } p - the coordinate of the specified location. * @param { MouseButton } btnId - the button of Mouse. - * @param { number } [key1] - the first keyCode,set it default 0 if null or undefined. - * @param { number } [key2] - the second keyCode,set it default 0 if null or undefined. + * @param { int } [key1] - the first keyCode,set it default 0 if null or undefined. + * @param { int } [key2] - the second keyCode,set it default 0 if null or undefined. * @returns { Promise } * @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. @@ -4839,7 +4833,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - mouseLongClick(p: Point, btnId: MouseButton, key1?: number, key2?: number): Promise; + mouseLongClick(p: Point, btnId: MouseButton, key1?: int, key2?: int): Promise; /** * Long click on the specified location on the screen with the specified mouse button, and press the specified key simultaneously if necessary. @@ -4864,7 +4858,7 @@ declare class Driver { * * @param { Point } from - the starting point. * @param { Point } to - the ending point. - * @param { number } [speed] - speed of swipe (pixels per second),the value ranges from 200 to 40000.Set it default 600 if out of range or null or undefined. + * @param { int } [speed] - speed of swipe (pixels per second),the value ranges from 200 to 40000.Set it default 600 if out of range or null or undefined. * @returns { Promise } * @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. @@ -4874,14 +4868,14 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - mouseMoveWithTrack(from: Point, to: Point, speed?: number): Promise; + mouseMoveWithTrack(from: Point, to: Point, speed?: int): Promise; /** * Hold down the left mouse button and drag on the screen between the specified points. * * @param { Point } from - the starting point. * @param { Point } to - the ending point. - * @param { number } [speed] - speed of drag (pixels per second),the value ranges from 200 to 40000,Set it default 600 if out of range or null or undefined. + * @param { int } [speed] - speed of drag (pixels per second),the value ranges from 200 to 40000,Set it default 600 if out of range or null or undefined. * @returns { Promise } * @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. @@ -4891,7 +4885,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - mouseDrag(from: Point, to: Point, speed?: number): Promise; + mouseDrag(from: Point, to: Point, speed?: int): Promise; /** * Hold down the left mouse button and drag on the screen between the specified points. @@ -4938,14 +4932,15 @@ 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; /** * Simulate touchpad multi-finger swipe gestures. - * @param { number } fingers Finger count of touchpad multi-finger swipe, ranges from 3 to 4. + * @param { int } fingers Finger count of touchpad multi-finger swipe, ranges from 3 to 4. * @param { UiDirection } direction Direction of touchpad multi-finger swipe. * @param { TouchPadSwipeOptions } [options] Additional options touchpad multi-finger swipe gestures, set its parameters to default values if null or undefined. * @returns { Promise } @@ -4958,7 +4953,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - touchPadMultiFingerSwipe(fingers: number, direction: UiDirection, options?: TouchPadSwipeOptions): Promise; + touchPadMultiFingerSwipe(fingers: int, direction: UiDirection, options?: TouchPadSwipeOptions): Promise; /** * Simulate pen click operation. @@ -4977,7 +4972,7 @@ declare class Driver { /** * Simulate pen long click operation. * @param { Point } point Coordinate of the specified location. - * @param { number } [pressure] Pressure of pen long click operation, default is 1.0, the value ranges from 0.0 to 1.0. + * @param { double } [pressure] Pressure of pen long click operation, default is 1.0, the value ranges from 0.0 to 1.0. * @returns { Promise } * @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. @@ -4987,7 +4982,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - penLongClick(point: Point, pressure?: number): Promise; + penLongClick(point: Point, pressure?: double): Promise; /** * Simulate pen double click operation. @@ -5007,8 +5002,8 @@ declare class Driver { * Simulate pen swipe operation. * @param { Point } startPoint Coordinate of the specified location. * @param { Point } endPoint Coordinate of the specified location. - * @param { number } [speed] Speed(pixels per second) of pen swipe, default is 600,the value ranges from 200 to 40000,set it 600 if out of range. - * @param { number } [pressure] Pressure of pen swipe operation, default is 1.0, the value ranges from 0.0 to 1.0. + * @param { int } [speed] Speed(pixels per second) of pen swipe, default is 600,the value ranges from 200 to 40000,set it 600 if out of range. + * @param { double } [pressure] Pressure of pen swipe operation, default is 1.0, the value ranges from 0.0 to 1.0. * @returns { Promise } * @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. @@ -5018,13 +5013,13 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - penSwipe(startPoint: Point, endPoint: Point, speed?: number, pressure?: number): Promise; + penSwipe(startPoint: Point, endPoint: Point, speed?: int, pressure?: double): Promise; /** * Inject pen multi-pointer action on the device display. * @param { PointerMatrix } pointers The two-dimensional array of pointers to inject. - * @param { number } [speed] Speed(pixels per second) of inject pen pointer action, default is 600,the value ranges from 200 to 40000,set it 600 if out of range. - * @param { number } [pressure] Pressure of inject pen pointer action operation, default is 1.0, the value ranges from 0.0 to 1.0. + * @param { int } [speed] Speed(pixels per second) of inject pen pointer action, default is 600,the value ranges from 200 to 40000,set it 600 if out of range. + * @param { double } [pressure] Pressure of inject pen pointer action operation, default is 1.0, the value ranges from 0.0 to 1.0. * @returns { Promise } * @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. @@ -5034,7 +5029,7 @@ declare class Driver { * @test * @arkts 1.1&1.2 */ - injectPenPointerAction(pointers: PointerMatrix, speed?: number, pressure?: number): Promise; + injectPenPointerAction(pointers: PointerMatrix, speed?: int, pressure?: double): Promise; /** * Inject a watch crown rotation event, specifies the rotation speed if necessary. @@ -5254,8 +5249,8 @@ declare class UiWindow { /** * Move this {@link UiWindow} to the specified points. * - * @param { number } x - the x coordinate of destination, not less than 0. - * @param { number } y - the y coordinate of destination, not less than 0. + * @param { int } x - the x coordinate of destination, not less than 0. + * @param { int } y - the y coordinate of destination, not less than 0. * @returns { Promise } * @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. @@ -5267,7 +5262,7 @@ declare class UiWindow { * @test * @arkts 1.1&1.2 */ - moveTo(x: number, y: number): Promise; + moveTo(x: int, y: int): Promise; /** * Resize this {@link UiWindow} to the specified size for the specified direction. @@ -5287,8 +5282,8 @@ declare class UiWindow { /** * Resize this {@link UiWindow} to the specified size for the specified direction. * - * @param { number } wide - the expected wide of the window after resizing. - * @param { number } height - the expected height of the window after resizing. + * @param { int } wide - the expected wide of the window after resizing. + * @param { int } height - the expected height of the window after resizing. * @param { ResizeDirection } direction - the expected direction of the window after resizing. * @returns { Promise } * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. @@ -5301,7 +5296,7 @@ declare class UiWindow { * @test * @arkts 1.1&1.2 */ - resize(wide: number, height: number, direction: ResizeDirection): Promise; + resize(wide: int, height: int, direction: ResizeDirection): Promise; /** * Change this {@link UiWindow} into split screen mode. @@ -5495,8 +5490,8 @@ declare class PointerMatrix { /** * Create an {@link PointerMatrix} object. * - * @param { number } fingers - The number of fingers, ranges from 1 to 10. - * @param { number } steps - The number of steps of each finger trace, ranges from 1 to 1000. + * @param { int } fingers - The number of fingers, ranges from 1 to 10. + * @param { int } 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. * @syscap SystemCapability.Test.UiTest @@ -5506,7 +5501,7 @@ declare class PointerMatrix { * @test * @arkts 1.1&1.2 */ - static create(fingers: number, steps: number): PointerMatrix; + static create(fingers: int, steps: int): PointerMatrix; /** * Set the point value of an element in the PointerMatrix. @@ -5522,8 +5517,8 @@ declare class PointerMatrix { /** * Set the point value of an element in the PointerMatrix. * - * @param { number } finger - the index of target finger to set. - * @param { number } step - the index of target step to set. + * @param { int } finger - the index of target finger to set. + * @param { int } step - the index of target step to set. * @param { Point } point - the coordinate of target step to set. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Test.UiTest @@ -5533,7 +5528,7 @@ declare class PointerMatrix { * @test * @arkts 1.1&1.2 */ - setPoint(finger: number, step: number, point: Point): void; + setPoint(finger: int, step: int, point: Point): void; } /** @@ -5571,8 +5566,7 @@ declare const ON: On; UiComponent, UiDriver, BY, - By, - InputTextMode + By }; /*** endif */ @@ -5594,5 +5588,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.ability.errorCode.d.ts b/api/@ohos.ability.errorCode.d.ts index bf6f1e727c9e094263d2a2759a2b13e80e4951d6..83418a702bb201adf2f760c34ef91791292029a8 100644 --- a/api/@ohos.ability.errorCode.d.ts +++ b/api/@ohos.ability.errorCode.d.ts @@ -23,14 +23,16 @@ * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 6 + * @since arkts {'1.1':'6', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum ErrorCode { /** * Permission denied. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 6 + * @since arkts {'1.1':'6', '1.2':'20'} + * @arkts 1.1&1.2 */ PERMISSION_DENY = -3, @@ -38,7 +40,8 @@ export enum ErrorCode { * Ability not found. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 6 + * @since arkts {'1.1':'6', '1.2':'20'} + * @arkts 1.1&1.2 */ ABILITY_NOT_FOUND = -2, @@ -46,7 +49,8 @@ export enum ErrorCode { * Invalid parameter. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 6 + * @since arkts {'1.1':'6', '1.2':'20'} + * @arkts 1.1&1.2 */ INVALID_PARAMETER = -1, @@ -54,7 +58,8 @@ export enum ErrorCode { * No error. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 6 + * @since arkts {'1.1':'6', '1.2':'20'} + * @arkts 1.1&1.2 */ NO_ERROR = 0 } 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..68b61bb3c84d360ff28f155bc0df3d0408367d52 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; @@ -286,9 +295,9 @@ declare namespace abilityAccessCtrl { * Grants a specified user_grant permission to the given application. * * @permission ohos.permission.GRANT_SENSITIVE_PERMISSIONS - * @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 granted. - * @param { number } permissionFlags - Flags of permission state. This parameter can be 1 or 2 or 64. + * @param { int } permissionFlags - Flags of permission state. This parameter can be 1 or 2 or 64. * @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 } 201 - Permission denied. Interface caller does not have permission "ohos.permission.GRANT_SENSITIVE_PERMISSIONS". @@ -304,15 +313,15 @@ declare namespace abilityAccessCtrl { * @systemapi * @since 8 */ - grantUserGrantedPermission(tokenID: number, permissionName: Permissions, permissionFlags: number): Promise; + grantUserGrantedPermission(tokenID: int, permissionName: Permissions, permissionFlags: int): Promise; /** * Grants a specified user_grant permission to the given application. * * @permission ohos.permission.GRANT_SENSITIVE_PERMISSIONS - * @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 granted. - * @param { number } permissionFlags - Flags of permission state. This parameter can be 1 or 2 or 64. + * @param { int } permissionFlags - Flags of permission state. This parameter can be 1 or 2 or 64. * @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.GRANT_SENSITIVE_PERMISSIONS". @@ -329,9 +338,9 @@ declare namespace abilityAccessCtrl { * @since 8 */ grantUserGrantedPermission( - tokenID: number, + tokenID: int, permissionName: Permissions, - permissionFlags: number, + permissionFlags: int, callback: AsyncCallback ): void; @@ -339,9 +348,9 @@ declare namespace abilityAccessCtrl { * Revoke a specified user_grant permission to the given application. * * @permission ohos.permission.REVOKE_SENSITIVE_PERMISSIONS - * @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 revoked. - * @param { number } permissionFlags - Flags of permission state. This parameter can be 1 or 2 or 64. + * @param { int } permissionFlags - Flags of permission state. This parameter can be 1 or 2 or 64. * @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 } 201 - Permission denied. Interface caller does not have permission "ohos.permission.REVOKE_SENSITIVE_PERMISSIONS". @@ -357,15 +366,15 @@ declare namespace abilityAccessCtrl { * @systemapi * @since 8 */ - revokeUserGrantedPermission(tokenID: number, permissionName: Permissions, permissionFlags: number): Promise; + revokeUserGrantedPermission(tokenID: int, permissionName: Permissions, permissionFlags: int): Promise; /** * Revoke a specified user_grant permission to the given application. * * @permission ohos.permission.REVOKE_SENSITIVE_PERMISSIONS - * @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 revoked. - * @param { number } permissionFlags - Flags of permission state. This parameter can be 1 or 2 or 64. + * @param { int } permissionFlags - Flags of permission state. This parameter can be 1 or 2 or 64. * @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.REVOKE_SENSITIVE_PERMISSIONS". @@ -382,9 +391,9 @@ declare namespace abilityAccessCtrl { * @since 8 */ revokeUserGrantedPermission( - tokenID: number, + tokenID: int, permissionName: Permissions, - permissionFlags: number, + permissionFlags: int, callback: AsyncCallback ): void; @@ -392,9 +401,9 @@ declare namespace abilityAccessCtrl { * Queries specified permission flags of the given application. * * @permission ohos.permission.GET_SENSITIVE_PERMISSIONS or ohos.permission.GRANT_SENSITIVE_PERMISSIONS or ohos.permission.REVOKE_SENSITIVE_PERMISSIONS - * @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 get. - * @returns { Promise } Return permission flags. + * @returns { Promise } Return permission flags. * @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 specified below. * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. @@ -407,7 +416,7 @@ declare namespace abilityAccessCtrl { * @systemapi * @since 8 */ - getPermissionFlags(tokenID: number, permissionName: Permissions): Promise; + getPermissionFlags(tokenID: int, permissionName: Permissions): Promise; /** * Set the toggle status of one permission flag. @@ -450,19 +459,19 @@ declare namespace abilityAccessCtrl { /** * Queries permission management version. * - * @returns { Promise } Return permission version. + * @returns { Promise } Return permission version. * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - getVersion(): Promise; + getVersion(): Promise; /** * Queries permissions status of the given application. * * @permission ohos.permission.GET_SENSITIVE_PERMISSIONS - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Array } permissionList - Indicates the list of permissions to be queried. This parameter cannot be null or empty. * @returns { Promise> } Return permission status. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -475,14 +484,14 @@ declare namespace abilityAccessCtrl { * @systemapi * @since 12 */ - getPermissionsStatus(tokenID: number, permissionList: Array): Promise>; + getPermissionsStatus(tokenID: int, permissionList: Array): Promise>; /** * Registers a permission state callback so that the application can be notified upon specified permission state of specified applications changes. * * @permission ohos.permission.GET_SENSITIVE_PERMISSIONS * @param { 'permissionStateChange' } type - Event type. - * @param { Array } tokenIDList - A list of permissions that specify the permissions to be listened on. The value in the list can be: + * @param { Array } tokenIDList - A list of permissions that specify the permissions to be listened on. The value in the list can be: *
{@code empty} - Indicates that the application can be notified if the specified permission state of any applications changes. *
{@code non-empty} - Indicates that the application can only be notified if the specified permission state of the specified applications change. * @param { Array } permissionList - A list of permissions that specify the permissions to be listened on. The value in the list can be: @@ -504,7 +513,7 @@ declare namespace abilityAccessCtrl { */ on( type: 'permissionStateChange', - tokenIDList: Array, + tokenIDList: Array, permissionList: Array, callback: Callback ): void; @@ -542,7 +551,7 @@ declare namespace abilityAccessCtrl { * * @permission ohos.permission.GET_SENSITIVE_PERMISSIONS * @param { 'permissionStateChange' } type - Event type. - * @param { Array } tokenIDList - A list of permissions that specify the permissions to be listened on. + * @param { Array } tokenIDList - 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 { 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". @@ -560,7 +569,7 @@ declare namespace abilityAccessCtrl { */ off( type: 'permissionStateChange', - tokenIDList: Array, + tokenIDList: Array, permissionList: Array, callback?: Callback ): void; @@ -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>; @@ -627,7 +637,7 @@ declare namespace abilityAccessCtrl { /** * Starts the permission manager page of an application. * - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. * @throws { BusinessError } 12100002 - The specified tokenID does not exist. @@ -637,7 +647,7 @@ declare namespace abilityAccessCtrl { * @stagemodelonly * @since 18 */ - requestPermissionOnApplicationSetting(tokenID: number): Promise; + requestPermissionOnApplicationSetting(tokenID: int): Promise; /** * Queries permission status of the application synchronously. @@ -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 } @@ -727,7 +740,7 @@ declare namespace abilityAccessCtrl { /** * Enum for permission state change type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Security.AccessToken * @atomicservice * @since 18 @@ -754,7 +767,7 @@ declare namespace abilityAccessCtrl { /** * Enum for permission request toggle status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 12 @@ -801,12 +814,12 @@ declare namespace abilityAccessCtrl { /** * Indicates the application whose permission state has been changed. * - * @type { number } + * @type { int } * @syscap SystemCapability.Security.AccessToken * @atomicservice * @since 18 */ - tokenID: number; + tokenID: int; /** * Indicates the permission whose state has been changed. @@ -822,7 +835,7 @@ declare namespace abilityAccessCtrl { /** * PermissionStatus. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Security.AccessToken * @atomicservice * @since 20 @@ -873,7 +886,7 @@ declare namespace abilityAccessCtrl { /** * SwitchType. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Security.AccessToken * @atomicservice * @since 12 @@ -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..45a5ff46c8b557a681328a61e60985ee8ad9ee31 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. * @@ -375,7 +378,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 +397,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 +417,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 +431,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 +443,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..d85f0d6573772c9b63754f9e64162b1377c0d47f 100644 --- a/api/@ohos.accessibility.d.ts +++ b/api/@ohos.accessibility.d.ts @@ -1116,7 +1116,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 +1315,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; @@ -1385,7 +1385,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; @@ -1513,7 +1514,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. @@ -1733,8 +1734,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 +1787,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 +1795,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 +1803,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 +1811,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 +1819,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..36be5ec3bfc2b39dcb636eef7e5c146b83059661 100644 --- a/api/@ohos.account.appAccount.d.ts +++ b/api/@ohos.account.appAccount.d.ts @@ -556,7 +556,8 @@ declare namespace appAccount { * @syscap SystemCapability.Account.AppAccount * @since 9 */ - setCredential(name: string, credentialType: string, credential: string, callback: AsyncCallback): void; + setCredential(name: string, credentialType: string, credential: string, + callback: AsyncCallback): void; /** * Sets the credential for this application account. @@ -1670,12 +1671,7 @@ declare namespace appAccount { * @syscap SystemCapability.Account.AppAccount * @since 9 */ - checkAuthTokenVisibility( - name: string, - authType: string, - bundleName: string, - callback: AsyncCallback - ): void; + checkAuthTokenVisibility(name: string, authType: string, bundleName: string, callback: AsyncCallback): void; /** * Checks the auth token visibility of the specified authentication type for a third-party application. @@ -2245,20 +2241,20 @@ declare namespace appAccount { /** * The icon id of an authenticator. * - * @type { number } + * @type { long } * @syscap SystemCapability.Account.AppAccount * @since 8 */ - iconId: number; + iconId: long; /** * The label id of an authenticator. * - * @type { number } + * @type { long } * @syscap SystemCapability.Account.AppAccount * @since 8 */ - labelId: number; + labelId: long; } /** @@ -2827,7 +2823,7 @@ declare namespace appAccount { * @syscap SystemCapability.Account.AppAccount * @since 9 */ - onResult: (code: number, result?: AuthResult) => void; + onResult: (code: int, result?: AuthResult) => void; /** * Notifies the client that the authentication request need to be redirected. diff --git a/api/@ohos.account.distributedAccount.d.ts b/api/@ohos.account.distributedAccount.d.ts index 1ad094694a3eaba5f3bc54147584c02da4b06cff..88d87d6fdf8a2661adfc9f1b85cb439ccaa93009 100644 --- a/api/@ohos.account.distributedAccount.d.ts +++ b/api/@ohos.account.distributedAccount.d.ts @@ -25,7 +25,8 @@ import type { AsyncCallback } from './@ohos.base'; * * @namespace distributedAccount * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace distributedAccount { /** @@ -33,7 +34,8 @@ declare namespace distributedAccount { * * @returns { DistributedAccountAbility } Ability to manage operations of distributed account. * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDistributedAccountAbility(): DistributedAccountAbility; @@ -42,7 +44,8 @@ declare namespace distributedAccount { * * @interface DistributedAccountAbility * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ interface DistributedAccountAbility { /** @@ -79,7 +82,8 @@ declare namespace distributedAccount { *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - System service exception. * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getOsAccountDistributedInfo(callback: AsyncCallback): void; @@ -91,7 +95,8 @@ declare namespace distributedAccount { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 12300001 - System service exception. * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getOsAccountDistributedInfo(): Promise; @@ -99,37 +104,67 @@ declare namespace distributedAccount { * Gets the distributed information of the specified OS account. * * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the specified OS account. + * @param { int } 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 } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2. Incorrect parameter types. + *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - System service exception. * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. * @since 10 */ - getOsAccountDistributedInfoByLocalId(localId: number, callback: AsyncCallback): void; + /** + * 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 { int } 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: int, callback: AsyncCallback): void; /** * Gets the distributed information of the specified OS account. * * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the specified OS account. + * @param { int } 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 } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2. Incorrect parameter types. + *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - System service exception. * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. * @since 10 */ - getOsAccountDistributedInfoByLocalId(localId: number): Promise; + /** + * 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 { int } 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: int): Promise; /** * Updates the distributed information of the OS account. @@ -164,7 +199,7 @@ declare namespace distributedAccount { * @param { DistributedInfo } accountInfo - Indicates the information of the OS account used for a distributed system. * @param { AsyncCallback } callback - Asynchronous callback interface. * @throws { BusinessError } 201 - Permission denied. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - System service exception. * @throws { BusinessError } 12300002 - Invalid accountInfo. @@ -197,7 +232,7 @@ declare namespace distributedAccount { * Sets the distributed information of the specified OS account. * * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { DistributedInfo } distributedInfo - Indicates the distributed information. * @param { AsyncCallback } callback - Asynchronous callback interface. * @throws { BusinessError } 201 - Permission denied. @@ -212,17 +247,13 @@ declare namespace distributedAccount { * @systemapi Hide this for inner system use. * @since 10 */ - setOsAccountDistributedInfoByLocalId( - localId: number, - distributedInfo: DistributedInfo, - callback: AsyncCallback - ): void; + setOsAccountDistributedInfoByLocalId(localId: int, distributedInfo: DistributedInfo, callback: AsyncCallback): void; /** * Sets the distributed information of the specified OS account. * * @permission ohos.permission.MANAGE_DISTRIBUTED_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { DistributedInfo } distributedInfo - Indicates the distributed information. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. @@ -237,22 +268,24 @@ declare namespace distributedAccount { * @systemapi Hide this for inner system use. * @since 10 */ - setOsAccountDistributedInfoByLocalId(localId: number, distributedInfo: DistributedInfo): Promise; + setOsAccountDistributedInfoByLocalId(localId: int, distributedInfo: DistributedInfo): Promise; } /** * Enum for distributed account status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Account.OsAccount - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enum DistributedAccountStatus { /** * Indicates that the account is not logged in. * * @syscap SystemCapability.Account.OsAccount - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ NOT_LOGGED_IN = 0, @@ -260,7 +293,8 @@ declare namespace distributedAccount { * Indicates that the account is logged in. * * @syscap SystemCapability.Account.OsAccount - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ LOGGED_IN = 1 } @@ -270,7 +304,8 @@ declare namespace distributedAccount { * * @interface DistributedInfo * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ interface DistributedInfo { /** @@ -278,7 +313,8 @@ declare namespace distributedAccount { * * @type { string } * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -287,7 +323,8 @@ declare namespace distributedAccount { * * @type { string } * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ id: string; @@ -296,7 +333,8 @@ declare namespace distributedAccount { * * @type { string } * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ event: string; @@ -305,7 +343,8 @@ declare namespace distributedAccount { * * @type { ?string } * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ nickname?: string; @@ -314,7 +353,8 @@ declare namespace distributedAccount { * * @type { ?string } * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ avatar?: string; @@ -324,7 +364,8 @@ declare namespace distributedAccount { * @type { ?DistributedAccountStatus } * @readonly * @syscap SystemCapability.Account.OsAccount - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly status?: DistributedAccountStatus; @@ -333,10 +374,11 @@ declare namespace distributedAccount { * * @type { ?object } * @syscap SystemCapability.Account.OsAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ scalableData?: object; } } -export default distributedAccount; \ No newline at end of file +export default distributedAccount; diff --git a/api/@ohos.account.osAccount.d.ts b/api/@ohos.account.osAccount.d.ts index 662dd6b646ac892f76e29f6c3fe89d17a7a9dba7..7a2e2f67ac7211d87aee59c0136b54c62957533b 100644 --- a/api/@ohos.account.osAccount.d.ts +++ b/api/@ohos.account.osAccount.d.ts @@ -26,7 +26,8 @@ import type { AsyncCallback, Callback } from './@ohos.base'; * * @namespace osAccount * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace osAccount { /** @@ -34,7 +35,8 @@ declare namespace osAccount { * * @returns { AccountManager } Returns the instance of the AccountManager. * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAccountManager(): AccountManager; @@ -43,7 +45,8 @@ declare namespace osAccount { * * @interface AccountManager * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ interface AccountManager { /** @@ -55,7 +58,7 @@ declare namespace osAccount { *

* * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { AsyncCallback } callback - Asynchronous callback interface. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -79,7 +82,7 @@ declare namespace osAccount { *

* * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { AsyncCallback } callback - Asynchronous callback interface. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -93,9 +96,10 @@ declare namespace osAccount { * @throws { BusinessError } 12300016 - The number of logged in accounts reaches the upper limit. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - activateOsAccount(localId: number, callback: AsyncCallback): void; + activateOsAccount(localId: int, callback: AsyncCallback): void; /** * Activates a specified OS account. @@ -106,7 +110,7 @@ declare namespace osAccount { *

* * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -130,7 +134,7 @@ declare namespace osAccount { *

* * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -144,15 +148,16 @@ declare namespace osAccount { * @throws { BusinessError } 12300016 - The number of logged in accounts reaches the upper limit. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - activateOsAccount(localId: number): Promise; + activateOsAccount(localId: int): Promise; /** * Deactivates a specified OS account. * * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -164,9 +169,10 @@ declare namespace osAccount { * @throws { BusinessError } 12300010 - Service busy. Possible causes: The target account is being operated. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - deactivateOsAccount(localId: number): Promise; + deactivateOsAccount(localId: int): Promise; /** * Checks whether the function of supporting multiple OS accounts is enabled. @@ -278,7 +284,7 @@ declare namespace osAccount { * Checks whether an OS account is activated based on its local ID. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @returns { Promise } - Returns {@code true} if the OS account is activated; returns {@code false} otherwise. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -290,7 +296,7 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 11 */ - isOsAccountActivated(localId: number): Promise; + isOsAccountActivated(localId: int): Promise; /** * Checks whether a constraint has been enabled for an OS account based on its local ID. @@ -401,7 +407,7 @@ declare namespace osAccount { * Checks whether the given constraint is enabled for the specified OS account. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { string } constraint - Indicates the constraint to check. For example: the value can be: *
{@code constraint.wifi.set} - Indicates the constraint on configuring the Wi-Fi access point. *
{@code constraint.sms.use} - Indicates the constraint on sending and receiving short messages. @@ -419,7 +425,7 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 11 */ - isOsAccountConstraintEnabled(localId: number, constraint: string): Promise; + isOsAccountConstraintEnabled(localId: int, constraint: string): Promise; /** * Checks whether this OS account is a test OS account. @@ -572,7 +578,8 @@ declare namespace osAccount { * @returns { Promise } Returns whether the current OS account is unlocked. * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isOsAccountUnlocked(): Promise; @@ -580,7 +587,7 @@ declare namespace osAccount { * Checks whether the specified OS account is unlocked. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @returns { Promise } Returns whether the specified OS account is unlocked. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -590,15 +597,16 @@ declare namespace osAccount { * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - isOsAccountUnlocked(localId: number): Promise; + isOsAccountUnlocked(localId: int): Promise; /** * Removes an OS account based on its local ID. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { AsyncCallback } callback - Indicates the callback for removing the specified OS account. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -613,13 +621,13 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 7 */ - removeOsAccount(localId: number, callback: AsyncCallback): void; + removeOsAccount(localId: int, callback: AsyncCallback): void; /** * Removes an OS account based on its local ID. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -634,13 +642,13 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 7 */ - removeOsAccount(localId: number): Promise; + removeOsAccount(localId: int): Promise; /** * Sets constraints for an OS account based on its local ID. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { Array } constraints - Indicates the constraints to set for the OS account. The value can be: *
{@code constraint.wifi.set} - Indicates the constraint on configuring the Wi-Fi access point. *
{@code constraint.sms.use} - Indicates the constraint on sending and receiving short messages. @@ -661,18 +669,14 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 7 */ - setOsAccountConstraints( - localId: number, - constraints: Array, - enable: boolean, - callback: AsyncCallback - ): void; + setOsAccountConstraints(localId: int, constraints: Array, enable: boolean, + callback: AsyncCallback): void; /** * Sets constraints for an OS account based on its local ID. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { Array } constraints - Indicates the constraints to set for the OS account. The value can be: *
{@code constraint.wifi.set} - Indicates the constraint on configuring the Wi-Fi access point. *
{@code constraint.sms.use} - Indicates the constraint on sending and receiving short messages. @@ -693,13 +697,13 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 7 */ - setOsAccountConstraints(localId: number, constraints: Array, enable: boolean): Promise; + setOsAccountConstraints(localId: int, constraints: Array, enable: boolean): Promise; /** * Sets the local name for an OS account based on its local ID. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { string } localName - Indicates the local name to set for the OS account. * @param { AsyncCallback } callback - Indicates the callback for setting the specified OS account name. * @throws { BusinessError } 201 - Permission denied. @@ -714,13 +718,13 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 7 */ - setOsAccountName(localId: number, localName: string, callback: AsyncCallback): void; + setOsAccountName(localId: int, localName: string, callback: AsyncCallback): void; /** * Sets the local name for an OS account based on its local ID. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { string } localName - Indicates the local name to set for the OS account. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. @@ -735,7 +739,7 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 7 */ - setOsAccountName(localId: number, localName: string): Promise; + setOsAccountName(localId: int, localName: string): Promise; /** * Gets the name of the OS account to which the caller belongs. @@ -775,7 +779,7 @@ declare namespace osAccount { * Obtains the number of all OS accounts created on a device. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @param { AsyncCallback } callback - Returns the number of created OS accounts. + * @param { AsyncCallback } callback - Returns the number of created OS accounts. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. @@ -784,20 +788,20 @@ declare namespace osAccount { * This API can be called only by system applications. * @since 9 */ - getOsAccountCount(callback: AsyncCallback): void; + getOsAccountCount(callback: AsyncCallback): void; /** * Obtains the number of all OS accounts created on a device. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @returns { Promise } Returns the number of created OS accounts. + * @returns { Promise } Returns the number of created OS accounts. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount * This API can be called only by system applications. * @since 9 */ - getOsAccountCount(): Promise; + getOsAccountCount(): Promise; /** * Obtains the local ID of an OS account from the current process UID. @@ -824,24 +828,26 @@ declare namespace osAccount { /** * Gets the local ID of the current OS account. * - * @param { AsyncCallback } callback - Indicates the callback for getting the local ID of the current OS account. + * @param { AsyncCallback } callback - Indicates the callback for getting the local ID of the current OS account. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - getOsAccountLocalId(callback: AsyncCallback): void; + getOsAccountLocalId(callback: AsyncCallback): void; /** * Get the local ID of the current OS account. * - * @returns { Promise } Returns the local ID of the current account. + * @returns { Promise } Returns the local ID of the current account. * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - getOsAccountLocalId(): Promise; + getOsAccountLocalId(): Promise; /** * Gets the local ID of an OS account from the process UID @@ -870,43 +876,46 @@ declare namespace osAccount { /** * Gets the local ID of the OS account associated with the specified UID. * - * @param { number } uid - Indicates the process UID. - * @param { AsyncCallback } callback - Indicates the callback for getting the local ID of the OS account associated with the specified UID. + * @param { int } uid - Indicates the process UID. + * @param { AsyncCallback } callback - Indicates the callback for getting the local ID of the OS account associated with the specified UID. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - The system service works abnormally. * @throws { BusinessError } 12300002 - Invalid uid. * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - getOsAccountLocalIdForUid(uid: number, callback: AsyncCallback): void; + getOsAccountLocalIdForUid(uid: int, callback: AsyncCallback): void; /** * Get the local ID of the OS account associated with the specified UID. * - * @param { number } uid - Indicates the process UID. - * @returns { Promise } - Returns the local ID of the OS account associated with the specified UID. + * @param { int } uid - Indicates the process UID. + * @returns { Promise } - Returns the local ID of the OS account associated with the specified UID. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - The system service works abnormally. * @throws { BusinessError } 12300002 - Invalid uid. * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - getOsAccountLocalIdForUid(uid: number): Promise; + getOsAccountLocalIdForUid(uid: int): Promise; /** * Gets the local ID of the OS account associated with the specified UID synchronously. * - * @param { number } uid - Indicates the process UID. - * @returns { number } Returns the local ID of the OS account associated with the specified UID. + * @param { int } uid - Indicates the process UID. + * @returns { int } Returns the local ID of the OS account associated with the specified UID. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @throws { BusinessError } 12300002 - Invalid uid. * @syscap SystemCapability.Account.OsAccount - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - getOsAccountLocalIdForUidSync(uid: number): number; + getOsAccountLocalIdForUidSync(uid: int): int; /** * Queries the local ID of an OS account which is bound to the specified domain account. @@ -939,7 +948,7 @@ declare namespace osAccount { * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param { DomainAccountInfo } domainInfo - Indicates the domain account info. - * @param { AsyncCallback } callback - Indicates the callback for + * @param { AsyncCallback } callback - Indicates the callback for * getting the local ID of the OS account associated with the specified domain account. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. @@ -950,14 +959,14 @@ declare namespace osAccount { * This API can be called only by system applications. * @since 9 */ - getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback): void; + getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo, callback: AsyncCallback): void; /** * Gets the local ID of the OS account associated with the specified domain account. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS * @param { DomainAccountInfo } domainInfo - Indicates the domain account info. - * @returns { Promise } Returns the local ID of the OS account associated with the specified domain account. + * @returns { Promise } Returns the local ID of the OS account associated with the specified domain account. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. @@ -967,12 +976,12 @@ declare namespace osAccount { * This API can be called only by system applications. * @since 9 */ - getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo): Promise; + getOsAccountLocalIdForDomain(domainInfo: DomainAccountInfo): Promise; /** * Queries the maximum number of OS accounts that can be created on a device. * - * @param { AsyncCallback } callback - Returns the maximum number of OS accounts that can be created. + * @param { AsyncCallback } callback - Returns the maximum number of OS accounts that can be created. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. @@ -981,31 +990,32 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 7 */ - queryMaxOsAccountNumber(callback: AsyncCallback): void; + queryMaxOsAccountNumber(callback: AsyncCallback): void; /** * Queries the maximum number of OS accounts that can be created on a device. * - * @returns { Promise } Returns the maximum number of OS accounts that can be created. + * @returns { Promise } Returns the maximum number of OS accounts that can be created. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. * @since 7 */ - queryMaxOsAccountNumber(): Promise; + queryMaxOsAccountNumber(): Promise; /** * Queries the maximum number of OS accounts that can be logged in. * - * @returns { Promise } Returns the maximum number of OS accounts that can be logged in. + * @returns { Promise } Returns the maximum number of OS accounts that can be logged in. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - queryMaxLoggedInOsAccountNumber(): Promise; + queryMaxLoggedInOsAccountNumber(): Promise; /** * Obtains all constraints of an OS account based on its local ID. @@ -1073,7 +1083,7 @@ declare namespace osAccount { * Gets all enabled constraints of the specified OS account by its local ID. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @returns { Promise> } Returns a list of constraints. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -1085,7 +1095,7 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 11 */ - getEnabledOsAccountConstraints(localId: number): Promise>; + getEnabledOsAccountConstraints(localId: int): Promise>; /** * Queries the list of all the OS accounts that have been created in the system. @@ -1099,7 +1109,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ queryAllCreatedOsAccounts(callback: AsyncCallback>): void; @@ -1113,7 +1124,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ queryAllCreatedOsAccounts(): Promise>; @@ -1142,34 +1154,37 @@ declare namespace osAccount { /** * Gets the local IDs of all activated OS accounts. * - * @param { AsyncCallback> } callback - Indicates the callback for getting the local IDs of all activated OS accounts. + * @param { AsyncCallback> } callback - Indicates the callback for getting the local IDs of all activated OS accounts. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - getActivatedOsAccountLocalIds(callback: AsyncCallback>): void; + getActivatedOsAccountLocalIds(callback: AsyncCallback>): void; /** * Gets the local IDs of all activated OS accounts. * - * @returns { Promise> } Returns all activated accounts. + * @returns { Promise> } Returns all activated accounts. * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - getActivatedOsAccountLocalIds(): Promise>; + getActivatedOsAccountLocalIds(): Promise>; /** * Gets the local ID of the foreground OS account. * - * @returns { Promise } Returns local ID of the foreground OS account. + * @returns { Promise } Returns local ID of the foreground OS account. * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - getForegroundOsAccountLocalId(): Promise; + getForegroundOsAccountLocalId(): Promise; /** * Creates an OS account using the local name and account type. @@ -1212,7 +1227,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300007 - The number of accounts has reached the upper limit. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ createOsAccount(localName: string, type: OsAccountType, callback: AsyncCallback): void; @@ -1259,7 +1275,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300015 - The short name already exists. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ createOsAccount(localName: string, type: OsAccountType, options?: CreateOsAccountOptions): Promise; @@ -1449,7 +1466,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ queryOsAccount(): Promise; @@ -1457,7 +1475,7 @@ declare namespace osAccount { * Queries OS account information based on the local ID. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { AsyncCallback } callback - Returns the OS account information; returns {@code null} if the query fails. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -1468,15 +1486,16 @@ declare namespace osAccount { * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ - queryOsAccountById(localId: number, callback: AsyncCallback): void; + queryOsAccountById(localId: int, callback: AsyncCallback): void; /** * Queries OS account information based on the local ID. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @returns { Promise } Returns the OS account information; returns {@code null} if the query fails. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -1487,15 +1506,16 @@ declare namespace osAccount { * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ - queryOsAccountById(localId: number): Promise; + queryOsAccountById(localId: int): Promise; /** * Gets the domain account information associated with the specified OS account. * * @permission ohos.permission.GET_DOMAIN_ACCOUNTS and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the specified OS account. + * @param { int } localId - Indicates the local ID of the specified OS account. * @returns { Promise } Returns the domain account information. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. @@ -1505,7 +1525,7 @@ declare namespace osAccount { * @syscap SystemCapability.Account.OsAccount * @since 15 */ - getOsAccountDomainInfo(localId: number): Promise; + getOsAccountDomainInfo(localId: int): Promise; /** * Obtains the type of this OS account from the current process. @@ -1540,7 +1560,8 @@ declare namespace osAccount { *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getOsAccountType(callback: AsyncCallback): void; @@ -1551,7 +1572,8 @@ declare namespace osAccount { * {@link OsAccountType#NORMAL}, and {@link OsAccountType#GUEST}. * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getOsAccountType(): Promise; @@ -1559,7 +1581,7 @@ declare namespace osAccount { * Gets the type of the specified OS account. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @returns { Promise } Returns the OS account type. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -1569,9 +1591,10 @@ declare namespace osAccount { * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - getOsAccountType(localId: number): Promise; + getOsAccountType(localId: int): Promise; /** * Obtains the distributed virtual device ID (DVID). @@ -1651,7 +1674,7 @@ declare namespace osAccount { * Obtains the profile photo of an OS account based on its local ID. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { AsyncCallback } callback - Returns the profile photo if obtained; * returns {@code null} if the profile photo fails to be obtained. * @throws { BusinessError } 201 - Permission denied. @@ -1663,15 +1686,16 @@ declare namespace osAccount { * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ - getOsAccountProfilePhoto(localId: number, callback: AsyncCallback): void; + getOsAccountProfilePhoto(localId: int, callback: AsyncCallback): void; /** * Obtains the profile photo of an OS account based on its local ID. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @returns { Promise } Returns the profile photo if obtained; * returns {@code null} if the profile photo fails to be obtained. * @throws { BusinessError } 201 - Permission denied. @@ -1683,15 +1707,16 @@ declare namespace osAccount { * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ - getOsAccountProfilePhoto(localId: number): Promise; + getOsAccountProfilePhoto(localId: int): Promise; /** * Sets the profile photo for an OS account based on its local ID. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { string } photo - Indicates the profile photo to set for the OS account. * @param { AsyncCallback } callback - Asynchronous callback interface. * @throws { BusinessError } 201 - Permission denied. @@ -1706,13 +1731,13 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 7 */ - setOsAccountProfilePhoto(localId: number, photo: string, callback: AsyncCallback): void; + setOsAccountProfilePhoto(localId: int, photo: string, callback: AsyncCallback): void; /** * Sets the profile photo for an OS account based on its local ID. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { string } photo - Indicates the profile photo to set for the OS account. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. @@ -1727,7 +1752,7 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 7 */ - setOsAccountProfilePhoto(localId: number, photo: string): Promise; + setOsAccountProfilePhoto(localId: int, photo: string): Promise; /** * Obtain localId according to serial number @@ -1756,8 +1781,8 @@ declare namespace osAccount { /** * Gets the local ID of the OS account associated with the serial number. * - * @param { number } serialNumber - Indicates serial number. - * @param { AsyncCallback } callback - Indicates the callback for getting the local ID of the OS account associated with the serial number. + * @param { long } serialNumber - Indicates serial number. + * @param { AsyncCallback } callback - Indicates the callback for getting the local ID of the OS account associated with the serial number. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - The system service works abnormally. @@ -1766,13 +1791,13 @@ declare namespace osAccount { * @syscap SystemCapability.Account.OsAccount * @since 9 */ - getOsAccountLocalIdForSerialNumber(serialNumber: number, callback: AsyncCallback): void; + getOsAccountLocalIdForSerialNumber(serialNumber: long, callback: AsyncCallback): void; /** * Gets the local ID of the OS account associated with the serial number. * - * @param { number } serialNumber - Indicates serial number. - * @returns { Promise } Returns the local ID of the OS account associated with the serial number. + * @param { long } serialNumber - Indicates serial number. + * @returns { Promise } Returns the local ID of the OS account associated with the serial number. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - The system service works abnormally. @@ -1781,7 +1806,7 @@ declare namespace osAccount { * @syscap SystemCapability.Account.OsAccount * @since 9 */ - getOsAccountLocalIdForSerialNumber(serialNumber: number): Promise; + getOsAccountLocalIdForSerialNumber(serialNumber: long): Promise; /** * Obtain serial number according to localId. @@ -1810,8 +1835,8 @@ declare namespace osAccount { /** * Gets the serial number for the specified os account local id. * - * @param { number } localId - Indicates the local ID of the OS account. - * @param { AsyncCallback } callback - Indicates the callback for getting the serial number for the specified os account local id. + * @param { int } localId - Indicates the local ID of the OS account. + * @param { AsyncCallback } callback - Indicates the callback for getting the serial number for the specified os account local id. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - The system service works abnormally. @@ -1820,13 +1845,13 @@ declare namespace osAccount { * @syscap SystemCapability.Account.OsAccount * @since 9 */ - getSerialNumberForOsAccountLocalId(localId: number, callback: AsyncCallback): void; + getSerialNumberForOsAccountLocalId(localId: int, callback: AsyncCallback): void; /** * Gets the serial number for the specified os account local id. * - * @param { number } localId - Indicates the local ID of the OS account. - * @returns { Promise } Returns the serial number according to local ID. + * @param { int } localId - Indicates the local ID of the OS account. + * @returns { Promise } Returns the serial number according to local ID. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @throws { BusinessError } 12300001 - The system service works abnormally. @@ -1835,7 +1860,7 @@ declare namespace osAccount { * @syscap SystemCapability.Account.OsAccount * @since 9 */ - getSerialNumberForOsAccountLocalId(localId: number): Promise; + getSerialNumberForOsAccountLocalId(localId: int): Promise; /** * Subscribes to the change events of accounts. @@ -1846,7 +1871,7 @@ declare namespace osAccount { * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION * @param { 'activate' | 'activating' } type - Event type. * @param { string } name - Indicates the name of subscriber. - * @param { Callback } callback - Asynchronous callback interface. + * @param { Callback } callback - Asynchronous callback interface. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. @@ -1855,9 +1880,10 @@ declare namespace osAccount { * @throws { BusinessError } 12300002 - Invalid type or name. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'activate' | 'activating', name: string, callback: Callback): void; + on(type: 'activate' | 'activating', name: string, callback: Callback): void; /** * Unsubscribes from account events. @@ -1865,7 +1891,7 @@ declare namespace osAccount { * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS_EXTENSION * @param { 'activate' | 'activating' } type - Event type. * @param { string } name - Indicates the name of subscriber. - * @param { Callback } callback - Asynchronous callback interface. + * @param { Callback } callback - Asynchronous callback interface. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. @@ -1874,9 +1900,10 @@ declare namespace osAccount { * @throws { BusinessError } 12300002 - Invalid type or name. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'activate' | 'activating', name: string, callback?: Callback): void; + off(type: 'activate' | 'activating', name: string, callback?: Callback): void; /** * Subscribes to the OS account switching event. @@ -1892,7 +1919,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300002 - Invalid type. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'switching', callback: Callback): void; @@ -1910,7 +1938,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300002 - Invalid type. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'switching', callback?: Callback): void; @@ -1928,7 +1957,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300002 - Invalid type. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'switched', callback: Callback): void; @@ -1946,15 +1976,16 @@ declare namespace osAccount { * @throws { BusinessError } 12300002 - Invalid type. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'switched', callback?: Callback): void; /** * Gets the bundle ID associated with the specified UID. * - * @param { number } uid - Indicates the target uid. - * @param { AsyncCallback } callback - Indicates the callback for getting the bundle ID associated with the specified UID. + * @param { int } uid - Indicates the target uid. + * @param { AsyncCallback } callback - Indicates the callback for getting the bundle ID associated with the specified UID. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. @@ -1964,13 +1995,13 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 9 */ - getBundleIdForUid(uid: number, callback: AsyncCallback): void; + getBundleIdForUid(uid: int, callback: AsyncCallback): void; /** * Gets the bundle ID associated with the specified UID. * - * @param { number } uid - Indicates the target uid. - * @returns { Promise } Returns the bundle ID associated with the specified UID. + * @param { int } uid - Indicates the target uid. + * @returns { Promise } Returns the bundle ID associated with the specified UID. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. @@ -1980,13 +2011,13 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 9 */ - getBundleIdForUid(uid: number): Promise; + getBundleIdForUid(uid: int): Promise; /** * Gets the bundle ID associated with the specified UID synchronously. * - * @param { number } uid - Indicates the target uid. - * @returns { number } Returns the bundle ID associated with the specified UID. + * @param { int } uid - Indicates the target uid. + * @returns { int } Returns the bundle ID associated with the specified UID. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. @@ -1995,7 +2026,7 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 10 */ - getBundleIdForUidSync(uid: number): number; + getBundleIdForUidSync(uid: int): int; /** * Check whether current process belongs to the main account. @@ -2010,7 +2041,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ isMainOsAccount(callback: AsyncCallback): void; @@ -2025,7 +2057,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ isMainOsAccount(): Promise; @@ -2033,7 +2066,7 @@ declare namespace osAccount { * Gets a list of constraint source types for the specified os account. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { string } constraint - Indicates the constraint to query the source type. * @param { AsyncCallback> } callback - Indicates the callback for * getting a list of constraint source types for the specified os account. @@ -2048,17 +2081,13 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 9 */ - getOsAccountConstraintSourceTypes( - localId: number, - constraint: string, - callback: AsyncCallback> - ): void; + getOsAccountConstraintSourceTypes(localId: int, constraint: string, callback: AsyncCallback>): void; /** * Gets a list of constraint source types for the specified os account. * * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { string } constraint - Indicates the constraint to query the source type. * @returns { Promise> } Returns a list of constraint source types for the specified os account. * @throws { BusinessError } 201 - Permission denied. @@ -2072,30 +2101,7 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 9 */ - getOsAccountConstraintSourceTypes(localId: number, constraint: string): Promise>; - - /** - * Binds the specified domain account to the target OS account. - * - * @permission ohos.permission.MANAGE_LOCAL_ACCOUNTS - * @param { number } localId - Indicates the local Id of the OS account. - * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information. - * @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 } 12300002 - Invalid domain account information. - * @throws { BusinessError } 12300003 - The OS account not found. - * @throws { BusinessError } 12300008 - Restricted OS account. Possible causes: The OS account cannot be bound. - * @throws { BusinessError } 12300010 - Service busy. Possible causes: The target OS account or domain account is being operated. - * @throws { BusinessError } 12300021 - The OS account is already bound. - * @throws { BusinessError } 12300022 - The domain account is already bound. - * @syscap SystemCapability.Account.OsAccount - * @systemapi - * @since 20 - */ - bindDomainAccount(localId: number, domainAccountInfo: DomainAccountInfo): Promise; + getOsAccountConstraintSourceTypes(localId: int, constraint: string): Promise>; } /** @@ -2103,24 +2109,27 @@ declare namespace osAccount { * * @interface OsAccountInfo * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ interface OsAccountInfo { /** * The local ID of an OS account. * - * @type { number } + * @type { int } * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ - localId: number; + localId: int; /** * The local name of an OS account. * * @type { string } * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ localName: string; @@ -2130,7 +2139,8 @@ declare namespace osAccount { * @type { ?string } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ shortName?: string; @@ -2139,7 +2149,8 @@ declare namespace osAccount { * * @type { OsAccountType } * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ type: OsAccountType; @@ -2148,7 +2159,8 @@ declare namespace osAccount { * * @type { Array } * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ constraints: Array; @@ -2168,7 +2180,8 @@ declare namespace osAccount { * * @type { boolean } * @syscap SystemCapability.Account.OsAccount - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isUnlocked: boolean; @@ -2177,36 +2190,40 @@ declare namespace osAccount { * * @type { string } * @syscap SystemCapability.Account.OsAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ photo: string; /** * Os account create time. * - * @type { number } + * @type { long } * @syscap SystemCapability.Account.OsAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - createTime: number; + createTime: long; /** * The last time to log in. * - * @type { number } + * @type { long } * @syscap SystemCapability.Account.OsAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - lastLoginTime: number; + lastLoginTime: long; /** * Os account serial number. * - * @type { number } + * @type { long } * @syscap SystemCapability.Account.OsAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - serialNumber: number; + serialNumber: long; /** * Os account is activated or not. @@ -2224,7 +2241,8 @@ declare namespace osAccount { * * @type { boolean } * @syscap SystemCapability.Account.OsAccount - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isActivated: boolean; @@ -2234,7 +2252,8 @@ declare namespace osAccount { * @type { ?boolean } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ isLoggedIn?: boolean; @@ -2243,7 +2262,8 @@ declare namespace osAccount { * * @type { boolean } * @syscap SystemCapability.Account.OsAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ isCreateCompleted: boolean; @@ -2252,7 +2272,8 @@ declare namespace osAccount { * * @type { distributedAccount.DistributedInfo } * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ distributedInfo: distributedAccount.DistributedInfo; @@ -2261,7 +2282,8 @@ declare namespace osAccount { * * @type { DomainAccountInfo } * @syscap SystemCapability.Account.OsAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ domainInfo: DomainAccountInfo; } @@ -2272,28 +2294,31 @@ declare namespace osAccount { * @typedef OsAccountSwitchEventData * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface OsAccountSwitchEventData { /** * Indicates which OS account to switch from. * - * @type { number } + * @type { int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - fromAccountId: number; + fromAccountId: int; /** * Indicates which OS account to switch to. * - * @type { number } + * @type { int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - toAccountId: number; + toAccountId: int; } /** @@ -2302,7 +2327,8 @@ declare namespace osAccount { * @interface CreateOsAccountOptions * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface CreateOsAccountOptions { /** @@ -2311,7 +2337,8 @@ declare namespace osAccount { * @type { string } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ shortName: string; @@ -2352,7 +2379,8 @@ declare namespace osAccount { * * @interface DomainAccountInfo * @syscap SystemCapability.Account.OsAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface DomainAccountInfo { /** @@ -2360,7 +2388,8 @@ declare namespace osAccount { * * @type { string } * @syscap SystemCapability.Account.OsAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ domain: string; @@ -2369,7 +2398,8 @@ declare namespace osAccount { * * @type { string } * @syscap SystemCapability.Account.OsAccount - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ accountName: string; @@ -2379,7 +2409,8 @@ declare namespace osAccount { * @type { ?string } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ accountId?: string; @@ -2389,7 +2420,8 @@ declare namespace osAccount { * @type { ?boolean } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isAuthenticated?: boolean; @@ -2398,7 +2430,8 @@ declare namespace osAccount { * * @type { ?string } * @syscap SystemCapability.Account.OsAccount - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ serverConfigId?: string; } @@ -2406,16 +2439,18 @@ declare namespace osAccount { /** * Enumerates OS account types. * - * @enum { number } OsAccountType + * @enum { int } OsAccountType * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ enum OsAccountType { /** * Indicates the administrator account, which has the permission to manage other OS accounts. * * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ ADMIN = 0, @@ -2423,7 +2458,8 @@ declare namespace osAccount { * Indicates a normal account, which has access to common functions of OS accounts. * * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 1, @@ -2431,7 +2467,8 @@ declare namespace osAccount { * Indicates a guest account, which is used to temporarily access the device and may be deleted at any time. * * @syscap SystemCapability.Account.OsAccount - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ GUEST = 2, @@ -2440,7 +2477,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PRIVATE = 1024 } @@ -2450,7 +2488,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 * @name UserAuth */ class UserAuth { @@ -2460,20 +2499,21 @@ declare namespace osAccount { * @throws { BusinessError } 202 - Not system application. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); /** * Gets version information. * - * @returns { number } Returns the version information. + * @returns { int } Returns the version information. * @throws { BusinessError } 202 - Not system application. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. * @since 8 */ - getVersion(): number; + getVersion(): int; /** * Checks whether the authentication capability is available. @@ -2481,7 +2521,7 @@ declare namespace osAccount { * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL * @param { AuthType } authType - Indicates the credential type for authentication. * @param { AuthTrustLevel } authTrustLevel - Indicates the trust level of authentication result. - * @returns { number } Returns a status result. + * @returns { int } Returns a status result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. @@ -2492,7 +2532,7 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 8 */ - getAvailableStatus(authType: AuthType, authTrustLevel: AuthTrustLevel): number; + getAvailableStatus(authType: AuthType, authTrustLevel: AuthTrustLevel): int; /** * Gets the property based on the specified request information. @@ -2525,7 +2565,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ getProperty(request: GetPropertyRequest, callback: AsyncCallback): void; @@ -2560,7 +2601,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300003 - Account not found. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ getProperty(request: GetPropertyRequest): Promise; @@ -2598,7 +2640,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300002 - Invalid request. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ setProperty(request: SetPropertyRequest, callback: AsyncCallback): void; @@ -2616,7 +2659,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300002 - Invalid request. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ setProperty(request: SetPropertyRequest): Promise; @@ -2746,6 +2790,7 @@ declare namespace osAccount { * @syscap SystemCapability.Account.OsAccount * @systemapi * @since 20 + * @arkts 1.1&1.2 */ auth( challenge: Uint8Array, @@ -2823,6 +2868,7 @@ declare namespace osAccount { * @syscap SystemCapability.Account.OsAccount * @systemapi * @since 20 + * @arkts 1.1&1.2 */ auth( challenge: Uint8Array, @@ -2836,7 +2882,7 @@ declare namespace osAccount { * Executes user authentication. * * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL - * @param { number } userId - Indicates the user identification. + * @param { int } userId - Indicates the user identification. * @param { Uint8Array } challenge - Indicates the challenge value. * @param { AuthType } authType - Indicates the authentication type. * @param { AuthTrustLevel } authTrustLevel - Indicates the trust level of authentication result. @@ -2864,7 +2910,7 @@ declare namespace osAccount { * Executes user authentication. * * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL - * @param { number } userId - Indicates the user identification. + * @param { int } userId - Indicates the user identification. * @param { Uint8Array } challenge - Indicates the challenge value. * @param { AuthType } authType - Indicates the authentication type. * @param { AuthTrustLevel } authTrustLevel - Indicates the trust level of authentication result. @@ -2898,7 +2944,7 @@ declare namespace osAccount { * Executes user authentication. * * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL - * @param { number } userId - Indicates the user identification. + * @param { int } userId - Indicates the user identification. * @param { Uint8Array } challenge - Indicates the challenge value. * @param { AuthType } authType - Indicates the authentication type. * @param { AuthTrustLevel } authTrustLevel - Indicates the trust level of authentication result. @@ -2931,7 +2977,7 @@ declare namespace osAccount { * @since 20 */ authUser( - userId: number, + userId: int, challenge: Uint8Array, authType: AuthType, authTrustLevel: AuthTrustLevel, @@ -2951,7 +2997,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300002 - Invalid contextId. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ cancelAuth(contextID: Uint8Array): void; } @@ -2961,7 +3008,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 * @name PINAuth */ class PINAuth { @@ -2971,7 +3019,8 @@ declare namespace osAccount { * @throws { BusinessError } 202 - Not system application. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -2989,7 +3038,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300103 - The credential inputer already exists. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ registerInputer(inputer: IInputer): void; @@ -3001,7 +3051,8 @@ declare namespace osAccount { * @throws { BusinessError } 202 - Not system application. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ unregisterInputer(): void; } @@ -3011,7 +3062,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 * @name InputerManager */ class InputerManager { @@ -3032,7 +3084,8 @@ declare namespace osAccount { * @static * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ static registerInputer(authType: AuthType, inputer: IInputer): void; @@ -3049,7 +3102,8 @@ declare namespace osAccount { * @static * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ static unregisterInputer(authType: AuthType): void; } @@ -3066,22 +3120,22 @@ declare namespace osAccount { /** * Indicates the remaining times that authentication can be performed. * - * @type { number } + * @type { int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. * @since 10 */ - remainTimes: number; + remainTimes: int; /** * Indicates the freezing time before performing the next authentication. * - * @type { number } + * @type { int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. * @since 10 */ - freezingTime: number; + freezingTime: int; } /** @@ -3126,12 +3180,12 @@ declare namespace osAccount { /** * Indicates caller UID. * - * @type { number } + * @type { int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. * @since 10 */ - callerUid: number; + callerUid: int; } /** @@ -3187,21 +3241,38 @@ declare namespace osAccount { /** * Indicates the caller UID. * - * @type { number } + * @type { int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. * @since 10 */ - callerUid: number; + callerUid: int; } + /** + * Authenticates the specified domain account. + * + * @typedef { function } DomainPluginAuthFunc + * @param { DomainAccountInfo } domainAccountInfo - + * Indicates the domain account information for authentication. + * @param { Uint8Array } credential - Indicates the credential for authentication. + * @param { IUserAuthCallback } callback - Indicates the authentication callback. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + type DomainPluginAuthFunc = (domainAccountInfo: DomainAccountInfo, + credential: Uint8Array, callback: IUserAuthCallback) => void; + /** * Provides the definition of domain plugin. * * @interface DomainPlugin * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ interface DomainPlugin { /** @@ -3214,7 +3285,16 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 9 */ - auth(domainAccountInfo: DomainAccountInfo, credential: Uint8Array, callback: IUserAuthCallback): void; + /** + * Authenticates the specified domain account. + * + * @type { DomainPluginAuthFunc } + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + auth: DomainPluginAuthFunc; /** * Authenticates the specified domain account with a popup. @@ -3265,13 +3345,13 @@ declare namespace osAccount { * Binds the specified domain account with an OS account. * * @param { DomainAccountInfo } domainAccountInfo - Indicates the domain account information. - * @param { number } localId - Indicates the local ID of the OS account. + * @param { int } localId - Indicates the local ID of the OS account. * @param { AsyncCallback } callback - Indicates the callback for notifying the binding result. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. * @since 10 */ - bindAccount(domainAccountInfo: DomainAccountInfo, localId: number, callback: AsyncCallback): void; + bindAccount(domainAccountInfo: DomainAccountInfo, localId: int, callback: AsyncCallback): void; /** * Unbind the specified domain account. @@ -3316,7 +3396,8 @@ declare namespace osAccount { * Provides abilities for the management of domain account. * * @syscap SystemCapability.Account.OsAccount - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ class DomainAccountManager { /** @@ -3403,7 +3484,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300211 - Server unreachable. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ static auth(domainAccountInfo: DomainAccountInfo, credential: Uint8Array, callback: IUserAuthCallback): void; @@ -3462,7 +3544,7 @@ declare namespace osAccount { * Authenticates the domain account bound to the specified OS account with a popup. * * @permission ohos.permission.ACCESS_USER_AUTH_INTERNAL - * @param { number } localId - Indicates the local ID of the specified OS account. + * @param { int } localId - Indicates the local ID of the specified OS account. * @param { IUserAuthCallback } callback - Indicates the callback for getting the authentication result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -3488,7 +3570,7 @@ declare namespace osAccount { /** * Authenticates the domain account bound to the specified OS account with a popup. * - * @param { number } localId - Indicates the local ID of the specified OS account. + * @param { int } localId - Indicates the local ID of the specified OS account. * @param { IUserAuthCallback } callback - Indicates the callback for getting the authentication result. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. @@ -3511,7 +3593,7 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 11 */ - static authWithPopup(localId: number, callback: IUserAuthCallback): void; + static authWithPopup(localId: int, callback: IUserAuthCallback): void; /** * Checks whether the specified domain account exists. @@ -3746,7 +3828,8 @@ declare namespace osAccount { * @static * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ static isAuthenticationExpired(domainAccountInfo: DomainAccountInfo): Promise; } @@ -3903,7 +3986,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 * @name UserIdentityManager */ class UserIdentityManager { @@ -3913,7 +3997,8 @@ declare namespace osAccount { * @throws { BusinessError } 202 - Not system application. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -3932,7 +4017,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300001 - The system service works abnormally. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ openSession(callback: AsyncCallback): void; @@ -3958,7 +4044,7 @@ declare namespace osAccount { * Start an IDM operation to obtain challenge value. * * @permission ohos.permission.MANAGE_USER_IDM - * @param { number } [accountId] - Indicates the local ID of the OS account. + * @param { int } [accountId] - Indicates the local ID of the OS account. * @returns { Promise } Returns a challenge value. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -3968,9 +4054,10 @@ declare namespace osAccount { * @throws { BusinessError } 12300008 - Restricted account. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - openSession(accountId?: number): Promise; + openSession(accountId?: int): Promise; /** * Adds credential. @@ -4023,7 +4110,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300116 - Credential complexity verification failed. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ addCredential(credentialInfo: CredentialInfo, callback: IIdmCallback): void; @@ -4069,7 +4157,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300116 - Credential complexity verification failed. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ updateCredential(credentialInfo: CredentialInfo, callback: IIdmCallback): void; @@ -4091,7 +4180,7 @@ declare namespace osAccount { * End an IDM operation. * * @permission ohos.permission.MANAGE_USER_IDM - * @param { number } [accountId] - Indicates the local ID of the OS account. + * @param { int } [accountId] - Indicates the local ID of the OS account. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: Incorrect parameter types. @@ -4100,9 +4189,10 @@ declare namespace osAccount { * @throws { BusinessError } 12300008 - Restricted account. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - closeSession(accountId?: number): void; + closeSession(accountId?: int): void; /** * Cancels entry with a challenge value. @@ -4135,7 +4225,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300101 - The token is invalid. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ delUser(token: Uint8Array, callback: IIdmCallback): void; @@ -4175,6 +4266,21 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 8 */ + /** + * Gets authentication information. + * + * @permission ohos.permission.USE_USER_IDM + * @param { AsyncCallback> } callback - Indicates the callback to get all registered credential information of + * the specified type for the current user. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - The system service works abnormally. + * @throws { BusinessError } 12300020 - Device hardware abnormal. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ getAuthInfo(callback: AsyncCallback>): void; /** @@ -4194,6 +4300,23 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 8 */ + /** + * Gets authentication information. + * + * @permission ohos.permission.USE_USER_IDM + * @param { AuthType } authType - Indicates the authentication type. + * @param { AsyncCallback> } callback - Indicates the callback to get all registered credential information of + * the specified type for the current user. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - The system service works abnormally. + * @throws { BusinessError } 12300002 - Invalid authType. + * @throws { BusinessError } 12300020 - Device hardware abnormal. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ getAuthInfo(authType: AuthType, callback: AsyncCallback>): void; /** @@ -4212,7 +4335,24 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 8 */ - getAuthInfo(authType?: AuthType): Promise>; + /** + * Gets authentication information. + * + * @permission ohos.permission.USE_USER_IDM + * @param { AuthType } authType - Indicates the authentication type. + * @returns { Promise> } Returns all registered credential information of + * the specified type for the current user. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - The system service works abnormally. + * @throws { BusinessError } 12300002 - Invalid authType. + * @throws { BusinessError } 12300020 - Device hardware abnormal. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + getAuthInfo(authType: AuthType): Promise>; /** * Gets authentication information. @@ -4231,6 +4371,24 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 12 */ + /** + * Gets authentication information. + * + * @permission ohos.permission.USE_USER_IDM + * @param { GetAuthInfoOptions } [options] - Indicates the options for getting the authentication information. + * @returns { Promise> } Returns all enrolled credential information + * according to the options. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - The system service works abnormally. + * @throws { BusinessError } 12300002 - Invalid options. + * @throws { BusinessError } 12300003 - Account not found. + * @throws { BusinessError } 12300020 - Device hardware abnormal. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ getAuthInfo(options?: GetAuthInfoOptions): Promise>; /** @@ -4238,7 +4396,7 @@ declare namespace osAccount { * * @permission ohos.permission.USE_USER_IDM * @param { AuthType } authType - Indicates the authentication type. - * @param { number } [accountId] - Indicates the OS account identifier. + * @param { int } [accountId] - Indicates the OS account identifier. * @returns { Promise } Returns the enrolled identifier. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -4253,7 +4411,26 @@ declare namespace osAccount { * @systemapi Hide this for inner system use. * @since 12 */ - getEnrolledId(authType: AuthType, accountId?: number): Promise; + /** + * Gets the credential enrolled identifier of the specified authentication type. + * + * @permission ohos.permission.USE_USER_IDM + * @param { AuthType } authType - Indicates the authentication type. + * @param { int } [accountId] - Indicates the OS account identifier. + * @returns { Promise } Returns the enrolled identifier. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 202 - Not system application. + * @throws { BusinessError } 12300001 - The system service works abnormally. + * @throws { BusinessError } 12300002 - Invalid authType. + * @throws { BusinessError } 12300003 - Account not found. + * @throws { BusinessError } 12300020 - Device hardware abnormal. + * @throws { BusinessError } 12300102 - The credential does not exist. + * @throws { BusinessError } 12300106 - The authentication type is not supported. + * @syscap SystemCapability.Account.OsAccount + * @systemapi + * @since 20 + */ + getEnrolledId(authType: AuthType, accountId?: int): Promise; } /** @@ -4262,7 +4439,8 @@ declare namespace osAccount { * @typedef GetAuthInfoOptions * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface GetAuthInfoOptions { /** @@ -4271,28 +4449,31 @@ declare namespace osAccount { * @type { ?AuthType } * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ authType?: AuthType; /** * Indicates the OS account identifier. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - accountId?: number; + accountId?: int; } /** * Indicates the enumeration of the authentication intent. * - * @enum { number } AuthIntent + * @enum { int } AuthIntent * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum AuthIntent { /** @@ -4300,7 +4481,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ UNLOCK = 1, @@ -4309,7 +4491,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ SILENT_AUTH = 2, @@ -4318,7 +4501,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ QUESTION_AUTH = 3, @@ -4328,6 +4512,7 @@ declare namespace osAccount { * @syscap SystemCapability.Account.OsAccount * @systemapi * @since 20 + * @arkts 1.1&1.2 */ ABANDONED_PIN_AUTH = 4 } @@ -4338,7 +4523,8 @@ declare namespace osAccount { * @interface RemoteAuthOptions * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface RemoteAuthOptions { /** @@ -4347,7 +4533,8 @@ declare namespace osAccount { * @type { ?string } * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ verifierNetworkId?: string; @@ -4357,19 +4544,21 @@ declare namespace osAccount { * @type { ?string } * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ collectorNetworkId?: string; /** * Indicates the collector token identifier. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - collectorTokenId?: number; + collectorTokenId?: int; } /** @@ -4378,18 +4567,20 @@ declare namespace osAccount { * @interface AuthOptions * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface AuthOptions { /** * Indicates the local ID of the OS account to be authenticated. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - accountId?: number; + accountId?: int; /** * Indicates the authentication intent. @@ -4397,7 +4588,8 @@ declare namespace osAccount { * @type { ?AuthIntent } * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ authIntent?: AuthIntent; @@ -4407,7 +4599,8 @@ declare namespace osAccount { * @type { ?RemoteAuthOptions } * @syscap SystemCapability.Account.OsAccount * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ remoteAuthOptions?: RemoteAuthOptions; } @@ -4418,7 +4611,8 @@ declare namespace osAccount { * @interface IInputData * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface IInputData { /** @@ -4431,7 +4625,8 @@ declare namespace osAccount { * @throws { BusinessError } 12300002 - Invalid pinSubType. * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ onSetData: (authSubType: AuthSubType, data: Uint8Array) => void; } @@ -4442,7 +4637,8 @@ declare namespace osAccount { * @interface GetInputDataOptions * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface GetInputDataOptions { /** @@ -4451,7 +4647,8 @@ declare namespace osAccount { * @type { ?Uint8Array } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ challenge?: Uint8Array; } @@ -4462,7 +4659,8 @@ declare namespace osAccount { * @interface IInputer * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface IInputer { /** @@ -4471,7 +4669,8 @@ declare namespace osAccount { * @type { function } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ onGetData: (authSubType: AuthSubType, callback: IInputData, options: GetInputDataOptions) => void; } @@ -4482,7 +4681,8 @@ declare namespace osAccount { * @interface IUserAuthCallback * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface IUserAuthCallback { /** @@ -4494,9 +4694,10 @@ declare namespace osAccount { * @type { function } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - onResult: (result: number, extraInfo: AuthResult) => void; + onResult: (result: int, extraInfo: AuthResult) => void; /** * During an authentication, the TipsCode is returned through the callback. @@ -4504,9 +4705,10 @@ declare namespace osAccount { * @type { ?function } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - onAcquireInfo?: (module: number, acquire: number, extraInfo: Uint8Array) => void; + onAcquireInfo?: (module: int, acquire: int, extraInfo: Uint8Array) => void; } /** @@ -4515,7 +4717,8 @@ declare namespace osAccount { * @interface IIdmCallback * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface IIdmCallback { /** @@ -4524,9 +4727,10 @@ declare namespace osAccount { * @type { function } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - onResult: (result: number, extraInfo: RequestResult) => void; + onResult: (result: int, extraInfo: RequestResult) => void; /** * During an authentication, the TipsCode is returned through the callback. @@ -4534,9 +4738,10 @@ declare namespace osAccount { * @type { ?function } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - onAcquireInfo?: (module: number, acquire: number, extraInfo: Uint8Array) => void; + onAcquireInfo?: (module: int, acquire: int, extraInfo: Uint8Array) => void; } /** @@ -4545,7 +4750,8 @@ declare namespace osAccount { * @interface GetPropertyRequest * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface GetPropertyRequest { /** @@ -4554,7 +4760,8 @@ declare namespace osAccount { * @type { AuthType } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ authType: AuthType; @@ -4564,19 +4771,21 @@ declare namespace osAccount { * @type { Array } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ keys: Array; /** * Indicates the OS account identifier. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - accountId?: number; + accountId?: int; } /** @@ -4585,7 +4794,8 @@ declare namespace osAccount { * @interface SetPropertyRequest * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface SetPropertyRequest { /** @@ -4594,7 +4804,8 @@ declare namespace osAccount { * @type { AuthType } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ authType: AuthType; @@ -4604,7 +4815,8 @@ declare namespace osAccount { * @type { SetPropertyType } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ key: SetPropertyType; @@ -4614,7 +4826,8 @@ declare namespace osAccount { * @type { Uint8Array } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ setInfo: Uint8Array; } @@ -4625,18 +4838,20 @@ declare namespace osAccount { * @interface ExecutorProperty * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ExecutorProperty { /** * Indicates the result. * - * @type { number } + * @type { int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - result: number; + result: int; /** * Indicates the authentication credential subtype. @@ -4644,39 +4859,43 @@ declare namespace osAccount { * @type { AuthSubType } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ authSubType: AuthSubType; /** * Indicates the remaining times. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - remainTimes?: number; + remainTimes?: int; /** * Indicates the freezing times. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - freezingTime?: number; + freezingTime?: int; /** * Indicates next phase freezing time. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - nextPhaseFreezingTime?: number; + nextPhaseFreezingTime?: int; /** * Indicates the enrollment progress. @@ -4684,7 +4903,8 @@ declare namespace osAccount { * @type { ?string } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enrollmentProgress?: string; @@ -4694,19 +4914,21 @@ declare namespace osAccount { * @type { ?string } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ sensorInfo?: string; /** * Indicates the credential length. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Account.OsAccount * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - credentialLength?: number; + credentialLength?: int; } /** @@ -4715,7 +4937,8 @@ declare namespace osAccount { * @interface AuthResult * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface AuthResult { /** @@ -4724,39 +4947,43 @@ declare namespace osAccount { * @type { ?Uint8Array } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ token?: Uint8Array; /** * Indicates the remaining times. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - remainTimes?: number; + remainTimes?: int; /** * Indicates the freezing times. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ - freezingTime?: number; + freezingTime?: int; /** * Indicates next phase freezing time. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - nextPhaseFreezingTime?: number; + nextPhaseFreezingTime?: int; /** * Indicates the credential ID. @@ -4764,29 +4991,32 @@ declare namespace osAccount { * @type { ?Uint8Array } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ credentialId?: Uint8Array; /** * Indicates the local ID of the authenticated OS account. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - accountId?: number; + accountId?: int; /** * Indicates the validity period after which the PIN will expire. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - pinValidityPeriod?: number; + pinValidityPeriod?: long; } /** @@ -4795,7 +5025,8 @@ declare namespace osAccount { * @interface CredentialInfo * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface CredentialInfo { /** @@ -4804,7 +5035,8 @@ declare namespace osAccount { * @type { AuthType } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ credType: AuthType; @@ -4814,7 +5046,8 @@ declare namespace osAccount { * @type { AuthSubType } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ credSubType: AuthSubType; @@ -4824,19 +5057,21 @@ declare namespace osAccount { * @type { Uint8Array } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ token: Uint8Array; /** * Indicates the local ID of the OS account to which the credential belongs. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - accountId?: number; + accountId?: int; } /** @@ -4845,7 +5080,8 @@ declare namespace osAccount { * @interface RequestResult * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface RequestResult { /** @@ -4854,7 +5090,8 @@ declare namespace osAccount { * @type { ?Uint8Array } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ credentialId?: Uint8Array; } @@ -4865,7 +5102,8 @@ declare namespace osAccount { * @interface EnrolledCredInfo * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface EnrolledCredInfo { /** @@ -4874,7 +5112,8 @@ declare namespace osAccount { * @type { Uint8Array } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ credentialId: Uint8Array; @@ -4884,7 +5123,8 @@ declare namespace osAccount { * @type { AuthType } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ authType: AuthType; @@ -4894,7 +5134,8 @@ declare namespace osAccount { * @type { AuthSubType } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ authSubType: AuthSubType; @@ -4904,7 +5145,8 @@ declare namespace osAccount { * @type { Uint8Array } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ templateId: Uint8Array; @@ -4914,27 +5156,30 @@ declare namespace osAccount { * @syscap SystemCapability.Account.OsAccount * @systemapi * @since 20 + * @arkts 1.1&1.2 */ isAbandoned?: boolean; /** * Indicates the validity period. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Account.OsAccount * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - validityPeriod?: number; + validityPeriod?: long; } /** * Indicates the property type to get. * - * @enum { number } GetPropertyType + * @enum { int } GetPropertyType * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ enum GetPropertyType { /** @@ -4942,7 +5187,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ AUTH_SUB_TYPE = 1, @@ -4951,7 +5197,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ REMAIN_TIMES = 2, @@ -4960,7 +5207,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FREEZING_TIME = 3, @@ -4969,7 +5217,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ ENROLLMENT_PROGRESS = 4, @@ -4978,7 +5227,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ SENSOR_INFO = 5, @@ -4987,7 +5237,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NEXT_PHASE_FREEZING_TIME = 6, @@ -4997,6 +5248,7 @@ declare namespace osAccount { * @syscap SystemCapability.Account.OsAccount * @systemapi * @since 20 + * @arkts 1.1&1.2 */ CREDENTIAL_LENGTH = 7 } @@ -5004,10 +5256,11 @@ declare namespace osAccount { /** * Indicates the property type to set. * - * @enum { number } SetPropertyType + * @enum { int } SetPropertyType * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ enum SetPropertyType { /** @@ -5015,7 +5268,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ INIT_ALGORITHM = 1 } @@ -5023,10 +5277,11 @@ declare namespace osAccount { /** * Indicates the credential type for authentication. * - * @enum { number } AuthType + * @enum { int } AuthType * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ enum AuthType { /** @@ -5034,7 +5289,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ PIN = 1, @@ -5043,7 +5299,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FACE = 2, @@ -5052,7 +5309,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ FINGERPRINT = 4, @@ -5061,7 +5319,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ RECOVERY_KEY = 8, @@ -5070,7 +5329,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ PRIVATE_PIN = 16, @@ -5079,7 +5339,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DOMAIN = 1024 } @@ -5087,10 +5348,11 @@ declare namespace osAccount { /** * Indicates the credential subtype for authentication. * - * @enum { number } AuthSubType + * @enum { int } AuthSubType * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ enum AuthSubType { /** @@ -5098,7 +5360,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ PIN_SIX = 10000, @@ -5107,7 +5370,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ PIN_NUMBER = 10001, @@ -5116,7 +5380,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ PIN_MIXED = 10002, @@ -5125,7 +5390,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PIN_FOUR = 10003, @@ -5134,7 +5400,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ PIN_PATTERN = 10004, @@ -5143,7 +5410,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ PIN_QUESTION = 10005, @@ -5152,7 +5420,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FACE_2D = 20000, @@ -5161,7 +5430,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FACE_3D = 20001, @@ -5170,7 +5440,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ FINGERPRINT_CAPACITIVE = 30000, @@ -5179,7 +5450,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ FINGERPRINT_OPTICAL = 30001, @@ -5188,7 +5460,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ FINGERPRINT_ULTRASONIC = 30002, @@ -5197,7 +5470,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DOMAIN_MIXED = 10240001 } @@ -5205,10 +5479,11 @@ declare namespace osAccount { /** * Indicates the trusted level of authentication results. * - * @enum { number } AuthTrustLevel + * @enum { int } AuthTrustLevel * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ enum AuthTrustLevel { /** @@ -5216,7 +5491,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ATL1 = 10000, @@ -5225,7 +5501,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ATL2 = 20000, @@ -5234,7 +5511,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ATL3 = 30000, @@ -5243,7 +5521,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ ATL4 = 40000 } @@ -5251,7 +5530,7 @@ declare namespace osAccount { /** * Indicates the module of acquired information. * - * @enum { number } Module + * @enum { int } Module * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. * @since 8 @@ -5270,10 +5549,11 @@ declare namespace osAccount { /** * Indicates the enumeration of authentication result code. * - * @enum { number } ResultCode + * @enum { int } ResultCode * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ enum ResultCode { /** @@ -5281,7 +5561,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ SUCCESS = 0, @@ -5290,7 +5571,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FAIL = 1, @@ -5299,7 +5581,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ GENERAL_ERROR = 2, @@ -5308,7 +5591,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ CANCELED = 3, @@ -5317,7 +5601,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ TIMEOUT = 4, @@ -5326,7 +5611,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_NOT_SUPPORT = 5, @@ -5335,7 +5621,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ TRUST_LEVEL_NOT_SUPPORT = 6, @@ -5344,7 +5631,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ BUSY = 7, @@ -5353,7 +5641,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ INVALID_PARAMETERS = 8, @@ -5362,7 +5651,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ LOCKED = 9, @@ -5371,7 +5661,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ NOT_ENROLLED = 10 } @@ -5379,10 +5670,11 @@ declare namespace osAccount { /** * Indicates the enumeration of prompt codes in the process of face authentication. * - * @enum { number } FaceTipsCode + * @enum { int } FaceTipsCode * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FaceTipsCode { /** @@ -5390,7 +5682,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FACE_AUTH_TIP_TOO_BRIGHT = 1, @@ -5399,7 +5692,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FACE_AUTH_TIP_TOO_DARK = 2, @@ -5408,7 +5702,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FACE_AUTH_TIP_TOO_CLOSE = 3, @@ -5417,7 +5712,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FACE_AUTH_TIP_TOO_FAR = 4, @@ -5426,7 +5722,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FACE_AUTH_TIP_TOO_HIGH = 5, @@ -5435,7 +5732,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FACE_AUTH_TIP_TOO_LOW = 6, @@ -5444,7 +5742,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FACE_AUTH_TIP_TOO_RIGHT = 7, @@ -5453,7 +5752,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FACE_AUTH_TIP_TOO_LEFT = 8, @@ -5462,7 +5762,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FACE_AUTH_TIP_TOO_MUCH_MOTION = 9, @@ -5471,7 +5772,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FACE_AUTH_TIP_POOR_GAZE = 10, @@ -5480,7 +5782,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FACE_AUTH_TIP_NOT_DETECTED = 11 } @@ -5488,10 +5791,11 @@ declare namespace osAccount { /** * Indicates the enumeration of prompt codes in the process of fingerprint authentication. * - * @enum { number } FingerprintTips + * @enum { int } FingerprintTips * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FingerprintTips { /** @@ -5499,7 +5803,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FINGERPRINT_TIP_GOOD = 0, @@ -5508,7 +5813,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FINGERPRINT_TIP_IMAGER_DIRTY = 1, @@ -5517,7 +5823,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FINGERPRINT_TIP_INSUFFICIENT = 2, @@ -5526,7 +5833,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FINGERPRINT_TIP_PARTIAL = 3, @@ -5535,7 +5843,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FINGERPRINT_TIP_TOO_FAST = 4, @@ -5544,7 +5853,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ FINGERPRINT_TIP_TOO_SLOW = 5, @@ -5553,7 +5863,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ FINGERPRINT_TIP_FINGER_DOWN = 6, @@ -5562,7 +5873,8 @@ declare namespace osAccount { * * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ FINGERPRINT_TIP_FINGER_UP = 7 } @@ -5570,7 +5882,7 @@ declare namespace osAccount { /** * Enumerates for constraint source types. * - * @enum { number } ConstraintSourceType + * @enum { int } ConstraintSourceType * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. * @since 9 @@ -5626,12 +5938,12 @@ declare namespace osAccount { * Indicates the id of an os account who set the constraint. * When type is CONSTRAINT_NOT_EXIST or CONSTRAINT_TYPE_BASE, localId will be -1. * - * @type { number } + * @type { int } * @syscap SystemCapability.Account.OsAccount * @systemapi Hide this for inner system use. * @since 9 */ - localId: number; + localId: int; /** * Indicates the source type of the constraint. @@ -5645,4 +5957,4 @@ declare namespace osAccount { } } -export default osAccount; \ No newline at end of file +export default osAccount; diff --git a/api/@ohos.animation.windowAnimationManager.d.ts b/api/@ohos.animation.windowAnimationManager.d.ts index 2b2c5ac64eced0f2012abbd0281a7283645e6d78..e7cdf9c7c396a62f0f1726f9f85639f2bd1089ba 100644 --- a/api/@ohos.animation.windowAnimationManager.d.ts +++ b/api/@ohos.animation.windowAnimationManager.d.ts @@ -26,7 +26,8 @@ import { AsyncCallback } from './@ohos.base'; * @namespace windowAnimationManager * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace windowAnimationManager { /** @@ -35,7 +36,8 @@ declare namespace windowAnimationManager { * @param { WindowAnimationController } controller - Window animation controller. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setController(controller: WindowAnimationController): void; @@ -46,7 +48,8 @@ declare namespace windowAnimationManager { * @param { AsyncCallback } callback - Returns the animation finished callback. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function minimizeWindowWithAnimation(windowTarget: WindowAnimationTarget, callback: AsyncCallback): void; @@ -58,7 +61,8 @@ declare namespace windowAnimationManager { * @returns { Promise } Promise used to return the animation finished callback. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function minimizeWindowWithAnimation(windowTarget: WindowAnimationTarget): Promise; @@ -68,53 +72,59 @@ declare namespace windowAnimationManager { * @interface RRect * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface RRect { /** * The X-axis coordinate of the upper left vertex of the round rect, in pixels. - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - left: number; + left: double; /** * The Y-axis coordinate of the upper left vertex of the round rect, in pixels. - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - top: number; + top: double; /** * Width of the round rect, in pixels. - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - width: number; + width: double; /** * Height of the round rect, in pixels. - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - height: number; + height: double; /** * Radius of the round corner of the round rect, in pixels. - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - radius: number; + radius: double; } /** @@ -123,7 +133,8 @@ declare namespace windowAnimationManager { * @interface WindowAnimationTarget * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface WindowAnimationTarget { /** @@ -132,7 +143,8 @@ declare namespace windowAnimationManager { * @readonly * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly bundleName: string; @@ -142,7 +154,8 @@ declare namespace windowAnimationManager { * @readonly * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly abilityName: string; @@ -152,19 +165,21 @@ declare namespace windowAnimationManager { * @readonly * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly windowBounds: RRect; /** /* The mission id of the window animation target. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly missionId: number; + readonly missionId: int; } /** @@ -173,7 +188,8 @@ declare namespace windowAnimationManager { * @interface WindowAnimationFinishedCallback * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface WindowAnimationFinishedCallback { /** @@ -181,7 +197,8 @@ declare namespace windowAnimationManager { * * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onAnimationFinish(): void; } @@ -192,7 +209,8 @@ declare namespace windowAnimationManager { * @interface WindowAnimationController * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface WindowAnimationController { /** @@ -202,7 +220,8 @@ declare namespace windowAnimationManager { * @param { WindowAnimationFinishedCallback } finishCallback - Animation finished callback. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onStartAppFromLauncher(startingWindowTarget: WindowAnimationTarget, finishCallback: WindowAnimationFinishedCallback): void; @@ -214,7 +233,8 @@ declare namespace windowAnimationManager { * @param { WindowAnimationFinishedCallback } finishCallback - Animation finished callback. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onStartAppFromRecent(startingWindowTarget: WindowAnimationTarget, finishCallback: WindowAnimationFinishedCallback): void; @@ -226,7 +246,8 @@ declare namespace windowAnimationManager { * @param { WindowAnimationFinishedCallback } finishCallback - Animation finished callback. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onStartAppFromOther(startingWindowTarget: WindowAnimationTarget, finishCallback: WindowAnimationFinishedCallback): void; @@ -239,7 +260,8 @@ declare namespace windowAnimationManager { * @param { WindowAnimationFinishedCallback } finishCallback - Animation finished callback. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onAppTransition(fromWindowTarget: WindowAnimationTarget, toWindowTarget: WindowAnimationTarget, finishCallback: WindowAnimationFinishedCallback): void; @@ -251,7 +273,8 @@ declare namespace windowAnimationManager { * @param { WindowAnimationFinishedCallback } finishCallback - Animation finished callback. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onMinimizeWindow(minimizingWindowTarget: WindowAnimationTarget, finishCallback: WindowAnimationFinishedCallback): void; @@ -263,7 +286,8 @@ declare namespace windowAnimationManager { * @param { WindowAnimationFinishedCallback } finishCallback - Animation finished callback. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onCloseWindow(closingWindowTarget: WindowAnimationTarget, finishCallback: WindowAnimationFinishedCallback): void; @@ -273,7 +297,8 @@ declare namespace windowAnimationManager { * @param {WindowAnimationFinishedCallback } finishCallback - Animation finished callback. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onScreenUnlock(finishCallback: WindowAnimationFinishedCallback): void; @@ -285,7 +310,8 @@ declare namespace windowAnimationManager { * @param { Array } floatingWindowTargets - All the floating window targets. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onWindowAnimationTargetsUpdate(fullScreenWindowTarget: WindowAnimationTarget, floatingWindowTargets: Array): void; 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.static.d.ets b/api/@ohos.animator.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..9873823603558a3b5dd85d8b2f57e84158e7c75b --- /dev/null +++ b/api/@ohos.animator.static.d.ets @@ -0,0 +1,363 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ + +import { FillMode, PlayMode } from './arkui/component/enums'; +import { ExpectedFrameRateRange } from './arkui/component/common'; + + +/** + * Defines the animator options. + * @interface AnimatorOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface AnimatorOptions { + + + /** + * Duration of the animation, in milliseconds. + * The default value is 0. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + 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. + * interpolating-spring(velocity, mass, stiffness, damping), interpolating spring curve. + * The default value is ease. + * @type {string} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + 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 20 + */ + 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 20 + */ + 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 20 + */ + 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 20 + */ + iterations: number; + + + /** + * Starting point of animator interpolation. + * The default value is 0. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + begin: number; + + + /** + * Ending point of Dynamic Interpolation + * The default value is 1. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + end: number; +} +/** + * Defines the SimpleAnimatorOptions class. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class SimpleAnimatorOptions { + /** + * constructor. + * + * @param { number } begin - Starting point of animator interpolation. + * @param { number } end - Ending point of animator interpolation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(begin: number, end: number); + /** + * Set duration of the animation, in milliseconds. + * + * @param { number } duration - if not set, default is 1000. + * @returns { SimpleAnimatorOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + duration(duration: number): SimpleAnimatorOptions; + /** + * Set 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. + * @param { string } curve - if not set, default is ease. + * @returns { SimpleAnimatorOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + easing(curve: string): SimpleAnimatorOptions; + /** + * Set delay for the animation start. The default value indicates no delay. + * + * @param { number } delay - if not set, default is 0. + * @returns { SimpleAnimatorOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + delay(delay: number): SimpleAnimatorOptions; + /** + * Set FillMode of animation. + * FillMode indicates whether to resume to the initial state after the animation is executed. + * + * @param { FillMode } fillMode - if not set, default is FillMode.Forwards. + * @returns { SimpleAnimatorOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fill(fillMode: FillMode): SimpleAnimatorOptions; + /** + * Set the animation playback mode. + * + * @param { PlayMode } direction - if not set, default is PlayMode.Normal. + * @returns { SimpleAnimatorOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + direction(direction: PlayMode): SimpleAnimatorOptions; + /** + * Set number of times the animation will be played. + * Number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations. + * + * @param { number } iterations - if not set, default is 1. + * @returns { SimpleAnimatorOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iterations(iterations: number): SimpleAnimatorOptions; +} + + +/** + * Defines the Animator result interface. + * @interface AnimatorResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface AnimatorResult { + + + /** + * 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 20 + */ + reset(options: AnimatorOptions): void; + /** + * Reset the options for current animator. + * @param { AnimatorOptions | SimpleAnimatorOptions } 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 20 + */ + reset(options: AnimatorOptions | SimpleAnimatorOptions): void; + + + /** + * Starts the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + play(): void; + + + /** + * Ends the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + finish(): void; + + + /** + * Pauses the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pause(): void; + + + /** + * Cancels the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + cancel(): void; + + + /** + * Plays the animation in reverse direction. + * Invalid when using interpolating-spring curve. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + reverse(): void; + /** + * Trigger when vSync callback. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onFrame: (progress: number) => void; + /** + * The animation is finished. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onFinish: () => void; + /** + * The animation is canceled. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onCancel: () => void; + /** + * The animation is repeated. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onRepeat: () => void; + /** + * The expected frame rate of dynamical of rate range. + * @param { ExpectedFrameRateRange } rateRange - Indicates ExpectedFrameRateRange. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setExpectedFrameRateRange(rateRange: ExpectedFrameRateRange): void; +} + + + +/** + * Defines the Animator class. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare class Animator { + /** + * Create an animator object for custom animation. + * @param { AnimatorOptions | SimpleAnimatorOptions } 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 20 + */ + static create(options: AnimatorOptions | SimpleAnimatorOptions): AnimatorResult; +} +export default Animator; diff --git a/api/@ohos.app.ability.Ability.d.ts b/api/@ohos.app.ability.Ability.d.ts index 5c7161352dc0b708532ac2df525341ce198b56bd..514342c4b68ac0229b2c28a2d7917d7ad79241d1 100644 --- a/api/@ohos.app.ability.Ability.d.ts +++ b/api/@ohos.app.ability.Ability.d.ts @@ -18,10 +18,10 @@ * @kit AbilityKit */ -/*** if arkts 1.1 */ + import AbilityConstant from './@ohos.app.ability.AbilityConstant'; import { Configuration } from './@ohos.app.ability.Configuration'; -/*** endif */ + /** * The class of an ability. @@ -39,7 +39,7 @@ import { Configuration } from './@ohos.app.ability.Configuration'; * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ -export default class Ability { +declare class Ability { /** * Called when the system configuration is updated. * @@ -55,7 +55,8 @@ export default class Ability { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts{'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onConfigurationUpdate(newConfig: Configuration): void; @@ -78,7 +79,10 @@ export default class Ability { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts{'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onMemoryLevel(level: AbilityConstant.MemoryLevel): void; } + +export default Ability; \ No newline at end of file diff --git a/api/@ohos.app.ability.AbilityConstant.d.ts b/api/@ohos.app.ability.AbilityConstant.d.ts index 1f7273212581ebc63d42829b88f39347446b1b35..00326a454d379829cb4550e34f2dbd31997d1c6c 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,19 +197,21 @@ 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 { /** * ID of the process where the ability is running when it exits last time. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - pid: number; + pid: int; /** * Name of the process. @@ -216,31 +220,34 @@ 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; /** * UID of the application. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - uid: number; + uid: int; /** * Specific reason for the last exit of the ability. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - exitSubReason: number; + exitSubReason: int; /** * Reason why the process was killed. @@ -249,42 +256,46 @@ 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; /** * RSS value of the process. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - rss: number; + rss: int; /** * PSS value of the process. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - pss: number; + pss: int; /** * Exact time when the ability last exits. * - * @type { number } + * @type { long } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - timestamp: number; + timestamp: long; /** * The process state when the process exits. @@ -1173,72 +1184,72 @@ declare namespace AbilityConstant { } /** - * Enumerates the collaboration request results. - * This enum is used in multi-device collaboration scenarios to specify whether the target application accepts the - * collaboration request from the caller application. - * It is used in onCollaborate(wantParam) of the UIAbility. + * Enumerates the actions triggered when an application is closed by the user. It must be used together with + * onPrepareTermination or onPrepareTerminationAsync of AbilityStage. * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since arkts {'1.1':'18', '1.2':'20'} + * @atomicservice + * @since arkts {'1.1':'15', '1.2':'20'} * @arkts 1.1&1.2 */ - export enum CollaborateResult { + export enum PrepareTermination { /** - * Accepts the collaboration request. + * Executes the termination action immediately. This is the default behavior. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since arkts {'1.1':'18', '1.2':'20'} + * @atomicservice + * @since arkts {'1.1':'15', '1.2':'20'} * @arkts 1.1&1.2 */ - ACCEPT = 0, + TERMINATE_IMMEDIATELY = 0, /** - * Rejects the collaboration request. + * Cancels the termination action. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since arkts {'1.1':'18', '1.2':'20'} + * @atomicservice + * @since arkts {'1.1':'15', '1.2':'20'} * @arkts 1.1&1.2 */ - REJECT = 1, + CANCEL = 1 } - + /** - * Enumerates the actions triggered when an application is closed by the user. It must be used together with - * onPrepareTermination or onPrepareTerminationAsync of AbilityStage. + * Enumerates the collaboration request results. + * This enum is used in multi-device collaboration scenarios to specify whether the target application accepts the + * collaboration request from the caller application. + * It is used in onCollaborate(wantParam) of the UIAbility. * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} + * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - export enum PrepareTermination { + export enum CollaborateResult { /** - * Executes the termination action immediately. This is the default behavior. + * Accepts the collaboration request. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} + * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - TERMINATE_IMMEDIATELY = 0, - + ACCEPT = 0, + /** - * Cancels the termination action. + * Rejects the collaboration request. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} + * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - CANCEL = 1 + REJECT = 1, } } diff --git a/api/@ohos.app.ability.AbilityLifecycleCallback.d.ts b/api/@ohos.app.ability.AbilityLifecycleCallback.d.ts index d7351fe2290935f0f2316d9c916208baf0251ecb..95bf42caf88563af9c842f23d3fbd0b3e7668b2b 100644 --- a/api/@ohos.app.ability.AbilityLifecycleCallback.d.ts +++ b/api/@ohos.app.ability.AbilityLifecycleCallback.d.ts @@ -19,9 +19,9 @@ */ import UIAbility from './@ohos.app.ability.UIAbility'; -import dataAbility from './@ohos.data.dataAbility'; import window from './@ohos.window'; +/*** if arkts 1.1 */ /** * The ability lifecycle callback. * @@ -47,6 +47,22 @@ import window from './@ohos.window'; * @since 11 */ export default class AbilityLifecycleCallback { +/*** endif */ + +/*** if arkts 1.2 */ +/** + * The ability lifecycle callback. + * + * @typedef AbilityLifecycleCallback + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @StageModelOnly + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface AbilityLifecycleCallback { +/*** endif */ /** * Called back when an ability is started for initialization. * @@ -72,7 +88,8 @@ export default class AbilityLifecycleCallback { * @StageModelOnly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onAbilityCreate(ability: UIAbility): void; @@ -115,7 +132,8 @@ export default class AbilityLifecycleCallback { * @StageModelOnly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onWindowStageCreate(ability: UIAbility, windowStage: window.WindowStage): void; @@ -223,7 +241,8 @@ export default class AbilityLifecycleCallback { * @StageModelOnly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onWindowStageDestroy(ability: UIAbility, windowStage: window.WindowStage): void; @@ -264,7 +283,8 @@ export default class AbilityLifecycleCallback { * @StageModelOnly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onAbilityDestroy(ability: UIAbility): void; @@ -304,7 +324,8 @@ export default class AbilityLifecycleCallback { * @StageModelOnly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onAbilityForeground(ability: UIAbility): void; @@ -344,7 +365,8 @@ export default class AbilityLifecycleCallback { * @StageModelOnly * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onAbilityBackground(ability: UIAbility): void; @@ -435,3 +457,7 @@ export default class AbilityLifecycleCallback { */ onAbilitySaveState?(ability: UIAbility): void; } + +/*** if arkts 1.2 */ +export default AbilityLifecycleCallback; +/*** endif */ \ No newline at end of file diff --git a/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts b/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts index 18504ab7ef9499cfcdad1748bbb21574adb66679..2bcbc1885c28151f6e50321272f74ee1ce7866be 100644 --- a/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts +++ b/api/@ohos.app.ability.ApplicationStateChangeCallback.d.ts @@ -18,6 +18,7 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ /** * The application state change callback. * @@ -43,6 +44,39 @@ * @since 18 */ export default class ApplicationStateChangeCallback { +/*** endif */ + +/*** if arkts 1.2 */ +/** + * The application state change callback. + * + * @typedef ApplicationStateChangeCallback + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @StageModelOnly + * @since 10 + */ +/** + * The application state change callback. + * + * @typedef ApplicationStateChangeCallback + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @StageModelOnly + * @atomicservice + * @since 11 + */ +/** + * The application state change callback. + * + * @typedef ApplicationStateChangeCallback + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @StageModelOnly + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface ApplicationStateChangeCallback { +/*** endif */ /** * Called back when the state of the application changes to foreground. * @@ -65,7 +99,8 @@ export default class ApplicationStateChangeCallback { * @StageModelOnly * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onApplicationForeground(): void; @@ -91,7 +126,12 @@ export default class ApplicationStateChangeCallback { * @StageModelOnly * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ onApplicationBackground(): void; } + +/*** if arkts 1.2 */ +export default ApplicationStateChangeCallback; +/*** endif */ \ No newline at end of file diff --git a/api/@ohos.app.ability.AtomicServiceOptions.d.ts b/api/@ohos.app.ability.AtomicServiceOptions.d.ts index 9168a95e277acd57828d82cda8ff058518f902e3..11e0f24b8c577f79578e530497cb87669a0c9589 100644 --- a/api/@ohos.app.ability.AtomicServiceOptions.d.ts +++ b/api/@ohos.app.ability.AtomicServiceOptions.d.ts @@ -27,19 +27,21 @@ import StartOptions from './@ohos.app.ability.StartOptions'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export default class AtomicServiceOptions extends StartOptions { /** * The options of the flags in this AtomicServiceOptions. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - flags?: number; + flags?: int; /** * The description of the WantParams object in an AtomicServiceOptions @@ -48,7 +50,8 @@ export default class AtomicServiceOptions extends StartOptions { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ parameters?: Record; } \ No newline at end of file diff --git a/api/@ohos.app.ability.ChildProcessArgs.d.ts b/api/@ohos.app.ability.ChildProcessArgs.d.ts index 95fbe68e3cbd751a535a66bc4dfb238e6b867bfc..dd2473aedff9281922acccf109dfdde9a2d0fb5b 100644 --- a/api/@ohos.app.ability.ChildProcessArgs.d.ts +++ b/api/@ohos.app.ability.ChildProcessArgs.d.ts @@ -41,10 +41,10 @@ export interface ChildProcessArgs { /** * Indicates file descriptors that use to communicate between two processes. * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since 12 */ - fds?: Record; + fds?: Record; } \ No newline at end of file diff --git a/api/@ohos.app.ability.Configuration.d.ts b/api/@ohos.app.ability.Configuration.d.ts index b9a204339502a0fc993818ee22e94b00cb900ee5..1a47592fffcc5d987a341429ba64ee828a58ab4a 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; @@ -162,12 +164,13 @@ export interface Configuration { /** * Indicates the displayId of the current device. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - displayId?: number; + displayId?: long; /** * Indicates whether a pointer type device has connected. @@ -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; @@ -192,7 +196,8 @@ export interface Configuration { * @type { ?string } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ fontId?: string; @@ -207,24 +212,25 @@ export interface Configuration { /** * Indicates the font size scale. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Ability.AbilityBase * @crossplatform * @atomicservice * @since arkts {'1.1':'18', '1.2':'20'} * @arkts 1.1&1.2 */ - fontSizeScale?: number; + fontSizeScale?: double; /** * Indicates the font weight scale. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - fontWeightScale?: number; + fontWeightScale?: double; /** * Indicates the mobile country code. @@ -232,7 +238,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 +249,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.EnvironmentCallback.d.ts b/api/@ohos.app.ability.EnvironmentCallback.d.ts index 7eaea804e905e5eeac25c1362c9b40743843305f..9f5a4b9013c2287b8169a418a834a043fbc281ed 100644 --- a/api/@ohos.app.ability.EnvironmentCallback.d.ts +++ b/api/@ohos.app.ability.EnvironmentCallback.d.ts @@ -21,6 +21,7 @@ import AbilityConstant from './@ohos.app.ability.AbilityConstant'; import { Configuration } from './@ohos.app.ability.Configuration'; +/*** if arkts 1.1 */ /** * The environment callback. * @@ -35,6 +36,27 @@ import { Configuration } from './@ohos.app.ability.Configuration'; * @since 11 */ export default class EnvironmentCallback { +/*** endif */ + +/*** if arkts 1.2 */ +/** + * The environment callback. + * + * @typedef EnvironmentCallback + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @since 9 + */ +/** + * The environment callback. + * + * @typedef EnvironmentCallback + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +declare interface EnvironmentCallback { +/*** endif */ /** * Called when the system configuration is updated. * @@ -50,7 +72,8 @@ export default class EnvironmentCallback { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onConfigurationUpdated(config: Configuration): void; @@ -71,7 +94,12 @@ export default class EnvironmentCallback { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onMemoryLevel(level: AbilityConstant.MemoryLevel): void; } + +/*** if arkts 1.2 */ +export default EnvironmentCallback; +/*** endif */ \ No newline at end of file diff --git a/api/@ohos.app.ability.InsightIntentContext.d.ts b/api/@ohos.app.ability.InsightIntentContext.d.ts index 9f2de2d357adb48adc035aba503fe59a6ee0f12c..d60333a7279cc3735f0d4dd6327c022ebb92ac56 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. @@ -56,7 +57,8 @@ export default class InsightIntentContext { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbility(want: Want, callback: AsyncCallback): void; @@ -86,7 +88,10 @@ export default class InsightIntentContext { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ 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..c350606ca9a9d8fdc86b12a1327a2f1af1cdc068 100644 --- a/api/@ohos.app.ability.InsightIntentDecorator.d.ts +++ b/api/@ohos.app.ability.InsightIntentDecorator.d.ts @@ -205,7 +205,6 @@ declare interface LinkIntentDecoratorInfo extends IntentDecoratorInfo { * * @enum { string } * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @systemapi * @stagemodelonly * @atomicservice * @since 20 @@ -215,7 +214,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 +224,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 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.MediaControlExtensionAbility.d.ts b/api/@ohos.app.ability.MediaControlExtensionAbility.d.ts index 98f399d9156e15490fc70cfea9f9b2e59016ba2c..bcf31bd4f59c43073665c35d40676d598916358a 100644 --- a/api/@ohos.app.ability.MediaControlExtensionAbility.d.ts +++ b/api/@ohos.app.ability.MediaControlExtensionAbility.d.ts @@ -27,7 +27,8 @@ import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility'; * @syscap SystemCapability.Multimedia.AVSession.Core * @systemapi * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export default class MediaControlExtensionAbility extends UIExtensionAbility { } \ 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..63873b4f2c5d3eedc833a89db84a6641e0c077fe 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,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 */ parameters?: Record; } 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..b2b3fff73c6773abdbb9de305a194b47c49bf4e8 100644 --- a/api/@ohos.app.ability.ServiceExtensionAbility.d.ts +++ b/api/@ohos.app.ability.ServiceExtensionAbility.d.ts @@ -72,7 +72,7 @@ declare class ServiceExtensionAbility { * Called back when a service extension is started. * * @param { Want } want - Indicates the want of service extension to start. - * @param { number } startId - Indicates the number of times the service extension has been started. + * @param { int } startId - Indicates the number of times the service extension has been started. * The {@code startId} is incremented by 1 every time the service extension is started. * For example, if the service extension has been started for six times. * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -81,7 +81,7 @@ declare class ServiceExtensionAbility { * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - onRequest(want: Want, startId: number): void; + onRequest(want: Want, startId: int): void; /** * Called back when a service extension is first connected to an ability. @@ -116,21 +116,20 @@ declare class ServiceExtensionAbility { * @returns { void } the promise returned by the function. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @StageModelOnly + * @stagemodelonly * @since 20 * @arkts 1.2 */ onDisconnect(want: Want): void; - /** - * Asynchronous callback when all abilities connected to a service extension are disconnected. - * The next lifecycle callback onDestroy() will be triggered when the returned Promise object resolves. + /** + * Called back when all abilities connected to a service extension are disconnected. * * @param { Want } want - Indicates disconnection information about the service extension. * @returns { Promise } the promise returned by the function. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @StageModelOnly + * @stagemodelonly * @since 20 * @arkts 1.2 */ @@ -155,7 +154,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; @@ -168,7 +168,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 */ onDump(params: Array): Array; } diff --git a/api/@ohos.app.ability.StartOptions.d.ts b/api/@ohos.app.ability.StartOptions.d.ts index 8526689c432230d3b00fc41900f663a3e29a9361..2a92d5e1ef032c6e7ceb6fba5a85564438cfd95b 100644 --- a/api/@ohos.app.ability.StartOptions.d.ts +++ b/api/@ohos.app.ability.StartOptions.d.ts @@ -17,11 +17,10 @@ * @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'; /*** endif */ @@ -48,12 +47,13 @@ export default class StartOptions { * {@link ohos.app.ability.AbilityConstant#WindowMode.WINDOW_MODE_SPLIT_SECONDARY} are * valid only in intra-app redirection scenarios. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - windowMode?: number; + windowMode?: int; /** * The type of displayId @@ -66,14 +66,14 @@ export default class StartOptions { /** * The type of displayId * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - displayId?: number; + displayId?: long; /** * The target ability with animation or without @@ -81,49 +81,54 @@ 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; /** * The left position of window rectangle * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - windowLeft?: number; + windowLeft?: int; /** * The top position of window rectangle * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - windowTop?: number; + windowTop?: int; /** * The width of window rectangle * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - windowWidth?: number; + windowWidth?: int; /** * The height of window rectangle * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - windowHeight?: number; + windowHeight?: int; /** * Indicates the cold startup window is focused. @@ -132,7 +137,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 +150,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 +163,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 +174,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 +185,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,49 +196,54 @@ 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; /** * The min width of window rectangle. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 17 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ - minWindowWidth?: number; + minWindowWidth?: int; /** * The min height of window rectangle. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 17 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ - minWindowHeight?: number; + minWindowHeight?: int; /** * The max width of window rectangle. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 17 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ - maxWindowWidth?: number; + maxWindowWidth?: int; /** * The max height of window rectangle. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 17 + * @since arkts{ '1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ - maxWindowHeight?: number; + maxWindowHeight?: int; /** * The completion handler of StartAbility. diff --git a/api/@ohos.app.ability.UIAbility.d.ts b/api/@ohos.app.ability.UIAbility.d.ts index f7680dd63e5efbd15144595b5025ac5084532fe7..8c714ff6a6fd0e094e456ad65490ad5b0ac675f0 100644 --- a/api/@ohos.app.ability.UIAbility.d.ts +++ b/api/@ohos.app.ability.UIAbility.d.ts @@ -23,70 +23,47 @@ import AbilityConstant from './@ohos.app.ability.AbilityConstant'; import Want from './@ohos.app.ability.Want'; import window from './@ohos.window'; import UIAbilityContext from './application/UIAbilityContext'; -/*** if arkts 1.1 */ import rpc from './@ohos.rpc'; -/*** endif */ /** * The prototype of the listener function interface registered by the Caller. + * Defines the callback of OnRelease. * - * @typedef OnReleaseCallback + * @typedef { function } OnReleaseCallback + * @param { string } msg - The notification event string listened to by the OnRelease. * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 9 - */ -export interface OnReleaseCallback { -/** - * Defines the callback that is invoked when the stub on the target UIAbility is disconnected. - * - * @param { string } msg - Message used for disconnection. - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - (msg: string): void; -} +export type OnReleaseCallback = (msg: string) => void; /** * The prototype of the listener function interface registered by the Caller. + * Defines the callback of OnRemoteStateChange. * - * @typedef OnRemoteStateChangeCallback - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @stagemodelonly - * @since 10 - */ -export interface OnRemoteStateChangeCallback { -/** - * Defines the callback that is invoked when the remote UIAbility state changes in the collaboration scenario. - * - * @param { string } msg - Message used for disconnection. + * @typedef { function } OnRemoteStateChangeCallback + * @param { string } msg - The notification event string listened to by the OnRemoteStateChange. * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - (msg: string): void; -} +export type OnRemoteStateChangeCallback = (msg: string) => void; /** * The prototype of the message listener function interface registered by the Callee. + * Defines the callback of Callee. * - * @typedef CalleeCallback + * @typedef { function } CalleeCallback + * @param { rpc.MessageSequence } indata - Notification indata to the callee. + * @returns { rpc.Parcelable } Returns the callee's notification result indata. * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 9 - */ -export interface CalleeCallback { -/** - * Defines the callback of the registration message notification of the UIAbility. - * - * @param { rpc.MessageSequence } indata - Data to be transferred. - * @returns { rpc.Parcelable } Returned data object. - * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore - * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - (indata: rpc.MessageSequence): rpc.Parcelable; -} +export type CalleeCallback = (indata: rpc.MessageSequence) => rpc.Parcelable; /** * Implements sending of parcelable data to the target UIAbility when the CallerAbility invokes the target UIAbility (CalleeAbility). @@ -94,7 +71,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 { /** @@ -111,7 +89,8 @@ export interface Caller { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ call(method: string, data: rpc.Parcelable): Promise; @@ -130,7 +109,8 @@ export interface Caller { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ callWithResult(method: string, data: rpc.Parcelable): Promise; @@ -141,7 +121,8 @@ export interface Caller { * @throws { BusinessError } 16200002 - The callee does not exist. * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ release(): void; @@ -155,7 +136,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; @@ -169,7 +151,8 @@ export interface Caller { * @throws { BusinessError } 16200001 - The caller has been released. * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ onRemoteStateChange(callback: OnRemoteStateChangeCallback): void; @@ -184,7 +167,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 */ on(type: 'release', callback: OnReleaseCallback): void; @@ -198,7 +182,8 @@ export interface Caller { * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'release', callback: OnReleaseCallback): void; @@ -211,7 +196,8 @@ export interface Caller { * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'release'): void; } @@ -222,7 +208,8 @@ export interface Caller { * @interface Callee * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface Callee { /** @@ -237,7 +224,8 @@ export interface Callee { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ on(method: string, callback: CalleeCallback): void; @@ -251,7 +239,8 @@ export interface Callee { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ off(method: string): void; } @@ -336,7 +325,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 +345,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; @@ -365,7 +356,8 @@ declare class UIAbility extends Ability { * @type { Callee } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ callee: Callee; @@ -442,7 +434,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 +481,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; @@ -606,15 +600,7 @@ declare class UIAbility extends Ability { onForeground(): void; /** - * Triggered just before the application transitions to the foreground. - * It is called before onForeground. - * It can be used to capture the moment when the application starts to transition to the foreground. - * When paired with onDidForeground, it can also measure the duration from the application's initial - * foreground entry to its full transition into the foreground state. - * - *

**NOTE**: - *
This API returns the result synchronously and does not support asynchronous callback. - *

+ * Called back when the state of an ability will changes to foreground. * * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly @@ -624,15 +610,7 @@ declare class UIAbility extends Ability { onWillForeground(): void; /** - * Triggered after the application has transitioned to the foreground. - * It is called after onForeground. - * It can be used to capture the moment when the application fully transitions to the foreground. - * When paired with onWillForeground, it can also measure the duration from the application's initial foreground - * entry to its full transition into the foreground state. - * - *

**NOTE**: - *
This API returns the result synchronously and does not support asynchronous callback. - *

+ * Called back when the state of an ability changed to foreground. * * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly @@ -671,14 +649,7 @@ declare class UIAbility extends Ability { onBackground(): void; /** - * Triggered just when the application transitions to the background. - * It is called before onBackground. - * It can be used to log various types of data, such as faults, statistics, security information, and user behavior - * that occur during application running. - * - *

**NOTE**: - *
This API returns the result synchronously and does not support asynchronous callback. - *

+ * Called back when the state of an ability will changes to background. * * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly @@ -688,14 +659,7 @@ declare class UIAbility extends Ability { onWillBackground(): void; /** - * Triggered after the application has transitioned to the background. - * It is called after onBackground. - * It can be used to release resources after the application has entered the background, for example, stopping - * audio playback. - * - *

**NOTE**: - *
This API returns the result synchronously and does not support asynchronous callback. - *

+ * Called back when the state of an ability changed to background. * * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly @@ -798,7 +762,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 */ onDump(params: Array): Array; @@ -845,7 +810,7 @@ declare class UIAbility extends Ability { * @since 20 */ onSaveStateAsync(stateType: AbilityConstant.StateType, wantParam: Record): Promise; - + /** * Called back when an ability shares data. * @@ -950,7 +915,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..bd9c0479e1aa5758540a2694d00fbf27beaad389 100644 --- a/api/@ohos.app.ability.UIExtensionContentSession.d.ts +++ b/api/@ohos.app.ability.UIExtensionContentSession.d.ts @@ -18,15 +18,15 @@ * @kit AbilityKit */ -/*** if arkts 1.1 */ import type AbilityStartCallback from './application/AbilityStartCallback'; +import type { AsyncCallback } from './@ohos.base'; +import type uiExtensionHost from './@ohos.uiExtensionHost'; +/*** if arkts 1.1 */ import type Want from './@ohos.app.ability.Want'; import type StartOptions from './@ohos.app.ability.StartOptions'; import type uiExtension from './@ohos.arkui.uiExtension'; import type { AbilityResult } from './ability/abilityResult'; /*** endif */ -import type { AsyncCallback } from './@ohos.base'; -import type uiExtensionHost from './@ohos.uiExtensionHost'; /*** if arkts 1.2 */ import { AbilityResult } from './ability/abilityResult'; import { LocalStorage } from '@ohos.arkui.stateManagement'; @@ -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; @@ -586,7 +587,8 @@ declare class UIExtensionContentSession { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbilityByType(type: string, wantParam: Record, abilityStartCallback: AbilityStartCallback, callback: AsyncCallback): void; @@ -625,7 +627,8 @@ declare class UIExtensionContentSession { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ startAbilityByType(type: string, wantParam: Record, abilityStartCallback: AbilityStartCallback): Promise; diff --git a/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts b/api/@ohos.app.ability.UserAuthExtensionAbility.d.ts index 7a8e808c03da3a0ac350f84532914d8a63e80bd2..959833aa70c3dd49e0249455a19a6ebc5550bb4a 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':'20'} */ 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..fdf0bec5f4d23904fcd141008b9f9caf495b18d6 100644 --- a/api/@ohos.app.ability.Want.d.ts +++ b/api/@ohos.app.ability.Want.d.ts @@ -190,12 +190,13 @@ export default class Want { * For example, wantConstant.Flags.FLAG_ABILITY_CONTINUATION specifies whether to start the ability in cross-device * migration scenarios. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - flags?: number; + flags?: int; /** * The description of an action in an want. @@ -358,11 +359,12 @@ export default class Want { * You can obtain the FD from fs.open. When the FD is no longer needed, you must call fs.close to destroy the FD in a * timely manner to prevent FD leakage. * - * @type { ?Record } + * @type { ?Record } * @readonly * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly fds?: Record; + 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..62726632ab6797fb2339af7a52bcea035c1be726 100644 --- a/api/@ohos.app.ability.abilityManager.d.ts +++ b/api/@ohos.app.ability.abilityManager.d.ts @@ -18,15 +18,21 @@ * @kit AbilityKit */ -import { AbilityResult } from './ability/abilityResult'; import { AsyncCallback } from './@ohos.base'; -import { Configuration } from './@ohos.app.ability.Configuration'; -import Context from './application/Context'; +import { ElementName } from './bundleManager/ElementName'; import { AbilityRunningInfo as _AbilityRunningInfo } from './application/AbilityRunningInfo'; import { ExtensionRunningInfo as _ExtensionRunningInfo } from './application/ExtensionRunningInfo'; -import { ElementName } from './bundleManager/ElementName'; +import Context from './application/Context'; +/*** if arkts 1.1 */ +import { AbilityResult } from './ability/abilityResult'; +import { Configuration } from './@ohos.app.ability.Configuration'; import * as _AbilityForegroundStateObserver from './application/AbilityForegroundStateObserver'; import * as _AbilityStateData from './application/AbilityStateData'; +/*** endif */ +/*** if arkts 1.2 */ +import _AbilityForegroundStateObserver from './application/AbilityForegroundStateObserver'; +import _AbilityStateData from './application/AbilityStateData'; +/*** endif */ /** * The class of an ability manager. @@ -42,6 +48,7 @@ import * as _AbilityStateData from './application/AbilityStateData'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ declare namespace abilityManager { /** @@ -49,14 +56,16 @@ declare namespace abilityManager { * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum AbilityState { /** * Ability is initialized. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ INITIAL = 0, @@ -64,7 +73,8 @@ declare namespace abilityManager { * Ability is in the state of getting focus. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ FOCUS = 2, @@ -72,7 +82,8 @@ declare namespace abilityManager { * Ability is in the foreground state. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ FOREGROUND = 9, @@ -80,7 +91,8 @@ declare namespace abilityManager { * Ability is in the background state. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND = 10, @@ -88,7 +100,8 @@ declare namespace abilityManager { * Ability is in the process of scheduling at the foreground. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ FOREGROUNDING = 11, @@ -96,7 +109,8 @@ declare namespace abilityManager { * Ability is in the process of scheduling in the background. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUNDING = 12 } @@ -108,7 +122,8 @@ declare namespace abilityManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum UserStatus { /** @@ -117,7 +132,8 @@ declare namespace abilityManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ASSERT_TERMINATE = 0, @@ -127,7 +143,8 @@ declare namespace abilityManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ASSERT_CONTINUE = 1, @@ -137,7 +154,8 @@ declare namespace abilityManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ASSERT_RETRY = 2 } @@ -186,7 +204,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 on(type: 'abilityForegroundState', observer: AbilityForegroundStateObserver): void; @@ -203,7 +222,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 off(type: 'abilityForegroundState', observer?: AbilityForegroundStateObserver): void; @@ -249,7 +269,8 @@ declare namespace abilityManager { * @returns { Promise> } Returns the array of AbilityRunningInfo. * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAbilityRunningInfos(): Promise>; @@ -266,7 +287,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 getAbilityRunningInfos(callback: AsyncCallback>): void; @@ -275,7 +297,7 @@ declare namespace abilityManager { * obtain information about the current extension. * * @permission ohos.permission.GET_RUNNING_INFO - * @param { number } upperLimit - Get the maximum limit of the number of messages. + * @param { int } upperLimit - Get the maximum limit of the number of messages. * @returns { Promise> } Returns the array of ExtensionRunningInfo. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -285,14 +307,14 @@ declare namespace abilityManager { * @systemapi * @since 9 */ - function getExtensionRunningInfos(upperLimit: number): Promise>; + function getExtensionRunningInfos(upperLimit: int): Promise>; /** * If you apply for permission, you can obtain information about all extensions. If you do not apply, you can only * obtain information about the current extension. * * @permission ohos.permission.GET_RUNNING_INFO - * @param { number } upperLimit - Get the maximum limit of the number of messages. + * @param { int } upperLimit - Get the maximum limit of the number of messages. * @param { AsyncCallback> } callback - The callback is used to return the array of * ExtensionRunningInfo. * @throws { BusinessError } 202 - Not system application. @@ -303,7 +325,7 @@ declare namespace abilityManager { * @systemapi * @since 9 */ - function getExtensionRunningInfos(upperLimit: number, callback: AsyncCallback>): void; + function getExtensionRunningInfos(upperLimit: int, callback: AsyncCallback>): void; /** * Get the top ability information of the display. @@ -313,7 +335,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 +350,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; @@ -348,7 +372,7 @@ declare namespace abilityManager { /** * Acquire the shared data from target ability. * - * @param { number } missionId - The missionId of target ability. + * @param { int } missionId - The missionId of target ability. * @param { AsyncCallback> } callback - The callback is used to return the params of sharing * data and result code. * @throws { BusinessError } 202 - Not system application. @@ -359,7 +383,7 @@ declare namespace abilityManager { * @systemapi * @since 11 */ - function acquireShareData(missionId: number, callback: AsyncCallback>): void; + function acquireShareData(missionId: int, callback: AsyncCallback>): void; /** * Acquire the shared data from target ability. @@ -377,7 +401,7 @@ declare namespace abilityManager { /** * Acquire the shared data from target ability. * - * @param { number } missionId - The missionId of target ability. + * @param { int } missionId - The missionId of target ability. * @returns { Promise> } The promise returned by the function. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -387,12 +411,12 @@ declare namespace abilityManager { * @systemapi * @since 11 */ - function acquireShareData(missionId: number): Promise>; + function acquireShareData(missionId: int): Promise>; /** * Notify the result of save as to target ability. * @param { AbilityResult } parameter - Indicates the result to return. - * @param { number } requestCode - Request code defined by the user. + * @param { int } requestCode - Request code defined by the user. * @param { AsyncCallback } callback - The callback of the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -404,12 +428,12 @@ declare namespace abilityManager { * @StageModelOnly * @since 10 */ - function notifySaveAsResult(parameter: AbilityResult, requestCode: number, callback: AsyncCallback): void; + function notifySaveAsResult(parameter: AbilityResult, requestCode: int, callback: AsyncCallback): void; /** * Notify the result of save as to target ability. * @param { AbilityResult } parameter - Indicates the result to return. - * @param { number } requestCode - Request code defined by the user. + * @param { int } requestCode - Request code defined by the user. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -421,7 +445,7 @@ declare namespace abilityManager { * @StageModelOnly * @since 10 */ - function notifySaveAsResult(parameter: AbilityResult, requestCode: number): Promise; + function notifySaveAsResult(parameter: AbilityResult, requestCode: int): Promise; /** * Get the foreground ui abilities. @@ -435,7 +459,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 +474,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>; @@ -465,7 +491,8 @@ declare namespace abilityManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function isEmbeddedOpenAllowed(context: Context, appId: string): Promise; @@ -543,7 +570,8 @@ declare namespace abilityManager { * * @typedef { _AbilityRunningInfo } * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ export type AbilityRunningInfo = _AbilityRunningInfo; @@ -556,13 +584,24 @@ 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. * * @typedef { _ExtensionRunningInfo } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type ExtensionRunningInfo = _ExtensionRunningInfo; @@ -575,6 +614,17 @@ declare namespace abilityManager { * @since 11 */ export type AbilityForegroundStateObserver = _AbilityForegroundStateObserver.default; + + /** + * The ability foreground state observer. + * + * @typedef { _AbilityForegroundStateObserver } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type AbilityForegroundStateObserver = _AbilityForegroundStateObserver; } export default abilityManager; diff --git a/api/@ohos.app.ability.appManager.d.ts b/api/@ohos.app.ability.appManager.d.ts index 0dd30a6d143eaa3f187c8c954cb92e932df7ca89..9b320b1b12ee819b0ef4549a77b77fbaacc466f8 100644 --- a/api/@ohos.app.ability.appManager.d.ts +++ b/api/@ohos.app.ability.appManager.d.ts @@ -19,16 +19,27 @@ */ 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 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 _ApplicationStateObserver from './application/ApplicationStateObserver'; +import _AbilityStateData from './application/AbilityStateData'; +import _AppStateData from './application/AppStateData'; +import _ProcessData from './application/ProcessData'; +import _AppForegroundStateObserver from './application/AppForegroundStateObserver'; +import { AbilityFirstFrameStateObserver as _AbilityFirstFrameStateObserver } from './application/AbilityFirstFrameStateObserver'; +import { AbilityFirstFrameStateData as _AbilityFirstFrameStateData } from './application/AbilityFirstFrameStateData'; +/*** endif */ /** * This module provides the function of app manager service. @@ -43,7 +54,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 +64,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 +73,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 +83,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, @@ -78,7 +93,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_ACTIVE, @@ -87,7 +103,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 +113,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 +132,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 +147,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 +163,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 +179,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 +195,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 +211,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 +224,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 +234,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 } @@ -219,7 +245,8 @@ declare namespace appManager { * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum KeepAliveAppType { /** @@ -227,7 +254,8 @@ declare namespace appManager { * * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ ALL = 0, @@ -236,7 +264,8 @@ declare namespace appManager { * * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ THIRD_PARTY = 1, @@ -245,7 +274,8 @@ declare namespace appManager { * * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ SYSTEM = 2 } @@ -255,7 +285,8 @@ declare namespace appManager { * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum KeepAliveSetter { /** @@ -263,7 +294,8 @@ declare namespace appManager { * * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ SYSTEM = 0, @@ -272,7 +304,8 @@ declare namespace appManager { * * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ USER = 1 } @@ -283,7 +316,8 @@ declare namespace appManager { * @typedef KeepAliveBundleInfo * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface KeepAliveBundleInfo { /** @@ -292,7 +326,8 @@ declare namespace appManager { * @type { string } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -302,7 +337,8 @@ declare namespace appManager { * @type { KeepAliveAppType } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ type: KeepAliveAppType; @@ -312,19 +348,20 @@ declare namespace appManager { * @type { KeepAliveSetter } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ setter: KeepAliveSetter; /** * The user id of setter. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @since 20 */ - setterUserId?: number; + setterUserId?: int; /** * Weather allow user to cancel keep-alive status. @@ -343,15 +380,16 @@ declare namespace appManager { * @permission ohos.permission.RUNNING_STATE_OBSERVER * @param { 'applicationState' } type - applicationState. * @param { ApplicationStateObserver } observer - The application state observer. - * @returns { number } Returns the number code of the observer. + * @returns { int } Returns the number code of the observer. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - function on(type: 'applicationState', observer: ApplicationStateObserver): number; + function on(type: 'applicationState', observer: ApplicationStateObserver): int; /** * Register application state observer. @@ -360,15 +398,16 @@ declare namespace appManager { * @param { 'applicationState' } type - applicationState. * @param { ApplicationStateObserver } observer - The application state observer. * @param { Array } bundleNameList - The list of bundleName. The max length is 128. - * @returns { number } Returns the number code of the observer. + * @returns { int } Returns the number code of the observer. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - function on(type: 'applicationState', observer: ApplicationStateObserver, bundleNameList: Array): number; + function on(type: 'applicationState', observer: ApplicationStateObserver, bundleNameList: Array): int; /** * Register app foreground or background state observer. @@ -383,7 +422,8 @@ declare namespace appManager { * @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 on(type: 'appForegroundState', observer: AppForegroundStateObserver): void; @@ -401,7 +441,8 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'abilityFirstFrameState', observer: AbilityFirstFrameStateObserver, bundleName?: string): void; @@ -410,32 +451,34 @@ declare namespace appManager { * * @permission ohos.permission.RUNNING_STATE_OBSERVER * @param { 'applicationState' } type - applicationState. - * @param { number } observerId - Indicates the number code of the observer. + * @param { int } observerId - Indicates the number code of the observer. * @param { AsyncCallback } callback - The callback of off. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - function off(type: 'applicationState', observerId: number, callback: AsyncCallback): void; + function off(type: 'applicationState', observerId: int, callback: AsyncCallback): void; /** * Unregister application state observer. * * @permission ohos.permission.RUNNING_STATE_OBSERVER * @param { 'applicationState' } type - applicationState. - * @param { number } observerId - Indicates the number code of the observer. + * @param { int } observerId - Indicates the number code of the observer. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - function off(type: 'applicationState', observerId: number): Promise; + function off(type: 'applicationState', observerId: int): Promise; /** * Unregister app foreground or background state observer. @@ -450,7 +493,8 @@ declare namespace appManager { * @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 off(type: 'appForegroundState', observer?: AppForegroundStateObserver): void; @@ -467,7 +511,8 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'abilityFirstFrameState', observer?: AbilityFirstFrameStateObserver): void; @@ -483,7 +528,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 +543,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>; @@ -523,7 +570,7 @@ declare namespace appManager { * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.KILL_APP_PROCESSES * or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES * @param { string } bundleName - The process bundle name. - * @param { number } accountId - The account id. + * @param { int } accountId - The account id. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -532,9 +579,10 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - function killProcessWithAccount(bundleName: string, accountId: number): Promise; + function killProcessWithAccount(bundleName: string, accountId: int): Promise; /** * Kill process with account. @@ -542,9 +590,9 @@ declare namespace appManager { * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.KILL_APP_PROCESSES * or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES * @param { string } bundleName - The process bundle name. - * @param { number } accountId - The account id. + * @param { int } accountId - The account id. * @param { boolean } clearPageStack - The flag that indicates whether the page stack need to be cleared. - * @param { number } [appIndex] - The application index. + * @param { int } [appIndex] - The application index. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -552,9 +600,10 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - function killProcessWithAccount(bundleName: string, accountId: number, clearPageStack: boolean, appIndex?: number): + function killProcessWithAccount(bundleName: string, accountId: int, clearPageStack: boolean, appIndex?: int): Promise; /** @@ -579,7 +628,7 @@ declare namespace appManager { * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.KILL_APP_PROCESSES * or ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS and ohos.permission.CLEAN_BACKGROUND_PROCESSES * @param { string } bundleName - The process bundle name. - * @param { number } accountId - The account id. + * @param { int } accountId - The account id. * @param { AsyncCallback } callback - The callback of killProcessWithAccount. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -588,9 +637,10 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - function killProcessWithAccount(bundleName: string, accountId: number, callback: AsyncCallback): void; + function killProcessWithAccount(bundleName: string, accountId: int, callback: AsyncCallback): void; /** * Is user running in stability test. @@ -611,7 +661,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 isRunningInStabilityTest(callback: AsyncCallback): void; @@ -630,7 +681,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 isRunningInStabilityTest(): Promise; @@ -662,7 +714,8 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function killProcessesByBundleName(bundleName: string): Promise; @@ -672,15 +725,16 @@ declare namespace appManager { * @permission ohos.permission.KILL_APP_PROCESSES or ohos.permission.CLEAN_BACKGROUND_PROCESSES * @param { string } bundleName - bundle name. * @param { boolean } clearPageStack - The flag that indicates whether the page stack need to be cleared. - * @param { number } [appIndex] - The index of clone app. + * @param { int } [appIndex] - The application index. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - If the input parameter is not valid parameter. * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - function killProcessesByBundleName(bundleName: string, clearPageStack: boolean, appIndex?: number): Promise; + function killProcessesByBundleName(bundleName: string, clearPageStack: boolean, appIndex?: int): Promise; /** * Kill processes by bundle name @@ -763,7 +817,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 isRamConstrainedDevice(): Promise; @@ -786,7 +841,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 isRamConstrainedDevice(callback: AsyncCallback): void; @@ -801,13 +857,14 @@ declare namespace appManager { /** * Get the memory size of the application * - * @returns { Promise } Returns the application memory size. + * @returns { Promise } Returns the application memory size. * @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 getAppMemorySize(): Promise; + function getAppMemorySize(): Promise; /** * Get the memory size of the application @@ -822,15 +879,16 @@ declare namespace appManager { /** * Get the memory size of the application * - * @param { AsyncCallback } callback - The callback is used to return the application memory size. + * @param { AsyncCallback } callback - The callback is used to return the application memory size. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @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 getAppMemorySize(callback: AsyncCallback): void; + function getAppMemorySize(callback: AsyncCallback): void; /** * If you apply for permission, you can obtain information about all running processes. @@ -849,7 +907,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>; @@ -866,7 +925,8 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRunningProcessInformationByBundleType( bundleType: bundleManager.BundleType): Promise>; @@ -892,7 +952,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; @@ -901,7 +962,7 @@ declare namespace appManager { * * @permission ohos.permission.GET_RUNNING_INFO * @param { string } bundleName - Indicates the bundle name of the shared bundle. - * @param { number } versionCode - Indicates the version code of the shared bundle. + * @param { long } versionCode - Indicates the version code of the shared bundle. * @returns { Promise } Returns the shared bundle running result. The result is true if running, false otherwise. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -910,16 +971,17 @@ 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 isSharedBundleRunning(bundleName: string, versionCode: number): Promise; + function isSharedBundleRunning(bundleName: string, versionCode: long): Promise; /** * Check whether the shared bundle is running. * * @permission ohos.permission.GET_RUNNING_INFO * @param { string } bundleName - Indicates the bundle name of the shared bundle. - * @param { number } versionCode - Indicates the version code of the shared bundle. + * @param { long } versionCode - Indicates the version code of the shared bundle. * @param { AsyncCallback } callback - The callback of checking the shared bundle running result. * The result is true if running, false otherwise. * @throws { BusinessError } 201 - Permission denied. @@ -929,39 +991,42 @@ 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 isSharedBundleRunning(bundleName: string, versionCode: number, callback: AsyncCallback): void; + function isSharedBundleRunning(bundleName: string, versionCode: long, callback: AsyncCallback): void; /** * Obtains memory usage of one process by its pid. * - * @param { number } pid - Indicates the pid of the process. - * @returns { Promise } Returns the memory usage of the process in KB. + * @param { int } pid - Indicates the pid of the process. + * @returns { Promise } Returns the memory usage of the process in KB. * @throws { BusinessError } 202 - Permission denied, non-system app called 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 } 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 getProcessMemoryByPid(pid: number): Promise; + function getProcessMemoryByPid(pid: int): Promise; /** * Obtains memory usage of one process by its pid. * - * @param { number } pid - Indicates the pid of the process. - * @param { AsyncCallback } callback - Indicates the callback of getting process memory by pid result. + * @param { int } pid - Indicates the pid of the process. + * @param { AsyncCallback } callback - Indicates the callback of getting process memory by pid result. * @throws { BusinessError } 202 - Permission denied, non-system app called 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 } 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 getProcessMemoryByPid(pid: number, callback: AsyncCallback): void; + function getProcessMemoryByPid(pid: int, callback: AsyncCallback): void; /** * Obtains the process information list of running processes that belong to a specific bundle of current user. @@ -974,7 +1039,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; @@ -982,7 +1048,7 @@ declare namespace appManager { * Obtains the process information list of running processes that belong to a specific bundle and specific user ID. * * @param { string } bundleName - Indicates the bundle name of the application to which the processes belong to. - * @param { number } userId - Indicates the user ID of the application to which the processes belong to. + * @param { int } userId - Indicates the user ID of the application to which the processes belong to. * @param { AsyncCallback> } callback - Indicates the callback of getting process information by bundleName result. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -990,9 +1056,10 @@ 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; + function getRunningProcessInfoByBundleName(bundleName: string, userId: int, callback: AsyncCallback>): void; /** * Obtains the process information list of running processes that belong to a specific bundle of current user. @@ -1005,7 +1072,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>; @@ -1013,7 +1081,7 @@ declare namespace appManager { * Obtains the process information list of running processes that belong to a specific bundle and specific user ID. * * @param { string } bundleName - Indicates the bundle name of the application to which the processes belong to. - * @param { number } userId - Indicates the user ID of the application to which the processes belong to. + * @param { int } userId - Indicates the user ID of the application to which the processes belong to. * @returns { Promise> } Returns a list of process information. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -1021,9 +1089,10 @@ 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>; + function getRunningProcessInfoByBundleName(bundleName: string, userId: int): Promise>; /** * Check whether the bundle is running. @@ -1065,9 +1134,9 @@ declare namespace appManager { * * @permission ohos.permission.PRELOAD_APPLICATION * @param { string } bundleName - The bundle name of the application to preload. - * @param { number } userId - Indicates the user identification. + * @param { int } userId - Indicates the user identification. * @param { PreloadMode } mode - Preload application mode. - * @param { number } [appIndex] - The index of application clone. + * @param { int } [appIndex] - The index of application clone. * @returns { Promise } Returns the result of preloadApplication. * @throws { BusinessError } 201 - The application does not have permission to call the interface. * @throws { BusinessError } 202 - Not system application. @@ -1078,9 +1147,10 @@ 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 preloadApplication(bundleName: string, userId: number, mode: PreloadMode, appIndex?: number): Promise; + function preloadApplication(bundleName: string, userId: int, mode: PreloadMode, appIndex?: int): Promise; /** * Get all running multi app info by bundleName @@ -1097,7 +1167,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; @@ -1106,7 +1177,7 @@ declare namespace appManager { * * @permission ohos.permission.GET_RUNNING_INFO * @param { string } bundleName - Indicates the bundle name of the bundle. - * @param { number } [appCloneIndex] - app clone index + * @param { int } [appCloneIndex] - app clone index * @returns { Promise } Returns the bundle running result. The result is true if running, false otherwise. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -1114,16 +1185,17 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @throws { BusinessError } 16000073 - The app clone index is invalid. * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - function isAppRunning(bundleName: string, appCloneIndex?: number): Promise; + function isAppRunning(bundleName: string, appCloneIndex?: int): Promise; /** * Clear up application data by bundle name * * @permission ohos.permission.CLEAN_APPLICATION_DATA * @param { string } bundleName - bundle name. - * @param { number } [appCloneIndex] - app clone index + * @param { int } [appCloneIndex] - app clone index * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -1135,13 +1207,13 @@ declare namespace appManager { * @systemapi * @since 13 */ - function clearUpAppData(bundleName: string, appCloneIndex?: number): Promise; + function clearUpAppData(bundleName: string, appCloneIndex?: int): Promise; /** * Terminate the mission of a UIAbility and back to caller. * * @permission ohos.permission.KILL_APP_PROCESSES - * @param { number } missionId - The mission id of the UIAbility need to be terminated. + * @param { int } missionId - The mission id of the UIAbility need to be terminated. * @returns { Promise } Returns the result of terminateMission. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -1152,14 +1224,14 @@ declare namespace appManager { * @systemapi * @since 13 */ - function terminateMission(missionId: number): Promise; + function terminateMission(missionId: int): Promise; /** * Get pids of processes which belong to specific bundle name and support process cache feature. * * @permission ohos.permission.GET_RUNNING_INFO * @param { string } bundleName - bundle name. - * @returns { Promise> } Returns the list of pid. + * @returns { Promise> } Returns the list of pid. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -1169,16 +1241,17 @@ declare namespace appManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getSupportedProcessCachePids(bundleName : string): Promise>; + function getSupportedProcessCachePids(bundleName : string): Promise>; /** * Set keep alive for the specified bundle. * * @permission ohos.permission.MANAGE_APP_KEEP_ALIVE * @param { string } bundleName - bundle name. - * @param { number } userId - user id. + * @param { int } userId - user id. * @param { boolean } enable - flag indicates whether the bundle should be kept alive. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. @@ -1193,16 +1266,17 @@ declare namespace appManager { * @throws { BusinessError } 16300010 - The target application is not attached to the status bar. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setKeepAliveForBundle(bundleName: string, userId: number, enable: boolean): Promise; + function setKeepAliveForBundle(bundleName: string, userId: int, enable: boolean): Promise; /** * Get keep-alive bundle information. * * @permission ohos.permission.MANAGE_APP_KEEP_ALIVE * @param { KeepAliveAppType } type - type of keep-alive apps to be quried. - * @param { number } [userId] - user id. + * @param { int } [userId] - user id. * @returns { Promise> } Returns the list of KeepAliveBundleInfo. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -1212,9 +1286,10 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getKeepAliveBundles(type: KeepAliveAppType, userId?: number): Promise>; + function getKeepAliveBundles(type: KeepAliveAppType, userId?: int): Promise>; /** * Set keep alive for the specified app service extension. @@ -1256,7 +1331,7 @@ declare namespace appManager { * Kill processes in batch. * * @permission ohos.permission.KILL_APP_PROCESSES - * @param { Array } pids - The pids of the processes. + * @param { Array } pids - The pids of the processes. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -1266,9 +1341,10 @@ declare namespace appManager { * @throws { BusinessError } 16000050 - Internal error. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - function killProcessesInBatch(pids: Array): Promise; + function killProcessesInBatch(pids: Array): Promise; /** * The ability or extension state data. @@ -1279,6 +1355,16 @@ declare namespace appManager { */ 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 application state data. * @@ -1288,6 +1374,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. * @@ -1297,6 +1393,16 @@ declare namespace appManager { */ export type ApplicationStateObserver = _ApplicationStateObserver.default; + /** + * The application state observer. + * + * @typedef { _ApplicationStateObserver } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @since 20 + * @arkts 1.2 + */ + export type ApplicationStateObserver = _ApplicationStateObserver; + /** * The application foreground state observer. * @@ -1307,6 +1413,17 @@ declare namespace appManager { */ export type AppForegroundStateObserver = _AppForegroundStateObserver.default; + /** + * The application foreground state observer. + * + * @typedef { _AppForegroundStateObserver } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type AppForegroundStateObserver = _AppForegroundStateObserver; + /** * The class of a process information. * @@ -1319,7 +1436,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; @@ -1332,6 +1450,16 @@ declare namespace appManager { */ export type ProcessData = _ProcessData.default; + /** + * The application state data. + * + * @typedef { _ProcessData } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @since 20 + * @arkts 1.2 + */ + export type ProcessData = _ProcessData; + /** * The ability first frame state observer. * @@ -1342,6 +1470,17 @@ declare namespace appManager { */ export type AbilityFirstFrameStateObserver = _AbilityFirstFrameStateObserver.default; + /** + * The ability first frame state observer. + * + * @typedef { _AbilityFirstFrameStateObserver } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type AbilityFirstFrameStateObserver = _AbilityFirstFrameStateObserver; + /** * The class of an ability first frame state data. * @@ -1352,13 +1491,25 @@ declare namespace appManager { */ export type AbilityFirstFrameStateData = _AbilityFirstFrameStateData.default; + /** + * The class of an ability first frame state data. + * + * @typedef { _AbilityFirstFrameStateData } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type AbilityFirstFrameStateData = _AbilityFirstFrameStateData; + /** * The class of running multi app information. * * @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.appRecovery.d.ts b/api/@ohos.app.ability.appRecovery.d.ts index b6c1182d7ab773041219f86cc0cea5121b295d9f..3a430e8e4d0345ce550428bddab6ebf5688148c3 100644 --- a/api/@ohos.app.ability.appRecovery.d.ts +++ b/api/@ohos.app.ability.appRecovery.d.ts @@ -16,6 +16,7 @@ /** * @file * @kit AbilityKit + * @arkts 1.1&1.2 */ import UIAbilityContext from './application/UIAbilityContext'; @@ -40,7 +41,8 @@ import Want from './@ohos.app.ability.Want'; * @namespace appRecovery * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace appRecovery { /** @@ -53,10 +55,11 @@ declare namespace appRecovery { /** * The flag that determines when to restart you app. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum RestartFlag { /** @@ -70,7 +73,8 @@ declare namespace appRecovery { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ALWAYS_RESTART = 0, @@ -85,7 +89,8 @@ declare namespace appRecovery { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RESTART_WHEN_JS_CRASH = 0x0001, @@ -100,7 +105,8 @@ declare namespace appRecovery { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RESTART_WHEN_APP_FREEZE = 0x0002, @@ -115,7 +121,8 @@ declare namespace appRecovery { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NO_RESTART = 0xFFFF } @@ -134,10 +141,11 @@ declare namespace appRecovery { * When start saving ability state, the { ohos.app.ability.UiAbility.onSaveState } will be called and * the page stack of current ability will be saved automatically. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum SaveOccasionFlag { /** @@ -155,7 +163,8 @@ declare namespace appRecovery { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SAVE_WHEN_ERROR = 0x0001, @@ -170,7 +179,8 @@ declare namespace appRecovery { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SAVE_WHEN_BACKGROUND = 0x0002 } @@ -185,10 +195,11 @@ declare namespace appRecovery { /** * The flag that determines how to save the ability state. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum SaveModeFlag { /** @@ -202,7 +213,8 @@ declare namespace appRecovery { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SAVE_WITH_FILE = 0x0001, @@ -217,7 +229,8 @@ declare namespace appRecovery { * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SAVE_WITH_SHARED_MEMORY = 0x0002 } @@ -241,7 +254,8 @@ declare namespace appRecovery { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function enableAppRecovery(restart?: RestartFlag, saveOccasion?: SaveOccasionFlag, saveMode?: SaveModeFlag): void; @@ -262,7 +276,8 @@ declare namespace appRecovery { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function restartApp(): void; @@ -281,7 +296,8 @@ declare namespace appRecovery { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function setRestartWant(want: Want): void; @@ -304,7 +320,8 @@ declare namespace appRecovery { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function saveAppState(): boolean; /** @@ -326,7 +343,8 @@ declare namespace appRecovery { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function saveAppState(context?: UIAbilityContext): boolean; } diff --git a/api/@ohos.app.ability.application.d.ts b/api/@ohos.app.ability.application.d.ts index 37e58fa584adf1b195dba1ea5be8e3b2e3ede103..d6a92cda87c3066894453fa34ac643c9c78cb9da 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; @@ -89,7 +92,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; @@ -101,7 +105,8 @@ declare namespace application { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ export function getApplicationContext(): ApplicationContext; diff --git a/api/@ohos.app.ability.autoFillManager.d.ts b/api/@ohos.app.ability.autoFillManager.d.ts index b18eefefd3606a8973afdb32f5ae66dde94f22d6..89ec3946fc2990617d07c2fec6027dd5a472ad28 100644 --- a/api/@ohos.app.ability.autoFillManager.d.ts +++ b/api/@ohos.app.ability.autoFillManager.d.ts @@ -46,6 +46,30 @@ import { PopupPlacement } from './application/AutoFillPopupConfig'; * @since 12 */ declare namespace autoFillManager { + /** + * Called when auto save request is successfully handled. + * + * @typedef { function } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @atomicservice + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + type OnSuccessFn = () => void; + + /** + * Called when auto save request is failed to be handled. + * + * @typedef { function } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @atomicservice + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 + */ + type OnFailureFn = () => void; + /** * Auto save callback. * @@ -74,12 +98,13 @@ declare namespace autoFillManager { /** * Called when auto save request is successfully handled. * + * @type { OnSuccessFn } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice * @since 12 */ - onSuccess(): void; + onSuccess: OnSuccessFn; /** * Called when auto save request is failed to be handled. @@ -91,12 +116,13 @@ declare namespace autoFillManager { /** * Called when auto save request is failed to be handled. * + * @type { OnFailureFn } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice * @since 12 */ - onFailure(): void; + onFailure: OnFailureFn; } /** diff --git a/api/@ohos.app.ability.childProcessManager.d.ts b/api/@ohos.app.ability.childProcessManager.d.ts index 683fe96719d0b5c0dd463a27f60292d11cb8f38d..d09a5e09aa16b94722fb421e4b6ca8851eab7806 100644 --- a/api/@ohos.app.ability.childProcessManager.d.ts +++ b/api/@ohos.app.ability.childProcessManager.d.ts @@ -66,7 +66,7 @@ declare namespace childProcessManager { * * @param { string } srcEntry - Child process source file entrance to be started. * @param { StartMode } startMode - Child process start mode. - * @returns { Promise } Returns the started child process pid. + * @returns { Promise } Returns the started child process pid. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 16000050 - Internal error. @@ -76,14 +76,14 @@ declare namespace childProcessManager { * @stagemodelonly * @since 11 */ - function startChildProcess(srcEntry: string, startMode: StartMode): Promise; + function startChildProcess(srcEntry: string, startMode: StartMode): Promise; /** * Start child process with the given src entry and mode. * * @param { string } srcEntry - Child process source file entrance to be started. * @param { StartMode } startMode - Child process start mode. - * @param { AsyncCallback } callback - The callback of startChildProcess. + * @param { AsyncCallback } callback - The callback of startChildProcess. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 16000050 - Internal error. @@ -93,7 +93,7 @@ declare namespace childProcessManager { * @stagemodelonly * @since 11 */ - function startChildProcess(srcEntry: string, startMode: StartMode, callback: AsyncCallback): void; + function startChildProcess(srcEntry: string, startMode: StartMode, callback: AsyncCallback): void; /** * Start child process with the given args and options. @@ -117,7 +117,7 @@ declare namespace childProcessManager { * @param { string } srcEntry - Indicates child process source file entrance to be started. * @param { ChildProcessArgs } args - Indicates args to pass to child process. * @param { ChildProcessOptions } [options] - Indicates options for starting child process. - * @returns { Promise } Returns the started child process pid. + * @returns { Promise } Returns the started child process pid. * @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. @@ -128,7 +128,7 @@ declare namespace childProcessManager { * @stagemodelonly * @since 13 */ - function startArkChildProcess(srcEntry: string, args: ChildProcessArgs, options?: ChildProcessOptions): Promise; + function startArkChildProcess(srcEntry: string, args: ChildProcessArgs, options?: ChildProcessOptions): Promise; /** * Start native child process with the given args and options. @@ -136,7 +136,7 @@ declare namespace childProcessManager { * @param { string } entryPoint - Indicates entry point of child process, consisting of library and entry function, such as "libEntry.so:Main". * @param { ChildProcessArgs } args - Indicates args to pass to child process. * @param { ChildProcessOptions } [options] - Indicates options for starting child process. - * @returns { Promise } Returns the started child process pid. + * @returns { Promise } Returns the started child process pid. * @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. @@ -147,7 +147,7 @@ declare namespace childProcessManager { * @stagemodelonly * @since 13 */ - function startNativeChildProcess(entryPoint: string, args: ChildProcessArgs, options?: ChildProcessOptions): Promise; + function startNativeChildProcess(entryPoint: string, args: ChildProcessArgs, options?: ChildProcessOptions): Promise; } diff --git a/api/@ohos.app.ability.common.d.ts b/api/@ohos.app.ability.common.d.ts index f26a6a6e5fddb4f3e5bf38a447b585155274612e..bb9e83c5dde709bf703d1c0c9fc69c43da6b78cb 100644 --- a/api/@ohos.app.ability.common.d.ts +++ b/api/@ohos.app.ability.common.d.ts @@ -30,9 +30,6 @@ import * as _ExtensionContext from './application/ExtensionContext'; import * as _FormExtensionContext from './application/FormExtensionContext'; import * as _ServiceExtensionContext from './application/ServiceExtensionContext'; import * as _EventHub from './application/EventHub'; -import { PacMap as _PacMap } from './ability/dataAbilityHelper'; -import type _AbilityStartCallback from './application/AbilityStartCallback'; -import { ConnectOptions as _ConnectOptions } from './ability/connectOptions'; import type * as _VpnExtensionContext from './application/VpnExtensionContext'; import type { AutoStartupCallback as _AutoStartupCallback } from './application/AutoStartupCallback'; import type { AutoStartupInfo as _AutoStartupInfo } from './application/AutoStartupInfo'; @@ -43,17 +40,22 @@ import * as _UIServiceProxy from './application/UIServiceProxy'; import * as _UIServiceHostProxy from './application/UIServiceHostProxy'; import * as _UIServiceExtensionConnectCallback from './application/UIServiceExtensionConnectCallback'; import * as _AppServiceExtensionContext from './application/AppServiceExtensionContext'; +import { PacMap as _PacMap } from './ability/dataAbilityHelper'; /*** endif */ -import { AbilityResult as _AbilityResult } from './ability/abilityResult'; /*** if arkts 1.2 */ import _UIAbilityContext from './application/UIAbilityContext'; import type _UIExtensionContext from './application/UIExtensionContext'; import _AbilityStageContext from './application/AbilityStageContext'; import _ApplicationContext from './application/ApplicationContext'; +import _BaseContext from './application/BaseContext'; import _Context from './application/Context'; import _ExtensionContext from './application/ExtensionContext'; import _ServiceExtensionContext from './application/ServiceExtensionContext'; +import _EventHub from './application/EventHub'; /*** endif */ +import { AbilityResult as _AbilityResult } from './ability/abilityResult'; +import type _AbilityStartCallback from './application/AbilityStartCallback'; +import { ConnectOptions as _ConnectOptions } from './ability/connectOptions'; /** * This module provides application context classes and common data structures. @@ -230,6 +232,18 @@ declare namespace common { */ export type BaseContext = _BaseContext.default; + /** + * The base context of 'app.Context' for FA Mode or 'application.Context' for Stage Mode. + * + * @typedef { _BaseContext } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + export type BaseContext = _BaseContext; + /** * The base context of an ability or an application. It allows access to * application-specific resources. @@ -376,6 +390,18 @@ declare namespace common { */ export type EventHub = _EventHub.default; + /** + * The event center of a context, support the subscription and publication of events. + * + * @typedef { _EventHub } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + export type EventHub = _EventHub; + /** * Defines a PacMap object for storing a series of values. * @@ -418,7 +444,8 @@ declare namespace common { * @typedef { _ConnectOptions } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type ConnectOptions = _ConnectOptions; @@ -464,7 +491,8 @@ declare namespace common { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type AbilityStartCallback = _AbilityStartCallback; diff --git a/api/@ohos.app.ability.contextConstant.d.ts b/api/@ohos.app.ability.contextConstant.d.ts index 723eb46972bc6ca2580a4529a6ca8a49c87b6f24..7742d6253f51337c81304163e7fb0366c4a58c04 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 } diff --git a/api/@ohos.app.ability.dataUriUtils.d.ts b/api/@ohos.app.ability.dataUriUtils.d.ts index cdaa9b52b135b9d5efffc9347310c0c801681255..63ba6905b878f18f1a47ad8d4f3d40879e8bffe1 100644 --- a/api/@ohos.app.ability.dataUriUtils.d.ts +++ b/api/@ohos.app.ability.dataUriUtils.d.ts @@ -23,7 +23,8 @@ * * @namespace dataUriUtils * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace dataUriUtils { /** @@ -34,7 +35,8 @@ declare namespace dataUriUtils { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getId(uri: string): number; @@ -47,7 +49,8 @@ declare namespace dataUriUtils { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function attachId(uri: string, id: number): string; @@ -59,7 +62,8 @@ declare namespace dataUriUtils { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function deleteId(uri: string): string; @@ -72,7 +76,8 @@ declare namespace dataUriUtils { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function updateId(uri: string, id: number): string; } diff --git a/api/@ohos.app.ability.dialogRequest.d.ts b/api/@ohos.app.ability.dialogRequest.d.ts index 275dc2f4173f94a9545c8bc955d6e3d6143af656..6d0ae949fef3cb9ef9b2d2f4aa4cd79fef759e9c 100644 --- a/api/@ohos.app.ability.dialogRequest.d.ts +++ b/api/@ohos.app.ability.dialogRequest.d.ts @@ -18,9 +18,7 @@ * @kit AbilityKit */ - /*** if arkts 1.1 */ import Want from './@ohos.app.ability.Want'; -/*** endif */ /** * Interface of request dialog. @@ -37,55 +35,61 @@ declare namespace dialogRequest { * @typedef WindowRect * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface WindowRect { /** * The left position of WindowRect * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - left: number; + left: int; /** * The top position of WindowRect * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - top: number; + top: int; /** * The width of WindowRect * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - width: number; + width: int; /** * The height of WindowRect * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - height: number; + height: int; } /** * Request info of a request. * * @typedef RequestInfo * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface RequestInfo { /** @@ -94,7 +98,8 @@ declare namespace dialogRequest { * @type { ?WindowRect } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ windowRect?: WindowRect } @@ -104,14 +109,16 @@ declare namespace dialogRequest { * * @enum { number } * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum ResultCode { /** * The modal bullet box requests succeeded. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ RESULT_OK = 0, @@ -119,7 +126,8 @@ declare namespace dialogRequest { * The modal bullet box requests Failed. * * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ RESULT_CANCEL = 1 } @@ -130,7 +138,8 @@ declare namespace dialogRequest { * @typedef RequestResult * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface RequestResult { /** @@ -139,7 +148,8 @@ declare namespace dialogRequest { * @type { ResultCode } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ result: ResultCode; @@ -149,7 +159,8 @@ declare namespace dialogRequest { * @type { ?Want } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ want?: Want; } @@ -159,7 +170,8 @@ declare namespace dialogRequest { * * @interface RequestCallback * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface RequestCallback { /** @@ -170,7 +182,8 @@ declare namespace dialogRequest { * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ setRequestResult(result: RequestResult): void; } @@ -183,7 +196,8 @@ declare namespace dialogRequest { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRequestInfo(want: Want): RequestInfo; @@ -195,7 +209,8 @@ declare namespace dialogRequest { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRequestCallback(want: Want): RequestCallback; } diff --git a/api/@ohos.app.ability.dialogSession.d.ts b/api/@ohos.app.ability.dialogSession.d.ts index c4836a1a28309d0c9354dfe8e8458d1eae79d0c8..e51f9fd394f27b76390a452b0487c103acc34a7e 100644 --- a/api/@ohos.app.ability.dialogSession.d.ts +++ b/api/@ohos.app.ability.dialogSession.d.ts @@ -80,46 +80,46 @@ declare namespace dialogSession { /** * The icon id of ability * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly * @since 11 */ - abilityIconId: number; + abilityIconId: int; /** * The label id of ability * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly * @since 11 */ - abilityLabelId: number; + abilityLabelId: int; /** * The icon id of bundle * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly * @since 11 */ - bundleIconId: number; + bundleIconId: int; /** * The label id of bundle * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly * @since 11 */ - bundleLabelId: number; + bundleLabelId: int; /** * The ability is visible @@ -135,13 +135,13 @@ declare namespace dialogSession { /** * Index of an application clone. It takes effect only for cloned applications. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly * @since 12 */ - appIndex: number; + appIndex: int; /** * The mode of the multi-application. diff --git a/api/@ohos.app.ability.insightIntent.d.ts b/api/@ohos.app.ability.insightIntent.d.ts index 15573c0ef29db9410e5eebf11538039d6216eead..0937b499060c3a0f1aaa9e5af5ac810410fea73b 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,19 +94,21 @@ 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 { /** * Indicates result code. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - code: number; + code: int; /** * Indicates execute result. @@ -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; @@ -131,13 +141,14 @@ declare namespace insightIntent { * {@link wantConstant#Flags#FLAG_AUTH_READ_URI_PERMISSION}| * {@link wantConstant#Flags#FLAG_AUTH_WRITE_URI_PERMISSION}. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - flags?: number; + flags?: int; } /** diff --git a/api/@ohos.app.ability.insightIntentDriver.d.ts b/api/@ohos.app.ability.insightIntentDriver.d.ts index df8657ac8f734fc3013c48cc0bc649ee2db3b102..7aac48bfcb970470be261e5f3d6e05d0f831a2e5 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,20 +112,22 @@ 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; /** * Indicates the display Id, only works when executeMode is UIAbility foreground. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @StageModelOnly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - displayId?: number; + displayId?: long; /** * Indicates the URIs will be authorized to the insight intent executor. @@ -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; @@ -138,13 +148,14 @@ declare namespace insightIntentDriver { * {@link wantConstant#Flags#FLAG_AUTH_READ_URI_PERMISSION}| * {@link wantConstant#Flags#FLAG_AUTH_WRITE_URI_PERMISSION}. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - flags?: number; + flags?: int; } /** @@ -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; diff --git a/api/@ohos.app.ability.kioskManager.d.ts b/api/@ohos.app.ability.kioskManager.d.ts index 6003ad9dfa5d557ac5c1278314168d68311bbed7..5b7350d02570cdace872f26626a178a038d29ce3 100644 --- a/api/@ohos.app.ability.kioskManager.d.ts +++ b/api/@ohos.app.ability.kioskManager.d.ts @@ -28,7 +28,6 @@ import { KioskStatus as _KioskStatus } from './application/KioskStatus'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since 20 - * @arkts 1.1&1.2 */ declare namespace kioskManager { /** @@ -44,7 +43,6 @@ declare namespace kioskManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since 20 - * @arkts 1.1&1.2 */ function enterKioskMode(context: UIAbilityContext): Promise; @@ -60,7 +58,6 @@ declare namespace kioskManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since 20 - * @arkts 1.1&1.2 */ function exitKioskMode(context: UIAbilityContext): Promise; @@ -75,7 +72,6 @@ declare namespace kioskManager { * @systemapi * @stagemodelonly * @since 20 - * @arkts 1.1&1.2 */ function getKioskStatus(): Promise; @@ -86,7 +82,6 @@ declare namespace kioskManager { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since 20 - * @arkts 1.1&1.2 */ export type KioskStatus = _KioskStatus; } diff --git a/api/@ohos.app.ability.missionManager.d.ts b/api/@ohos.app.ability.missionManager.d.ts index d7a1be6b8d7fa83a051009bca53d83e33b3084d9..36a47ddd11d838987a38cb1aacc9d9b7acd393fa 100644 --- a/api/@ohos.app.ability.missionManager.d.ts +++ b/api/@ohos.app.ability.missionManager.d.ts @@ -20,9 +20,11 @@ import { AsyncCallback } from './@ohos.base'; import { MissionInfo as _MissionInfo } from './application/MissionInfo'; +/*** if arkts 1.1 */ import { MissionListener as _MissionListener } from './application/MissionListener'; import { MissionSnapshot as _MissionSnapshot } from './application/MissionSnapshot'; import StartOptions from './@ohos.app.ability.StartOptions'; +/*** endif */ /** * This module provides the capability to manage abilities and obtaining system task information. @@ -30,7 +32,8 @@ import StartOptions from './@ohos.app.ability.StartOptions'; * @namespace missionManager * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace missionManager { /** @@ -91,7 +94,7 @@ declare namespace missionManager { * * @permission ohos.permission.MANAGE_MISSIONS * @param { string } deviceId - Indicates the device to be queried. - * @param { number } missionId - Indicates mission id to be queried. + * @param { int } missionId - Indicates mission id to be queried. * @param { AsyncCallback } callback - The callback is used to return the MissionInfo of the given id. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -99,16 +102,17 @@ declare namespace missionManager { * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getMissionInfo(deviceId: string, missionId: number, callback: AsyncCallback): void; + function getMissionInfo(deviceId: string, missionId: int, callback: AsyncCallback): void; /** * Get the missionInfo with the given missionId. * * @permission ohos.permission.MANAGE_MISSIONS * @param { string } deviceId - Indicates the device to be queried. - * @param { number } missionId - Indicates mission id to be queried. + * @param { int } missionId - Indicates mission id to be queried. * @returns { Promise } Returns the MissionInfo of the given id. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. @@ -116,9 +120,10 @@ declare namespace missionManager { * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getMissionInfo(deviceId: string, missionId: number): Promise; + function getMissionInfo(deviceId: string, missionId: int): Promise; /** * Get missionInfos in the given deviceId with maximum number of numMax. @@ -339,7 +344,8 @@ declare namespace missionManager { * 2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function clearAllMissions(callback: AsyncCallback): void; @@ -352,7 +358,8 @@ declare namespace missionManager { * @throws { BusinessError } 202 - Not system application. * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function clearAllMissions(): Promise; @@ -502,7 +509,8 @@ declare namespace missionManager { * @typedef { _MissionInfo } * @syscap SystemCapability.Ability.AbilityRuntime.Mission * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type MissionInfo = _MissionInfo; diff --git a/api/@ohos.app.ability.quickFixManager.d.ts b/api/@ohos.app.ability.quickFixManager.d.ts index 99f73be5ae201716f72688906f17422d2032a847..77da4a09053a7cbba4c44e861499d37f979b2119 100644 --- a/api/@ohos.app.ability.quickFixManager.d.ts +++ b/api/@ohos.app.ability.quickFixManager.d.ts @@ -95,13 +95,13 @@ declare namespace quickFixManager { /** * The version number of the bundle. * - * @type { number } + * @type { long } * @readonly * @syscap SystemCapability.Ability.AbilityRuntime.QuickFix * @systemapi * @since 9 */ - readonly bundleVersionCode: number; + readonly bundleVersionCode: long; /** * The version name of the bundle. @@ -117,13 +117,13 @@ declare namespace quickFixManager { /** * The version number of the quick fix. * - * @type { number } + * @type { long } * @readonly * @syscap SystemCapability.Ability.AbilityRuntime.QuickFix * @systemapi * @since 9 */ - readonly quickFixVersionCode: number; + readonly quickFixVersionCode: long; /** * The version name of the quick fix. diff --git a/api/@ohos.app.ability.wantAgent.d.ts b/api/@ohos.app.ability.wantAgent.d.ts index 7f6e272894901edcf76f0032dbbbf8b8d0658876..c06e02e9fb1616b147e9c5ff6c813ad855eefd23 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; @@ -121,16 +127,17 @@ declare namespace wantAgent { * This API uses an asynchronous callback to return the result. * * @param { WantAgent } agent - Target WantAgent object. - * @param { AsyncCallback } callback - Callback used to return the user ID. + * @param { AsyncCallback } callback - Callback used to return the user ID. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later. * @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 getUid(agent: WantAgent, callback: AsyncCallback): void; + function getUid(agent: WantAgent, callback: AsyncCallback): void; /** * Obtains the UID of a WantAgent. @@ -149,16 +156,17 @@ declare namespace wantAgent { * This API uses a promise to return the result. * * @param { WantAgent } agent - Target WantAgent object. - * @returns { Promise } Promise used to return the user ID. + * @returns { Promise } Promise used to return the user ID. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later. * @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 getUid(agent: WantAgent): Promise; + function getUid(agent: WantAgent): Promise; /** * Obtains the Want in a WantAgent object. @@ -173,7 +181,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 +199,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 +228,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 +257,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 +284,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 +335,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 +364,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 +398,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 +432,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; @@ -438,7 +455,7 @@ declare namespace wantAgent { * This API uses an asynchronous callback to return the result. * * @param { WantAgent } agent - Target WantAgent object. - * @param { AsyncCallback } callback - Callback used to return the operation type. + * @param { AsyncCallback } callback - Callback used to return the operation type. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later. @@ -446,9 +463,10 @@ 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; + function getOperationType(agent: WantAgent, callback: AsyncCallback): void; /** * Obtains the {@link OperationType} of a WantAgent. @@ -468,7 +486,7 @@ declare namespace wantAgent { * This API uses a promise to return the result. * * @param { WantAgent } agent - Indicates the WantAgent. - * @returns { Promise } Returns the OperationType of the WantAgent. + * @returns { Promise } Returns the OperationType of the WantAgent. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types. * @throws { BusinessError } 16000007 - Service busy. There are concurrent tasks. Try again later. @@ -476,9 +494,10 @@ 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; + function getOperationType(agent: WantAgent): Promise; /** * Enables or disables the WantAgent multithreading feature. @@ -509,7 +528,6 @@ declare namespace wantAgent { * @systemapi * @stagemodelonly * @since 20 - * @arkts 1.1&1.2 */ function createLocalWantAgent(info: LocalWantAgentInfo): WantAgent; @@ -540,7 +558,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 +574,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 +591,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 +608,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 +625,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 +641,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 +662,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 +683,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 +704,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 +725,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 +746,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 +765,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 +780,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 +796,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 +812,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 +828,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 +844,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 +855,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 +874,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 { /** @@ -854,7 +891,8 @@ declare namespace wantAgent { * @type { WantAgent } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ info: WantAgent; @@ -871,7 +909,8 @@ declare namespace wantAgent { * @type { Want } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ want: Want; @@ -885,12 +924,13 @@ declare namespace wantAgent { /** * Request code that triggers the WantAgent object. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - finalCode: number; + finalCode: int; /** * Final data collected by the common event. @@ -905,7 +945,8 @@ declare namespace wantAgent { * @type { string } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ finalData: string; @@ -929,7 +970,8 @@ declare namespace wantAgent { * @type { ?Record } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ extraInfo?: Record; } @@ -947,7 +989,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 +1007,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 +1019,6 @@ declare namespace wantAgent { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ export type LocalWantAgentInfo = _LocalWantAgentInfo; @@ -986,7 +1029,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..97b6fe495017051e29ac687fa029287ecef09e04 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,26 +369,29 @@ 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', /** - * Indicates the dest ability refers to a plugin ability. + * Indicates the param of the appIdentifier trustlist when implicitly launching applications. * * @syscap SystemCapability.Ability.AbilityBase - * @since 19 + * @atomicservice + * @since arkts {'1.1':'17', '1.2':'20'} + * @arkts 1.1&1.2 */ - DESTINATION_PLUGIN_ABILITY = 'ohos.params.pluginAbility', + APP_LAUNCH_TRUSTLIST = 'ohos.params.appLaunchTrustList', /** - * Indicates the param of the appIdentifier trustlist when implicitly launching applications. + * Indicates the dest ability refers to a plugin ability. * * @syscap SystemCapability.Ability.AbilityBase - * @atomicservice - * @since 17 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ - APP_LAUNCH_TRUSTLIST = 'ohos.params.appLaunchTrustList', + DESTINATION_PLUGIN_ABILITY = 'ohos.params.pluginAbility', /** * Indicates the unified data key used to share file uri. @@ -374,12 +404,13 @@ declare namespace wantConstant { /** * Indicates the key of the page route upon sharing atomic service. - * + * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ - ATOMIC_SERVICE_SHARE_ROUTER = 'ohos.params.atomicservice.shareRouter', + ATOMIC_SERVICE_SHARE_ROUTER = 'ohos.params.atomicservice.shareRouter' } /** @@ -434,7 +465,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 +481,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 +490,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 +499,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 +511,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 +520,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 +530,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.StartupConfig.d.ts b/api/@ohos.app.appstartup.StartupConfig.d.ts index 8e5917b48b69e1244a6a0b4f15e96c20fb282ae4..41bef11f66bc59e1e9ab09373931c638b22da1bd 100644 --- a/api/@ohos.app.appstartup.StartupConfig.d.ts +++ b/api/@ohos.app.appstartup.StartupConfig.d.ts @@ -32,13 +32,13 @@ export default interface StartupConfig { /** * Indicates timeout for executing all startup tasks. Default value is 10000 milliseconds. * - * @type { ?number } + * @type { ?int } * @default 10000 * @syscap SystemCapability.Ability.AppStartup * @stagemodelonly * @since 12 */ - timeoutMs?: number; + timeoutMs?: int; /** * Indicates a listener for startup, which will be called when all tasks complete. 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..f5890e340d23ba44409f450d245a6ee70cf27b57 100644 --- a/api/@ohos.app.form.FormExtensionAbility.d.ts +++ b/api/@ohos.app.form.FormExtensionAbility.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 @@ -19,13 +19,41 @@ */ import formBindingData from './@ohos.app.form.formBindingData'; -/*** if arkts 1.1 */ import formInfo from './@ohos.app.form.formInfo'; -/*** endif */ import FormExtensionContext from './application/FormExtensionContext'; import Want from './@ohos.app.ability.Want'; import { Configuration } from './@ohos.app.ability.Configuration'; +/** + * Called to return a {@link FormState} object. + *

You must override this callback if you want this ability to return the actual form state. Otherwise, + * this method returns {@link FormState#DEFAULT} by default.

+ * + * @typedef { function } + * @param { Want } want - Indicates the description of the form for which the {@link formInfo#FormState} + * is obtained. The description covers the bundle name, ability name, module name, + * form name, and form dimensions. + * @returns { formInfo.FormState } Returns the {@link formInfo#FormState} object. + * @syscap SystemCapability.Ability.Form + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +type OnAcquireFormStateFn = (want: Want) => formInfo.FormState; + +/** + * 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. * @@ -159,7 +187,7 @@ declare class FormExtensionAbility { /** * Called when the form provider receives form events from the system. * - * @param { Record } newStatus - Indicates the form events occurred. The key in the {@code Map} + * @param { Record } newStatus - Indicates the form events occurred. The key in the {@code Map} * object indicates the form ID, and the value indicates the event * type, which can be either * {@link formInfo#VisibilityType#FORM_VISIBLE} or @@ -173,7 +201,7 @@ declare class FormExtensionAbility { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - onChangeFormVisibility(newStatus: Record): void; + onChangeFormVisibility(newStatus: Record): void; /** * Called when a specified message event defined by the form provider is triggered. This method is valid only for @@ -240,7 +268,8 @@ declare class FormExtensionAbility { * @syscap SystemCapability.Ability.Form * @stagemodelonly * @atomicservice - * @since 11 + * @since arkts{ '1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ onConfigurationUpdate(newConfig: Configuration): void; @@ -273,6 +302,20 @@ declare class FormExtensionAbility { */ onAcquireFormState?(want: Want): formInfo.FormState; + /** + * Called to return a {@link FormState} object. + *

You must override this callback if you want this ability to return the actual form state. Otherwise, + * this method returns {@link FormState#DEFAULT} by default.

+ * + * @type { ?OnAcquireFormStateFn } + * @syscap SystemCapability.Ability.Form + * @stagemodelonly + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + onAcquireFormState?: OnAcquireFormStateFn; + /** * Called when the system shares the form. * @@ -327,6 +370,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,6 +390,7 @@ declare class FormExtensionAbility { * * @syscap SystemCapability.Ability.Form * @stagemodelonly + * @atomicservice * @since 20 */ onFormLocationChanged(formId: string, newFormLocation: formInfo.FormLocation): void; diff --git a/api/@ohos.app.form.LiveFormExtensionAbility.d.ts b/api/@ohos.app.form.LiveFormExtensionAbility.d.ts index 88ad4daeaac08d994b22cb9c941b8fd20f32eb62..07d19b487dc7b74e0950f6b6acc5306290e588c2 100644 --- a/api/@ohos.app.form.LiveFormExtensionAbility.d.ts +++ b/api/@ohos.app.form.LiveFormExtensionAbility.d.ts @@ -33,7 +33,7 @@ import formInfo from './@ohos.app.form.formInfo'; */ export interface LiveFormInfo { /** - * The form id. + * The form id of the live form. * * @type { string } * @syscap SystemCapability.Ability.Form @@ -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..12eb8ddc62f26ade4aa735d4ca31223d546c263a 100644 --- a/api/@ohos.app.form.formHost.d.ts +++ b/api/@ohos.app.form.formHost.d.ts @@ -617,7 +617,7 @@ declare namespace formHost { * * @permission ohos.permission.REQUIRE_FORM * @param { Array } formIds - Indicates the specified form id. - * @param { AsyncCallback } callback - The callback is used to return the number of invalid forms deleted + * @param { AsyncCallback } callback - The callback is used to return the number of invalid forms deleted * by the Form Manager Service. * @throws { BusinessError } 201 - Permissions denied. * @throws { BusinessError } 202 - The application is not a system application. @@ -630,7 +630,7 @@ declare namespace formHost { * @systemapi * @since 9 */ - function deleteInvalidForms(formIds: Array, callback: AsyncCallback): void; + function deleteInvalidForms(formIds: Array, callback: AsyncCallback): void; /** * Deletes invalid forms of the application in the Form Manager Service based on the list of. @@ -638,7 +638,7 @@ declare namespace formHost { * * @permission ohos.permission.REQUIRE_FORM * @param { Array } formIds - Indicates the specified form id. - * @returns { Promise } Returns the number of invalid forms deleted by the Form Manager Service. + * @returns { Promise } Returns the number of invalid forms deleted by the Form Manager Service. * @throws { BusinessError } 201 - Permissions denied. * @throws { BusinessError } 202 - The application is not a system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -650,7 +650,7 @@ declare namespace formHost { * @systemapi * @since 9 */ - function deleteInvalidForms(formIds: Array): Promise; + function deleteInvalidForms(formIds: Array): Promise; /** * Obtains the Form state. diff --git a/api/@ohos.app.form.formInfo.d.ts b/api/@ohos.app.form.formInfo.d.ts index 72db9a2b3740f901e686d0defb46db5ba577c51a..a1d033a4df471ee276132b6fa398069705cdbce0 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,19 +132,21 @@ 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; /** * Obtains the displayName resource id of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - displayNameId: number; + displayNameId: int; /** * Obtains the description of this form. @@ -153,26 +161,28 @@ 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; /** * Obtains the description id of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @since 10 */ /** * Obtains the description id of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - descriptionId: number; + descriptionId: int; /** * Obtains the type of this form. Currently, JS forms are supported. @@ -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,60 +323,64 @@ 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; /** * Obtains the updateDuration. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Obtains the updateDuration. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - updateDuration: number; + updateDuration: int; /** * Obtains the default grid style of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Obtains the default grid style of this form. * - * @type { number } + * @type { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - defaultDimension: number; + defaultDimension: int; /** * Obtains the grid styles supported by this form. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Obtains the grid styles supported by this form. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - supportDimensions: Array; + supportDimensions: Array; /** * Obtains the custom data defined in this form. @@ -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,31 +425,34 @@ 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; /** * Obtains the shape supported by this form. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - supportedShapes: Array; + supportedShapes: Array; /** * Indicates the form previewImage IDs map corresponds to the \"supportDimensions\". * - * @type { ?Array } + * @type { ?Array } * @readonly * @syscap SystemCapability.Ability.Form * @systemapi * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly previewImages?: Array; + readonly previewImages?: Array; /** * Indicates whether the form uses a blur background provided by the form host. @@ -447,47 +461,78 @@ 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; /** - * Indicates the fun interaction form params + * Obtains the rendering mode of the form. * - * @type { ?FunInteractionParams } + * @type { ?RenderingMode } * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 20 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly funInteractionParams?: FunInteractionParams; + readonly renderingMode?: RenderingMode; + } + /** + * Rendering mode. + * + * @enum { int } + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ + enum RenderingMode { /** - * Indicates the scene animation form params + * Auto color mode. * - * @type { ?SceneAnimationParams } - * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 20 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly sceneAnimationParams?: SceneAnimationParams; + 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 } /** * Type of form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Type of form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormType { /** @@ -501,7 +546,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 +562,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 } @@ -524,14 +571,14 @@ declare namespace formInfo { /** * Color mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Color mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice * @since 11 @@ -550,6 +597,7 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @atomicservice * @since 11 + * @deprecated since 20 */ MODE_AUTO = -1, @@ -565,6 +613,7 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @atomicservice * @since 11 + * @deprecated since 20 */ MODE_DARK = 0, @@ -580,47 +629,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 +647,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 +664,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 +682,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; } @@ -675,17 +691,18 @@ declare namespace formInfo { /** * Provides state about a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Provides state about a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormState { /** @@ -699,7 +716,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 +732,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 +748,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 +767,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 +792,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 +818,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 +844,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 +874,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 +900,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 +926,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 +952,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 +978,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 +1004,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 +1019,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 +1034,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 +1060,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 +1090,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 +1104,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 +1130,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 +1145,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 +1160,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,7 +1175,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_GRANTED_KEY = 'ohos.extra.param.key.permission_granted', } @@ -1157,7 +1196,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 +1207,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 +1227,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; @@ -1194,39 +1236,42 @@ declare namespace formInfo { * optional supportedDimensions that used to ask getFormsInfo to return * form infos with the same supportedDimensions. * - * @type { ?Array } + * @type { ?Array } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - supportedDimensions?: Array; + supportedDimensions?: Array; /** * optional supportedShapes that used to ask getFormsInfo to return * form infos with the same supportedShapes. * - * @type { ?Array } + * @type { ?Array } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - supportedShapes?: Array; + supportedShapes?: Array; } /** * Defines the FormDimension enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * Defines the FormDimension enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormDimension { /** @@ -1240,7 +1285,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 +1301,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 +1317,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 +1333,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,33 +1350,37 @@ declare namespace formInfo { * @syscap SystemCapability.Ability.Form * @atomicservice * @since 11 + * @deprecated since 20 */ - Dimension_2_1, + Dimension_2_1 = 5, /** * 1 x 1 form * * @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 +1389,20 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - DIMENSION_3_3 = 9, - - /** - * 3 x 4 form used for tv devices - * - * @syscap SystemCapability.Ability.Form - * @atomicservice - * @since 18 - */ - DIMENSION_3_4 = 10, + DIMENSION_3_3 = 9 } - /** + /** * Defines the FormShape enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormShape { /** @@ -1364,7 +1410,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,25 +1420,27 @@ 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 } /** * The visibility of a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 9 */ /** * The visibility of a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum VisibilityType { /** @@ -1409,7 +1458,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 +1477,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,25 +1496,27 @@ 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 } /** * Indicates the launch reason of a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 10 */ /** * Indicates the launch reason of a form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum LaunchReason { /** @@ -1477,7 +1530,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 +1545,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_SHARE + FORM_SHARE = 2 } /** @@ -1503,7 +1558,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 +1569,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 +1581,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; } @@ -1532,11 +1590,12 @@ declare namespace formInfo { /** * The error code of publish form. * - * @enum { number } + * @enum { int } * @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 +1604,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 +1615,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 +1626,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 +1637,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 +1650,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 +1661,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 +1673,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 +1685,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 +1697,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 +1710,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; } @@ -1653,7 +1722,8 @@ declare namespace formInfo { * @typedef RunningFormInfo * @syscap SystemCapability.Ability.Form * @systemapi hide this for inner system use - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface RunningFormInfo { /** @@ -1664,7 +1734,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 formId: string; @@ -1676,7 +1747,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 bundleName: string; @@ -1688,7 +1760,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; @@ -1700,7 +1773,8 @@ declare namespace formInfo { * @default - * @syscap SystemCapability.Ability.Form * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly formLocation: FormLocation; @@ -1712,7 +1786,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; @@ -1724,7 +1799,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 moduleName: string; @@ -1736,7 +1812,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 abilityName: string; @@ -1748,21 +1825,23 @@ 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 formName: string; /** * Obtains the grid style of this form. * - * @type { number } - * @readonly + * @type { int } * @default - + * @readonly * @syscap SystemCapability.Ability.Form * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly dimension: number; + readonly dimension: int; /** * Obtains the stage of form use. @@ -1772,7 +1851,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 +1863,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 +1876,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; } @@ -1803,10 +1885,11 @@ declare namespace formInfo { /** * The stage of form use. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FormUsageState { /** @@ -1814,7 +1897,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 +1906,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 +1923,10 @@ declare namespace formInfo { /** * Defines the FormLocation enum. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ enum FormLocation { /** @@ -1848,7 +1934,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, @@ -1864,6 +1951,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ DESKTOP = 0, @@ -1879,6 +1967,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ FORM_CENTER = 1, @@ -1894,6 +1983,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ FORM_MANAGER = 2, @@ -1909,6 +1999,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ NEGATIVE_SCREEN = 3, @@ -1917,7 +2008,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 +2018,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, @@ -1942,6 +2035,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ SCREEN_LOCK = 6, @@ -1957,6 +2051,7 @@ declare namespace formInfo { * * @syscap SystemCapability.Ability.Form * @since 20 + * @arkts 1.1&1.2 */ AI_SUGGESTION = 7, } diff --git a/api/@ohos.app.form.formProvider.d.ts b/api/@ohos.app.form.formProvider.d.ts index 7bd2de5b9bae2f9b673b8df69291575c701182f0..62eedd9b0c75d3b97ffd862163dd53d2079be8c5 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,14 +38,15 @@ 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 { /** * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { number } minute - Indicates duration minute before next update. + * @param { int } minute - Indicates duration minute before next update. * @param { AsyncCallback } callback - The callback of setFormNextRefreshTime. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. @@ -61,7 +64,7 @@ declare namespace formProvider { * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { number } minute - Indicates duration minute before next update. + * @param { int } minute - Indicates duration minute before next update. * @param { AsyncCallback } callback - The callback of setFormNextRefreshTime. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. @@ -74,15 +77,16 @@ 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; + function setFormNextRefreshTime(formId: string, minute: int, callback: AsyncCallback): void; /** * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { number } minute - Indicates duration minute before next update. + * @param { int } minute - Indicates duration minute before next update. * @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; 3.Parameter verification failed. @@ -100,7 +104,7 @@ declare namespace formProvider { * Set next update time for a specified form. * * @param { string } formId - Indicates the form ID. - * @param { number } minute - Indicates duration minute before next update. + * @param { int } minute - Indicates duration minute before next update. * @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; 3.Parameter verification failed. @@ -113,9 +117,10 @@ 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; + function setFormNextRefreshTime(formId: string, minute: int): Promise; /** * Update a specified form. @@ -375,6 +380,24 @@ declare namespace formProvider { */ function isRequestPublishFormSupported(): Promise; + /** + * Open the form edit ability + * + * @param { string } abilityName - Indicates the form edit ability name. + * @param { string } formId - Indicates the edit form ID. + * @param { boolean } isMainPage - Indicates open the main edit page, default is true + * + * @throws { BusinessError } 801 - Capability not supported.function openFormEditAbility can not work correctly due to limited device capabilities. + * @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 } 16501003 - The form cannot be operated by the current application. + * @throws { BusinessError } 16501007 - Form is not trust. + * @syscap SystemCapability.Ability.Form + * @since 18 + */ + function openFormEditAbility(abilityName: string, formId: string, isMainPage?: boolean): void; + /** * Get infos of the published form belonging to current bundle. * Client to communicate with FormManagerService. @@ -434,24 +457,6 @@ declare namespace formProvider { */ function openFormManagerCrossBundle(want: Want): void - /** - * Open the form edit ability - * - * @param { string } abilityName - Indicates the form edit ability name. - * @param { string } formId - Indicates the edit form ID. - * @param { boolean } isMainPage - Indicates open the main edit page, default is true - * - * @throws { BusinessError } 801 - Capability not supported.function openFormEditAbility can not work correctly due to limited device capabilities. - * @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 } 16501003 - The form cannot be operated by the current application. - * @throws { BusinessError } 16501007 - Form is not trust. - * @syscap SystemCapability.Ability.Form - * @since 18 - */ - function openFormEditAbility(abilityName: string, formId: string, isMainPage?: boolean): void; - /** * Activate scene animation * diff --git a/api/@ohos.application.DataShareExtensionAbility.d.ts b/api/@ohos.application.DataShareExtensionAbility.d.ts index 4dc30e5505a39452b36c2af1f660fe9ae539a23c..177444235a8ba5937c47d633a39bc6fcd262bd7b 100644 --- a/api/@ohos.application.DataShareExtensionAbility.d.ts +++ b/api/@ohos.application.DataShareExtensionAbility.d.ts @@ -42,7 +42,8 @@ type UpdateOperation = dataShare.UpdateOperation; * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export default class DataShareExtensionAbility { /** @@ -52,7 +53,8 @@ export default class DataShareExtensionAbility { * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @systemapi * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ context: ExtensionContext; @@ -64,7 +66,8 @@ export default class DataShareExtensionAbility { * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ onCreate?(want: Want, callback: AsyncCallback): void; @@ -92,7 +95,8 @@ export default class DataShareExtensionAbility { * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ update?( uri: string, @@ -126,7 +130,8 @@ export default class DataShareExtensionAbility { * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ delete?(uri: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback): void; @@ -143,7 +148,8 @@ export default class DataShareExtensionAbility { * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ query?( uri: string, @@ -161,7 +167,8 @@ export default class DataShareExtensionAbility { * @syscap SystemCapability.DistributedDataManager.DataShare.Provider * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ batchInsert?(uri: string, valueBuckets: Array, callback: AsyncCallback): void; diff --git a/api/@ohos.application.StaticSubscriberExtensionAbility.d.ts b/api/@ohos.application.StaticSubscriberExtensionAbility.d.ts index d238b3dcf966ef794b4a001cf76b596e00355d1d..5f8dd6ed766fa661988603fb27aaf4ec76132a56 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; \ No newline at end of file diff --git a/api/@ohos.application.StaticSubscriberExtensionContext.d.ts b/api/@ohos.application.StaticSubscriberExtensionContext.d.ts index ebb8029c2d275b3d773c8ede4209d7c07bcb20fd..688ff07f1a0bed8bcfdf7bf6349de3188489fc40 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; \ No newline at end of file diff --git a/api/@ohos.application.formError.d.ts b/api/@ohos.application.formError.d.ts index 41eedb71973c5f15a64929c1e5b46699e83f3878..e0a3fd46986364447a2bbfb5b2823dcc6172f300 100644 --- a/api/@ohos.application.formError.d.ts +++ b/api/@ohos.application.formError.d.ts @@ -23,22 +23,25 @@ * * @namespace formError * @syscap SystemCapability.Ability.Form - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace formError { /** * Error of form. * - * @enum { number } + * @enum { int } * @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.application.testRunner.d.ts b/api/@ohos.application.testRunner.d.ts index ea86d1c15bdffb3c8d6cba4fe063a05a8d754121..ebd8837d3ff1e5422ef584cfac24be8cf8e809b0 100644 --- a/api/@ohos.application.testRunner.d.ts +++ b/api/@ohos.application.testRunner.d.ts @@ -18,6 +18,28 @@ * @kit TestKit */ +/** + * Prepare the unit testing environment for running test cases. + * + * @typedef { Function } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ +type OnPrepareFn = () => void; + +/** + * Run all test cases. + * + * @typedef { Function } + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ +type OnRunFn = () => void; + /** * Base class for the test framework. * If you want to implement your own unit test framework, you must inherit this class and overrides all its methods. @@ -45,13 +67,14 @@ interface TestRunner { */ /** * Prepare the unit testing environment for running test cases. - * + * + * @type { OnPrepareFn } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - onPrepare(): void; + onPrepare: OnPrepareFn; /** * Run all test cases. @@ -62,12 +85,13 @@ interface TestRunner { /** * Run all test cases. * + * @typedef { OnRunFn } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - onRun(): void; + onRun: OnRunFn; } /*** if arkts 1.1 */ diff --git a/api/@ohos.application.uriPermissionManager.d.ts b/api/@ohos.application.uriPermissionManager.d.ts index c4114ab741e5031dafcf0b130e4e6b4b6d61cc2b..a69039892adab18053fd025b77e7229268af766d 100644 --- a/api/@ohos.application.uriPermissionManager.d.ts +++ b/api/@ohos.application.uriPermissionManager.d.ts @@ -169,7 +169,7 @@ declare namespace uriPermissionManager { * wantConstant.Flags.FLAG_AUTH_WRITE_URI_PERMISSION or * wantConstant.Flags.FLAG_AUTH_PERSISTABLE_URI_PERMISSION. * @param { string } targetBundleName - Indicates the bundle name of authorization target. - * @param { number } appCloneIndex - Indicates the clone index of target application. + * @param { int } appCloneIndex - Indicates the clone index of target application. * @returns { Promise } - the promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. @@ -187,7 +187,7 @@ declare namespace uriPermissionManager { * @since arkts {'1.1':'19', '1.2':'20'} * @arkts 1.1&1.2 */ - function grantUriPermission(uri: string, flag: wantConstant.Flags, targetBundleName: string, appCloneIndex: number): Promise; + function grantUriPermission(uri: string, flag: wantConstant.Flags, targetBundleName: string, appCloneIndex: int): Promise; /** * Revoke URI from one application @@ -320,7 +320,7 @@ declare namespace uriPermissionManager { * * @param { string } uri - File URI. * @param { string } targetBundleName - Indicates the bundle name of authorization target. - * @param { number } appCloneIndex - Indicates the clone index of target application. + * @param { int } appCloneIndex - Indicates the clone index of target application. * @returns { Promise } - the promise returned by the function. * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -335,7 +335,7 @@ declare namespace uriPermissionManager { * @since arkts {'1.1':'19', '1.2':'20'} * @arkts 1.1&1.2 */ - function revokeUriPermission(uri: string, targetBundleName: string, appCloneIndex: number): Promise; + function revokeUriPermission(uri: string, targetBundleName: string, appCloneIndex: int): Promise; /** * Grant URIs in UDkey to another application @@ -343,7 +343,7 @@ declare namespace uriPermissionManager { * @param { wantConstant.Flags } flag - wantConstant.Flags.FLAG_AUTH_READ_URI_PERMISSION, * wantConstant.Flags.FLAG_AUTH_WRITE_URI_PERMISSION or * wantConstant.Flags.FLAG_AUTH_PERSISTABLE_URI_PERMISSION. - * @param { number } targetTokenId - Indicates the token id of target application. + * @param { int } targetTokenId - Indicates the token id of target application. * @returns { Promise } - The promise returned by the function. * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. * @throws { BusinessError } 801 - Capability not supported. @@ -357,7 +357,7 @@ declare namespace uriPermissionManager { * @systemapi Hide this for inner system use. * @since 20 */ - function grantUriPermissionByKey(key: string, flag: wantConstant.Flags, targetTokenId: number): Promise; + function grantUriPermissionByKey(key: string, flag: wantConstant.Flags, targetTokenId: int): Promise; /** * Grant URIs in UDkey to another application @@ -366,8 +366,8 @@ declare namespace uriPermissionManager { * @param { wantConstant.Flags } flag - wantConstant.Flags.FLAG_AUTH_READ_URI_PERMISSION, * wantConstant.Flags.FLAG_AUTH_WRITE_URI_PERMISSION or * wantConstant.Flags.FLAG_AUTH_PERSISTABLE_URI_PERMISSION. - * @param { number } callerTokenId - Indicates the token id of caller application. - * @param { number } targetTokenId - Indicates the token id of target application. + * @param { int } callerTokenId - Indicates the token id of caller application. + * @param { int } targetTokenId - Indicates the token id of target application. * @returns { Promise } - The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not System App. Interface caller is not a system app. @@ -383,7 +383,7 @@ declare namespace uriPermissionManager { * @systemapi Hide this for inner system use. * @since 20 */ - function grantUriPermissionByKeyAsCaller(key: string, flag: wantConstant.Flags, callerTokenId: number, targetTokenId: number): Promise; + function grantUriPermissionByKeyAsCaller(key: string, flag: wantConstant.Flags, callerTokenId: int, targetTokenId: int): Promise; } export default uriPermissionManager; \ No newline at end of file diff --git a/api/@ohos.arkui.ArcAlphabetIndexer.d.ts b/api/@ohos.arkui.ArcAlphabetIndexer.d.ts index d8561313e21dd5a07ef7928df922a4c686f209f0..c5a76f313d523eaea4592b5c46dbacbbcc3c5449 100755 --- a/api/@ohos.arkui.ArcAlphabetIndexer.d.ts +++ b/api/@ohos.arkui.ArcAlphabetIndexer.d.ts @@ -1,6 +1,6 @@ /* * Copyright (c) 2024 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 * @@ -27,7 +27,7 @@ * @atomicservice * @since 18 */ -declare interface ArcAlphabetIndexerInitInfo { +declare interface ArcAlphabetIndexerInitInfo { /** * Array of alphabetic indexed strings, cannot be set to empty. * @@ -60,7 +60,7 @@ declare interface ArcAlphabetIndexerInitInfo { * @atomicservice * @since 18 */ -declare type OnSelectCallback = (index: number) => void; +declare type OnSelectCallback = (index: number) => void; /** * Arc Alphabet index bar. @@ -275,6 +275,15 @@ declare class ArcAlphabetIndexerAttribute extends CommonMethod void; - -/** - * Provide methods for controlling ArcSwiper component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ -export class ArcSwiperController { - /** - * A constructor used to create a ArcSwiperController object. - * - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - constructor(); - - /** - * Show next subcomponent. - * - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - showNext(); - - /** - * Show previous subcomponent. - * - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - showPrevious(); - - /** - * Finish the swiper animation. - * - * @param { FinishAnimationHandler } handler - The handler is used to listen for the end of the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - finishAnimation(handler?: FinishAnimationHandler); -} - -/** - * Declare the direction of arc indicator. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ -export enum ArcDirection { - /** - * 3 o'clock direction. - * - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - THREE_CLOCK_DIRECTION = 0, - - /** - * 6 o'clock direction. - * - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - SIX_CLOCK_DIRECTION = 1, - - /** - * 9 o'clock direction. - * - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - NINE_CLOCK_DIRECTION = 2, -} - -/** - * Define ArcDotIndicator, the indicator type is arc dot. - * - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ -export class ArcDotIndicator { - /** - * A constructor used to create a ArcDotIndicator object. - * - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - constructor(); - - /** - * Set the direction of arc indicator. - * - * @param { Optional } direction - the direction of arc indicator, default value is { ArcDirection.SIX_CLOCK_DIRECTION }. - * @returns { ArcDotIndicator } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - arcDirection(direction: Optional): ArcDotIndicator; - - /** - * Set the navigation point color. - * - * @param { Optional } color - the indicator item color, default value is { #A9FFFFFF }. - * @returns { ArcDotIndicator } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - itemColor(color: Optional): ArcDotIndicator; - - /** - * Set the selected navigation point color. - * - * @param { Optional } color - the indicator item when selected, default value is { #FF5EA1FF }. - * @returns { ArcDotIndicator } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - selectedItemColor(color: Optional): ArcDotIndicator; - - /** - * Set the background color. - * - * @param { Optional } color - the background color, default value is { #FF404040 }. - * @returns { ArcDotIndicator } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - backgroundColor(color: Optional): ArcDotIndicator; - - /** - * Set the gradient color for the mask. - * - * @param { Optional } color - the gradient color, default start color is { #00000000 }, default end color is { #FF000000 }. - * @returns { ArcDotIndicator } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - maskColor(color: Optional): ArcDotIndicator; -} - -/** - * Provide an interface for ArcSwiper. - * - * @interface ArcSwiperInterface - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ -interface ArcSwiperInterface { - /** - * Create ArcSwiper component. - * - * @param { ArcSwiperController } controller - * @returns { ArcSwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - (controller?: ArcSwiperController): ArcSwiperAttribute; -} - -/** - * Handler of swiper, used in OnChange. - * - * @typedef { function } IndexChangedHandler - * @param { number } index - The index of the current swiper. - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ -declare type IndexChangedHandler = (index: number) => void; - -/** - * Handler of swiper, used in OnAnimationStart. - * - * @typedef { function } AnimationStartHandler - * @param { number } index - The index of the current swiper. - * @param { number } targetIndex - The index of the target swiper. - * @param { SwiperAnimationEvent } event - The extra information of the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ -declare type AnimationStartHandler = (index: number, targetIndex: number, event: SwiperAnimationEvent) => void; - -/** - * Handler of swiper, used in OnAnimationEnd. - * - * @typedef { function } AnimationEndHandler - * @param { number } index - The index of the current swiper. - * @param { SwiperAnimationEvent } event - The extra information of the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ -declare type AnimationEndHandler = (index: number, event: SwiperAnimationEvent) => void; - -/** - * Handler of swiper, used in OnGestureSwipe. - * - * @typedef { function } GestureSwipeHandler - * @param { number } index - The index of the current swiper. - * @param { SwiperAnimationEvent } event - The extra information of the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ -declare type GestureSwipeHandler = (index: number, event: SwiperAnimationEvent) => void; - - -/** - * Defines the swiper content animated transition options. - * - * @interface SwiperContentAnimatedTransition - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ -declare interface SwiperContentAnimatedTransition { - /** - * Defines the timeout of custom content transition animation after the page is moved out of the swiper. The unit is ms. - * If SwiperContentTransitionProxy.finishTransition() is not invoked, use the timeout as animation end time. - * - * @type { ?number } - * @default 0 ms - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - timeout?: number; - - /** - * Called when custom content transition animation start. - * - * @type { Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - transition: Callback; -} - -/** - *The proxy object returned to the developer during the execution of the Swiper custom content transition animation. - * - * @interface SwiperContentTransitionProxy - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ -declare interface SwiperContentTransitionProxy { - /** - * the index value of the swiper content selected before animation start. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - selectedIndex: number; - - /** - * The index value of the swiper content. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - index: number; - - /** - * the moving ratio of the swiper content from the start position of the swiper main axis. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - position: number; - - /** - * the swiper main axis length for calculating position. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - mainAxisLength: number; - - /** - * Notifies Swiper page the custom content transition animation is complete. - * - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - finishTransition(): void; -} - -/** - * Defines the Arc swiper attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ -declare class ArcSwiperAttribute extends CommonMethod { - /** - * Set the index value of the displayed subcomponent. - * - * @param { Optional } index - The index value of the subcomponents to be displayed, default value is { 0 }. - * @returns { ArcSwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - index(index: Optional): ArcSwiperAttribute; - - /** - * Set whether the indicator is available or set the indicator style. - * - * @param { Optional } style - The style information of the indicator or whether to - * display the indicator, default value is { true }. - * @returns { ArcSwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - indicator(style: Optional): ArcSwiperAttribute; - - /** - * Set the animation duration of the switch in ms. - * - * @param { Optional } duration - Duration of animation, default value is { 400ms }. - * @returns { ArcSwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - duration(duration: Optional): ArcSwiperAttribute; - - /** - * Set whether to slide vertically. - * - * @param { Optional } isVertical - The value indicates whether to slide vertically, default value is { false }. - * @returns { ArcSwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - vertical(isVertical: Optional): ArcSwiperAttribute; - - /** - * Set whether to disable sliding function. - * - * @param { Optional } disabled - The value indicates whether the sliding function is enabled, default value is { false }. - * @returns { ArcSwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - disableSwipe(disabled: Optional): ArcSwiperAttribute; - - /** - * Set the sensitivity of rotating crown. - * - * @param { Optional } sensitivity - The sensitivity of rotating crown, default value is { MEDIUM }. - * @returns { ArcSwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - digitalCrownSensitivity(sensitivity: Optional): ArcSwiperAttribute; - - /** - * Called when the index value has changed. - * - * @param { Optional } handler - The handler is used to listen for index values that have changed. - * @returns { ArcSwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - onChange(handler: Optional): ArcSwiperAttribute; - - /** - * Called when the swiper animation has started. - * - * @param { Optional } handler - The handler is used to listen for the animation has started. - * @returns { ArcSwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - onAnimationStart(handler: Optional): ArcSwiperAttribute; - - /** - * Called when the swiper animation has ended. - * - * @param { Optional } handler - The handler is used to listen for the animation has ended. - * @returns { ArcSwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - onAnimationEnd(handler: Optional): ArcSwiperAttribute; - - /** - * Called when swiping the switch using gestures. - * - * @param { Optional } handler - The handler is used to listen for swiping through gestures. - * @returns { ArcSwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - onGestureSwipe(handler: Optional): ArcSwiperAttribute; - - /** - * Set effect when scrolling over edge. - * - * @param { Optional } edgeEffect - scrolling effect over edge, default value is { EdgeEffect.Spring }. - * @returns { ArcSwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - effectMode(edgeEffect: Optional): ArcSwiperAttribute; - - /** - * Custom swiper content transition animation. - * - * @param { Optional } transition - custom content transition animation. - * @returns { ArcSwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - customContentTransition(transition: Optional): ArcSwiperAttribute; - - /** - * Custom swiper content transition animation. - * - * @param { Optional } disabled - the value indicates whether to disable the transition animation, default value is { false }. - * @returns { ArcSwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - disableTransitionAnimation(disabled: Optional): ArcSwiperAttribute; -} - -/** - * Defines the ArcSwiper Component that can provide the ability for sub components to swipe and display. - * - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ -declare let ArcSwiper: ArcSwiperInterface; - -/** - * Defines ArcSwiper Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ +/* + * 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 + */ +/** + * Handler of swiper controller, used in finishAnimation. + * + * @typedef { function } FinishAnimationHandler + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ +declare type FinishAnimationHandler = () => void; + +/** + * Provide methods for controlling ArcSwiper component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ +export class ArcSwiperController { + /** + * A constructor used to create a ArcSwiperController object. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + constructor(); + + /** + * Show next subcomponent. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + showNext(); + + /** + * Show previous subcomponent. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + showPrevious(); + + /** + * Finish the swiper animation. + * + * @param { FinishAnimationHandler } handler - The handler is used to listen for the end of the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + finishAnimation(handler?: FinishAnimationHandler); +} + +/** + * Declare the direction of arc indicator. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ +export enum ArcDirection { + /** + * 3 o'clock direction. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + THREE_CLOCK_DIRECTION = 0, + + /** + * 6 o'clock direction. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + SIX_CLOCK_DIRECTION = 1, + + /** + * 9 o'clock direction. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + NINE_CLOCK_DIRECTION = 2, +} + +/** + * Define ArcDotIndicator, the indicator type is arc dot. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ +export class ArcDotIndicator { + /** + * A constructor used to create a ArcDotIndicator object. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + constructor(); + + /** + * Set the direction of arc indicator. + * + * @param { Optional } direction - the direction of arc indicator, default value is { ArcDirection.SIX_CLOCK_DIRECTION }. + * @returns { ArcDotIndicator } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + arcDirection(direction: Optional): ArcDotIndicator; + + /** + * Set the navigation point color. + * + * @param { Optional } color - the indicator item color, default value is { #A9FFFFFF }. + * @returns { ArcDotIndicator } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + itemColor(color: Optional): ArcDotIndicator; + + /** + * Set the selected navigation point color. + * + * @param { Optional } color - the indicator item when selected, default value is { #FF5EA1FF }. + * @returns { ArcDotIndicator } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + selectedItemColor(color: Optional): ArcDotIndicator; + + /** + * Set the background color. + * + * @param { Optional } color - the background color, default value is { #FF404040 }. + * @returns { ArcDotIndicator } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + backgroundColor(color: Optional): ArcDotIndicator; + + /** + * Set the gradient color for the mask. + * + * @param { Optional } color - the gradient color, default start color is { #00000000 }, default end color is { #FF000000 }. + * @returns { ArcDotIndicator } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + maskColor(color: Optional): ArcDotIndicator; +} + +/** + * Provide an interface for ArcSwiper. + * + * @interface ArcSwiperInterface + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ +interface ArcSwiperInterface { + /** + * Create ArcSwiper component. + * + * @param { ArcSwiperController } controller + * @returns { ArcSwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + (controller?: ArcSwiperController): ArcSwiperAttribute; +} + +/** + * Handler of swiper, used in OnChange. + * + * @typedef { function } IndexChangedHandler + * @param { number } index - The index of the current swiper. + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ +declare type IndexChangedHandler = (index: number) => void; + +/** + * Handler of swiper, used in OnAnimationStart. + * + * @typedef { function } AnimationStartHandler + * @param { number } index - The index of the current swiper. + * @param { number } targetIndex - The index of the target swiper. + * @param { SwiperAnimationEvent } event - The extra information of the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ +declare type AnimationStartHandler = (index: number, targetIndex: number, event: SwiperAnimationEvent) => void; + +/** + * Handler of swiper, used in OnAnimationEnd. + * + * @typedef { function } AnimationEndHandler + * @param { number } index - The index of the current swiper. + * @param { SwiperAnimationEvent } event - The extra information of the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ +declare type AnimationEndHandler = (index: number, event: SwiperAnimationEvent) => void; + +/** + * Handler of swiper, used in OnGestureSwipe. + * + * @typedef { function } GestureSwipeHandler + * @param { number } index - The index of the current swiper. + * @param { SwiperAnimationEvent } event - The extra information of the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ +declare type GestureSwipeHandler = (index: number, event: SwiperAnimationEvent) => void; + + +/** + * Defines the swiper content animated transition options. + * + * @interface SwiperContentAnimatedTransition + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ +declare interface SwiperContentAnimatedTransition { + /** + * Defines the timeout of custom content transition animation after the page is moved out of the swiper. The unit is ms. + * If SwiperContentTransitionProxy.finishTransition() is not invoked, use the timeout as animation end time. + * + * @type { ?number } + * @default 0 ms + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + timeout?: number; + + /** + * Called when custom content transition animation start. + * + * @type { Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + transition: Callback; +} + +/** + *The proxy object returned to the developer during the execution of the Swiper custom content transition animation. + * + * @interface SwiperContentTransitionProxy + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ +declare interface SwiperContentTransitionProxy { + /** + * the index value of the swiper content selected before animation start. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + selectedIndex: number; + + /** + * The index value of the swiper content. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + index: number; + + /** + * the moving ratio of the swiper content from the start position of the swiper main axis. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + position: number; + + /** + * the swiper main axis length for calculating position. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + mainAxisLength: number; + + /** + * Notifies Swiper page the custom content transition animation is complete. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + finishTransition(): void; +} + +/** + * Defines the Arc swiper attribute functions. + * + * @extends CommonMethod + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ +declare class ArcSwiperAttribute extends CommonMethod { + /** + * Set the index value of the displayed subcomponent. + * + * @param { Optional } index - The index value of the subcomponents to be displayed, default value is { 0 }. + * @returns { ArcSwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + index(index: Optional): ArcSwiperAttribute; + + /** + * Set whether the indicator is available or set the indicator style. + * + * @param { Optional } style - The style information of the indicator or whether to + * display the indicator, default value is { true }. + * @returns { ArcSwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + indicator(style: Optional): ArcSwiperAttribute; + + /** + * Set the animation duration of the switch in ms. + * + * @param { Optional } duration - Duration of animation, default value is { 400ms }. + * @returns { ArcSwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + duration(duration: Optional): ArcSwiperAttribute; + + /** + * Set whether to slide vertically. + * + * @param { Optional } isVertical - The value indicates whether to slide vertically, default value is { false }. + * @returns { ArcSwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + vertical(isVertical: Optional): ArcSwiperAttribute; + + /** + * Set whether to disable sliding function. + * + * @param { Optional } disabled - The value indicates whether the sliding function is enabled, default value is { false }. + * @returns { ArcSwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + disableSwipe(disabled: Optional): ArcSwiperAttribute; + + /** + * Set the sensitivity of rotating crown. + * + * @param { Optional } sensitivity - The sensitivity of rotating crown, default value is { MEDIUM }. + * @returns { ArcSwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + digitalCrownSensitivity(sensitivity: Optional): ArcSwiperAttribute; + + /** + * Called when the index value has changed. + * + * @param { Optional } handler - The handler is used to listen for index values that have changed. + * @returns { ArcSwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + onChange(handler: Optional): ArcSwiperAttribute; + + /** + * Called when the swiper animation has started. + * + * @param { Optional } handler - The handler is used to listen for the animation has started. + * @returns { ArcSwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + onAnimationStart(handler: Optional): ArcSwiperAttribute; + + /** + * Called when the swiper animation has ended. + * + * @param { Optional } handler - The handler is used to listen for the animation has ended. + * @returns { ArcSwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + onAnimationEnd(handler: Optional): ArcSwiperAttribute; + + /** + * Called when swiping the switch using gestures. + * + * @param { Optional } handler - The handler is used to listen for swiping through gestures. + * @returns { ArcSwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + onGestureSwipe(handler: Optional): ArcSwiperAttribute; + + /** + * Set effect when scrolling over edge. + * + * @param { Optional } edgeEffect - scrolling effect over edge, default value is { EdgeEffect.Spring }. + * @returns { ArcSwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + effectMode(edgeEffect: Optional): ArcSwiperAttribute; + + /** + * Custom swiper content transition animation. + * + * @param { Optional } transition - custom content transition animation. + * @returns { ArcSwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + customContentTransition(transition: Optional): ArcSwiperAttribute; + + /** + * Custom swiper content transition animation. + * + * @param { Optional } disabled - the value indicates whether to disable the transition animation, default value is { false }. + * @returns { ArcSwiperAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ + disableTransitionAnimation(disabled: Optional): ArcSwiperAttribute; +} + +/** + * Defines the ArcSwiper Component that can provide the ability for sub components to swipe and display. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ +declare let ArcSwiper: ArcSwiperInterface; + +/** + * Defines ArcSwiper Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + */ declare let ArcSwiperInstance: ArcSwiperAttribute; \ No newline at end of file diff --git a/api/@ohos.arkui.Parallelize.d.ets b/api/@ohos.arkui.Parallelize.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..7c061267c9ad80882be9eb079b68e5aa7170b34a --- /dev/null +++ b/api/@ohos.arkui.Parallelize.d.ets @@ -0,0 +1,78 @@ +/* + * 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 ArkUI + * @arkts 1.2 + */ + +import { ComponentBuilder } from './arkui/stateManagement/runtime' +import { CustomBuilder } from './arkui/component/builder'; + +/** +* Describe the options for the ParallelizeUI. +* +* @interface ParallelOption +* @syscap SystemCapability.ArkUI.ArkUI.Full +* @crossplatform +* @atomicservice +* @since 20 +* @arkts 1.2 +*/ +export interface ParallelOption { + /** + * Whether ParallelizeUI create is enabled. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + enable?: boolean, +} + +/** +* Defines the ParallelizeUI attribute interface +* +* @interface UIParallelAttribute +* @syscap SystemCapability.ArkUI.ArkUI.Full +* @crossplatform +* @atomicservice +* @since 20 +* @arkts 1.2 +*/ +export interface UIParallelAttribute { +} + +/** + * Define the constructor of ParallelizeUI. + * + * @param { ParallelOption | undefined } [options] - ParallelizeUI Option + * @param { CustomBuilder } [content] - tail closure for ParallelizeUI + * @returns { UIParallelAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ +@ComponentBuilder +export declare function ParallelizeUI( + options?: ParallelOption | undefined, + content?: CustomBuilder, +): UIParallelAttribute diff --git a/api/@ohos.arkui.StateManagement.d.ts b/api/@ohos.arkui.StateManagement.d.ts index 1b53279d976244bc51cb7de750e2316115561823..aa5d8086bc32e1805e8de3ea29dc6351ecde713c 100644 --- a/api/@ohos.arkui.StateManagement.d.ts +++ b/api/@ohos.arkui.StateManagement.d.ts @@ -430,5 +430,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.ts b/api/@ohos.arkui.UIContext.d.ts index 5abf099d146c609b272ac9a8efcc59701b210f74..648a6a9a5a32841f78380828463e4104282daf9b 100755 --- a/api/@ohos.arkui.UIContext.d.ts +++ b/api/@ohos.arkui.UIContext.d.ts @@ -22,12 +22,12 @@ 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'; import { ComponentContent, FrameNode, Frame } from './@ohos.arkui.node'; import type { AnimatorOptions, AnimatorResult } from './@ohos.animator'; +import type observer from './@ohos.arkui.observer'; import { SimpleAnimatorOptions } from './@ohos.animator'; import type { Callback, AsyncCallback } from './@ohos.base'; import { MeasureOptions } from './@ohos.measure'; @@ -593,7 +593,7 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 12 */ getStateByIndex(index: number): router.RouterState | undefined; @@ -605,7 +605,7 @@ export class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 12 */ getStateByUrl(url: string): Array; @@ -1281,7 +1281,7 @@ export class PromptAction { * @crossplatform * @atomicservice * @since 12 - */ + */ closeCustomDialog(dialogContent: ComponentContent): Promise; /** @@ -2791,7 +2791,7 @@ export class MarqueeDynamicSyncScene extends DynamicSyncScene { * @atomicservice * @since 18 */ -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. @@ -2973,7 +2973,7 @@ export class DragController { * @param { dragController.DragStartRequestStatus } requestStatus - Status about the drag start behavior. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 18 + * @since 18 */ notifyDragStartRequest(requestStatus: dragController.DragStartRequestStatus): void; @@ -3068,7 +3068,7 @@ export class MeasureUtils { * @atomicservice * @since 12 */ - export class FocusController { +export class FocusController { /** * clear focus to the root container. * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -3108,7 +3108,7 @@ export class MeasureUtils { * @atomicservice * @since 20 */ - isActive(): boolean + isActive(): boolean; /** * Set whether to enable autofocus transfer. @@ -3116,7 +3116,7 @@ export class MeasureUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 14 + * @since 14 */ setAutoFocusTransfer(isAutoFocusTransfer: boolean): void; @@ -3126,7 +3126,7 @@ export class MeasureUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 15 + * @since 15 */ setKeyProcessingMode(mode: KeyProcessingMode): void; } @@ -3179,7 +3179,7 @@ export class CursorController { * @atomicservice * @since 12 */ -export class ContextMenuController { +export declare class ContextMenuController { /** * Close context menu. * @@ -3244,7 +3244,7 @@ export type Context = common.Context; * @atomicservice * @since 12 */ -export class ComponentSnapshot { +export declare class ComponentSnapshot { /** * Get a component snapshot by component id. * @@ -3929,7 +3929,7 @@ export class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 12 + * @since 12 */ getMeasureUtils(): MeasureUtils; @@ -4540,7 +4540,7 @@ export const enum KeyboardAvoidMode { * @atomicservice * @since 14 */ - NONE = 4, + NONE = 4 } /** diff --git a/api/@ohos.arkui.UIContext.d.ets b/api/@ohos.arkui.UIContext.static.d.ets old mode 100644 new mode 100755 similarity index 43% rename from api/@ohos.arkui.UIContext.d.ets rename to api/@ohos.arkui.UIContext.static.d.ets index ad231bd85d0910cad79f06ef01280832cbf539af..54261d88d9362eba15495b6a9235995e3ffae39b --- a/api/@ohos.arkui.UIContext.d.ets +++ b/api/@ohos.arkui.UIContext.static.d.ets @@ -1,3 +1,4 @@ +'use static'; /* * Copyright (c) 2023-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,139 +17,126 @@ /** * @file * @kit ArkUI + * @arkts 1.2 */ - - import font from './@ohos.font'; import mediaQuery from './@ohos.mediaquery'; -import inspector from './@ohos.arkui.inspector'; -import observer from './@ohos.arkui.observer'; +import type inspector from './@ohos.arkui.inspector'; +import type observer from '@ohos.arkui.observer'; import promptAction from './@ohos.promptAction'; +import { LevelOrder } 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 type componentUtils from './@ohos.arkui.componentUtils'; +import { SimpleAnimatorOptions } from './@ohos.animator'; +import type { Callback, AsyncCallback } from './@ohos.base'; import { MeasureOptions } from './@ohos.measure'; -import componentSnapshot from './@ohos.arkui.componentSnapshot'; -import dragController from './@ohos.arkui.dragController'; +import type componentSnapshot from './@ohos.arkui.componentSnapshot'; +import type 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' +import type common from './@ohos.app.ability.common'; +import type pointer from './@ohos.multimodalInput.pointer'; +import { ComponentContent, FrameNode, Frame } from '@ohos.arkui.node'; +import { AnimatorOptions, AnimatorResult } from './@ohos.animator'; +import { ClickEvent, ExpectedFrameRateRange, DragItemInfo, AnimateParam, KeyframeAnimateParam, KeyframeState, + SheetOptions, PopupCommonOptions, MenuOptions, KeyEvent, Optional, + ContentCoverOptions } from './arkui/component/common'; +import { CustomBuilder, CustomBuilderT } 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/storage/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'; /** * class Font * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ getFontByName(fontName: string): font.FontInfo; } - /** * class MediaQuery * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ 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 + * @since 20 */ matchMediaSync(condition: string): mediaQuery.MediaQueryListener; } - /** * class UIInspector * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ 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. + * @returns { inspector.ComponentObserver | undefined } create listener for observer component event. + * If unable to obtain current ui context, the function will return undefined. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ - createComponentObserver(id: string): inspector.ComponentObserver; + createComponentObserver(id: string): inspector.ComponentObserver | undefined; } - - /** * class Router * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ 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: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -156,19 +144,16 @@ export declare class Router { * @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 + * @since 20 */ 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: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -176,20 +161,17 @@ export declare class Router { * @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 + * @since 20 */ 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: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -197,20 +179,17 @@ export declare class Router { * @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 + * @since 20 */ 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: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -218,99 +197,90 @@ export declare class Router { * @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 + * @since 20 */ 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: + * @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. + * @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 + * @since 20 */ 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: + * @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. + * @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 + * @since 20 */ 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: + * @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. + * @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 + * @since 20 */ 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: + * @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. + * @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 + * @since 20 */ 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 + * @since 20 */ back(options?: router.RouterOptions): void; @@ -320,117 +290,92 @@ export declare class Router { * @param { number } index - index of page. * @param { Object } [params] - params of page. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ getLength(): string; - /** * Obtains information about the current page state. * * @returns { router.RouterState } Page state. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ 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 - */ + /** + * Obtains page information by index. + * + * @param { number } index - Index of page. + * @returns { router.RouterState | undefined } Page state. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ 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 - */ + /** + * Obtains page information by url. + * + * @param { string } url - URL of page. + * @returns { Array } Page state. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ 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: + * @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 + * @since 20 */ showAlertBeforeBackPage(options: router.EnableAlertOptions): void; - /** * Hide alert before back page. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ hideAlertBeforeBackPage(): void; - /** * Obtains information about the current page params. * * @returns { Object } Page params. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ 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: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -438,18 +383,15 @@ export declare class Router { * @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 + * @since 20 */ 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: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -457,19 +399,16 @@ export declare class Router { * @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 + * @since 20 */ 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: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -477,19 +416,16 @@ export declare class Router { * @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 - */ + * @since 20 + */ 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: + * @throws { BusinessError } 401 - Parameter error. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. @@ -497,105 +433,127 @@ export declare class Router { * @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 - */ + * @since 20 + */ 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: + * @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 } 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 + * @since 20 */ 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 } 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 + * @since 20 */ 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 } 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 + * @since 20 */ 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: + * @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 } 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 + * @since 20 */ replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise; } +/** + * Defines the custom builder with id. + * + * @typedef { function } CustomBuilderWithId + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare type CustomBuilderWithId = (id: number) => void; + +/** + * Defines the target info. + * + * @interface TargetInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface TargetInfo { + /** + * ID of target node. + * + * @type { string | number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + id: string | number; + + /** + * Unique ID that generated by framework. This ID used to constrain range of target. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + componentId?: number; +} /** * class PromptAction * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ export declare class PromptAction { - /** * Displays the notification text. * * @param { promptAction.ShowToastOptions } options - 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. * @throws { BusinessError } 100001 - Internal error. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ showToast(options: promptAction.ShowToastOptions): void; @@ -604,15 +562,13 @@ export declare class PromptAction { * * @param { promptAction.ShowToastOptions } options - Options. * @returns { Promise } return the toast id that will be used by closeToast. - * @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. * @throws { BusinessError } 100001 - Internal error. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 13 + * @since 20 */ openToast(options: promptAction.ShowToastOptions): Promise; @@ -620,52 +576,45 @@ export declare class PromptAction { * Close the notification text. * * @param { number } toastId - the toast id that returned by openToast. - * @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. * @throws { BusinessError } 100001 - Internal error. + * @throws { BusinessError } 103401 - Cannot find the toast. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 13 + * @since 20 */ 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: + * @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 + * @since 20 */ - showDialog(options: promptAction.ShowDialogOptions, callback: AsyncCallback): void; + 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: + * @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 + * @since 20 */ showDialog(options: promptAction.ShowDialogOptions): Promise; @@ -673,73 +622,70 @@ export declare class PromptAction { * Displays the menu. * * @param { promptAction.ActionMenuOptions } options - Options. - * @param { promptAction.ActionMenuSuccessResponse } callback - the callback of showActionMenu. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @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 - * @since 10 - * @deprecated since 11 - * @useinstead showActionMenu + * @since 20 */ - // showActionMenu(options: promptAction.ActionMenuOptions, callback: promptAction.ActionMenuSuccessResponse): void; + showActionMenu(options: promptAction.ActionMenuOptions, + callback: AsyncCallback): void; /** * Displays the menu. * * @param { promptAction.ActionMenuOptions } options - Options. - * @param { AsyncCallback } callback - the callback of showActionMenu. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @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 + * @since 20 */ - showActionMenu(options: promptAction.ActionMenuOptions, callback: AsyncCallback): void; + showActionMenu(options: promptAction.ActionMenuOptions): Promise; - /** - * Displays the menu. + * Open the custom dialog with frameNode. * - * @param { promptAction.ActionMenuOptions } options - Options. - * @returns { Promise } callback - the callback of showActionMenu. - * @throws { BusinessError } 401 - Parameter error. Possible causes: + * @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 } 100001 - Internal error. + * @throws { BusinessError } 103301 - The ComponentContent is incorrect. + * @throws { BusinessError } 103302 - Dialog content already exists. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ - showActionMenu(options: promptAction.ActionMenuOptions): Promise; + openCustomDialog(dialogContent: ComponentContent, + options?: promptAction.BaseDialogOptions): Promise; /** - * Open the custom dialog with frameNode. + * Open the custom dialog with frameNode and controller. * * @param { ComponentContent } dialogContent - the content of custom dialog. + * @param { promptAction.DialogController } controller - Dialog controller. * @param { promptAction.BaseDialogOptions } options - Options. * @returns { Promise } the promise returned by the function. - * @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. - * @throws { BusinessError } 103301 - the ComponentContent is incorrect. + * @throws { BusinessError } 103301 - The ComponentContent is incorrect. * @throws { BusinessError } 103302 - Dialog content already exists. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ - openCustomDialog(dialogContent: ComponentContent, options: promptAction.BaseDialogOptions): Promise; + openCustomDialogWithController(dialogContent: ComponentContent, + controller: promptAction.DialogController, + options?: promptAction.BaseDialogOptions): Promise; /** * Update the custom dialog with frameNode. @@ -747,113 +693,262 @@ export declare class PromptAction { * @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: + * @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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + openCustomDialog(options: promptAction.CustomDialogOptions): Promise; + + /** + * Present the custom dialog with controller. + * + * @param { CustomBuilder | CustomBuilderT } builder - Dialog builder. + * @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. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + presentCustomDialog(builder: CustomBuilder | CustomBuilderT, controller?: promptAction.DialogController, + options?: promptAction.DialogOptions): 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 + * @since 20 + */ + closeCustomDialog(dialogId: number): void; + + /** + * Get order value of top dialog. + * + * @returns { LevelOrder } the display order. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getTopOrder(): LevelOrder; + + /** + * Get order value of bottom dialog. + * + * @returns { LevelOrder } the display order. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getBottomOrder(): LevelOrder; + + /** + * Open popup with frameNode. + * + * @param { ComponentContent } content - The content of popup. + * @param { TargetInfo } target - The target of popup. + * @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. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 103301 - The content is incorrect. + * @throws { BusinessError } 103302 - The content already exists. + * @throws { BusinessError } 103304 - The target does not exist. + * @throws { BusinessError } 103305 - The target node is not in the component tree. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + openPopup(content: ComponentContent, target: TargetInfo, + options?: PopupCommonOptions): Promise; + + /** + * Update popup with frameNode. + * + * @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, + * 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 } 103301 - The ComponentContent is incorrect. + * @throws { BusinessError } 103303 - The ComponentContent cannot be found. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + updatePopup(content: ComponentContent, options: PopupCommonOptions, + partialUpdate?: boolean): Promise; + + /** + * Close popup with frameNode. + * + * @param { ComponentContent } content - The content of popup. + * @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 + * @since 20 + */ + closePopup(content: ComponentContent): Promise; + + /** + * Open menu with frameNode. + * + * @param { ComponentContent } content - The content of menu. + * @param { TargetInfo } target - The target of menu. + * @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. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 103301 - The content is incorrect. + * @throws { BusinessError } 103302 - The content already exists. + * @throws { BusinessError } 103304 - The target does not exist. + * @throws { BusinessError } 103305 - The target node is not in the component tree. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + openMenu(content: ComponentContent, target: TargetInfo, options?: MenuOptions): Promise; + + /** + * Update menu with frameNode. + * + * @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, + * 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 } 103301 - The ComponentContent is incorrect. + * @throws { BusinessError } 103303 - The ComponentContent cannot be found. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + updateMenu(content: ComponentContent, options: MenuOptions, + partialUpdate?: boolean): Promise; + + /** + * Close menu with frameNode. + * + * @param { ComponentContent } content - The content of menu. + * @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; + * @throws { BusinessError } 103301 - The ComponentContent is incorrect. + * @throws { BusinessError } 103303 - The ComponentContent cannot be found. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + closeMenu(content: ComponentContent): Promise; } /** * 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 + * @since 20 */ -export type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode) => void; - +type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode) => void; +/** + * Defines the callback type used in UIObserver watch pan event. + * The value of event indicates the information of pan event. + * The value of node indicates the frameNode which will receive the event. + * + * @typedef { function } PanListenerCallback + * @param { GestureEvent } event - the information of pan event + * @param { GestureRecognizer } current - the information of panRecognizer + * @param { FrameNode } [node] - the information of frameNode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +type PanListenerCallback = (event: GestureEvent, current: GestureRecognizer, 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 + * @since 20 */ -export type GestureEventListenerCallback = (event: GestureEvent, node?: FrameNode) => void; - +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 + * @since 20 */ export interface PageInfo { /** @@ -861,8 +956,7 @@ export interface PageInfo { * * @type { ?observer.RouterPageInfo } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ routerPageInfo?: observer.RouterPageInfo; @@ -871,620 +965,905 @@ export interface PageInfo { * * @type { ?observer.NavDestinationInfo } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ navDestinationInfo?: observer.NavDestinationInfo; } -export interface NavigationOptions { navigationId: ResourceStr } - /** - * Register callbacks to observe ArkUI behavior. + * the property of OverlayManager. * + * @interface OverlayManagerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ -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; +export interface OverlayManagerOptions { + /** + * the render property of overlay node. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + renderRootOverlay?: boolean; + + /** + * Set whether support backPressed event or not. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enableBackPressedEvent?: boolean; } +/** + * Defines the type can be used for identiting the node, for the string type, it's the inspector id + * set through .id attribute, and for the number type, it's the unique ID got from the FrameNode by + * getUniqueID method. + * + * @typedef { string | number } NodeIdentity + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare type NodeIdentity = string | number; /** - * class ComponentUtils + * An enumeration type that identifies the current node's rendering state. The UI components used in + * the application are automatically managed by the system and controlled for participation in graphical + * rendering by either mounting them onto the render tree or removing them from it. Only nodes that + * participate in graphical rendering have the potential to be displayed. However, participating in + * rendering does not equal to the node's visibility, as there may be many occlusion scenarios in the + * actual implementation of the application. Nevertheless, if a node does not participate in rendering, + * it will definitely not be visible. + * + * @enum { number } NodeRenderState * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ -export declare class ComponentUtils { - +export const enum NodeRenderState { /** - * Provide the ability to obtain the coordinates and size of component drawing areas. + * The node has been mount on to the render tree and will soon be rendered. Generally, after the next frame, + * the user will be able to see this node. However, this is not always the case, as in reality, the node may be + * occluded by other nodes, meaning it is rendered but not be visible. + * When registering a listener for the render state using the UIObserver interface, the system will immediately + * trigger the callback once, and the state notified at this time typically represents the current state. * - * @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 + * @since 20 */ - getRectangleById(id: string): componentUtils.ComponentInfo; + ABOUT_TO_RENDER_IN = 0, + + /** + * The node has been removed from the render tree and will no longer be rendered shortly. Generally speaking, + * after the next frame, the user will no longer be able to see this node. + * When registering a listener for the render state using the UIObserver interface, the system will immediately + * trigger the callback once, and the state notified at this time typically represents the current state. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ABOUT_TO_RENDER_OUT = 1 } /** - * class OverlayManager + * Defines the callback type used in UIObserver to monitor one specific node's render state. + * + * @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 12 + * @since 20 */ -export declare class OverlayManager { +export declare type NodeRenderStateChangeCallback = (state: NodeRenderState, node?: FrameNode) => void; + +/** + * This is an enumeration type representing the gesture callback phases to be triggered, corresponding to + * the action callbacks defined in gesture.d.ts. Therefore, not all gesture types have all the following + * phase definitions. For example, SwipeGesture only has one callback named onAction, so it also only has + * one enumeration type, which is WILL_START. + * + * @enum { number } GestureActionPhase + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export const enum GestureActionPhase { /** - * Add the ComponentContent to the OverlayManager. + * The gesture has been successfully recognized by the system, and the action-start/action callback will be + * executed immediately. * - * @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 + * @since 20 */ - addComponentContent(content: ComponentContent, index?: number): void; + WILL_START = 0, /** - * Remove the ComponentContent from the OverlayManager. + * This indicates the gesture has been determined to be an end, which usually happens when the user lifts their + * fingers, ending the entire interaction, and the action-end callback will be executed immediately. * - * @param { ComponentContent } content - The content will be removed from the OverlayManager. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ - removeComponentContent(content: ComponentContent): void; + WILL_END = 1 +} +/** + * This is an enumeration type indicating what kind of gesture you want to monitor for. + * + * @enum { number } GestureListenerType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export const enum GestureListenerType { /** - * Show the ComponentContent. + * The tap gesture. * - * @param { ComponentContent } content - The content will be shown. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ - showComponentContent(content: ComponentContent): void; + TAP = 0, /** - * Hide the ComponentContent. + * The long press gesture. * - * @param { ComponentContent } content - The content will be hidden. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ - hideComponentContent(content: ComponentContent): void; + LONG_PRESS = 1, /** - * Show all ComponentContents on the OverlayManager. + * The pan gesture. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ - showAllComponentContents(): void; + PAN = 2, /** - * Hide all ComponentContents on the OverlayManager. + * The pinch gesture. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ - hideAllComponentContents(): void; -} - + PINCH = 3, -/** - * interface AtomicServiceBar + /** + * The swipe gesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + SWIPE = 4, + + /** + * The rotation gesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ROTATION = 5 +} + +/** + * The information when one gesture specific callback is triggered. + * + * @interface GestureTriggerInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface GestureTriggerInfo { + /** + * The gesture event object. + * + * @type { GestureEvent } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + event: GestureEvent; + + /** + * The gesture recognizer object. You can obtain the detailed information of the gesture from it, + * but please do not keep this object locally, as it might be unavailable when the node is released. + * + * @type { GestureRecognizer } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + current: GestureRecognizer; + + /** + * The gesture action callback phase. + * + * @type { GestureActionPhase } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + currentPhase: GestureActionPhase; + + /** + * The node which the gesture is being triggered on. + * + * @type { ?FrameNode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + node?: FrameNode; +} + +/** + * The observer options for global gesture listener. + * + * @interface GestureObserverConfigs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface GestureObserverConfigs { + /** + * The gesture callback phases want to monitor. Only the specific action phases can be notified when the gesture is + * triggered. + * If empty array provided, the register will has no any effect. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + actionPhases: Array; +} + +/** + * Defines the callback type used in UIObserver to monitor specific gesture triggered information. + * + * @typedef { function } GestureListenerCallback + * @param { GestureTriggerInfo } info - the gesture details triggered with user interaction + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare type GestureListenerCallback = (info: GestureTriggerInfo) => void; + +/** + * Register callbacks to observe ArkUI behavior. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class UIObserver { + /** + * 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 + * @since 20 + */ + on(type: 'navDestinationUpdate', + options: observer.NavDestinationSwitchObserverOptions, + 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 + * @since 20 + */ + off(type: 'navDestinationUpdate', + options: observer.NavDestinationSwitchObserverOptions, + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + off(type: 'didClick', callback?: GestureEventListenerCallback): void; + + /** + * Registers a callback function to be called before panGesture onActionStart is called. + * + * @param { 'beforePanStart' } type - The type of event to listen for. + * @param { PanListenerCallback } callback - The callback function to be called + * when the panGesture will be trigger or after. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + on(type: 'beforePanStart', callback: PanListenerCallback): void; + + /** + * Removes a callback function to be called before panGesture onActionStart is called. + * + * @param { 'beforePanStart' } type - The type of event to remove the listener for. + * @param { PanListenerCallback } [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 20 + */ + off(type: 'beforePanStart', callback?: PanListenerCallback): void; + + /** + * Registers a callback function to be called before panGesture onActionEnd is called. + * + * @param { 'beforePanEnd' } type - The type of event to listen for. + * @param { PanListenerCallback } callback - The callback function to be called + * when the panGesture will be trigger or after. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + on(type: 'beforePanEnd', callback: PanListenerCallback): void; + + /** + * Removes a callback function to be called before panGesture onActionEnd is called. + * + * @param { 'beforePanEnd' } type - The type of event to remove the listener for. + * @param { PanListenerCallback } [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 20 + */ + off(type: 'beforePanEnd', callback?: PanListenerCallback): void; + + /** + * Registers a callback function to be called after panGesture onActionStart is called. + * + * @param { 'afterPanStart' } type - The type of event to listen for. + * @param { PanListenerCallback } callback - The callback function to be called + * when the panGesture will be trigger or after. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + on(type: 'afterPanStart', callback: PanListenerCallback): void; + + /** + * Removes a callback function to be called after panGesture onActionStart is called. + * + * @param { 'afterPanStart' } type - The type of event to remove the listener for. + * @param { PanListenerCallback } [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 20 + */ + off(type: 'afterPanStart', callback?: PanListenerCallback): void; + + /** + * Registers a callback function to be called after panGesture onActionEnd is called. + * + * @param { 'afterPanEnd' } type - The type of event to listen for. + * @param { PanListenerCallback } callback - The callback function to be called + * when the panGesture will be trigger or after. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + on(type: 'afterPanEnd', callback: PanListenerCallback): void; + + /** + * Removes a callback function to be called after panGesture onActionEnd is called. + * + * @param { 'afterPanEnd' } type - The type of event to remove the listener for. + * @param { PanListenerCallback } [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 20 + */ + off(type: 'afterPanEnd', callback?: PanListenerCallback): void; + + /** + * Registers a callback function to be called when the specific node's render state changed. + * This callback will be executed once immediately when the register is successful. + * [Notes]: + * 1. Be aware of the limit on the number of nodes: + * For performance considerations, the system has imposed a limit on the number of + * nodes that can be registered for monitoring in a single UI instance, exception will be thrown + * if overmuch. Please use this interface with caution. + * 2. Understanding scenarios where notifications may not occur: + * In general, within container components that have view or page switching functionality, + * when a view or page within the screen is moved outside the screen, the components previously + * within the screen should be removed from the render tree and should receive a RENDER_OUT + * notification. However, this is not always the case, as some scenarios involve views or components + * being moved outside the screen's display range without triggering a RENDER_OUT notification. + * For example, some components with caching capabilities may affect this behavior, and swiper is one + * such component. The cacheCount property of the swiper component allows you to force, via its second + * parameter isShow, that even if the current page is moved outside the display range, it remains in the + * render tree. This can be useful in scenarios where multiple pages are displayed on the screen simultaneously. + * Another example is scrolling components like list or scroll, where their internal content remains in the + * render tree even if it is scrolled outside the screen's display range, provided that lazyForEach/Repeat is + * not used. As a result, there will be no changes to the render state. Once you understand the principles + * behind the triggers for render state changes, these scenarios will become easier to comprehend. + * + * @param { 'nodeRenderState' } type - The type of event to listen for. + * @param { NodeIdentity } nodeIdentity - The identity of the target node + * @param { NodeRenderStateChangeCallback } callback - The callback function to be called + * when the clickEvent will be trigger or after. + * @throws { BusinessError } 161001 - The count of nodes monitoring render state is over the limitation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + on(type: 'nodeRenderState', nodeIdentity: NodeIdentity, callback: NodeRenderStateChangeCallback): void; + + /** + * Removes a callback function to be called before tapGesture is called. + * + * @param { 'nodeRenderState' } type - The type of event to remove the listener for. + * @param { NodeIdentity } nodeIdentity - The identity of the target node + * @param { NodeRenderStateChangeCallback } [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 20 + */ + off(type: 'nodeRenderState', nodeIdentity: NodeIdentity, callback?: NodeRenderStateChangeCallback): 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + off(type: 'tabContentUpdate', callback?: Callback): void; + + /** + * Registers a callback to monitor the gesture trigger information. + * + * @param { GestureListenerType } type - The type of gesture to monitor. + * @param { GestureObserverConfigs } option - The options when bind the global listener. + * @param { GestureListenerCallback } callback - The callback function to be called when any gesture's state + * is updated. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + addGlobalGestureListener(type: GestureListenerType, + option: GestureObserverConfigs, callback: GestureListenerCallback): void; + + /** + * Removes a callback function for one gesture listener type. + * + * @param { GestureListenerType } type - The type of event to remove the listener for. + * @param { GestureListenerCallback } [callback] - The callback function to be removed. If not provided, + * all callbacks for the given gesture type will be removed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + removeGlobalGestureListener(type: GestureListenerType, callback?: GestureListenerCallback): void; +} + +/** + * class ComponentUtils + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +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 + * @since 20 + */ + getRectangleById(id: string): componentUtils.ComponentInfo; +} + +/** + * class OverlayManager + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +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 + * @since 20 + */ + addComponentContent(content: ComponentContent, index?: number): void; + + /** + * Add the ComponentContent to the OverlayManager with order. + * + * @param { ComponentContent } content - The content will be added to the OverlayManager. + * @param { LevelOrder } [ levelOrder ] - The display order of the ComponentContent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + addComponentContentWithOrder(content: ComponentContent, levelOrder?: LevelOrder): void; + + /** + * Remove the ComponentContent from the OverlayManager. + * + * @param { ComponentContent } content - The content will be removed from the OverlayManager. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + removeComponentContent(content: ComponentContent): void; + + /** + * Show the ComponentContent. + * + * @param { ComponentContent } content - The content will be shown. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + showComponentContent(content: ComponentContent): void; + + /** + * Hide the ComponentContent. + * + * @param { ComponentContent } content - The content will be hidden. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + hideComponentContent(content: ComponentContent): void; + + /** + * Show all ComponentContents on the OverlayManager. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + showAllComponentContents(): void; + + /** + * Hide all ComponentContents on the OverlayManager. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + hideAllComponentContents(): void; +} + +/** + * interface AtomicServiceBar * @interface AtomicServiceBar * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ export interface AtomicServiceBar { /** @@ -1492,220 +1871,245 @@ export interface AtomicServiceBar { * * @param { boolean } visible - whether this bar is visible. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ setIconColor(color: Nullable< Color | number | string>): void; + + /** + * Get size and position of the bar. + * + * @returns { Frame } The size and position of bar in vp relative to window. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getBarRect(): Frame; } /** * Represents a dynamic synchronization scene. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ 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 20 */ setFrameRateRange(range: ExpectedFrameRateRange): void; /** * Gets the FrameRateRange of the DynamicSyncScene. - * + * * @returns { ExpectedFrameRateRange } The range of frameRate. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ getFrameRateRange(): ExpectedFrameRateRange; } /** * Represents a dynamic synchronization scene of Swiper. - * + * * @extends DynamicSyncScene * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ export declare class SwiperDynamicSyncScene extends DynamicSyncScene { /** - * Type of the SwiperDynamicSyncSceneType. - * @type { SwiperDynamicSyncSceneType } - * @readonly - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ + * Type of the SwiperDynamicSyncSceneType. + * @type { SwiperDynamicSyncSceneType } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ readonly type: SwiperDynamicSyncSceneType; } /** * Represents a dynamic synchronization scene of Marquee. - * + * * @extends DynamicSyncScene * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 13 + * @since 20 */ export declare class MarqueeDynamicSyncScene extends DynamicSyncScene { /** - * Type of the MarqueeDynamicSyncSceneType. - * @type { MarqueeDynamicSyncSceneType } - * @readonly - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 13 - */ + * Type of the MarqueeDynamicSyncSceneType. + * @type { MarqueeDynamicSyncSceneType } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ readonly type: MarqueeDynamicSyncSceneType; } - /** * class DragController * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ export declare class DragController { - /** * Execute a drag event. - * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. + * @param { CustomBuilder | DragItemInfo | undefined } 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 + * @param { AsyncCallback } callback - Callback that contains * the drag event information. - * @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. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ - executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo, + executeDrag(custom: CustomBuilder | DragItemInfo | undefined, 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 { CustomBuilder | DragItemInfo | undefined } 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: + * @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 + * @since 20 */ - executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo) + executeDrag(custom: CustomBuilder | DragItemInfo | undefined, 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. + * Create one drag action object, which can be used for starting drag later or monitoring the drag status after + * drag started. + * @param { Array | undefined } 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: + * @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 + * @since 20 */ - createDragAction(customArray: Array, dragInfo: dragController.DragInfo): dragController.DragAction; + createDragAction(customArray: Array | undefined, + 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 + * @since 20 */ 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 + * 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 + * 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 + * @since 20 */ setDragEventStrictReportingEnabled(enable: boolean): void; + + /** + * Notify the drag start request to specific pending or continue. + * @param { dragController.DragStartRequestStatus } requestStatus - Status about the drag start behavior. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + notifyDragStartRequest(requestStatus: dragController.DragStartRequestStatus): void; + + /** + * Cancel the UDMF data sync process by passing in the data key as the identify, can only be used after the drop. + * + * @param { string } key - The data key returned by startDataLoading method. + * @throws { BusinessError } 401 - Parameter error. + * @throws { BusinessError } 190004 - Operation failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + cancelDataLoading(key: string): void; + + /** + * Sets whether to enable the disallow badge icon show. + * + * Typically, when a component can receive or process data dragged by the user, or when it declares to the + * system that data should be processed in COPY way by returning DragBehavior.COPY, the system will display + * a plus sign together with the data number on the upper-left corner of the dragged object; if returning + * DragBehavior.MOVE to the system to declare that data should be processed in CUT way, the system will only + * display the data number on the upper-left corner of the dragged object. + * + * In some cases, when the system determines or the component explicitly declares that it cannot handle the + * data that the user is dragging, the system displays a badge icon in the same way as it does for DragBehavior.MOVE. + * So if you want to show the more clearly status, you can call this method on the UI instance in advance to force + * the system to display a clear prohibition icon on the upper left corner in such cases, and the user can clearly + * know that data cannot be dropped here. + * + * @param { boolean } enabled - Indicating enable the disallow status showing or not. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + enableDropDisallowedBadge(enabled: boolean): void; } /** * class MeasureUtils * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ export declare class MeasureUtils { /** @@ -1714,9 +2118,7 @@ export declare class MeasureUtils { * @param { MeasureOptions } options - Options. * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ measureText(options: MeasureOptions): number; @@ -1726,9 +2128,7 @@ export declare class MeasureUtils { * @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 + * @since 20 */ measureTextSize(options: MeasureOptions): SizeOptions; } @@ -1736,15 +2136,13 @@ export declare class MeasureUtils { /** * class FocusController * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ export declare class FocusController { /** * clear focus to the root container. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ clearFocus(): void; @@ -1755,21 +2153,43 @@ export declare class FocusController { * @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 + * @since 20 */ 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. + * @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 + * @since 20 */ activate(isActive: boolean, autoInactive?: boolean): void; + + /** + * Get whether the focus style is active. + * @returns { boolean } Whether the focus style is active. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isActive(): boolean; + + /** + * Set whether to enable autofocus transfer. + * @param { boolean } isAutoFocusTransfer - A Boolean value that indicates whether autofocus transfer is enabled. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setAutoFocusTransfer(isAutoFocusTransfer: boolean): void; + + /** + * Set the priority of key event processing when component cannot handle the key event.. + * @param { KeyProcessingMode } mode - Key processing mode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setKeyProcessingMode(mode: KeyProcessingMode): void; } /** @@ -1777,8 +2197,7 @@ export declare class FocusController { * * @typedef {pointer.PointerStyle} PointerStyle * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @atomicservice - * @since 12 + * @since 20 */ export type PointerStyle = pointer.PointerStyle; @@ -1786,28 +2205,22 @@ export type PointerStyle = pointer.PointerStyle; * class CursorController * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ export declare class CursorController { /** * Restore default cursor. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ restoreDefault(): void; /** * Set cursor style. - * + * * @param { PointerStyle } value - cursor style enum. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ setCursor(value: PointerStyle): void; } @@ -1816,18 +2229,14 @@ export declare class CursorController { * class ContextMenuController * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ export declare class ContextMenuController { /** * Close context menu. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ close(): void; } @@ -1836,19 +2245,15 @@ export declare class ContextMenuController { * Class FrameCallback * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ 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 + * @since 20 */ onFrame(frameTimeInNano: number): void; @@ -1857,9 +2262,7 @@ export declare abstract class FrameCallback { * * @param { number } timeLeftInNano - The remaining time from the deadline for this frame. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ onIdle(timeLeftInNano: number): void; } @@ -1871,35 +2274,30 @@ export declare abstract class FrameCallback { * @typedef { common.Context } Context * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ export type Context = common.Context; /** * class ComponentSnapshot * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ 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 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 + * @since 20 + */ get(id: string, callback: AsyncCallback, options?: componentSnapshot.SnapshotOptions): void; /** @@ -1914,39 +2312,110 @@ export declare class ComponentSnapshot { *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Invalid ID. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ 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 { 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + getSync(id: string, options?: componentSnapshot.SnapshotOptions): image.PixelMap; + + /** + * Get a component snapshot by uniqueId. + * + * @param { number } uniqueId - The uniqueId of the node, can get through getUniqueId. + * @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 + * @since 20 + */ + getWithUniqueId(uniqueId: number, 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 { number } uniqueId - The uniqueId of the node, can get through getUniqueId. * @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 - 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. + * @throws { BusinessError } 100001 - Invalid ID. + * @throws { BusinessError } 160002 - Timeout. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ - createFromBuilder(builder: CustomBuilder, callback: AsyncCallback, - delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): void; + getSyncWithUniqueId(uniqueId: number, options?: componentSnapshot.SnapshotOptions): image.PixelMap; /** - * Generate a snapshot from a custom component builder. + * Generate a snapshot from a custom component content. * - * @param { CustomBuilder } builder - Builder function of a custom component. + * @param { ComponentContent } content - The content to be taken snapshot. * @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. @@ -1959,77 +2428,71 @@ export declare class ComponentSnapshot { * @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 + * @since 20 */ - createFromBuilder(builder: CustomBuilder, delay?: number, + createFromComponent(content: ComponentContent, 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. + * Get a component snapshot by component range. * - * @param { string } id - Target component ID, set by developer through .id attribute. + * @param { NodeIdentity } start - the start component ID, set by developer through .id attribute or the unique ID + * get from FrameNode. + * @param { NodeIdentity } end - the end component ID, set by developer through.id attribute or the unique ID + * get from FrameNode. + * @param { boolean } isStartRect - indicating the snapshot rect to use, true for using the + * rect of the start component, false for using the rect of the end component. * @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. + * @returns { Promise } A Promise with the snapshot in PixelMap format. + * @throws { BusinessError } 202 - The caller is not a system application. + * @throws { BusinessError } 100001 - Invalid ID detected. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @systemapi + * @since 20 */ - getSync(id: string, options?: componentSnapshot.SnapshotOptions): image.PixelMap; + getWithRange(start: NodeIdentity, end: NodeIdentity, isStartRect: boolean, + options?: componentSnapshot.SnapshotOptions): Promise; } - /** * class UIContext * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ export declare class UIContext { - /** * get object font. * * @returns { Font } object Font. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ getFont(): Font; - + /** + * Check whether the UIContext object is available. + * + * @returns { boolean } Returns true if the UIContext object is available. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isAvailable(): boolean; + /** * get object mediaQuery. * * @returns { MediaQuery } object MediaQuery. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ getMediaQuery(): MediaQuery; - /** * get object UIInspector. * @returns { UIInspector } object UIInspector. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ getUIInspector(): UIInspector; @@ -2037,14 +2500,12 @@ export declare class UIContext { * 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: + * @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 20 */ getFilteredInspectorTree(filters?: Array): string; @@ -2054,61 +2515,47 @@ export declare class UIContext { * @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: + * @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 20 */ getFilteredInspectorTreeById(id: string, depth: number, filters?: Array): string; - /** * get object router. * * @returns { Router } object Router. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ getRouter(): Router; - /** * get object PromptAction. * * @returns { PromptAction } object PromptAction. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ getPromptAction(): PromptAction; - /** * get object ComponentUtils. * @returns { ComponentUtils } object ComponentUtils. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ getComponentUtils(): ComponentUtils; - /** * Get the UI observer. * * @returns { UIObserver } The UI observer. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ getUIObserver(): UIObserver; @@ -2117,50 +2564,121 @@ export declare class UIContext { * * @returns { OverlayManager } object OverlayManager. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ getOverlayManager(): OverlayManager; - + /** + * Init OverlayManager. + * + * @param { OverlayManagerOptions } options - Options. + * @returns { boolean } Returns true if it is called first and before getting an OverlayManager instance; returns + * false otherwise. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setOverlayManagerOptions(options: OverlayManagerOptions): boolean; + + /** + * Get object OverlayManagerOptions. + * + * @returns { OverlayManagerOptions } object OverlayManagerOptions. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getOverlayManagerOptions(): OverlayManagerOptions; + /** * Create an animator object for custom animation. * * @param { AnimatorOptions } options - Options. * @returns { AnimatorResult } - * @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 11 + * @since 20 */ createAnimator(options: AnimatorOptions): AnimatorResult; - + /** + * Create an animator object for custom animation. + * + * @param { AnimatorOptions | SimpleAnimatorOptions } 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 + * @since 20 + */ + createAnimator(options: AnimatorOptions | SimpleAnimatorOptions): 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 + * @since 20 */ animateTo(value: AnimateParam, event: () => void): void; + /** + * alertDialog display. + * + * @param { AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions } options - + * Options. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + showAlertDialog( + options: AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions): void; + + /** + * actionSheet display. + * + * @param { ActionSheetOptions } value - Options. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + showActionSheet(value: ActionSheetOptions): void; + + /** + * datePickerDialog display. + * + * @param { DatePickerDialogOptions } options - Options. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + showDatePickerDialog(options: DatePickerDialogOptions): void; + + /** + * timePickerDialog display. + * + * @param { TimePickerDialogOptions } options - Options. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + showTimePickerDialog(options: TimePickerDialogOptions): void; + + /** + * textPickerDialog display. + * + * @param { TextPickerDialogOptions } options - Options. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + showTextPickerDialog(options: TextPickerDialogOptions): 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 + * @since 20 */ runScopedTask(callback: () => void): void; @@ -2169,9 +2687,7 @@ export declare class UIContext { * * @param { KeyboardAvoidMode } value - The mode of keyboard avoid. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ setKeyboardAvoidMode(value: KeyboardAvoidMode): void; @@ -2179,55 +2695,80 @@ export declare class UIContext { * Get KeyboardAvoidMode. * @returns { KeyboardAvoidMode } The mode of keyboard avoid. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ getKeyboardAvoidMode(): KeyboardAvoidMode; + /** + * Set the pixel round mode of the system. The default mode is PixelRoundMode.PIXEL_ROUND_ON_LAYOUT_FINISH. + * + * @param { PixelRoundMode } mode - The mode of pixel round. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setPixelRoundMode(mode: PixelRoundMode): void; + + /** + * Get the pixel round mode of the system. + * + * @returns { PixelRoundMode } the mode of pixel round. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getPixelRoundMode(): PixelRoundMode; + + /** + * Dispach keyboard event to the frameNode with inspector key. + * + * @param { number | string } node - The uniqueId or inspector key of the target FrameNode. + * @returns { boolean } Returns whether the key event is consumed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + dispatchKeyEvent(node: number | string, event: KeyEvent): boolean; + /** * Get AtomicServiceBar. * @returns { Nullable } The atomic service bar. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ getAtomicServiceBar(): Nullable; - /** * Get DragController. * @returns { DragController } the DragController * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ getDragController(): DragController; /** - * Get MeasureUtils. - * @returns { MeasureUtils } the MeasureUtils - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ + * Get MeasureUtils. + * @returns { MeasureUtils } the MeasureUtils + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ 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 + * @since 20 */ keyframeAnimateTo(param: KeyframeAnimateParam, keyframes: Array): void; + /** + * Get FocusController. + * @returns { FocusController } the FocusController + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getFocusController(): FocusController; + /** * Define animation functions for immediate distribution. * @@ -2236,7 +2777,7 @@ export declare 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 20 */ animateToImmediately(param: AnimateParam, event: Callback): void; @@ -2246,9 +2787,7 @@ export declare class UIContext { * @param { string } id - The id of FrameNode. * @returns { FrameNode | null } The instance of FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ getFrameNodeById(id: string): FrameNode | null; @@ -2258,9 +2797,7 @@ export declare class UIContext { * @param { string } id - The id of FrameNode. * @returns { FrameNode | null } The instance of FrameNode. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ getAttachedFrameNodeById(id: string): FrameNode | null; @@ -2270,9 +2807,7 @@ export declare class UIContext { * @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 + * @since 20 */ getFrameNodeByUniqueId(id: number): FrameNode | null; @@ -2283,10 +2818,8 @@ export declare class UIContext { * @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 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 */ getPageInfoByUniqueId(id: number): PageInfo; @@ -2296,30 +2829,29 @@ export declare class UIContext { * @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 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 */ getNavigationInfoByUniqueId(id: number): observer.NavigationInfo | undefined; /** - * Get FocusController. - * @returns { FocusController } the FocusController + * 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 - * @atomicservice - * @since 12 + * @systemapi + * @since 20 */ - getFocusController(): FocusController; + setDynamicDimming(id: string, value: number): void; /** * Get object cursor controller. * * @returns { CursorController } object cursor controller. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ getCursorController(): CursorController; @@ -2328,9 +2860,7 @@ export declare class UIContext { * * @returns { ContextMenuController } object context menu controller. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ getContextMenuController(): ContextMenuController; @@ -2338,8 +2868,7 @@ export declare class UIContext { * Get ComponentSnapshot. * @returns { ComponentSnapshot } the ComponentSnapshot * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ getComponentSnapshot(): ComponentSnapshot; @@ -2348,8 +2877,7 @@ export declare class UIContext { * @param { number } value * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ vp2px(value: number): number; @@ -2358,8 +2886,7 @@ export declare class UIContext { * @param { number } value * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ px2vp(value: number): number; @@ -2368,8 +2895,7 @@ export declare class UIContext { * @param { number } value * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ fp2px(value: number): number; @@ -2378,8 +2904,7 @@ export declare class UIContext { * @param { number } value * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ px2fp(value: number): number; @@ -2388,8 +2913,7 @@ export declare class UIContext { * @param { number } value * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ lpx2px(value: number): number; @@ -2398,8 +2922,7 @@ export declare class UIContext { * @param { number } value * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ px2lpx(value: number): number; @@ -2409,9 +2932,7 @@ export declare class UIContext { * @returns { LocalStorage | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @stagemodelonly - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ getSharedLocalStorage(): LocalStorage | undefined; @@ -2421,52 +2942,34 @@ export declare class UIContext { * @returns { Context | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @stagemodelonly - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ getWindowHeightBreakpoint(): HeightBreakpoint; @@ -2487,11 +2990,10 @@ export declare class UIContext { * @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 + * @since 20 */ - openBindSheet(bindSheetContent: ComponentContent, sheetOptions?: SheetOptions, targetId?: number): Promise; + openBindSheet(bindSheetContent: ComponentContent, sheetOptions?: SheetOptions, + targetId?: number): Promise; /** * Update the BindSheet with sheetOptions. @@ -2509,11 +3011,10 @@ export declare class UIContext { * @throws { BusinessError } 120001 - The bindSheetContent is incorrect. * @throws { BusinessError } 120003 - The bindSheetContent cannot be found. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ - updateBindSheet(bindSheetContent: ComponentContent, sheetOptions: SheetOptions, partialUpdate?: boolean): Promise; + updateBindSheet(bindSheetContent: ComponentContent, sheetOptions: SheetOptions, + partialUpdate?: boolean): Promise; /** * Close the BindSheet. @@ -2527,9 +3028,7 @@ export declare class UIContext { * @throws { BusinessError } 120001 - The bindSheetContent is incorrect. * @throws { BusinessError } 120003 - The bindSheetContent cannot be found. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ closeBindSheet(bindSheetContent: ComponentContent): Promise; @@ -2538,8 +3037,7 @@ export declare class UIContext { * * @param { FrameCallback } frameCallback - The frame callback to run on the next frame. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ postFrameCallback(frameCallback: FrameCallback): void; @@ -2549,8 +3047,7 @@ export declare class UIContext { * @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 + * @since 20 */ postDelayedFrameCallback(frameCallback: FrameCallback, delayTime: number): void; @@ -2560,20 +3057,19 @@ export declare class UIContext { * @param { string } id - The id of DynamicSyncScene. * @returns { Array} The instance of SwiperDynamicSyncScene. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ 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. + * 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 + * @since 20 */ clearResourceCache(): void; @@ -2582,9 +3078,7 @@ export declare class UIContext { * * @returns { boolean } Returns true if current font scale follows the system; returns false otherwise. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 13 + * @since 20 */ isFollowingSystemFontScale(): boolean; @@ -2593,114 +3087,309 @@ export declare class UIContext { * * @returns { number } The max font scale. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 13 + * @since 20 */ getMaxFontScale(): number; + /** + * Bind tabs to scrollable container component to automatically hide tab bar. + * + * @param { TabsController } tabsController - The controller of the tabs. + * @param { Scroller } scroller - The controller of the scrollable container component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + bindTabsToScrollable(tabsController: TabsController, scroller: Scroller): void; + + /** + * Unbind tabs from scrollable container component. + * + * @param { TabsController } tabsController - The controller of the tabs. + * @param { Scroller } scroller - The controller of the scrollable container component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + unbindTabsFromScrollable(tabsController: TabsController, scroller: Scroller): void; + + /** + * Bind tabs to nested scrollable container components to automatically hide tab bar. + * + * @param { TabsController } tabsController - The controller of the tabs. + * @param { Scroller } parentScroller - The controller of the parent scrollable container component. + * @param { Scroller } childScroller - The controller of the child scrollable container component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + bindTabsToNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void; + + /** + * Unbind tabs from nested scrollable container components. + * + * @param { TabsController } tabsController - The controller of the tabs. + * @param { Scroller } parentScroller - The controller of the parent scrollable container component. + * @param { Scroller } childScroller - The controller of the child scrollable container component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + unbindTabsFromNestedScrollable(tabsController: TabsController, parentScroller: Scroller, + childScroller: Scroller): void; + + /** + * whether to enable or disable swipe to back event. + * + * @param { Optional } enabled - enable or disable swipe to back event. + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @since 20 + */ + enableSwipeBack(enabled: Optional): void; + + /** + * Open the BindContentCover. + * + * @param { ComponentContent } content - The content of BindContentCover. + * @param { ContentCoverController } controller - ContentCover controller. + * @param { ContentCoverOptions } [contentCoverOptions] - The options of contentCover. + * @param { number } [targetId] - The uniqueId of the FrameNode to which BindContentCover 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 } 120301 - The BindContentCover is incorrect. + * @throws { BusinessError } 120302 - The BindContentCover already exists. + * @throws { BusinessError } 120304 - The targetId does not exist. + * @throws { BusinessError } 120305 - The node of targetId is not in the component tree. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + openBindContentCover(content: ComponentContent, controller: ContentCoverController, + contentCoverOptions?: ContentCoverOptions, targetId?: number): Promise; + + /** + * Sets the component freezing flag based on the component id to prevent the + * UI component from marking and updating dirty areas. + * @param { string } id - Id of the frame node. + * @param { boolean } isFrozen - whether the component is frozen. + * @throws { BusinessError } 202 - The caller is not a system application. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + freezeUINode(id: string, isFrozen: boolean): void; + + /** + * Sets the component freezing flag based on the component uniqueId to prevent the + * UI component from marking and updating dirty areas. + * @param { number } uniqueId - Unique Id of the frame node. + * @param { boolean } isFrozen - whether the component is frozen. + * @throws { BusinessError } 202 - The caller is not a system application. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + freezeUINode(uniqueId: number, isFrozen: boolean): void; + + /** + * Get object text menu controller. + * + * @returns { TextMenuController } object text menu controller. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getTextMenuController(): TextMenuController; + + /** + * Create a UI instance singleton without window and get its UIContext object. + * + * @param { common.UIAbilityContext | common.ExtensionContext } context - UIAbilityContext or ExtensionContext. + * @returns { UIContext | undefined } object UIContext, or undefined when failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. The number of parameters is incorrect. + *
2. Invalid parameter type of context. + * @throws { BusinessError } 100001 - Internal error. + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static createUIContextWithoutWindow( + context: common.UIAbilityContext | common.ExtensionContext): UIContext | undefined; + + /** + * Destroy the UI instance singleton without window. + * + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static destroyUIContextWithoutWindow(): void; + + /** + * Thread-safe UI state variables updates interface. + * + * @param { VoidCallback } callback - The callback function to be executed in the UI thread. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setUIStates(callback: VoidCallback): void; + + /** + * Retrieves the UIContext corresponding to the UI instance of the currently focused window. + * Returns undefined if it does not exist. + * + * @returns { UIContext | undefined } The focused UIContext, or undefined if it does not exist. + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static getFocusedUIContext(): UIContext | undefined; } /** * Enum of KeyBoardAvoidMethodType - * + * * @enum { number } KeyBoardAvoidMethodType * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ - export const enum KeyboardAvoidMode { /** - * Default Type, offset the whole page when keyBoard height changed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ + * Default Type, offset the whole page when keyBoard height changed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ OFFSET = 0, /** * Resize Type, resize the page when keyBoard height changed. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ 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 Type, offset the whole page when caret position or keyboard height changed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ 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 Type, resize the whole page when when caret position or keyboard height changed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ RESIZE_WITH_CARET = 3, /** - * None Type, nothing to do when keyboard height changed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - NONE = 4, + * None Type, nothing to do when keyboard height changed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NONE = 4 } /** * Enum of SwiperDynamicSyncSceneType - * + * * @enum { number } SwiperDynamicSyncSceneType * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ export const enum SwiperDynamicSyncSceneType { /** * Scene type is GESTURE. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ GESTURE = 0, /** * Scene type is ANIMATION. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ ANIMATION = 1 } /** * Enum of scene type for Marquee - * + * * @enum { number } MarqueeDynamicSyncSceneType * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 13 + * @since 20 */ export const enum MarqueeDynamicSyncSceneType { /** * Scene type is ANIMATION. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 13 + * @since 20 */ ANIMATION = 1 } + +/** + * class TextMenuController + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class TextMenuController { + /** + * Set text menu options. + * + * @param { TextMenuOptions } options - the options of the text menu. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setMenuOptions(options: TextMenuOptions): void; + + /** + * Disable all system service menus, such as translation and ai writer. + * True means disable, false means enable. + * + * @param { boolean } disable - flag to disable service menu items + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static disableSystemServiceMenuItems(disable: boolean): void; +} + +/** + * The class used to control ContentConver + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class ContentCoverController { + /** + * The constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(); + + /** + * Update cotentCoverOptions. + * + * @param { ContentCoverOptions } contentCoverOptions - The options of contentCover. + * @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. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + update(contentCoverOptions: ContentCoverOptions, partialUpdate?: boolean): void; + + /** + * Close contentConver. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + close(): void; +} \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.ComposeListItem.static.d.ets b/api/@ohos.arkui.advanced.ComposeListItem.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..e31c772eceb2642b4152914c72701fb1fc7495fa --- /dev/null +++ b/api/@ohos.arkui.advanced.ComposeListItem.static.d.ets @@ -0,0 +1,423 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { Component } from './arkui/component/customComponent'; +import { ResourceStr } from './arkui/component/units'; +import { PropRef } from './arkui/stateManagement/decorator'; +import { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; +import { Builder } from './arkui/component/builder'; +/** + * Declare enum IconType + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare enum IconType { + /** + * Badge type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + BADGE = 1, + /** + * Normal icon type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NORMAL_ICON = 2, + /** + * System icon type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + SYSTEM_ICON = 3, + /** + * HeadSculpture type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + HEAD_SCULPTURE = 4, + /** + * App icon type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + APP_ICON = 5, + /** + * Preview type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PREVIEW = 6, + /** + * Longitudinal type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LONGITUDINAL = 7, + /** + * Vertical type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + VERTICAL = 8 +} +/** + * Declare type OperateIcon + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class OperateIcon { + /** + * The content of text or the address of icon. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: ResourceStr; + /** + * The content of text or the address of symbol. + * + * @type { ?SymbolGlyphModifier }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolStyle?: SymbolGlyphModifier; + + /** + * Callback function when operate the icon. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + action?: () => void; + /** + * The accessibilityText of the icon. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of the icon. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of the icon. + * + * @type { ?string } + * @default "auto" + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityLevel?: string; +} +/** + * Declare type OperateCheck + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class OperateCheck { + /** + * Whether is checked on default. + * + * @type { ?boolean }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isCheck?: boolean; + /** + * Callback function when operate the checkbox/switch/radio. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onChange?: (value: boolean) => void; + /** + * The accessibilityText of the checkbox/switch/radio. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of the checkbox/switch/radio. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of the checkbox/switch/radio. + * + * @type { ?string } + * @default "auto" + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityLevel?: string; +} +/** + * Declare type OperateButton + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class OperateButton { + /** + * The text on the button. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + text?: ResourceStr; + /** + * The accessibilityText of the button. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of the button. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of the button. + * + * @type { ?string } + * @default "auto" + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityLevel?: string; +} +/** + * Declare ContentItem + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class ContentItem { + /** + * The type of icon. + * + * @type { ?IconType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iconStyle?: IconType; + /** + * Sets the icon. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + icon?: ResourceStr; + /** + * Sets the symbol. + * + * @type { ?SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolStyle?: SymbolGlyphModifier; + /** + * Sets the primaryText. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + primaryText?: ResourceStr; + /** + * Sets the secondaryText. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + secondaryText?: ResourceStr; + /** + * Sets the description. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + description?: ResourceStr; +} +/** + * Declare OperateItem + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class OperateItem { + /** + * Sets the icon. + * + * @type { ?OperateIcon } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + icon?: OperateIcon; + /** + * Sets the subIcon. + * + * @type { ?OperateIcon } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + subIcon?: OperateIcon; + /** + * Sets the button. + * + * @type { ?OperateButton } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + button?: OperateButton; + /** + * Sets the toggle. + * + * @type { ?OperateCheck } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + toggle?: OperateCheck; + /** + * Sets the checkBox. + * + * @type { ?OperateCheck } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + checkbox?: OperateCheck; + /** + * Sets the radio. + * + * @type { ?OperateCheck } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + radio?: OperateCheck; + /** + * Sets the image. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + image?: ResourceStr; + /** + * Sets the symbolStyle. + * + * @type { ?SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolStyle?: SymbolGlyphModifier; + /** + * Sets the text. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + text?: ResourceStr; + /** + * Sets the arrow. + * + * @type { ?OperateIcon } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + arrow?: OperateIcon; +} +/** + * Declare ComposeListItem + * + * @struct { ComposeListItem } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Component +export declare struct ComposeListItem { + /** + * The ContentItem. + * + * @type { ?ContentItem } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef contentItem?: ContentItem; + /** + * The OperateItem. + * + * @type { ?OperateItem } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef operateItem?: OperateItem; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.ComposeTitleBar.static.d.ets b/api/@ohos.arkui.advanced.ComposeTitleBar.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..368ac0d0499d9f5df8aff7e56b050f34bab7af33 --- /dev/null +++ b/api/@ohos.arkui.advanced.ComposeTitleBar.static.d.ets @@ -0,0 +1,153 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { ResourceStr } from './arkui/component/units'; +import { Component } from './arkui/component/customComponent'; +import { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; +import { Builder } from './arkui/component/builder'; +/** + * Declaration of the menu item on the right side. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class ComposeTitleBarMenuItem { + /** + * Icon resource for this menu item. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: ResourceStr; + /** + * Symbol resource for this menu item. + * + * @type { ?SymbolGlyphModifier }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolStyle?: SymbolGlyphModifier; + /** + * Icon label for this menu item. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + label?: ResourceStr; + /** + * Whether to enable this menu item. + * + * @type { ?boolean }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isEnabled?: boolean; + /** + * Callback function when click on this menu item. + * + * @type { ?function }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + action?: () => void; + /** + * The accessibilityText of this menu item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of this menu item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of this menu item. + * + * @type { ?string } + * @default "auto".The options are as follows:
+ * "auto":The value is converted to "yes" or "no" based on the component. + * "yes": the current component is selectable for the accessibility service. + * "no": The current component is not selectable for the accessibility service. + * "no-hide-descendants":The current component and all its child components are not selectable
+ * for the accessibility service. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityLevel?: string; +} +/** + * Declaration of the composable title bar. + * @struct { ComposeTitleBar } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Component +export declare struct ComposeTitleBar { + /** + * Avatar resource and event callback of this title bar. + * + * @type { ?ComposeTitleBarMenuItem }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + item?: ComposeTitleBarMenuItem; + /** + * Title of this title bar. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + title: ResourceStr; + /** + * Sub-title of this title bar. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + subtitle?: ResourceStr; + /** + * Menu items on the right side. + * + * @type { ?Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + menuItems?: Array; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.Dialog.static.d.ets b/api/@ohos.arkui.advanced.Dialog.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..8998b01219769de99a7fff93c504fbc5677cf975 --- /dev/null +++ b/api/@ohos.arkui.advanced.Dialog.static.d.ets @@ -0,0 +1,671 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { Theme, CustomTheme } from './@ohos.arkui.theme'; +import { Component, CustomDialog } from './arkui/component/customComponent'; +import { ResourceStr, ResourceColor, Padding, LocalizedPadding, SizeOptions } from './arkui/component/units'; +import { ButtonStyleMode, ButtonRole } from './arkui/component/button'; +import { PixelMap, ThemeColorMode, CustomPopupOptions } from './arkui/component/common'; +import { PropRef, Prop, Link, Require } from './arkui/stateManagement/decorator'; +import { Callback } from './@ohos.base'; +import { CustomDialogController } from './arkui/component/customDialogController'; +import { BuilderParam, Builder } from './arkui/component/builder'; +import { SheetInfo } from './arkui/component/actionSheet'; +/** + * Declare ButtonOptions + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class ButtonOptions { + /** + * Sets the Display Content of a Button. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: ResourceStr; + /** + * Sets the Button Callback. + * + * @type { ?function }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + action?: () => void; + /** + * Sets the background color of a button. + * + * @type { ?ResourceColor }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + background?: ResourceColor; + /** + * Sets the Button Text Color. + * + * @type { ?ResourceColor }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontColor?: ResourceColor; + /** + * Describes the Button style. + * + * @type { ?ButtonStyleMode } + * @default ButtonStyleMode.TEXTUAL + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + buttonStyle?: ButtonStyleMode; + /** + * Describes the Button role. + * + * @type { ?ButtonRole } + * @default ButtonRole.NORMAL + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + role?: ButtonRole; + /** + * Set the default focus of a button. + * + * @type { ?boolean } + * @default { false } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + defaultFocus?: boolean; +} +/** + * Declare CustomDialog TipsDialog + * @struct { TipsDialog } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@CustomDialog +export declare struct TipsDialog { + /** + * Sets the TipsDialog Controller. + * + * @type { CustomDialogController }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller: CustomDialogController; + /** + * Sets the TipsDialog imageRes. + * + * @type { ResourceStr | PixelMap } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + imageRes: ResourceStr | PixelMap; + /** + * Sets the TipsDialog image size. + * + * @type { ?SizeOptions }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + imageSize?: SizeOptions; + /** + * Sets the TipsDialog title. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + title?: ResourceStr; + /** + * Sets the TipsDialog content. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + content?: ResourceStr; + /** + * Sets the TipsDialog checkbox tips. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + checkTips?: ResourceStr; + /** + * Sets the TipsDialog checkbox check state. + * + * @type { ?boolean }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef isChecked?: boolean; + /** + * Sets the TipsDialog CheckBox Callback. + * + * @type { ?function }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + checkAction?: (isChecked: boolean) => void; + /** + * Sets the TipsDialog primary button. + * + * @type { ?ButtonOptions }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + primaryButton?: ButtonOptions; + /** + * Sets the TipsDialog secondary button. + * + * @type { ?ButtonOptions }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + secondaryButton?: ButtonOptions; + /** + * Custom Theme. + * + * @type { ?(Theme | CustomTheme) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + theme?: Theme | CustomTheme; + /** + * Sets the TipsDialog dark or light Mode. + * + * @type { ?ThemeColorMode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + themeColorMode?: ThemeColorMode; + /** + * Sets the TipsDialog CheckBox Callback. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onCheckedChange?: Callback; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} +/** + * Declare CustomDialog SelectDialog + * @struct { SelectDialog } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@CustomDialog +export declare struct SelectDialog { + /** + * Sets the SelectDialog Controller. + * + * @type { CustomDialogController }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller: CustomDialogController; + /** + * Sets the SelectDialog title. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + title: ResourceStr; + /** + * Sets the SelectDialog content. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + content?: ResourceStr; + /** + * Sets the SelectDialog selected index. + * + * @type { ?number }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + selectedIndex?: number; + /** + * Sets the SelectDialog confirm button. + * + * @type { ?ButtonOptions }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + confirm?: ButtonOptions; + /** + * Sets the SelectDialog sheets. + * + * @type { Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + radioContent: Array; + /** + * Custom Theme. + * + * @type { ?(Theme | CustomTheme) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + theme?: Theme | CustomTheme; + /** + * Sets the SelectDialog dark or light Mode. + * + * @type { ?ThemeColorMode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + themeColorMode?: ThemeColorMode; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} +/** + * Declare CustomDialog ConfirmDialog + * @struct { ConfirmDialog } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@CustomDialog +export declare struct ConfirmDialog { + /** + * Sets the ConfirmDialog Controller. + * + * @type { CustomDialogController }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller: CustomDialogController; + /** + * Sets the ConfirmDialog title. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + title: ResourceStr; + /** + * Sets the ConfirmDialog content. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + content?: ResourceStr; + /** + * Sets the ConfirmDialog checkbox tips. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + checkTips?: ResourceStr; + /** + * Sets the ConfirmDialog checkbox state. + * + * @type { ?boolean }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef isChecked?: boolean; + /** + * Sets the ConfirmDialog primary button. + * + * @type { ?ButtonOptions }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + primaryButton?: ButtonOptions; + /** + * Sets the ConfirmDialog secondary button. + * + * @type { ?ButtonOptions }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + secondaryButton?: ButtonOptions; + /** + * Custom Theme. + * + * @type { ?(Theme | CustomTheme) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + theme?: Theme | CustomTheme; + /** + * Sets the ConfirmDialog dark or light Mode. + * + * @type { ?ThemeColorMode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + themeColorMode?: ThemeColorMode; + /** + * Sets the ConfirmDialog CheckBox Callback. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onCheckedChange?: Callback; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} +/** + * Declare CustomDialog AlertDialog + * @struct { AlertDialog } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@CustomDialog +export declare struct AlertDialog { + /** + * Sets the AlertDialog Controller. + * + * @type { CustomDialogController }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller: CustomDialogController; + /** + * Sets the AlertDialog title. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + primaryTitle?: ResourceStr; + /** + * Sets the AlertDialog secondary title. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + secondaryTitle?: ResourceStr; + /** + * Sets the AlertDialog content. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + content: ResourceStr; + /** + * Sets the AlertDialog primary button. + * + * @type { ?ButtonOptions }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + primaryButton?: ButtonOptions; + /** + * Sets the AlertDialog secondary button. + * + * @type { ?ButtonOptions }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + secondaryButton?: ButtonOptions; + /** + * Custom Theme. + * + * @type { ?(Theme | CustomTheme) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + theme?: Theme | CustomTheme; + /** + * Sets the AlertDialog dark or light Mode. + * + * @type { ?ThemeColorMode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + themeColorMode?: ThemeColorMode; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} +/** + * Declare CustomDialog LoadingDialog + * @struct { LoadingDialog } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@CustomDialog +export declare struct LoadingDialog { + /** + * Sets the LoadingDialog Controller. + * + * @type { CustomDialogController }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Controller: CustomDialogController; + /** + * Sets the LoadingDialog content. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + content?: ResourceStr; + /** + * Custom Theme. + * + * @type { ?(Theme | CustomTheme) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + theme?: Theme | CustomTheme; + /** + * Sets the LoadingDialog dark or light Mode. + * + * @type { ?ThemeColorMode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + themeColorMode?: ThemeColorMode; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} +/** + * Declare custom content dialog + * @struct { CustomContentDialog } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@CustomDialog +export declare struct CustomContentDialog { + /** + * Sets the CustomContentDialog Controller. + * + * @type { CustomDialogController }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller: CustomDialogController; + /** + * Sets the CustomContentDialog title. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + primaryTitle?: ResourceStr; + /** + * Sets the CustomContentDialog secondary title. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + secondaryTitle?: ResourceStr; + /** + * Sets the CustomContentDialog content. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @BuilderParam contentBuilder: () => void; + /** + * Sets the CustomContentDialog content area padding. + * + * @type { ?Padding } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + contentAreaPadding?: Padding; + /** + * Sets the CustomContentDialog content area localized padding. + * + * @type { ?LocalizedPadding } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + localizedContentAreaPadding?: LocalizedPadding; + /** + * Sets the CustomContentDialog buttons. + * + * @type { ?ButtonOptions[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + buttons?: ButtonOptions[]; + /** + * Custom Theme. + * + * @type { ?(Theme | CustomTheme) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + theme?: Theme | CustomTheme; + /** + * Sets the CustomContentDialog dark or light Mode. + * + * @type { ?ThemeColorMode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + themeColorMode?: ThemeColorMode; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} +/** + * Declare struct PopoverDialog + * @struct { PopoverDialog } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Component +export declare struct PopoverDialog { + /** + * Sets the PopoverDialog Visible Status. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Link visible: boolean; + /** + * Sets the PopoverDialog options. + * + * @type { PopoverOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Require @PropRef + popover: PopoverOptions; + /** + * Sets the targetBuilder content. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Require @BuilderParam + targetBuilder: () => void; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} +/** + * Defines PopoverDialog Options + * + * @extends CustomPopupOptions + * @typedef PopoverOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface PopoverOptions extends CustomPopupOptions { +} diff --git a/api/@ohos.arkui.advanced.EditableTitleBar.static.d.ets b/api/@ohos.arkui.advanced.EditableTitleBar.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..86960d70de70bc49b4775ec0168a4d3314fac322 --- /dev/null +++ b/api/@ohos.arkui.advanced.EditableTitleBar.static.d.ets @@ -0,0 +1,302 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { ResourceStr, ResourceColor, LocalizedMargin } from './arkui/component/units'; +import { SafeAreaType, SafeAreaEdge, BlurStyle } from './arkui/component/common'; +import { Component } from './arkui/component/customComponent'; +import { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; +import { PropRef } from './arkui/stateManagement/decorator'; +import { Builder } from './arkui/component/builder'; +/** + * Declaration of the menu item on the right side. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class EditableTitleBarMenuItem { + /** + * Icon resource for this menu item. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: ResourceStr; + /** + * Symbol style for this menu item. + * + * @type { ?SymbolGlyphModifier }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolStyle?: SymbolGlyphModifier; + /** + * Icon label for this menu item. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + label?: ResourceStr; + /** + * Whether to enable this menu item. + * + * @type { ?boolean }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isEnabled?: boolean; + /** + * Callback function when click on this menu item. + * + * @type { ?function }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + action?: () => void; + /** + * The accessibilityText of this menu item. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of this menu item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of this menu item. + * + * @type { ?string } + * @default "auto" + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityLevel?: string; + /** + * Set the default focus state of this menu item. + * + * @type { ?boolean }. + * @default { false }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + defaultFocus?: boolean; +} +/** + * Declaration of the image item . + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export type EditableTitleBarItem = EditableTitleBarMenuItem; +/** + * Declaration of the left icon type. + * + * @enum { int }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare enum EditableLeftIconType { + /** + * The back type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Back = 0, + /** + * The cancel type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Cancel = 1 +} +/** + * Indicates the options of the editable title bar. + * + * @interface EditableTitleBarOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface EditableTitleBarOptions { + /** + * Background color. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + backgroundColor?: ResourceColor; + /** + * Background blur style. + * + * @type { ?BlurStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + backgroundBlurStyle?: BlurStyle; + /** + * Indicates the types of the safe area. + * + * @type { ?Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + safeAreaTypes?: Array; + /** + * Indicates the edges of the safe area. + * + * @type { ?Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + safeAreaEdges?: Array; +} +/** + * Declaration of the editable title bar. + * @struct { EditableTitleBar } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Component +export declare struct EditableTitleBar { + /** + * Style of the left icon. + * + * @type { EditableLeftIconType }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + leftIconStyle: EditableLeftIconType; + /** + * Image item between the left icon and the title. + * + * @type { ?EditableTitleBarItem } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + imageItem?: EditableTitleBarItem; + /** + * Title of this title bar. + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + title: ResourceStr; + /** + * Sub-Title of this title bar. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + subtitle?: ResourceStr; + /** + * Whether to required the save icon. + * + * @type { boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isSaveIconRequired: boolean; + /** + * Menu items on the right side. + * + * @type { ?Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + menuItems?: Array; + /** + * Callback function when click on the save icon at the right side. + * + * @type { ?function }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onSave?: () => void; + /** + * Callback function when click on the cancel icon at the left side. + * + * @type { ?function }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onCancel?: () => void; + /** + * Indicates the options of titlebar. + * + * @type { EditableTitleBarOptions } + * @default {expandSafeAreaTypes: SafeAreaType.SYSTEM, expandSafeAreaEdges: SafeAreaEdge.TOP} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + options: EditableTitleBarOptions; + /** + * Sets the content margin. + * + * @type { ?LocalizedMargin } + * @default {start: LengthMetrics.resource($r('sys.float.margin_left')), + *
end: LengthMetrics.resource($r('sys.float.margin_right'))} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef contentMargin?: LocalizedMargin; + /** + * Sets the default focus state of left icon. + * + * @type { ?boolean } + * @default { false } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + leftIconDefaultFocus?: boolean; + /** + * Sets the default focus state of save icon. + * + * @type { ?boolean } + * @default { false } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + saveIconDefaultFocus?: boolean; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.ExceptionPrompt.static.d.ets b/api/@ohos.arkui.advanced.ExceptionPrompt.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..99a72c3f38cb0b76f39d33bafbfede8e91b83a16 --- /dev/null +++ b/api/@ohos.arkui.advanced.ExceptionPrompt.static.d.ets @@ -0,0 +1,160 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { ResourceStr, Dimension } from './arkui/component/units'; +import { PropRef } from './arkui/stateManagement/decorator'; +import { Component } from './arkui/component/customComponent'; +import { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; +import { Builder } from './arkui/component/builder'; +/** + * Control margin status of ExceptionPrompt. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare enum MarginType { + /** + * Default margin of MarginType,Margin 1: references ohos_id_card_margin_start, + * margin 2: references ohos_id_card_margin_end. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * + * @since 20 + */ + DEFAULT_MARGIN = 0, + /** + * Margins can be adapted of MarginType,Margin 1: references ohos_id_max_padding_start, + * margin 2: references ohos_id_max_padding_end. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + FIT_MARGIN = 1, +} +/** + * Configuration parameter of ExceptionPrompt. + * + * @interface PromptOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export interface PromptOptions { + /** + * Icon of PromptOptions. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + icon?: ResourceStr; + /** + * SymbolGlyphModifier of PromptOptions. + * + * @type { ?SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolStyle?: SymbolGlyphModifier; + /** + * Tip text of PromptOptions. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + tip?: ResourceStr; + /** + * Margin Type of ExceptionPrompt. + * + * @type { MarginType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + marginType: MarginType; + /** + * Right icon button text of PromptOptions. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + actionText?: ResourceStr; + /** + * Distance from the top of PromptOptions. + * + * @type { Dimension } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + marginTop: Dimension + /** + * Control concealment of PromptOptions. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isShown?: boolean +} +/** + * Declare struct ExceptionPrompt higher-order component. + * @struct { ExceptionPrompt } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Component +export declare struct ExceptionPrompt { + /** + * Configuration information of ExceptionPrompt. + * + * @type { PromptOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef options: PromptOptions; + /** + * Callback when clicking the text on the left. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onTipClick?: () => void; + /** + * Callback when click the icon button. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onActionTextClick?: () => void; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.Filter.static.d.ets b/api/@ohos.arkui.advanced.Filter.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..f88a9b7d0ceda4ffb88a7e295774a8478710e5a1 --- /dev/null +++ b/api/@ohos.arkui.advanced.Filter.static.d.ets @@ -0,0 +1,177 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { Component } from './arkui/component/customComponent'; +import { ResourceStr } from './arkui/component/units'; +import { BuilderParam, Builder } from './arkui/component/builder'; +import { PropRef } from './arkui/stateManagement/decorator'; +/** + * Declare FilterType + * + * @enum { int } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare enum FilterType { + /** + * The multi_line_filter type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + MULTI_LINE_FILTER = 0, + /** + * The list_filter type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LIST_FILTER = 1 +} +/** + * This parameter is used to define the input of each filtering dimension. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class FilterParams { + /** + * filter item name. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + name: ResourceStr; + /** + * filter options. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + options: Array; +} +/** + * This parameter specifies the selection result of a filtering dimension. + * The index starts from 0. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class FilterResult { + /** + * result name. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + name: ResourceStr; + /** + * result index. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + index: number; + /** + * result value. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: ResourceStr; +} + +/** + * Callback method after a user clicks a filter item. + * + * @typedef { function } OnFilterChangedCallback + * @param { Array } filterResults - The result of filter. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +declare type OnFilterChangedCallback = (filterResults: Array) => void; + +/** + * Declare Filter.The Filter is used in scenarios where multi-dimensional filtering is required. + * @struct { Filter } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Component +export declare struct Filter { + /** + * Container in the user-defined filtering result display area. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @BuilderParam container: () => void; + /** + * Multi-dimensional filtering parameters. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef multiFilters: Array; + /** + * FilterParams, Additional filter item parameter. The filter item name is displayed and can be deselected. + * + * @type { ?FilterParams } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef additionFilters?: FilterParams; + /** + * FilterParams, Callback method after a user clicks a filter item. + * + * @type { OnFilterChangedCallback } FilterType, Filter display style type. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onFilterChanged: OnFilterChangedCallback; + /** + * FilterType, Filter display style type. + * + * @type { ?FilterType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef filterType?: FilterType; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.FullScreenLaunchComponent.d.ets b/api/@ohos.arkui.advanced.FullScreenLaunchComponent.d.ets index 3d541c1aee4a5fd246d539972738caac1afd1c94..954654550481bd985b201b7215d377e6ad5886a4 100644 --- a/api/@ohos.arkui.advanced.FullScreenLaunchComponent.d.ets +++ b/api/@ohos.arkui.advanced.FullScreenLaunchComponent.d.ets @@ -19,7 +19,7 @@ */ import AtomicServiceOptions from '@ohos.app.ability.AtomicServiceOptions'; -import { Callback, ErrorCallback } from '@ohos.base'; +import { ErrorCallback, Callback } from '@ohos.base'; /** * Declares the FullScreenLaunchComponent, a component provided by ArkUI that allows diff --git a/api/@ohos.arkui.advanced.FullScreenLaunchComponent.static.d.ets b/api/@ohos.arkui.advanced.FullScreenLaunchComponent.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..6b52a4042d041b58b9bc6c251971f1d9365a259e --- /dev/null +++ b/api/@ohos.arkui.advanced.FullScreenLaunchComponent.static.d.ets @@ -0,0 +1,107 @@ +/* + * 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 Defines the fullScreen launch component + * @kit ArkUI + * @arkts 1.2 + */ + +import AtomicServiceOptions from '@ohos.app.ability.AtomicServiceOptions'; +import { Callback, ErrorCallback } from '@ohos.base'; +import { Component, BuilderParam, TerminationInfo, Builder } from '@ohos.arkui.component' + +/** + * Defines RecordData. + * + * @typedef { undefined | null | Object | Record | Array } RecordData + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @arkts 1.2 + */ +export type RecordData = undefined | null | Object | Record | Array; +/** + * Defines ContentBuilder. + * + * @typedef { function } ContentBuilder + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@Builder +type ContentBuilder = () => void; +/** + * Declares the FullScreenLaunchComponent, a component provided by ArkUI that allows + * you to define and use it in your application through the ArkTS-based declarative + * development paradigm. + * @struct { FullScreenLaunchComponent } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@Component +export declare struct FullScreenLaunchComponent { + /** + * Sets the component content. + * @type { ContentBuilder } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @BuilderParam content: ContentBuilder; + /** + * Indicates atomic service appId. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + appId: string; + /** + * Indicates the atomic service start options. + * @type { ?AtomicServiceOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + options?: AtomicServiceOptions; + /** + * Callback triggered when an error occurs during running of the started ExtensionAbility. + * It is supported only when the atomic service runs in embedded mode, + * with the parameter being of type BusinessError. + * @type { ?ErrorCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onError?: ErrorCallback; + /** + * Callback triggered when the EmbeddableUIAbility is terminated to receive the information + * about the termination. It is supported only when the atomic service runs in embedded mode, + * with the parameter being of type TerminationInfo. + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onTerminated?: Callback; + /** + * Indicates the callback of onReceive. + * @type { ?Callback> } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onReceive?: Callback>; + + /** + * The method to build component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets b/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets index 1818bd2488a5b89857ff28c9b30be2550642a784..61ed933ac2379c64e0de179395e45792f9485ba5 100644 --- a/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets +++ b/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets @@ -18,12 +18,19 @@ * @kit ArkUI */ +/*** if arkts 1.2 */ +import { Resource, ResourceStr, ResourceColor, LocalizedMargin } from './arkui/component/units'; +import { Prop } from './arkui/stateManagement/common'; +import { Component } from './arkui/component/customComponent'; +/*** endif */ + /** * Controls the style types of GridObjectSortComponent. * @enum { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Controls the style types of GridObjectSortComponent. @@ -38,7 +45,8 @@ export declare enum GridObjectSortComponentType { * The GridObjectSortComponent image text type. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * The GridObjectSortComponent image text type. @@ -53,7 +61,8 @@ export declare enum GridObjectSortComponentType { * The GridObjectSortComponent text type. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * The GridObjectSortComponent text type. @@ -70,7 +79,8 @@ export declare enum GridObjectSortComponentType { * @interface GridObjectSortComponentIteml * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Declaration of the GridObjectSortComponent item. @@ -86,7 +96,8 @@ export interface GridObjectSortComponentItem { * @type { number | string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * id of GridObjectSortComponent item. @@ -103,7 +114,8 @@ export interface GridObjectSortComponentItem { * @type { ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * GridObjectSortComponent item text. @@ -120,7 +132,8 @@ export interface GridObjectSortComponentItem { * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * selected of GridObjectSortComponent item, true is show area, false is add area. @@ -137,7 +150,8 @@ export interface GridObjectSortComponentItem { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * order of GridObjectSortComponentItem, Used for sorting dataList. @@ -154,7 +168,8 @@ export interface GridObjectSortComponentItem { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * image resource path of the GridObjectSortComponent item. @@ -181,7 +196,8 @@ export interface GridObjectSortComponentItem { * @interface GridEditOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * GridObjectSortComponentOptions of GridObjectSortComponent. @@ -198,7 +214,8 @@ export interface GridObjectSortComponentOptions { * @default GridObjectSortComponentType.TEXT * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Configuration GridObjectSortComponent type. @@ -216,7 +233,8 @@ export interface GridObjectSortComponentOptions { * @type { ?number | ?Resource } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * The size of the GridObjectSortComponent image. @@ -233,7 +251,8 @@ export interface GridObjectSortComponentOptions { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * The title displayed in the unedited state of the GridObjectSortComponent. @@ -250,7 +269,8 @@ export interface GridObjectSortComponentOptions { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * The title displayed in the GridObjectSortComponent edit state. @@ -267,7 +287,8 @@ export interface GridObjectSortComponentOptions { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Display Area Title, First subtitle of the GridObjectSortComponent. @@ -284,7 +305,8 @@ export interface GridObjectSortComponentOptions { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Add Zone Title, second subtitle of the GridObjectSortComponent. @@ -302,7 +324,8 @@ export interface GridObjectSortComponentOptions { * @struct { GridObjectSortComponent } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Declare struct GridObjectSortComponent. @@ -319,7 +342,8 @@ export declare struct GridObjectSortComponent { * @type { GridObjectSortComponentOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Component types and parameters of the GridObjectSortComponent. @@ -337,7 +361,8 @@ export declare struct GridObjectSortComponent { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Data list of GridObjectSortComponent. @@ -354,7 +379,8 @@ export declare struct GridObjectSortComponent { * @type { (select: Array, unselect: Array) => void } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Callback when Obtain edited data. @@ -371,7 +397,8 @@ export declare struct GridObjectSortComponent { * @type { () => void } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Cancel callback for saving data. @@ -387,7 +414,8 @@ export declare struct GridObjectSortComponent { * Build function of GridObjectSortComponent. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Build function of GridObjectSortComponent. diff --git a/api/@ohos.arkui.advanced.GridObjectSortComponent.static.d.ets b/api/@ohos.arkui.advanced.GridObjectSortComponent.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..d9b0f0399e6160fd6c9353be37dd0a2db69b967a --- /dev/null +++ b/api/@ohos.arkui.advanced.GridObjectSortComponent.static.d.ets @@ -0,0 +1,214 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { Resource, ResourceStr, ResourceColor, LocalizedMargin } from './arkui/component/units'; +import { PropRef } from './arkui/stateManagement/decorator'; +import { Component } from './arkui/component/customComponent'; +import { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; +import { Builder } from './arkui/component/builder'; +/** + * Controls the style types of GridObjectSortComponent. + * + * @enum { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare enum GridObjectSortComponentType { + /** + * The GridObjectSortComponent image text type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + IMAGE_TEXT = "image_text", + /** + * The GridObjectSortComponent text type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + TEXT = "text" +} +/** + * Declaration of the GridObjectSortComponent item. + * + * @interface GridObjectSortComponentIteml + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface GridObjectSortComponentItem { + /** + * id of GridObjectSortComponent item. + * + * @type { number | string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + id: number | string; + /** + * GridObjectSortComponent item text. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + text: ResourceStr; + /** + * selected of GridObjectSortComponent item, true is show area, false is add area. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + selected: boolean; + /** + * order of GridObjectSortComponentItem, Used for sorting dataList. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + order: number; + /** + * image resource path of the GridObjectSortComponent item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + url?: ResourceStr; + /** + * symbol of the GridObjectSortComponent item. + * + * @type { ?SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolStyle?: SymbolGlyphModifier; +} +/** + * GridObjectSortComponentOptions of GridObjectSortComponent. + * + * @interface GridEditOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface GridObjectSortComponentOptions { + /** + * Configuration GridObjectSortComponent type. + * + * @type { GridObjectSortComponentType } + * @default GridObjectSortComponentType.TEXT + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + type?: GridObjectSortComponentType; + /** + * The size of the GridObjectSortComponent image. + * + * @type { ?number | ?Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + imageSize?: number | Resource; + /** + * The title displayed in the unedited state of the GridObjectSortComponent. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + normalTitle?: ResourceStr; + /** + * The title displayed in the GridObjectSortComponent edit state. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + editTitle?: ResourceStr; + /** + * Display Area Title, First subtitle of the GridObjectSortComponent. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + showAreaTitle?: ResourceStr; + /** + * Add Zone Title, second subtitle of the GridObjectSortComponent. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ + addAreaTitle?: ResourceStr; +} +/** + * Declare struct GridObjectSortComponent. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +@Component +export declare struct GridObjectSortComponent { + /** + * Component types and parameters of the GridObjectSortComponent. + * + * @type { GridObjectSortComponentOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + options: GridObjectSortComponentOptions; + /** + * Data list of GridObjectSortComponent. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + dataList: Array; + /** + * Callback when Obtain edited data. + * + * @type { (select: Array, unselect: Array) => void } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onSave: (select: Array, unselect: Array) => void; + /** + * Cancel callback for saving data. + * + * @type { () => void } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onCancel: () => void; + /** + * Build function of GridObjectSortComponent. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since20 + */ + @Builder build(): void; +} \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.MultiNavigation.d.ets b/api/@ohos.arkui.advanced.MultiNavigation.d.ets index a90ca599fcb99a4aa3fa4131fccf43c179892f3d..e0a1c8b4258683436592570a3e5fed5dcfa676b1 100644 --- a/api/@ohos.arkui.advanced.MultiNavigation.d.ets +++ b/api/@ohos.arkui.advanced.MultiNavigation.d.ets @@ -1,539 +1,539 @@ -/** - * 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 base from '@ohos.base'; - -/** - * Splitpolicy indicates the policy of pages pushed to the stack. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ -export declare enum SplitPolicy { - /** - * Indicates that the page will be pushed to the stack as home page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - HOME_PAGE = 0, - - /** - * Indicates that the page will be pushed to the stack as detail page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - DETAIL_PAGE = 1, - - /** - * Indicates that the page will be pushed to the stack as full-screen page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - FULL_PAGE = 2, -} - -/** - * Declaration struct MultiNavigation. - * - * @struct { MultiNavigation } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ -@Component -export declare struct MultiNavigation { - /** - * MultiNavigation path stack of the MultiNavigation. - * - * @type { MultiNavPathStack } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - @State - multiStack: MultiNavPathStack; - - /** - * build function of NavDestination. - * - * @type { NavDestinationBuildFunction } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - @BuilderParam - navDestination: NavDestinationBuildFunction; - - /** - * callback when the MultiNavigationMode change. - * - * @type { ?OnNavigationModeChangeCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - onNavigationModeChange?: OnNavigationModeChangeCallback; - - /** - * This callback is triggered when the HomePage at the top of the stack. - * - * @type { ?OnHomeShowOnTopCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - onHomeShowOnTop?: OnHomeShowOnTopCallback; -} - -/** - * MultiNavPathStack is used for storing pages when shown as split mode. - * - * @extends NavPathStack - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ -export declare class MultiNavPathStack extends NavPathStack { - /** - * Creates an instance of MultiNavPathStack. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - constructor(); - - /** - * Pushes the NavDestination into the stack. - * - * @param { NavPathInfo } info - Indicates the NavDestination to be pushed. - * @param { boolean } [animated] - Indicates whether the transition is animated. - * @param { SplitPolicy } [policy] - SplitPolicy of the NavDestination which is currently - * pushed in stack. Default splitPolicy is DETAIL_PAGE. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - pushPath(info: NavPathInfo, animated?: boolean, policy?: SplitPolicy): void; - - /** - * Pushes the NavDestination into the stack. - * - * @param { NavPathInfo } info - Indicates the NavDestination to be pushed. - * @param { NavigationOptions } [options] - Indicates options of stack operation. - * @param { SplitPolicy } [policy] - SplitPolicy of the NavDestination which is currently - * pushed in stack. Default splitPolicy is DETAIL_PAGE. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - pushPath(info: NavPathInfo, options?: NavigationOptions, policy?: SplitPolicy): void; - - /** - * Pushes the NavDestination of specified name 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 { boolean } [animated] - Indicates whether the transition is animated. - * @param { SplitPolicy } [policy] - SplitPolicy of the NavDestination which is currently - * pushed in stack. Default splitPolicy is DETAIL_PAGE. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - pushPathByName(name: string, param: Object, animated?: boolean, policy?: SplitPolicy): void; - - /** - * Pushes the NavDestination of specified name 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 { base.Callback } [onPop] - The callback when next page returns. - * @param { boolean } [animated] - Indicates whether the transition is animated. - * @param { SplitPolicy } [policy] - SplitPolicy of the NavDestination which is currently - * pushed in stack. Default splitPolicy is DETAIL_PAGE. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - pushPathByName( - name: string, param: Object, onPop?: base.Callback, animated?: boolean, policy?: SplitPolicy): void; - - /** - * Replace the current NavDestination with the one specificed by NavPathInfo. - * 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. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - replacePath(info: NavPathInfo, animated?: boolean): void; - - /** - * Replace the current NavDestination with the one specificed by NavPathInfo. - * The current NavDestination will be destroyed. - * - * @param { NavPathInfo } info - Indicates the new NavDestination in top of the stack. - * @param { NavigationOptions } [options] - Indicates options of stack operation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - replacePath(info: NavPathInfo, options?: NavigationOptions): void; - - /** - * Replace the current NavDestination with the one specificed by name. - * The current NavDestination will be destroyed. - * - * @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. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - replacePathByName(name: string, param: Object, animated?: boolean): void; - - /** - * Remove the specified NavDestinations by indexes. - * - * @param { Array } indexes - Indicates the indexes of the NavDestinations to be removed. - * @returns { number } Returns the number of removed pages. Invalid indexes will be ignored. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - removeByIndexes(indexes: Array): number; - - /** - * Remove the specified NavDestination by name. - * - * @param { string } name - Indicates the name of the NavDestination to be removed. - * @returns { number } Returns the number of removed NavDestinations. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - removeByName(name: string): number; - - /** - * Pop the top NavDestination of the stack. - * - * @param { boolean } [animated] - Indicates whether the transition is animated. - * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, - * otherwise returns undefined. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - pop(animated?: boolean): NavPathInfo | undefined; - - /** - * Pop the top NavDestination of the stack. When keepBottomPage sets true, the page at the bottom of the - * stack will be retained. - * - * @param { Object } [result] - Page Customization processing results. - * @param { boolean } [animated] - Indicates whether the transition is animated. - * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, - * otherwise returns undefined. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - pop(result?: Object, animated?: boolean): NavPathInfo | undefined; - - /** - * Pop to the NavDestination of specified name. Always the first one - * in the stack from bottom up when several NavDestinations match the same name. - * - * @param { string } name - Name of the NavDestination. - * @param { boolean } [animated] - Indicates whether the transition is animated. - * @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 14 - */ - popToName(name: string, animated?: boolean): number; - - /** - * Pop to the NavDestination of specified name. Always the first one - * in the stack from bottom up when several NavDestinations match the same name. - * - * @param { string } name - Name of the NavDestination. - * @param { Object } result - Page Customization processing results. - * @param { boolean } [animated] - Indicates whether the transition is animated. - * @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 14 - */ - popToName(name: string, result: Object, animated?: boolean): number; - - /** - * Pop to the NavDestination of specified index. Do nothing if index is invalid. - * - * @param { number } index - The index of NavDestination page. - * @param { boolean } [animated] - Indicates whether the transition is animated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - popToIndex(index: number, animated?: boolean): void; - - /** - * Pop to the NavDestination of specified index. Do nothing if index is invalid. - * - * @param { number } index - The index of NavDestination page. - * @param { Object } result - Page Customization processing results. - * @param { boolean } [animated] - Indicates whether the transition is animated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - popToIndex(index: number, result: Object, animated?: boolean): void; - - /** - * Move the first NavDestination of specified name to the top of the stack. Always the first one - * in the stack from bottom up when several NavDestinations match the same name. - * - * @param { string } name - Indicates the name of the NavDestination to be moved to the top. - * @param { boolean } [animated] - Indicates whether the transition is animated. - * @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 14 - */ - moveToTop(name: string, animated?: boolean): number; - - /** - * Move the first NavDestination of specified index to the top of the stack. - * - * @param { number } index - Indicates the index of the NavDestination to be moved to the top. - * @param { boolean } [animated] - Indicates whether the transition is animated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - moveIndexToTop(index: number, animated?: boolean): void; - - /** - * Clear the stack. When keepBottomPage sets true, the page at the bottom of the - * stack will be retained. - * - * @param { boolean } [animated] - Indicates whether the transition is animated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - clear(animated?: boolean): void; - - /** - * Obtains all the NavDestination name in the stack. - * - * @returns { Array } Returns all the NavDestination name in the stack. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - getAllPathName(): Array; - - /** - * Obtains parameter information of the NavDestination page specified by index. - * - * @param { number } index - The index of NavDestination page. - * @returns { unknown | 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 14 - */ - getParamByIndex(index: number): Object | undefined; - - /** - * Obtains parameter information of all NavDestination pages specified by name. - * - * @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 14 - */ - getParamByName(name: string): Array; - - /** - * Obtains the index of all NavDestination pages specified by name. - * - * @param { string } name - Indicates the name of the NavDestination. - * @returns { Array } Returns the index of all the NavDestinations. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - getIndexByName(name: string): Array; - - /** - * Obtains the size of the stack. - * - * @returns { number } Returns the size of the stack. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - size(): number; - - /** - * disable or enable all transition animation in this MultiNavigation. - * - * @param { boolean } disable - Indicates whether to disable the transition animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - disableAnimation(disable: boolean): void; - - /** - * Switches the details page of the split-mode page on the top stack to full screen (true) - * or split (false). - * - * @param { boolean } [isFullScreen] - Whether to switch to full screen. - * @returns { boolean } Returns switch result success(true) or failure(false). - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - switchFullScreenState(isFullScreen?: boolean): boolean; - - /** - * Sets the dragable range of the home page width. - * - * @param { number } minPercent - Minimum Home Width Percentage. - * @param { number } maxPercent - Maximum Home Width Percentage. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - setHomeWidthRange(minPercent: number, maxPercent: number): void; - - /** - * Indicates whether to retain the bottom NavDestination of the stack when doing pop or clear. - * - * @param { boolean } keepBottom - Indicates whether to retain the bottom NavDestination of the stack. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - keepBottomPage(keepBottom: boolean): void; - - /** - * Set placeholder NavDestination. - * - * @param { NavPathInfo } info - info of placeHolder NavDestination. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ - setPlaceholderPage(info: NavPathInfo): void; -} - -/** - * Function that sets the rule route to NavDestination. - * - * @typedef { function } NavDestinationBuildFunction - * @param { string } name - Indicates the name of target NavDestination. - * @param { object } [param] - Indicates the parameter of route operation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ -declare type NavDestinationBuildFunction = (name: string, param?: object) => void; - -/** - * Callback function when NavigationMode changed. - * - * @typedef { function } OnNavigationModeChangeCallback - * @param { NavigationMode } mode - current NavigationMode. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ -declare type OnNavigationModeChangeCallback = (mode: NavigationMode) => void; - -/** - * Callback function when home NavDestination shown in top. - * - * @typedef { function } OnHomeShowOnTopCallback - * @param { string } name - the name of home NavDestination shown in top. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 14 - */ +/** + * 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 base from '@ohos.base'; + +/** + * Splitpolicy indicates the policy of pages pushed to the stack. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ +export declare enum SplitPolicy { + /** + * Indicates that the page will be pushed to the stack as home page. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + HOME_PAGE = 0, + + /** + * Indicates that the page will be pushed to the stack as detail page. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + DETAIL_PAGE = 1, + + /** + * Indicates that the page will be pushed to the stack as full-screen page. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + FULL_PAGE = 2, +} + +/** + * Declaration struct MultiNavigation. + * + * @struct { MultiNavigation } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ +@Component +export declare struct MultiNavigation { + /** + * MultiNavigation path stack of the MultiNavigation. + * + * @type { MultiNavPathStack } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + @State + multiStack: MultiNavPathStack; + + /** + * build function of NavDestination. + * + * @type { NavDestinationBuildFunction } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + @BuilderParam + navDestination: NavDestinationBuildFunction; + + /** + * callback when the MultiNavigationMode change. + * + * @type { ?OnNavigationModeChangeCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + onNavigationModeChange?: OnNavigationModeChangeCallback; + + /** + * This callback is triggered when the HomePage at the top of the stack. + * + * @type { ?OnHomeShowOnTopCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + onHomeShowOnTop?: OnHomeShowOnTopCallback; +} + +/** + * MultiNavPathStack is used for storing pages when shown as split mode. + * + * @extends NavPathStack + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ +export declare class MultiNavPathStack extends NavPathStack { + /** + * Creates an instance of MultiNavPathStack. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + constructor(); + + /** + * Pushes the NavDestination into the stack. + * + * @param { NavPathInfo } info - Indicates the NavDestination to be pushed. + * @param { boolean } [animated] - Indicates whether the transition is animated. + * @param { SplitPolicy } [policy] - SplitPolicy of the NavDestination which is currently + * pushed in stack. Default splitPolicy is DETAIL_PAGE. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + pushPath(info: NavPathInfo, animated?: boolean, policy?: SplitPolicy): void; + + /** + * Pushes the NavDestination into the stack. + * + * @param { NavPathInfo } info - Indicates the NavDestination to be pushed. + * @param { NavigationOptions } [options] - Indicates options of stack operation. + * @param { SplitPolicy } [policy] - SplitPolicy of the NavDestination which is currently + * pushed in stack. Default splitPolicy is DETAIL_PAGE. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + pushPath(info: NavPathInfo, options?: NavigationOptions, policy?: SplitPolicy): void; + + /** + * Pushes the NavDestination of specified name 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 { boolean } [animated] - Indicates whether the transition is animated. + * @param { SplitPolicy } [policy] - SplitPolicy of the NavDestination which is currently + * pushed in stack. Default splitPolicy is DETAIL_PAGE. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + pushPathByName(name: string, param: Object, animated?: boolean, policy?: SplitPolicy): void; + + /** + * Pushes the NavDestination of specified name 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 { base.Callback } [onPop] - The callback when next page returns. + * @param { boolean } [animated] - Indicates whether the transition is animated. + * @param { SplitPolicy } [policy] - SplitPolicy of the NavDestination which is currently + * pushed in stack. Default splitPolicy is DETAIL_PAGE. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + pushPathByName( + name: string, param: Object, onPop?: base.Callback, animated?: boolean, policy?: SplitPolicy): void; + + /** + * Replace the current NavDestination with the one specificed by NavPathInfo. + * 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. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + replacePath(info: NavPathInfo, animated?: boolean): void; + + /** + * Replace the current NavDestination with the one specificed by NavPathInfo. + * The current NavDestination will be destroyed. + * + * @param { NavPathInfo } info - Indicates the new NavDestination in top of the stack. + * @param { NavigationOptions } [options] - Indicates options of stack operation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + replacePath(info: NavPathInfo, options?: NavigationOptions): void; + + /** + * Replace the current NavDestination with the one specificed by name. + * The current NavDestination will be destroyed. + * + * @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. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + replacePathByName(name: string, param: Object, animated?: boolean): void; + + /** + * Remove the specified NavDestinations by indexes. + * + * @param { Array } indexes - Indicates the indexes of the NavDestinations to be removed. + * @returns { number } Returns the number of removed pages. Invalid indexes will be ignored. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + removeByIndexes(indexes: Array): number; + + /** + * Remove the specified NavDestination by name. + * + * @param { string } name - Indicates the name of the NavDestination to be removed. + * @returns { number } Returns the number of removed NavDestinations. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + removeByName(name: string): number; + + /** + * Pop the top NavDestination of the stack. + * + * @param { boolean } [animated] - Indicates whether the transition is animated. + * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, + * otherwise returns undefined. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + pop(animated?: boolean): NavPathInfo | undefined; + + /** + * Pop the top NavDestination of the stack. When keepBottomPage sets true, the page at the bottom of the + * stack will be retained. + * + * @param { Object } [result] - Page Customization processing results. + * @param { boolean } [animated] - Indicates whether the transition is animated. + * @returns { NavPathInfo | undefined } Returns the top NavPathInfo if the stack is not empty, + * otherwise returns undefined. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + pop(result?: Object, animated?: boolean): NavPathInfo | undefined; + + /** + * Pop to the NavDestination of specified name. Always the first one + * in the stack from bottom up when several NavDestinations match the same name. + * + * @param { string } name - Name of the NavDestination. + * @param { boolean } [animated] - Indicates whether the transition is animated. + * @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 14 + */ + popToName(name: string, animated?: boolean): number; + + /** + * Pop to the NavDestination of specified name. Always the first one + * in the stack from bottom up when several NavDestinations match the same name. + * + * @param { string } name - Name of the NavDestination. + * @param { Object } result - Page Customization processing results. + * @param { boolean } [animated] - Indicates whether the transition is animated. + * @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 14 + */ + popToName(name: string, result: Object, animated?: boolean): number; + + /** + * Pop to the NavDestination of specified index. Do nothing if index is invalid. + * + * @param { number } index - The index of NavDestination page. + * @param { boolean } [animated] - Indicates whether the transition is animated. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + popToIndex(index: number, animated?: boolean): void; + + /** + * Pop to the NavDestination of specified index. Do nothing if index is invalid. + * + * @param { number } index - The index of NavDestination page. + * @param { Object } result - Page Customization processing results. + * @param { boolean } [animated] - Indicates whether the transition is animated. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + popToIndex(index: number, result: Object, animated?: boolean): void; + + /** + * Move the first NavDestination of specified name to the top of the stack. Always the first one + * in the stack from bottom up when several NavDestinations match the same name. + * + * @param { string } name - Indicates the name of the NavDestination to be moved to the top. + * @param { boolean } [animated] - Indicates whether the transition is animated. + * @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 14 + */ + moveToTop(name: string, animated?: boolean): number; + + /** + * Move the first NavDestination of specified index to the top of the stack. + * + * @param { number } index - Indicates the index of the NavDestination to be moved to the top. + * @param { boolean } [animated] - Indicates whether the transition is animated. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + moveIndexToTop(index: number, animated?: boolean): void; + + /** + * Clear the stack. When keepBottomPage sets true, the page at the bottom of the + * stack will be retained. + * + * @param { boolean } [animated] - Indicates whether the transition is animated. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + clear(animated?: boolean): void; + + /** + * Obtains all the NavDestination name in the stack. + * + * @returns { Array } Returns all the NavDestination name in the stack. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + getAllPathName(): Array; + + /** + * Obtains parameter information of the NavDestination page specified by index. + * + * @param { number } index - The index of NavDestination page. + * @returns { unknown | 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 14 + */ + getParamByIndex(index: number): Object | undefined; + + /** + * Obtains parameter information of all NavDestination pages specified by name. + * + * @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 14 + */ + getParamByName(name: string): Array; + + /** + * Obtains the index of all NavDestination pages specified by name. + * + * @param { string } name - Indicates the name of the NavDestination. + * @returns { Array } Returns the index of all the NavDestinations. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + getIndexByName(name: string): Array; + + /** + * Obtains the size of the stack. + * + * @returns { number } Returns the size of the stack. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + size(): number; + + /** + * disable or enable all transition animation in this MultiNavigation. + * + * @param { boolean } disable - Indicates whether to disable the transition animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + disableAnimation(disable: boolean): void; + + /** + * Switches the details page of the split-mode page on the top stack to full screen (true) + * or split (false). + * + * @param { boolean } [isFullScreen] - Whether to switch to full screen. + * @returns { boolean } Returns switch result success(true) or failure(false). + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + switchFullScreenState(isFullScreen?: boolean): boolean; + + /** + * Sets the dragable range of the home page width. + * + * @param { number } minPercent - Minimum Home Width Percentage. + * @param { number } maxPercent - Maximum Home Width Percentage. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + setHomeWidthRange(minPercent: number, maxPercent: number): void; + + /** + * Indicates whether to retain the bottom NavDestination of the stack when doing pop or clear. + * + * @param { boolean } keepBottom - Indicates whether to retain the bottom NavDestination of the stack. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + keepBottomPage(keepBottom: boolean): void; + + /** + * Set placeholder NavDestination. + * + * @param { NavPathInfo } info - info of placeHolder NavDestination. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + setPlaceholderPage(info: NavPathInfo): void; +} + +/** + * Function that sets the rule route to NavDestination. + * + * @typedef { function } NavDestinationBuildFunction + * @param { string } name - Indicates the name of target NavDestination. + * @param { object } [param] - Indicates the parameter of route operation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ +declare type NavDestinationBuildFunction = (name: string, param?: object) => void; + +/** + * Callback function when NavigationMode changed. + * + * @typedef { function } OnNavigationModeChangeCallback + * @param { NavigationMode } mode - current NavigationMode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ +declare type OnNavigationModeChangeCallback = (mode: NavigationMode) => void; + +/** + * Callback function when home NavDestination shown in top. + * + * @typedef { function } OnHomeShowOnTopCallback + * @param { string } name - the name of home NavDestination shown in top. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ declare type OnHomeShowOnTopCallback = (name: string) => void; \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.ProgressButton.static.d.ets b/api/@ohos.arkui.advanced.ProgressButton.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..953aca8f520980af45c063fa2807db01c78eeafb --- /dev/null +++ b/api/@ohos.arkui.advanced.ProgressButton.static.d.ets @@ -0,0 +1,141 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { Component } from './arkui/component/customComponent'; +import { PropRef } from './arkui/stateManagement/decorator'; +import { ResourceColor, ResourceStr } from './arkui/component/units'; +import { Builder } from './arkui/component/builder'; +import { LengthMetrics } from './arkui/Graphics'; +import { Length } from './arkui/component/common'; +/** + * Declare Component ProgressButton + * @struct { ProgressButton } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Component +export declare struct ProgressButton { + /** + * Sets the content when progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef progress: number; + /** + * Sets the ProgressButton content. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef content: ResourceStr; + /** + * Sets the ProgressButton progressButtonWidth. + * + * @type { ?Length }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + progressButtonWidth?: Length; + /** + * Sets the ProgressButton clickCallback. + * + * @type { function }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + clickCallback: () => void; + /** + * Sets the ProgressButton enable state. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef enable: boolean; + /** + * Set Color options of the ProgressButton. + * + * @type { ?ProgressButtonColorOptions }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef colorOptions?: ProgressButtonColorOptions; + /** + * Set border rounded corner radius of progress. + * + * @type { ?LengthMetrics }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef progressButtonRadius?: LengthMetrics; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} +/** + * Declare Color options of the ProgressButton. + * @typedef ProgressButtonColorOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare interface ProgressButtonColorOptions { + /** + * Set progress color of the ProgressButton. + * + * @type { ?ResourceColor }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + progressColor?: ResourceColor; + /** + * Set border color of the ProgressButton. + * + * @type { ?ResourceColor }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + borderColor?: ResourceColor; + /** + * Set text color of the ProgressButton. + * + * @type { ?ResourceColor }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + textColor?: ResourceColor; + /** + * Set background color of the ProgressButton. + * + * @type { ?ResourceColor }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + backgroundColor?: ResourceColor; +} \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.SplitLayout.d.ets b/api/@ohos.arkui.advanced.SplitLayout.d.ets index d32452e04f1a4e76c7ecb069c1367d88ace1d116..72388ba2d30f578a1b9f4228c1f217318ace2c3b 100644 --- a/api/@ohos.arkui.advanced.SplitLayout.d.ets +++ b/api/@ohos.arkui.advanced.SplitLayout.d.ets @@ -17,10 +17,12 @@ * @file * @kit ArkUI */ - - - - +/*** if arkts 1.2 */ +import { ResourceStr } from './arkui/component/units'; +import { State, PropRef } from './arkui/stateManagement/decorator'; +import { Component } from './arkui/component/customComponent'; +import { BuilderParam, Builder } from './arkui/component/builder'; +/*** endif */ /** * Declare SplitLayout.The SplitLayout is used for upper and lower graphic layouts. @@ -31,7 +33,8 @@ * Declare SplitLayout.The SplitLayout is used for upper and lower graphic layouts. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts{ '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ @Component export declare struct SplitLayout { @@ -46,9 +49,10 @@ export declare struct SplitLayout { * @type { container: () => void }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts{ '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ - @BuilderParam container: () => void; + @BuilderParam container: () => void; /** * Image in the layout. @@ -61,7 +65,8 @@ export declare struct SplitLayout { * @type { ResourceStr }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts{ '1.1':'11','1.2':'20' } + * @arkts 1.1&1.2 */ @State mainImage: ResourceStr; @@ -77,9 +82,20 @@ export declare struct SplitLayout { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @arkts 1.1 */ @Prop primaryText: ResourceStr; + /** + * Title text in the layout. + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + @PropRef primaryText: ResourceStr; + /** * Description text in the layout. * @type { ?ResourceStr }. @@ -92,9 +108,20 @@ export declare struct SplitLayout { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @arkts 1.1 */ @Prop secondaryText?: ResourceStr; + /** + * Description text in the layout. + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + @PropRef secondaryText?: ResourceStr; + /** * Auxiliary text in the layout. * @type { ?ResourceStr }. @@ -107,6 +134,26 @@ export declare struct SplitLayout { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @arkts 1.1 */ @Prop tertiaryText?: ResourceStr; -} \ No newline at end of file + + /** + * Auxiliary text in the layout. + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + @PropRef tertiaryText?: ResourceStr; + + /** + * The method to build component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + @Builder build(): void; +} diff --git a/api/@ohos.arkui.advanced.SplitLayout.static.d.ets b/api/@ohos.arkui.advanced.SplitLayout.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..18c9a9946b0b16ed9f08332f1c6a6be4c6a9a959 --- /dev/null +++ b/api/@ohos.arkui.advanced.SplitLayout.static.d.ets @@ -0,0 +1,88 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { ResourceStr } from './arkui/component/units'; +import { State, PropRef } from './arkui/stateManagement/decorator'; +import { Component } from './arkui/component/customComponent'; +import { BuilderParam, Builder } from './arkui/component/builder'; +/** + * Declare SplitLayout.The SplitLayout is used for upper and lower graphic layouts. + * @struct { SplitLayout } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Component +export declare struct SplitLayout { + /** + * Container in the user-defined splitlayout display area. + * + * @type { function }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @BuilderParam + container: () => void; + /** + * Image in the layout. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @State + mainImage: ResourceStr; + /** + * Title text in the layout. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + primaryText: ResourceStr; + /** + * Description text in the layout. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + secondaryText?: ResourceStr; + /** + * Auxiliary text in the layout. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + tertiaryText?: ResourceStr; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.SubHeader.d.ets b/api/@ohos.arkui.advanced.SubHeader.d.ets index e17975d3fc266a901c29512ae004dc91bad7d50a..002dc982dde2f804ba7b6db50bbe8eebe5372cd3 100644 --- a/api/@ohos.arkui.advanced.SubHeader.d.ets +++ b/api/@ohos.arkui.advanced.SubHeader.d.ets @@ -20,6 +20,14 @@ import { TextModifier } from './@ohos.arkui.modifier'; +/*** if arkts 1.2 */ +import { Resource, ResourceStr, ResourceColor, LocalizedPadding, LocalizedMargin } from './arkui/component/units'; +import { SymbolEffectStrategy, SymbolRenderingStrategy } from './arkui/component/symbolglyph'; +import { SelectOption } from './arkui/component/select'; +import { Prop, BuilderParam } from './arkui/stateManagement/common'; +import { Component } from './arkui/component/customComponent'; +import { FontWeight } from './arkui/component/enums'; +/*** endif */ /** * Control style of operation element @@ -32,7 +40,8 @@ import { TextModifier } from './@ohos.arkui.modifier'; * @enum { OperationStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Control style of operation element @@ -52,7 +61,8 @@ export declare enum OperationType { * The TextArrow style. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * The TextArrow style. @@ -72,7 +82,8 @@ export declare enum OperationType { * The Button style. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * The Button style. @@ -92,7 +103,8 @@ export declare enum OperationType { * The IconGroup style. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * The IconGroup style. @@ -112,7 +124,8 @@ export declare enum OperationType { * The LoadingProgress style. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * The LoadingProgress style. @@ -133,7 +146,8 @@ export declare enum OperationType { * Declare type OperationOption * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Declare type OperationOption @@ -154,7 +168,8 @@ export declare class OperationOption { * @type { ResourceStr }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * The content of text or the address of icon. @@ -177,7 +192,8 @@ export declare class OperationOption { * @type { () => void }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * callback function when operate the text or icon. @@ -237,7 +253,8 @@ export declare class OperationOption { * Declare type SelectOption * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Declare type SelectOption @@ -258,7 +275,8 @@ export declare class SelectOptions { * @type { Array }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * SubOption array of the select. @@ -281,7 +299,8 @@ export declare class SelectOptions { * @type { number }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * The default selected index. @@ -304,7 +323,8 @@ export declare class SelectOptions { * @type { string }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * The default text value. @@ -324,27 +344,28 @@ export declare class SelectOptions { */ value?: ResourceStr; - /** - * Callback when the select is selected. - * @type { (index: number, value?: string) => void }. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Callback when the select is selected. - * @type { (index: number, value?: string) => void }. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Callback when the select is selected. - * @type { (index: number, value?: string) => void }. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ + /** + * Callback when the select is selected. + * @type { (index: number, value?: string) => void }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Callback when the select is selected. + * @type { (index: number, value?: string) => void }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + /** + * Callback when the select is selected. + * @type { (index: number, value?: string) => void }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ onSelect?: (index: number, value?: string) => void; /** @@ -467,7 +488,8 @@ export declare class SymbolOptions { * Declare struct SubHeader * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Declare struct SubHeader @@ -490,7 +512,8 @@ export declare struct SubHeader { * @type { ResourceStr }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Icon resource of content area. @@ -529,7 +552,8 @@ export declare struct SubHeader { * @type { ResourceStr }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * The first line text of content area. @@ -552,7 +576,8 @@ export declare struct SubHeader { * @type { ResourceStr }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * The secondary line text of content area. @@ -575,7 +600,8 @@ export declare struct SubHeader { * @type { SelectOptions }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Select option of content area. @@ -598,7 +624,8 @@ export declare struct SubHeader { * @type { OperationStyle }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Operation style of SubHeader. @@ -621,7 +648,8 @@ export declare struct SubHeader { * @type { Array }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * operation item. diff --git a/api/@ohos.arkui.advanced.SubHeader.static.d.ets b/api/@ohos.arkui.advanced.SubHeader.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..bf9577d0a64a9ff5f2472f28bdaa3ba001753387 --- /dev/null +++ b/api/@ohos.arkui.advanced.SubHeader.static.d.ets @@ -0,0 +1,359 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { TextModifier } from './arkui/TextModifier'; +import { ResourceStr, Resource, ResourceColor, LocalizedMargin, LocalizedPadding } from './arkui/component/units'; +import { SelectOption } from './arkui/component/select'; +import { PropRef } from './arkui/stateManagement/decorator'; +import { Component } from './arkui/component/customComponent'; +import { FontWeight } from './arkui/component/enums'; +import { SymbolEffectStrategy, SymbolRenderingStrategy } from './arkui/component/symbolglyph'; +import { BuilderParam, Builder } from './arkui/component/builder'; +/** + * Control style of operation element + * + * @enum { int } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare enum OperationType { + /** + * The TextArrow style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + TEXT_ARROW = 0, + /** + * The Button style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + BUTTON = 1, + /** + * The IconGroup style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ICON_GROUP = 2, + /** + * The LoadingProgress style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LOADING = 3 +} +/** + * Declare type OperationOption + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class OperationOption { + /** + * The content of text or the address of icon. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: ResourceStr; + /** + * callback function when operate the text or icon. + * + * @type { ?function }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + action?: () => void; + /** + * The accessibilityText of this text or icon. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of this text or icon. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of this text or icon. + * + * @type { ?string }. + * @default "auto" + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityLevel?: string; + /** + * Sets the default focus state of the text or icon. + * + * @type { ?boolean }. + * @default { false } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + defaultFocus?: boolean; +} +/** + * Declare type SelectOption + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class SelectOptions { + /** + * SubOption array of the select. + * + * @type { Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + options: Array; + /** + * The default selected index. + * + * @type { ?number }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + selected?: number; + /** + * The default text value. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value?: ResourceStr; + /** + * Callback when the select is selected. + * + * @type { ?function }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onSelect?: (index: number, value?: string) => void; + /** + * Sets the default focus state of select. + * + * @type { ?boolean }. + * @default { false } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + defaultFocus?: boolean; +} +/** +* Declare type SymbolOptions +* +* @syscap SystemCapability.ArkUI.ArkUI.Full +* @since 20 +* @noninterop +*/ +export declare class SymbolOptions { + /** + * The size of symbol icon. + * + * @type { ?(number | string | Resource) }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontSize?: number | string | Resource; + /** + * The color of symbol icon. + * + * @type { ?Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontColor?: Array; + /** + * The fontWeight of symbol icon. + * + * @type { ?(number | FontWeight | string) }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontWeight?: number | FontWeight | string; + /** + * The effect strategy of symbol icon. + * + * @type { ?SymbolEffectStrategy }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + effectStrategy?: SymbolEffectStrategy; + /** + * The rendering strategy of symbol icon. + * + * @type { ?SymbolRenderingStrategy }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + renderingStrategy?: SymbolRenderingStrategy; +} +/** + * Declare struct SubHeader + * @struct { SubHeader } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Component +export declare struct SubHeader { + /** + * Icon resource of content area. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + icon?: ResourceStr; + /** + * Attributes of Symbol icon. + * + * @type { ?SymbolOptions }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iconSymbolOptions?: SymbolOptions; + /** + * The first line text of content area. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + primaryTitle?: ResourceStr; + /** + * The secondary line text of content area. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + secondaryTitle?: ResourceStr; + /** + * Select option of content area. + * + * @type { ?SelectOptions }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + select?: SelectOptions; + /** + * Operation style of SubHeader. + * + * @type { ?OperationType }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + operationType?: OperationType; + /** + * operation item. + * + * @type { ?Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + operationItem?: Array; + /** + * Attributes of Symbol icons in operation area. + * + * @type { ?Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + operationSymbolOptions?: Array; + /** + * Text modifier for primary title. + * + * @type { ?TextModifier }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + primaryTitleModifier?: TextModifier; + /** + * Text modifier for secondary title. + * + * @type { ?TextModifier }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + secondaryTitleModifier?: TextModifier; + /** + * Set the title content. + * + * @type { ?function }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @BuilderParam + titleBuilder?: () => void; + /** + * Set the content margin. + * + * @type { ?LocalizedMargin } + * @default {start: LengthMetrics.resource($r('sys.float.margin_left')), + *
end: LengthMetrics.resource($r('sys.float.margin_right'))} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + contentMargin?: LocalizedMargin; + /** + * Set the content padding. + * + * @type { ?LocalizedPadding }. + * @default set different default values according to the width of the subHeader: + *
When the left area is secondaryTitle or the group of secondaryTitle and icon, + *
the default value is {start: LengthMetrics.vp(12), end: LengthMetrics.vp(12)}; + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + contentPadding?: LocalizedPadding; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} diff --git a/api/@ohos.arkui.advanced.SwipeRefresher.d.ets b/api/@ohos.arkui.advanced.SwipeRefresher.d.ets index e17f55838bdf44e65c784e059072faefd76bcc29..1c42bba52e4fd3238f9e6162d95022f42580473f 100644 --- a/api/@ohos.arkui.advanced.SwipeRefresher.d.ets +++ b/api/@ohos.arkui.advanced.SwipeRefresher.d.ets @@ -17,6 +17,12 @@ * @file * @kit ArkUI */ +/*** if arkts 1.2 */ +import { ResourceStr } from './arkui/component/units'; +import { PropRef } from './arkui/stateManagement/decorator'; +import { Component } from './arkui/component/customComponent'; +import { Builder } from './arkui/component/builder'; +/*** endif */ /** * Declare component SwipeRefresher @@ -35,6 +41,7 @@ * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ @Component export declare struct SwipeRefresher { @@ -46,7 +53,7 @@ export declare struct SwipeRefresher { */ /** * Sets the content when loading. - * @type { string } + * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 @@ -58,9 +65,21 @@ export declare struct SwipeRefresher { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1 */ @Prop content?: ResourceStr; + /** + * Sets the content when loading. + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + @PropRef content?: ResourceStr; + /** * Whether the component is loading. * type { boolean } @@ -81,6 +100,27 @@ export declare struct SwipeRefresher { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1 */ @Prop isLoading: boolean; -} \ No newline at end of file + + /** + * Whether the component is loading. + * type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + @PropRef isLoading: boolean; + + /** + * The method to build component. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + @Builder build(): void; +} diff --git a/api/@ohos.arkui.advanced.SwipeRefresher.static.d.ets b/api/@ohos.arkui.advanced.SwipeRefresher.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..41412209f62d522f7a7f6db931da3dea883687c8 --- /dev/null +++ b/api/@ohos.arkui.advanced.SwipeRefresher.static.d.ets @@ -0,0 +1,61 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { ResourceStr } from './arkui/component/units'; +import { PropRef } from './arkui/stateManagement/decorator'; +import { Component } from './arkui/component/customComponent'; +import { Builder } from './arkui/component/builder'; +/** + * Declare component SwipeRefresher + * @struct { SwipeRefresher } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Component +export declare struct SwipeRefresher { + /** + * Sets the content when loading. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + content?: ResourceStr; + /** + * Whether the component is loading. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef + isLoading: boolean; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder + build(): void; +} \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.TabTitleBar.static.d.ets b/api/@ohos.arkui.advanced.TabTitleBar.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..884efb555c92dbbf81167beca98f586edc44d7cb --- /dev/null +++ b/api/@ohos.arkui.advanced.TabTitleBar.static.d.ets @@ -0,0 +1,174 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { Component } from './arkui/component/customComponent'; +import { ResourceStr } from './arkui/component/units'; +import { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; +import { BuilderParam, Builder } from './arkui/component/builder'; +/** + * Declaration of the menu item on the right side. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class TabTitleBarMenuItem { + /** + * Icon resource for this menu item. + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + value: ResourceStr; + /** + * Symbol resource for this menu item. + * + * @type { ?SymbolGlyphModifier }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolStyle?: SymbolGlyphModifier; + /** + * Icon label for this menu item. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + label?: ResourceStr; + /** + * Whether to enable this menu item. + * + * @type { ?boolean }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isEnabled?: boolean; + /** + * Callback function when click on this menu item. + * + * @type { ?function }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + action?: () => void; + /** + * The accessibilityText of this menu item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of this menu item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of this menu item. + * + * @type { ?string } + * @default 'auto' + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityLevel?: string; +} +/** + * Declaration of the tab item. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class TabTitleBarTabItem { + /** + * Text description for this tab item. + * + * @type { ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + title: ResourceStr; + /** + * Icon resource for this tab item. + * + * @type { ?ResourceStr }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + icon?: ResourceStr; + /** + * Symbol resource for this tab item. + * + * @type { ?SymbolGlyphModifier }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolStyle?: SymbolGlyphModifier; +} +/** + * Declaration of the tabbed title bar. + * @struct { TabTitleBar } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Component +export declare struct TabTitleBar { + /** + * Tab items on the left side. + * + * @type { Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + tabItems: Array; + /** + * Menu items on the right side. + * + * @type { ?Array }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + menuItems?: Array; + /** + * Content builder. Each component corresponds to a tab item. + * The builder needs to be transferred. + * + * @type { function }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @BuilderParam + swiperContent: () => void; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.ToolBar.static.d.ets b/api/@ohos.arkui.advanced.ToolBar.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..2b82fb1557b672e44ee9e038101228a0c1e98b5f --- /dev/null +++ b/api/@ohos.arkui.advanced.ToolBar.static.d.ets @@ -0,0 +1,305 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { Component } from './arkui/component/customComponent'; +import { ResourceStr, Resource, ResourceColor } from './arkui/component/units'; +import { PropRef, Observed, ObjectLink } from './arkui/stateManagement/decorator'; +import { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; +import { DividerModifier } from './arkui/DividerModifier'; +import { LengthMetrics } from './arkui/Graphics'; +import { TabsController } from './arkui/component/tabs'; +import { Builder } from './arkui/component/builder'; +/** + * Declare enum ItemState. + * + * @enum { int } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare enum ItemState { + /** + * Enable type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ENABLE = 1, + /** + * Disable type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + DISABLE = 2, + /** + * Activate type. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ACTIVATE = 3 +} +/** + * Defines toolBar symbolGlyph options. + * + * @interface ToolBarSymbolGlyphOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export interface ToolBarSymbolGlyphOptions { + /** + * Modifier of toolbar's normal symbol. + * + * @type { ?SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + normal?: SymbolGlyphModifier; + /** + * Modifier of toolbar's activated symbol. + * + * @type { ?SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + activated?: SymbolGlyphModifier; +} +/** + * Declare type ToolBarOption. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Observed +export declare class ToolBarOption { + /** + * Define text content. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + content: ResourceStr; + /** + * Define the action event. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + action?: () => void; + /** + * Define icon resource. + * + * @type { ?Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + icon?: Resource; + /** + * Define item type. + * + * @type { ?ItemState } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + state?: ItemState; + /** + * Define text fontColor. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + textColor?: ResourceColor; + /** + * Text fontColor when the item is activated. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + activatedTextColor?: ResourceColor; + /** + * Define icon fillColor. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iconColor?: ResourceColor; + /** + * Icon fillColor when the item is activated. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + activatedIconColor?: ResourceColor; + /** + * Item symbol icon. + * + * @type { ?ToolBarSymbolGlyphOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + toolBarSymbolOptions?: ToolBarSymbolGlyphOptions; + /** + * The accessibilityText of item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityText?: ResourceStr; + /** + * The accessibilityDescription of item. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityDescription?: ResourceStr; + /** + * The accessibilityLevel of item. + * + * @type { ?string } + * @default "auto" + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + accessibilityLevel?: string; +} +/** + * Declare ToolBarOptions use in ToolBar. + * @extends Array + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Observed +export declare class ToolBarOptions extends Array { +} +/** + * Declare ToolBarModifier use in ToolBar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class ToolBarModifier { + /** + * Sets the height of the toolBar. + * + * @param { LengthMetrics } height - toolBar's height. + * @returns { ToolBarModifier } returns the instance of the ToolBarModifier. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height(height: LengthMetrics): ToolBarModifier; + /** + * Sets the backgroundColor of the toolBar. + * + * @param { ResourceColor } backgroundColor - toolBar's backgroundColor. + * @returns { ToolBarModifier } returns the instance of the ToolBarModifier. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + backgroundColor(backgroundColor: ResourceColor): ToolBarModifier; + /** + * Sets the left and right padding of the toolbar. + * + * @param { LengthMetrics } padding - left and right padding. + * @returns { ToolBarModifier } returns the instance of the ToolBarModifier. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + padding(padding: LengthMetrics): ToolBarModifier; + /** + * Sets whether or not to display the press status effect. + * + * @param { boolean } stateEffect - press status effect. + * @returns { ToolBarModifier } returns the instance of the ToolBarModifier. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + stateEffect(stateEffect: boolean): ToolBarModifier; +} +/** + * Declare Component ToolBar. + * @struct { ToolBar } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Component +export declare struct ToolBar { + /** + * Define toolbar list array. + * + * @type { ToolBarOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @ObjectLink toolBarList: ToolBarOptions; + /** + * Define toolbar activate item index, default is -1. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef activateIndex?: number; + /** + * Define toolbar controller. + * + * @type { TabsController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + controller: TabsController; + /** + * Define divider Modifier. + * + * @type { ?DividerModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef dividerModifier?: DividerModifier; + /** + * Define toolbar modifier. + * + * @type { ?ToolBarModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @PropRef toolBarModifier?: ToolBarModifier; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.TreeView.static.d.ets b/api/@ohos.arkui.advanced.TreeView.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..c1ee31c87a7588b2b37f413452219075d2d385d1 --- /dev/null +++ b/api/@ohos.arkui.advanced.TreeView.static.d.ets @@ -0,0 +1,365 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { ResourceStr } from './arkui/component/units'; +import { Component } from './arkui/component/customComponent'; +import { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; +import { Builder } from './arkui/component/builder'; +/** + * Control style of operation element + * + * @enum { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare enum TreeListenType { + /** + * register listener after a node is clicked. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NODE_CLICK = 'NodeClick', + /** + * register listener after a node is add. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * + * @since 20 + */ + NODE_ADD = 'NodeAdd', + /** + * register listener after a node is delected. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NODE_DELETE = 'NodeDelete', + /** + * register listener after a node is modified. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NODE_MODIFY = 'NodeModify', + /** + * register listener after a node is moved. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + NODE_MOVE = 'NodeMove', +} +/** + * Callback method of Event registration and processing. + * + * @typedef { function } OnChangedCallback + * @param { CallbackParam } callbackParam - The result of event. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +declare type OnChangedCallback = (callbackParam: CallbackParam) => void; +/** + * Declare class TreeListener + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class TreeListener { + /** + * Event registration and processing. + * The event will not be destroyed after being processed. + * + * @param { TreeListenType } type - Registered Events. + * @param { OnChangedCallback } callback + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + on(type: TreeListenType, callback: (callbackParam: OnChangedCallback) => void): void; + /** + * Event registration and processing. + * After the event is processed once, it will be destroyed. + * + * @param { TreeListenType } type - Registered Events. + * @param { OnChangedCallback } callback + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + once(type: TreeListenType, callback: (callbackParam: OnChangedCallback) => void): void; + /** + * Destroy event. + * + * @param { TreeListenType } type - Registered Events. + * @param { OnChangedCallback } [callback] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + off(type: TreeListenType, callback?: (callbackParam: OnChangedCallback) => void): void; +} +/** + * Declare class TreeListenerManager + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class TreeListenerManager { + /** + * Get instance of treeListenerManager. + * + * @returns { TreeListenerManager } Return the treeListenerManager instance. + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static getInstance(): TreeListenerManager; + /** + * Get treeListener. + * + * @returns { TreeListener } Returns the treeListener object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getTreeListener(): TreeListener; +} +/** + * Declare TreeView Component + * @struct { TreeView } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +@Component +export declare struct TreeView { + /** + * Node data source of TreeView. + * + * @type { TreeController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + treeController: TreeController; + /** + * The method to build component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @Builder build(): void; +} +/** + * Declare CallbackParam + * + * @typedef CallbackParam + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export interface CallbackParam { + /** + * Get the currentNodeId. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + currentNodeId: number, + /** + * Get the parentNodeId. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + parentNodeId?: number, + /** + * Get the childIndex. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + childIndex?: number +} +/** + * Declare NodeParam + * + * @typedef NodeParam + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export interface NodeParam { + /** + * Set the parentNodeId. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + parentNodeId?: number, + /** + * Set currentNodeId. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + currentNodeId?: number, + /** + * Set catalog whether is floder. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isFolder?: boolean; + /** + * Set the icon resource. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + icon?: ResourceStr; + /** + * Set the symbol resource. + * + * @type { ?SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolIconStyle?: SymbolGlyphModifier; + /** + * Set selected icon resource. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + selectedIcon?: ResourceStr; + /** + * Set selected symbol resource. + * + * @type { ?SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolSelectedIconStyle?: SymbolGlyphModifier; + /** + * Set edit icon resource. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + editIcon?: ResourceStr; + /** + * Set edit symbol resource. + * + * @type { ?SymbolGlyphModifier } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolEditIconStyle?: SymbolGlyphModifier; + /** + * Set primary title content. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + primaryTitle?: ResourceStr; + /** + * Set secondary title content. + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * + * @since 20 + */ + secondaryTitle?: ResourceStr; + /** + * set subcomponent binded on tree item. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + container?: () => void; +} +/** + * Declare TreeController + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @noninterop + */ +export declare class TreeController { + /** + * Delete a node. + * Register an ON_ITEM_DELETE callback through the ListTreeListener mechanism to obtain the IDs of all deleted + * nodes. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + removeNode(): void; + /** + * Modify the node name. + * Register an ON_ITEM_MODIFY callback to obtain the ID, parent node ID, and node name of the modified node. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + modifyNode(): void; + /** + * Initialize the interface of the tree view. This interface is used to generate ListNodeDataSource data. + * addNode is only designed for initialization. It can only be invoked during initialization. + * A maximum of 50 directory levels can be added. + * For details, see the comment description of NodeParam. + * + * @param { NodeParam } [nodeParam] Configuration information of the newly added node. + * @returns { TreeController } ListTreeNode Tree view component proxy class. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + addNode(nodeParam?: NodeParam): TreeController; + /** + * This interface is called when a secondaryTitle needs to be updated + * + * @param { number } parentId - ID of the parent node. + * @param { ResourceStr } parentSubTitle - secondaryTitle of parent node. + * @param { ResourceStr } currentSubtitle - secondaryTitle of current node. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + refreshNode(parentId: number, parentSubTitle: ResourceStr, currentSubtitle: ResourceStr): void; + /** + * After the initialization is complete by calling the addNode interface, call this interface to complete initialization. + * This interface must be called when you finish initializing the ListTreeView by addNode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + buildDone(): void; +} diff --git a/api/@ohos.arkui.component.d.ets b/api/@ohos.arkui.component.d.ets index 90c190a547e8d64091b20e8c36ae82a17293bcfa..47cd879d9eaf6f79a03bf22470fc185c324ac389 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/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/interop'; 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/saveButton'; +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/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'; 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.static.d.ets b/api/@ohos.arkui.componentSnapshot.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..f24eb7c1e67aa9f5b50ad05921e459e0bcd69855 --- /dev/null +++ b/api/@ohos.arkui.componentSnapshot.static.d.ets @@ -0,0 +1,175 @@ +/* + * 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 + * @arkts 1.2 + */ +import { CustomBuilder } from './arkui/component/builder'; +import { AsyncCallback } from './@ohos.base'; +import image from './@ohos.multimedia.image'; + +/** + * This module allows developers to export snapshot image from a component or a custom builder. + * + * @namespace componentSnapshot + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare namespace componentSnapshot { + /** + * Defines the extra options for snapshot taking. + * + * @typedef SnapshotRegion + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface SnapshotRegion { + /** + * Left side position of rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + left: number; + /** + * Right side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + right: number; + /** + * Top side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + top: number; + /** + * Bottom side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + bottom: number; + } + /** + * Defines the extra options for snapshot taking, if this is used, the start and end will + * be assigned to left and right value according to the layout direction of node automaticlly. + * + * @typedef LocalizedSnapshotRegion + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface LocalizedSnapshotRegion { + /** + * Left/Right side position of rectangle, in PX + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + start: number; + /** + * End side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + end: number; + /** + * Left/Right side position of rectangle, in PX + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + top: number; + /** + * Bottom side position of Rectangle, in PX. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + bottom: number; + } + /** + * Defines the snapshot region rect type. + * + * @typedef { SnapshotRegion | LocalizedSnapshotRegion } SnapshotRegionType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export type SnapshotRegionType = SnapshotRegion | LocalizedSnapshotRegion; + /** + * Defines the extra options for snapshot taking. + * + * @typedef SnapshotOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface SnapshotOptions { + /** + * Defines the scale property to render the snapshot. + * + * @type {?number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + scale?: number; + /** + * Whether to wait the rendering is finished. + * + * @type {?boolean} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + waitUntilRenderFinished?: boolean; + /** + * Defines the rect reigon type of the snapshot. + * + * @type {?SnapshotRegionType} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + region?: SnapshotRegionType; + } + /** + * 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 + * @since 20 + */ + 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.static.d.ets b/api/@ohos.arkui.componentUtils.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..3db3aebc22143d861e79fbddaada1e8f0c494f79 --- /dev/null +++ b/api/@ohos.arkui.componentUtils.static.d.ets @@ -0,0 +1,351 @@ +/* + * 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 + * @arkts 1.2 + */ + + +/** + * This module provides functionality for component coordinates and sizes. + * @namespace componentUtils + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare namespace componentUtils { + + + /** + * Component information. + * @typedef ComponentInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface ComponentInfo { + + + /** + * component size. + * @type {Size} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + size: Size; + + + /** + * Obtain attribute information relative to the local. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + localOffset: Offset; + + + /** + * Obtain attribute information relative to the window. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + windowOffset: Offset; + + + /** + * Obtain attribute information relative to the screen. + * @type {Offset} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + screenOffset: Offset; + + + /** + * Obtain attribute information for translation. + * @type {TranslateResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + translate: TranslateResult; + + + /** + * Obtain attribute information for scale. + * @type {ScaleResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + scale: ScaleResult; + + + /** + * Obtain attribute information for rotate. + * @type {RotateResult} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + rotate: RotateResult; + + + /** + * Obtain attribute information of the transformation matrix. + * @type {Matrix4Result} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + transform: Matrix4Result; + } + + + /** + * Defines the size property. + * @typedef Size + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface Size { + + + /** + * Defines the width property. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width: number; + + + /** + * Defines the height property. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height: number; + } + + + /** + * Defines the offset property. + * @typedef Offset + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface Offset { + + + /** + * Coordinate x of the Position. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + x: number; + + + /** + * Coordinate y of the Position. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + y: number; + } + + + /** + * Translation Result + * @typedef TranslateResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface TranslateResult { + + + /** + * Indicates the translation distance of the x-axis, in vp. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + x: number; + + + /** + * Indicates the translation distance of the y-axis, in vp. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + y: number; + + + /** + * Indicates the translation distance of the z-axis, in vp. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + z: number; + } + + + /** + * Scale Result + * @typedef ScaleResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface ScaleResult { + + + /** + * Zoom factor of the x-axis. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + x: number; + + + /** + * Zoom factor of the y-axis. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + y: number; + + + /** + * Zoom factor of the z-axis. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + z: number; + + + /** + * Transform the x-axis coordinate of the center point. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + centerX: number; + + + /** + * Transform the y-axis coordinate of the center point. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + centerY: number; + } + + + /** + * Rotation Result. + * @typedef RotateResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface RotateResult { + + + /** + * Axis of rotation vector x coordinate. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + x: number; + + + /** + * Axis of rotation vector y coordinate. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + y: number; + + + /** + * Axis of rotation vector z coordinate. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + z: number; + + + /** + * Transform the x-axis coordinate of the center point. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + centerX: number; + + + /** + * Transform the y-axis coordinate of the center point. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + centerY: number; + + + /** + * Rotation angle. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + 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 20 + */ + export type Matrix4Result = [ + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number + ]; +} +export default componentUtils; 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..01b51d532bd6a3c19b5451b3a0b852720d1189a3 100644 --- a/api/@ohos.arkui.dragController.d.ts +++ b/api/@ohos.arkui.dragController.d.ts @@ -853,17 +853,18 @@ declare namespace dragController { /** * Define the status for the application to notify the framework whether to execute drag. - * + * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ const enum DragStartRequestStatus { + /** * Notify the framework that the application is not yet ready and needs to temporarily block * the start of drag, only effective in onDragStart calls. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 @@ -873,7 +874,7 @@ declare namespace dragController { /** * Notify the framework that the drag can continue to be started, but only during the start * of drag, and will not take effect when the drag is started. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 @@ -891,7 +892,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 +1005,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 +1081,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.dragController.static.d.ets b/api/@ohos.arkui.dragController.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..a78d8c648fa5e0b2f760775e65be8c1f7c816299 --- /dev/null +++ b/api/@ohos.arkui.dragController.static.d.ets @@ -0,0 +1,313 @@ +/* + * 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 + * @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'; +import type { AsyncCallback, BusinessError, Callback } from './@ohos.base'; +import type unifiedDataChannel from './@ohos.data.unifiedDataChannel'; + + +/** + * This module allows developers to trigger a drag event. + * @namespace dragController + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare namespace dragController { + + + /** + * Defines the Drag Status. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + const enum DragStatus { + + + /** + * Drag has started. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + STARTED = 0, + + + /** + * Drag has ended. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ENDED = 1 + } + + + /** + * Drag and drop information + * + * @interface DragAndDropInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface DragAndDropInfo { + + + /** + * The drag status. + * @type { DragStatus } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + status: DragStatus; + + + /** + * The information containing the drag event. + * @type { DragEvent } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + event: DragEvent; + + + /** + * Additional information about the drag info. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + extraParams?: string; + } + + + /** + * One drag action object for drag process + * + * @interface DragAction + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + 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 20 + */ + 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 20 + */ + 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 20 + */ + off(type: 'statusChange', callback?: Callback): void; + } + + + /** + * DragInfo object description + * + * @interface DragInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface DragInfo { + + + /** + * A unique identifier to identify which touch point. + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pointerId: number; + + + /** + * Drag data. + * @type { ?unifiedDataChannel.UnifiedData } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + data?: unifiedDataChannel.UnifiedData; + + + /** + * Additional information about the drag info. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + extraParams?: string; + + + /** + * Touch point coordinates. + * @type { ?TouchPoint } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + touchPoint?: TouchPoint; + + + /** + * Drag preview options. + * @type { ?DragPreviewOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + previewOptions?: DragPreviewOptions; + } + + + /** + * Defines the animation options for drag preview. + * + * @interface AnimationOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface AnimationOptions { + + + /** + * Animation duration, in ms. + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + duration?: number; + + + /** + * Animation curve. + * @type { ?(Curve | ICurve) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + curve?: Curve | ICurve; + } + + + /** + * Provides the functions of setting color or updating animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export class DragPreview { + + + /** + * change foreground color of preview + * @param { ResourceColor } color - color value + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + 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 20 + */ + animate(options: AnimationOptions, handler: () => void): void; + } + + /** + * Define the drag event paramters + * + * @interface DragEventParam + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface DragEventParam { + + + /** + * The information containing the drag event. + * @type { DragEvent } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + event: DragEvent; + + + /** + * Additional information about the drag info. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + extraParams: string; + } + /** + * Define the status for the application to notify the framework whether to execute drag. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + const enum DragStartRequestStatus { + /** + * Notify the framework that the application is not yet ready and needs to temporarily block + * the start of drag, only effective in onDragStart calls. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + WAITING = 0, + /** + * Notify the framework that the drag can continue to be started, but only during the start + * of drag, and will not take effect when the drag is started. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + READY = 1 + } +} +export default dragController; 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..e57f057fc71547d07bb5349a5e903c81e25d4ed9 100644 --- a/api/@ohos.arkui.drawableDescriptor.d.ts +++ b/api/@ohos.arkui.drawableDescriptor.d.ts @@ -96,15 +96,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(); @@ -134,6 +136,18 @@ export class DrawableDescriptor { */ getPixelMap(): image.PixelMap; + /** + * Get pixelMap of drawable image. + * + * @returns { image.PixelMap | undefined } Return the PixelMap of the calling DrawableDescriptor object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getPixelMap(): image.PixelMap | undefined; + /** * Get original width of drawable object. * @@ -205,9 +219,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 +231,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, @@ -250,6 +266,18 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { */ getForeground(): DrawableDescriptor; + /** + * Get DrawableDescriptor for the foreground. + * + * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of foreground. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getForeground(): DrawableDescriptor | undefined; + /** * Get DrawableDescriptor for the background. * @@ -276,6 +304,18 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { */ getBackground(): DrawableDescriptor; + /** + * Get DrawableDescriptor for the background. + * + * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of background. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getBackground(): DrawableDescriptor | undefined; + /** * Get DrawableDescriptor for the mask. * @@ -302,6 +342,18 @@ export class LayeredDrawableDescriptor extends DrawableDescriptor { */ getMask(): DrawableDescriptor; + /** + * Get DrawableDescriptor for the mask. + * + * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + getMask(): DrawableDescriptor | undefined; + /** * Get the clip path info of the adaptive icon mask. @@ -325,7 +377,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,15 +389,17 @@ 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); @@ -367,9 +422,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 +433,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,7 +444,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 */ iterations?: number; @@ -410,9 +468,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,7 +480,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); diff --git a/api/@ohos.arkui.inspector.d.ts b/api/@ohos.arkui.inspector.d.ts index e1cc913b37dcfdee4f89530e88bfd7c29f8f04ab..7588379244d078300cf24b5674986eed8fd50a88 100644 --- a/api/@ohos.arkui.inspector.d.ts +++ b/api/@ohos.arkui.inspector.d.ts @@ -185,4 +185,4 @@ declare namespace inspector { function createComponentObserver(id: string): ComponentObserver; } -export default inspector; +export default inspector; \ No newline at end of file diff --git a/api/@ohos.arkui.inspector.static.d.ets b/api/@ohos.arkui.inspector.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..a454ff026763f729aa800ac4d92fbe9b1e1cbf1d --- /dev/null +++ b/api/@ohos.arkui.inspector.static.d.ets @@ -0,0 +1,173 @@ +/* + * 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 ArkUI + * @arkts 1.2 + */ +import { Callback, RecordData } from './@ohos.base'; + +/** + * Used to do observer layout and draw event for component. + * + * @namespace inspector + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare namespace inspector { + + /** + * The ComponentObserver is used to listen for layout, draw and drawChildren events. + * + * @interface ComponentObserver + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface ComponentObserver { + + /** + * Registers a callback with the corresponding query condition by using the handle. + * This callback is triggered when the component layout complete. + * @param { 'layout' } type - type of the listened event. + * @param { Callback } callback - callback of the listened event. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onLayout(type: 'layout', callback: Callback): void; + + /** + * Deregisters a callback with the corresponding query condition by using the handle. + * This callback is not triggered when the component layout complete. + * @param { 'layout' } type - type of the listened event. + * @param { Callback } [callback] - callback of the listened event. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offLayout(type: 'layout', callback?: Callback): void; + + /** + * Registers a callback with the corresponding query condition by using the handle. + * This callback is triggered when the component draw complete. + * @param { 'draw' } type - type of the listened event. + * @param { Callback } callback - callback of the listened event. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onDraw(type: 'draw', callback: Callback): void; + + /** + * Deregisters a callback with the corresponding query condition by using the handle. + * This callback is not triggered when the component draw complete. + * @param { 'draw' } type - type of the listened event. + * @param { Callback } [callback] - callback of the listened event. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offDraw(type: 'draw', callback?: Callback): void; + + /** + * Registers a callback with the corresponding query condition by using the handle. + * This callback is triggered when the child of component draw complete. + * @param { 'drawChildren' } type - type of the listened event. + * @param { Callback } callback - callback of the listened event. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onDrawChildren(type: 'drawChildren', callback: Callback): void; + + /** + * Deregisters a callback with the corresponding query condition by using the handle. + * This callback is not triggered when the child of component draw complete. + * @param { 'drawChildren' } type - type of the listened event. + * @param { Callback } [callback] - callback of the listened event. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offDrawChildren(type: 'drawChildren', callback?: Callback): void; + + /** + * @since 20 + */ + overload on { onLayout, onDraw, onDrawChildren } + /** + * @since 20 + */ + overload off { offLayout, offDraw, offDrawChildren } + } + + /** + * 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 + * @since 20 + * @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 + * @since 20 + * @test + */ + function getInspectorByKey(id: string): string; + /** + * Get components tree. + * + * @returns { RecordData } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @test + */ + function getInspectorTree(): RecordData; + /** + * 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 { int } 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 + * @since 20 + * @test + */ + function sendEventByKey(id: string, action: int, params: string): boolean; +} +export default inspector; +/** + * export function getInspectorByKey from inspector namespace and provide it for kit ArkUI. + * @constant + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export const GETINSPECTORBYKEY = inspector.getInspectorByKey; +/** + * export function getInspectorTree from inspector namespace and provide it for kit ArkUI. + * @constant + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export const GETINSPECTORTREE = inspector.getInspectorTree; +/** + * export function sendEventByKey from inspector namespace and provide it for kit ArkUI. + * @constant + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export const SENDEVENTBYKEY = inspector.sendEventByKey; diff --git a/api/@ohos.arkui.modifier.static.d.ets b/api/@ohos.arkui.modifier.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..7632fd86fa60f0742abb034983639096ac88e671 --- /dev/null +++ b/api/@ohos.arkui.modifier.static.d.ets @@ -0,0 +1,210 @@ +/* + * 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 ArkUI + * @arkts 1.2 + */ + +/** + * Export TextModifier, which is used to expose applyNormalAttribute function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { TextModifier } from './arkui/TextModifier'; + +/** + * Export CommonModifier, which is used to expose applyNormalAttribute function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { CommonModifier } from './arkui/CommonModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { AttributeUpdater } from './arkui/AttributeUpdater'; + +/** + * Export GridModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { GridModifier } from './arkui/GridModifier'; + +/** + * Export GridItemModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { GridItemModifier } from './arkui/GridItemModifier'; + +/** + * Export ListItemGroupModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { ListItemGroupModifier } from './arkui/ListItemGroupModifier'; + +/** + * Export ListItemModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { ListItemModifier } from './arkui/ListItemModifier'; + +/** + * Export ListModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { ListModifier } from './arkui/ListModifier'; + +/** + * Export NavDestinationModifier, which is used to expose applyNormalAttribute function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { NavDestinationModifier } from './arkui/NavDestinationModifier'; + +/** + * Export NavigationModifier, which is used to expose applyNormalAttribute function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { NavigationModifier } from './arkui/NavigationModifier'; + +/** + * Export RefreshModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { RefreshModifier } from './arkui/RefreshModifier'; + +/** + * Export RefreshModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { ScrollModifier } from './arkui/ScrollModifier'; + +/** + * Export SideBarContainerModifier, which is used to expose applyNormalAttribute function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { SideBarContainerModifier } from './arkui/SideBarContainerModifier'; + +/** + * Export StepperItemModifier, which is used to expose applyNormalAttribute function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { StepperItemModifier } from './arkui/StepperItemModifier'; + +/** + * Export StepperModifier, which is used to expose applyNormalAttribute function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { StepperModifier } from './arkui/StepperModifier'; + +/** + * Export SwiperModifier, which is used to expose applyNormalAttribute function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { SwiperModifier } from './arkui/SwiperModifier'; + +/** + * Export RefreshModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { WaterFlowModifier } from './arkui/WaterFlowModifier'; + +/** + * Export ButtonModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { ButtonModifier } from './arkui/ButtonModifier'; + +/** + * Export SymbolGlyphModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; + + +/** + * Export LineModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { LineModifier } from './arkui/LineModifier'; + +/** + * Export PathModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { PathModifier } from './arkui/PathModifier'; + +/** + * Export PolygonModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { PolygonModifier } from './arkui/PolygonModifier'; + +/** + * Export PolylineModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { PolylineModifier } from './arkui/PolylineModifier'; + +/** + * Export RectModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { RectModifier } from './arkui/RectModifier'; + +/** + * Export ShapeModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { ShapeModifier } from './arkui/ShapeModifier'; + +/** + * Export VideoModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { VideoModifier } from './arkui/VideoModifier'; + +/** + * Export ParticleModifier, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export { ParticleModifier } from './arkui/ParticleModifier'; \ 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..7c332a641f102e2e475d3576c0d7f08b296ac29f 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,9 +193,10 @@ 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'; +export { ComponentContent , ComponentContentBase } from './arkui/ComponentContent'; /** * Export NodeContent. @@ -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..6ba74fa4c2501f3198e94f8911ef3925be5339c0 100644 --- a/api/@ohos.arkui.observer.d.ts +++ b/api/@ohos.arkui.observer.d.ts @@ -17,11 +17,9 @@ * @file * @kit ArkUI */ - import type { Callback } from './@ohos.base'; import type UIAbilityContext from './application/UIAbilityContext'; import type { NavigationOperation, NavBar } from '../component/navigation'; - /** * Register callbacks to observe ArkUI behavior. * @@ -66,7 +64,7 @@ declare namespace uiObserver { * @since 11 */ /** - * When the NavDestination is displayed. + * When the NavDestination displayed. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -943,7 +941,6 @@ declare namespace uiObserver { * @since 12 */ export function on(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback: Callback): void; - /** * Removes a callback function that was previously registered with `on()`. * diff --git a/api/@ohos.arkui.observer.static.d.ets b/api/@ohos.arkui.observer.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..96c1b2bcc33dbdaf891d2b3f811d933a783d0fd2 --- /dev/null +++ b/api/@ohos.arkui.observer.static.d.ets @@ -0,0 +1,874 @@ +'use static'; +/* + * 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 + * @arkts 1.2 + */ +import { ResourceStr } from './arkui/component/units'; +import { NavPathStack, NavigationOperation, NavBar } from './arkui/component/navigation'; +import { UIContext } from '@ohos.arkui.UIContext'; +import UIAbilityContext from './application/UIAbilityContext'; +import { Callback } from './@ohos.base'; +import { NavDestinationMode } from './arkui/component/navDestination'; + +/** + * Register callbacks to observe ArkUI behavior. + * + * @namespace uiObserver + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare namespace uiObserver { + + /** + * NavDestination state. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export enum NavDestinationState { + + /** + * When the NavDestination is displayed. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ON_SHOWN = 0, + + /** + * When the NavDestination is hidden. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ON_HIDDEN = 1, + /** + * When the NavDestination appear. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ON_APPEAR = 2, + /** + * When the NavDestination disappear. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ON_DISAPPEAR = 3, + /** + * Before the NavDestination is displayed. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ON_WILL_SHOW = 4, + /** + * Before the NavDestination is hidden. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ON_WILL_HIDE = 5, + /** + * Before the NavDestination is appeared. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ON_WILL_APPEAR = 6, + /** + * Before the NavDestination is disappeared. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ON_WILL_DISAPPEAR = 7, + /** + * When back press event happened in NavDestination. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ON_BACKPRESS = 100 + } + + /** + * Router page state. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export enum RouterPageState { + + /** + * When the router page create. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ABOUT_TO_APPEAR = 0, + + /** + * When the router page destroy. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ABOUT_TO_DISAPPEAR = 1, + + /** + * When the router page show. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ON_PAGE_SHOW = 2, + + /** + * When the router page hide. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ON_PAGE_HIDE = 3, + + /** + * When back press event happened in the router page. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ON_BACK_PRESS = 4 + } + /** + * ScrollEvent type. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export enum ScrollEventType { + /** + * When the ScrollEvent start. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + SCROLL_START = 0, + /** + * When the ScrollEvent stop. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + SCROLL_STOP = 1 + } + /** + * TabContent state. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export enum TabContentState { + /** + * When the TabContent hidden. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ON_SHOW = 0, + /** + * When the TabContent hidden. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ON_HIDE = 1 + } + + /** + * NavDestination info. + * + * @interface NavDestinationInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface NavDestinationInfo { + + /** + * Navigation id. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + navigationId: ResourceStr; + + /** + * Changed NavDestination name. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + name: ResourceStr; + + /** + * Changed NavDestination state. + * + * @type { NavDestinationState } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + state: NavDestinationState; + /** + * NavDestination index. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + index: number; + /** + * The detailed parameter of NavDestination. + * + * @type { ?Object } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + param?: Object; + /** + * Auto-generated navDestination id, which is different from common property id of Component. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + navDestinationId: string; + + /** + * NavDestination uniqueId. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + uniqueId?: number; + + /** + * NavDestination mode. + * + * @type { NavDestinationMode } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + mode?: NavDestinationMode; + } + /** + * Navigation info. + * + * @interface NavigationInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface NavigationInfo { + /** + * Navigation id. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + navigationId: string; + /** + * Navigation path stack. + * + * @type { NavPathStack } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pathStack: NavPathStack; + } + /** + * ScrollEvent info. + * + * @interface ScrollEventInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface ScrollEventInfo { + /** + * Scroll id. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + id: string; + /** + * The uniqueId of the scrollable component. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + uniqueId: number; + /** + * Changed ScrollEvent type. + * + * @type { ScrollEventType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + scrollEvent: ScrollEventType; + /** + * Changed ScrollEvent offset. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offset: number; + } + /** + * TabContent info. + * + * @typedef TabContentInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface TabContentInfo { + /** + * TabContent id. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + tabContentId: string; + /** + * TabContent uniqueId. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + tabContentUniqueId: number; + /** + * The state of TabContent. + * + * @type { TabContentState } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + state: TabContentState; + /** + * The index of TabContent in Tabs. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + index: number; + /** + * Tabs id. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + id: string; + /** + * Tabs uniqueId. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + uniqueId: number; + } + /** + * observer options. + * + * @interface ObserverOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface ObserverOptions { + /** + * component id. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + id: string; + } + + /** + * Router page info. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export class RouterPageInfo { + + /** + * The context of the changed router page. + * + * @type { UIAbilityContext | UIContext } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + context: UIAbilityContext | UIContext; + + /** + * The index of the changed router page in router stack. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + index: number; + + /** + * The name of the changed router page. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + name: string; + + /** + * The path of the changed router page. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + path: string; + + /** + * The state of the changed router page. + * + * @type { RouterPageState } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + state: RouterPageState; + /** + * The unique identifier of the router page. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pageId: string; + } + /** + * Density info. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export class DensityInfo { + /** + * The context of the changed screen density. + * + * @type { UIContext } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + context: UIContext; + /** + * The changed screen density. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + density: number; + } + /** + * NavDestination switch info + * + * @interface NavDestinationSwitchInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface NavDestinationSwitchInfo { + /** + * The context of the navigation operation. + * + * @type { UIAbilityContext | UIContext } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + context: UIAbilityContext | UIContext; + /** + * From navigation content info. + * + * @type { NavDestinationInfo | NavBar } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + from: NavDestinationInfo | NavBar; + /** + * To navigation content info. + * + * @type { NavDestinationInfo | NavBar } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + to: NavDestinationInfo | NavBar; + /** + * The operation type. + * + * @type { NavigationOperation } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + operation: NavigationOperation; + } + /** + * Indicates the options of NavDestination switch. + * + * @interface NavDestinationSwitchObserverOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface NavDestinationSwitchObserverOptions { + /** + * The navigationId that need observation + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + 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 { 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 + * @since 20 + */ + export function on( + type: 'navDestinationUpdate', + options: NavDestinationSwitchObserverOptions, + 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 + * @since 20 + */ + export function off( + type: 'navDestinationUpdate', + options: NavDestinationSwitchObserverOptions, + 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 + * @since 20 + */ + export function 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 + * @since 20 + */ + export function 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 { 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + 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 + * @since 20 + */ + export function off( + type: 'navDestinationSwitch', + context: UIAbilityContext | UIContext, + observerOptions: NavDestinationSwitchObserverOptions, + callback?: Callback + ): void; +} +export default uiObserver; diff --git a/api/@ohos.arkui.performanceMonitor.d.ts b/api/@ohos.arkui.performanceMonitor.d.ts index bb553c4286dfb4e3c3d86e0d8abb154caeedddf9..19be899cf1cf90193dde644e90f55326be7826a2 100644 --- a/api/@ohos.arkui.performanceMonitor.d.ts +++ b/api/@ohos.arkui.performanceMonitor.d.ts @@ -21,7 +21,8 @@ /** * 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. + *

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" @@ -46,7 +47,7 @@ declare namespace performanceMonitor { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since 10 */ export enum ActionType { /** @@ -134,7 +135,7 @@ declare namespace performanceMonitor { * @systemapi * @since 10 */ - function begin(scene: string, startInputType: ActionType, note?: string): void; + function begin(scene: string, startInputType: ActionType, note?: string): void; /** * End monitoring an application scene. @@ -152,7 +153,7 @@ declare namespace performanceMonitor { * @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. + * @throws { BusinessError } 202 - not system application. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 12 diff --git a/api/@ohos.arkui.performanceMonitor.d.ets b/api/@ohos.arkui.performanceMonitor.static.d.ets similarity index 34% rename from api/@ohos.arkui.performanceMonitor.d.ets rename to api/@ohos.arkui.performanceMonitor.static.d.ets index 455156910f791455b4486d30cd9e7c751b95f53d..c035aa775bd1629f8a8320a5e416a093a3cd0011 100644 --- a/api/@ohos.arkui.performanceMonitor.d.ets +++ b/api/@ohos.arkui.performanceMonitor.static.d.ets @@ -1,5 +1,6 @@ +'use static'; /* - * Copyright (C) 2023 Huawei Device Co., Ltd. + * 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 @@ -16,12 +17,13 @@ /** * @file * @kit ArkUI + * @arkts 1.2 */ - /** * 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. + *

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" @@ -37,126 +39,116 @@ * @namespace performanceMonitor * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since 20 */ - declare namespace performanceMonitor { - /** - * Enumerates the input event type. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 10 - */ - export enum ActionType { +declare namespace performanceMonitor { /** - * The user presses the finger on the screen. + * Enumerates the input event type. + * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 - */ - LAST_DOWN = 0, - + * @since 20 + */ + export enum ActionType { + /** + * The user presses the finger on the screen. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + LAST_DOWN = 0, + /** + * The user lifts up the finger from the screen. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + LAST_UP = 1, + /** + * The user first moves the finger after pressing down the screen. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + FIRST_MOVE = 2 + } /** - * The user lifts up the finger from the screen. + * Enumerates the input source type. + * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 10 + * @since 20 */ - LAST_UP = 1, - + export enum SourceType { + /** + * The user touches the screen to trigger the scene. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + PERF_TOUCH_EVENT = 0, + /** + * TThe user uses the mouse to trigger the scene. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + PERF_MOUSE_EVENT = 1, + /** + * The user uses the touchpad to trigger the scene. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + PERF_TOUCHPAD_EVENT = 2, + /** + * The user uses the joystick to trigger the scene. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + PERF_JOYSTICK_EVENT = 3, + /** + * The user uses the keyboard to trigger the scene. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + PERF_KEY_EVENT = 4 + } /** - * The user first moves the finger after pressing down the screen. + * 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 + * @since 20 */ - FIRST_MOVE = 2 - } - - /** - * Enumerates the input source type. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 12 - */ - export enum SourceType { + function begin(scene: string, startInputType: ActionType, note?: string): void; /** - * The user touches the screen to trigger the scene. + * 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 12 + * @since 20 */ - PERF_TOUCH_EVENT = 0, - + function end(scene: string): void; /** - * TThe user uses the mouse to trigger the scene. + * 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 + * @since 20 */ - 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; + function recordInputEventTime(type: ActionType, sourceType: SourceType, time: number): void; } export default performanceMonitor; \ No newline at end of file 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.static.d.ets b/api/@ohos.arkui.shape.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..c84cfe09e2ae98ef477db1f4e3ba3c029e265dfc --- /dev/null +++ b/api/@ohos.arkui.shape.static.d.ets @@ -0,0 +1,278 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ + +import { Position, ResourceColor, Length, SizeOptions } from './arkui/component/units'; +/** + * Interface for shape size properties. + * + * @interface ShapeSize + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface ShapeSize { + /** + * Defines the width of Shape. + * @type { ? (number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width?: number | string; + /** + * Defines the height of Shape. + * @type { ? (number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height?: number | string; +} +/** + * Interface for RectShape constructor parameters. + * + * @extends ShapeSize + * @interface RectShapeOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface RectShapeOptions extends ShapeSize { + /** + * Defines the corner radius of the RectShape. + * @type { ? (number | string | Array) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + radius?: number | string | Array; +} +/** + * Interface for RectShape constructor parameters with separate radius values. + * + * @extends ShapeSize + * @interface RoundRectShapeOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface RoundRectShapeOptions extends ShapeSize { + /** + * Defines the width of the corner radius for RectShape. + * @type { ? (number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + radiusWidth?: number | string; + /** + * Defines the height of the corner radius for RectShape. + * @type { ? (number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + radiusHeight?: number | string; +} +/** + * Interface for PathShape constructor parameters. + * + * @interface PathShapeOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface PathShapeOptions { + /** + * Defines the commands for drawing the PathShape. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + commands?: string; +} +/** + * Common shape method class + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare class CommonShapeMethod { + /** + * Sets coordinate offset relative to the layout completion position. + * + * @param { Position } offset + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + offset(offset: Position): T; + /** + * Sets the fill color of the shape. + * + * @param { ResourceColor } color + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fill(color: ResourceColor): T; + /** + * Sets the position of the shape. + * + * @param { Position } position + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + position(position: Position): T; +} +/** + * Base shape class + * + * @extends CommonShapeMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare class BaseShape extends CommonShapeMethod { + /** + * Sets the width of the shape. + * + * @param { Length } width + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width(width: Length): T; + /** + * Sets the height of the shape. + * + * @param { Length } height + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + height(height: Length): T; + /** + * Sets the size of the shape. + * + * @param { SizeOptions } size + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + size(size: SizeOptions): T; +} +/** + * Defines a rect drawing class. + * + * @extends BaseShape + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class RectShape extends BaseShape { + /** + * Constructor. + * + * @param { RectShapeOptions | RoundRectShapeOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options?: RectShapeOptions | RoundRectShapeOptions); + /** + * Sets the width of the corner radius for RectShape. + * + * @param { number | string } rWidth + * @returns { RectShape } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + 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 + * @since 20 + */ + radiusHeight(rHeight: number | string): RectShape; + /** + * Sets the corner radius for RectShape. + * + * @param { number | string | Array } radius + * @returns { RectShape } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + radius(radius: number | string | Array): RectShape; +} +/** + * Defines a circle drawing class. + * + * @extends BaseShape + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class CircleShape extends BaseShape { + /** + * Constructor. + * + * @param { ShapeSize } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options?: ShapeSize); +} +/** + * Defines an ellipse drawing class. + * + * @extends BaseShape + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class EllipseShape extends BaseShape { + /** + * Constructor. + * + * @param { ShapeSize } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options?: ShapeSize); +} +/** + * Defines a path drawing class. + * + * @extends CommonShapeMethod + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class PathShape extends CommonShapeMethod { + /** + * Constructor. + * + * @param { PathShapeOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(options?: PathShapeOptions); + /** + * Sets the commands for drawing the PathShape. + * + * @param { string } commands + * @returns { PathShape } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + commands(commands: string): PathShape; +} diff --git a/api/@ohos.arkui.stateManagement.d.ets b/api/@ohos.arkui.stateManagement.d.ets deleted file mode 100644 index f29f2f0d28eec854dd65068f5f504295a35ca84b..0000000000000000000000000000000000000000 --- a/api/@ohos.arkui.stateManagement.d.ets +++ /dev/null @@ -1,34 +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 State management API file - * @kit ArkUI - * @arkts 1.2 - */ - -export * from './arkui/stateManagement/common'; -export * from './arkui/stateManagement/runtime'; -export * from './arkui/stateManagement/storage'; -export * from './arkui/stateManagement/base/decoratorBase'; -export * from './arkui/stateManagement/base/iObservedObject'; -export * from './arkui/stateManagement/decorators/decoratorState'; -export * from './arkui/stateManagement/decorators/decoratorLink'; -export * from './arkui/stateManagement/decorators/decoratorProp'; -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 diff --git a/api/arkui/stateManagement/decorators/decoratorProp.d.ets b/api/@ohos.arkui.stateManagement.static.d.ets similarity index 52% rename from api/arkui/stateManagement/decorators/decoratorProp.d.ets rename to api/@ohos.arkui.stateManagement.static.d.ets index 89eb7968be4b03ce3a1f19b69cc58b5d17623973..4f8e84173bb4dfc78d7b79441a86a0b14a756fd6 100644 --- a/api/arkui/stateManagement/decorators/decoratorProp.d.ets +++ b/api/@ohos.arkui.stateManagement.static.d.ets @@ -1,30 +1,31 @@ -/* - * 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 ArkUI - * @arkts 1.2 - */ - -import { DecoratedV1VariableBase, IDecoratedMutableVariable, IDecoratedUpdatableVariable } from '../base/decoratorBase'; -import { WatchFuncType } from './decoratorWatch'; - -export declare class PropDecoratedVariable extends DecoratedV1VariableBase - implements IDecoratedMutableVariable, IDecoratedUpdatableVariable { - public constructor(varName: string, sourceValue: T, watchFunc?: WatchFuncType) - public get(): T - public set(newValue: T): void - public update(newValue: T): void -} \ No newline at end of file +'use static' +/* + * 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 State management API file + * @kit ArkUI + * @arkts 1.2 + */ + +export * from './arkui/stateManagement/decorator'; +export * from './arkui/stateManagement/remember'; +export * from './arkui/stateManagement/runtime'; +export * from './arkui/stateManagement/storage/appStorage'; +export * from './arkui/stateManagement/storage/environment'; +export * from './arkui/stateManagement/storage/localStorage'; +export * from './arkui/stateManagement/storage/persistentStorage'; +export * from './arkui/stateManagement/storage/storageProperty'; +export * from './arkui/stateManagement/utils'; \ No newline at end of file diff --git a/api/@ohos.arkui.theme.d.ts b/api/@ohos.arkui.theme.d.ts index bec047f52697f106ecc076ddb9293cfb431d6a38..b2c873def59fe764e929e573cb054cca023ffdde 100644 --- a/api/@ohos.arkui.theme.d.ts +++ b/api/@ohos.arkui.theme.d.ts @@ -558,7 +558,7 @@ export declare interface Colors { interactiveHover: ResourceColor; /** - * Pressed interactive color + * Pressed interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -569,7 +569,7 @@ export declare interface Colors { interactivePressed: ResourceColor; /** - * Focus interactive color + * Focus interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -580,7 +580,7 @@ export declare interface Colors { interactiveFocus: ResourceColor; /** - * Active interactive color + * Active interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -591,7 +591,7 @@ export declare interface Colors { interactiveActive: ResourceColor; /** - * Select interactive color + * Select interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -602,7 +602,7 @@ export declare interface Colors { interactiveSelect: ResourceColor; /** - * Click interactive color + * Click interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -645,7 +645,6 @@ export declare interface CustomTheme { * @since 12 */ export declare type CustomColors = Partial; - /** * Class ThemeControl provides the Theme management for whole Ability and pages. * diff --git a/api/@ohos.arkui.theme.d.ets b/api/@ohos.arkui.theme.static.d.ets similarity index 74% rename from api/@ohos.arkui.theme.d.ets rename to api/@ohos.arkui.theme.static.d.ets index bd4f371105a7ebeef797d5dc9b461f52b064df4f..01238b37d2b98d943dc3632c142906e641fc9deb 100644 --- a/api/@ohos.arkui.theme.d.ets +++ b/api/@ohos.arkui.theme.static.d.ets @@ -1,6 +1,6 @@ - +'use static'; /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * 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 @@ -17,17 +17,15 @@ /** * @file * @kit ArkUI + * @arkts 1.2 */ - -import { ResourceColor } from './arkui/component/units' +import { ResourceColor } from './arkui/component/units'; /** * Defines the struct of Theme. * * @interface Theme * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ export declare interface Theme { /** @@ -35,594 +33,433 @@ export declare interface Theme { * * @type { Colors } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ colors: Colors; } - /** * Defines the struct of Colors. * * @interface Colors * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ export declare interface Colors { - /** * System brand Color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ brand: ResourceColor; - /** * System warning Color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ warning: ResourceColor; - /** * System alert Color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ alert: ResourceColor; - /** * System confirm Color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ confirm: ResourceColor; - /** * First level text color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ fontPrimary: ResourceColor; - /** * Secondary text color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ fontSecondary: ResourceColor; - /** * tertiary text color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ fontTertiary: ResourceColor; - /** * Fourth text color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ fontFourth: ResourceColor; - /** * Emphasize text color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ fontEmphasize: ResourceColor; - /** * First level text inversion, used on colored backgrounds. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ fontOnPrimary: ResourceColor; - /** * Secondary level text inversion, used on colored backgrounds. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ fontOnSecondary: ResourceColor; - /** * Tertiary level text inversion, used on colored backgrounds. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ fontOnTertiary: ResourceColor; - /** * Fourth level text inversion, used on colored backgrounds. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ fontOnFourth: ResourceColor; - /** * First level icon color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ iconPrimary: ResourceColor; - /** * Secondary level icon color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ iconSecondary: ResourceColor; - /** * Tertiary level icon color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ iconTertiary: ResourceColor; - /** * Fourth level icon color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ iconFourth: ResourceColor; - /** * Emphasize level icon color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ iconEmphasize: ResourceColor; - /** * Secondary emphasize level icon color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ iconSubEmphasize: ResourceColor; - /** * First level icon reversed, used on a colored background. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ iconOnPrimary: ResourceColor; - /** * Secondary level icon reversed, used on a colored background. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ iconOnSecondary: ResourceColor; - /** * Tertiary level icon reversed, used on a colored background. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ iconOnTertiary: ResourceColor; - /** * Fourth level icon reversed, used on a colored background. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ iconOnFourth: ResourceColor; - /** * System Primary level background color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ backgroundPrimary: ResourceColor; - /** * System Secondary level background color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ backgroundSecondary: ResourceColor; - /** * System tertiary level background color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ backgroundTertiary: ResourceColor; - /** * System fourth level background color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ backgroundFourth: ResourceColor; - /** * System emphasize level background color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ backgroundEmphasize: ResourceColor; - /** * CompForegroundPrimary color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compForegroundPrimary: ResourceColor; - /** * CompBackgroundPrimary color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compBackgroundPrimary: ResourceColor; - /** * CompBackgroundPrimaryTran color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compBackgroundPrimaryTran: ResourceColor; - /** * CompBackgroundPrimaryContrary color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compBackgroundPrimaryContrary: ResourceColor; - /** * CompBackgroundGray color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compBackgroundGray: ResourceColor; - /** * 10% black universal control background. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compBackgroundSecondary: ResourceColor; - /** * 5% black universal control background. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compBackgroundTertiary: ResourceColor; - /** * 100% bright brand background color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compBackgroundEmphasize: ResourceColor; - /** * Black neutral high gloss color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compBackgroundNeutral: ResourceColor; - /** * 20% High gloss brand background color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compEmphasizeSecondary: ResourceColor; - /** * 10% High gloss brand background color. * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compEmphasizeTertiary: ResourceColor; - /** * Universal Division Line Color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compDivider: ResourceColor; - /** * CompCommonContrary Color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compCommonContrary: ResourceColor; - /** * CompBackgroundFocus Color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compBackgroundFocus: ResourceColor; - /** * CompFocusedPrimary Color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compFocusedPrimary: ResourceColor; - /** * CompFocusedSecondary Color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compFocusedSecondary: ResourceColor; - /** * CompFocusedTertiary Color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ compFocusedTertiary: ResourceColor; - /** - * Hover interactive color + * Hover interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ interactiveHover: ResourceColor; - /** - * Pressed interactive color + * Pressed interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ interactivePressed: ResourceColor; - /** - * Focus interactive color + * Focus interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ interactiveFocus: ResourceColor; - /** - * Active interactive color + * Active interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ interactiveActive: ResourceColor; - /** - * Select interactive color + * Select interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ interactiveSelect: ResourceColor; - /** - * Click interactive color + * Click interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ interactiveClick: ResourceColor; } - /** * Defines the struct of CustomTheme. * * @interface CustomTheme * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ export declare interface CustomTheme { /** @@ -630,31 +467,23 @@ export declare interface CustomTheme { * * @type { ?CustomColors } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ colors?: CustomColors; } - /** * Defines the struct of CustomColors. * * @typedef { Partial } CustomColors * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ export type CustomColors = Partial; - /** * Class ThemeControl provides the Theme management for whole Ability and pages. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ export declare class ThemeControl { /** @@ -664,9 +493,7 @@ export declare class ThemeControl { * * @param { CustomTheme } theme * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ 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..5046c23213c21f78914950b9545e8a606886941d 100644 --- a/api/@ohos.arkui.uiExtension.d.ts +++ b/api/@ohos.arkui.uiExtension.d.ts @@ -18,8 +18,6 @@ * @kit ArkUI */ - - import { Callback } from './@ohos.base'; import window from './@ohos.window'; /** @@ -58,7 +56,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 +72,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 +118,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 +134,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. @@ -193,7 +196,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 +206,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 deleted file mode 100644 index 39f9d3995fd8fcee34650181e05a732a7468c206..0000000000000000000000000000000000000000 --- a/api/@ohos.base.d.ets +++ /dev/null @@ -1,177 +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 BasicServicesKit - */ - -/** - * Defines the basic callback. - * - * @typedef { Callback } - * @syscap SystemCapability.Base - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ -export type Callback = (data: T) => void; - -/** - * Defines the basic error callback. - * - * @typedef { ErrorCallback } - * @syscap SystemCapability.Base - * @crossplatform - * @atomicservice - * @since 20 - */ -export type ErrorCallback = (err: T)=> void; - -/** - * Defines the basic async callback. - * - * @typedef { AsyncCallback } - * @syscap SystemCapability.Base - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ -export type AsyncCallback = (err: BusinessError, data: T)=> void; - -/** - * Defines the error interface. - * @syscap SystemCapability.Base - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ -export declare class BusinessError extends Error { - /** - * A constructor used to create a BusinessError object - * @syscap SystemCapability.Base - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - constructor(); - /** - * A constructor used to create a BusinessError object - * @params { number } code - * @params { Error } error - * @syscap SystemCapability.Base - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - constructor(code: number, error: Error); - /** - * A constructor used to create a BusinessError object - * @params { number } code - * @params { T } data - * @params { Error } error - * @syscap SystemCapability.Base - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - constructor(code: number, data: T, error: Error); - /** - * Defines the basic error code. - * @type { number } code - * @syscap SystemCapability.Base - * @since 6 - */ - /** - * Defines the basic error code. - * @type { number } code - * @syscap SystemCapability.Base - * @crossplatform - * @since 10 - */ - /** - * Defines the basic error code. - * @type { number } code - * @syscap SystemCapability.Base - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Defines the basic error code. - * @type { number } code - * @syscap SystemCapability.Base - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - /** - * Defines the basic error code. - * @type { number } code - * @syscap SystemCapability.Base - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - code: number; - /** - * Defines the additional information for business - * @type { ?T } data - * @syscap SystemCapability.Base - * @since 9 - */ - /** - * Defines the additional information for business - * @type { ?T } data - * @syscap SystemCapability.Base - * @crossplatform - * @since 10 - */ - /** - * Defines the additional information for business - * @type { ?T } data - * @syscap SystemCapability.Base - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Defines the additional information for business - * @type { ?T } data - * @syscap SystemCapability.Base - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - /** - * Defines the additional information for business - * @type { ?T } data - * @syscap SystemCapability.Base - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - data?: T; -} 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.base.static.d.ets b/api/@ohos.base.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..3e22da2fda6e645109aa920ac1250d6f7f65be4b --- /dev/null +++ b/api/@ohos.base.static.d.ets @@ -0,0 +1,115 @@ +/* + * 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 BasicServicesKit + */ + +/** + * Defines the basic callback. + * + * @typedef { Callback } + * @syscap SystemCapability.Base + * @since 20 + */ + export type Callback = (data: T) => void; + + /** + * Defines the basic error callback. + * + * @typedef { ErrorCallback } + * @syscap SystemCapability.Base + * @since 20 + */ + export type ErrorCallback = (err: T)=> void; + + /** + * Defines the basic async callback. + * + * @typedef { AsyncCallback } + * @syscap SystemCapability.Base + * @since 20 + */ + export type AsyncCallback = (err: BusinessError | null, data: T | undefined)=> void; + + /** + * Defines the error interface. + * @syscap SystemCapability.Base + * @since 20 + */ + export declare class BusinessError extends Error { + /** + * A constructor used to create a BusinessError object + * @syscap SystemCapability.Base + * @since 20 + */ + constructor(); + /** + * A constructor used to create a BusinessError object + * @param { int } code + * @param { Error } error + * @syscap SystemCapability.Base + * @since 20 + */ + constructor(code: int, error: Error); + /** + * A constructor used to create a BusinessError object + * @param { int } code + * @param { T } data + * @param { Error } error + * @syscap SystemCapability.Base + * @since 20 + */ + constructor(code: int, data: T, error: Error); + + /** + * Defines the basic error code. + * @type { int } code + * @syscap SystemCapability.Base + * @since 20 + */ + code: int; + /** + * Defines the additional information for business + * @type { ?T } data + * @syscap SystemCapability.Base + * @since 20 + */ + 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.batteryInfo.d.ets b/api/@ohos.batteryInfo.d.ets index 7b8f73ca199c713d6393ca4ac983f258e4f6ca63..8e969c8d955ccd67e698e223a85acb1b28b97bd9 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 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..6a64dc35c2c89251d199060ccea9e72c234b9bc7 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 { /** diff --git a/api/@ohos.bluetooth.access.d.ts b/api/@ohos.bluetooth.access.d.ts index 15547e3fbb9e46c60ca69b7f7bde47f3dbc968b4..7aeb4edc2d8696bc8b88fe06c1eff538a1993688 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,7 +119,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 disableBluetooth(): void; @@ -133,7 +136,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 +176,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; @@ -283,7 +288,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'stateChange', callback: Callback): void; @@ -344,7 +350,8 @@ declare namespace access { * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'stateChange', callback?: Callback): void; @@ -437,11 +444,12 @@ declare namespace access { /** * The enum of bluetooth state. * - * @enum { number } + * @enum { int } * @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 +471,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 +494,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 +517,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 +540,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 +555,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 +570,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,7 +585,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_OFF = 6 } diff --git a/api/@ohos.bluetooth.baseProfile.d.ts b/api/@ohos.bluetooth.baseProfile.d.ts index 5034765d55393669c5358900e8ba9a7fb31a1d0f..680e085e71e25f6bb956ea41b6ec0782d5cec655 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 { /** @@ -419,7 +425,8 @@ declare namespace baseProfile { * @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 */ on(type: 'connectionStateChange', callback: Callback): void; @@ -448,7 +455,8 @@ declare namespace baseProfile { * @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 */ off(type: 'connectionStateChange', callback?: Callback): void; } diff --git a/api/@ohos.bluetooth.ble.d.ts b/api/@ohos.bluetooth.ble.d.ts index 7ec2196b2172bbcfa3e586fb1123b84517b51803..2271a38e95bdde4242a3bc6f7dc6724a603a1e22 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,13 +134,14 @@ 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; /** * Create a ble scanner instance. Each ble scanner instance can be independently started or stopped. - * + * * @returns { BleScanner } Returns the promise object. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform @@ -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; @@ -2868,7 +2880,7 @@ declare namespace ble { * Set the mtu size of a BLE peripheral device. * * @permission ohos.permission.ACCESS_BLUETOOTH - * @param { number } mtu - The maximum transmission unit. + * @param { int } mtu - The maximum transmission unit. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. @@ -2878,9 +2890,10 @@ 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; + setBLEMtuSize(mtu: int): void; /** * Enables or disables notification of a characteristic when value changed. @@ -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; /** @@ -3871,6 +3899,7 @@ declare namespace ble { */ descriptorHandle?: number; + /** * The permissions of a BLEDescriptor instance. The default value is Readable and Writable. * @@ -3905,7 +3934,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 +3960,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 +3986,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 +4012,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 +4031,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 +4059,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 +4085,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; /** @@ -4071,13 +4107,14 @@ declare namespace ble { /** * The Id of the read request * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - transId: number; + transId: int; /** * Indicates the byte offset of the start position for reading characteristic value * @@ -4088,12 +4125,13 @@ declare namespace ble { /** * Indicates the byte offset of the start position for reading characteristic value * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - offset: number; + offset: int; /** * The UUID of a CharacteristicReadRequest instance * @@ -4116,7 +4154,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 +4180,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 +4208,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 +4234,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; /** @@ -4214,13 +4256,14 @@ declare namespace ble { /** * The Id of the write request * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - transId: number; + transId: int; /** * Indicates the byte offset of the start position for writing characteristic value * @@ -4231,12 +4274,13 @@ declare namespace ble { /** * Indicates the byte offset of the start position for writing characteristic value * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - offset: number; + offset: int; /** * Whether this request should be pending for later operation * @@ -4291,7 +4335,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 +4361,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 +4387,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 +4415,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 +4441,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; /** @@ -4414,13 +4463,14 @@ declare namespace ble { /** * The Id of the read request * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - transId: number; + transId: int; /** * Indicates the byte offset of the start position for reading characteristic value * @@ -4431,12 +4481,13 @@ declare namespace ble { /** * Indicates the byte offset of the start position for reading characteristic value * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - offset: number; + offset: int; /** * The UUID of a DescriptorReadRequest instance * @@ -4459,7 +4510,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 +4536,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 +4562,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 +4590,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 +4616,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; /** @@ -4582,13 +4638,14 @@ declare namespace ble { /** * The Id of the write request * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - transId: number; + transId: int; /** * Indicates the byte offset of the start position for writing characteristic value * @@ -4599,12 +4656,13 @@ declare namespace ble { /** * Indicates the byte offset of the start position for writing characteristic value * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - offset: number; + offset: int; /** * Whether this request should be pending for later operation * @@ -4659,7 +4717,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 +4743,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 +4769,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 +4795,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 +4823,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 +4849,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; /** @@ -4807,13 +4871,14 @@ declare namespace ble { /** * The Id of the write request * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - transId: number; + transId: int; /** * Indicates the status of the read or write request, set this parameter to '0' in normal cases * @@ -4832,13 +4897,14 @@ declare namespace ble { /** * Indicates the status of the read or write request, set this parameter to '0' in normal cases * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - status: number; + status: int; /** * Indicates the byte offset of the start position for reading or writing operation * @@ -4849,12 +4915,13 @@ declare namespace ble { /** * Indicates the byte offset of the start position for reading or writing operation * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - offset: number; + offset: int; /** * Indicates the value to be sent * @@ -4877,7 +4944,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 +4972,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 +4998,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,7 +5024,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 */ state: ProfileConnectionState; } @@ -4981,7 +5052,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 +5078,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 +5129,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 +5180,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 +5213,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 +5241,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 { /** @@ -5182,12 +5259,13 @@ declare namespace ble { * Maximum slot value for the advertising interval, which is {@code 16777215} (10485.759375s) * Default slot value for the advertising interval, which is {@code 1600} (1s) * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interval?: number; + interval?: int; /** * Minimum transmission power level for advertising, which is {@code -127} * Maximum transmission power level for advertising, which is {@code 1} @@ -5202,12 +5280,13 @@ declare namespace ble { * Maximum transmission power level for advertising, which is {@code 1} * Default transmission power level for advertising, which is {@code -7} * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - txPower?: number; + txPower?: int; /** * Indicates whether the BLE is connectable, default is {@code true} * @@ -5230,7 +5309,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 +5337,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 +5363,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 +5389,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 +5415,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 +5469,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 +5486,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 +5503,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 +5520,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; /** @@ -5441,11 +5529,12 @@ declare namespace ble { * The duration, in 10ms unit. Valid range is from 1 (10ms) to 65535 (655,350 ms). * If this parameter is not specified or is set to 0, advertisement is continuously sent. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - duration?: number; + duration?: int; } /** @@ -5469,11 +5558,12 @@ declare namespace ble { * The duration, in 10ms unit. Valid range is from 1 (10ms) to 65535 (655,350 ms). * If this parameter is not specified or is set to 0, advertise is continuously sent. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - duration?: number; + duration?: int; } /** @@ -5507,7 +5597,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 +5630,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 +5658,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 +5736,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 +5762,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 +5815,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 +5841,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 +5894,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 +5999,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 +6078,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 +6132,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 { /** @@ -6053,13 +6154,14 @@ declare namespace ble { /** * Time of delay for reporting the scan result * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - interval?: number; + interval?: int; /** * Bluetooth LE scan mode * @@ -6082,7 +6184,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 +6201,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 +6257,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 +6283,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 +6309,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 +6335,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 +6361,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 +6378,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; @@ -6322,11 +6432,12 @@ declare namespace ble { /** * The enum of gatt characteristic write type * - * @enum { number } + * @enum { int } * @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 +6459,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 +6482,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 } @@ -6380,7 +6493,7 @@ declare namespace ble { * * @enum { number } * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 10 + * @since 10 */ /** * The enum of scan duty. @@ -6393,11 +6506,12 @@ declare namespace ble { /** * The enum of scan duty. * - * @enum { number } + * @enum { int } * @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 +6533,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, /** @@ -6478,10 +6593,11 @@ declare namespace ble { /** * The enum of BLE match mode. * - * @enum { number } + * @enum { int } * @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 +6611,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 +6626,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 +6645,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 +6660,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 +6691,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 +6751,7 @@ declare namespace ble { /** * Report mode used during scan. - * + * * @enum { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform @@ -6647,12 +6770,12 @@ declare namespace ble { NORMAL = 1, /** * Enables the batch mode in which advertisement packets are sent after the interval specified by {@link - * ScanOptions#interval}. - * @syscap SystemCapability.Communication.Bluetooth.Core - * @atomicservice - * @since 19 - */ - BATCH = 2, + * ScanOptions#interval}. + * @syscap SystemCapability.Communication.Bluetooth.Core + * @atomicservice + * @since 19 + */ + BATCH = 2, /** * In low sensitivity fence mode, the advertisement packets are reported only when they are received for * the first time and lost for the last time. The reception sensitivity is low. diff --git a/api/@ohos.bluetooth.connection.d.ts b/api/@ohos.bluetooth.connection.d.ts index 4436723f197650369f39c19b581c70675683c91f..4f19dba260267696593df3c2025eaac7cedff92a 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,7 +536,8 @@ 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; @@ -602,7 +608,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; @@ -739,7 +746,7 @@ declare namespace connection { * * @permission ohos.permission.ACCESS_BLUETOOTH * @param { ScanMode } mode - Indicates the Bluetooth scan mode to set. - * @param { number } duration - Indicates the duration in seconds, in which the host is discoverable. + * @param { int } duration - Indicates the duration in seconds, in which the host is discoverable. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Invalid parameter. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. 3. Parameter verification failed. @@ -748,9 +755,10 @@ 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; + function setBluetoothScanMode(mode: ScanMode, duration: int): void; /** * Obtains the Bluetooth scanning mode of a device. @@ -1172,7 +1180,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; @@ -1265,7 +1274,7 @@ declare namespace connection { /** * Controls the actions of Bluetooth peripherals. - * + * * @permission ohos.permission.ACCESS_BLUETOOTH and ohos.permission.MANAGE_BLUETOOTH * @param { ControlDeviceActionParams } controlDeviceActionParams - Indicates the action for Bluetooth peripherals. * @returns { Promise } Returns the promise object. @@ -1363,7 +1372,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 on(type: 'bluetoothDeviceFind', callback: Callback>): void; @@ -1404,7 +1414,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 off(type: 'bluetoothDeviceFind', callback?: Callback>): void; @@ -1435,7 +1446,8 @@ declare namespace connection { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'discoveryResult', callback: Callback>): void; @@ -1462,7 +1474,8 @@ declare namespace connection { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'discoveryResult', callback?: Callback>): void; @@ -1493,7 +1506,8 @@ declare namespace connection { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'bondStateChange', callback: Callback): void; @@ -1524,7 +1538,8 @@ declare namespace connection { * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'bondStateChange', callback?: Callback): void; @@ -1540,7 +1555,8 @@ declare namespace connection { * @throws { BusinessError } 801 - Capability not supported. * @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 on(type: 'pinRequired', callback: Callback): void; @@ -1556,7 +1572,8 @@ declare namespace connection { * @throws { BusinessError } 801 - Capability not supported. * @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 off(type: 'pinRequired', callback?: Callback): void; @@ -1569,7 +1586,8 @@ declare namespace connection { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'batteryChange', callback: Callback): void; @@ -1582,7 +1600,8 @@ declare namespace connection { * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2900099 - Operation failed. * @syscap SystemCapability.Communication.Bluetooth.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'batteryChange', callback?: Callback): void; @@ -1599,7 +1618,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 +1635,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 +1652,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 +1679,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 +1688,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 +1724,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 +1741,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 +1758,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; /** @@ -1787,10 +1814,11 @@ declare namespace connection { /** * The enum of BR scan mode. * - * @enum { number } + * @enum { int } * @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 +1874,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, /** @@ -1876,11 +1905,12 @@ declare namespace connection { /** * The enum of bond state. * - * @enum { number } + * @enum { int } * @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 +1976,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 +2070,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 +2087,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 +2146,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 +2156,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; /** @@ -2366,16 +2401,17 @@ declare namespace connection { interface ControlDeviceActionParams { /** * Indicates the address of the peripheral. - * + * * @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; /** * Indicates the control type. - * + * * @type { ControlType } * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi @@ -2384,7 +2420,7 @@ declare namespace connection { type: ControlType; /** * Indicates the control value. - * + * * @type { ControlTypeValue } * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi @@ -2393,7 +2429,7 @@ declare namespace connection { typeValue: ControlTypeValue; /** * Indicates the control object. - * + * * @type { ControlObject } * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi @@ -2404,7 +2440,7 @@ declare namespace connection { /** * Describes the control type. - * + * * @enum { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi @@ -2413,7 +2449,7 @@ declare namespace connection { enum ControlType { /** * Indicates the control command of play. - * + * * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi * @since 15 @@ -2421,7 +2457,7 @@ declare namespace connection { PLAY = 0, /** * Indicates the control command of vibration. - * + * * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi * @since 15 @@ -2429,7 +2465,7 @@ declare namespace connection { VIBRATE = 1, /** * Indicates the control command of flash. - * + * * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi * @since 15 @@ -2437,7 +2473,7 @@ declare namespace connection { FLASH = 2, /** * Indicates the control command of lock. - * + * * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi * @since 15 @@ -2445,7 +2481,7 @@ declare namespace connection { LOCK = 3, /** * Indicates the control command of erase. - * + * * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi * @since 15 @@ -2455,7 +2491,7 @@ declare namespace connection { /** * Describes the control type value. - * + * * @enum { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi @@ -2464,7 +2500,7 @@ declare namespace connection { enum ControlTypeValue { /** * Indicates the action of disable. - * + * * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi * @since 15 @@ -2472,7 +2508,7 @@ declare namespace connection { DISABLE = 0, /** * Indicates the action of enable. - * + * * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi * @since 15 @@ -2480,7 +2516,7 @@ declare namespace connection { ENABLE = 1, /** * Indicates the action of query. - * + * * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi * @since 15 @@ -2490,7 +2526,7 @@ declare namespace connection { /** * Describes the control object. - * + * * @enum { number } * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi @@ -2499,7 +2535,7 @@ declare namespace connection { enum ControlObject { /** * Control object of left ear. - * + * * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi * @since 15 @@ -2507,7 +2543,7 @@ declare namespace connection { LEFT_EAR = 0, /** * Control object of right ear. - * + * * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi * @since 15 @@ -2515,7 +2551,7 @@ declare namespace connection { RIGHT_EAR = 1, /** * Control object of left and right ear. - * + * * @syscap SystemCapability.Communication.Bluetooth.Core * @systemapi * @since 15 @@ -2542,7 +2578,7 @@ declare namespace connection { */ trustedPairedDevices: Array; } - + /** * Describes device of cloud pair. * diff --git a/api/@ohos.bluetooth.constant.d.ts b/api/@ohos.bluetooth.constant.d.ts index 5d460b0103a3fc8dd7d08ef5d60ff8878c0d1cdb..acd1baf6cd7f54b8f4373698e3f8ebd07dc5c624 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 { /** @@ -360,11 +361,12 @@ declare namespace constant { /** * The enum of profile connection state. * - * @enum { number } + * @enum { int } * @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, /** @@ -467,10 +471,11 @@ declare namespace constant { /** * The enum of major class of a bluetooth device. * - * @enum { number } + * @enum { int } * @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 } @@ -576,10 +584,11 @@ declare namespace constant { /** * The enum of major minor class of a bluetooth device. * - * @enum { number } + * @enum { int } * @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.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..884b5ed545af112f133749b955704b9332fcd907 100644 --- a/api/@ohos.buffer.d.ts +++ b/api/@ohos.buffer.d.ts @@ -126,6 +126,35 @@ declare namespace buffer { | Float64Array | BigInt64Array | BigUint64Array; + + /** + * ArrayUnionType features and methods + * + * @typedef { Array | Array | Array | Array | Array | Array | + * Array | Array | Array | Array | Array | Array | + * Array | Array | Array} + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + type ArrayUnionType = Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array + | Array; + /** * Allocates a new Buffer for a fixed size bytes. If fill is undefined, the Buffer will be zero-filled. * @@ -158,8 +187,8 @@ declare namespace buffer { /** * Creates and initializes a Buffer instance of the specified length. * - * @param { number } size - Size of the Buffer instance to create, in bytes. - * @param { string | Buffer | number } [fill] - Value to be filled in the buffer. The default value is 0. + * @param { int } size - Size of the Buffer instance to create, in bytes. + * @param { string | Buffer | int | double | long } [fill] - Value to be filled in the buffer. The default value is 0. * @param { BufferEncoding } [encoding] - Encoding format (valid only when fill is a string). The default value is 'utf8'. * @returns { Buffer } Return a new allocated Buffer * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -172,7 +201,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - function alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer; + function alloc(size: int, fill?: string | Buffer | int | double | long, encoding?: BufferEncoding): Buffer; /** * Allocates a new Buffer for a fixed size bytes. The Buffer will not be initially filled. @@ -204,7 +233,7 @@ declare namespace buffer { * Creates a Buffer instance of the specified size from the buffer pool, without initializing it. * You need to use fill() to initialize the Buffer instance created. * - * @param { number } size - Size of the Buffer instance to create, in bytes. + * @param { int } size - Size of the Buffer instance to create, in bytes. * @returns { Buffer } Return a new allocated Buffer * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; @@ -216,7 +245,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - function allocUninitializedFromPool(size: number): Buffer; + function allocUninitializedFromPool(size: int): Buffer; /** * Allocates a new un-pooled Buffer for a fixed size bytes. The Buffer will not be initially filled. @@ -246,7 +275,7 @@ declare namespace buffer { /** * Creates a Buffer instance of the specified size, without initializing it. * - * @param { number } size - Size of the Buffer instance to create, in bytes. + * @param { int } size - Size of the Buffer instance to create, in bytes. * @returns { Buffer } Return a new allocated Buffer * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; @@ -258,7 +287,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - function allocUninitialized(size: number): Buffer; + function allocUninitialized(size: int): Buffer; /** * Returns the byte length of a string when encoded using `encoding`. @@ -313,7 +342,7 @@ declare namespace buffer { * * @param { string | Buffer | TypedArray | DataView | ArrayBuffer } doc - Target string. * @param { BufferEncoding } [encoding] - Encoding format of the string. The default value is 'utf8'. - * @returns { number } The number of bytes contained within `string` + * @returns { int } The number of bytes contained within `string` * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice @@ -323,7 +352,7 @@ declare namespace buffer { function byteLength( doc: string | Buffer | TypedArray | DataView | ArrayBuffer, encoding?: BufferEncoding - ): number; + ): int; /** * Returns a new `Buffer` which is the result of concatenating all the `Buffer`instances in the `list` together. @@ -358,7 +387,7 @@ declare namespace buffer { * Concatenates an array of Buffer instances of the specified length into a new instance. * * @param { Buffer[] | Uint8Array[] } list - Array of instances to concatenate. - * @param { number } [totalLength] - Total length of bytes to be copied. The default value is 0. + * @param { int } [totalLength] - Total length of bytes to be copied. The default value is 0. * @returns { Buffer } Return a new allocated Buffer * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; @@ -371,7 +400,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - function concat(list: Buffer[] | Uint8Array[], totalLength?: number): Buffer; + function concat(list: Buffer[] | Uint8Array[], totalLength?: int): Buffer; /** * Allocates a new Buffer using an array of bytes in the range 0 – 255. Array entries outside that range will be truncated to fit into it. @@ -399,7 +428,7 @@ declare namespace buffer { /** * Creates a Buffer instance with the specified array. * - * @param { number[] } array - Array to create a Buffer instance. + * @param { double[] } array - Array to create a Buffer instance. * @returns { Buffer } Return a new allocated Buffer * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; @@ -407,10 +436,9 @@ declare namespace buffer { * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - function from(array: number[]): Buffer; + function from(array: double[]): Buffer; /** * This creates a view of the ArrayBuffer without copying the underlying memory. @@ -465,23 +493,6 @@ declare namespace buffer { */ function from(arrayBuffer: ArrayBuffer | SharedArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** - * This creates a view of the ArrayBuffer without copying the underlying memory. - * - * @param { ArrayBuffer } arrayBuffer - arrayBuffer arrayBuffer An ArrayBuffer, - * @param { number } [byteOffset] - byteOffset [byteOffset = 0] Index of first byte to expose - * @param { number } [length] - length [length = arrayBuffer.byteLength - byteOffset] Number of bytes to expose - * @returns { Buffer } Return a view of the ArrayBuffer - * @throws { BusinessError } 10200001 - The value of "[byteOffset/length]" is out of range. - * It must be >= [left range] and <= [right range]. Received value is: [byteOffset/length] - * @syscap SystemCapability.Utils.Lang - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - function from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer; - /** * Copies the passed buffer data onto a new Buffer instance. * @@ -516,8 +527,7 @@ declare namespace buffer { * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ function from(buffer: Buffer | Uint8Array): Buffer; @@ -553,8 +563,8 @@ declare namespace buffer { * Creates a Buffer instance based on the specified object. * * @param { Object } object - Object that supports Symbol.toPrimitive or valueOf(). - * @param { number | string } offsetOrEncoding - Byte offset or encoding format. - * @param { number } length - Length of the Buffer instance to create, in bytes. + * @param { int | string } offsetOrEncoding - Byte offset or encoding format. + * @param { int } length - Length of the Buffer instance to create, in bytes. * @returns { Buffer } Return a new allocated Buffer * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; @@ -562,10 +572,9 @@ declare namespace buffer { * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - function from(object: Object, offsetOrEncoding: number | string, length: number): Buffer; + function from(object: Object, offsetOrEncoding: int | string, length: int): Buffer; /** * Creates a new Buffer containing string. The encoding parameter identifies the character encoding @@ -605,11 +614,96 @@ declare namespace buffer { * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ function from(string: String, encoding?: BufferEncoding): Buffer; + /** + * Creates a Buffer instance with the specified array. + * + * @param { double[] } array - Array to create a Buffer instance. + * @returns { Buffer } Return a new allocated Buffer + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + function fromWithArray(array: double[]): Buffer; + + /** + * This creates a view of the ArrayBuffer without copying the underlying memory. + * + * @param { ArrayBuffer } arrayBuffer - arrayBuffer arrayBuffer An ArrayBuffer, + * @param { int } [byteOffset] - byteOffset [byteOffset = 0] Index of first byte to expose + * @param { int } [length] - length [length = arrayBuffer.byteLength - byteOffset] Number of bytes to expose + * @returns { Buffer } Return a view of the ArrayBuffer + * @throws { BusinessError } 10200001 - The value of "[byteOffset/length]" is out of range. + * It must be >= [left range] and <= [right range]. Received value is: [byteOffset/length] + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + function fromWithArrayBufferByteOffsetLength(arrayBuffer: ArrayBuffer, byteOffset?: int, length?: int): Buffer; + + /** + * Copies the data of a passed Buffer instance to create a new Buffer instance and returns the new one. + * + * @param { Buffer | Uint8Array } buffer - Buffer or Uint8Array instance. + * @returns { Buffer } Return a new allocated Buffer + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + function fromWithBuffer(buffer: Buffer | Uint8Array): Buffer; + + /** + * Creates a Buffer instance based on the specified object. + * + * @param { Object } input - Object that supports Symbol.toPrimitive or valueOf(). + * @param { int | string } offsetOrEncoding - Byte offset or encoding format. + * @param { int } length - Length of the Buffer instance to create, in bytes. + * @returns { Buffer } Return a new allocated Buffer + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + function fromWithObjectTypedInputOffsetOrEncodingLength(input: Object, offsetOrEncoding: int | string, length: int): Buffer; + + /** + * Creates a Buffer instance based on various types. + * + * @param { string } input - string. + * @param { BufferEncoding } [encoding] - Encoding format of the string. The default value is 'utf8'. + * @returns { Buffer } Return a new Buffer containing string + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + function fromWithStringTypedInputEncoding(input: string, encoding?: BufferEncoding): Buffer; + + /** + * Creates a Buffer instance based on a string in the given encoding format. + * + * @overload { fromWithArray, fromWithArrayBufferByteOffsetLength, fromWithBuffer, + fromWithObjectTypedInputOffsetOrEncodingLength, fromWithStringTypedInputEncoding } + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + export overload from { fromWithArray, fromWithArrayBufferByteOffsetLength, fromWithBuffer, + fromWithObjectTypedInputOffsetOrEncodingLength, fromWithStringTypedInputEncoding } + /** * Returns true if obj is a Buffer, false otherwise * @@ -722,7 +816,7 @@ declare namespace buffer { * * @param { Buffer | Uint8Array } buf1 - buf1 buf1 A Buffer or Uint8Array instance. * @param { Buffer | Uint8Array } buf2 - buf2 buf2 A Buffer or Uint8Array instance. - * @returns { number } 0 is returned if target is the same as buf + * @returns { int } 0 is returned if target is the same as buf * 1 is returned if target should come before buf when sorted. * -1 is returned if target should come after buf when sorted. * @syscap SystemCapability.Utils.Lang @@ -731,7 +825,7 @@ declare namespace buffer { * @since 20 * @arkts 1.2 */ - function compare(buf1: Buffer | Uint8Array, buf2: Buffer | Uint8Array): number; + function compare(buf1: Buffer | Uint8Array, buf2: Buffer | Uint8Array): int; /** * Re-encodes the given Buffer or Uint8Array instance from one character encoding to another. @@ -834,14 +928,14 @@ declare namespace buffer { /** * Gets the element number of the buffer. * - * @type { number } + * @type { int } * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice * @since 20 * @arkts 1.2 */ - get length(): number; + get length(): int; /** * The underlying ArrayBuffer object based on which this Buffer object is created. @@ -917,7 +1011,7 @@ declare namespace buffer { /** * The byteOffset of the Buffers underlying ArrayBuffer object * - * @type { number } + * @type { int } * @throws { BusinessError } 10200013 - ByteOffset cannot be set for the buffer that has only a getter. * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -925,7 +1019,7 @@ declare namespace buffer { * @since 20 * @arkts 1.2 */ - get byteOffset(): number; + get byteOffset(): int; /** * Fills buf with the specified value. If the offset and end are not given, the entire buf will be filled. @@ -961,9 +1055,9 @@ declare namespace buffer { /** * Fills this Buffer instance at the specified position. By default, data is filled cyclically. * - * @param { string | Buffer | Uint8Array | number } value - Value to fill. - * @param { number } [offset] - Offset to the start position in this Buffer instance where data is filled. The default value is 0. - * @param { number } [end] - Offset to the end position in this Buffer instance (not inclusive). The default value is the length of this Buffer instance. + * @param { string | Buffer | Uint8Array | int | double | long } value - Value to fill. + * @param { int } [offset] - Offset to the start position in this Buffer instance where data is filled. The default value is 0. + * @param { int } [end] - Offset to the end position in this Buffer instance (not inclusive). The default value is the length of this Buffer instance. * @param { BufferEncoding } [encoding] - Encoding format (valid only when value is a string). The default value is 'utf8'. * @returns { Buffer } A reference to buf * @throws { BusinessError } 10200001 - The value of "[offset/end]" is out of range. It must be >= 0 and <= [right range]. Received value is: [offset/end] @@ -977,9 +1071,9 @@ declare namespace buffer { * @arkts 1.1&1.2 */ fill( - value: string | Buffer | Uint8Array | number, - offset?: number, - end?: number, + value: string | Buffer | Uint8Array | int | double | long, + offset?: int, + end?: int, encoding?: BufferEncoding ): Buffer; @@ -1059,11 +1153,11 @@ declare namespace buffer { * or is the same as target in sort order. Comparison is based on the actual sequence of bytes in each Buffer. * * @param { Buffer | Uint8Array } target - target target A Buffer or Uint8Array with which to compare buf - * @param { number } [targetStart] - targetStart [targetStart = 0] The offset within target at which to begin comparison - * @param { number } [targetEnd] - targetEnd [targetEnd = target.length] The offset within target at which to end comparison (not inclusive) - * @param { number } [sourceStart] - sourceStart [sourceStart = 0] The offset within buf at which to begin comparison - * @param { number } [sourceEnd] - sourceEnd [sourceEnd = buf.length] The offset within buf at which to end comparison (not inclusive) - * @returns { number } number is returned if target is the same as buf + * @param { int } [targetStart] - targetStart [targetStart = 0] The offset within target at which to begin comparison + * @param { int } [targetEnd] - targetEnd [targetEnd = target.length] The offset within target at which to end comparison (not inclusive) + * @param { int } [sourceStart] - sourceStart [sourceStart = 0] The offset within buf at which to begin comparison + * @param { int } [sourceEnd] - sourceEnd [sourceEnd = buf.length] The offset within buf at which to end comparison (not inclusive) + * @returns { int } number is returned if target is the same as buf * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -1077,11 +1171,11 @@ declare namespace buffer { */ compare( target: Buffer | Uint8Array, - targetStart?: number, - targetEnd?: number, - sourceStart?: number, - sourceEnd?: number - ): number; + targetStart?: int, + targetEnd?: int, + sourceStart?: int, + sourceEnd?: int + ): int; /** * Copies data from a region of buf to a region in target, even if the target memory region overlaps with buf. @@ -1122,11 +1216,11 @@ declare namespace buffer { * Copies data at the specified position in this Buffer instance to the specified position in another Buffer instance. * * @param { Buffer | Uint8Array } target - Instance to which data is copied. - * @param { number } [targetStart] - Offset to the start position in the target instance where data is copied. The default value is 0. - * @param { number } [sourceStart] - Offset to the start position in this Buffer instance where data is copied. The default value is 0. - * @param { number } [sourceEnd] - Offset to the end position in this Buffer instance (not inclusive). + * @param { int } [targetStart] - Offset to the start position in the target instance where data is copied. The default value is 0. + * @param { int } [sourceStart] - Offset to the start position in this Buffer instance where data is copied. The default value is 0. + * @param { int } [sourceEnd] - Offset to the end position in this Buffer instance (not inclusive). * The default value is the length of this Buffer instance. - * @returns { number } The number of bytes copied + * @returns { int } The number of bytes copied * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -1138,7 +1232,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - copy(target: Buffer | Uint8Array, targetStart?: number, sourceStart?: number, sourceEnd?: number): number; + copy(target: Buffer | Uint8Array, targetStart?: int, sourceStart?: int, sourceEnd?: int): int; /** * Returns true if both buf and otherBuffer have exactly the same bytes, false otherwise @@ -1205,8 +1299,8 @@ declare namespace buffer { /** * Checks whether this Buffer instance contains the specified value. * - * @param { string | number | Buffer | Uint8Array } value - Value to match. - * @param { number } [byteOffset] - Number of bytes to skip before starting to check data. + * @param { string | int | double | long | Buffer | Uint8Array } value - Value to match. + * @param { int } [byteOffset] - Number of bytes to skip before starting to check data. * Number of bytes to skip before starting to check data. If the offset is a negative number, * data is checked from the end of the Buffer instance. The default value is 0. * @param { BufferEncoding } [encoding] - Encoding format (valid only when value is a string). The default value is 'utf8'. @@ -1220,7 +1314,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - includes(value: string | number | Buffer | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): boolean; + includes(value: string | int | double | long | Buffer | Uint8Array, byteOffset?: int, encoding?: BufferEncoding): boolean; /** * The index of the first occurrence of value in buf @@ -1254,11 +1348,11 @@ declare namespace buffer { /** * Obtains the index of the first occurrence of the specified value in this Buffer instance. * - * @param { string | number | Buffer | Uint8Array } value - Value to match. - * @param { number } [byteOffset] - Number of bytes to skip before starting to check data. + * @param { string | int | double | long | Buffer | Uint8Array } value - Value to match. + * @param { int } [byteOffset] - Number of bytes to skip before starting to check data. * If the offset is a negative number, data is checked from the end of the Buffer instance. The default value is 0. * @param { BufferEncoding } [encoding] - Encoding format (valid only when value is a string). The default value is 'utf8'. - * @returns { number } The index of the first occurrence of value in buf, or -1 if buf does not contain value + * @returns { int } The index of the first occurrence of value in buf, or -1 if buf does not contain value * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -1268,7 +1362,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - indexOf(value: string | number | Buffer | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + indexOf(value: string | int | double | long | Buffer | Uint8Array, byteOffset?: int, encoding?: BufferEncoding): int; /** * Creates and returns an iterator of buf keys (indices). @@ -1288,14 +1382,14 @@ declare namespace buffer { /** * Creates and returns an iterator that contains the keys of this Buffer instance. * - * @returns { IterableIterator } + * @returns { IterableIterator } * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - keys(): IterableIterator; + keys(): IterableIterator; /** * Creates and returns an iterator for buf values (bytes). @@ -1315,14 +1409,14 @@ declare namespace buffer { /** * Creates and returns an iterator that contains the values of this Buffer instance. * - * @returns { IterableIterator } + * @returns { IterableIterator } * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - values(): IterableIterator; + values(): IterableIterator; /** * Creates and returns an iterator of [index, byte] pairs from the contents of buf. @@ -1342,14 +1436,14 @@ declare namespace buffer { /** * Creates and returns an iterator that contains key-value pairs of this Buffer instance. * - * @returns { IterableIterator<[number, number]> } + * @returns { IterableIterator<[int, long]> } * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - entries(): IterableIterator<[number, number]>; + entries(): IterableIterator<[int, long]>; /** * The index of the last occurrence of value in buf @@ -1385,12 +1479,12 @@ declare namespace buffer { /** * Obtains the index of the last occurrence of the specified value in this Buffer instance. * - * @param { string | number | Buffer | Uint8Array } value - Value to match. - * @param { number } [byteOffset] - Number of bytes to skip before starting to check data. + * @param { string | int | double | long | Buffer | Uint8Array } value - Value to match. + * @param { int } [byteOffset] - Number of bytes to skip before starting to check data. * If the offset is a negative number, data is checked from the end of the Buffer instance. * The default value is the length of this Buffer instance. * @param { BufferEncoding } [encoding] - Encoding format (valid only when value is a string). The default value is 'utf8'. - * @returns { number } The index of the last occurrence of value in buf, or -1 if buf does not contain value + * @returns { int } The index of the last occurrence of value in buf, or -1 if buf does not contain value * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -1400,7 +1494,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - lastIndexOf(value: string | number | Buffer | Uint8Array, byteOffset?: number, encoding?: BufferEncoding): number; + lastIndexOf(value: string | int | double | long | Buffer | Uint8Array, byteOffset?: int, encoding?: BufferEncoding): int; /** * Reads a signed, big-endian 64-bit integer from buf at the specified offset @@ -1426,7 +1520,7 @@ declare namespace buffer { /** * Reads a 64-bit, big-endian, signed big integer from this Buffer instance at the specified offset. * - * @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 - 8]. + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 8]. * @returns { bigint } Return a signed, big-endian 64-bit integer * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset] @@ -1436,7 +1530,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readBigInt64BE(offset?: number): bigint; + readBigInt64BE(offset?: int): bigint; /** * Reads a signed, little-endian 64-bit integer from buf at the specified offset @@ -1462,7 +1556,7 @@ declare namespace buffer { /** * Reads a 64-bit, little-endian, signed big integer from this Buffer instance at the specified offset. * - * @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 - 8]. + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 8]. * @returns { bigint } Return a signed, little-endian 64-bit integer * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset] @@ -1472,7 +1566,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readBigInt64LE(offset?: number): bigint; + readBigInt64LE(offset?: int): bigint; /** * Reads a unsigned, big-endian 64-bit integer from buf at the specified offset @@ -1498,7 +1592,7 @@ declare namespace buffer { /** * Reads a 64-bit, big-endian, unsigned big integer from this Buffer instance at the specified offset. * - * @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 - 8]. + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 8]. * @returns { bigint } Return a unsigned, big-endian 64-bit integer * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset] @@ -1508,7 +1602,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readBigUInt64BE(offset?: number): bigint; + readBigUInt64BE(offset?: int): bigint; /** * Reads a unsigned, little-endian 64-bit integer from buf at the specified offset @@ -1534,7 +1628,7 @@ declare namespace buffer { /** * Reads a 64-bit, little-endian, unsigned big integer from this Buffer instance at the specified offset. * - * @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 - 8]. + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 8]. * @returns { bigint } Return a unsigned, little-endian 64-bit integer * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset] @@ -1544,7 +1638,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readBigUInt64LE(offset?: number): bigint; + readBigUInt64LE(offset?: int): bigint; /** * Reads a 64-bit, big-endian double from buf at the specified offset @@ -1570,8 +1664,8 @@ declare namespace buffer { /** * Reads a 64-bit, big-endian, double-precision floating-point number from this Buffer instance at the specified offset. * - * @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 - 8]. - * @returns { number } Return a 64-bit, big-endian double + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 8]. + * @returns { double } Return a 64-bit, big-endian double * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset] * @syscap SystemCapability.Utils.Lang @@ -1580,7 +1674,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readDoubleBE(offset?: number): number; + readDoubleBE(offset?: int): double; /** * Reads a 64-bit, little-endian double from buf at the specified offset @@ -1606,8 +1700,8 @@ declare namespace buffer { /** * Reads a 64-bit, little-endian, double-precision floating-point number from this Buffer instance at the specified offset. * - * @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 - 8]. - * @returns { number } Return a 64-bit, little-endian double + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 8]. + * @returns { double } Return a 64-bit, little-endian double * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 8. Received value is: [offset] * @syscap SystemCapability.Utils.Lang @@ -1616,7 +1710,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readDoubleLE(offset?: number): number; + readDoubleLE(offset?: int): double; /** * Reads a 32-bit, big-endian float from buf at the specified offset @@ -1642,8 +1736,8 @@ declare namespace buffer { /** * Reads a 32-bit, big-endian, single-precision floating-point number from this Buffer instance at the specified offset. * - * @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 - 4]. - * @returns { number } Return a 32-bit, big-endian float + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 4]. + * @returns { double } Return a 32-bit, big-endian float * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset] * @syscap SystemCapability.Utils.Lang @@ -1652,7 +1746,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readFloatBE(offset?: number): number; + readFloatBE(offset?: int): double; /** * Reads a 32-bit, little-endian float from buf at the specified offset @@ -1678,8 +1772,8 @@ declare namespace buffer { /** * Reads a 32-bit, little-endian, single-precision floating-point number from this Buffer instance at the specified offset. * - * @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 - 4]. - * @returns { number } Return a 32-bit, little-endian float + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 4]. + * @returns { double } Return a 32-bit, little-endian float * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset] * @syscap SystemCapability.Utils.Lang @@ -1688,7 +1782,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readFloatLE(offset?: number): number; + readFloatLE(offset?: int): double; /** * Reads a signed 8-bit integer from buf at the specified offset @@ -1714,8 +1808,8 @@ declare namespace buffer { /** * Reads an 8-bit signed integer from this Buffer instance at the specified offset. * - * @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 - 1]. - * @returns { number } Return a signed 8-bit integer + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 1]. + * @returns { long } Return a signed 8-bit integer * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 1. Received value is: [offset] * @syscap SystemCapability.Utils.Lang @@ -1724,7 +1818,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readInt8(offset?: number): number; + readInt8(offset?: int): long; /** * Reads a signed, big-endian 16-bit integer from buf at the specified offset @@ -1750,8 +1844,8 @@ declare namespace buffer { /** * Reads a 16-bit, big-endian, signed integer from this Buffer instance at the specified offset. * - * @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 - 2]. - * @returns { number } Return a signed, big-endian 16-bit integer + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 2]. + * @returns { long } Return a signed, big-endian 16-bit integer * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset] * @syscap SystemCapability.Utils.Lang @@ -1760,7 +1854,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readInt16BE(offset?: number): number; + readInt16BE(offset?: int): long; /** * Reads a signed, little-endian 16-bit integer from buf at the specified offset @@ -1786,8 +1880,8 @@ declare namespace buffer { /** * Reads a 16-bit, little-endian, signed integer from this Buffer instance at the specified offset. * - * @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 - 2]. - * @returns { number } Return a signed, little-endian 16-bit integer + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 2]. + * @returns { long } Return a signed, little-endian 16-bit integer * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset] * @syscap SystemCapability.Utils.Lang @@ -1796,7 +1890,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readInt16LE(offset?: number): number; + readInt16LE(offset?: int): long; /** * Reads a signed, big-endian 32-bit integer from buf at the specified offset @@ -1822,8 +1916,8 @@ declare namespace buffer { /** * Reads a 32-bit, big-endian, signed integer from this Buffer instance at the specified offset. * - * @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 - 4]. - * @returns { number } Return a signed, big-endian 32-bit integer + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 4]. + * @returns { long } Return a signed, big-endian 32-bit integer * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset] * @syscap SystemCapability.Utils.Lang @@ -1832,7 +1926,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readInt32BE(offset?: number): number; + readInt32BE(offset?: int): long; /** * Reads a signed, little-endian 32-bit integer from buf at the specified offset @@ -1858,8 +1952,8 @@ declare namespace buffer { /** * Reads a 32-bit, little-endian, signed integer from this Buffer instance at the specified offset. * - * @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 - 4]. - * @returns { number } Return a signed, little-endian 32-bit integer + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 4]. + * @returns { long } Return a signed, little-endian 32-bit integer * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset] * @syscap SystemCapability.Utils.Lang @@ -1868,7 +1962,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readInt32LE(offset?: number): number; + readInt32LE(offset?: int): long; /** * Reads byteLength number of bytes from buf at the specified offset and interprets the result as a big-endian, @@ -1903,9 +1997,9 @@ 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 } byteLength - Number of bytes to read. The value range is [1, 6]. - * @returns { number } + * @param { int } 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 { int } byteLength - Number of bytes to read. The value range is [1, 6]. + * @returns { long } * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -1916,7 +2010,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readIntBE(offset: number, byteLength: number): number; + readIntBE(offset: int, byteLength: int): long; /** * Reads byteLength number of bytes from buf at the specified offset and interprets the result as a little-endian, @@ -1951,9 +2045,9 @@ 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 } byteLength - Number of bytes to read. The value range is [1, 6]. - * @returns { number } + * @param { int } 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 { int } byteLength - Number of bytes to read. The value range is [1, 6]. + * @returns { long } * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -1964,7 +2058,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readIntLE(offset: number, byteLength: number): number; + readIntLE(offset: int, byteLength: int): long; /** * Reads an unsigned 8-bit integer from buf at the specified offset @@ -1990,8 +2084,8 @@ declare namespace buffer { /** * Reads an 8-bit unsigned integer from this Buffer instance at the specified offset. * - * @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 - 1]. - * @returns { number } Reads an unsigned 8-bit integer + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 1]. + * @returns { long } Reads an unsigned 8-bit integer * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 1. Received value is: [offset] * @syscap SystemCapability.Utils.Lang @@ -2000,7 +2094,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readUInt8(offset?: number): number; + readUInt8(offset?: int): long; /** * Reads an unsigned, big-endian 16-bit integer from buf at the specified offset @@ -2026,8 +2120,8 @@ declare namespace buffer { /** * Reads a 16-bit, big-endian, unsigned integer from this Buffer instance at the specified offset. * - * @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 - 2]. - * @returns { number } Reads an unsigned, big-endian 16-bit integer + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 2]. + * @returns { long } Reads an unsigned, big-endian 16-bit integer * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset] * @syscap SystemCapability.Utils.Lang @@ -2036,7 +2130,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readUInt16BE(offset?: number): number; + readUInt16BE(offset?: int): long; /** * Reads an unsigned, little-endian 16-bit integer from buf at the specified offset @@ -2062,8 +2156,8 @@ declare namespace buffer { /** * Reads a 16-bit, little-endian, unsigned integer from this Buffer instance at the specified offset. * - * @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 - 2]. - * @returns { number } Reads an unsigned, little-endian 16-bit integer + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 2]. + * @returns { long } Reads an unsigned, little-endian 16-bit integer * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 2. Received value is: [offset] * @syscap SystemCapability.Utils.Lang @@ -2072,7 +2166,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readUInt16LE(offset?: number): number; + readUInt16LE(offset?: int): long; /** * Reads an unsigned, big-endian 32-bit integer from buf at the specified offset @@ -2098,8 +2192,8 @@ declare namespace buffer { /** * Reads a 32-bit, big-endian, unsigned integer from this Buffer instance at the specified offset. * - * @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 - 4]. - * @returns { number } Reads an unsigned, big-endian 32-bit integer + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 4]. + * @returns { long } Reads an unsigned, big-endian 32-bit integer * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset] * @syscap SystemCapability.Utils.Lang @@ -2108,7 +2202,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readUInt32BE(offset?: number): number; + readUInt32BE(offset?: int): long; /** * Reads an unsigned, little-endian 32-bit integer from buf at the specified offset @@ -2134,8 +2228,8 @@ declare namespace buffer { /** * Reads a 32-bit, little-endian, unsigned integer from this Buffer instance at the specified offset. * - * @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 - 4]. - * @returns { number } Reads an unsigned, little-endian 32-bit integer + * @param { int } [offset] - Number of bytes to skip before starting to read data. The default value is 0. The value range is [0, Buffer.length - 4]. + * @returns { long } Reads an unsigned, little-endian 32-bit integer * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Incorrect parameter types. * @throws { BusinessError } 10200001 - The value of "offset" is out of range. It must be >= 0 and <= buf.length - 4. Received value is: [offset] * @syscap SystemCapability.Utils.Lang @@ -2144,7 +2238,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readUInt32LE(offset?: number): number; + readUInt32LE(offset?: int): long; /** * Reads byteLength number of bytes from buf at the specified offset and interprets the result as @@ -2179,9 +2273,9 @@ 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 } byteLength - Number of bytes to read. The value range is [1, 6]. - * @returns { number } + * @param { int } 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 { int } byteLength - Number of bytes to read. The value range is [1, 6]. + * @returns { long } * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -2192,7 +2286,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readUIntBE(offset: number, byteLength: number): number; + readUIntBE(offset: int, byteLength: int): long; /** * Reads byteLength number of bytes from buf at the specified offset and interprets the result as an unsigned, @@ -2227,9 +2321,9 @@ 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 } byteLength - Number of bytes to read. The value range is [1, 6]. - * @returns { number } + * @param { int } 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 { int } byteLength - Number of bytes to read. The value range is [1, 6]. + * @returns { long } * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -2240,7 +2334,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - readUIntLE(offset: number, byteLength: number): number; + readUIntLE(offset: int, byteLength: int): long; /** * Returns a new Buffer that references the same memory as the original, but offset and cropped by the start and end indices. @@ -2264,8 +2358,8 @@ declare namespace buffer { /** * Truncates this Buffer instance from the specified position to create a new Buffer instance. * - * @param { number } [start] - Offset to the start position in this Buffer instance where data is truncated. The default value is 0. - * @param { number } [end] - Offset to the end position in this Buffer instance (not inclusive). The default value is the length of this Buffer instance. + * @param { int } [start] - Offset to the start position in this Buffer instance where data is truncated. The default value is 0. + * @param { int } [end] - Offset to the end position in this Buffer instance (not inclusive). The default value is the length of this Buffer instance. * @returns { Buffer } Returns a new Buffer that references the same memory as the original * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -2273,7 +2367,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - subarray(start?: number, end?: number): Buffer; + subarray(start?: int, end?: int): Buffer; /** * Interprets buf as an array of unsigned 16-bit integers and swaps the byte order in-place. @@ -2390,6 +2484,18 @@ declare namespace buffer { * @since 11 */ toJSON(): Object; + + /** + * Converts this Buffer instance into a JsonElement. + * + * @returns { jsonx.JsonElement } A new JsonElement containing the Buffer + * @syscap SystemCapability.Utils.Lang + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + toJSON(): jsonx.JsonElement; /** * Decodes buf to a string according to the specified character encoding in encoding @@ -2433,8 +2539,8 @@ declare namespace buffer { * Decodes buf to a string according to the specified character encoding in encoding * * @param { BufferEncoding } [encoding] - encoding [encoding='utf8'] The character encoding to use - * @param { number } [start] - start [start = 0] The byte offset to start decoding at - * @param { number } [end] - end [end = buf.length] The byte offset to stop decoding at (not inclusive) + * @param { int } [start] - start [start = 0] The byte offset to start decoding at + * @param { int } [end] - end [end = buf.length] The byte offset to stop decoding at (not inclusive) * @returns { string } * @syscap SystemCapability.Utils.Lang * @crossplatform @@ -2442,7 +2548,7 @@ declare namespace buffer { * @since 20 * @arkts 1.2 */ - toString(encoding?: BufferEncoding, start?: number, end?: number): string; + toString(encoding?: BufferEncoding, start?: int, end?: int): string; /** * Writes string to buf at offset according to the character encoding in encoding @@ -2479,10 +2585,10 @@ declare namespace buffer { * Writes a string of the specified length to this Buffer instance at the specified position in the given encoding format. * * @param { string } str - String to write. - * @param { number } [offset] - Number of bytes to skip before starting to write data. The default value is 0. - * @param { number } [length] - Maximum number of bytes to write. The default value is Buffer.length minus offset. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. + * @param { int } [length] - Maximum number of bytes to write. The default value is Buffer.length minus offset. * @param { string } [encoding] - Encoding format of the string. The default value is 'utf8'. - * @returns { number } Number of bytes written. + * @returns { int } Number of bytes written. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -2493,7 +2599,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - write(str: string, offset?: number, length?: number, encoding?: string): number; + write(str: string, offset?: int, length?: int, encoding?: string): int; /** * Writes value to buf at the specified offset as big-endian. @@ -2527,8 +2633,8 @@ declare namespace buffer { * Writes a 64-bit, big-endian, signed big integer to this Buffer instance at the specified offset. * * @param { bigint } 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 - 8]. - * @returns { number } offset plus the number of bytes written + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 8]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -2540,7 +2646,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeBigInt64BE(value: bigint, offset?: number): number; + writeBigInt64BE(value: bigint, offset?: int): int; /** * Writes value to buf at the specified offset as little-endian. @@ -2575,8 +2681,8 @@ declare namespace buffer { * Writes a 64-bit, little-endian, signed big integer to this Buffer instance at the specified offset. * * @param { bigint } 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 - 8]. - * @returns { number } offset plus the number of bytes written + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 8]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -2588,7 +2694,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeBigInt64LE(value: bigint, offset?: number): number; + writeBigInt64LE(value: bigint, offset?: int): int; /** * Writes value to buf at the specified offset as big-endian. @@ -2623,8 +2729,8 @@ declare namespace buffer { * Writes a 64-bit, big-endian, unsigned big integer to this Buffer instance at the specified offset. * * @param { bigint } 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 - 8]. - * @returns { number } offset plus the number of bytes written + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 8]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -2636,7 +2742,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeBigUInt64BE(value: bigint, offset?: number): number; + writeBigUInt64BE(value: bigint, offset?: int): int; /** * Writes value to buf at the specified offset as little-endian. @@ -2671,8 +2777,8 @@ declare namespace buffer { * Writes a 64-bit, little-endian, unsigned big integer to this Buffer instance at the specified offset. * * @param { bigint } 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 - 8]. - * @returns { number } offset plus the number of bytes written + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 8]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -2684,7 +2790,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeBigUInt64LE(value: bigint, offset?: number): number; + writeBigUInt64LE(value: bigint, offset?: int): int; /** * Writes value to buf at the specified offset as big-endian. @@ -2716,9 +2822,9 @@ declare namespace buffer { /** * Writes a 64-bit, big-endian, double-precision floating-point number 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 - 8]. - * @returns { number } offset plus the number of bytes written + * @param { double } value - Data to write. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 8]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -2729,7 +2835,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeDoubleBE(value: number, offset?: number): number; + writeDoubleBE(value: double, offset?: int): int; /** * Writes value to buf at the specified offset as little-endian. @@ -2761,9 +2867,9 @@ declare namespace buffer { /** * Writes a 64-bit, little-endian, double-precision floating-point number 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 - 8]. - * @returns { number } offset plus the number of bytes written + * @param { double } value - Data to write. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 8]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -2774,7 +2880,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeDoubleLE(value: number, offset?: number): number; + writeDoubleLE(value: double, offset?: int): int; /** * Writes value to buf at the specified offset as big-endian. @@ -2806,9 +2912,9 @@ declare namespace buffer { /** * Writes a 32-bit, big-endian, single-precision floating-point number 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 - 4]. - * @returns { number } offset plus the number of bytes written + * @param { double } value - Data to write. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 4]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -2819,7 +2925,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeFloatBE(value: number, offset?: number): number; + writeFloatBE(value: double, offset?: int): int; /** * Writes value to buf at the specified offset as little-endian. @@ -2851,9 +2957,9 @@ declare namespace buffer { /** * Writes a 32-bit, little-endian, single-precision floating-point number 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 - 4]. - * @returns { number } offset plus the number of bytes written + * @param { double } value - Data to write. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 4]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -2864,7 +2970,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeFloatLE(value: number, offset?: number): number; + writeFloatLE(value: double, offset?: int): int; /** * Writes value to buf at the specified offset. value must be a valid signed 8-bit integer. @@ -2898,9 +3004,9 @@ declare namespace buffer { /** * Writes an 8-bit signed integer 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 - 1]. - * @returns { number } offset plus the number of bytes written + * @param { long } value - Data to write. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 1]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -2912,7 +3018,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeInt8(value: number, offset?: number): number; + writeInt8(value: long, offset?: int): int; /** * Writes value to buf at the specified offset as big-endian. The value must be a valid signed 16-bit integer @@ -2946,9 +3052,9 @@ declare namespace buffer { /** * Writes a 16-bit, big-endian, signed integer 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 - 2]. - * @returns { number } offset plus the number of bytes written + * @param { long } value - Data to write. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 2]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -2960,7 +3066,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeInt16BE(value: number, offset?: number): number; + writeInt16BE(value: long, offset?: int): int; /** * Writes value to buf at the specified offset as little-endian. The value must be a valid signed 16-bit integer @@ -2994,9 +3100,9 @@ declare namespace buffer { /** * Writes a 16-bit, little-endian, signed integer 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 - 2]. - * @returns { number } offset plus the number of bytes written + * @param { long } value - Data to write. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 2]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -3008,7 +3114,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeInt16LE(value: number, offset?: number): number; + writeInt16LE(value: long, offset?: int): int; /** * Writes value to buf at the specified offset as big-endian. The value must be a valid signed 32-bit integer. @@ -3042,9 +3148,9 @@ declare namespace buffer { /** * Writes a 32-bit, big-endian, signed integer 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 - 4]. - * @returns { number } offset plus the number of bytes written + * @param { long } value - Data to write. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 4]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -3056,7 +3162,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeInt32BE(value: number, offset?: number): number; + writeInt32BE(value: long, offset?: int): int; /** * Writes value to buf at the specified offset as little-endian. The value must be a valid signed 32-bit integer. @@ -3090,9 +3196,9 @@ declare namespace buffer { /** * Writes a 32-bit, little-endian, signed integer 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 - 4]. - * @returns { number } offset plus the number of bytes written + * @param { long } value - Data to write. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 4]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -3104,7 +3210,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeInt32LE(value: number, offset?: number): number; + writeInt32LE(value: long, offset?: int): int; /** * Writes byteLength bytes of value to buf at the specified offset as big-endian @@ -3138,10 +3244,11 @@ 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 } byteLength - Number of bytes to write. - * @returns { number } offset plus the number of bytes written + * @param { long } value - Data to write. + * @param { int } 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 { int } byteLength - Number of bytes to write. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -3152,7 +3259,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeIntBE(value: number, offset: number, byteLength: number): number; + writeIntBE(value: long, offset: int, byteLength: int): int; /** * Writes byteLength bytes of value to buf at the specified offset as little-endian @@ -3186,10 +3293,11 @@ 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 } byteLength - Number of bytes to write. - * @returns { number } offset plus the number of bytes written + * @param { long } value - Data to write. + * @param { int } 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 { int } byteLength - Number of bytes to write. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -3200,7 +3308,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeIntLE(value: number, offset: number, byteLength: number): number; + writeIntLE(value: long, offset: int, byteLength: int): int; /** * Writes value to buf at the specified offset. value must be a valid unsigned 8-bit integer @@ -3234,9 +3342,9 @@ declare namespace buffer { /** * Writes an 8-bit unsigned integer 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 - 1]. - * @returns { number } offset plus the number of bytes written + * @param { long } value - Data to write. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 1]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -3248,7 +3356,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeUInt8(value: number, offset?: number): number; + writeUInt8(value: long, offset?: int): int; /** * Writes value to buf at the specified offset as big-endian. The value must be a valid unsigned 16-bit integer. @@ -3282,9 +3390,9 @@ declare namespace buffer { /** * Writes a 16-bit, big-endian, unsigned integer 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 - 2]. - * @returns { number } offset plus the number of bytes written + * @param { long } value - Data to write. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 2]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -3296,7 +3404,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeUInt16BE(value: number, offset?: number): number; + writeUInt16BE(value: long, offset?: int): int; /** * Writes value to buf at the specified offset as little-endian. The value must be a valid unsigned 16-bit integer. @@ -3330,9 +3438,9 @@ declare namespace buffer { /** * Writes a 16-bit, little-endian, unsigned integer 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 - 2]. - * @returns { number } offset plus the number of bytes written + * @param { long } value - Data to write. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 2]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -3344,7 +3452,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeUInt16LE(value: number, offset?: number): number; + writeUInt16LE(value: long, offset?: int): int; /** * Writes value to buf at the specified offset as big-endian. The value must be a valid unsigned 32-bit integer. @@ -3378,9 +3486,9 @@ declare namespace buffer { /** * Writes a 32-bit, big-endian, unsigned integer 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 - 4]. - * @returns { number } offset plus the number of bytes written + * @param { long } value - Data to write. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 4]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -3392,7 +3500,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeUInt32BE(value: number, offset?: number): number; + writeUInt32BE(value: long, offset?: int): int; /** * Writes value to buf at the specified offset as little-endian. The value must be a valid unsigned 32-bit integer. @@ -3426,9 +3534,9 @@ declare namespace buffer { /** * Writes a 32-bit, little-endian, unsigned integer 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 - 4]. - * @returns { number } offset plus the number of bytes written + * @param { long } value - Data to write. + * @param { int } [offset] - Number of bytes to skip before starting to write data. The default value is 0. The value range is [0, Buffer.length - 4]. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types; @@ -3440,7 +3548,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeUInt32LE(value: number, offset?: number): number; + writeUInt32LE(value: long, offset?: int): int; /** * Writes byteLength bytes of value to buf at the specified offset as big-endian @@ -3474,10 +3582,11 @@ 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 } byteLength - Number of bytes to write. - * @returns { number } offset plus the number of bytes written + * @param { long } value - Data to write. + * @param { int } 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 { int } byteLength - Number of bytes to write. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -3488,7 +3597,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeUIntBE(value: number, offset: number, byteLength: number): number; + writeUIntBE(value: long, offset: int, byteLength: int): int; /** * Writes byteLength bytes of value to buf at the specified offset as little-endian @@ -3522,10 +3631,11 @@ 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 } byteLength - Number of bytes to write. - * @returns { number } offset plus the number of bytes written + * @param { long } value - Data to write. + * @param { int } 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 { int } byteLength - Number of bytes to write. + * @returns { int } offset plus the number of bytes written * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -3536,33 +3646,22 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - writeUIntLE(value: number, offset: number, byteLength: number): number; + writeUIntLE(value: long, offset: int, byteLength: int): int; /** - * Returns the byte at the specified index. + * Returns the item at that index. * - * @param { number } index - byte index to read - * @returns { number | undefined } Returns the byte value at `index` + * @param { int } index - The zero-based index of the desired code unit. + * Throws error if index < 0 or index >= buffer.length. + * @returns { long } The element in the buffer matching the given index. + * @throws { BusinessError } 10200001 - The value of index is out of range. * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice * @since 20 * @arkts 1.2 */ - $_get(index: number): number | undefined; - - /** - * Sets the byte at the specified index. - * - * @param { number } index – byte index to write - * @param { number } value – byte value (0–255) - * @syscap SystemCapability.Utils.Lang - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - $_set(index: number, value: number): void; + [index: int]: long; } /** @@ -3672,21 +3771,17 @@ declare namespace buffer { /** * Creates a new Blob object containing a concatenation of the given sources. * - * @param { Array | Array | Array | Array | Array } sources - sources sources An array of string, , - * , , or objects, or any mix of such objects, that will be stored within the Blob + * @param { ArrayUnionType } sources - sources sources ArrayUnionType * @param { BlobOptions } [options] - options options {endings: string, type: string} * endings: One of either 'transparent' or 'native'. * type: The Blob content-type - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1.Mandatory parameters are left unspecified; - * 2.Incorrect parameter types. * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice * @since 20 * @arkts 1.2 */ - constructor(sources: Array | Array | Array | Array | Array, options?: BlobOptions); + constructor(sources: ArrayUnionType, options?: BlobOptions); /** * The total size of the Blob in bytes @@ -3706,14 +3801,14 @@ declare namespace buffer { /** * Total size of the Blob instance, in bytes. * - * @type { number } + * @type { int } * @syscap SystemCapability.Utils.Lang * @crossplatform * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - size: number; + get size(): int; /** * The content-type of the Blob @@ -3740,7 +3835,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - type: string; + get type(): string; /** * Returns a promise that fulfills with an containing a copy of the Blob data. @@ -3793,8 +3888,8 @@ declare namespace buffer { /** * Creates a Blob instance by copying specified data from this Blob instance. * - * @param { number } [start] - Offset to the start position of the data to copy. The default value is 0. - * @param { number } [end] - Offset to the end position of the data to copy. The default value is the data length in the original Blob instance. + * @param { int } [start] - Offset to the start position of the data to copy. The default value is 0. + * @param { int } [end] - Offset to the end position of the data to copy. The default value is the data length in the original Blob instance. * @param { string } [type] - Type of the data in the new Blob instance. The default value is ''. * @returns { Blob } * @syscap SystemCapability.Utils.Lang @@ -3803,7 +3898,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - slice(start?: number, end?: number, type?: string): Blob; + slice(start?: int, end?: int, type?: string): Blob; /** * Returns a promise that fulfills with the contents of the Blob decoded as a UTF-8 string. diff --git a/api/@ohos.bundle.appControl.d.ts b/api/@ohos.bundle.appControl.d.ts index d57d3694f7e01d75f06f4af04b4d85ceeb154f94..66ab0dc4ac569fdc19794d055a0fd7a1152097e6 100644 --- a/api/@ohos.bundle.appControl.d.ts +++ b/api/@ohos.bundle.appControl.d.ts @@ -19,7 +19,12 @@ */ import { AsyncCallback } from './@ohos.base'; +/*** if arkts 1.1 */ import type { ElementName } from './bundleManager/ElementName'; +/*** endif */ +/*** if arkts 1.2 */ +import { ElementName } from './bundleManager/ElementName'; +/*** endif */ import Want from './@ohos.app.ability.Want'; /** @@ -28,16 +33,18 @@ import Want from './@ohos.app.ability.Want'; * @namespace appControl * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace appControl { /** * Indicates the ability component type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum ComponentType { /** @@ -45,7 +52,8 @@ declare namespace appControl { * * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UI_ABILITY = 1, @@ -54,7 +62,8 @@ declare namespace appControl { * * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UI_EXTENSION = 2 } @@ -62,10 +71,11 @@ declare namespace appControl { /** * Indicates the ability component type when uninstalled. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum UninstallComponentType { /** @@ -73,7 +83,8 @@ declare namespace appControl { * * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ EXTENSION = 1, } @@ -81,10 +92,11 @@ declare namespace appControl { /** * Indicates when to intercept the specified application. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum DisposedType { /** @@ -92,7 +104,8 @@ declare namespace appControl { * * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ BLOCK_APPLICATION = 1, /** @@ -100,7 +113,8 @@ declare namespace appControl { * * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ BLOCK_ABILITY = 2, /** @@ -108,7 +122,8 @@ declare namespace appControl { * * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ NON_BLOCK = 3 } @@ -116,10 +131,11 @@ declare namespace appControl { /** * Indicates the strategy to intercept the specified application. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum ControlType { /** @@ -127,7 +143,8 @@ declare namespace appControl { * * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ALLOWED_LIST = 1, /** @@ -135,7 +152,8 @@ declare namespace appControl { * * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ DISALLOWED_LIST = 2 } @@ -146,7 +164,8 @@ declare namespace appControl { * @typedef DisposedRule * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface DisposedRule { /** @@ -155,7 +174,8 @@ declare namespace appControl { * @type { Want } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ want: Want; @@ -165,7 +185,8 @@ declare namespace appControl { * @type { ComponentType } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ componentType: ComponentType; @@ -175,7 +196,8 @@ declare namespace appControl { * @type { DisposedType } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ disposedType: DisposedType; @@ -185,7 +207,8 @@ declare namespace appControl { * @type { ControlType } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ controlType: ControlType; @@ -195,19 +218,21 @@ declare namespace appControl { * @type { Array } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - elementList: Array ; + elementList: Array; /** * Indicates priority of the rule. * - * @type { number } + * @type { int } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - priority: number; + priority: int; } /** @@ -216,7 +241,8 @@ declare namespace appControl { * @typedef UninstallDisposedRule * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface UninstallDisposedRule { /** @@ -225,7 +251,8 @@ declare namespace appControl { * @type { Want } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ want: Want; @@ -235,19 +262,21 @@ declare namespace appControl { * @type { UninstallComponentType } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ uninstallComponentType: UninstallComponentType; /** * Indicates priority of the rule. * - * @type { number } + * @type { int } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - priority: number; + priority: int; } /** @@ -257,6 +286,7 @@ declare namespace appControl { * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 20 + * @arkts 1.1&1.2 */ export interface DisposedRuleConfiguration { /** @@ -266,18 +296,20 @@ declare namespace appControl { * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 20 + * @arkts 1.1&1.2 */ appId: string; /** * Indicates the index of clone app. * - * @type { number } + * @type { int } * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - appIndex: number; + appIndex: int; /** * Indicates the rule for interception. @@ -286,6 +318,7 @@ declare namespace appControl { * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 20 + * @arkts 1.1&1.2 */ disposedRule: DisposedRule; } @@ -304,7 +337,8 @@ declare namespace appControl { * @throws { BusinessError } 17700005 - The specified app ID is empty string. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setDisposedStatus(appId: string, disposedWant: Want, callback: AsyncCallback): void; @@ -322,7 +356,8 @@ declare namespace appControl { * @throws { BusinessError } 17700005 - The specified app ID is empty string. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setDisposedStatus(appId: string, disposedWant: Want): Promise; @@ -339,7 +374,8 @@ declare namespace appControl { * @throws { BusinessError } 17700005 - The specified app ID is empty string. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function setDisposedStatusSync(appId: string, disposedWant: Want): void; @@ -356,7 +392,8 @@ declare namespace appControl { * @throws { BusinessError } 17700005 - The specified app ID is empty string. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDisposedStatus(appId: string, callback: AsyncCallback): void; @@ -373,7 +410,8 @@ declare namespace appControl { * @throws { BusinessError } 17700005 - The specified app ID is empty string. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDisposedStatus(appId: string): Promise; @@ -390,7 +428,8 @@ declare namespace appControl { * @throws { BusinessError } 17700005 - The specified app ID is empty string. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDisposedStatusSync(appId: string): Want; @@ -407,7 +446,8 @@ declare namespace appControl { * @throws { BusinessError } 17700005 - The specified app ID is empty string. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function deleteDisposedStatus(appId: string, callback: AsyncCallback): void; @@ -424,7 +464,8 @@ declare namespace appControl { * @throws { BusinessError } 17700005 - The specified app ID is empty string. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function deleteDisposedStatus(appId: string): Promise; @@ -447,7 +488,7 @@ declare namespace appControl { * * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS * @param { string } appId - Indicates the app ID of the application. - * @param { number } [appIndex] Indicates the index of clone app. + * @param { int } [appIndex] Indicates the index of clone app. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -456,9 +497,10 @@ declare namespace appControl { * @throws { BusinessError } 17700061 - AppIndex is not in the valid range. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - function deleteDisposedStatusSync(appId: string, appIndex?: number): void; + function deleteDisposedStatusSync(appId: string, appIndex?: int): void; /** * Obtains the disposed rule of a specified bundle. @@ -480,7 +522,7 @@ declare namespace appControl { * * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS * @param { string } appId - Indicates the app ID of the application. - * @param { number } [appIndex] Indicates the index of clone app. + * @param { int } [appIndex] Indicates the index of clone app. * @returns { DisposedRule } Returns the disposed rule of a specified bundle. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API. @@ -490,9 +532,10 @@ declare namespace appControl { * @throws { BusinessError } 17700061 - AppIndex is not in the valid range. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getDisposedRule(appId: string, appIndex?: number): DisposedRule; + function getDisposedRule(appId: string, appIndex?: int): DisposedRule; /** * Sets the disposed rule of a specified bundle. @@ -515,7 +558,7 @@ declare namespace appControl { * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS * @param { string } appId - Indicates the app ID of the application. * @param { DisposedRule } rule - Indicates the disposed rule of a specified bundle. - * @param { number } [appIndex] Indicates the index of clone app. + * @param { int } [appIndex] Indicates the index of clone app. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -524,9 +567,10 @@ declare namespace appControl { * @throws { BusinessError } 17700061 - AppIndex is not in the valid range. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setDisposedRule(appId: string, rule: DisposedRule, appIndex?: number): void; + function setDisposedRule(appId: string, rule: DisposedRule, appIndex?: int): void; /** * Sets the uninstall disposed rule of a specified bundle. @@ -534,7 +578,7 @@ declare namespace appControl { * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS * @param { string } appIdentifier - Indicates the appIdentifier of the application. * @param { UninstallDisposedRule } rule - Indicates the uninstall disposed rule of a specified bundle. - * @param { number } [appIndex] Indicates the index of clone app. + * @param { int } [appIndex] Indicates the index of clone app. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -544,16 +588,17 @@ declare namespace appControl { * @throws { BusinessError } 17700075 - The specified bundleName of want is not the same with caller. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setUninstallDisposedRule(appIdentifier: string, rule: UninstallDisposedRule, appIndex?: number): void; + function setUninstallDisposedRule(appIdentifier: string, rule: UninstallDisposedRule, appIndex?: int): void; /** * Obtains the uninstall disposed rule of a specified bundle. * * @permission ohos.permission.GET_DISPOSED_APP_STATUS or ohos.permission.MANAGE_DISPOSED_APP_STATUS * @param { string } appIdentifier - Indicates the appIdentifier of the application. - * @param { number } [appIndex] Indicates the index of clone app. + * @param { int } [appIndex] Indicates the index of clone app. * @returns { UninstallDisposedRule } Returns the uninstall disposed rule of a specified bundle. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API. @@ -563,16 +608,17 @@ declare namespace appControl { * @throws { BusinessError } 17700074 - The specified appIdentifier is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getUninstallDisposedRule(appIdentifier: string, appIndex?: number): UninstallDisposedRule; + function getUninstallDisposedRule(appIdentifier: string, appIndex?: int): UninstallDisposedRule; /** * Delete the uninstall disposed rule of a specified bundle. * * @permission ohos.permission.MANAGE_DISPOSED_APP_STATUS * @param { string } appIdentifier - Indicates the appIdentifier of the application. - * @param { number } [appIndex] Indicates the index of clone app. + * @param { int } [appIndex] Indicates the index of clone app. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied. A non-system application is not allowed to call a system API. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -581,9 +627,10 @@ declare namespace appControl { * @throws { BusinessError } 17700074 - The specified appIdentifier is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - function deleteUninstallDisposedRule(appIdentifier: string, appIndex?: number): void; + function deleteUninstallDisposedRule(appIdentifier: string, appIndex?: int): void; /** * Batch set disposed rules for specified bundles. @@ -598,6 +645,7 @@ declare namespace appControl { * @syscap SystemCapability.BundleManager.BundleFramework.AppControl * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function setDisposedRules(disposedRuleConfigurations: Array): void; } diff --git a/api/@ohos.bundle.bundleManager.d.ts b/api/@ohos.bundle.bundleManager.d.ts index 1e26e7c6bb27da32d7d20b8c37c71e9bf425a6b8..2b929348edec133d01c14fed823ef6746c49b69a 100644 --- a/api/@ohos.bundle.bundleManager.d.ts +++ b/api/@ohos.bundle.bundleManager.d.ts @@ -21,14 +21,14 @@ import { AsyncCallback } from './@ohos.base'; import { Metadata as _Metadata } from './bundleManager/Metadata'; import { ElementName as _ElementName } from './bundleManager/ElementName'; -/*** if arkts 1.1 */ -import type { ApplicationInfo as _ApplicationInfo, ModuleMetadata as _ModuleMetadata, - PreinstalledApplicationInfo as _PreinstalledApplicationInfo } from './bundleManager/ApplicationInfo'; +import Want from './@ohos.app.ability.Want'; import { PermissionDef as _PermissionDef } from './bundleManager/PermissionDef'; import { PluginBundleInfo as _PluginBundleInfo, PluginModuleInfo as _PluginModuleInfo} from './bundleManager/PluginBundleInfo'; import { SharedBundleInfo as _SharedBundleInfo } from './bundleManager/SharedBundleInfo'; +/*** if arkts 1.1 */ +import type { ApplicationInfo as _ApplicationInfo, ModuleMetadata as _ModuleMetadata, + PreinstalledApplicationInfo as _PreinstalledApplicationInfo } from './bundleManager/ApplicationInfo'; 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'; @@ -39,9 +39,12 @@ import * as _Skill from './bundleManager/Skill'; /*** if arkts 1.2 */ import { ApplicationInfo as _ApplicationInfo, ModuleMetadata as _ModuleMetadata, PreinstalledApplicationInfo as _PreinstalledApplicationInfo } from './bundleManager/ApplicationInfo'; +import { RecoverableApplicationInfo as _RecoverableApplicationInfo } from './bundleManager/RecoverableApplicationInfo'; import { AbilityInfo as _AbilityInfo, WindowSize as _WindowSize } from './bundleManager/AbilityInfo'; +import { AppProvisionInfo as _AppProvisionInfo, Validity as _Validity } from './bundleManager/AppProvisionInfo'; import { BundleInfo as _BundleInfo, UsedScene as _UsedScene, ReqPermissionDetail as _ReqPermissionDetail, - SignatureInfo as _SignatureInfo, AppCloneIdentity as _AppCloneIdentity } from './bundleManager/BundleInfo'; + SignatureInfo as _SignatureInfo, AppCloneIdentity as _AppCloneIdentity, + DynamicIconInfo as _DynamicIconInfo, BundleOptions as _BundleOptions} from './bundleManager/BundleInfo'; import { HapModuleInfo as _HapModuleInfo, PreloadItem as _PreloadItem, Dependency as _Dependency, RouterItem as _RouterItem, DataItem as _DataItem } from './bundleManager/HapModuleInfo'; import { ExtensionAbilityInfo as _ExtensionAbilityInfo } from './bundleManager/ExtensionAbilityInfo'; @@ -93,7 +96,7 @@ declare namespace bundleManager { * Used to query the enumeration value of bundleInfo. Multiple values can be passed in the form. * Multiple value input, such as GET_BUNDLE_INFO_DEFAULT | GET_BUNDLE_INFO_WITH_APPLICATION. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @crossplatform * @atomicservice @@ -397,7 +400,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 @@ -422,7 +425,7 @@ declare namespace bundleManager { * Used to query the enumeration value of applicationInfo. Multiple values can be passed in the form. * Multiple value input, such as GET_APPLICATION_INFO_DEFAULT | GET_APPLICATION_INFO_WITH_PERMISSION. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since arkts {'1.1':'9', '1.2':'20'} @@ -479,7 +482,7 @@ declare namespace bundleManager { /** * Used to query the enumeration value of abilityInfo. Multiple values can be passed in the form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @atomicservice * @since 20 @@ -628,7 +631,7 @@ declare namespace bundleManager { /** * Used to query the enumeration value of ExtensionAbilityInfo. Multiple values can be passed in the form. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since arkts {'1.1':'9', '1.2':'20'} @@ -693,7 +696,7 @@ declare namespace bundleManager { /** * This enumeration value is used to identify various types of extension ability * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} @@ -704,8 +707,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 +972,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 * @@ -1008,7 +1000,7 @@ declare namespace bundleManager { /** * PermissionGrantState * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @crossplatform * @atomicservice @@ -1083,7 +1075,7 @@ declare namespace bundleManager { /** * Support window mode * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @crossplatform * @atomicservice @@ -1180,7 +1172,7 @@ declare namespace bundleManager { /** * Launch type * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @crossplatform * @atomicservice @@ -1316,7 +1308,7 @@ declare namespace bundleManager { /** * Display orientation * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @crossplatform * @atomicservice @@ -1675,7 +1667,7 @@ declare namespace bundleManager { /** * Indicates module type * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @crossplatform * @atomicservice @@ -1764,7 +1756,7 @@ declare namespace bundleManager { /** * Indicates bundle type * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} @@ -1811,7 +1803,7 @@ declare namespace bundleManager { /** * Shared bundle compatible policy * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} @@ -1838,7 +1830,7 @@ declare namespace bundleManager { /** * This enumeration value is used to identify various types of JSON profile. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since arkts {'1.1':'11', '1.2':'20'} @@ -1859,7 +1851,7 @@ declare namespace bundleManager { /** * This enumeration value is used to identify the distribution type of application. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} @@ -1942,7 +1934,7 @@ declare namespace bundleManager { /** * This enumeration value is used to identify various types of extension ability * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -1977,7 +1969,7 @@ declare namespace bundleManager { /** * This enumeration value is used to identify various flags of application * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} @@ -2044,7 +2036,7 @@ declare namespace bundleManager { /** * Obtains own bundleInfo. * - * @param { number } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. * @returns { Promise } The result of getting the bundle info. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @syscap SystemCapability.BundleManager.BundleFramework.Core @@ -2053,7 +2045,7 @@ declare namespace bundleManager { * @since 20 * @arkts 1.1&1.2 */ - function getBundleInfoForSelf(bundleFlags: number): Promise; + function getBundleInfoForSelf(bundleFlags: int): Promise; /** * Obtains own bundleInfo. @@ -2077,7 +2069,7 @@ declare namespace bundleManager { /** * Obtains own bundleInfo. * - * @param { number } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. * @param { AsyncCallback } callback - The callback of getting bundle info result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @syscap SystemCapability.BundleManager.BundleFramework.Core @@ -2086,7 +2078,7 @@ declare namespace bundleManager { * @since 20 * @arkts 1.1&1.2 */ - function getBundleInfoForSelf(bundleFlags: number, callback: AsyncCallback): void; + function getBundleInfoForSelf(bundleFlags: int, callback: AsyncCallback): void; /** * Obtains own bundleInfo. @@ -2110,7 +2102,7 @@ declare namespace bundleManager { /** * Obtains own bundleInfo. * - * @param { number } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. * @returns { BundleInfo } The result of getting the bundle info. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @syscap SystemCapability.BundleManager.BundleFramework.Core @@ -2119,14 +2111,14 @@ declare namespace bundleManager { * @since 20 * @arkts 1.1&1.2 */ - function getBundleInfoForSelfSync(bundleFlags: number): BundleInfo; + function getBundleInfoForSelfSync(bundleFlags: int): BundleInfo; /** * Obtains bundleInfo based on bundleName, bundleFlags. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @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 } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. * @param { AsyncCallback } callback - The callback of getting bundle info result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -2136,15 +2128,15 @@ declare namespace bundleManager { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - function getBundleInfo(bundleName: string, bundleFlags: number, callback: AsyncCallback): void; + function getBundleInfo(bundleName: string, bundleFlags: int, callback: AsyncCallback): void; /** * Obtains bundleInfo based on bundleName, bundleFlags and userId. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @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 } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @param { AsyncCallback } callback - The callback of getting bundle info result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -2156,15 +2148,15 @@ declare namespace bundleManager { * @arkts 1.1&1.2 */ function getBundleInfo(bundleName: string, - bundleFlags: number, userId: number, callback: AsyncCallback): void; + bundleFlags: int, userId: int, callback: AsyncCallback): void; /** * Obtains bundleInfo based on bundleName, bundleFlags and userId. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @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 } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @returns { Promise } The result of getting the bundle info. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -2175,14 +2167,14 @@ declare namespace bundleManager { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - function getBundleInfo(bundleName: string, bundleFlags: number, userId?: number): Promise; + function getBundleInfo(bundleName: string, bundleFlags: int, userId?: int): Promise; /** * Obtains application info based on a given bundle name. * * @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 } appFlags {@link ApplicationFlag} - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. + * @param { int } appFlags {@link ApplicationFlag} - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. * @param { AsyncCallback } callback - The callback of getting application info result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2191,17 +2183,18 @@ 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; + function getApplicationInfo(bundleName: string, appFlags: int, callback: AsyncCallback): void; /** * Obtains application info based on a given bundle name. * * @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 } appFlags {@link ApplicationFlag} - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } appFlags {@link ApplicationFlag} - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @param { AsyncCallback } callback - The callback of getting application info result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2211,18 +2204,19 @@ 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; + appFlags: int, userId: int, callback: AsyncCallback): void; /** * Obtains application info based on a given bundle name. * * @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 } appFlags {@link ApplicationFlag} - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } appFlags {@link ApplicationFlag} - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @returns { Promise } The result of getting the application info. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2232,31 +2226,33 @@ 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; + function getApplicationInfo(bundleName: string, appFlags: int, userId?: int): Promise; /** * Obtains BundleInfo of all bundles available in the system. * * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST - * @param { number } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo that will be returned. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo that will be returned. * @param { AsyncCallback> } callback - The callback of getting a list of BundleInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @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; + function getAllBundleInfo(bundleFlags: int, callback: AsyncCallback>): void; /** * Obtains BundleInfo of all bundles available in the system. * * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST - * @param { number } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo that will be returned. - * @param { number } userId - Indicates the user id. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo that will be returned. + * @param { int } userId - Indicates the user id. * @param { AsyncCallback> } callback - The callback of getting a list of BundleInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2264,16 +2260,17 @@ 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; + function getAllBundleInfo(bundleFlags: int, userId: int, callback: AsyncCallback>): void; /** * Obtains BundleInfo of all bundles available in the system. * * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST - * @param { number } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo that will be returned. - * @param { number } userId - Indicates the user id. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo that will be returned. + * @param { int } userId - Indicates the user id. * @returns { Promise> } Returns a list of BundleInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2281,31 +2278,33 @@ 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>; + function getAllBundleInfo(bundleFlags: int, userId?: int): Promise>; /** * Obtains information about all installed applications of a specified user. * * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST - * @param { number } appFlags {@link ApplicationFlag} - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. + * @param { int } appFlags {@link ApplicationFlag} - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. * @param { AsyncCallback> } callback - The callback of getting a list of ApplicationInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @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; + function getAllApplicationInfo(appFlags: int, callback: AsyncCallback>): void; /** * Obtains information about all installed applications of a specified user. * * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST - * @param { number } appFlags {@link ApplicationFlag} - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } appFlags {@link ApplicationFlag} - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @param { AsyncCallback> } callback - The callback of getting a list of ApplicationInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2313,17 +2312,18 @@ 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; + function getAllApplicationInfo(appFlags: int, + userId: int, callback: AsyncCallback>): void; /** * Obtains information about all installed applications of a specified user. * * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST - * @param { number } appFlags {@link ApplicationFlag} - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } appFlags {@link ApplicationFlag} - Indicates the flag used to specify information contained in the ApplicationInfo objects that will be returned. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @returns { Promise> } Returns a list of ApplicationInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2331,16 +2331,17 @@ 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>; + function getAllApplicationInfo(appFlags: int, userId?: int): Promise>; /** * Query the AbilityInfo by the given Want. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { Want } want - Indicates the Want containing the application bundle name to be queried. - * @param { number } abilityFlags {@link AbilityFlag} - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. + * @param { int } abilityFlags {@link AbilityFlag} - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. * @param { AsyncCallback> } callback - The callback of querying ability info result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2352,17 +2353,18 @@ 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; + function queryAbilityInfo(want: Want, abilityFlags: int, callback: AsyncCallback>): void; /** * Query the AbilityInfo by the given Want. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { Want } want - Indicates the Want containing the application bundle name to be queried. - * @param { number } abilityFlags {@link AbilityFlag} - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. - * @param { number } userId - userId Indicates the user ID. + * @param { int } abilityFlags {@link AbilityFlag} - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. + * @param { int } userId - userId Indicates the user ID. * @param { AsyncCallback> } callback - The callback of querying ability info result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2375,18 +2377,19 @@ 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; + abilityFlags: int, userId: int, callback: AsyncCallback>): void; /** * Query the AbilityInfo by the given Want. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { Want } want - Indicates the Want containing the application bundle name to be queried. - * @param { number } abilityFlags {@link AbilityFlag} - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. - * @param { number } userId - userId Indicates the user ID. + * @param { int } abilityFlags {@link AbilityFlag} - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. + * @param { int } userId - userId Indicates the user ID. * @returns { Promise> } Returns a list of AbilityInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2399,17 +2402,18 @@ 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>; + function queryAbilityInfo(want: Want, abilityFlags: int, userId?: int): Promise>; /** * Query the AbilityInfo by the given Want Array. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { Array } wants - Indicates the Want Array containing the application bundle name to be queried. - * @param { number } abilityFlags {@link AbilityFlag} - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. - * @param { number } [userId] - userId Indicates the user ID. + * @param { int } abilityFlags {@link AbilityFlag} - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. + * @param { int } [userId] - userId Indicates the user ID. * @returns { Promise> } Returns a list of AbilityInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2422,17 +2426,18 @@ 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>; + function queryAbilityInfo(wants: Array, abilityFlags: int, userId?: int): Promise>; /** * Query the AbilityInfo by the given Want. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { Want } want - Indicates the Want containing the application bundle name to be queried. - * @param { number } abilityFlags {@link AbilityFlag} - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. - * @param { number } userId - userId Indicates the user ID. + * @param { int } abilityFlags {@link AbilityFlag} - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. + * @param { int } userId - userId Indicates the user ID. * @returns { Array } Returns a list of AbilityInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2445,24 +2450,26 @@ 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; - + function queryAbilityInfoSync(want: Want, abilityFlags: int, userId?: int): Array; + /** * Get AbilityInfo by the given uri. * * @permission ohos.permission.GET_ABILITY_INFO * @param { string } uri - Indicates the uri used for matching ability. - * @param { number } abilityFlags {@link AbilityFlag} - Indicates the flag used to specify information contained in the AbilityInfo objects that will be returned. + * @param { int } 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. * @throws { BusinessError } 17700003 - The ability is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ - function getAbilityInfo(uri: string, abilityFlags: number): Promise>; + function getAbilityInfo(uri: string, abilityFlags: int): Promise>; /** * Query extension info of by utilizing a Want. @@ -2470,7 +2477,7 @@ declare namespace bundleManager { * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { Want } want - Indicates the Want containing the application bundle name to be queried. * @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType. - * @param { number } extensionAbilityFlags {@link ExtensionAbilityFlag} - Indicates the flag used to specify information contained in the + * @param { int } extensionAbilityFlags {@link ExtensionAbilityFlag} - Indicates the flag used to specify information contained in the * ExtensionAbilityInfo objects that will be returned. * @param { AsyncCallback> } callback - The callback of querying extension ability info result. * @throws { BusinessError } 201 - Permission denied. @@ -2482,10 +2489,11 @@ 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; + extensionAbilityFlags: int, callback: AsyncCallback>): void; /** * Query extension info of by utilizing a Want. @@ -2493,9 +2501,9 @@ declare namespace bundleManager { * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { Want } want - Indicates the Want containing the application bundle name to be queried. * @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType. - * @param { number } extensionAbilityFlags {@link ExtensionAbilityFlag} - Indicates the flag used to specify information contained in the + * @param { int } extensionAbilityFlags {@link ExtensionAbilityFlag} - Indicates the flag used to specify information contained in the * ExtensionAbilityInfo objects that will be returned. - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @param { AsyncCallback> } callback - The callback of querying extension ability info result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2507,10 +2515,11 @@ 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; + extensionAbilityFlags: int, userId: int, callback: AsyncCallback>): void; /** * Query the ExtensionAbilityInfo by the given Want. @@ -2518,9 +2527,9 @@ declare namespace bundleManager { * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { Want } want - Indicates the Want containing the application bundle name to be queried. * @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType. - * @param { number } extensionAbilityFlags {@link ExtensionAbilityFlag} - Indicates the flag used to specify information contained in the + * @param { int } extensionAbilityFlags {@link ExtensionAbilityFlag} - Indicates the flag used to specify information contained in the * ExtensionAbilityInfo objects that will be returned. - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @returns { Promise> } Returns a list of ExtensionAbilityInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2532,10 +2541,11 @@ 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>; + extensionAbilityFlags: int, userId?: int): Promise>; /** * Query the ExtensionAbilityInfo by the given Want. @@ -2543,9 +2553,9 @@ declare namespace bundleManager { * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { Want } want - Indicates the Want containing the application bundle name to be queried. * @param { ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType. - * @param { number } extensionAbilityFlags {@link ExtensionAbilityFlag} - Indicates the flag used to specify information contained in the + * @param { int } extensionAbilityFlags {@link ExtensionAbilityFlag} - Indicates the flag used to specify information contained in the * ExtensionAbilityInfo objects that will be returned. - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @returns { Array } Returns a list of ExtensionAbilityInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2557,10 +2567,11 @@ 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; + extensionAbilityFlags: int, userId?: int): Array; /** * Query the ExtensionAbilityInfo by the given Want. @@ -2568,9 +2579,9 @@ declare namespace bundleManager { * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { Want } want - Indicates the Want containing the application bundle name to be queried. * @param { string } extensionAbilityType - Indicates extensionAbilityType. - * @param { number } extensionAbilityFlags {@link ExtensionAbilityFlag} - Indicates the flag used to specify information contained in the + * @param { int } extensionAbilityFlags {@link ExtensionAbilityFlag} - Indicates the flag used to specify information contained in the * ExtensionAbilityInfo objects that will be returned. - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @returns { Array } Returns a list of ExtensionAbilityInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2582,19 +2593,20 @@ 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; + extensionAbilityFlags: int, userId?: int): Array; /** * Query the ExtensionAbilityInfo by extension ability type. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO * @param { string } extensionAbilityType - Indicates ExtensionAbilityType. - * @param { number } extensionAbilityFlags {@link ExtensionAbilityFlag} - Indicates the flag used to specify information contained in the + * @param { int } extensionAbilityFlags {@link ExtensionAbilityFlag} - Indicates the flag used to specify information contained in the * ExtensionAbilityInfo objects that will be returned. - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @returns { Array } Returns a list of ExtensionAbilityInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2604,52 +2616,56 @@ 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; + function queryExtensionAbilityInfoSync(extensionAbilityType: string, extensionAbilityFlags: int, + userId?: int): Array; /** * Obtains bundle name by the given uid. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO - * @param { number } uid - Indicates the UID of an application. + * @param { int } uid - Indicates the UID of an application. * @param { AsyncCallback } callback - The callback of getting bundle name. * @throws { BusinessError } 201 - Permission denied. * @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; + function getBundleNameByUid(uid: int, callback: AsyncCallback): void; /** * Obtains bundle name by the given uid. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO - * @param { number } uid - Indicates the UID of an application. + * @param { int } uid - Indicates the UID of an application. * @returns { Promise } Returns the bundle name. * @throws { BusinessError } 201 - Permission denied. * @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; + function getBundleNameByUid(uid: int): Promise; /** * Obtains bundle name by the given uid. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO - * @param { number } uid - Indicates the UID of an application. + * @param { int } uid - Indicates the UID of an application. * @returns { string } Returns the bundle name. * @throws { BusinessError } 201 - Permission denied. * @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; + function getBundleNameByUidSync(uid: int): string; /** * Obtains information about an application bundle contained in an ohos Ability Package (HAP). @@ -2657,7 +2673,7 @@ declare namespace bundleManager { * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } hapFilePath - Indicates the path storing the HAP. * The path should be the relative path to the data directory of the current application. - * @param { number } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo object to be returned. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo object to be returned. * @param { AsyncCallback } callback - The callback of getting bundle archive info result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2665,9 +2681,10 @@ declare namespace bundleManager { * @throws { BusinessError } 17700022 - The hapFilePath is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number, callback: AsyncCallback): void; + function getBundleArchiveInfo(hapFilePath: string, bundleFlags: int, callback: AsyncCallback): void; /** * Obtains information about an application bundle contained in an ohos Ability Package (HAP). @@ -2675,7 +2692,7 @@ declare namespace bundleManager { * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } hapFilePath - Indicates the path storing the HAP. * The path should be the relative path to the data directory of the current application. - * @param { number } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo object to be returned. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo object to be returned. * @returns { Promise } Returns the BundleInfo object. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2683,9 +2700,10 @@ declare namespace bundleManager { * @throws { BusinessError } 17700022 - The hapFilePath is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getBundleArchiveInfo(hapFilePath: string, bundleFlags: number): Promise; + function getBundleArchiveInfo(hapFilePath: string, bundleFlags: int): Promise; /** * Obtains information about an application bundle contained in an ohos Ability Package (HAP). @@ -2693,7 +2711,7 @@ declare namespace bundleManager { * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } hapFilePath - Indicates the path storing the HAP. * The path should be the relative path to the data directory of the current application. - * @param { number } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo object to be returned. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo object to be returned. * @returns { BundleInfo } Returns the BundleInfo object. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2701,9 +2719,10 @@ declare namespace bundleManager { * @throws { BusinessError } 17700022 - The hapFilePath is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getBundleArchiveInfoSync(hapFilePath: string, bundleFlags: number): BundleInfo; + function getBundleArchiveInfoSync(hapFilePath: string, bundleFlags: int): BundleInfo; /** * Clears cache data of a specified application. @@ -2718,7 +2737,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700030 - The specified bundle does not support clearing of cache files. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function cleanBundleCacheFiles(bundleName: string, callback: AsyncCallback): void; @@ -2735,7 +2755,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700030 - The specified bundle does not support clearing of cache files. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function cleanBundleCacheFiles(bundleName: string): Promise; @@ -2744,7 +2765,7 @@ declare namespace bundleManager { * * @permission ohos.permission.REMOVE_CACHE_FILES * @param { string } bundleName - Indicates the bundle name of the application whose cache data is to be cleaned. - * @param { number } appIndex - Indicates the index of clone app. + * @param { int } appIndex - Indicates the index of clone app. * @returns { Promise } Clean bundle cache files result * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -2754,22 +2775,24 @@ declare namespace bundleManager { * @throws { BusinessError } 17700061 - AppIndex not in valid range. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - function cleanBundleCacheFiles(bundleName: string, appIndex: number): Promise; + function cleanBundleCacheFiles(bundleName: string, appIndex: int): Promise; /** * Get the all bundle cache size of the current user. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED - * @returns { Promise } Returns all bundle cache size. + * @returns { Promise } Returns all bundle cache size. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getAllBundleCacheSize(): Promise; + function getAllBundleCacheSize(): Promise; /** * Clean all bundle cache files of the current user, does not include the currently running program. @@ -2780,7 +2803,8 @@ declare namespace bundleManager { * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ function cleanAllBundleCache(): Promise; @@ -2789,7 +2813,7 @@ declare namespace bundleManager { * * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE * @param { string } bundleName - Indicates the bundle name of the application. - * @param { number } appIndex - Indicates the index of clone app. + * @param { int } appIndex - Indicates the index of clone app. * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it. * @returns { Promise } set app enabled result. * @throws { BusinessError } 201 - Permission denied. @@ -2799,9 +2823,10 @@ 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; + function setApplicationEnabled(bundleName: string, appIndex: int, isEnabled: boolean): Promise; /** * Sets whether to enable a specified application. @@ -2816,7 +2841,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 +2859,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 +2876,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; @@ -2858,7 +2886,7 @@ declare namespace bundleManager { * * @permission ohos.permission.CHANGE_ABILITY_ENABLED_STATE * @param { AbilityInfo } info - Indicates information about the ability to set. - * @param { number } appIndex - Indicates the index of clone app. + * @param { int } appIndex - Indicates the index of clone app. * @param { boolean } isEnabled - The value true means to enable it, and the value false means to disable it. * @returns { Promise } set ability enabled result. * @throws { BusinessError } 201 - Permission denied. @@ -2869,9 +2897,10 @@ 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; + function setAbilityEnabled(info: AbilityInfo, appIndex: int, isEnabled: boolean): Promise; /** * Sets whether to enable a specified ability. @@ -2887,7 +2916,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 +2935,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 +2953,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; @@ -2930,7 +2962,7 @@ declare namespace bundleManager { * Checks whether a specified application is enabled. * * @param { string } bundleName - Indicates the bundle name of the application. - * @param { number } appIndex - Indicates the index of clone app. + * @param { int } appIndex - Indicates the index of clone app. * @returns { Promise } Returns true if the application is enabled; returns false otherwise. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -2938,9 +2970,10 @@ 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; + function isApplicationEnabled(bundleName: string, appIndex: int): Promise; /** * Checks whether a specified application is enabled. @@ -2952,7 +2985,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 +3000,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; @@ -2989,7 +3024,7 @@ declare namespace bundleManager { * Checks whether a specified ability is enabled. * * @param { AbilityInfo } info - Indicates information about the ability to check. - * @param { number } appIndex - Indicates the index of clone app. + * @param { int } appIndex - Indicates the index of clone app. * @returns { Promise } Returns true if the ability is enabled; returns false otherwise. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -2998,9 +3033,10 @@ 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; + function isAbilityEnabled(info: AbilityInfo, appIndex: int): Promise; /** * Checks whether a specified ability is enabled. @@ -3013,7 +3049,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 +3065,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 +3081,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; @@ -3054,7 +3093,7 @@ declare namespace bundleManager { * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the bundle name of the application. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @param { AsyncCallback } callback - The callback for starting the application's main ability. * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -3064,9 +3103,10 @@ 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; + function getLaunchWantForBundle(bundleName: string, userId: int, callback: AsyncCallback): void; /** * Obtains the Want for starting the main ability of an application based on the @@ -3083,7 +3123,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; @@ -3094,7 +3135,7 @@ declare namespace bundleManager { * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the bundle name of the application. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @returns { Promise } the Want for starting the application's main ability. * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -3104,9 +3145,10 @@ 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; + function getLaunchWantForBundle(bundleName: string, userId?: int): Promise; /** * Obtains the Want for starting the main ability of an application based on the @@ -3115,7 +3157,7 @@ declare namespace bundleManager { * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the bundle name of the application. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @returns { Want } the Want for starting the application's main ability. * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.GET_BUNDLE_INFO_PRIVILEGED'. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -3125,9 +3167,10 @@ 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; + function getLaunchWantForBundleSync(bundleName: string, userId?: int): Want; /** * Obtains the Want for starting the main ability of own application. @@ -3138,7 +3181,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700072 - The launch want is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @atomicservice - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ function getLaunchWant(): Want; @@ -3171,7 +3215,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getProfileByAbility(moduleName: string, abilityName: string, metadataName: string, callback: AsyncCallback>): void; @@ -3204,7 +3249,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getProfileByAbility(moduleName: string, abilityName: string, metadataName?: string): Promise>; @@ -3237,7 +3283,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700029 - The specified ability is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getProfileByAbilitySync(moduleName: string, abilityName: string, metadataName?: string): Array; @@ -3268,7 +3315,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, metadataName: string, callback: AsyncCallback>): void; @@ -3299,7 +3347,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getProfileByExtensionAbility(moduleName: string, extensionAbilityName: string, metadataName?: string): Promise>; @@ -3330,7 +3379,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700024 - Failed to get the profile because there is no profile in the HAP. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getProfileByExtensionAbilitySync(moduleName: string, extensionAbilityName: string, metadataName?: string): Array; @@ -3346,7 +3396,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700006 - The specified permission 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 getPermissionDef(permissionName: string, callback: AsyncCallback): void; @@ -3362,7 +3413,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700006 - The specified permission 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 getPermissionDef(permissionName: string): Promise; @@ -3378,7 +3430,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700006 - The specified permission 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 getPermissionDefSync(permissionName: string): PermissionDef; @@ -3401,7 +3454,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 +3478,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 +3502,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; @@ -3456,8 +3512,8 @@ declare namespace bundleManager { * * @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 } applicationFlags - Indicates the flag used to specify information contained in the ApplicationInfo object that will be returned. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } applicationFlags - Indicates the flag used to specify information contained in the ApplicationInfo object that will be returned. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @returns { ApplicationInfo } - Returns the ApplicationInfo object. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -3470,14 +3526,14 @@ declare namespace bundleManager { * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - function getApplicationInfoSync(bundleName: string, applicationFlags: number, userId: number): ApplicationInfo; + function getApplicationInfoSync(bundleName: string, applicationFlags: int, userId: int): ApplicationInfo; /** * Obtains applicationInfo based on a given bundleName and bundleFlags. * * @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 } applicationFlags - Indicates the flag used to specify information contained in the ApplicationInfo object that will be returned. + * @param { int } applicationFlags - Indicates the flag used to specify information contained in the ApplicationInfo object that will be returned. * @returns { ApplicationInfo } - Returns the ApplicationInfo object. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -3489,15 +3545,15 @@ declare namespace bundleManager { * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - function getApplicationInfoSync(bundleName: string, applicationFlags: number): ApplicationInfo; + function getApplicationInfoSync(bundleName: string, applicationFlags: int): ApplicationInfo; /** * Obtains bundleInfo based on bundleName, bundleFlags and userId. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @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 } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo object that will be returned. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo object that will be returned. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @returns { BundleInfo } - Returns the BundleInfo object. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -3508,14 +3564,14 @@ declare namespace bundleManager { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - function getBundleInfoSync(bundleName: string, bundleFlags: number, userId: number): BundleInfo; + function getBundleInfoSync(bundleName: string, bundleFlags: int, userId: int): BundleInfo; /** * Obtains bundleInfo based on bundleName, bundleFlags. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @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 } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo object that will be returned. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo object that will be returned. * @returns { BundleInfo } - Returns the BundleInfo object. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -3525,7 +3581,7 @@ declare namespace bundleManager { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - function getBundleInfoSync(bundleName: string, bundleFlags: number): BundleInfo; + function getBundleInfoSync(bundleName: string, bundleFlags: int): BundleInfo; /** * Obtains SharedBundleInfo of all shared bundle available in the system. @@ -3536,7 +3592,8 @@ declare namespace bundleManager { * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllSharedBundleInfo(callback: AsyncCallback>): void; @@ -3549,7 +3606,8 @@ declare namespace bundleManager { * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllSharedBundleInfo(): Promise>; @@ -3567,7 +3625,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700002 - The specified moduleName 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 getSharedBundleInfo(bundleName: string, moduleName: string, callback: AsyncCallback>): void; @@ -3585,7 +3644,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700002 - The specified moduleName 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 getSharedBundleInfo(bundleName: string, moduleName: string): Promise>; @@ -3602,7 +3662,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 getAppProvisionInfo(bundleName: string, callback: AsyncCallback): void; @@ -3611,7 +3672,7 @@ declare namespace bundleManager { * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @param { AsyncCallback } callback - Indicates the callback of getting AppProvisionInfo result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -3621,16 +3682,17 @@ declare namespace bundleManager { * @throws { BusinessError } 17700004 - The specified user ID 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 getAppProvisionInfo(bundleName: string, userId: number, callback: AsyncCallback): void; + function getAppProvisionInfo(bundleName: string, userId: int, callback: AsyncCallback): void; /** * Obtains the profile file information of a specified bundle. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @returns { Promise } Returns the AppProvisionInfo object. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -3640,16 +3702,17 @@ declare namespace bundleManager { * @throws { BusinessError } 17700004 - The specified user ID 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 getAppProvisionInfo(bundleName: string, userId?: number): Promise; + function getAppProvisionInfo(bundleName: string, userId?: int): Promise; /** * Obtains the profile file information of a specified bundle. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the bundle name of the application to which the ability belongs. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @returns { AppProvisionInfo } Returns the AppProvisionInfo object. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -3659,9 +3722,10 @@ declare namespace bundleManager { * @throws { BusinessError } 17700004 - The specified user ID 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 getAppProvisionInfoSync(bundleName: string, userId?: number): AppProvisionInfo; + function getAppProvisionInfoSync(bundleName: string, userId?: int): AppProvisionInfo; /** * Obtains the distribution type specified during bundle installation. @@ -3675,7 +3739,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; @@ -3692,7 +3757,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 getAdditionalInfo(bundleName: string): string; @@ -3722,7 +3788,7 @@ declare namespace bundleManager { * @param { ProfileType } profileType - Indicates the type of profile to be obtained. * @param { string } bundleName - Indicates the name of the bundle to which the profile belongs. * @param { string } moduleName - Indicates the name of the module to which the profile belongs. - * @param { number } userId - Indicates the user ID or do not pass user ID. + * @param { int } userId - Indicates the user ID or do not pass user ID. * @returns { string } Returns string in json-format of the designated profile. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -3734,9 +3800,10 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle is disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getJsonProfile(profileType: ProfileType, bundleName: string, moduleName?: string, userId?: number): string; + function getJsonProfile(profileType: ProfileType, bundleName: string, moduleName?: string, userId?: int): string; /** * Get extend resources. @@ -3751,7 +3818,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700303 - Failed to obtain extended resources. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getExtResource(bundleName: string): Promise>; @@ -3789,6 +3857,7 @@ declare namespace bundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function enableDynamicIcon(bundleName: string, moduleName: string): Promise; @@ -3815,6 +3884,7 @@ declare namespace bundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function enableDynamicIcon(bundleName: string, moduleName: string, option?: BundleOptions): Promise; @@ -3831,7 +3901,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700305 - Failed to disable 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 disableDynamicIcon(bundleName: string): Promise; @@ -3855,6 +3926,7 @@ declare namespace bundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function disableDynamicIcon(bundleName: string, option?: BundleOptions): Promise; @@ -3871,7 +3943,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; @@ -3888,6 +3961,7 @@ declare namespace bundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function getDynamicIconInfo(bundleName: string): Promise>; @@ -3899,7 +3973,7 @@ declare namespace bundleManager { * ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS need to be applied for. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED and ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS - * @param { number } [userId] - Indicates the user id, default value is to query all users. + * @param { int } [userId] - Indicates the user id, default value is to query all users. * @returns { Promise> } Returns a list of DynamicIconInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -3908,8 +3982,9 @@ declare namespace bundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - function getAllDynamicIconInfo(userId?: number): Promise>; + function getAllDynamicIconInfo(userId?: int): Promise>; /** * Verifies the validity of .abc files. Only .abc files passed the verification can run on the restricted VM. @@ -3937,7 +4012,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700201 - Failed to verify the abc file. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function verifyAbc(abcPaths: Array, deleteOriginalFiles: boolean, callback: AsyncCallback): void; @@ -3967,7 +4043,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700201 - Failed to verify the abc file. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function verifyAbc(abcPaths: Array, deleteOriginalFiles: boolean): Promise; @@ -3980,7 +4057,8 @@ declare namespace bundleManager { * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRecoverableApplicationInfo(callback: AsyncCallback>): void; @@ -3993,7 +4071,8 @@ declare namespace bundleManager { * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRecoverableApplicationInfo(): Promise>; @@ -4011,7 +4090,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700053 - The caller is not AppGallery. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function setAdditionalInfo(bundleName: string, additionalInfo: string): void; @@ -4039,7 +4119,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700202 - Failed to delete the abc file. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function deleteAbc(abcPath: string): Promise; @@ -4053,7 +4134,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700056 - The scheme of the specified link is not in the querySchemes. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function canOpenLink(link: string): boolean; @@ -4066,7 +4148,8 @@ declare namespace bundleManager { * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllPreinstalledApplicationInfo(): Promise>; @@ -4083,7 +4166,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700059 - The specified developerId is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllBundleInfoByDeveloperId(developerId: string): Array; @@ -4091,16 +4175,17 @@ declare namespace bundleManager { * Get a list of developedId by distribution type. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED - * @param { number } appDistributionType - Indicates the distribution type of the application, and if not passed in, it gets all the developerId. + * @param { int } appDistributionType - Indicates the distribution type of the application, and if not passed in, it gets all the developerId. * @returns { Array } Returns a list of developerId. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getDeveloperIds(appDistributionType?: number): Array; + function getDeveloperIds(appDistributionType?: int): Array; /** * Switch uninstall state of a specified application. @@ -4115,7 +4200,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700060 - The specified application cannot be uninstalled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function switchUninstallState(bundleName: string, state: boolean): void; @@ -4123,23 +4209,24 @@ declare namespace bundleManager { * Get the SignatureInfo of the application through UID. * * @permission ohos.permission.GET_SIGNATURE_INFO - * @param { number } uid - Indicates the UID of an application. + * @param { int } uid - Indicates the UID of an application. * @returns { SignatureInfo } The result of getting the signature info. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 17700021 - The uid is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getSignatureInfo(uid: number): SignatureInfo; + function getSignatureInfo(uid: int): SignatureInfo; /** * Get the BundleInfo of the specified MultiIsolation App. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the application bundle name to be queried. - * @param { number } appIndex - Indicates the index of clone app. - * @param { number } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. - * @param { number } [userId] - Indicates the user ID, If the user id is not specified, the current user id is used by default. + * @param { int } appIndex - Indicates the index of clone app. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. + * @param { int } [userId] - Indicates the user ID, If the user id is not specified, the current user id is used by default. * @returns { Promise } Returns A BundleInfo Of MultiApp Mode. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -4150,17 +4237,18 @@ 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; + function getAppCloneBundleInfo(bundleName: string, appIndex: int, bundleFlags: int, userId?: int): Promise; /** * Get all BundleInfo of clone app. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the application bundle name to be queried. - * @param { number } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. - * @param { number } [userId] - Indicates the user ID, If the user id is not specified, the current user id is used by default. + * @param { int } bundleFlags {@link BundleFlag} - Indicates the flag used to specify information contained in the BundleInfo objects that will be returned. + * @param { int } [userId] - Indicates the user ID, If the user id is not specified, the current user id is used by default. * @returns { Promise> } Returns BundleInfo Arrays Of MultiApp Mode. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -4170,30 +4258,32 @@ declare namespace bundleManager { * @throws { BusinessError } 17700026 - The specified bundle and clone apps are all disabled. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getAllAppCloneBundleInfo(bundleName: string, bundleFlags: number, userId?: number): Promise>; + function getAllAppCloneBundleInfo(bundleName: string, bundleFlags: int, userId?: int): Promise>; /** * Obtains AppCloneIdentity contains bundleName and appIndex by the given uid. The application requires to be a system application when requesting the permission of ohos.permission.GET_BUNDLE_INFO. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED or ohos.permission.GET_BUNDLE_INFO - * @param { number } uid - Indicates the UID of an application. + * @param { int } uid - Indicates the UID of an application. * @returns { Promise } Returns the clone Identity contains bundleName and appIndex. * @throws { BusinessError } 201 - Permission denied. * @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; + function getAppCloneIdentity(uid: int): Promise; /** * Get all plugin info of host application. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } hostBundleName - Indicates the host application bundle name to be queried. - * @param { number } [userId] - Indicates the user ID or do not pass user ID. + * @param { int } [userId] - Indicates the user ID or do not pass user ID. * @returns { Promise> } Returns PluginBundleInfo Arrays. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -4201,13 +4291,14 @@ declare namespace bundleManager { * @throws { BusinessError } 17700004 - The specified user ID is not found. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getAllPluginInfo(hostBundleName: string, userId?: number): Promise>; + function getAllPluginInfo(hostBundleName: string, userId?: int): Promise>; /** * 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. @@ -4223,7 +4314,8 @@ declare namespace bundleManager { * @throws { BusinessError } 17700086 - System error occurred during copy execution. * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function migrateData(sourcePaths: Array, destinationPath: string): Promise; @@ -4232,7 +4324,7 @@ declare namespace bundleManager { * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the application bundle name to be queried. - * @param { number } appIndex - Indicates the index of clone app. + * @param { int } appIndex - Indicates the index of clone app. * @returns { string } Returns the sandbox data directory. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -4241,8 +4333,9 @@ declare namespace bundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - function getSandboxDataDir(bundleName: string, appIndex: number): string; + function getSandboxDataDir(bundleName: string, appIndex: int): string; /** * Obtains AppCloneIdentity contains bundleName and appIndex by the sandbox data directory. @@ -4252,6 +4345,7 @@ declare namespace bundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function getAppCloneIdentityBySandboxDataDir(sandboxDataDir: string): AppCloneIdentity; @@ -4748,7 +4842,8 @@ declare namespace bundleManager { * @typedef { _PermissionDef } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type PermissionDef = _PermissionDef; @@ -4776,7 +4871,8 @@ declare namespace bundleManager { * @typedef { _SharedBundleInfo } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export type SharedBundleInfo = _SharedBundleInfo; @@ -4790,6 +4886,17 @@ declare namespace bundleManager { */ export type AppProvisionInfo = _AppProvisionInfo.AppProvisionInfo; + /** + * Obtains profile file information about a bundle. + * + * @typedef { _AppProvisionInfo } + * @syscap SystemCapability.BundleManager.BundleFramework.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type AppProvisionInfo = _AppProvisionInfo; + /** * Obtains profile file validity about a bundle. * @@ -4800,13 +4907,25 @@ declare namespace bundleManager { */ export type Validity = _AppProvisionInfo.Validity; + /** + * Obtains profile file validity about a bundle. + * + * @typedef { _Validity } + * @syscap SystemCapability.BundleManager.BundleFramework.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type Validity = _Validity; + /** * Obtains information about a recoverable preinstalled application. * * @typedef { _RecoverableApplicationInfo } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type RecoverableApplicationInfo = _RecoverableApplicationInfo; @@ -4869,7 +4988,8 @@ declare namespace bundleManager { * @typedef { _PluginBundleInfo } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ export type PluginBundleInfo = _PluginBundleInfo; @@ -4879,7 +4999,8 @@ declare namespace bundleManager { * @typedef { _PluginModuleInfo } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ export type PluginModuleInfo = _PluginModuleInfo; @@ -4893,6 +5014,17 @@ declare namespace bundleManager { */ export type DynamicIconInfo = _BundleInfo.DynamicIconInfo; + /** + * Contains dynamic icon. + * + * @typedef { _DynamicIconInfo } + * @syscap SystemCapability.BundleManager.BundleFramework.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type DynamicIconInfo = _DynamicIconInfo; + /** * Contains bundle options. * @@ -4902,6 +5034,17 @@ declare namespace bundleManager { * @since 20 */ export type BundleOptions = _BundleInfo.BundleOptions; + + /** + * Contains bundle options. + * + * @typedef { _BundleOptions } + * @syscap SystemCapability.BundleManager.BundleFramework.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + export type BundleOptions = _BundleOptions; } export default bundleManager; diff --git a/api/@ohos.bundle.bundleMonitor.d.ts b/api/@ohos.bundle.bundleMonitor.d.ts index 8e63401b2695b4ac97055b2e17d627c6c3e90621..af4c9cbd268d432f39a12973c16f10e883306760 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,29 +47,32 @@ 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; /** * The user id * - * @type { number } + * @type { int } * @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; + readonly userId: int; /** * The app index of clone app * - * @type { number } + * @type { int } * @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; + readonly appIndex: int; } /** @@ -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..d817c8e4e6d77e462142667878783d3813ac42a1 100644 --- a/api/@ohos.bundle.bundleResourceManager.d.ts +++ b/api/@ohos.bundle.bundleResourceManager.d.ts @@ -24,7 +24,10 @@ import type { BundleResourceInfo as _BundleResourceInfo } from './bundleManager/ import type { LauncherAbilityResourceInfo as _LauncherAbilityResourceInfo } from './bundleManager/LauncherAbilityResourceInfo'; /*** endif */ /*** if arkts 1.2 */ +import { AsyncCallback } from './@ohos.base'; import { BundleResourceInfo as _BundleResourceInfo } from './bundleManager/BundleResourceInfo'; +import { LauncherAbilityResourceInfo as _LauncherAbilityResourceInfo } from './bundleManager/LauncherAbilityResourceInfo'; +import bundleManager from './@ohos.bundle.bundleManager'; /*** endif */ /** @@ -41,7 +44,7 @@ declare namespace bundleResourceManager { * Used to query the enumeration value of resource info. Multiple values can be passed in the form. * Multiple value input, such as GET_RESOURCE_INFO_WITH_LABEL | GET_RESOURCE_INFO_WITH_ICON. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi * @since arkts {'1.1':'11', '1.2':'20'} @@ -115,7 +118,7 @@ declare namespace bundleResourceManager { * * @permission ohos.permission.GET_BUNDLE_RESOURCES * @param { string } bundleName - Indicates the bundle name of the application. - * @param { number } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the BundleResourceInfo object that will be returned. + * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the BundleResourceInfo object that will be returned. * @returns { BundleResourceInfo } Returns the BundleResourceInfo object. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -123,17 +126,18 @@ 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; + function getBundleResourceInfo(bundleName: string, resourceFlags?: int): BundleResourceInfo; /** * Obtains the BundleResourceInfo of a specified bundle. Default resourceFlag is GET_RESOURCE_INFO_ALL. * * @permission ohos.permission.GET_BUNDLE_RESOURCES * @param { string } bundleName - Indicates the bundle name of the application. - * @param { number } [resourceFlags] {@link ResourceFlag} - Indicates the flag used to specify information contained in the BundleResourceInfo object that will be returned. - * @param { number } [appIndex] - Indicates the index of the bundle,The default value is 0. + * @param { int } [resourceFlags] {@link ResourceFlag} - Indicates the flag used to specify information contained in the BundleResourceInfo object that will be returned. + * @param { int } [appIndex] - Indicates the index of the bundle,The default value is 0. * @returns { BundleResourceInfo } Returns the BundleResourceInfo object. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -145,14 +149,14 @@ declare namespace bundleResourceManager { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - function getBundleResourceInfo(bundleName: string, resourceFlags?: number, appIndex?: number): BundleResourceInfo; + function getBundleResourceInfo(bundleName: string, resourceFlags?: int, appIndex?: int): BundleResourceInfo; /** * Obtains the LauncherAbilityResourceInfo of a specified bundle. Default resourceFlag is GET_RESOURCE_INFO_ALL. * * @permission ohos.permission.GET_BUNDLE_RESOURCES * @param { string } bundleName - Indicates the bundle name of the application. - * @param { number } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the LauncherAbilityResourceInfo object that will be returned. + * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the LauncherAbilityResourceInfo object that will be returned. * @returns { Array } Returns a list of LauncherAbilityResourceInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -160,18 +164,19 @@ 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; + function getLauncherAbilityResourceInfo(bundleName: string, resourceFlags?: int): Array; /** * Obtains the LauncherAbilityResourceInfo of a specified bundle. Default resourceFlag is GET_RESOURCE_INFO_ALL. * * @permission ohos.permission.GET_BUNDLE_RESOURCES * @param { string } bundleName - Indicates the bundle name of the application. - * @param { number } [resourceFlags] {@link ResourceFlag} - Indicates the flag used to specify information + * @param { int } [resourceFlags] {@link ResourceFlag} - Indicates the flag used to specify information *
contained in the LauncherAbilityResourceInfo object that will be returned. - * @param { number } [appIndex] - Indicates the index of the bundle,The default value is 0. + * @param { int } [appIndex] - Indicates the index of the bundle,The default value is 0. * @returns { Array } Returns a list of LauncherAbilityResourceInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -180,69 +185,74 @@ 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; + function getLauncherAbilityResourceInfo(bundleName: string, resourceFlags?: int, appIndex?: int): Array; /** * Obtains BundleResourceInfo of all bundles available in the system. * * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST and ohos.permission.GET_BUNDLE_RESOURCES - * @param { number } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the BundleResourceInfo that will be returned. + * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the BundleResourceInfo that will be returned. * @param { AsyncCallback> } callback - The callback of getting a list of BundleResourceInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @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; + function getAllBundleResourceInfo(resourceFlags: int, callback: AsyncCallback>): void; /** * Obtains BundleResourceInfo of all bundles available in the system. * * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST and ohos.permission.GET_BUNDLE_RESOURCES - * @param { number } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the BundleResourceInfo that will be returned. + * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the BundleResourceInfo that will be returned. * @returns { Promise> } Returns a list of BundleResourceInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @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>; + function getAllBundleResourceInfo(resourceFlags: int): Promise>; /** * Obtains LauncherAbilityResourceInfo of all launcher abilities available in the system. * * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST and ohos.permission.GET_BUNDLE_RESOURCES - * @param { number } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the LauncherAbilityResourceInfo that will be returned. + * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the LauncherAbilityResourceInfo that will be returned. * @param { AsyncCallback> } callback - The callback of getting a list of LauncherAbilityResourceInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @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; + function getAllLauncherAbilityResourceInfo(resourceFlags: int, callback: AsyncCallback>): void; /** * Obtains LauncherAbilityResourceInfo of all launcher abilities available in the system. * * @permission ohos.permission.GET_INSTALLED_BUNDLE_LIST and ohos.permission.GET_BUNDLE_RESOURCES - * @param { number } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the LauncherAbilityResourceInfo that will be returned. + * @param { int } resourceFlags {@link ResourceFlag} - Indicates the flag used to specify information contained in the LauncherAbilityResourceInfo that will be returned. * @returns { Promise> } Returns a list of LauncherAbilityResourceInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @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>; + function getAllLauncherAbilityResourceInfo(resourceFlags: int): Promise>; /** * Obtains the abilityResourceInfo of a specified bundle. @@ -251,9 +261,9 @@ declare namespace bundleResourceManager { * @param { string } bundleName - Indicates the bundle name of the application. * @param { bundleManager.ExtensionAbilityType } extensionAbilityType - Indicates ExtensionAbilityType. *
Currently only supported ExtensionAbilityType::INPUTMETHOD,ExtensionAbilityType::SHARE,ExtensionAbilityType::ACTION. - * @param { number } resourceFlags - Indicates the flag used to specify information. + * @param { int } resourceFlags - Indicates the flag used to specify information. *
Contained in the ExtensionAbilityResourceInfo object that will be returned. - * @param { number } [appIndex] - Indicates the index of the bundle. + * @param { int } [appIndex] - Indicates the index of the bundle. * @returns { Array } Returns a list of LauncherAbilityResourceInfo objects. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -262,8 +272,9 @@ declare namespace bundleResourceManager { * @syscap SystemCapability.BundleManager.BundleFramework.Resource * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - function getExtensionAbilityResourceInfo(bundleName: string, extensionAbilityType: bundleManager.ExtensionAbilityType, resourceFlags: number, appIndex?: number): Array; + function getExtensionAbilityResourceInfo(bundleName: string, extensionAbilityType: bundleManager.ExtensionAbilityType, resourceFlags: int, appIndex?: int): Array; /** * Obtains resource info of a bundle. @@ -282,7 +293,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.defaultAppManager.d.ts b/api/@ohos.bundle.defaultAppManager.d.ts index 7ee73e02f674e32312dc319b69c6e9256a749071..c402034e9b8d8b16e1dda3992161cc6bc3c4857a 100644 --- a/api/@ohos.bundle.defaultAppManager.d.ts +++ b/api/@ohos.bundle.defaultAppManager.d.ts @@ -27,78 +27,89 @@ import { ElementName } from './bundleManager/ElementName'; * * @namespace defaultAppManager * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace defaultAppManager { /** * The constant for application type. * - * @enum { number } + * @enum { string } * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum ApplicationType { /** * Default browser identifier. * * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ BROWSER = 'Web Browser', /** * Default image identifier. * * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ IMAGE = 'Image Gallery', /** * Default audio identifier. * * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO = 'Audio Player', /** * Default video identifier. * * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO = 'Video Player', /** * Default PDF identifier. * * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ PDF = 'PDF Viewer', /** * Default word identifier. * * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ WORD = 'Word Viewer', /** * Default excel identifier. * * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ EXCEL = 'Excel Viewer', /** * Default PPT identifier. * * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ PPT = 'PPT Viewer', /** * Default email identifier. * * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ EMAIL = 'Email' } @@ -111,7 +122,8 @@ declare namespace defaultAppManager { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isDefaultApplication(type: string, callback: AsyncCallback): void; @@ -123,7 +135,8 @@ declare namespace defaultAppManager { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isDefaultApplication(type: string): Promise; @@ -135,7 +148,8 @@ declare namespace defaultAppManager { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ function isDefaultApplicationSync(type: string): boolean; @@ -144,7 +158,7 @@ declare namespace defaultAppManager { * * @permission ohos.permission.GET_DEFAULT_APPLICATION * @param { string } type - Application type or a file type that conforms to media type format. - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @param { AsyncCallback } callback - The callback of the BundleInfo object result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -155,9 +169,10 @@ declare namespace defaultAppManager { * @throws { BusinessError } 17700025 - The specified type is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getDefaultApplication(type: string, userId: number, callback: AsyncCallback): void; + function getDefaultApplication(type: string, userId: int, callback: AsyncCallback): void; /** * Get default application based on type. @@ -173,7 +188,8 @@ declare namespace defaultAppManager { * @throws { BusinessError } 17700025 - The specified type is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDefaultApplication(type: string, callback: AsyncCallback): void; @@ -182,7 +198,7 @@ declare namespace defaultAppManager { * * @permission ohos.permission.GET_DEFAULT_APPLICATION * @param { string } type - Application type or a file type that conforms to media type format. - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @returns { Promise } Return the BundleInfo object. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -193,16 +209,17 @@ declare namespace defaultAppManager { * @throws { BusinessError } 17700025 - The specified type is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getDefaultApplication(type: string, userId?: number): Promise; + function getDefaultApplication(type: string, userId?: int): Promise; /** * Get default application based on type. * * @permission ohos.permission.GET_DEFAULT_APPLICATION * @param { string } type - Application type or a file type that conforms to media type format. - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @returns { BundleInfo } Return the BundleInfo object. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -213,9 +230,10 @@ declare namespace defaultAppManager { * @throws { BusinessError } 17700025 - The specified type is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getDefaultApplicationSync(type: string, userId?: number): BundleInfo; + function getDefaultApplicationSync(type: string, userId?: int): BundleInfo; /** * Set default application based on type. @@ -223,7 +241,7 @@ declare namespace defaultAppManager { * @permission ohos.permission.SET_DEFAULT_APPLICATION * @param { string } type - Application type or a file type that conforms to media type format. * @param { ElementName } elementName - Uniquely identifies an ability or extensionAbility. - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @param { AsyncCallback } callback - The callback of setting default application result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -234,10 +252,11 @@ declare namespace defaultAppManager { * @throws { BusinessError } 17700028 - The specified ability does not match the type. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setDefaultApplication(type: string, - elementName: ElementName, userId: number, callback: AsyncCallback): void; + elementName: ElementName, userId: int, callback: AsyncCallback): void; /** * Set default application based on type. @@ -254,7 +273,8 @@ declare namespace defaultAppManager { * @throws { BusinessError } 17700028 - The specified ability does not match the type. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function setDefaultApplication(type: string, elementName: ElementName, callback: AsyncCallback): void; @@ -264,7 +284,7 @@ declare namespace defaultAppManager { * @permission ohos.permission.SET_DEFAULT_APPLICATION * @param { string } type - Application type or a file type that conforms to media type format. * @param { ElementName } elementName - Uniquely identifies an ability or extensionAbility. - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @returns { Promise } The result of setting default application. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -275,9 +295,10 @@ declare namespace defaultAppManager { * @throws { BusinessError } 17700028 - The specified ability does not match the type. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setDefaultApplication(type: string, elementName: ElementName, userId?: number): Promise; + function setDefaultApplication(type: string, elementName: ElementName, userId?: int): Promise; /** * Set default application based on type. @@ -285,7 +306,7 @@ declare namespace defaultAppManager { * @permission ohos.permission.SET_DEFAULT_APPLICATION * @param { string } type - Application type or a file type that conforms to media type format. * @param { ElementName } elementName - Uniquely identifies an ability or extensionAbility. - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -295,16 +316,17 @@ declare namespace defaultAppManager { * @throws { BusinessError } 17700028 - The specified ability does not match the type. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setDefaultApplicationSync(type: string, elementName: ElementName, userId?: number): void; + function setDefaultApplicationSync(type: string, elementName: ElementName, userId?: int): void; /** * Reset default application based on type. * * @permission ohos.permission.SET_DEFAULT_APPLICATION * @param { string } type - Application type or a file type that conforms to media type format. - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @param { AsyncCallback } callback - The callback of resetting default application result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -314,9 +336,10 @@ declare namespace defaultAppManager { * @throws { BusinessError } 17700025 - The specified type is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function resetDefaultApplication(type: string, userId: number, callback: AsyncCallback): void; + function resetDefaultApplication(type: string, userId: int, callback: AsyncCallback): void; /** * Reset default application based on type. @@ -331,7 +354,8 @@ declare namespace defaultAppManager { * @throws { BusinessError } 17700025 - The specified type is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function resetDefaultApplication(type: string, callback: AsyncCallback): void; @@ -340,7 +364,7 @@ declare namespace defaultAppManager { * * @permission ohos.permission.SET_DEFAULT_APPLICATION * @param { string } type - Application type or a file type that conforms to media type format. - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @returns { Promise } The result of resetting default application. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -350,16 +374,17 @@ declare namespace defaultAppManager { * @throws { BusinessError } 17700025 - The specified type is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function resetDefaultApplication(type: string, userId?: number): Promise; + function resetDefaultApplication(type: string, userId?: int): Promise; /** * Reset default application based on type. * * @permission ohos.permission.SET_DEFAULT_APPLICATION * @param { string } type - Application type or a file type that conforms to media type format. - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types. @@ -368,9 +393,10 @@ declare namespace defaultAppManager { * @throws { BusinessError } 17700025 - The specified type is invalid. * @syscap SystemCapability.BundleManager.BundleFramework.DefaultApp * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function resetDefaultApplicationSync(type: string, userId?: number): void; + function resetDefaultApplicationSync(type: string, userId?: int): void; } export default defaultAppManager; diff --git a/api/@ohos.bundle.distributedBundleManager.d.ts b/api/@ohos.bundle.distributedBundleManager.d.ts index bc13c960d8325e75f9821afb61046652ef04f563..a85231f931b605c07ccf6ffea065375f785df553 100644 --- a/api/@ohos.bundle.distributedBundleManager.d.ts +++ b/api/@ohos.bundle.distributedBundleManager.d.ts @@ -28,7 +28,8 @@ import { RemoteAbilityInfo as _RemoteAbilityInfo } from './bundleManager/RemoteA * @namespace distributedBundleManager * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace distributedBundleManager { /** @@ -47,7 +48,8 @@ declare namespace distributedBundleManager { * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRemoteAbilityInfo(elementName: ElementName, callback: AsyncCallback): void; @@ -67,7 +69,8 @@ declare namespace distributedBundleManager { * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRemoteAbilityInfo(elementName: ElementName): Promise; @@ -87,7 +90,8 @@ declare namespace distributedBundleManager { * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRemoteAbilityInfo(elementNames: Array, callback: AsyncCallback>): void; @@ -108,7 +112,8 @@ declare namespace distributedBundleManager { * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRemoteAbilityInfo(elementNames: Array): Promise>; @@ -129,7 +134,8 @@ declare namespace distributedBundleManager { * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRemoteAbilityInfo(elementName: ElementName, locale: string, callback: AsyncCallback): void; @@ -151,7 +157,8 @@ declare namespace distributedBundleManager { * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRemoteAbilityInfo(elementName: ElementName, locale: string): Promise; @@ -172,7 +179,8 @@ declare namespace distributedBundleManager { * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRemoteAbilityInfo(elementNames: Array, locale: string, callback: AsyncCallback>): void; @@ -194,7 +202,8 @@ declare namespace distributedBundleManager { * @throws { BusinessError } 17700027 - The distributed service is not running. * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getRemoteAbilityInfo(elementNames: Array, locale: string): Promise>; @@ -204,7 +213,8 @@ declare namespace distributedBundleManager { * @typedef { _RemoteAbilityInfo } * @syscap SystemCapability.BundleManager.DistributedBundleFramework * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export type RemoteAbilityInfo = _RemoteAbilityInfo; } diff --git a/api/@ohos.bundle.freeInstall.d.ts b/api/@ohos.bundle.freeInstall.d.ts index 1a2aae8686d3ed7fd5d7621b03e5b783f7862dce..bf7aeb18139974092f460e5dc01f183593d4e2b2 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,16 +36,18 @@ 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 { /** * Used to set the enumeration value of upgrading for free installation. * - * @enum { number } + * @enum { int } * @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 } @@ -70,10 +83,11 @@ declare namespace freeInstall { * Used to query the enumeration value of bundlePackInfo. * Multiple value input, such as GET_PACKAGES | GET_BUNDLE_SUMMARY. * - * @enum { number } + * @enum { int } * @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..f2c586bd4368ba2302dfbb5901cb75db32265f83 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; @@ -1651,7 +1673,7 @@ declare namespace installer { * @permission ohos.permission.INSTALL_CLONE_BUNDLE * @param { string } bundleName - Indicates the path where the HAP of the application is stored. * @param { CreateAppCloneParam } [createAppCloneParam] Indicates the optional params of create clone app. - * @returns { Promise } Return the appIndex of the clone application. + * @returns { Promise } Return the appIndex of the clone application. * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_CLONE_BUNDLE'. * @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. @@ -1661,9 +1683,10 @@ 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; + createAppClone(bundleName: string, createAppCloneParam?: CreateAppCloneParam): Promise; /** * Destroy clone instance for an application. @@ -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 { int } appIndex - Indicates the clone application's index. + * @param { int | DestroyAppCloneParam } [options] - Indicates other parameters required for the uninstallation. + * @returns { Promise } the promise returned by the function. + * @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: int, options?: int | DestroyAppCloneParam): Promise; + /** * Install application by bundle name with specified user. * @@ -1728,8 +1772,8 @@ declare namespace installer { * * @permission ohos.permission.INSTALL_BUNDLE * @param { string } bundleName - Indicates the bundle name of application. - * @param { number } [userId] - userId Indicates the user ID. - * @returns { Promise } the promise returned by the function. + * @param { int } [userId] - userId Indicates the user ID. + * @returns { Promise } the promise returned by the function. the promise returned by the function. * @throws { BusinessError } 201 - Calling interface without permission 'ohos.permission.INSTALL_BUNDLE'. * @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. @@ -1740,9 +1784,10 @@ 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; + installPreexistingApp(bundleName: string, userId?: int): Promise; /** * Install plugin for host application. @@ -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,28 +1982,31 @@ 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 { /** * Indicates the user id * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - userId?: number; + userId?: int; /** * Indicates the installation type. The value 0x00 means normal installation, 0x01 means overwrite installation, and 0x10 means installation-free. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - installFlag?: number; + installFlag?: int; /** * Indicates whether the param has data @@ -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,19 +2025,21 @@ 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; /** * Indicates the deadline of the crowdtesting bundle * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - crowdtestDeadline?: number; + crowdtestDeadline?: long; /** * Indicates the shared bundle dir paths. @@ -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,19 +2124,21 @@ 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; /** * Indicates the shared version code. If default, indicates that all version sharing bundles are uninstalled * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - versionCode?: number; + versionCode?: int; } /** @@ -2077,27 +2147,30 @@ 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 { /** * Indicates the user id * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - userId?: number; + userId?: int; /** * Indicates the appIndex of MultiApp * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - appIndex?: number; + appIndex?: int; } /** @@ -2106,25 +2179,28 @@ 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 { /** * Indicates the user id * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - userId?: number; + userId?: int; /** * Indicates parameters. * * @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,18 +2211,20 @@ 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 { /** * Indicates the user id. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.BundleManager.BundleFramework.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ - userId?: number; + userId?: int; /** * Indicates parameters. @@ -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..71215a818969cdc4ef3244855649c59ef06ac02c 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'; @@ -40,7 +40,7 @@ declare namespace launcherBundleManager { * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the application bundle name to be queried. - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @param { AsyncCallback> } callback -The callback of the LauncherAbilityInfo object result. * @throws { BusinessError } 201 - Verify permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -50,17 +50,18 @@ 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; + userId: int, callback: AsyncCallback>): void; /** * Obtains launcher abilities info based on a given bundleName and userId. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the application bundle name to be queried. - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @returns { Promise> } the LauncherAbilityInfo object. * @throws { BusinessError } 201 - Verify permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -70,31 +71,33 @@ 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>; + function getLauncherAbilityInfo(bundleName: string, userId: int): Promise>; /** * Obtains launcher abilities info based on a given bundleName and userId. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the application bundle name to be queried. - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @returns { Array } the LauncherAbilityInfo object. * @throws { BusinessError } 201 - Verify permission denied. * @throws { BusinessError } 801 - Capability not support. * @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; + function getLauncherAbilityInfoSync(bundleName: string, userId: int): Array; /** * Obtains launcher abilities info based on a given userId. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @param { AsyncCallback> } callback -The callback of the LauncherAbilityInfo object result. * @throws { BusinessError } 201 - Verify permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -103,15 +106,16 @@ 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; + function getAllLauncherAbilityInfo(userId: int, callback: AsyncCallback>): void; /** * Obtains launcher abilities info based on a given userId. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @returns { Promise> } the LauncherAbilityInfo object. * @throws { BusinessError } 201 - Verify permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -120,9 +124,10 @@ 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>; + function getAllLauncherAbilityInfo(userId: int): Promise>; /** * Obtains shortcut info based on a given bundleName. @@ -137,7 +142,8 @@ 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; @@ -154,7 +160,8 @@ 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>; @@ -180,9 +187,9 @@ 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. + * @param { int } userId - Indicates the user ID. * @returns { Array } the LauncherShortcutInfo object. * @throws { BusinessError } 201 - Verify permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -195,14 +202,14 @@ declare namespace launcherBundleManager { * @since arkts {'1.1':'13', '1.2':'20'} * @arkts 1.1&1.2 */ - function getShortcutInfoSync(bundleName: string, userId: number): Array; + function getShortcutInfoSync(bundleName: string, userId: int): Array; /** * Obtains shortcut info based on bundleName and appIndex. * * @permission ohos.permission.GET_BUNDLE_INFO_PRIVILEGED * @param { string } bundleName - Indicates the application bundle name to be queried. - * @param { number } appIndex - Indicates the index of clone app. + * @param { int } appIndex - Indicates the index of clone app. * @returns { Array } the ShortcutInfo object. * @throws { BusinessError } 201 - Verify permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -214,7 +221,7 @@ declare namespace launcherBundleManager { * @since 20 * @arkts 1.1&1.2 */ - function getShortcutInfoByAppIndex(bundleName: string, appIndex: number): Array; + function getShortcutInfoByAppIndex(bundleName: string, appIndex: int): Array; /** * Starts shortcut. @@ -250,6 +257,7 @@ declare namespace launcherBundleManager { * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function startShortcutWithReason(shortcutInfo: ShortcutInfo, startReason: string, options?: StartOptions): Promise; @@ -258,7 +266,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.bundle.shortcutManager.d.ts b/api/@ohos.bundle.shortcutManager.d.ts index 2f06794328bf0664500c71e2d58cc30601e37ff7..13b322cfff2540b9a09b2faf32fd889c11e5d667 100644 --- a/api/@ohos.bundle.shortcutManager.d.ts +++ b/api/@ohos.bundle.shortcutManager.d.ts @@ -42,7 +42,7 @@ declare namespace shortcutManager { * * @permission ohos.permission.MANAGE_SHORTCUTS * @param { ShortcutInfo } shortcutInfo - Indicates the shortcut info which contains shortcut want. - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 201 - Verify permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -57,14 +57,14 @@ declare namespace shortcutManager { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - function addDesktopShortcutInfo(shortcutInfo: ShortcutInfo, userId: number): Promise; + function addDesktopShortcutInfo(shortcutInfo: ShortcutInfo, userId: int): Promise; /** * Delete desktop shortcut info. * * @permission ohos.permission.MANAGE_SHORTCUTS * @param { ShortcutInfo } shortcutInfo - Indicates the shortcut info which contains shortcut want. - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 201 - Verify permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -75,13 +75,13 @@ declare namespace shortcutManager { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - function deleteDesktopShortcutInfo(shortcutInfo: ShortcutInfo, userId: number): Promise; + function deleteDesktopShortcutInfo(shortcutInfo: ShortcutInfo, userId: int): Promise; /** * Get all desktop shortcut info. * * @permission ohos.permission.MANAGE_SHORTCUTS - * @param { number } userId - Indicates the id for the user. + * @param { int } userId - Indicates the id for the user. * @returns { Promise> } the LauncherShortcutInfo object. * @throws { BusinessError } 201 - Verify permission denied. * @throws { BusinessError } 202 - Permission denied, non-system app called system api. @@ -92,7 +92,7 @@ declare namespace shortcutManager { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - function getAllDesktopShortcutInfo(userId: number): Promise>; + function getAllDesktopShortcutInfo(userId: int): Promise>; /** * Set a shortcut of current application is visible or invisible. @@ -103,6 +103,7 @@ declare namespace shortcutManager { * @throws { BusinessError } 17700070 - The specified shortcut id is illegal. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @since 20 + * @arkts 1.1&1.2 */ function setShortcutVisibleForSelf(id: string, visible: boolean): Promise; @@ -112,6 +113,7 @@ declare namespace shortcutManager { * @returns { Promise> } The LauncherShortcutInfo object. * @syscap SystemCapability.BundleManager.BundleFramework.Launcher * @since 20 + * @arkts 1.1&1.2 */ function getAllShortcutInfoForSelf(): Promise>; diff --git a/api/@ohos.charger.d.ts b/api/@ohos.charger.d.ts index a02a52cfd5b514f0e3d6d660c5bb9bb8b17ecf7c..1c8ecd419f1e8f9c12491a013c9fea842924d0e3 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 */ /** @@ -24,16 +25,18 @@ * @namespace charger * @syscap SystemCapability.PowerManager.BatteryManager.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace charger { /** * Indicates the type of the charger plugged-in. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.PowerManager.BatteryManager.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum ChargeType { /** @@ -41,7 +44,8 @@ declare namespace charger { * * @syscap SystemCapability.PowerManager.BatteryManager.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE, /** @@ -49,7 +53,8 @@ declare namespace charger { * * @syscap SystemCapability.PowerManager.BatteryManager.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIRED_NORMAL, /** @@ -57,7 +62,8 @@ declare namespace charger { * * @syscap SystemCapability.PowerManager.BatteryManager.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIRED_QUICK, /** @@ -65,7 +71,8 @@ declare namespace charger { * * @syscap SystemCapability.PowerManager.BatteryManager.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIRED_SUPER_QUICK, /** @@ -73,7 +80,8 @@ declare namespace charger { * * @syscap SystemCapability.PowerManager.BatteryManager.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIRELESS_NORMAL, /** @@ -81,7 +89,8 @@ declare namespace charger { * * @syscap SystemCapability.PowerManager.BatteryManager.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIRELESS_QUICK, /** @@ -89,7 +98,8 @@ declare namespace charger { * * @syscap SystemCapability.PowerManager.BatteryManager.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ WIRELESS_SUPER_QUICK } diff --git a/api/@ohos.commonEventManager.d.ts b/api/@ohos.commonEventManager.d.ts index 1055902283fac12dae45bf30a8115c13998eecf8..6207edf017a39e90e826be68f0ab3becbcc9a588 100644 --- a/api/@ohos.commonEventManager.d.ts +++ b/api/@ohos.commonEventManager.d.ts @@ -184,7 +184,7 @@ declare namespace commonEventManager { * Publishes an ordered, sticky, or standard common event to a specified user. * * @param { string } event - Specified the names of the common events. - * @param { number } userId - Specified the user to receive the common events. + * @param { int } userId - Specified the user to receive the common events. * @param { AsyncCallback } callback - The callback of publishAsUser. * @throws { BusinessError } 202 - not system app * @throws { BusinessError } 1500003 - The common event sending frequency too high. @@ -193,9 +193,10 @@ 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; + function publishAsUser(event: string, userId: int, callback: AsyncCallback): void; /** * Publishes an ordered, sticky, or standard common event to a specified user. @@ -219,7 +220,7 @@ declare namespace commonEventManager { * Publishes an ordered, sticky, or standard common event to a specified user. * * @param { string } event - Specified the names of the common events. - * @param { number } userId - Specified the user to receive the common events. + * @param { int } userId - Specified the user to receive the common events. * @param { CommonEventPublishData } options - Indicates the CommonEventPublishData containing the common event * content and attributes. * @param { AsyncCallback } callback - The callback of publishAsUser. @@ -230,11 +231,12 @@ 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, + userId: int, options: CommonEventPublishData, callback: AsyncCallback ): void; @@ -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', @@ -1167,7 +1243,8 @@ declare namespace commonEventManager { * Bluetooth.handsfree.ag.connect.state.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CONNECT_STATE_UPDATE = 'usual.event.bluetooth.handsfree.ag.CONNECT_STATE_UPDATE', @@ -1175,7 +1252,8 @@ declare namespace commonEventManager { * Bluetooth.handsfree.ag.current.device.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_CURRENT_DEVICE_UPDATE = 'usual.event.bluetooth.handsfree.ag.CURRENT_DEVICE_UPDATE', @@ -1183,7 +1261,8 @@ declare namespace commonEventManager { * Bluetooth.handsfree.ag.audio.state.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HANDSFREE_AG_AUDIO_STATE_UPDATE = 'usual.event.bluetooth.handsfree.ag.AUDIO_STATE_UPDATE', @@ -1191,7 +1270,8 @@ declare namespace commonEventManager { * Bluetooth.a2dpsource.connect.state.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CONNECT_STATE_UPDATE = 'usual.event.bluetooth.a2dpsource.CONNECT_STATE_UPDATE', @@ -1199,7 +1279,8 @@ declare namespace commonEventManager { * Bluetooth.a2dpsource.current.device.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CURRENT_DEVICE_UPDATE = 'usual.event.bluetooth.a2dpsource.CURRENT_DEVICE_UPDATE', @@ -1207,7 +1288,8 @@ declare namespace commonEventManager { * Bluetooth.a2dpsource.playing.state.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_A2DPSOURCE_PLAYING_STATE_UPDATE = 'usual.event.bluetooth.a2dpsource.PLAYING_STATE_UPDATE', @@ -1215,7 +1297,8 @@ declare namespace commonEventManager { * Bluetooth.a2dpsource.avrcp.connect.state.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_A2DPSOURCE_AVRCP_CONNECT_STATE_UPDATE = 'usual.event.bluetooth.a2dpsource.AVRCP_CONNECT_STATE_UPDATE', @@ -1223,7 +1306,8 @@ declare namespace commonEventManager { * Bluetooth.a2dpsource.codec.value.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_A2DPSOURCE_CODEC_VALUE_UPDATE = 'usual.event.bluetooth.a2dpsource.CODEC_VALUE_UPDATE', @@ -1231,7 +1315,8 @@ declare namespace commonEventManager { * Bluetooth.remotedevice.discovered. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_DISCOVERED = 'usual.event.bluetooth.remotedevice.DISCOVERED', @@ -1239,7 +1324,8 @@ declare namespace commonEventManager { * Bluetooth.remotedevice.class.value.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CLASS_VALUE_UPDATE = 'usual.event.bluetooth.remotedevice.CLASS_VALUE_UPDATE', @@ -1247,7 +1333,8 @@ declare namespace commonEventManager { * Bluetooth.remotedevice.acl.connected. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_CONNECTED = 'usual.event.bluetooth.remotedevice.ACL_CONNECTED', @@ -1255,7 +1342,8 @@ declare namespace commonEventManager { * Bluetooth.remotedevice.acl.disconnected. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_ACL_DISCONNECTED = 'usual.event.bluetooth.remotedevice.ACL_DISCONNECTED', @@ -1263,7 +1351,8 @@ declare namespace commonEventManager { * Bluetooth.remotedevice.name.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_NAME_UPDATE = 'usual.event.bluetooth.remotedevice.NAME_UPDATE', @@ -1271,7 +1360,8 @@ declare namespace commonEventManager { * Bluetooth.remotedevice.pair.state. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIR_STATE = 'usual.event.bluetooth.remotedevice.PAIR_STATE', @@ -1279,15 +1369,17 @@ declare namespace commonEventManager { * Bluetooth.remotedevice.battery.value.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 - */ + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 + */ COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_BATTERY_VALUE_UPDATE = 'usual.event.bluetooth.remotedevice.BATTERY_VALUE_UPDATE', /** * Bluetooth.remotedevice.sdp.result. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_SDP_RESULT = 'usual.event.bluetooth.remotedevice.SDP_RESULT', @@ -1295,7 +1387,8 @@ declare namespace commonEventManager { * Bluetooth.remotedevice.uuid.value. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_UUID_VALUE = 'usual.event.bluetooth.remotedevice.UUID_VALUE', @@ -1303,7 +1396,8 @@ declare namespace commonEventManager { * Bluetooth.remotedevice.pairing.req. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_REQ = 'usual.event.bluetooth.remotedevice.PAIRING_REQ', @@ -1311,7 +1405,8 @@ declare namespace commonEventManager { * Bluetooth.remotedevice.pairing.cancel. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_PAIRING_CANCEL = 'usual.event.bluetooth.remotedevice.PAIRING_CANCEL', @@ -1319,7 +1414,8 @@ declare namespace commonEventManager { * Bluetooth.remotedevice.connect.req. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REQ = 'usual.event.bluetooth.remotedevice.CONNECT_REQ', @@ -1327,7 +1423,8 @@ declare namespace commonEventManager { * Bluetooth.remotedevice.connect.reply. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_REPLY = 'usual.event.bluetooth.remotedevice.CONNECT_REPLY', @@ -1335,7 +1432,8 @@ declare namespace commonEventManager { * Bluetooth.remotedevice.connect.cancel. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_REMOTEDEVICE_CONNECT_CANCEL = 'usual.event.bluetooth.remotedevice.CONNECT_CANCEL', @@ -1343,7 +1441,8 @@ declare namespace commonEventManager { * Bluetooth.handsfreeunit.connect.state.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_CONNECT_STATE_UPDATE = 'usual.event.bluetooth.handsfreeunit.CONNECT_STATE_UPDATE', @@ -1351,7 +1450,8 @@ declare namespace commonEventManager { * Bluetooth.handsfreeunit.audio.state.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AUDIO_STATE_UPDATE = 'usual.event.bluetooth.handsfreeunit.AUDIO_STATE_UPDATE', @@ -1359,7 +1459,8 @@ declare namespace commonEventManager { * Bluetooth.handsfreeunit.ag.common.event. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_COMMON_EVENT = 'usual.event.bluetooth.handsfreeunit.AG_COMMON_EVENT', @@ -1367,7 +1468,8 @@ declare namespace commonEventManager { * Bluetooth.handsfreeunit.ag.call.state.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HANDSFREEUNIT_AG_CALL_STATE_UPDATE = 'usual.event.bluetooth.handsfreeunit.AG_CALL_STATE_UPDATE', @@ -1375,7 +1477,8 @@ declare namespace commonEventManager { * Bluetooth.host.state.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HOST_STATE_UPDATE = 'usual.event.bluetooth.host.STATE_UPDATE', @@ -1383,7 +1486,8 @@ declare namespace commonEventManager { * Bluetooth.host.req.discoverable. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HOST_REQ_DISCOVERABLE = 'usual.event.bluetooth.host.REQ_DISCOVERABLE', @@ -1391,7 +1495,8 @@ declare namespace commonEventManager { * Bluetooth.host.req.enable. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HOST_REQ_ENABLE = 'usual.event.bluetooth.host.REQ_ENABLE', @@ -1399,7 +1504,8 @@ declare namespace commonEventManager { * Bluetooth.host.req.disable. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HOST_REQ_DISABLE = 'usual.event.bluetooth.host.REQ_DISABLE', @@ -1407,7 +1513,8 @@ declare namespace commonEventManager { * Bluetooth.host.scan.mode.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HOST_SCAN_MODE_UPDATE = 'usual.event.bluetooth.host.SCAN_MODE_UPDATE', @@ -1415,7 +1522,8 @@ declare namespace commonEventManager { * Bluetooth.host.discovery.stated. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_STARTED = 'usual.event.bluetooth.host.DISCOVERY_STARTED', @@ -1423,7 +1531,8 @@ declare namespace commonEventManager { * Bluetooth.host.discovery.finished. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HOST_DISCOVERY_FINISHED = 'usual.event.bluetooth.host.DISCOVERY_FINISHED', @@ -1431,7 +1540,8 @@ declare namespace commonEventManager { * Bluetooth.host.name.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_HOST_NAME_UPDATE = 'usual.event.bluetooth.host.NAME_UPDATE', @@ -1439,7 +1549,8 @@ declare namespace commonEventManager { * Bluetooth.a2dp.connect.state.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_A2DPSINK_CONNECT_STATE_UPDATE = 'usual.event.bluetooth.a2dpsink.CONNECT_STATE_UPDATE', @@ -1447,7 +1558,8 @@ declare namespace commonEventManager { * Bluetooth.a2dp.playing.state.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_A2DPSINK_PLAYING_STATE_UPDATE = 'usual.event.bluetooth.a2dpsink.PLAYING_STATE_UPDATE', @@ -1455,7 +1567,8 @@ declare namespace commonEventManager { * Bluetooth.a2dp.audio.state.update. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ COMMON_EVENT_BLUETOOTH_A2DPSINK_AUDIO_STATE_UPDATE = 'usual.event.bluetooth.a2dpsink.AUDIO_STATE_UPDATE', @@ -1463,7 +1576,8 @@ declare namespace commonEventManager { * 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 +1585,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 +1594,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 +1603,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 +1612,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 +1622,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 +1631,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 +1640,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 +1650,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 +1659,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 +1669,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 +1679,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 +1688,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 +1697,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 +1706,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 +1715,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 +1725,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 +1735,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 +1745,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 +1755,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 +1765,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 +1776,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 +1787,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 +1797,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 +1807,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 +1817,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 +1827,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 +1837,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 +1847,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 +1857,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 +1867,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 +1877,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 +1887,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 +1897,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 +1907,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 +1917,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 +1927,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 +1937,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 +1947,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 +1958,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 +1969,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 +1980,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 +1991,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 +2002,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 +2012,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 +2023,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 +2033,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 +2043,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', @@ -1891,14 +2052,16 @@ declare namespace commonEventManager { * sent by the window manager service when the window mode is split. * * @syscap SystemCapability.Notification.CommonEvent - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ /** * sent by the window manager service when the window mode is split. * * @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 +2071,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 +2081,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 +2091,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 +2101,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 +2131,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 +2143,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 +2154,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 +2165,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 +2178,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 +2191,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 +2204,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 +2217,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 +2228,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 +2239,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 +2250,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 +2261,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 +2272,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 +2283,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 +2294,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 +2305,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 +2317,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 +2328,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 +2338,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 +2348,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 +2361,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 +2372,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 +2383,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 +2399,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 +2415,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 +2433,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 +2444,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,7 +2455,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_AUDIO_QUALITY_CHANGE = 'usual.event.AUDIO_QUALITY_CHANGE', @@ -2271,7 +2466,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_PRIVACY_STATE_CHANGED = 'usual.event.PRIVACY_STATE_CHANGED', @@ -2281,7 +2477,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 +2488,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 +2523,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 +2534,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 +2545,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,7 +2558,8 @@ 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', @@ -2366,7 +2568,8 @@ declare namespace commonEventManager { * 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 +2581,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 +2594,7 @@ declare namespace commonEventManager { * @syscap SystemCapability.Notification.CommonEvent * @systemapi * @since 20 + * @arkts 1.1&1.2 */ COMMON_EVENT_SHORTCUT_CHANGED = 'usual.event.SHORTCUT_CHANGED', diff --git a/api/@ohos.configPolicy.d.ts b/api/@ohos.configPolicy.d.ts index 30a15b2ab8421e2a160ed76c3d283e9a151ba42d..2bffaa511e3ed6ecf2ec479ed921aab40a669bd2 100644 --- a/api/@ohos.configPolicy.d.ts +++ b/api/@ohos.configPolicy.d.ts @@ -16,6 +16,7 @@ /** * @file * @kit BasicServicesKit + * @arkts 1.1&1.2 */ import { AsyncCallback } from './@ohos.base'; @@ -26,7 +27,7 @@ import { AsyncCallback } from './@ohos.base'; * @namespace configPolicy * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} */ declare namespace configPolicy { /** @@ -35,7 +36,7 @@ declare namespace configPolicy { * @enum { number } * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ export enum FollowXMode { /** @@ -43,7 +44,7 @@ declare namespace configPolicy { * * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ DEFAULT = 0, @@ -52,7 +53,7 @@ declare namespace configPolicy { * * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ NO_RULE_FOLLOWED = 1, @@ -61,7 +62,7 @@ declare namespace configPolicy { * * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ SIM_DEFAULT = 10, @@ -70,7 +71,7 @@ declare namespace configPolicy { * * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ SIM_1 = 11, @@ -79,7 +80,7 @@ declare namespace configPolicy { * * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ SIM_2 = 12, @@ -89,7 +90,7 @@ declare namespace configPolicy { * * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ USER_DEFINED = 100 } @@ -103,9 +104,9 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} */ - function getOneCfgFile(relPath: string, callback: AsyncCallback); + function getOneCfgFile(relPath: string, callback: AsyncCallback): void; /** * Gets the file from the highest priority config path containing the given file name in follow mode. @@ -117,9 +118,9 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ - function getOneCfgFile(relPath: string, followMode: FollowXMode, callback: AsyncCallback); + function getOneCfgFile(relPath: string, followMode: FollowXMode, callback: AsyncCallback): void; /** * Gets the file from the highest priority config path containing the given file name in follow mode. @@ -132,9 +133,9 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ - function getOneCfgFile(relPath: string, followMode: FollowXMode, extra: string, callback: AsyncCallback); + function getOneCfgFile(relPath: string, followMode: FollowXMode, extra: string, callback: AsyncCallback): void; /** * Gets the file from the highest priority config path containing the given file name. @@ -145,7 +146,7 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} */ function getOneCfgFile(relPath: string): Promise; @@ -160,7 +161,7 @@ declare namespace configPolicy { *
2.Incorrect parameter types; 3.Parameter verification failed. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ function getOneCfgFile(relPath: string, followMode: FollowXMode, extra?: string): Promise; @@ -175,7 +176,7 @@ declare namespace configPolicy { *
2.Incorrect parameter types; 3.Parameter verification failed. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ function getOneCfgFileSync(relPath: string, followMode?: FollowXMode, extra?: string): string; @@ -188,9 +189,9 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} */ - function getCfgFiles(relPath: string, callback: AsyncCallback>); + function getCfgFiles(relPath: string, callback: AsyncCallback>): void; /** * Gets the config files in device architecture in follow mode, ordered by priority from low to high. @@ -202,9 +203,9 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ - function getCfgFiles(relPath: string, followMode: FollowXMode, callback: AsyncCallback>); + function getCfgFiles(relPath: string, followMode: FollowXMode, callback: AsyncCallback>): void; /** * Gets the config files in device architecture in follow mode, ordered by priority from low to high. @@ -217,9 +218,9 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ - function getCfgFiles(relPath: string, followMode: FollowXMode, extra: string, callback: AsyncCallback>); + function getCfgFiles(relPath: string, followMode: FollowXMode, extra: string, callback: AsyncCallback>): void; /** * Gets the config files in device architecture, ordered by priority from low to high. @@ -230,7 +231,7 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} */ function getCfgFiles(relPath: string): Promise>; @@ -245,7 +246,7 @@ declare namespace configPolicy { *
2.Incorrect parameter types; 3.Parameter verification failed. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ function getCfgFiles(relPath: string, followMode: FollowXMode, extra?: string): Promise>; @@ -260,7 +261,7 @@ declare namespace configPolicy { *
2.Incorrect parameter types; 3.Parameter verification failed. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} */ function getCfgFilesSync(relPath: string, followMode?: FollowXMode, extra?: string): Array; @@ -272,9 +273,9 @@ declare namespace configPolicy { *
2.Incorrect parameter types. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} */ - function getCfgDirList(callback: AsyncCallback>); + function getCfgDirList(callback: AsyncCallback>): void; /** * Gets the config directory in the device architecture, ordered by priority from low to high. @@ -291,7 +292,7 @@ declare namespace configPolicy { * @returns { Promise> } the promise returns the list of configuration level directories. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ function getCfgDirList(): Promise>; @@ -310,7 +311,7 @@ declare namespace configPolicy { * @returns { Array } the list of configuration level directories. * @syscap SystemCapability.Customization.ConfigPolicy * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} */ function getCfgDirListSync(): Array; } 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.static.d.ets b/api/@ohos.curves.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..27a99ab5368b1534d035fcc04bb20f39645f22c6 --- /dev/null +++ b/api/@ohos.curves.static.d.ets @@ -0,0 +1,361 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ + +/** + * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. + * + * @namespace curves + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare namespace curves { + + /** + * enum Curve. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export enum Curve { + + /** + * Linear. Indicates that the animation has the same velocity from start to finish. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + 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 20 + */ + 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 20 + */ + 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 20 + */ + 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 20 + */ + EaseInOut, + + /** + * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + FastOutSlowIn, + + /** + * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LinearOutSlowIn, + + /** + * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + FastOutLinearIn, + + /** + * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ExtremeDeceleration, + + /** + * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Sharp, + + /** + * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Rhythm, + + /** + * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Smooth, + + /** + * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + Friction + } + + /** + * Interface for curve object. + * + * @interface ICurve + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export 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 20 + */ + interpolate(fraction: number): number; + } + + /** + * Implements initialization for the interpolation curve, + * which is used to create an interpolation curve based on the input parameter. + * + * @param { Curve } [curve] - Curve type.
Default value: **Curve.Linear**. + * @returns { ICurve } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function initCurve(curve?: Curve): ICurve; + + /** + * Creates a step curve. + * + * @param { number } count - Number of steps. The value must be a positive integer.
Value range: [1, +∞). + *

**NOTE**: + *
A value less than 1 evaluates to the value **1**. + *

+ * @param { boolean } end -Whether jumping occurs when the interpolation ends. + * **true**: Jumping occurs when the interpolation ends. + * *false**: Jumping occurs when the interpolation starts. + * @returns { ICurve } Interpolation curve. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function stepsCurve(count: number, end: boolean): ICurve; + + /** + * Creates a custom curve. + * + * @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 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 transitions + *
from that end value to the value of the state variable. + *

+ * @returns { ICurve } Interpolation curve. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function customCurve(interpolate: (fraction: number) => number): ICurve; + + /** + * Creates a cubic Bezier curve. The curve values must be between 0 and 1. + * + * @param { number } x1 - X coordinate of the first point on the Bezier curve.
Value range: [0, 1]. + *

**NOTE**: + *
A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**. + *

+ * @param { number } y1 - Y coordinate of the first point on the Bezier curve.
Value range: (-∞, +∞). + * @param { number } x2 - X coordinate of the second point on the Bezier curve.
Value range: [0, 1]. + *

**NOTE**: + *
A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**. + *

+ * @param { number } y2 - Y coordinate of the second point on the Bezier curve.
Value range: (-∞, +∞). + * @returns { ICurve } Interpolation curve. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve; + + /** + * Creates a spring curve. The curve shape is subject to the spring parameters, and the animation duration + * is subject to the **duration** parameter in **animation** and **animateTo**. + * + * @param { number } velocity - Initial velocity. It is applied by external factors to the spring animation, + * designed to help ensure the smooth transition from the previous motion state. The velocity is the normalized + * velocity, and its value is equal to the actual velocity at the beginning of the animation divided by the + * animation attribute change value.Value range: (-∞, +∞). + * @param { number } mass - Mass, which influences the inertia in the spring system. The greater the mass, + * the greater the amplitude of the oscillation, and the slower the speed of restoring to the equilibrium position. + * Value range: (0, +∞). + *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the value 1 is used. + *

+ * @param { number } stiffness - Stiffness.It is the degree to which an object deforms by resisting the force + * applied. In an elastic system, the greater the stiffness, the stronger the ability to resist deformation, + * and the faster the speed of restoring to the equilibrium position.Value range: (0, +∞). + *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the value 1 is used. + *

+ * @param { number } damping -Damping. It is used to describe the oscillation and attenuation of the system + * after being disturbed. The larger the damping, the smaller the number of oscillations of elastic motion, + * and the smaller the oscillation amplitude.Value range: (0, +∞). + *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the value 1 is used. + *

+ * @returns { ICurve } Interpolation curve. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve; + + /** + * Creates a spring animation curve. + * If multiple spring animations are applied to the same attribute of an object, + * each animation replaces their predecessor and inherits the velocity. + * + * @param { number } [response] Duration of one complete oscillation. + *
Default value: **0.55**.
Unit: second
Value range: (0, +∞). + *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the default value **0.55** is used. + *

+ * @param { number } [dampingFraction] Damping coefficient. + * **0**: undamped. In this case, the spring oscillates forever.
> 0 and < 1: underdamped. + * In this case, the spring overshoots the equilibrium position.
**1**: critically damped. + * 1: overdamped. In this case, the spring approaches equilibrium gradually.
Default value: **0.825**. + * Unit: second. + * Value range: [0, +∞). + *

**NOTE**: + *
A value less than 0 evaluates to the default value **0.825**. + *

+ * @param { number } [overlapDuration] Duration for animations to overlap, in seconds. + * When animations overlap, the **response** values of these animations will transit smoothly over this duratio + * if they are different.
Default value: **0**
Unit: second
Value range: [0, +∞). + *

**NOTE** + *
A value less than 0 evaluates to the default value **0**. + *
The spring animation curve is physics-based. Its duration depends on the **springMotion** parameters and + * the previous velocity, rather than the **duration** parameter in animation, animateTo, or pageTransition. + * The time cannot be normalized. Therefore, the interpolation cannot be obtained using + * the **interpolate** function of the curve. + *

+ * @returns { ICurve } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; + + /** + * Creates a responsive spring animation curve. It is a special case of [springMotion](#curvesspringmotion9), + * with the only difference in the default values. It can be used together with **springMotion**. + * + * @param { number } [response] See **response** in **springMotion**.
Default value: **0.15**. + * Unit: second
Value range: (0, +∞). + *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the default value **0.15** is used. + *

+ * @param { number } [dampingFraction] See **dampingFraction** in **springMotion**.
Default value: **0.86**. + * Unit: second
Value range: [0, +∞). + *

**NOTE** + *
A value less than 0 evaluates to the default value **0.86**. + *

+ * @param { number } [overlapDuration] See **overlapDuration** in **springMotion**.
Default value: **0.25**. + * Unit: second
Value range: [0, +∞). + *

**NOTE**: + *
A value less than 0 evaluates to the default value **0.25**. + *
To apply custom settings for a spring animation, you are advised to use **springMotion**. + *
When using **responsiveSpringMotion**, you are advised to retain the default settings. + *
The duration of the responsive spring animation depends on the **responsiveSpringMotion** parameters and the + * previous velocity, rather than the duration parameter in animation, animateTo, or pageTransition. + *
In addition, the interpolation cannot be obtained using the **interpolate** function of the curve. + *

+ * @returns { ICurve } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; + + /** + * Creates an interpolating spring curve animated from 0 to 1. The actual animation value is calculated based + * on the curve. The animation duration is subject to the curve parameters, rather than the **duration** parameter + * in **animation** or **animateTo**. + * + * @param { number } velocity - Initial velocity. It is applied by external factors to the spring animation, + * designed to help ensure the smooth transition from the previous motion state. + * The velocity is the normalized velocity, and its value is equal to the actual velocity at the beginning of + * the animation divided by the animation attribute change value.
Value range: (-∞, +∞). + * @param { number } mass - Mass, which influences the inertia in the spring system. The greater the mass, + * the greater the amplitude of the oscillation, and the slower the speed of restoring to the equilibrium position. + *
Value range: (0, +∞). + *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the value **1** is used. + *

+ * @param { number } stiffness - Stiffness. It is the degree to which an object deforms by resisting + * the force applied. In an elastic system, the greater the stiffness, the stronger the ability to resist + * deformation, and the faster the speed of restoring to the equilibrium position.
Value range: (0, +∞). + *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the value **1** is used. + *

+ * @param { number } damping - Damping. It is used to describe the oscillation and attenuation of the system + * after being disturbed. The larger the damping, the smaller the number of oscillations of elastic motion, + * and the smaller the oscillation amplitude.
Value range: (0, +∞)
+ *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the value **1** is used. + *

+ * @returns { ICurve } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export function interpolatingSpring(velocity: number, mass: number, stiffness: number, damping: number): ICurve; +} +export default curves; diff --git a/api/@ohos.customization.customConfig.d.ts b/api/@ohos.customization.customConfig.d.ts index 2717e051140dbc2b2b91b469c40262e380d3d857..0dfc711b0c4124d7305b9db15f95ff0bb55d7210 100644 --- a/api/@ohos.customization.customConfig.d.ts +++ b/api/@ohos.customization.customConfig.d.ts @@ -16,6 +16,7 @@ /** * @file * @kit BasicServicesKit + * @arkts 1.1&1.2 */ /** @@ -31,7 +32,7 @@ * @namespace customConfig * @syscap SystemCapability.Customization.CustomConfig * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} */ declare namespace customConfig { @@ -48,7 +49,7 @@ declare namespace customConfig { * @returns { string } the channelId or empty if not exist. * @syscap SystemCapability.Customization.CustomConfig * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} */ function getChannelId(): string; diff --git a/api/@ohos.data.DataShareResultSet.d.ts b/api/@ohos.data.DataShareResultSet.d.ts index e637a1a69847fc3269ac620c28c3ed269a52ec5d..e6778af933c81dee17bf2d70fb352fa3c519cf75 100644 --- a/api/@ohos.data.DataShareResultSet.d.ts +++ b/api/@ohos.data.DataShareResultSet.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 @@ -161,7 +161,8 @@ export default interface DataShareResultSet { * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ goToLastRow(): boolean; @@ -173,7 +174,8 @@ export default interface DataShareResultSet { * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ goToNextRow(): boolean; @@ -254,7 +256,8 @@ export default interface DataShareResultSet { * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getLong(columnIndex: number): number; diff --git a/api/@ohos.data.cloudData.d.ts b/api/@ohos.data.cloudData.d.ts index f068180d4df59c8614c5c70647f3210ff86d2bc2..f1790cbb7117a25d61507ad7213f3c2df0836724 100644 --- a/api/@ohos.data.cloudData.d.ts +++ b/api/@ohos.data.cloudData.d.ts @@ -33,7 +33,7 @@ declare namespace cloudData { /** * Describes the clear action type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Config * @systemapi * @since 10 @@ -130,38 +130,38 @@ declare namespace cloudData { /** * Number of records to be inserted to the cloud. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Config * @systemapi * @since 12 */ - inserted: number; + inserted: int; /** * Number of inconsistent records between the local device and the cloud. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Config * @systemapi * @since 12 */ - updated: number; + updated: int; /** * Number of consistent records between the local device and the cloud. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Config * @systemapi * @since 12 */ - normal: number; + normal: int; } /** * Describes sync status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Config * @systemapi * @since 18 @@ -407,7 +407,7 @@ declare namespace cloudData { * @permission ohos.permission.CLOUDDATA_CONFIG * @param { ExtraData } extInfo - Indicates the extra data for * notification {@link ExtraData}. - * @param { number } [userId] - Indicates the user ID. + * @param { int } [userId] - Indicates the user ID. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 201 - Permission verification failed, which * is usually returned by VerifyAccessToken. @@ -419,7 +419,7 @@ declare namespace cloudData { * @systemapi * @since 11 */ - static notifyDataChange(extInfo: ExtraData, userId?: number): Promise; + static notifyDataChange(extInfo: ExtraData, userId?: int): Promise; /** * Notifies changes of the cloud records. @@ -447,7 +447,7 @@ declare namespace cloudData { * @permission ohos.permission.CLOUDDATA_CONFIG * @param { ExtraData } extInfo - Indicates the extra data for * notification {@link ExtraData}. - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @param { AsyncCallback } callback - Indicates the callback invoked * to return the data changes. * @throws { BusinessError } 201 - Permission verification failed, which @@ -460,7 +460,7 @@ declare namespace cloudData { * @systemapi * @since 11 */ - static notifyDataChange(extInfo: ExtraData, userId: number, callback: AsyncCallback): void; + static notifyDataChange(extInfo: ExtraData, userId: int, callback: AsyncCallback): void; /** * notifies changes of the cloud records @@ -668,7 +668,7 @@ declare namespace cloudData { /** * Enumerates the strategy types of cloud sync. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @since 12 */ @@ -686,7 +686,7 @@ declare namespace cloudData { /** * Enumerates the types of cloud sync via the network. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @since 12 */ @@ -735,7 +735,7 @@ declare namespace cloudData { /** * Enumerates the roles. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @systemapi * @since 11 @@ -763,7 +763,7 @@ declare namespace cloudData { /** * Enumerates the states of sharing invitation. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @systemapi * @since 11 @@ -818,7 +818,7 @@ declare namespace cloudData { /** * Enumerates the error code of sharing invitation. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @systemapi * @since 11 @@ -963,12 +963,12 @@ declare namespace cloudData { /** * Error code. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Client * @systemapi * @since 11 */ - code: number; + code: int; /** * Error code description. diff --git a/api/@ohos.data.cloudExtension.d.ts b/api/@ohos.data.cloudExtension.d.ts index e00e9d93b46e13e262ebafea6e182562420bab98..eaf631e30bfbfb9edefe54609fd7411e74641575 100644 --- a/api/@ohos.data.cloudExtension.d.ts +++ b/api/@ohos.data.cloudExtension.d.ts @@ -74,12 +74,12 @@ declare namespace cloudExtension { /** * Indicates possible cloud types. * - * @typedef { null | number | string | boolean | Uint8Array | CloudAsset | CloudAssets } CloudType + * @typedef { null | long | double | string | boolean | Uint8Array | CloudAsset | CloudAssets } CloudType * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - type CloudType = null | number | string | boolean | Uint8Array | CloudAsset | CloudAssets; + type CloudType = null | long | double | string | boolean | Uint8Array | CloudAsset | CloudAssets; /** * Defines cloud information. @@ -144,32 +144,32 @@ declare namespace cloudExtension { /** * Total space (in KB) of the account on the server. * - * @type { number } + * @type { long } * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - totalSpace: number; + totalSpace: long; /** * Available space (in KB) of the account on the server. * - * @type { number } + * @type { long } * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - remainingSpace: number; + remainingSpace: long; /** * Current user of the device. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - user: number; + user: int; } /** @@ -216,18 +216,18 @@ declare namespace cloudExtension { /** * Application instance ID. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - instanceId: number; + instanceId: int; } /** * Enumerates the field types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 @@ -469,12 +469,12 @@ declare namespace cloudExtension { /** * Schema version. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - version: number; + version: int; /** * Databases {@link Database} of the application. @@ -540,12 +540,12 @@ declare namespace cloudExtension { /** * Subscription expiration time, in milliseconds. * - * @type { number } + * @type { long } * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - expirationTime: number; + expirationTime: long; /** * Data to be observed. @@ -591,7 +591,7 @@ declare namespace cloudExtension { /** * Enumerates the operations that can be performed on the database. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 @@ -650,24 +650,24 @@ declare namespace cloudExtension { /** * Time when the row data was created. * - * @type { number } + * @type { long } * @readonly * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - readonly createTime: number; + readonly createTime: long; /** * Time when the row data was last modified. * - * @type { number } + * @type { long } * @readonly * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - readonly modifyTime: number; + readonly modifyTime: long /** * Database operation. @@ -693,28 +693,28 @@ declare namespace cloudExtension { /** * Duration for which the cloud database is locked, in seconds. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - interval: number; + interval: int; /** * Lock ID for locking the cloud database. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - lockId: number; + lockId: int; } /** * Enumerates the error codes. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 @@ -796,12 +796,12 @@ declare namespace cloudExtension { /** * Error code. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - code: number; + code: int; /** * Error code description. @@ -881,13 +881,13 @@ declare namespace cloudExtension { * Generates the IDs of the rows of data to be inserted to the cloud. * The IDs must be unique for each table. * - * @param { number } count - Indicates the number of IDs to generate. + * @param { int } count - Indicates the number of IDs to generate. * @returns { Promise>> } Returns the IDs generated. * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - generateId(count: number): Promise>>; + generateId(count: int): Promise>>; /** * Inserts data to the cloud. @@ -946,7 +946,7 @@ declare namespace cloudExtension { * * @param { string } table - Indicates the table name. * @param { Array } fields - Indicates the columns to query. - * @param { number } queryCount - Indicates the number of data records + * @param { int } queryCount - Indicates the number of data records * to query. * @param { string } queryCursor - Indicates the cursor. * @returns { Promise> } Returns the query result. @@ -954,7 +954,7 @@ declare namespace cloudExtension { * @systemapi * @since 11 */ - query(table: string, fields: Array, queryCount: number, queryCursor: string): Promise>; + query(table: string, fields: Array, queryCount: int, queryCursor: string): Promise>; /** * Locks the cloud database. @@ -972,24 +972,24 @@ declare namespace cloudExtension { /** * Uses the heartbeat to extend the lock interval if it is not enough. * - * @param { number } lockId - Indicates the lock ID of the heartbeat. + * @param { int } lockId - Indicates the lock ID of the heartbeat. * @returns { Promise> } Returns the time. * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - heartbeat(lockId: number): Promise>; + heartbeat(lockId: int): Promise>; /** * Unlocks the cloud database. * - * @param { number } lockId - Indicates the lock ID. + * @param { int } lockId - Indicates the lock ID. * @returns { Promise> } Returns the unlock result. * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - unlock(lockId: number): Promise>; + unlock(lockId: int): Promise>; } /** @@ -1041,7 +1041,7 @@ declare namespace cloudExtension { /** * Shares data with specific participants. * - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @param { string } bundleName - Indicates the bundle name. * @param { string } sharingResource - Indicates the sharing resource. * @param { Array } participants - Indicates the participant. @@ -1051,7 +1051,7 @@ declare namespace cloudExtension { * @since 11 */ share( - userId: number, + userId: int, bundleName: string, sharingResource: string, participants: Array @@ -1060,7 +1060,7 @@ declare namespace cloudExtension { /** * UnShares data with specific participants. * - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @param { string } bundleName - Indicates the bundle name. * @param { string } sharingResource - Indicates the sharing resource. * @param { Array } participants - Indicates the participant. @@ -1070,7 +1070,7 @@ declare namespace cloudExtension { * @since 11 */ unshare( - userId: number, + userId: int, bundleName: string, sharingResource: string, participants: Array @@ -1079,7 +1079,7 @@ declare namespace cloudExtension { /** * Exits the sharing. * - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @param { string } bundleName - Indicates the bundle name. * @param { string } sharingResource - Indicates the sharing resource. * @returns { Promise> } Returns the exit result. @@ -1087,12 +1087,12 @@ declare namespace cloudExtension { * @systemapi * @since 11 */ - exit(userId: number, bundleName: string, sharingResource: string): Promise>; + exit(userId: int, bundleName: string, sharingResource: string): Promise>; /** * Changes privilege of the specific participants. * - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @param { string } bundleName - Indicates the bundle name. * @param { string } sharingResource - Indicates the sharing resource. * @param { Array } participants - Indicates the participant. @@ -1102,7 +1102,7 @@ declare namespace cloudExtension { * @since 11 */ changePrivilege( - userId: number, + userId: int, bundleName: string, sharingResource: string, participants: Array @@ -1111,7 +1111,7 @@ declare namespace cloudExtension { /** * Queries participants of the specific sharing resource. * - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @param { string } bundleName - Indicates the bundle name. * @param { string } sharingResource - Indicates the sharing resource. * @returns { Promise>> } Returns the query result. @@ -1120,7 +1120,7 @@ declare namespace cloudExtension { * @since 11 */ queryParticipants( - userId: number, + userId: int, bundleName: string, sharingResource: string ): Promise>>; @@ -1128,7 +1128,7 @@ declare namespace cloudExtension { /** * Queries participants based on the specified invitation code. * - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @param { string } bundleName - Indicates the bundle name. * @param { string } invitationCode - Indicates the invitation code. * @returns { Promise>> } Returns the query result. @@ -1137,7 +1137,7 @@ declare namespace cloudExtension { * @since 11 */ queryParticipantsByInvitation( - userId: number, + userId: int, bundleName: string, invitationCode: string ): Promise>>; @@ -1145,7 +1145,7 @@ declare namespace cloudExtension { /** * Confirms invitation. * - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @param { string } bundleName - Indicates the bundle name. * @param { string } invitationCode - Indicates the invitation code. * @param { cloudData.sharing.State } state - Indicates the state. @@ -1155,7 +1155,7 @@ declare namespace cloudExtension { * @since 11 */ confirmInvitation( - userId: number, + userId: int, bundleName: string, invitationCode: string, state: cloudData.sharing.State @@ -1164,7 +1164,7 @@ declare namespace cloudExtension { /** * Changes confirmation. * - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @param { string } bundleName - Indicates the bundle name. * @param { string } sharingResource - Indicates the sharing resource. * @param { cloudData.sharing.State } state - Indicates the state. @@ -1174,7 +1174,7 @@ declare namespace cloudExtension { * @since 11 */ changeConfirmation( - userId: number, + userId: int, bundleName: string, sharingResource: string, state: cloudData.sharing.State @@ -1231,7 +1231,7 @@ declare namespace cloudExtension { * @param { Record> } subInfo - Indicates * the data to be subscribed to, that is, the key-value pairs corresponding * to an array of bundle names and databases. - * @param { number } expirationTime - Indicates the subscription expiration + * @param { long } expirationTime - Indicates the subscription expiration * time. * @returns { Promise> } Returns SubscribeInfo. * @syscap SystemCapability.DistributedDataManager.CloudSync.Server @@ -1240,7 +1240,7 @@ declare namespace cloudExtension { */ subscribe( subInfo: Record>, - expirationTime: number + expirationTime: long ): Promise>; /** @@ -1249,12 +1249,12 @@ declare namespace cloudExtension { * @param { Record> } unsubscribeInfo - Indicates * the data to be unsubscribe from, that is, the key-value pairs * corresponding to an array of bundle names and databases. - * @returns { Promise } Returns unsubscribeInfo result. + * @returns { Promise } Returns unsubscribeInfo result. * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - unsubscribe(unsubscribeInfo: Record>): Promise; + unsubscribe(unsubscribeInfo: Record>): Promise; /** * Connects to a database. @@ -1283,14 +1283,14 @@ declare namespace cloudExtension { /** * Connects to a share center. * - * @param { number } userId - Indicates the user ID. + * @param { int } userId - Indicates the user ID. * @param { string } bundleName - Indicates the bundle name. * @returns { Promise } Returns shareCenter RemoteObject. * @syscap SystemCapability.DistributedDataManager.CloudSync.Server * @systemapi * @since 11 */ - connectShareCenter(userId: number, bundleName: string): Promise; + connectShareCenter(userId: int, bundleName: string): Promise; } } diff --git a/api/@ohos.data.dataShare.d.ts b/api/@ohos.data.dataShare.d.ts index 8256ff332d3d5864e13e4cdf14ac3a0d7feefbe7..24a53a0d9497d1f745df7ebef4cf3a0174062eb8 100644 --- a/api/@ohos.data.dataShare.d.ts +++ b/api/@ohos.data.dataShare.d.ts @@ -76,7 +76,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ waitTime?: number; } @@ -276,7 +277,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface TemplateId { /** @@ -287,7 +289,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ subscriberId: string; /** @@ -298,7 +301,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleNameOfOwner: string; } @@ -310,7 +314,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface PublishedItem { /** @@ -320,7 +325,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ key: string; /** @@ -331,7 +337,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ data: string | ArrayBuffer; /** @@ -341,7 +348,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ subscriberId: string; } @@ -353,7 +361,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface RdbDataChangeNode { /** @@ -363,7 +372,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ uri: string; /** @@ -373,7 +383,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ templateId: TemplateId; /** @@ -385,7 +396,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ data: Array; } @@ -397,7 +409,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface PublishedDataChangeNode { /** @@ -407,7 +420,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; /** @@ -417,7 +431,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ data: Array; } @@ -429,7 +444,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface Template { /** @@ -441,7 +457,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ /** * Specifies the predicates of the template. @@ -452,7 +469,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ predicates: Record; @@ -464,7 +482,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ scheduler: string; @@ -476,7 +495,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ update?: string; } @@ -487,7 +507,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface OperationResult { /** @@ -497,7 +518,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ key: string; @@ -508,7 +530,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ result: number; } @@ -826,7 +849,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ addTemplate(uri: string, subscriberId: string, template: Template): void; @@ -856,7 +880,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ delTemplate(uri: string, subscriberId: string): void; @@ -890,7 +915,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ on( type: 'rdbDataChange', @@ -929,7 +955,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ off( type: 'rdbDataChange', @@ -968,7 +995,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ on( type: 'publishedDataChange', @@ -1007,7 +1035,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ off( type: 'publishedDataChange', @@ -1046,7 +1075,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ publish( data: Array, @@ -1083,7 +1113,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ publish( data: Array, @@ -1121,7 +1152,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ publish(data: Array, bundleName: string, version?: number): Promise>; @@ -1213,7 +1245,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ insert(uri: string, value: ValuesBucket, callback: AsyncCallback): void; @@ -1245,7 +1278,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ insert(uri: string, value: ValuesBucket): Promise; @@ -1277,7 +1311,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ delete(uri: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback): void; @@ -1309,7 +1344,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ delete(uri: string, predicates: dataSharePredicates.DataSharePredicates): Promise; @@ -1515,7 +1551,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ batchInsert(uri: string, values: Array, callback: AsyncCallback): void; @@ -1545,7 +1582,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ batchInsert(uri: string, values: Array): Promise; @@ -1770,7 +1808,8 @@ declare namespace dataShare { * @syscap SystemCapability.DistributedDataManager.DataShare.Consumer * @systemapi * @stagemodelonly - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ close(): Promise; } diff --git a/api/@ohos.data.dataSharePredicates.d.ts b/api/@ohos.data.dataSharePredicates.d.ts index 4844a98ec88457e0eed534968ef81cb89fd02a19..7808ee95ba7b086964f3806d00b66e0e4e2e6ebd 100644 --- a/api/@ohos.data.dataSharePredicates.d.ts +++ b/api/@ohos.data.dataSharePredicates.d.ts @@ -279,7 +279,8 @@ declare namespace dataSharePredicates { * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ isNull(field: string): DataSharePredicates; @@ -293,7 +294,8 @@ declare namespace dataSharePredicates { * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ isNotNull(field: string): DataSharePredicates; @@ -359,7 +361,8 @@ declare namespace dataSharePredicates { * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ between(field: string, low: ValueType, high: ValueType): DataSharePredicates; @@ -434,7 +437,8 @@ declare namespace dataSharePredicates { * @syscap SystemCapability.DistributedDataManager.DataShare.Core * @systemapi * @StageModelOnly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ lessThanOrEqualTo(field: string, value: ValueType): DataSharePredicates; diff --git a/api/@ohos.data.distributedDataObject.d.ts b/api/@ohos.data.distributedDataObject.d.ts index e11cc4ae833c1428d9ebd3cd9681562e5e6ff396..676efeb11b3446c56fb7884f25e322e86f9e1049 100644 --- a/api/@ohos.data.distributedDataObject.d.ts +++ b/api/@ohos.data.distributedDataObject.d.ts @@ -140,11 +140,11 @@ declare namespace distributedDataObject { /** * version of saved object, can compare with DistributedObject.__version * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject * @since 9 */ - version: number; + version: int; /** * deviceid that data saved @@ -202,18 +202,6 @@ declare namespace distributedDataObject { */ type StatusObserver = (sessionId: string, networkId: string, status: string) => void; - /** - * Defines a callback used to return the asset sync progress. - * - * @typedef { function } ProcessObserver - * @param { string } sessionId - Session ID of the observed object. - * @param { number } progress - Asset sync progress. The value range is -1 to 100, where - *
100 indicates that the asset sync is complete and -1 indicates that the asset sync failed. - * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject - * @since 20 - */ - type ProgressObserver = (sessionId: string, progress: number) => void; - /** * Object create by {@link createDistributedObject}. * @@ -607,29 +595,6 @@ declare namespace distributedDataObject { */ off(type: 'status', callback?: StatusObserver): void; - /** - * On watch of progress. - * - * @param { 'progressChanged' } type - Event type, fixed as 'progressChanged', indicates the progress of asset sync - *
in object. - * @param { ProgressObserver } callback - The observer of progress of asset sync. - * @syscap SystemCapability.DistributedDataManager.DataObject.DistributedObject - * @since 20 - */ - on(type: 'progressChanged', callback: ProgressObserver): void; - - /** - * Off watch of process. - * - * @param { 'progressChanged' } type - Event type, fixed as 'progressChanged', indicates the progress of asset sync - *
in object. - * @param { ProgressObserver } [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 - */ - off(type: 'progressChanged', callback?: ProgressObserver): void; - /** * Mark an attribute of a distributed object as an asset type. This interface must be called before setSessionId. * diff --git a/api/@ohos.data.preferences.d.ts b/api/@ohos.data.preferences.d.ts index 59e4f91fdad93c7fe066c52a6d22beddef63e553..e190beed2e49d4755027ed990186c41ee6ee2ea6 100644 --- a/api/@ohos.data.preferences.d.ts +++ b/api/@ohos.data.preferences.d.ts @@ -114,7 +114,8 @@ declare namespace preferences { * @syscap SystemCapability.DistributedDataManager.Preferences.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ const MAX_KEY_LENGTH: number; @@ -1825,7 +1826,8 @@ declare namespace preferences { * @syscap SystemCapability.DistributedDataManager.Preferences.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ flushSync(): void; @@ -1864,7 +1866,8 @@ declare namespace preferences { * @syscap SystemCapability.DistributedDataManager.Preferences.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'change', callback: Callback): void; @@ -1892,7 +1895,8 @@ declare namespace preferences { * @throws { BusinessError } 15500019 - Failed to obtain the subscription service. * @syscap SystemCapability.DistributedDataManager.Preferences.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'multiProcessChange', callback: Callback): void; @@ -1923,7 +1927,8 @@ declare namespace preferences { * @syscap SystemCapability.DistributedDataManager.Preferences.Core * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'dataChange', keys: Array, callback: Callback>): void; @@ -1962,7 +1967,8 @@ declare namespace preferences { * @syscap SystemCapability.DistributedDataManager.Preferences.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'change', callback?: Callback): void; @@ -1988,7 +1994,8 @@ declare namespace preferences { * @throws { BusinessError } 15500000 - Inner error. * @syscap SystemCapability.DistributedDataManager.Preferences.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'multiProcessChange', callback?: Callback): void; @@ -2019,7 +2026,8 @@ declare namespace preferences { * @syscap SystemCapability.DistributedDataManager.Preferences.Core * @crossplatform * @atomicservice - * @since 20 + * @since arkts {'1.1':'20', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'dataChange', keys: Array, callback?: Callback>): void; } diff --git a/api/@ohos.data.relationalStore.d.ts b/api/@ohos.data.relationalStore.d.ts index 886d4d14fc1858dc08fbc19b519073ec67530996..1a5abaf09fd8208ef0e26a6402856bfc0bce7674 100644 --- a/api/@ohos.data.relationalStore.d.ts +++ b/api/@ohos.data.relationalStore.d.ts @@ -44,7 +44,7 @@ declare namespace relationalStore { /** * Describes the status of asset * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since arkts {'1.1':'10', '1.2':'20'} @@ -229,13 +229,13 @@ declare namespace relationalStore { /** * Indicates possible value types * - * @typedef { null | number | string | boolean | Uint8Array | Asset | Assets | Float32Array | bigint } ValueType + * @typedef { null | long | double | string | boolean | Uint8Array | Asset | Assets | Float32Array | bigint } ValueType * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - type ValueType = null | number | string | boolean | Uint8Array | Asset | Assets | Float32Array | bigint; + type ValueType = null | long | double | string | boolean | Uint8Array | Asset | Assets | Float32Array | bigint; /** * Values in buckets are stored in key-value pairs @@ -266,18 +266,20 @@ declare namespace relationalStore { /** * The type of the priority key can be number or string * - * @typedef { number | string } PRIKeyType + * @typedef { long | string } PRIKeyType * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - type PRIKeyType = number | string; + type PRIKeyType = long | string; /** * The time is in UTC format. * * @typedef { Date } UTCTime * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ type UTCTime = Date; @@ -286,7 +288,8 @@ declare namespace relationalStore { * * @typedef { Map } ModifyTime * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ type ModifyTime = Map; @@ -520,7 +523,7 @@ declare namespace relationalStore { /** * Enumerates the high availability modes of the RDB store. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} @@ -599,13 +602,13 @@ declare namespace relationalStore { * Default number is 10000. * When the number is set to 0, use default iteration number and encryption algorithm. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 * @arkts 1.1&1.2 */ - iterationCount?: number; + iterationCount?: int; /** * Specifies the encryption algorithm when opening an encrypted database. @@ -679,13 +682,13 @@ declare namespace relationalStore { * Specifies the page size used when opening an encrypted database. * Default crypto page size is 1024. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 * @arkts 1.1&1.2 */ - cryptoPageSize?: number; + cryptoPageSize?: int; } /** @@ -698,7 +701,7 @@ declare namespace relationalStore { /** * Enumerates the supported encryption algorithm when opening a database. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 @@ -748,7 +751,7 @@ declare namespace relationalStore { /** * Enumerates the supported HMAC algorithm when opening a database. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 @@ -814,7 +817,7 @@ declare namespace relationalStore { /** * Enumerates the supported KDF algorithm when opening a database. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 @@ -1135,6 +1138,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ interface SqlExecutionInfo { /** @@ -1151,6 +1155,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ sql: Array; @@ -1164,12 +1169,13 @@ declare namespace relationalStore { /** * Total time used for executing the SQL statements, in μs. * - * @type { number } + * @type { long } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ - totalTime: number; + totalTime: long; /** * Maximum time allowed to obtain the SQL file handle, in μs. @@ -1181,12 +1187,13 @@ declare namespace relationalStore { /** * Maximum time allowed to obtain the SQL file handle, in μs. * - * @type { number } + * @type { long } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ - waitTime: number; + waitTime: long; /** * Time used to prepare SQL and args, in μs. @@ -1198,12 +1205,13 @@ declare namespace relationalStore { /** * Time used to prepare SQL and args, in μs. * - * @type { number } + * @type { long } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ - prepareTime: number; + prepareTime: long; /** * Time used to execute the SQL statements, in μs. @@ -1215,12 +1223,13 @@ declare namespace relationalStore { /** * Time used to execute the SQL statements, in μs. * - * @type { number } + * @type { long } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ - executeTime: number; + executeTime: long; } /** @@ -1235,12 +1244,12 @@ declare namespace relationalStore { /** * Error code returned by SQLite, see {@link https://www.sqlite.org/rescode.html}. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 */ - code: number; + code: int; /** * Error message. @@ -1296,7 +1305,7 @@ declare namespace relationalStore { /** * Describes the {@code RdbStore} type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since arkts {'1.1':'9', '1.2':'20'} @@ -1351,7 +1360,7 @@ declare namespace relationalStore { /** * Indicates the database synchronization mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -1400,7 +1409,7 @@ declare namespace relationalStore { /** * Describes the subscription type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 9 */ @@ -1455,7 +1464,7 @@ declare namespace relationalStore { /** * Describes the change type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ @@ -1521,31 +1530,31 @@ declare namespace relationalStore { * Indicates if there is a string primary key, the inserted will keep data's primary keys * otherwise it will keep the data's rowid. * - * @type { Array | Array } + * @type { Array | Array } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ - inserted: Array | Array; + inserted: Array | Array; /** * Indicates if there is a string primary key, the updated will keep data's primary keys * otherwise it will keep the data's rowid. * - * @type { Array | Array } + * @type { Array | Array } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ - updated: Array | Array; + updated: Array | Array; /** * Indicates if there is a string primary key, the deleted will keep data's primary keys * otherwise it will keep the data's rowid. * - * @type { Array | Array } + * @type { Array | Array } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since 10 */ - deleted: Array | Array; + deleted: Array | Array; } /** @@ -1669,10 +1678,11 @@ declare namespace relationalStore { /** * Describes the conflict resolutions to insert data into the table. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enum ConflictResolution { /** @@ -1680,7 +1690,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ ON_CONFLICT_NONE = 0, @@ -1689,7 +1700,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ ON_CONFLICT_ROLLBACK = 1, @@ -1698,7 +1710,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ ON_CONFLICT_ABORT = 2, @@ -1707,7 +1720,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ ON_CONFLICT_FAIL = 3, @@ -1716,7 +1730,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ ON_CONFLICT_IGNORE = 4, @@ -1725,7 +1740,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ ON_CONFLICT_REPLACE = 5 } @@ -1892,16 +1908,18 @@ declare namespace relationalStore { /** * Enumerates the type of rebuild. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum RebuildType { /** * The database is not rebuilt or repaired. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE, @@ -1909,7 +1927,8 @@ declare namespace relationalStore { * The database is rebuilt. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ REBUILT, @@ -1917,7 +1936,8 @@ declare namespace relationalStore { * The database is repaired. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ REPAIRED } @@ -1932,10 +1952,11 @@ declare namespace relationalStore { /** * Enumerates the type of transaction. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ enum TransactionType { /** @@ -1950,6 +1971,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ DEFERRED, @@ -1965,6 +1987,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ IMMEDIATE, @@ -1980,6 +2003,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ EXCLUSIVE } @@ -1998,6 +2022,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ interface TransactionOptions { /** @@ -2014,6 +2039,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ transactionType?: TransactionType; } @@ -2021,7 +2047,7 @@ declare namespace relationalStore { /** * Enumerates the data types of a column. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 18 @@ -2196,7 +2222,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ equalTo(field: string, value: ValueType): RdbPredicates; @@ -2225,7 +2252,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ notEqualTo(field: string, value: ValueType): RdbPredicates; @@ -2244,7 +2272,8 @@ declare namespace relationalStore { * @returns { RdbPredicates } - The {@link RdbPredicates} with the left parenthesis. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ beginWrap(): RdbPredicates; @@ -2263,7 +2292,8 @@ declare namespace relationalStore { * @returns { RdbPredicates } - The {@link RdbPredicates} with the right parenthesis. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ endWrap(): RdbPredicates; @@ -2282,7 +2312,8 @@ declare namespace relationalStore { * @returns { RdbPredicates } - The {@link RdbPredicates} with the or condition. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ or(): RdbPredicates; @@ -2301,7 +2332,8 @@ declare namespace relationalStore { * @returns { RdbPredicates } - The {@link RdbPredicates} with the and condition. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ and(): RdbPredicates; @@ -2330,7 +2362,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ contains(field: string, value: string): RdbPredicates; @@ -2359,7 +2392,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ beginsWith(field: string, value: string): RdbPredicates; @@ -2388,7 +2422,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ endsWith(field: string, value: string): RdbPredicates; @@ -2413,7 +2448,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ isNull(field: string): RdbPredicates; @@ -2438,7 +2474,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ isNotNull(field: string): RdbPredicates; @@ -2467,7 +2504,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ like(field: string, value: string): RdbPredicates; @@ -2496,7 +2534,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ glob(field: string, value: string): RdbPredicates; @@ -2523,7 +2562,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ between(field: string, low: ValueType, high: ValueType): RdbPredicates; @@ -2550,7 +2590,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ notBetween(field: string, low: ValueType, high: ValueType): RdbPredicates; @@ -2575,7 +2616,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ greaterThan(field: string, value: ValueType): RdbPredicates; @@ -2600,7 +2642,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ lessThan(field: string, value: ValueType): RdbPredicates; @@ -2625,7 +2668,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates; @@ -2650,7 +2694,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ lessThanOrEqualTo(field: string, value: ValueType): RdbPredicates; @@ -2675,7 +2720,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ orderByAsc(field: string): RdbPredicates; @@ -2700,7 +2746,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ orderByDesc(field: string): RdbPredicates; @@ -2717,7 +2764,8 @@ declare namespace relationalStore { * @returns { RdbPredicates } - The SQL query statement with the specified {@link RdbPredicates}. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ distinct(): RdbPredicates; @@ -2734,15 +2782,16 @@ declare namespace relationalStore { /** * Restricts the max number of return records. * - * @param { number } value - Indicates the max length of the return list. + * @param { int } 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. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - limitAs(value: number): RdbPredicates; + limitAs(value: int): RdbPredicates; /** * Configure RdbPredicates to specify the start position of the returned result. @@ -2760,16 +2809,17 @@ declare namespace relationalStore { * Configure RdbPredicates to specify the start position of the returned result. * Use this method together with limit(number). * - * @param { number } rowOffset - Indicates the start position of the returned result. + * @param { int } rowOffset - Indicates the start position of the returned result. * 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. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - offsetAs(rowOffset: number): RdbPredicates; + offsetAs(rowOffset: int): RdbPredicates; /** * Configure RdbPredicates to group query results by specified columns. @@ -2790,7 +2840,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ groupBy(fields: Array): RdbPredicates; @@ -2815,7 +2866,8 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ indexedBy(field: string): RdbPredicates; @@ -2846,6 +2898,22 @@ declare namespace relationalStore { */ in(field: string, value: Array): RdbPredicates; + /** + * Configure RdbPredicates to match the specified field whose data type is ValueType array and values + * are within a given range. + * + * @param { string } field - Indicates the column name in the database table. + * @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. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + inValues(field: string, value: Array): RdbPredicates; + /** * Configure RdbPredicates to match the specified field whose data type is ValueType array and values * are out of a given range. @@ -2873,6 +2941,22 @@ declare namespace relationalStore { */ notIn(field: string, value: Array): RdbPredicates; + /** + * Configure RdbPredicates to match the specified field whose data type is ValueType array and values + * are out of a given range. + * + * @param { string } field - Indicates the column name in the database table. + * @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. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + notInValues(field: string, value: Array): RdbPredicates; + /** * Sets the RdbPredicates to match the field whose data type is string and value * does not contain the specified value. @@ -2938,7 +3022,7 @@ declare namespace relationalStore { * @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. + *
2. Missing GROUP BY clause. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 @@ -2979,7 +3063,8 @@ declare namespace relationalStore { * @type { Array } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ columnNames: Array; @@ -2996,12 +3081,13 @@ declare namespace relationalStore { * The returned number is equal to the length of the string array returned by the * columnNames method. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - columnCount: number; + columnCount: int; /** * Obtains the number of rows in the result set. @@ -3012,12 +3098,13 @@ declare namespace relationalStore { /** * Obtains the number of rows in the result set. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - rowCount: number; + rowCount: int; /** * Obtains the current index of the result set. @@ -3030,12 +3117,13 @@ declare namespace relationalStore { * Obtains the current index of the result set. * The result set index starts from 0. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - rowIndex: number; + rowIndex: int; /** * Checks whether the cursor is positioned at the first row. @@ -3149,7 +3237,7 @@ declare namespace relationalStore { * The column name is passed as an input parameter. * * @param { string } columnName - Indicates the name of the specified column in the result set. - * @returns { number } The index of the specified column. + * @returns { int } The index of the specified column. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 14800000 - Inner error. @@ -3177,7 +3265,7 @@ declare namespace relationalStore { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - getColumnIndex(columnName: string): number; + getColumnIndex(columnName: string): int; /** * Obtains the column name based on the specified column index. @@ -3208,7 +3296,7 @@ declare namespace relationalStore { * Obtains the column name based on the specified column index. * The column index is passed as an input parameter. * - * @param { number } columnIndex - Indicates the index of the specified column in the result set. + * @param { int } 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. @@ -3234,15 +3322,16 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - getColumnName(columnIndex: number): string; + getColumnName(columnIndex: int): string; /** * Obtains the column data type based on the specified column index. * The column index is passed as an input parameter. * - * @param { number | string } columnIdentifier - Index or name of the column. + * @param { int | string } columnIdentifier - Index or name of the column. * @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; @@ -3272,12 +3361,12 @@ declare namespace relationalStore { * @crossplatform * @since 18 */ - getColumnType(columnIdentifier: number | string): Promise; + getColumnType(columnIdentifier: int | string): Promise; /** * Obtains the column data type based on the specified column index. This API returns the result synchronously. * - * @param { number | string } columnIdentifier - Index or name of the column. + * @param { int | 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. @@ -3306,7 +3395,7 @@ declare namespace relationalStore { * @crossplatform * @since 18 */ - getColumnTypeSync(columnIdentifier: number | string): ColumnType; + getColumnTypeSync(columnIdentifier: int | string): ColumnType; /** * Go to the specified row of the result set forwards or backwards by an offset relative to its current position. @@ -3339,7 +3428,7 @@ declare namespace relationalStore { * Go to the specified row of the result set forwards or backwards by an offset relative to its current position. * A positive offset indicates moving backwards, and a negative offset indicates moving forwards. * - * @param { number } offset - Indicates the offset relative to the current position. + * @param { int } offset - Indicates the offset relative to the current position. * @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; @@ -3366,9 +3455,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - goTo(offset: number): boolean; + goTo(offset: int): boolean; /** * Go to the specified row of the result set. @@ -3396,7 +3486,7 @@ declare namespace relationalStore { /** * Go to the specified row of the result set. * - * @param { number } position - Indicates the index of the specified row, which starts from 0. + * @param { int } 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. @@ -3422,9 +3512,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - goToRow(position: number): boolean; + goToRow(position: int): boolean; /** * Go to the first row of the result set. @@ -3523,7 +3614,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ goToLastRow(): boolean; @@ -3573,7 +3665,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ goToNextRow(): boolean; @@ -3623,7 +3716,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ goToPreviousRow(): boolean; @@ -3659,7 +3753,7 @@ declare namespace relationalStore { * 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 Blob type. * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @param { int } 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. @@ -3685,9 +3779,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - getBlob(columnIndex: number): Uint8Array; + getBlob(columnIndex: int): Uint8Array; /** * Obtains the value of the specified column in the current row as string. @@ -3721,7 +3816,7 @@ declare namespace relationalStore { * 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 string type. * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @param { int } 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. @@ -3750,7 +3845,7 @@ declare namespace relationalStore { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - getString(columnIndex: number): string; + getString(columnIndex: int): string; /** * Obtains the value of the specified column in the current row as long. @@ -3784,8 +3879,8 @@ declare namespace relationalStore { * The implementation class determines whether to throw an exception if the value of the specified column * in the current row is null, the specified column is not of the integer type. * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { number } The value of the specified column as a long. + * @param { int } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { long } 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. * @throws { BusinessError } 14800000 - Inner error. @@ -3813,7 +3908,7 @@ declare namespace relationalStore { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - getLong(columnIndex: number): number; + getLong(columnIndex: int): long; /** * Obtains the value of the specified column in the current row as double. @@ -3847,8 +3942,8 @@ declare namespace relationalStore { * The implementation class determines whether to throw an exception if the value of the specified column * in the current row is null, the specified column is not of the double type. * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. - * @returns { number } The value of the specified column as a double. + * @param { int } columnIndex - Indicates the specified column index, which starts from 0. + * @returns { double } 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. * @throws { BusinessError } 14800000 - Inner error. @@ -3873,9 +3968,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - getDouble(columnIndex: number): number; + getDouble(columnIndex: int): double; /** * Obtains the value of the specified column in the current row as an asset. @@ -3896,7 +3992,7 @@ declare namespace relationalStore { * 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 Asset type. * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @param { int } 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. @@ -3922,9 +4018,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - getAsset(columnIndex: number): Asset; + getAsset(columnIndex: int): Asset; /** * Obtains the value of the specified column in the current row as assets. @@ -3945,7 +4042,7 @@ declare namespace relationalStore { * 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. * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @param { int } 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. @@ -3971,9 +4068,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - getAssets(columnIndex: number): Assets; + getAssets(columnIndex: int): Assets; /** * Obtains the value of the specified column in the current row. @@ -4048,7 +4146,7 @@ declare namespace relationalStore { * Inserting an empty blob, after API14 and API14, the obtained value is an empty blob; Before API 14, * the obtained value was null. * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @param { int } 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. @@ -4075,8 +4173,9 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ - getValue(columnIndex: number): ValueType; + getValue(columnIndex: int): ValueType; /** * Obtains the value of the specified column in the current row. @@ -4109,7 +4208,7 @@ declare namespace relationalStore { * 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 float array type. * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @param { int } 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. @@ -4134,9 +4233,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - getFloat32Array(columnIndex: number): Float32Array; + getFloat32Array(columnIndex: int): Float32Array; /** * Obtains the values of all columns in the specified row. @@ -4203,7 +4303,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ getRow(): ValuesBucket; @@ -4232,8 +4333,8 @@ declare namespace relationalStore { /** * Obtains the values of all columns in the specified rows. - * @param { number } maxCount - Indicates the maximum number of rows. - * @param { number } position - Indicates the start position to obtain the values. + * @param { int } maxCount - Indicates the maximum number of rows. + * @param { int } [position] - Indicates the start position to obtain the values. * @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; @@ -4257,9 +4358,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - getRows(maxCount: number, position?: number): Promise>; + getRows(maxCount: int, position?: int): Promise>; /** * Obtains the values of all columns in the specified row. @@ -4319,7 +4421,7 @@ declare namespace relationalStore { /** * Checks whether the value of the specified column in the current row is null. * - * @param { number } columnIndex - Indicates the specified column index, which starts from 0. + * @param { int } columnIndex - Indicates the specified column index, which starts from 0. * @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; @@ -4346,9 +4448,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - isColumnNull(columnIndex: number): boolean; + isColumnNull(columnIndex: int): boolean; /** * Closes the result set. @@ -4375,7 +4478,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800012 - ResultSet is empty or pointer index is out of bounds. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ close(): void; } @@ -4422,7 +4526,7 @@ declare namespace relationalStore { * Set RdbStore version. The version number must be an integer greater than 0. * Obtains the RdbStore version. * - * @type { number } + * @type { int } * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 801 - Capability not supported. @@ -4441,16 +4545,18 @@ declare namespace relationalStore { * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - version: number; + version: int; /** * Set whether the database is rebuilt. * * @type {RebuildType} * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ rebuilt: RebuildType; @@ -4595,7 +4701,7 @@ declare namespace relationalStore { * * @param { string } table - Indicates the target table. * @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. + * @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. * @throws { BusinessError } 14800000 - Inner error. @@ -4620,9 +4726,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - insert(table: string, values: ValuesBucket): Promise; + insert(table: string, values: ValuesBucket): Promise; /** * Inserts a row of data into the target table. @@ -4645,7 +4752,7 @@ declare namespace relationalStore { * @param { string } table - Indicates the target table. * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. * @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. + * @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. * @throws { BusinessError } 14800000 - Inner error. @@ -4670,9 +4777,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - insert(table: string, values: ValuesBucket, conflict: ConflictResolution): Promise; + insert(table: string, values: ValuesBucket, conflict: ConflictResolution): Promise; /** * Inserts a row of data into the target table with sync interface. @@ -4680,7 +4788,7 @@ declare namespace relationalStore { * @param { string } table - Indicates the target table. * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. * @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. + * @returns { long } 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. * @throws { BusinessError } 14800000 - Inner error. @@ -4705,9 +4813,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - insertSync(table: string, values: ValuesBucket, conflict?: ConflictResolution): number; + insertSync(table: string, values: ValuesBucket, conflict?: ConflictResolution): long; /** * Inserts a row of data into the target table with sync interface. @@ -4806,8 +4915,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ batchInsert(table: string, values: Array, callback: AsyncCallback): void; @@ -4847,7 +4955,7 @@ declare namespace relationalStore { * @param { string } table - Indicates the target table. * @param { Array } values - * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. - * @returns { Promise } The number of values that were inserted if the operation is successful. + * @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. @@ -4876,7 +4984,7 @@ declare namespace relationalStore { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - batchInsert(table: string, values: Array): Promise; + batchInsert(table: string, values: Array): Promise; /** * Inserts a batch of data into the target table. @@ -4884,7 +4992,7 @@ declare namespace relationalStore { * @param { string } table - Indicates the target table. * @param { Array } values - * 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. + * @returns { long } 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. * @throws { BusinessError } 14800000 - Inner error. @@ -4912,7 +5020,7 @@ declare namespace relationalStore { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - batchInsertSync(table: string, values: Array): number; + batchInsertSync(table: string, values: Array): long; /** * Inserts a batch of data into the target table. @@ -4921,7 +5029,7 @@ declare namespace relationalStore { * @param { Array } values - * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { Promise } The number of values that were inserted if the operation is successful. + * @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. @@ -4949,7 +5057,7 @@ declare namespace relationalStore { * @crossplatform * @since 18 */ - batchInsertWithConflictResolution(table: string, values: Array, conflict: ConflictResolution): Promise; + batchInsertWithConflictResolution(table: string, values: Array, conflict: ConflictResolution): Promise; /** * Inserts a batch of data into the target table. @@ -4957,7 +5065,8 @@ declare namespace relationalStore { * @param { string } table - Indicates the target table. * @param { Array } values - * 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. + * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. + * @returns { long } 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. * @throws { BusinessError } 14800000 - Inner error. @@ -4984,7 +5093,7 @@ declare namespace relationalStore { * @crossplatform * @since 18 */ - batchInsertWithConflictResolutionSync(table: string, values: Array, conflict: ConflictResolution): number; + batchInsertWithConflictResolutionSync(table: string, values: Array, conflict: ConflictResolution): long; /** * Updates data in the database based on a specified instance object of RdbPredicates. @@ -5148,7 +5257,7 @@ declare namespace relationalStore { * The key-value pairs are associated with column names of the database table. * @param { RdbPredicates } predicates - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. - * @returns { Promise } The number of affected rows. + * @returns { Promise } The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 14800000 - Inner error. @@ -5173,9 +5282,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - update(values: ValuesBucket, predicates: RdbPredicates): Promise; + update(values: ValuesBucket, predicates: RdbPredicates): Promise; /** * Updates data in the database based on a specified instance object of RdbPredicates. @@ -5202,7 +5312,7 @@ declare namespace relationalStore { * @param { RdbPredicates } predicates - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { Promise } The number of affected rows. + * @returns { Promise } The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 14800000 - Inner error. @@ -5227,9 +5337,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution): Promise; + update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution): Promise; /** * Updates data in the database based on a specified instance object of RdbPredicates with sync interface. @@ -5239,7 +5350,7 @@ declare namespace relationalStore { * @param { RdbPredicates } predicates - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { number } The number of affected rows. + * @returns { long } The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 14800000 - Inner error. @@ -5264,9 +5375,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - updateSync(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): number; + updateSync(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): long; /** * Updates data in the database based on a specified instance object of RdbPredicates. @@ -5399,7 +5511,7 @@ declare namespace relationalStore { * The key-value pairs are associated with column names of the database table. * @param { dataSharePredicates.DataSharePredicates } predicates - Indicates the specified update condition by * the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @returns { Promise } The number of affected rows. + * @returns { Promise } The number of affected rows. * @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; @@ -5427,9 +5539,10 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @systemapi * @StageModelOnly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise; + update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise; /** * Deletes data from the database based on a specified instance object of RdbPredicates. @@ -5487,8 +5600,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ delete(predicates: RdbPredicates, callback: AsyncCallback): void; @@ -5523,7 +5635,7 @@ declare namespace relationalStore { * * @param { RdbPredicates } predicates - * The specified delete condition by the instance object of {@link RdbPredicates}. - * @returns { Promise } return the number of affected rows. + * @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. * @throws { BusinessError } 14800000 - Inner error. @@ -5551,14 +5663,14 @@ declare namespace relationalStore { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - delete(predicates: RdbPredicates): Promise; + delete(predicates: RdbPredicates): Promise; /** * Deletes data from the database based on a specified instance object of RdbPredicates with sync interface. * * @param { RdbPredicates } predicates - * The specified delete condition by the instance object of {@link RdbPredicates}. - * @returns { number } return the number of rows deleted. + * @returns { long } return the number of rows deleted. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 14800000 - Inner error. @@ -5586,7 +5698,7 @@ declare namespace relationalStore { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - deleteSync(predicates: RdbPredicates): number; + deleteSync(predicates: RdbPredicates): long; /** * Deletes data from the database based on a specified instance object of RdbPredicates. * @@ -5656,8 +5768,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @systemapi * @StageModelOnly - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ delete(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback): void; @@ -5702,7 +5813,7 @@ declare namespace relationalStore { * @param { string } table - Indicates the target table. * @param { dataSharePredicates.DataSharePredicates } predicates - * The specified delete condition by the instance object of {@link dataSharePredicates.DataSharePredicates}. - * @returns { Promise } The number of affected rows. + * @returns { Promise } The number of affected rows. * @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; @@ -5733,7 +5844,7 @@ declare namespace relationalStore { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - delete(table: string, predicates: dataSharePredicates.DataSharePredicates): Promise; + delete(table: string, predicates: dataSharePredicates.DataSharePredicates): Promise; /** * Queries data in the database based on specified conditions. @@ -5854,7 +5965,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800015 - The database does not respond. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ query(predicates: RdbPredicates, columns?: Array): Promise; @@ -6002,7 +6114,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800015 - The database does not respond. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ querySync(predicates: RdbPredicates, columns?: Array): ResultSet; @@ -6120,7 +6233,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800015 - The database does not respond. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ querySql(sql: string, bindArgs?: Array): Promise; @@ -6138,8 +6252,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800015 - The database does not respond. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ querySqlSync(sql: string, bindArgs?: Array): ResultSet; @@ -6195,7 +6308,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ getModifyTime(table: string, columnName: string, primaryKeys: PRIKeyType[]): Promise; @@ -6382,7 +6496,7 @@ declare namespace relationalStore { * otherwise clean all. * * @param { string } table - Indicates the name of the table to check. - * @param { number } [cursor] - Indicates the cursor. + * @param { long } [cursor] - Indicates the cursor. * @returns { Promise } -The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1. Need 1 - 3 parameter(s)! 2. The RdbStore must be not nullptr. @@ -6408,9 +6522,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - cleanDirtyData(table: string, cursor?: number): Promise; + cleanDirtyData(table: string, cursor?: long): Promise; /** * Obtains sharing resource of rows corresponding to the predicates. @@ -6615,8 +6730,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ executeSql(sql: string, callback: AsyncCallback): void; @@ -6680,8 +6794,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ executeSql(sql: string, bindArgs: Array, callback: AsyncCallback): void; @@ -6745,8 +6858,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ executeSql(sql: string, bindArgs?: Array): Promise; @@ -6781,7 +6893,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ execute(sql: string, args?: Array): Promise; @@ -6900,8 +7013,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ beginTransaction(): void; @@ -6976,8 +7088,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ commit(): void; @@ -7052,8 +7163,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ rollBack(): void; @@ -7644,7 +7754,7 @@ declare namespace relationalStore { * @param { RdbPredicates } predicates - * The specified sync condition by the instance object of {@link RdbPredicates}. * @returns { Promise> } - * {Array<[string, number]>}: devices sync status array, {string}: device id, {number}: device sync status. + * {Array<[string, int]>}: 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. * @throws { BusinessError } 801 - Capability not supported. @@ -8373,6 +8483,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ close(): Promise; @@ -8381,8 +8492,8 @@ declare namespace relationalStore { * * @param { string } fullPath - Indicates the path of the database file to attach. * @param { string } attachName - Indicates the alias of the database. - * @param { number } waitTime - Indicates the maximum time allowed for attaching the database file. - * @returns { Promise } Promise used to return the number of attached databases. + * @param { long } 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. * @throws { BusinessError } 801 - Capability not supported. @@ -8408,9 +8519,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - attach(fullPath: string, attachName: string, waitTime?: number) : Promise; + attach(fullPath: string, attachName: string, waitTime?: long) : Promise; /** * Attaches a database file to the currently linked database. @@ -8419,8 +8531,8 @@ declare namespace relationalStore { * @param { StoreConfig } config - * Indicates the {@link StoreConfig} configuration of the database related to this RDB store. * @param { string } attachName - Indicates the alias of the database. - * @param { number } waitTime - Indicates the maximum time allowed for attaching the database file. - * @returns { Promise } Promise used to return the number of attached databases. + * @param { long } 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. * @throws { BusinessError } 801 - Capability not supported. @@ -8448,16 +8560,17 @@ declare namespace relationalStore { * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - attach(context: Context, config: StoreConfig, attachName: string, waitTime?: number) : Promise; + attach(context: Context, config: StoreConfig, attachName: string, waitTime?: long) : Promise; /** * Detaches a database from this database. * * @param { string } attachName - Indicates the alias of the database. - * @param { number } waitTime - Indicates the maximum time allowed for detaching the database. - * @returns { Promise } Return the current number of attached databases. + * @param { long } 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. * @throws { BusinessError } 14800000 - Inner error. @@ -8480,9 +8593,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - detach(attachName: string, waitTime?: number) : Promise; + detach(attachName: string, waitTime?: long) : Promise; /** * Locks data from the database based on a specified instance object of RdbPredicates. @@ -8589,14 +8703,15 @@ declare namespace relationalStore { /** * Lock cloud container before non-auto cloud sync. * - * @returns { Promise } The expired time of the lock. + * @returns { Promise } The expired time of the lock. * @throws { BusinessError } 202 - Permission verification failed, * application which is not a system application uses system API. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - lockCloudContainer(): Promise; + lockCloudContainer(): Promise; /** * Unlock cloud container. @@ -8627,7 +8742,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ createTransaction(options?: TransactionOptions): Promise; @@ -8640,7 +8756,7 @@ declare namespace relationalStore { * @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. + *
2. Missing GROUP BY clause. * @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. @@ -8665,7 +8781,8 @@ declare namespace relationalStore { * @interface Transaction * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ interface Transaction { /** @@ -8683,7 +8800,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800029 - SQLite: The database is full. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ commit(): Promise; @@ -8702,7 +8820,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800029 - SQLite: The database is full. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ rollback(): Promise; @@ -8712,7 +8831,7 @@ declare namespace relationalStore { * @param { string } table - Indicates the target table. * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. * @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. + * @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. * @throws { BusinessError } 14800000 - Inner error. @@ -8732,9 +8851,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - insert(table: string, values: ValuesBucket, conflict?: ConflictResolution): Promise; + insert(table: string, values: ValuesBucket, conflict?: ConflictResolution): Promise; /** * Inserts a row of data into the target table with sync interface, just use in TaskPool or Worker. @@ -8766,13 +8886,44 @@ declare namespace relationalStore { */ insertSync(table: string, values: ValuesBucket | sendableRelationalStore.ValuesBucket, conflict?: ConflictResolution): number; + /** + * Inserts a row of data into the target table with sync interface, just use in TaskPool or Worker. + * + * @param { string } table - Indicates the target table. + * @param { ValuesBucket } values - Indicates the row of data {@link ValuesBucket} to be inserted into the table. + * @param { ConflictResolution } [conflict] - Indicates the {@link ConflictResolution} to insert data into the table. + * @returns { long } 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. + * @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. + * @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 } 14800026 - SQLite: The database is out of memory. + * @throws { BusinessError } 14800027 - SQLite: Attempt to write a readonly database. + * @throws { BusinessError } 14800028 - SQLite: Some kind of disk I/O error occurred. + * @throws { BusinessError } 14800029 - SQLite: The database is full. + * @throws { BusinessError } 14800031 - SQLite: TEXT or BLOB exceeds size limit. + * @throws { BusinessError } 14800033 - SQLite: Data type mismatch. + * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. + * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + insertSync(table: string, values: ValuesBucket, conflict?: ConflictResolution): long; + /** * Inserts a batch of data into the target table. * * @param { string } table - Indicates the target table. * @param { Array } values - * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. - * @returns { Promise } The number of values that were inserted if the operation is successful. + * @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. @@ -8793,9 +8944,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - batchInsert(table: string, values: Array): Promise; + batchInsert(table: string, values: Array): Promise; /** * Inserts a batch of data into the target table. @@ -8803,7 +8955,7 @@ declare namespace relationalStore { * @param { string } table - Indicates the target table. * @param { Array } values - * 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. + * @returns { long } 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. * @throws { BusinessError } 14800000 - Inner error. @@ -8823,9 +8975,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - batchInsertSync(table: string, values: Array): number; + batchInsertSync(table: string, values: Array): long; /** * Inserts a batch of data into the target table. @@ -8834,7 +8987,7 @@ declare namespace relationalStore { * @param { Array } values - * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { Promise } The number of values that were inserted if the operation is successful. + * @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. @@ -8860,7 +9013,7 @@ declare namespace relationalStore { * @crossplatform * @since 18 */ - batchInsertWithConflictResolution(table: string, values: Array, conflict: ConflictResolution): Promise; + batchInsertWithConflictResolution(table: string, values: Array, conflict: ConflictResolution): Promise; /** * Inserts a batch of data into the target table. @@ -8869,7 +9022,7 @@ declare namespace relationalStore { * @param { Array } values - * Indicates the rows of data {@link ValuesBucket} to be inserted into the table. * @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. + * @returns { long } 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. * @throws { BusinessError } 14800000 - Inner error. @@ -8894,7 +9047,7 @@ declare namespace relationalStore { * @crossplatform * @since 18 */ - batchInsertWithConflictResolutionSync(table: string, values: Array, conflict: ConflictResolution): number; + batchInsertWithConflictResolutionSync(table: string, values: Array, conflict: ConflictResolution): long; /** * Updates data in the database based on a specified instance object of RdbPredicates. @@ -8904,7 +9057,7 @@ declare namespace relationalStore { * @param { RdbPredicates } predicates - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { Promise } The number of affected rows. + * @returns { Promise } The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 14800000 - Inner error. @@ -8924,9 +9077,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - update(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): Promise; + update(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): Promise; /** * Updates data in the database based on a specified instance object of RdbPredicates with sync interface. @@ -8936,7 +9090,7 @@ declare namespace relationalStore { * @param { RdbPredicates } predicates - * Indicates the specified update condition by the instance object of {@link RdbPredicates}. * @param { ConflictResolution } conflict - Indicates the {@link ConflictResolution} to insert data into the table. - * @returns { number } The number of affected rows. + * @returns { long } The number of affected rows. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 14800000 - Inner error. @@ -8956,16 +9110,17 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - updateSync(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): number; + updateSync(values: ValuesBucket, predicates: RdbPredicates, conflict?: ConflictResolution): long; /** * Deletes data from the database based on a specified instance object of RdbPredicates. * * @param { RdbPredicates } predicates - * The specified delete condition by the instance object of {@link RdbPredicates}. - * @returns { Promise } return the number of affected rows. + * @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. * @throws { BusinessError } 14800000 - Inner error. @@ -8985,16 +9140,17 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - delete(predicates: RdbPredicates): Promise; + delete(predicates: RdbPredicates): Promise; /** * Deletes data from the database based on a specified instance object of RdbPredicates with sync interface. * * @param { RdbPredicates } predicates - * The specified delete condition by the instance object of {@link RdbPredicates}. - * @returns { number } return the number of rows deleted. + * @returns { long } return the number of rows deleted. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 14800000 - Inner error. @@ -9014,9 +9170,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - deleteSync(predicates: RdbPredicates): number; + deleteSync(predicates: RdbPredicates): long; /** * Queries data in the database based on specified conditions. @@ -9039,7 +9196,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ query(predicates: RdbPredicates, columns?: Array): Promise; @@ -9066,7 +9224,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ querySync(predicates: RdbPredicates, columns?: Array): ResultSet; @@ -9092,7 +9251,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ querySql(sql: string, args?: Array): Promise; @@ -9307,8 +9467,7 @@ declare namespace relationalStore { * @throws { BusinessError } 14800030 - SQLite: Unable to open the database file. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback): void; @@ -9541,7 +9700,8 @@ declare namespace relationalStore { * @throws { BusinessError } 14801002 - Invalid data group ID. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function deleteRdbStore(context: Context, config: StoreConfig): Promise; @@ -9578,7 +9738,7 @@ declare namespace relationalStore { * @since 20 */ function getInsertSqlInfo(table: string, values: ValuesBucket, conflict?: ConflictResolution):SqlInfo; - + /** * Obtains a SQL statement used for updating data. * @@ -9606,7 +9766,7 @@ declare namespace relationalStore { * @since 20 */ function getDeleteSqlInfo(predicates: RdbPredicates):SqlInfo; - + /** * Obtains a SQL statement used for querying data. * diff --git a/api/@ohos.data.unifiedDataChannel.d.ts b/api/@ohos.data.unifiedDataChannel.d.ts index bdc283df1fec4dc465c1b011c64750a5d43cdece..32c500d1658562c4320edfad0ca38232f43cdb6e 100644 --- a/api/@ohos.data.unifiedDataChannel.d.ts +++ b/api/@ohos.data.unifiedDataChannel.d.ts @@ -268,7 +268,8 @@ declare namespace unifiedDataChannel { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ addRecord(record: UnifiedRecord): void; /** @@ -383,7 +384,8 @@ declare namespace unifiedDataChannel { * @type { Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ summary: Record; /** @@ -398,7 +400,8 @@ declare namespace unifiedDataChannel { * @type { number } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ totalSize: number; } @@ -451,7 +454,8 @@ declare namespace unifiedDataChannel { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ getType(): string; @@ -518,7 +522,8 @@ declare namespace unifiedDataChannel { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ getValue(): ValueType; @@ -593,7 +598,8 @@ declare namespace unifiedDataChannel { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ class Text extends UnifiedRecord { /** @@ -620,92 +626,85 @@ declare namespace unifiedDataChannel { * @since 14 */ details?: Record; - } - /** - * Describe the unified plain text data - * - * @extends Text - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Describe the unified plain text data - * - * @extends Text - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * Describe the unified plain text data - * - * @extends Text - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since 14 - */ - class PlainText extends Text { /** - * Indicates the content of text + * Indicates the details of unified text * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the content of text + * Indicates the details of unified text * - * @type { string } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ /** - * Indicates the content of text + * Indicates the details of unified text * - * @type { string } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice * @since 14 */ - textContent: string; /** - * Indicates the abstract of text + * Indicates the details of unified text + * + * @returns { Record | undefined } the details of unified text + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + get details(): Record | undefined; + + /** + * Indicates the details of unified text * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the abstract of text + * Indicates the details of unified text * - * @type { ?string } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ /** - * Indicates the abstract of text + * Indicates the details of unified text * - * @type { ?string } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice * @since 14 */ - abstract?: string; + /** + * Indicates the details of unified text + * + * @param { Record } the details of unified text + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + set details(value: Record); } /** - * Describe the unified link data + * Describe the unified plain text data * * @extends Text * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Describe the unified link data + * Describe the unified plain text data * * @extends Text * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -713,23 +712,24 @@ declare namespace unifiedDataChannel { * @since 11 */ /** - * Describe the unified link data + * Describe the unified plain text data * * @extends Text * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - class Hyperlink extends Text { + class PlainText extends Text { /** - * Indicates the url of a link + * Indicates the content of text * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the url of a link + * Indicates the content of text * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -737,7 +737,7 @@ declare namespace unifiedDataChannel { * @since 11 */ /** - * Indicates the url of a link + * Indicates the content of text * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -745,66 +745,50 @@ declare namespace unifiedDataChannel { * @atomicservice * @since 14 */ - url: string; + textContent: string; + /** - * Indicates the description of a link + * Indicates the content of text * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the description of a link + * Indicates the content of text * - * @type { ?string } + * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ /** - * Indicates the description of a link + * Indicates the content of text * - * @type { ?string } + * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice * @since 14 */ - description?: string; - } + /** + * Indicates the content of text + * + * @returns { string } the content of text + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + get textContent(): string; - /** - * Describe the unified html data - * - * @extends Text - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Describe the unified html data - * - * @extends Text - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * Describe the unified html data - * - * @extends Text - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since 14 - */ - class HTML extends Text { /** - * Indicates the content of html, with html tags + * Indicates the content of text * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the content of html, with html tags + * Indicates the content of text * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -812,7 +796,7 @@ declare namespace unifiedDataChannel { * @since 11 */ /** - * Indicates the content of html, with html tags + * Indicates the content of text * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -820,15 +804,25 @@ declare namespace unifiedDataChannel { * @atomicservice * @since 14 */ - htmlContent: string; /** - * Indicates the plain content of html + * Indicates the content of text + * + * @param { string } the content of text + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + set textContent(value: string); + + /** + * Indicates the abstract of text * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the plain content of html + * Indicates the abstract of text * * @type { ?string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -836,7 +830,7 @@ declare namespace unifiedDataChannel { * @since 11 */ /** - * Indicates the plain content of html + * Indicates the abstract of text * * @type { ?string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -844,66 +838,90 @@ declare namespace unifiedDataChannel { * @atomicservice * @since 14 */ - plainContent?: string; + abstract?: string; + + /** + * Indicates the abstract of text + * + * @returns { string | undefined } the abstract of text + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + get textAbstract(): string | undefined; + + /** + * Indicates the abstract of text + * + * @param { string } the abstract of text + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + set textAbstract(value: string); } /** - * Describe the unified file data + * Describe the unified link data * - * @extends UnifiedRecord + * @extends Text * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Describe the unified file data + * Describe the unified link data * - * @extends UnifiedRecord + * @extends Text * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ /** - * Describe the unified file data + * Describe the unified link data * - * @extends UnifiedRecord + * @extends Text * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - class File extends UnifiedRecord { + class Hyperlink extends Text { /** - * Indicates the details of unified File + * Indicates the url of a link * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the details of unified File + * Indicates the url of a link * - * @type { ?Record } + * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ /** - * Indicates the details of unified File + * Indicates the url of a link * - * @type { ?Record } + * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice * @since 14 */ - details?: Record; + url: string; + /** - * URI of the local file or online file. The local file URI can be obtained using the getUriFromPath function. + * Indicates the url of a link * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * URI of the local file or online file. The local file URI can be obtained using the getUriFromPath function. + * Indicates the url of a link * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -911,7 +929,7 @@ declare namespace unifiedDataChannel { * @since 11 */ /** - * URI of the local file or online file. The local file URI can be obtained using the getUriFromPath function. + * Indicates the url of a link * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -919,42 +937,25 @@ declare namespace unifiedDataChannel { * @atomicservice * @since 14 */ - uri: string; - } + /** + * Indicates the url of a link + * + * @returns { string } the url of a link + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + get url(): string; - /** - * Describe the unified image data - * - * @extends File - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Describe the unified image data - * - * @extends File - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * Describe the unified image data - * - * @extends File - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since 14 - */ - class Image extends File { /** - * URI of the local image or online image. The local image URI can be obtained using the getUriFromPath function. + * Indicates the url of a link * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * URI of the local image or online image. The local image URI can be obtained using the getUriFromPath function. + * Indicates the url of a link * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -962,7 +963,7 @@ declare namespace unifiedDataChannel { * @since 11 */ /** - * URI of the local image or online image. The local image URI can be obtained using the getUriFromPath function. + * Indicates the url of a link * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -970,42 +971,145 @@ declare namespace unifiedDataChannel { * @atomicservice * @since 14 */ - imageUri: string; + /** + * Indicates the url of a link + * + * @param { string } the url of a link + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + set url(value: string); + + /** + * Indicates the description of a link + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the description of a link + * + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the description of a link + * + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + description?: string; + + /** + * Indicates the description of a link + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the description of a link + * + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the description of a link + * + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the description of a link + * + * @returns { string | undefined } the description of a link. + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + get description(): string | undefined; + + /** + * Indicates the description of a link. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the description of a link + * + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the description of a link + * + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the description of a link + * + * @param { string } the description of a link + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + set description(value: string); } /** - * Describe the unified video data + * Describe the unified html data * - * @extends File + * @extends Text * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Describe the unified video data + * Describe the unified html data * - * @extends File + * @extends Text * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ /** - * Describe the unified video data + * Describe the unified html data * - * @extends File + * @extends Text * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - class Video extends File { + class HTML extends Text { /** - * URI of the local video or online video. The local video URI can be obtained using the getUriFromPath function. + * Indicates the content of html, with html tags * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * URI of the local video or online video. The local video URI can be obtained using the getUriFromPath function. + * Indicates the content of html, with html tags * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -1013,7 +1117,7 @@ declare namespace unifiedDataChannel { * @since 11 */ /** - * URI of the local video or online video. The local video URI can be obtained using the getUriFromPath function. + * Indicates the content of html, with html tags * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -1021,42 +1125,16 @@ declare namespace unifiedDataChannel { * @atomicservice * @since 14 */ - videoUri: string; - } + htmlContent: string; - /** - * Describe the unified audio data - * - * @extends File - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Describe the unified audio data - * - * @extends File - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * Describe the unified audio data - * - * @extends File - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since 14 - */ - class Audio extends File { /** - * URI of the local audio or online audio. The local audio URI can be obtained using the getUriFromPath function. + * Indicates the content of html, with html tags * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * URI of the local audio or online audio. The local audio URI can be obtained using the getUriFromPath function. + * Indicates the content of html, with html tags * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -1064,7 +1142,7 @@ declare namespace unifiedDataChannel { * @since 11 */ /** - * URI of the local audio or online audio. The local audio URI can be obtained using the getUriFromPath function. + * Indicates the content of html, with html tags * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -1072,42 +1150,25 @@ declare namespace unifiedDataChannel { * @atomicservice * @since 14 */ - audioUri: string; - } + /** + * Indicates the content of html, with html tags + * + * @returns { string } the content of html + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + get htmlContent(): string; - /** - * Describe the unified folder data - * - * @extends File - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Describe the unified folder data - * - * @extends File - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - /** - * Describe the unified folder data - * - * @extends File - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @crossplatform - * @atomicservice - * @since 14 - */ - class Folder extends File { /** - * URI of the local folder or online folder. The local folder URI can be obtained using the getUriFromPath function. + * Indicates the content of html, with html tags * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * URI of the local folder or online folder. The local folder URI can be obtained using the getUriFromPath function. + * Indicates the content of html, with html tags * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -1115,7 +1176,7 @@ declare namespace unifiedDataChannel { * @since 11 */ /** - * URI of the local folder or online folder. The local folder URI can be obtained using the getUriFromPath function. + * Indicates the content of html, with html tags * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core @@ -1123,232 +1184,1583 @@ declare namespace unifiedDataChannel { * @atomicservice * @since 14 */ - folderUri: string; - } + /** + * Indicates the content of html, with html tags + * + * @param { string } the content of html + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + set htmlContent(value: string); - /** - * Describe system defined type data(this kind of data is provided and bound to OpenHarmony, - * also can be parsed by system provided API) - * - * @extends UnifiedRecord - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Describe system defined type data(this kind of data is provided and bound to OpenHarmony, - * also can be parsed by system provided API) - * - * @extends UnifiedRecord - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - class SystemDefinedRecord extends UnifiedRecord { /** - * Indicates the details of system defined data + * Indicates the plain content of html * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the details of system defined data + * Indicates the plain content of html * - * @type { ?Record } + * @type { ?string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - details?: Record; - } + /** + * Indicates the plain content of html + * + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + plainContent?: string; + + /** + * Indicates the plain content of html + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the plain content of html + * + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the plain content of html + * + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the plain content of html + * + * @returns { string | undefined } the plain content of html + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + get plainContent(): string | undefined; + + /** + * Indicates the plain content of html + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the plain content of html + * + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the plain content of html + * + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the plain content of html + * + * @param { string } the plain content of html + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + set plainContent(value: string); + } + + /** + * Describe the unified file data + * + * @extends UnifiedRecord + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Describe the unified file data + * + * @extends UnifiedRecord + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Describe the unified file data + * + * @extends UnifiedRecord + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + class File extends UnifiedRecord { + /** + * Indicates the details of unified File + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the details of unified File + * + * @type { ?Record } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the details of unified File + * + * @type { ?Record } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + details?: Record; + + /** + * Indicates the details of unified File + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the details of unified File + * + * @type { ?Record } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the details of unified File + * + * @type { ?Record } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the details of unified File + * + * @returns { Record | undefined } the details of unified File + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + get details(): Record | undefined; + + /** + * Indicates the details of unified File + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the details of unified File + * + * @type { ?Record } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the details of unified File + * + * @type { ?Record } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the details of unified File + * + * @param { Record } the details of unified File + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + set details(value: Record); + + /** + * URI of the local file or online file. The local file URI can be obtained using the getUriFromPath function. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * URI of the local file or online file. The local file URI can be obtained using the getUriFromPath function. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * URI of the local file or online file. The local file URI can be obtained using the getUriFromPath function. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + uri: string; + + /** + * Indicates the uri of file + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the uri of file + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the uri of file + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the uri of file + * + * @returns { string } the uri of file + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + get uri(): string; + + /** + * Indicates the uri of file + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the uri of file + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the uri of file + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the uri of file + * + * @param { string } the uri of file + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + set uri(value: string); + } + + /** + * Describe the unified image data + * + * @extends File + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Describe the unified image data + * + * @extends File + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Describe the unified image data + * + * @extends File + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + class Image extends File { + /** + * URI of the local image or online image. The local image URI can be obtained using the getUriFromPath function. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * URI of the local image or online image. The local image URI can be obtained using the getUriFromPath function. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * URI of the local image or online image. The local image URI can be obtained using the getUriFromPath function. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + imageUri: string; + + /** + * Indicates the uri of image + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the uri of image + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the uri of image + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the uri of image + * + * @returns { string } the uri of image + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + get imageUri(): string; + + /** + * Indicates the uri of image + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the uri of image + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the uri of image + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the uri of image + * + * @param { string } the uri of image + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + set imageUri(value: string); + } + + /** + * Describe the unified video data + * + * @extends File + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Describe the unified video data + * + * @extends File + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Describe the unified video data + * + * @extends File + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + class Video extends File { + /** + * URI of the local video or online video. The local video URI can be obtained using the getUriFromPath function. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * URI of the local video or online video. The local video URI can be obtained using the getUriFromPath function. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * URI of the local video or online video. The local video URI can be obtained using the getUriFromPath function. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + videoUri: string; + + /** + * Indicates the uri of video + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the uri of video + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the uri of video + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the uri of video + * + * @returns { string } the uri of video + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + get videoUri(): string; + + /** + * Indicates the uri of video + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the uri of video + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the uri of video + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the uri of video + * + * @param { string } the uri of video + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + set videoUri(value: string); + } + + /** + * Describe the unified audio data + * + * @extends File + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Describe the unified audio data + * + * @extends File + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Describe the unified audio data + * + * @extends File + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + class Audio extends File { + /** + * URI of the local audio or online audio. The local audio URI can be obtained using the getUriFromPath function. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * URI of the local audio or online audio. The local audio URI can be obtained using the getUriFromPath function. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * URI of the local audio or online audio. The local audio URI can be obtained using the getUriFromPath function. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + audioUri: string; + + /** + * Indicates the uri of audio + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the uri of audio + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the uri of audio + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the uri of audio + * + * @returns { string } the uri of audio + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + get audioUri(): string; + + /** + * Indicates the uri of audio + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the uri of audio + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the uri of audio + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the uri of audio + * + * @param { string } the uri of audio + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + set audioUri(value: string); + } + + /** + * Describe the unified folder data + * + * @extends File + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Describe the unified folder data + * + * @extends File + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Describe the unified folder data + * + * @extends File + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 + */ + class Folder extends File { + /** + * URI of the local folder or online folder. The local folder URI can be obtained using the getUriFromPath function. + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * URI of the local folder or online folder. The local folder URI can be obtained using the getUriFromPath function. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * URI of the local folder or online folder. The local folder URI can be obtained using the getUriFromPath function. + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + folderUri: string; + + /** + * Indicates the uri of folder + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the uri of folder + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the uri of folder + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the uri of folder + * + * @returns { string } the uri of folder + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + get folderUri(): string; + + /** + * Indicates the uri of folder + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the uri of folder + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the uri of folder + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @atomicservice + * @since 14 + */ + /** + * Indicates the uri of folder + * + * @param { string } the uri of folder + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + set folderUri(value: string); + } + + /** + * Describe system defined type data(this kind of data is provided and bound to OpenHarmony, + * also can be parsed by system provided API) + * + * @extends UnifiedRecord + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Describe system defined type data(this kind of data is provided and bound to OpenHarmony, + * also can be parsed by system provided API) + * + * @extends UnifiedRecord + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + class SystemDefinedRecord extends UnifiedRecord { + /** + * Indicates the details of system defined data + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the details of system defined data + * + * @type { ?Record } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + details?: Record; + + /** + * Indicates the details of system defined data + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the details of system defined data + * + * @type { ?Record } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the details of system defined data + * + * @returns { Record | undefined } the details of system defined data + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get details(): Record | undefined; + + /** + * Indicates the details of system defined data + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the details of system defined data + * + * @type { ?Record } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the details of system defined data + * + * @param { Record } the details of system defined data + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set details(value: Record); + } + + /** + * Describe system defined form data(this kind of data is provided and bound to OpenHarmony, + * also can be parsed by system provided API) + * + * @extends SystemDefinedRecord + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Describe system defined form data(this kind of data is provided and bound to OpenHarmony, + * also can be parsed by system provided API) + * + * @extends SystemDefinedRecord + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + class SystemDefinedForm extends SystemDefinedRecord { + /** + * Indicates the id of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the id of form + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + formId: number; + + /** + * Indicates the id of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the id of form + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the id of form + * + * @returns { number } the id of form + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get formId(): number; + + /** + * Indicates the id of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the id of form + * + * @type { number } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the id of form + * + * @param { number } the id of form + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set formId(value: number); + + /** + * Indicates the name of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the name of form + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + formName: string; + + /** + * Indicates the name of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the name of form + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the name of form + * + * @returns { string } the name of form + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get formName(): string; + + /** + * Indicates the name of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the name of form + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the name of form + * + * @param { string } the name of form + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set formName(value: string); + + /** + * Indicates the bundle name of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the bundle name of form + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + bundleName: string; + + /** + * Indicates the bundle name of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the bundle name of form + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the bundle name of form + * + * @returns { string } the bundle name of form + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get bundleName(): string; + + /** + * Indicates the bundle name of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the bundle name of form + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the bundle name of form + * + * @param { string } the bundle name of form + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set bundleName(value: string); + + /** + * Indicates the ability name of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the ability name of form + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + abilityName: string; + + /** + * Indicates the ability name of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the ability name of form + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the ability name of form + * + * @returns { string } the ability name of form + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get abilityName(): string; + + /** + * Indicates the ability name of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the ability name of form + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the ability name of form + * + * @param { string } the ability name of form + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set abilityName(value: string); + + /** + * Indicates the module of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the module of form + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + module: string; + + /** + * Indicates the module of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the module of form + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the module of form + * + * @returns { string } the module of form + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get module(): string; + + /** + * Indicates the module of form + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the module of form + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the module of form + * + * @param { string } the module of form + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set module(value: string); + } + + /** + * Describe system defined app item data(this kind of data is provided and bound to OpenHarmony, + * also can be parsed by system provided API) + * + * @extends SystemDefinedRecord + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Describe system defined app item data(this kind of data is provided and bound to OpenHarmony, + * also can be parsed by system provided API) + * + * @extends SystemDefinedRecord + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 + */ + class SystemDefinedAppItem extends SystemDefinedRecord { + /** + * Indicates the app id + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the app id + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + appId: string; + + /** + * Indicates the app id + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the app id + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the app id + * + * @returns { string } the app id + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get appId(): string; + + /** + * Indicates the app id + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the app id + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the app id + * + * @param { string } the app id + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set appId(value: string); + + /** + * Indicates the app name + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the app name + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + appName: string; + + /** + * Indicates the app name + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the app name + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the app name + * + * @returns { string } the app name + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get appName(): string; + + /** + * Indicates the app name + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the app name + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the app name + * + * @param { string } the app name + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set appName(value: string); - /** - * Describe system defined form data(this kind of data is provided and bound to OpenHarmony, - * also can be parsed by system provided API) - * - * @extends SystemDefinedRecord - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Describe system defined form data(this kind of data is provided and bound to OpenHarmony, - * also can be parsed by system provided API) - * - * @extends SystemDefinedRecord - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - class SystemDefinedForm extends SystemDefinedRecord { /** - * Indicates the id of form + * Indicates the id of app icon * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the id of form + * Indicates the id of app icon * - * @type { number } + * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - formId: number; + appIconId: string; + /** - * Indicates the name of form + * Indicates the id of app icon * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the name of form + * Indicates the id of app icon * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - formName: string; /** - * Indicates the bundle name of form + * Indicates the id of app icon + * + * @returns { string } the id of app icon + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get appIconId(): string; + + /** + * Indicates the id of app icon * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the bundle name of form + * Indicates the id of app icon * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - bundleName: string; /** - * Indicates the ability name of form + * Indicates the id of app icon + * + * @param { string } the id of app icon + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set appIconId(value: string); + + /** + * Indicates the id of app label * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the ability name of form + * Indicates the id of app label * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - abilityName: string; + appLabelId: string; + /** - * Indicates the module of form + * Indicates the id of app label * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the module of form + * Indicates the id of app label * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - module: string; - } + /** + * Indicates the id of app label + * + * @returns { string } the id of app label + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get appLabelId(): string; - /** - * Describe system defined app item data(this kind of data is provided and bound to OpenHarmony, - * also can be parsed by system provided API) - * - * @extends SystemDefinedRecord - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @since 10 - */ - /** - * Describe system defined app item data(this kind of data is provided and bound to OpenHarmony, - * also can be parsed by system provided API) - * - * @extends SystemDefinedRecord - * @syscap SystemCapability.DistributedDataManager.UDMF.Core - * @atomicservice - * @since 11 - */ - class SystemDefinedAppItem extends SystemDefinedRecord { /** - * Indicates the app id + * Indicates the id of app label * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the app id + * Indicates the id of app label * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - appId: string; /** - * Indicates the app name + * Indicates the id of app label + * + * @param { string } the id of app label + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set appLabelId(value: string); + + /** + * Indicates the bundle name of app * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the app name + * Indicates the bundle name of app * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - appName: string; + bundleName: string; + /** - * Indicates the id of app icon + * Indicates the bundle name of app * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the id of app icon + * Indicates the bundle name of app * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - appIconId: string; /** - * Indicates the id of app label + * Indicates the bundle name of app + * + * @returns { string } the bundle name of app + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get bundleName(): string; + + /** + * Indicates the bundle name of app * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the id of app label + * Indicates the bundle name of app * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - appLabelId: string; /** * Indicates the bundle name of app * + * @param { string } the bundle name of app + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set bundleName(value: string); + + /** + * Indicates the ability name of app + * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 10 */ /** - * Indicates the bundle name of app + * Indicates the ability name of app * * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - bundleName: string; + abilityName: string; + /** * Indicates the ability name of app * @@ -1363,7 +2775,39 @@ declare namespace unifiedDataChannel { * @atomicservice * @since 11 */ - abilityName: string; + /** + * Indicates the ability name of app + * + * @returns { string } the ability name of app + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get abilityName(): string; + + /** + * Indicates the ability name of app + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the ability name of app + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the ability name of app + * + * @param { string } the ability name of app + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set abilityName(value: string); } /** @@ -1381,7 +2825,8 @@ declare namespace unifiedDataChannel { * @extends SystemDefinedRecord * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ class SystemDefinedPixelMap extends SystemDefinedRecord { /** @@ -1399,6 +2844,54 @@ declare namespace unifiedDataChannel { * @since 11 */ rawData: Uint8Array; + + /** + * Indicates the raw data of pixel map + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the raw data of pixel map + * + * @type { Uint8Array } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the raw data of pixel map + * + * @returns { Uint8Array } the raw data of pixel map + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get rawData(): Uint8Array; + + /** + * Indicates the raw data of pixel map + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the raw data of pixel map + * + * @type { Uint8Array } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the raw data of pixel map + * + * @param { Uint8Array } the raw data of pixel map + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set rawData(value: Uint8Array); } /** @@ -1466,7 +2959,8 @@ declare namespace unifiedDataChannel { * @enum { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum Intention { /** @@ -1480,7 +2974,8 @@ declare namespace unifiedDataChannel { * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ DATA_HUB = 'DataHub', @@ -1574,10 +3069,11 @@ declare namespace unifiedDataChannel { /** * Describe the optional arguments of data operation * - * @interface { Options } + * @typedef { Options } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ interface Options { /** @@ -1600,6 +3096,7 @@ declare namespace unifiedDataChannel { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ intention?: Intention; @@ -1623,6 +3120,7 @@ declare namespace unifiedDataChannel { * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ key?: string; @@ -1644,7 +3142,8 @@ declare namespace unifiedDataChannel { * @enum { number } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FileConflictOptions { /** @@ -1652,7 +3151,8 @@ declare namespace unifiedDataChannel { * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ OVERWRITE, @@ -1661,7 +3161,8 @@ declare namespace unifiedDataChannel { * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ SKIP } @@ -1672,7 +3173,8 @@ declare namespace unifiedDataChannel { * @enum { number } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ enum ProgressIndicator { /** @@ -1680,7 +3182,8 @@ declare namespace unifiedDataChannel { * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE, @@ -1689,7 +3192,8 @@ declare namespace unifiedDataChannel { * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT } @@ -1700,7 +3204,8 @@ declare namespace unifiedDataChannel { * @enum { number } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ enum ListenerStatus { /** @@ -1708,7 +3213,8 @@ declare namespace unifiedDataChannel { * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ FINISHED = 0, @@ -1717,7 +3223,8 @@ declare namespace unifiedDataChannel { * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ PROCESSING, @@ -1726,7 +3233,8 @@ declare namespace unifiedDataChannel { * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ CANCELED, @@ -1735,7 +3243,8 @@ declare namespace unifiedDataChannel { * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ INNER_ERROR = 200, @@ -1744,7 +3253,8 @@ declare namespace unifiedDataChannel { * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ INVALID_PARAMETERS, @@ -1753,7 +3263,8 @@ declare namespace unifiedDataChannel { * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ DATA_NOT_FOUND, @@ -1762,7 +3273,8 @@ declare namespace unifiedDataChannel { * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ SYNC_FAILED, @@ -1771,7 +3283,8 @@ declare namespace unifiedDataChannel { * * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ COPY_FILE_FAILED, } @@ -1782,7 +3295,8 @@ declare namespace unifiedDataChannel { * @interface ProgressInfo * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ProgressInfo { /** @@ -1791,7 +3305,8 @@ declare namespace unifiedDataChannel { * @type { number } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ progress: number; @@ -1801,7 +3316,8 @@ declare namespace unifiedDataChannel { * @type { ListenerStatus } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ status: ListenerStatus; } @@ -1814,7 +3330,8 @@ declare namespace unifiedDataChannel { * @param { UnifiedData | null } data - Data obtained when the progress reaches 100%. * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ type DataProgressListener = (progressInfo: ProgressInfo, data: UnifiedData | null) => void; @@ -1824,7 +3341,8 @@ declare namespace unifiedDataChannel { * @interface GetDataParams * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ interface GetDataParams { /** @@ -1833,7 +3351,8 @@ declare namespace unifiedDataChannel { * @type { ProgressIndicator } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ progressIndicator: ProgressIndicator; @@ -1843,7 +3362,8 @@ declare namespace unifiedDataChannel { * @type { DataProgressListener } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ dataProgressListener: DataProgressListener; @@ -1853,7 +3373,8 @@ declare namespace unifiedDataChannel { * @type { string } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ destUri?: string; @@ -1863,7 +3384,8 @@ declare namespace unifiedDataChannel { * @type { FileConflictOptions } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ fileConflictOptions?: FileConflictOptions; @@ -1971,7 +3493,8 @@ declare namespace unifiedDataChannel { *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function insertData(options: Options, data: UnifiedData, callback: AsyncCallback): void; @@ -1996,7 +3519,8 @@ declare namespace unifiedDataChannel { *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function insertData(options: Options, data: UnifiedData): Promise; @@ -2073,7 +3597,8 @@ declare namespace unifiedDataChannel { *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function queryData(options: Options, callback: AsyncCallback>): void; @@ -2098,7 +3623,8 @@ declare namespace unifiedDataChannel { *
2.Incorrect parameters types. * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function queryData(options: Options): Promise>; diff --git a/api/@ohos.deviceInfo.d.ets b/api/@ohos.deviceInfo.d.ets index 950c68220ee4ab5b7feab7bb31afd7ad72b3eeae..0297a224dab9f5f109e7db8542df94f230ee6e1d 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,35 @@ 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; + + /** + * Obtains the sdk minor api version + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get sdkMinorApiVersion(): int; + + /** + * Obtains the sdk patch api version + * + * @syscap SystemCapability.Startup.SystemInfo + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + static get sdkPatchApiVersion(): int; } export default deviceInfo; diff --git a/api/@ohos.deviceStatus.dragInteraction.d.ts b/api/@ohos.deviceStatus.dragInteraction.d.ts index 16fc70e7cf185a53e314a17aff14af30ab4d09e6..78d9075a49516cdf14b7e70c1d0c17cddf26419c 100644 --- a/api/@ohos.deviceStatus.dragInteraction.d.ts +++ b/api/@ohos.deviceStatus.dragInteraction.d.ts @@ -26,7 +26,8 @@ import { Callback } from './@ohos.base'; * @namespace dragInteraction * @syscap SystemCapability.Msdp.DeviceStatus.Drag * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace dragInteraction { /** @@ -35,7 +36,8 @@ declare namespace dragInteraction { * @enum { number } * @syscap SystemCapability.Msdp.DeviceStatus.Drag * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enum DragState { /** @@ -43,7 +45,8 @@ declare namespace dragInteraction { * * @syscap SystemCapability.Msdp.DeviceStatus.Drag * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ MSG_DRAG_STATE_START = 1, @@ -52,7 +55,8 @@ declare namespace dragInteraction { * * @syscap SystemCapability.Msdp.DeviceStatus.Drag * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ MSG_DRAG_STATE_STOP = 2, @@ -61,7 +65,8 @@ declare namespace dragInteraction { * * @syscap SystemCapability.Msdp.DeviceStatus.Drag * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ MSG_DRAG_STATE_CANCEL = 3, } @@ -72,7 +77,8 @@ declare namespace dragInteraction { * @interface Summary * @syscap SystemCapability.Msdp.DeviceStatus.Drag * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface Summary { /** @@ -81,19 +87,21 @@ declare namespace dragInteraction { * @type { string } * @syscap SystemCapability.Msdp.DeviceStatus.Drag * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ dataType: string; /** * Data length of the dragged object. * - * @type { number } + * @type { int } * @syscap SystemCapability.Msdp.DeviceStatus.Drag * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - dataSize: number; + dataSize: int; } /** @@ -117,7 +125,8 @@ declare namespace dragInteraction { *
2.Incorrect parameter types.3.Parameter verification failed. * @syscap SystemCapability.Msdp.DeviceStatus.Drag * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'drag', callback: Callback): void; @@ -144,7 +153,8 @@ declare namespace dragInteraction { *
2.Incorrect parameter types.3.Parameter verification failed. * @syscap SystemCapability.Msdp.DeviceStatus.Drag * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'drag', callback?: Callback): void; @@ -155,7 +165,8 @@ declare namespace dragInteraction { * @throws {BusinessError} 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Msdp.DeviceStatus.Drag * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDataSummary(): Array

; diff --git a/api/@ohos.display.d.ts b/api/@ohos.display.d.ts index 3e2172a826fab1458bd1c425cea538ceaddf448d..cbd6182e2ff6a14f00c5966b95791ed17678812c 100644 --- a/api/@ohos.display.d.ts +++ b/api/@ohos.display.d.ts @@ -98,11 +98,12 @@ 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. - * For 2in1 devices with an external screen, the Display object obtained is the primary screen. For 2in1 devices without an external screen, the Display object obtained is the built-in screen. + * For 2in1 devices with an external screen, the Display object obtained is the primary screen. + * For 2in1 devices without an external screen, the Display object obtained is the built-in screen. * * @returns { Display } the result of primary display * @throws { BusinessError } 1400001 - Invalid display or screen. @@ -116,7 +117,7 @@ declare namespace display { /** * Obtain the target display. * - * @param { number } displayId Display id to query. This parameter should be greater than or equal to 0. + * @param { long } displayId Display id to query. This parameter should be greater than or equal to 0. * @returns { Display } the result of display * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. @@ -127,7 +128,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: long): Display; /** * Obtain all displays. @@ -138,7 +139,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 +170,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 +187,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,12 +202,12 @@ 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. * - * @param { number } displayId Display id to query. This parameter should be greater than or equal to 0. + * @param { long } displayId Display id to query. This parameter should be greater than or equal to 0. * @returns { boolean } true means there is a privacy window on the current display * @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. @@ -216,13 +218,13 @@ 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: long): boolean; /** * Register the callback for display changes. * * @param { 'add' | 'remove' | 'change' } type the event of display change - * @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 @@ -232,7 +234,7 @@ declare namespace display { * Register the callback for display changes. * * @param { 'add' | 'remove' | 'change' } type the event of display change - * @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 @@ -243,22 +245,22 @@ declare namespace display { * Register the callback for display changes. * * @param { 'add' | 'remove' | 'change' } type the event of display change - * @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 on(type: 'add' | 'remove' | 'change', callback: Callback): void; + function on(type: 'add' | 'remove' | 'change', callback: Callback): void; /** * 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 @@ -268,7 +270,7 @@ 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 @@ -279,16 +281,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 +305,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 +320,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 +347,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 +377,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 +416,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. @@ -453,40 +455,66 @@ 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 off(type: 'foldStatusChange', callback?: Callback): void; + function off(type: 'foldStatusChange', callback?: Callback): void; /** * 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. + * @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. * * @param { 'foldAngleChange' } type the event of fold angle changes. - * @param { Callback> } callback Callback used to return the current fold angle of device. + * @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 +529,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 +544,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 +557,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 +574,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 +602,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 +616,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 +624,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 +635,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 +663,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 +674,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 +714,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,14 +729,14 @@ 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. * * @permission ohos.permission.ACCESS_VIRTUAL_SCREEN * @param { VirtualScreenConfig } config Indicates the options of the virtual screen. - * @returns { Promise } Promise used to return the created virtual screen id + * @returns { Promise } Promise used to return the created virtual screen id * @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. @@ -681,13 +745,13 @@ declare namespace display { * @syscap SystemCapability.Window.SessionManager * @since 16 */ - function createVirtualScreen(config: VirtualScreenConfig): Promise; + function createVirtualScreen(config: VirtualScreenConfig): Promise; /** * Destroy virtual screen. * * @permission ohos.permission.ACCESS_VIRTUAL_SCREEN - * @param { number } screenId Indicates the screen id of the virtual screen. + * @param { long } screenId Indicates the screen id of the virtual screen. * @returns { Promise } Promise that returns no value. * @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. @@ -698,13 +762,13 @@ declare namespace display { * @syscap SystemCapability.Window.SessionManager * @since 16 */ - function destroyVirtualScreen(screenId: number): Promise; + function destroyVirtualScreen(screenId: long): Promise; /** * Set surface for the virtual screen. * * @permission ohos.permission.ACCESS_VIRTUAL_SCREEN - * @param { number } screenId Indicates the screen id of the virtual screen. + * @param { long } screenId Indicates the screen id of the virtual screen. * @param { string } surfaceId Indicates the surface id. * @returns { Promise } Promise that returns no value * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. @@ -716,13 +780,13 @@ declare namespace display { * @syscap SystemCapability.Window.SessionManager * @since 16 */ - function setVirtualScreenSurface(screenId: number, surfaceId: string): Promise; + function setVirtualScreenSurface(screenId: long, surfaceId: string): Promise; /** * Make screen as unique-screen * * @permission ohos.permission.ACCESS_VIRTUAL_SCREEN - * @param { number } screenId Indicates the unique screen id. It's type should be int. + * @param { long } screenId Indicates the unique screen id. It's type should be int. * @returns { Promise } Promise that returns no value * @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. @@ -733,12 +797,13 @@ declare namespace display { * @syscap SystemCapability.Window.SessionManager * @since 16 */ - function makeUnique(screenId: number): Promise; + function makeUnique(screenId: long): Promise; /** * Add the list of window ids to the block list which won't display on the virtual screen * - * @param { Array } windowIds - The list of window ids that do not want to display on the virtual screen + * @param { Array } windowIds - The list of window ids that do not want to display on the virtual screen + * @returns { Promise } Promise that returns no value * @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. @@ -748,12 +813,13 @@ declare namespace display { * @systemapi Hide this for inner system use. * @since 18 */ - function addVirtualScreenBlocklist(windowIds: Array): Promise; + function addVirtualScreenBlocklist(windowIds: Array): Promise; /** * Remove the list of window ids from the block list which won't display on the virtual screen * - * @param { Array } windowIds - The list of window ids that want to display on the virtual screen + * @param { Array } windowIds - The list of window ids that want to display on the virtual screen + * @returns { Promise } Promise that returns no value * @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. @@ -763,13 +829,13 @@ declare namespace display { * @systemapi Hide this for inner system use. * @since 18 */ - function removeVirtualScreenBlocklist(windowIds: Array): Promise; + function removeVirtualScreenBlocklist(windowIds: Array): Promise; /** * Convert global coordinates to relative coordinates. * * @param { Position } position - The global coordinates to be converted. - * @param { number } [displayId] - The optional display id indicate the display relative to. + * @param { long } [displayId] - The optional display id indicate the display relative to. * If not specified,use the display where the coodinates are located. * @returns { RelativePosition } The relative coordinates. * @throws { BusinessError } 801 - Capability not supported. @@ -779,7 +845,7 @@ declare namespace display { * @atomicservice * @since 20 */ - function convertGlobalToRelativeCoordinate(position: Position, displayId?: number): RelativePosition; + function convertGlobalToRelativeCoordinate(position: Position, displayId?: long): RelativePosition; /** * Convert relative coordinates to global coordinates. @@ -815,31 +881,31 @@ declare namespace display { /** * Indicates the width of the virtual screen. * - * @type { number } + * @type { long } * @syscap SystemCapability.Window.SessionManager * @since arkts {'1.1':'16', '1.2':'20'} * @arkts 1.1&1.2 */ - width: number; + width: long; /** * Indicates the height of the virtual screen. * - * @type { number } + * @type { long } * @syscap SystemCapability.Window.SessionManager * @since arkts {'1.1':'16', '1.2':'20'} * @arkts 1.1&1.2 */ - height: number; + height: long; /** * Indicates the density of the virtual screen. * - * @type { number } + * @type { double } * @syscap SystemCapability.Window.SessionManager * @since 16 */ - density: number; + density: double; /** * Indicates the surface id of the virtual screen. @@ -852,14 +918,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 @@ -873,10 +941,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 FoldStatus { + enum FoldStatus { /** * Fold Status Unknown. * @@ -896,7 +964,7 @@ 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, @@ -919,7 +987,7 @@ 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_EXPANDED = 1, @@ -939,13 +1007,15 @@ 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 @@ -957,7 +1027,7 @@ 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_HALF_FOLDED = 3, @@ -1039,10 +1109,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 +1206,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export enum DisplayState { + enum DisplayState { /** * Unknown. * @@ -1148,7 +1218,8 @@ declare namespace display { * * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ STATE_UNKNOWN = 0, /** @@ -1335,21 +1406,23 @@ declare namespace display { LANDSCAPE_INVERTED = 3 } - /** - * Indicate the source mode of the display - * - * @enum { number } - * @syscap SystemCapability.Window.SessionManager - * @atomicservice - * @since 19 - */ + /** + * Indicate the source mode of the display + * + * @enum { number } + * @syscap SystemCapability.Window.SessionManager + * @atomicservice + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 + */ enum DisplaySourceMode { /** * Indicate that the display is not in use. * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -1358,7 +1431,8 @@ declare namespace display { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ MAIN = 1, @@ -1367,7 +1441,8 @@ declare namespace display { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ MIRROR = 2, @@ -1376,7 +1451,8 @@ declare namespace display { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ EXTEND = 3, @@ -1385,7 +1461,8 @@ declare namespace display { * * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ ALONE = 4 } @@ -1396,7 +1473,8 @@ declare namespace display { * @enum { number } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ enum ScreenShape { /** @@ -1404,7 +1482,8 @@ declare namespace display { * * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ RECTANGLE = 0, /** @@ -1412,7 +1491,8 @@ declare namespace display { * * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ ROUND = 1 } @@ -1433,11 +1513,11 @@ 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. * - * @type { number } + * @type { long } * @readonly * @syscap SystemCapability.Window.SessionManager * @since 10 @@ -1445,14 +1525,14 @@ declare namespace display { /** * The display ID is used to identify the screen where the crease is located. * - * @type { number } + * @type { long } * @readonly * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - readonly displayId: number; + readonly displayId: long; /** * Crease Region. @@ -1495,74 +1575,74 @@ declare namespace display { /** * The X-axis coordinate of the upper left vertex of the rectangle, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 */ /** * The X-axis coordinate of the upper left vertex of the rectangle, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - left: number; + left: long; /** * The Y-axis coordinate of the upper left vertex of the rectangle, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 */ /** * The Y-axis coordinate of the upper left vertex of the rectangle, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - top: number; + top: long; /** * Width of the rectangle, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 */ /** * Width of the rectangle, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - width: number; + width: long; /** * Height of the rectangle, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 9 */ /** * Height of the rectangle, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - height: number; + height: long; } /** @@ -1581,7 +1661,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 +1759,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 +1811,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. * @@ -1746,26 +1826,26 @@ declare namespace display { /** * Display physical width, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - physicalWidth: number; + physicalWidth: long; /** * Display physical height, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - physicalHeight: number; + physicalHeight: long; } /** @@ -1793,18 +1873,18 @@ declare namespace display { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - export interface Display { + interface Display { /** * Display ID. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ /** * Display ID. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @since 10 @@ -1812,14 +1892,14 @@ declare namespace display { /** * Display ID. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - id: number; + id: long; /** * Display name. @@ -1878,25 +1958,25 @@ declare namespace display { /** * Refresh rate, in Hz. * - * @type { number } + * @type { int } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ /** * Refresh rate, in Hz. * - * @type { number } + * @type { int } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - refreshRate: number; + refreshRate: int; /** * Rotation degrees of the display. * - * @type { number } + * @type { int } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ @@ -1907,25 +1987,25 @@ declare namespace display { * The value 2 indicates that the screen of the display rotates clockwise by 180°. * The value 3 indicates that the screen of the display rotates clockwise by 270°. * - * @type { number } + * @type { int } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - rotation: number; + rotation: int; /** * Display width, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ /** * Display width, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @since 10 @@ -1933,26 +2013,26 @@ declare namespace display { /** * Display width, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - width: number; + width: long; /** * Display height, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ /** * Display height, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @since 10 @@ -1960,50 +2040,50 @@ declare namespace display { /** * Display height, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - height: number; + height: long; /** * Display available width, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - availableWidth: number; + availableWidth: long; /** * Display available height, in pixels. * - * @type { number } + * @type { long } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - availableHeight: number; + availableHeight: long; /** * Display resolution, that is, the number of pixels per inch. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ /** * Display resolution, that is, the number of pixels per inch. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @since 11 @@ -2011,14 +2091,14 @@ declare namespace display { /** * Display resolution, that is, the number of pixels per inch. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - densityDPI: number; + densityDPI: double; /** * Display orientation. @@ -2043,33 +2123,33 @@ declare namespace display { /** * Display density, in pixels. which is the scaling coefficient between physical pixels and logical pixels. The value for a low-resolution display is 1.0. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ /** * Display density, in pixels. which is the scaling coefficient between physical pixels and logical pixels. The value for a low-resolution display is 1.0. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - densityPixels: number; + densityPixels: double; /** * Text scale density of the display. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ /** * Text scale density of the display. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @since 11 @@ -2077,26 +2157,26 @@ declare namespace display { /** * Text scale density of the display. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - scaledDensity: number; + scaledDensity: double; /** * DPI on the x-axis. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ /** * DPI on the x-axis. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice * @since 12 @@ -2104,26 +2184,26 @@ declare namespace display { /** * DPI on the x-axis. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - xDPI: number; + xDPI: double; /** * DPI on the y-axis. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ /** * DPI on the y-axis. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice * @since 12 @@ -2131,13 +2211,14 @@ declare namespace display { /** * DPI on the y-axis. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ - yDPI: number; + yDPI: double; /** * The shape of screen @@ -2145,7 +2226,8 @@ declare namespace display { * @type { ?ScreenShape } * @syscap SystemCapability.WindowManager.WindowManager.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ screenShape?: ScreenShape; @@ -2189,39 +2271,43 @@ declare namespace display { * @type { ?DisplaySourceMode } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ sourceMode?: DisplaySourceMode; /** * Coordinates of the top-left corner of the display relative to the main display. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ - x?: number; + x?: long; /** * Coordinates of the top-left corner of the display relative to the main display. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ - y?: number; + y?: long; /** * All supported refresh rates. * - * @type { ?Array } + * @type { ?Array } * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ - supportedRefreshRates?: Array; + supportedRefreshRates?: Array; /** * Obtain the cutout info of the display. @@ -2258,7 +2344,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; @@ -2272,7 +2359,8 @@ declare namespace display { * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ hasImmersiveWindow(callback: AsyncCallback): void; @@ -2286,7 +2374,8 @@ declare namespace display { * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ hasImmersiveWindow(): Promise; @@ -2298,7 +2387,8 @@ declare namespace display { * @throws { BusinessError } 1400001 - Invalid display or screen. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ getAvailableArea(): Promise; @@ -2313,7 +2403,8 @@ declare namespace display { * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'availableAreaChange', callback: Callback): void; @@ -2328,7 +2419,8 @@ declare namespace display { * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'availableAreaChange', callback?: Callback): void; @@ -2358,20 +2450,20 @@ declare namespace display { /** * Indicates the x-axis coordinates * - * @type { number } + * @type { long } * @syscap SystemCapability.Window.SessionManager * @since 20 */ - x: number; + x: long; /** * Indicates the y-axis coordinates * - * @type { number } + * @type { long } * @syscap SystemCapability.Window.SessionManager * @since 20 */ - y: number; + y: long; } /** @@ -2385,11 +2477,11 @@ declare namespace display { /** * Indicates the display. * - * @type { number } + * @type { long } * @syscap SystemCapability.Window.SessionManager * @since 20 */ - displayId: number; + displayId: long; /** * Indicates the coordinates relative to the display. diff --git a/api/@ohos.distributedHardware.mechanicManager.d.ts b/api/@ohos.distributedHardware.mechanicManager.d.ts index f9ab1d705722d80856dd5a6fe6d746e16f9ebd2f..58456bc01c15a0a6075deaecb96b8870d6a1ad93 100644 --- a/api/@ohos.distributedHardware.mechanicManager.d.ts +++ b/api/@ohos.distributedHardware.mechanicManager.d.ts @@ -63,9 +63,11 @@ declare namespace mechanicManager { /** * Sets a user operation. + * @permission ohos.permission.CONNECT_MECHANIC_HARDWARE * @param { Operation } operation Operation type. * @param { string } mac MAC address. * @param { string } params Operation parameters. + * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 33300001 - Service exception. * @syscap SystemCapability.Mechanic.Core @@ -79,7 +81,7 @@ declare namespace mechanicManager { * @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. + * @throws { BusinessError } 33300003 - Feature not supported. * @syscap SystemCapability.Mechanic.Core * @since 20 */ @@ -124,7 +126,7 @@ declare namespace mechanicManager { * @throws { BusinessError } 202 - Not system application. * @throws { BusinessError } 33300001 - Service exception. * @throws { BusinessError } 33300002 - Device not connected. - * @throws { BusinessError } 33300003 - Device not supported. + * @throws { BusinessError } 33300003 - Feature not supported. * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 @@ -343,7 +345,7 @@ declare namespace mechanicManager { */ export interface RotationAngles { /** - * Yaw angle, ranging from -2π to 2*π, measured in radians. + * Yaw angle, ranging from -2*Math.PI to 2*Math.PI, measured in radians. * @type { ?number } * @syscap SystemCapability.Mechanic.Core * @systemapi @@ -353,7 +355,7 @@ declare namespace mechanicManager { yaw?: number; /** - * Roll angle, ranging from -2π to 2*π, measured in radians. + * Roll angle, ranging from -2*Math.PI to 2*Math.PI, measured in radians. * @type { ?number } * @syscap SystemCapability.Mechanic.Core * @systemapi @@ -363,7 +365,7 @@ declare namespace mechanicManager { roll?: number; /** - * Pitch angle, ranging from -2π to 2*π, measured in radians. + * Pitch angle, ranging from -2*Math.PI to 2*Math.PI, measured in radians. * @type { ?number } * @syscap SystemCapability.Mechanic.Core * @systemapi @@ -383,7 +385,7 @@ declare namespace mechanicManager { */ export interface EulerAngles { /** - * Yaw angle, ranging from -π to π, measured in radians. + * Yaw angle, ranging from -Math.PI to Math.PI, measured in radians. * @type { ?number } * @syscap SystemCapability.Mechanic.Core * @systemapi @@ -393,7 +395,7 @@ declare namespace mechanicManager { yaw?: number; /** - * Roll angle, ranging from -π to π, measured in radians. + * Roll angle, ranging from -Math.PI to Math.PI, measured in radians. * @type { ?number } * @syscap SystemCapability.Mechanic.Core * @systemapi @@ -403,7 +405,7 @@ declare namespace mechanicManager { roll?: number; /** - * Pitch angle, ranging from -π to π, measured in radians. + * Pitch angle, ranging from -Math.PI to Math.PI, measured in radians. * @type { ?number } * @syscap SystemCapability.Mechanic.Core * @systemapi @@ -591,7 +593,7 @@ declare namespace mechanicManager { /** * Enumerates the rotation axis limit states. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 @@ -693,7 +695,7 @@ declare namespace mechanicManager { /** * Enumerates the user operations. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 @@ -718,7 +720,7 @@ declare namespace mechanicManager { /** * Enumerates the tracking events. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Mechanic.Core * @since 20 */ @@ -749,7 +751,7 @@ declare namespace mechanicManager { /** * Rotation execution results. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 @@ -798,7 +800,7 @@ declare namespace mechanicManager { /** * Enumerates the mechanical device types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Mechanic.Core * @since 20 */ @@ -816,7 +818,7 @@ declare namespace mechanicManager { /** * Device attach states. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Mechanic.Core * @since 20 */ @@ -839,7 +841,7 @@ declare namespace mechanicManager { /** * Enumerates the camera tracking layouts. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Mechanic.Core * @systemapi * @since 20 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..47a801c3c5d139ebb7c7970b97745c797187e484 100644 --- a/api/@ohos.effectKit.d.ts +++ b/api/@ohos.effectKit.d.ts @@ -18,13 +18,10 @@ * @kit ArkGraphics2D */ -/*** if arkts 1.1 */ + import { AsyncCallback } from './@ohos.base'; import image from './@ohos.multimedia.image'; -/*** endif */ -/*** if arkts 1.2 */ -import image from './@ohos.multimedia.image'; -/*** endif */ + /** * @namespace effectKit @@ -62,7 +59,7 @@ declare namespace effectKit { * @since 12 */ /** - * A class used to add a specified effect to an image. Before calling any method of Filter, use createEffect to create a Filter instance. + * The Filter of FilterChain. * @typedef Filter * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform @@ -75,14 +72,14 @@ declare namespace effectKit { /** * A blur effect is added to the image. - * @param { number } radius - The degree of blur, the value is measured in pixels. + * @param { double } radius - The degree of blur, the value is measured in pixels. * @returns { Filter } Filters for the current effect have been added. * @syscap SystemCapability.Multimedia.Image.Core * @since 9 */ /** * A blur effect is added to the image. - * @param { number } radius - The degree of blur, the value is measured in pixels. + * @param { double } radius - The degree of blur, the value is measured in pixels. * @returns { Filter } Filters for the current effect have been added. * @syscap SystemCapability.Multimedia.Image.Core * @form @@ -90,41 +87,39 @@ declare namespace effectKit { * @since 12 */ /** - * Adds the blur effect to the filter linked list, and returns the head node of the linked list. - * @param { number } radius - Blur radius, in pixels. The blur effect is proportional to the configured value. - * A larger value indicates a more obvious effect. - * @returns { Filter } Final image effect. + * A blur effect is added to the image. + * @param { double } radius - The degree of blur, the value is measured in pixels. + * @returns { Filter } Filters for the current effect have been added. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 + * @arkts 1.1&1.2 */ - blur(radius: number): Filter; + blur(radius: double): Filter; /** - * Adds the blur effect to the filter linked list, and returns the head node of the linked list. - * @param { number } radius - Blur radius, in pixels. The blur effect is proportional to the configured value. - * A larger value indicates a more obvious effect. - * @param { TileMode } tileMode - Tile mode of the shader effect. The blur effect of image edges is affected. Currently, - * only CPU rendering is supported. Therefore, the tile mode supports only DECAL. - * @returns { Filter } Final image effect. + * A blur effect is added to the image. + * @param { double } radius - The degree of blur, the value is measured in pixels. + * @param { TileMode } tileMode - The tile mode of blur. + * @returns { Filter } Filters for the current effect have been added. * @syscap SystemCapability.Multimedia.Image.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - blur(radius: number, tileMode: TileMode): Filter; + blur(radius: double, tileMode: TileMode): Filter; /** * A Brightness effect is added to the image. - * @param { number } bright - The degree of light and darkness,the value range is 0 to 1. + * @param { double } bright - The degree of light and darkness,the value range is 0 to 1. * @returns { Filter } Filters for the current effect have been added. * @syscap SystemCapability.Multimedia.Image.Core * @since 9 */ /** * A Brightness effect is added to the image. - * @param { number } bright - The degree of light and darkness,the value range is 0 to 1. + * @param { double } bright - The degree of light and darkness,the value range is 0 to 1. * @returns { Filter } Filters for the current effect have been added. * @syscap SystemCapability.Multimedia.Image.Core * @form @@ -132,16 +127,17 @@ declare namespace effectKit { * @since 12 */ /** - * Adds the brightness effect to the filter linked list, and returns the head node of the linked list. - * @param { number } bright - Brightness value, ranging from 0 to 1. When the value is 0, the image brightness remains unchanged. - * @returns { Filter } Final image effect. + * A Brightness effect is added to the image. + * @param { double } bright - The degree of light and darkness,the value range is 0 to 1. + * @returns { Filter } Filters for the current effect have been added. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - brightness(bright: number): Filter; + brightness(bright: double): Filter; /** * A Grayscale effect is added to the image. @@ -158,13 +154,14 @@ declare namespace effectKit { * @since 12 */ /** - * Adds the grayscale effect to the filter linked list, and returns the head node of the linked list. - * @returns { Filter } Final image effect. + * A Grayscale effect is added to the image. + * @returns { Filter } Filters for the current effect have been added. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ grayscale(): Filter; @@ -175,40 +172,39 @@ declare namespace effectKit { * @since 12 */ /** - * Adds the inversion effect to the filter linked list, and returns the head node of the linked list. - * @returns { Filter } Final image effect. + * A invert effect is added to the image. + * @returns { Filter } Filters for the current effect have been added. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ invert(): Filter; /** * A custom effect is added to the image. * - * @param { Array } colorMatrix - A matrix of 5x4 size for create effect filter. + * @param { Array } colorMatrix - A matrix of 5x4 size for create effect filter. * @returns { Filter } Filters for the current effect have been added. * @throws { BusinessError } 401 - Input parameter error. * @syscap SystemCapability.Multimedia.Image.Core * @since 12 */ /** - * Adds a custom effect to the filter linked list, and returns the head node of the linked list. + * A custom effect is added to the image. * - * @param { Array } colorMatrix - Custom color matrix. - * A 5 x 4 matrix can be created. The value range of the matrix element is [0, 1], - * where 0 indicates that the color channel is not involved in the calculation, - * and 1 indicates that the color channel is involved in the calculation and retains the original weight. - * @returns { Filter } Final image effect. + * @param { Array } colorMatrix - A matrix of 5x4 size for create effect filter. + * @returns { Filter } Filters for the current effect have been added. * @throws { BusinessError } 401 - Input parameter error. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - setColorMatrix(colorMatrix: Array): Filter; + setColorMatrix(colorMatrix: Array): Filter; /** - * Obtains image.PixelMap of the source image to which the filter linked list is added. + * Gets the PixelMap where all filter effects have been added to the image. * @returns { image.PixelMap } image.PixelMap. * @syscap SystemCapability.Multimedia.Image.Core * @since 9 @@ -232,14 +228,14 @@ declare namespace effectKit { * @since 12 */ /** - * Obtains image.PixelMap of the source image to which the filter linked list is added. This API uses a promise to return the result. - * @returns { Promise } - Promise used to return image.PixelMap of the source image. + * Gets the PixelMap where all filter effects have been added to the image. + * @returns { Promise } - returns the PixelMap generated. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 + * @arkts 1.1&1.2 */ getEffectPixelMap(): Promise; } @@ -259,13 +255,14 @@ declare namespace effectKit { * @since 12 */ /** - * A class used to obtain the color from an image. Before calling any method of ColorPicker, use createColorPicker to create a ColorPicker instance. + * The color picker of an image. * @typedef ColorPicker * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ColorPicker { @@ -284,13 +281,14 @@ declare namespace effectKit { * @since 12 */ /** - * Obtains the main color from the image and writes the result to a Color instance. This API uses a promise to return the result. - * @returns { Promise } Promise used to return the color value of the main color. If the operation fails, an error message is returned. + * get main color of an image + * @returns { Promise } returns the MainColor generated. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ getMainColor(): Promise; @@ -309,13 +307,14 @@ declare namespace effectKit { * @since 12 */ /** - * Obtains the main color from the image and writes the result to a Color instance. This API returns the result synchronously. - * @returns { Color } Color value of the main color. If the operation fails, null is returned. + * get main color of an image + * @returns { Color } Main color picked in the image. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ getMainColorSync(): Color; @@ -334,19 +333,20 @@ declare namespace effectKit { * @since 12 */ /** - * Obtains the color with the largest proportion from the image and writes the result to a Color instance. This API returns the result synchronously. - * @returns { Color } Color value of the color with the largest proportion. If the operation fails, null is returned. + * Get largest proportion color of an image + * @returns { Color } Largest proportion color picked in the image. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ getLargestProportionColor(): Color; /** * Get top proportion color of an image - * @param { number } colorCount - The number of colors to require, the value is 1 to 10. + * @param { int } colorCount - The number of colors to require, the value is 1 to 10. * @returns { Array } An array of feature colors sorted by proportion, with a size equal to * the minimum of colorCount and the actual number of extracted feature colors. * @syscap SystemCapability.Multimedia.Image.Core @@ -355,19 +355,18 @@ declare namespace effectKit { * @since 12 */ /** - * Obtains a given number of colors with the top proportions in the image. This API returns the result synchronously. - * @param { number } colorCount - Number of colors to obtain. The value range is [1, 10]. If a non-integer is passed in, the value will be rounded down. - * @returns { Array } Array of colors, sorted by proportion. - * - If the number of colors obtained is less than the value of colorCount, the array size is the actual number obtained. - * - If the colors fail to be obtained or the number of colors obtained is less than 1, [null] is returned. - * - If the value of colorCount is greater than 10, an array holding the first 10 colors with the top proportions is returned. + * Get top proportion color of an image + * @param { int } colorCount - The number of colors to require, the value is 1 to 10. + * @returns { Array } An array of feature colors sorted by proportion, with a size equal to + * the minimum of colorCount and the actual number of extracted feature colors. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - getTopProportionColors(colorCount: number): Array; + getTopProportionColors(colorCount: int): Array; /** * Get highest saturation color of an image @@ -384,13 +383,14 @@ declare namespace effectKit { * @since 12 */ /** - * Obtains the color with the highest saturation from the image and writes the result to a Color instance. This API returns the result synchronously. - * @returns { Color } Color value of the color with the highest saturation. If the operation fails, null is returned. + * Get highest saturation color of an image + * @returns { Color } Highest saturation color picked in the image. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ getHighestSaturationColor(): Color; @@ -409,26 +409,27 @@ declare namespace effectKit { * @since 12 */ /** - * Obtains the average color from the image and writes the result to a Color instance. This API returns the result synchronously. - * @returns { Color } Average color value. If the operation fails, null is returned. + * Get average color of an image + * @returns { Color } Average color calculated in the image. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ getAverageColor(): Color; /** * Determine whether the color is black or white or gray - * @param { number } color - The 32 bit ARGB color to discriminate. + * @param { int } color - The 32 bit ARGB color to discriminate. * @returns { boolean } Result of judging black, white and gray. * @syscap SystemCapability.Multimedia.Image.Core * @since 10 */ /** * Determine whether the color is black or white or gray - * @param { number } color - The 32 bit ARGB color to discriminate. + * @param { int } color - The 32 bit ARGB color to discriminate. * @returns { boolean } Result of judging black, white and gray. * @syscap SystemCapability.Multimedia.Image.Core * @form @@ -436,16 +437,17 @@ declare namespace effectKit { * @since 12 */ /** - * Checks whether a color is black, white, and gray. - * @param { number } color - Color to check. The value range is [0x0, 0xFFFFFFFF]. - * @returns { boolean } Returns true if the image is black, white, and gray; returns false otherwise. + * Determine whether the color is black or white or gray + * @param { int } color - The 32 bit ARGB color to discriminate. + * @returns { boolean } Result of judging black, white and gray. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - isBlackOrWhiteOrGrayColor(color: number): boolean; + isBlackOrWhiteOrGrayColor(color: int): boolean; } /** @@ -463,115 +465,120 @@ declare namespace effectKit { * @since 12 */ /** - * A class that stores the color picked. + * The color param. * @typedef Color * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ interface Color { /** * Red - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 9 */ /** * Red - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @form * @atomicservice * @since 12 */ /** - * Value of the red component. The value range is [0x0, 0xFF]. - * @type { number } + * Red + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - red: number; + red: int; /** * Green - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 9 */ /** * Green - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @form * @atomicservice * @since 12 */ /** - * Value of the green component. The value range is [0x0, 0xFF]. - * @type { number } + * Green + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - green: number; + green: int; /** * Blue - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 9 */ /** * Blue - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @form * @atomicservice * @since 12 */ /** - * Value of the blue component. The value range is [0x0, 0xFF]. - * @type { number } + * Blue + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - blue: number; + blue: int; /** * Alpha - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 9 */ /** * Alpha - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @form * @atomicservice * @since 12 */ /** - * Value of the alpha component. The value range is [0x0, 0xFF]. - * @type { number } + * Alpha + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - alpha: number; + alpha: int; } /** @@ -591,10 +598,9 @@ declare namespace effectKit { * @since 12 */ /** - * Creates a Filter instance based on a pixel map. - * @param { image.PixelMap } source - PixelMap instance created by the image module. An instance can be obtained - * by decoding an image or directly created. For details, see Image Overview. - * @returns { Filter } Head node of the filter linked list without any effect. If the operation fails, null is returned. + * Create a FilterChain to add multiple effects to an image. + * @param { image.PixelMap } source - the source pixelmap. + * @returns { Filter } Returns the head node of FilterChain. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form @@ -623,23 +629,23 @@ declare namespace effectKit { * @since 12 */ /** - * Creates a ColorPicker instance based on a pixel map. This API uses a promise to return the result. - * @param { image.PixelMap } source - PixelMap instance created by the image module. An instance can be - * obtained by decoding an image or directly created. For details, see Image Overview. - * @returns { Promise } - Promise used to return the ColorPicker instance created. + * Create a color picker to get color of an image. + * @param { image.PixelMap } source - the source pixelmap. + * @returns { Promise } - returns the ColorPicker generated. * @throws { BusinessError } 401 - Input parameter error. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function createColorPicker(source: image.PixelMap): Promise; /** * Create a color picker to get color of an image. * @param { image.PixelMap } source - the source pixelmap. - * @param { Array } region - contains 4 elements, represents the region's left, top, right, bottom coordinates, + * @param { Array } region - contains 4 elements, represents the region's left, top, right, bottom coordinates, * default is [0, 0, 1, 1], represents the region of color picker is the whole pixelMap. * @returns { Promise } - returns the ColorPicker generated. * @throws { BusinessError } 401 - Input parameter error. @@ -649,7 +655,7 @@ declare namespace effectKit { /** * Create a color picker to get color of an image. * @param { image.PixelMap } source - the source pixelmap. - * @param { Array } region - contains 4 elements, represents the region's left, top, right, bottom coordinates, + * @param { Array } region - contains 4 elements, represents the region's left, top, right, bottom coordinates, * default is [0, 0, 1, 1], represents the region of color picker is the whole pixelMap. * @returns { Promise } - returns the ColorPicker generated. * @throws { BusinessError } 401 - Input parameter error. @@ -659,23 +665,20 @@ declare namespace effectKit { * @since 12 */ /** - * Creates a ColorPicker instance for the selected region based on a pixel map. This API uses a promise to return the result. - * @param { image.PixelMap } source - PixelMap instance created by the image module. An instance can be obtained by decoding - * an image or directly created. For details, see Image Overview. - * @param { Array } region - Region of the image from which the color is picked. - * The array consists of four elements, representing the left, top, right, and bottom positions of the image, respectively. - * The value of each element must be in the range [0, 1]. The leftmost and topmost positions of the image correspond to 0, - * and the rightmost and bottom positions correspond to 1. In the array, the third element must be greater than the first element, - * and the fourth element must be greater than the second element. - * @returns { Promise } - Promise used to return the ColorPicker instance created. + * Create a color picker to get color of an image. + * @param { image.PixelMap } source - the source pixelmap. + * @param { Array } region - contains 4 elements, represents the region's left, top, right, bottom coordinates, + * default is [0, 0, 1, 1], represents the region of color picker is the whole pixelMap. + * @returns { Promise } - returns the ColorPicker generated. * @throws { BusinessError } 401 - Input parameter error. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - function createColorPicker(source: image.PixelMap, region: Array): Promise; + function createColorPicker(source: image.PixelMap, region: Array): Promise; /** * Create a color picker to get color of an image. @@ -696,23 +699,23 @@ declare namespace effectKit { * @since 12 */ /** - * Creates a ColorPicker instance based on a pixel map. This API uses an asynchronous callback to return the result. - * @param { image.PixelMap } source - PixelMap instance created by the image module. An instance can be obtained by - * decoding an image or directly created. For details, see Image Overview. + * Create a color picker to get color of an image. + * @param { image.PixelMap } source - the source pixelmap. * @param { AsyncCallback } callback - the callback of createColorPicker. * @throws { BusinessError } 401 - Input parameter error. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function createColorPicker(source: image.PixelMap, callback: AsyncCallback): void; /** * Create a color picker to get color of an image. * @param { image.PixelMap } source - the source pixelmap. - * @param { Array } region - contains 4 elements, represents the region's left, top, right, bottom coordinates, + * @param { Array } region - contains 4 elements, represents the region's left, top, right, bottom coordinates, * default is [0, 0, 1, 1], represents the region of color picker is the whole pixelMap. * @param { AsyncCallback } callback - the callback of createColorPicker. * @throws { BusinessError } 401 - Input parameter error. @@ -722,7 +725,7 @@ declare namespace effectKit { /** * Create a color picker to get color of an image. * @param { image.PixelMap } source - the source pixelmap. - * @param { Array } region - contains 4 elements, represents the region's left, top, right, bottom coordinates, + * @param { Array } region - contains 4 elements, represents the region's left, top, right, bottom coordinates, * default is [0, 0, 1, 1], represents the region of color picker is the whole pixelMap. * @param { AsyncCallback } callback - the callback of createColorPicker. * @throws { BusinessError } 401 - Input parameter error. @@ -732,65 +735,66 @@ declare namespace effectKit { * @since 12 */ /** - * Creates a ColorPicker instance for the selected region based on a pixel map. This API uses an asynchronous callback to return the result. - * @param { image.PixelMap } source - PixelMap instance created by the image module. An instance can be obtained by decoding an - * image or directly created. For details, see Image Overview.PixelMap instance created by the image module. An instance can be - * obtained by decoding an image or directly created. For details, see Image Overview. - * @param { Array } region - Region of the image from which the color is picked. - * The array consists of four elements, representing the left, top, right, and bottom positions of the image, respectively. - * The value of each element must be in the range [0, 1]. The leftmost and topmost positions of the image correspond to 0, - * and the rightmost and bottom positions correspond to 1. In the array, the third element must be greater than the first element, - * and the fourth element must be greater than the second element. - * @param { AsyncCallback } callback - Callback used to return the ColorPicker instance created. + * Create a color picker to get color of an image. + * @param { image.PixelMap } source - the source pixelmap. + * @param { Array } region - contains 4 elements, represents the region's left, top, right, bottom coordinates, + * default is [0, 0, 1, 1], represents the region of color picker is the whole pixelMap. + * @param { AsyncCallback } callback - the callback of createColorPicker. * @throws { BusinessError } 401 - Input parameter error. * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form * @atomicservice - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - function createColorPicker(source: image.PixelMap, region: Array, callback: AsyncCallback): void; + function createColorPicker(source: image.PixelMap, region: Array, callback: AsyncCallback): void; /** - * Enumerates the tile modes of the shader effect. + * TileMode enumeration description * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Image.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ enum TileMode { /** - * Replicates the edge color if the shader effect draws outside of its original boundary. + * Clamp mode. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ CLAMP = 0, /** - * Repeats the shader effect in both horizontal and vertical directions. + * Repeat mode. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ REPEAT = 1, /** - * Repeats the shader effect in both horizontal and vertical directions, alternating mirror images. + * Mirror mode. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ MIRROR = 2, /** - * Renders the shader effect only within the original boundary. + * Decal mode. * * @syscap SystemCapability.Multimedia.Image.Core - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ DECAL = 3, } } -export default effectKit; +export default effectKit; \ No newline at end of file diff --git a/api/@ohos.enterprise.adminManager.d.ts b/api/@ohos.enterprise.adminManager.d.ts index de7d7d017c4832a97d82272429cd63c9afae4198..17915f648509c9098af350aec370f36aaee819fd 100644 --- a/api/@ohos.enterprise.adminManager.d.ts +++ b/api/@ohos.enterprise.adminManager.d.ts @@ -27,7 +27,8 @@ import common from '@ohos.app.ability.common'; * * @namespace adminManager * @syscap SystemCapability.Customization.EnterpriseDeviceManager - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace adminManager { /** @@ -36,7 +37,8 @@ declare namespace adminManager { * @typedef EnterpriseInfo * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface EnterpriseInfo { /** @@ -45,7 +47,8 @@ declare namespace adminManager { * @type { string } * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -55,7 +58,8 @@ declare namespace adminManager { * @type { string } * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ description: string; } @@ -455,7 +459,8 @@ declare namespace adminManager { * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @systemapi * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getEnterpriseInfo(admin: Want, callback: AsyncCallback): void; @@ -471,7 +476,8 @@ declare namespace adminManager { * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @systemapi * @stagemodelonly - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getEnterpriseInfo(admin: Want): Promise; @@ -692,7 +698,8 @@ declare namespace adminManager { * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getSuperAdmin(): Promise; diff --git a/api/@ohos.enterprise.securityManager.d.ts b/api/@ohos.enterprise.securityManager.d.ts index a82ec35a5e28b6c2c5cd6c9666e83a69dd4c7c03..b7fc14ab1db60efbd11398817bfb8465df6dd60e 100644 --- a/api/@ohos.enterprise.securityManager.d.ts +++ b/api/@ohos.enterprise.securityManager.d.ts @@ -27,7 +27,8 @@ import type image from './@ohos.multimedia.image'; * @namespace securityManager * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace securityManager { /** @@ -269,7 +270,8 @@ declare namespace securityManager { * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getPasswordPolicy(): PasswordPolicy; @@ -386,7 +388,8 @@ declare namespace securityManager { * @typedef PasswordPolicy * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface PasswordPolicy { /** @@ -395,19 +398,21 @@ declare namespace securityManager { * @type { ?string } * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ complexityRegex?: string; /** * Period of validity * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - validityPeriod?: number; + validityPeriod?: long; /** * Other supplementary description @@ -415,7 +420,8 @@ declare namespace securityManager { * @type { ?string } * @syscap SystemCapability.Customization.EnterpriseDeviceManager * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ additionalDescription?: string; } diff --git a/api/@ohos.events.emitter.d.ts b/api/@ohos.events.emitter.d.ts index 95023e612cd99fc481ca7803171cc4bc9c1cccbb..b196a3673cc9c986a7cfcace17dddfc97847c473 100644 --- a/api/@ohos.events.emitter.d.ts +++ b/api/@ohos.events.emitter.d.ts @@ -71,11 +71,22 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ function on(event: InnerEvent, callback: Callback): void; + /** + * Subscribes to an event in persistent manner and executes a callback after the event is received. + * + * @param { InnerEvent } event - Event to subscribe to in persistent manner. The EventPriority parameter is not required and does not take effect. + * @param { Callback } callback - Callback to be executed when the event is received. + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function onWithEventTypeInnerEventCallback(event: InnerEvent, callback: Callback): void; + /** * Subscribes to an event in persistent manner and executes a callback after the event is received. * @@ -97,6 +108,18 @@ declare namespace emitter { */ function on(eventId: string, callback: Callback): void; + /** + * Subscribes to an event in persistent manner and executes a callback after the event is received. + * + * @param { string } eventId - Event to subscribe to in persistent manner. The value cannot be an empty string and exceed 10240 bytes. + * @param { Callback } callback - Callback to be executed when the event is received. + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function onWithEventIdTypeStringCallback(eventId: string, callback: Callback): void; + /** * Subscribes to an event in persistent manner and executes a callback after the event is received. * @@ -110,17 +133,22 @@ declare namespace emitter { function on(eventId: string, callback: Callback>): void; /** - * Subscribe to a event by specific id in persistent manner and receives the event callback. + * Subscribes to an event in persistent manner and executes a callback after the event is received. * - * @param { string } eventId - indicate ID of the event to subscribe to. - * @param { Callback | Callback> } callback - indicate callback used to receive the event. + * @param { string } eventId - Event to subscribe to in persistent manner. The value cannot be an empty string and exceed 10240 bytes. + * @param { Callback> } callback - Callback to be executed when the event is received. * @syscap SystemCapability.Notification.Emitter * @crossplatform - * @atomicservice * @since 20 * @arkts 1.2 */ - function on(eventId: string, callback: Callback | Callback>): void; + function onWithEventIdTypeStringCallbackTypeGenericEventData(eventId: string, callback: Callback>): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onWithEventTypeInnerEventCallback, onWithEventIdTypeStringCallback, onWithEventIdTypeStringCallbackTypeGenericEventData }; /** * Subscribes to an event in one-shot manner and unsubscribes from it after the event callback is executed. @@ -151,6 +179,18 @@ declare namespace emitter { */ function once(event: InnerEvent, callback: Callback): void; + /** + * Subscribes to an event in one-shot manner and unsubscribes from it after the event callback is executed. + * + * @param { InnerEvent } event - Event to subscribe to in one-shot manner. The EventPriority parameter is not required and does not take effect. + * @param { Callback } callback - Callback to be executed when the event is received. + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function onceWithEventTypeInnerEventCallback(event: InnerEvent, callback: Callback): void; + /** * Subscribes to an event in one-shot manner and unsubscribes from it after the event callback is executed. * @@ -172,6 +212,18 @@ declare namespace emitter { */ function once(eventId: string, callback: Callback): void; + /** + * Subscribes to an event in one-shot manner and unsubscribes from it after the event callback is executed. + * + * @param { string } eventId - Event to subscribe to in one-shot manner. The value cannot be an empty string and exceed 10240 bytes. + * @param { Callback } callback - Callback to be executed when the event is received. + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function onceWithEventIdTypeStringCallback(eventId: string, callback: Callback): void; + /** * Subscribes to an event in one-shot manner and unsubscribes from it after the event callback is executed. * @@ -184,6 +236,24 @@ declare namespace emitter { */ function once(eventId: string, callback: Callback>): void; + /** + * Subscribes to an event in one-shot manner and unsubscribes from it after the event callback is executed. + * + * @param { string } eventId - Event to subscribe to in one-shot manner. The value cannot be an empty string and exceed 10240 bytes. + * @param { Callback> } callback - Callback to be executed when the event is received. + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function onceWithEventIdTypeStringCallbackTypeGenericEventData(eventId: string, callback: Callback>): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload once { onceWithEventTypeInnerEventCallback, onceWithEventIdTypeStringCallback, onceWithEventIdTypeStringCallbackTypeGenericEventData }; + /** * Unsubscribes from all events with the specified event ID. * @@ -202,14 +272,24 @@ declare namespace emitter { /** * Unsubscribes from all events with the specified event ID. * - * @param { number } eventId - Event ID. + * @param { long } eventId - Event ID. * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + */ + function off(eventId: long): void; + + /** + * Unsubscribes from all events with the specified event ID. + * + * @param { long } eventId - Event ID. + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 */ - function off(eventId: number): void; + function offWithEventIdTypeLong(eventId: long): void; /** * Unsubscribes from all events with the specified event ID. @@ -230,6 +310,17 @@ declare namespace emitter { */ function off(eventId: string): void; + /** + * Unsubscribes from all events with the specified event ID. + * + * @param { string } eventId - Event ID. The value cannot be an empty string and exceed 10240 bytes. + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function offWithEventIdTypeString(eventId: string): void; + /** * Unsubscribes from an event with the specified event ID and processed by the specified callback. * @@ -250,15 +341,26 @@ declare namespace emitter { /** * Unsubscribes from an event with the specified event ID and processed by the specified callback. * - * @param { number } eventId - Event ID. + * @param { long } eventId - Event ID. * @param { Callback } callback - Callback to unregister. * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + */ + function off(eventId: long, callback: Callback): void; + + /** + * Unsubscribes from an event with the specified event ID and processed by the specified callback. + * + * @param { long } eventId - Event ID. + * @param { Callback } callback - Callback to unregister. + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 */ - function off(eventId: number, callback: Callback): void; + function offWithEventIdTypeLongCallback(eventId: long, callback: Callback): void; /** * Unsubscribes from an event with the specified event ID and processed by the specified callback. @@ -281,6 +383,18 @@ declare namespace emitter { */ function off(eventId: string, callback: Callback): void; + /** + * Unsubscribes from an event with the specified event ID and processed by the specified callback. + * + * @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 + * @since 20 + * @arkts 1.2 + */ + function offWithEventIdTypeStringCallback(eventId: string, callback: Callback): void; + /** * Unsubscribes from an event with the specified event ID and processed by the specified callback. * @@ -294,17 +408,22 @@ declare namespace emitter { function off(eventId: string, callback: Callback>): void; /** - * Unsubscribe specified callback function from an event. + * Unsubscribes from an event with the specified event ID and processed by the specified callback. * - * @param { string } eventId - indicates ID of the event to unsubscribe from. - * @param { Callback | Callback> } callback - indicates callback used to receive the event. + * @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 20 * @arkts 1.2 */ - function off(eventId: string, callback: Callback | Callback>): void; + function offWithEventIdTypeStringCallbackTypeGenericEventData(eventId: string, callback: Callback>): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offWithEventIdTypeLong, offWithEventIdTypeString, offWithEventIdTypeLongCallback, offWithEventIdTypeStringCallback, offWithEventIdTypeStringCallbackTypeGenericEventData }; /** * Emits the specified event. @@ -331,11 +450,22 @@ declare namespace emitter { * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ function emit(event: InnerEvent, data?: EventData): void; + /** + * Emits the specified event. + * + * @param { InnerEvent } event - Event to emit, where EventPriority specifies the emit priority of the event. + * @param { EventData } [data] - Data passed in the event. + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function emitWithEventTypeInnerEventDataTypeEventData(event: InnerEvent, data?: EventData): void; + /** * Emits the specified event. * @@ -357,6 +487,18 @@ declare namespace emitter { */ function emit(eventId: string, data?: EventData): void; + /** + * Emits the specified event. + * + * @param { string } eventId - ID of the event to emit. The value cannot be an empty string and exceed 10240 bytes. + * @param { EventData } [data] - Data passed in the event. + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function emitWithEventIdTypeStringDataTypeEventData(eventId: string, data?: EventData): void; + /** * Emits the specified event. * @@ -370,17 +512,16 @@ declare namespace emitter { function emit(eventId: string, data?: GenericEventData): void; /** - * Emits an event by specific id to the event queue. + * Emits the specified event. * - * @param { string } eventId - indicate ID of the event to emit. - * @param { EventData | GenericEventData } [data] - indicate data carried by the event. + * @param { string } eventId - ID of the event to emit. The value cannot be an empty string and exceed 10240 bytes. + * @param { GenericEventData } [data] - Data passed in the event. * @syscap SystemCapability.Notification.Emitter * @crossplatform - * @atomicservice * @since 20 * @arkts 1.2 */ - function emit(eventId: string, data?: EventData | GenericEventData): void; + function emitWithEventIdTypeStringDataTypeGenericEventData(eventId: string, data?: GenericEventData): void; /** * Emits an event of a specified priority. @@ -405,6 +546,19 @@ declare namespace emitter { */ function emit(eventId: string, options: Options, data?: EventData): void; + /** + * Emits an event of a specified priority. + * + * @param { string } eventId - ID of the event to emit. The value cannot be an empty string and exceed 10240 bytes. + * @param { Options } options - Event emit priority. + * @param { EventData } [data] - Data passed in the event. + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function emitWithEventIdTypeStringOptionsDataTypeEventData(eventId: string, options: Options, data?: EventData): void; + /** * Emits an event of a specified priority. * @@ -418,6 +572,25 @@ declare namespace emitter { */ function emit(eventId: string, options: Options, data?: GenericEventData): void; + /** + * Emits an event of a specified priority. + * + * @param { string } eventId - ID of the event to emit. The value cannot be an empty string and exceed 10240 bytes. + * @param { Options } options - Event emit priority. + * @param { GenericEventData } [data] - Data passed in the event. + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function emitWithEventIdTypeStringOptionsDataTypeGenericEventData(eventId: string, options: Options, data?: GenericEventData): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload emit { emitWithEventTypeInnerEventDataTypeEventData, emitWithEventIdTypeStringDataTypeEventData, emitWithEventIdTypeStringDataTypeGenericEventData, emitWithEventIdTypeStringOptionsDataTypeEventData, emitWithEventIdTypeStringOptionsDataTypeGenericEventData }; + /** * Obtains the number of subscriptions to a specified event. * @@ -430,15 +603,44 @@ declare namespace emitter { /** * Obtains the number of subscriptions to a specified event. * - * @param { number | string } eventId - Event ID. The value of the string type cannot be an empty string. - * @returns { number } Returns the number of listener count. + * @param { long | string } eventId - Event ID. The value of the string type cannot be an empty string. + * @returns { long } Returns the number of listener count. * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + */ + function getListenerCount(eventId: long | string): long; + + /** + * Obtains the number of subscriptions to a specified event. + * + * @param { long } eventId - Event ID. The value of the string type cannot be an empty string. + * @returns { long } Returns the number of listener count. + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 */ - function getListenerCount(eventId: number | string): number; + function getListenerCountWithEventIdTypeLong(eventId: long): long; + + /** + * Obtains the number of subscriptions to a specified event. + * + * @param { string } eventId - Event ID. The value of the string type cannot be an empty string. + * @returns { long } Returns the number of listener count. + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function getListenerCountWithEventIdTypeString(eventId: string): long; + + /** + * @since 20 + * @arkts 1.2 + */ + overload getListenerCount { getListenerCountWithEventIdTypeLong, getListenerCountWithEventIdTypeString }; /** * Describes data passed in the event. @@ -495,13 +697,13 @@ declare namespace emitter { /** * Data carried by the event. * - * @type { ?Record } + * @type { ?(Record | ESObject) } * @syscap SystemCapability.Notification.Emitter * @crossplatform * @since 20 * @arkts 1.2 */ - data?: Record; + data?: Record | ESObject; } /** @@ -548,14 +750,14 @@ declare namespace emitter { /** * Event ID. * - * @type { number } + * @type { long } * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - eventId: number; + eventId: long; /** * Event priority. The default value is EventPriority.LOW. @@ -603,7 +805,7 @@ declare namespace emitter { /** * Enumerates the event priorities. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice @@ -759,16 +961,26 @@ declare namespace emitter { */ export interface GenericEventData { /** - * Data passed in the event. T: generic type. + * Data carried by the event. * * @type { ?T } * @syscap SystemCapability.Notification.Emitter * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ data?: T; + + /** + * Data carried by the event. + * + * @type { ?(T | ESObject) } + * @syscap SystemCapability.Notification.Emitter + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + data?: T | ESObject; } } diff --git a/api/@ohos.file.cloudSync.d.ts b/api/@ohos.file.cloudSync.d.ts index 0c838954cb4fe33ed6ece67d3fef8b813e1b4d22..f5c0636f90f19e1f1512b26266300a2279ffce01 100644 --- a/api/@ohos.file.cloudSync.d.ts +++ b/api/@ohos.file.cloudSync.d.ts @@ -32,7 +32,7 @@ declare namespace cloudSync { /** * Describes the Sync state type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since arkts{ '1.1':'12','1.2':'20'} * @arkts 1.1&1.2 @@ -91,7 +91,7 @@ declare namespace cloudSync { /** * Describes the Sync Error type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since arkts{ '1.1':'12','1.2':'20'} * @arkts 1.1&1.2 @@ -330,7 +330,7 @@ declare namespace cloudSync { /** * Describes the State type of download. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since arkts{ '1.1':'11','1.2':'20'} * @arkts 1.1&1.2 @@ -373,7 +373,7 @@ declare namespace cloudSync { /** * Describes the download Error type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since arkts{ '1.1':'11','1.2':'20'} * @arkts 1.1&1.2 @@ -450,21 +450,21 @@ declare namespace cloudSync { /** * The processed data size for current file. * - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since arkts{ '1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - processed: number; + processed: long; /** * The size of current file. * - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since arkts{ '1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - size: number; + size: long; /** * The uri of current file. * @@ -732,18 +732,18 @@ declare namespace cloudSync { /** * Get the last synchronization time. * - * @returns { Promise } - Return the date of last synchronization. + * @returns { Promise } - Return the date of last synchronization. * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:Incorrect parameter types. * @throws { BusinessError } 13600001 - IPC error. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since arkts{ '1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - getLastSyncTime(): Promise; + getLastSyncTime(): Promise; /** * Get the last synchronization time. * - * @param { AsyncCallback } callback - Callback function. + * @param { AsyncCallback } callback - Callback function. * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified; *
2.Incorrect parameter types. * @throws { BusinessError } 13600001 - IPC error. @@ -751,7 +751,7 @@ declare namespace cloudSync { * @since arkts{ '1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - getLastSyncTime(callback: AsyncCallback): void; + getLastSyncTime(callback: AsyncCallback): void; } /** * CloudFileCache object. @@ -896,7 +896,7 @@ declare namespace cloudSync { /** * Describes the sync state of file. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @systemapi * @since arkts{ '1.1':'11','1.2':'20'} @@ -1063,7 +1063,7 @@ declare namespace cloudSync { /** * Enumeration types of data change. * - * @enum { number } NotifyType + * @enum { int } NotifyType * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since arkts{ '1.1':'12','1.2':'20'} * @arkts 1.1&1.2 @@ -1195,7 +1195,7 @@ declare namespace cloudSync { /** * Describes the state type of optimize space task. - * @enum { number } OptimizeState + * @enum { int } OptimizeState * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @systemapi * @since arkts{ '1.1':'17','1.2':'20'} @@ -1264,13 +1264,13 @@ declare namespace cloudSync { /** * The percentage of clearing files. * @permission ohos.permission.CLOUDFILE_SYNC - * @type { number } + * @type { int } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @systemapi * @since arkts{ '1.1':'17','1.2':'20'} * @arkts 1.1&1.2 */ - progress: number; + progress: int; } /** @@ -1286,24 +1286,24 @@ declare namespace cloudSync { /** * The total size(Unit:byte) of clean space. * @permission ohos.permission.CLOUDFILE_SYNC - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @systemapi * @since arkts{ '1.1':'17','1.2':'20'} * @arkts 1.1&1.2 */ - totalSize: number; + totalSize: long; /** * Clean files that are not accessed agingDays(unit:day) ago. * @permission ohos.permission.CLOUDFILE_SYNC - * @type { number } + * @type { int } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @systemapi * @since arkts{ '1.1':'17','1.2':'20'} * @arkts 1.1&1.2 */ - agingDays: number; + agingDays: int; } /** @@ -1311,7 +1311,6 @@ declare namespace cloudSync { * @typedef HistoryVersion * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since 20 - * @arkts 1.1&1.2 */ interface HistoryVersion { /** @@ -1319,7 +1318,6 @@ declare namespace cloudSync { * @type { number } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since 20 - * @arkts 1.1&1.2 */ editedTime: number; /** @@ -1327,7 +1325,6 @@ declare namespace cloudSync { * @type { number } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since 20 - * @arkts 1.1&1.2 */ fileSize: number; /** @@ -1335,7 +1332,6 @@ declare namespace cloudSync { * @type { string } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since 20 - * @arkts 1.1&1.2 */ versionId: string; /** @@ -1343,7 +1339,6 @@ declare namespace cloudSync { * @type { string } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since 20 - * @arkts 1.1&1.2 */ originalFileName: string; /** @@ -1351,7 +1346,6 @@ declare namespace cloudSync { * @type { string } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since 20 - * @arkts 1.1&1.2 */ sha256: string; /** @@ -1359,7 +1353,6 @@ declare namespace cloudSync { * @type { boolean } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since 20 - * @arkts 1.1&1.2 */ autoResolved: boolean; } @@ -1369,7 +1362,6 @@ declare namespace cloudSync { * @typedef VersionDownloadProgress * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since 20 - * @arkts 1.1&1.2 */ interface VersionDownloadProgress { /** @@ -1377,7 +1369,6 @@ declare namespace cloudSync { * @type { State } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since 20 - * @arkts 1.1&1.2 */ state: State; /** @@ -1385,7 +1376,6 @@ declare namespace cloudSync { * @type { number } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since 20 - * @arkts 1.1&1.2 */ progress: number; /** @@ -1393,7 +1383,6 @@ declare namespace cloudSync { * @type { DownloadErrorType } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since 20 - * @arkts 1.1&1.2 */ errType: DownloadErrorType; } @@ -1402,7 +1391,6 @@ declare namespace cloudSync { * FileVersion object. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since 20 - * @arkts 1.1&1.2 */ class FileVersion { /** @@ -1413,7 +1401,6 @@ declare namespace cloudSync { *
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 */ constructor(); /** @@ -1436,7 +1423,6 @@ declare namespace cloudSync { *
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 */ getHistoryVersionList(uri: string, versionNumLimit: number): Promise>; /** @@ -1460,7 +1446,6 @@ declare namespace cloudSync { *
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 */ downloadHistoryVersion(uri: string, versionId: string, callback: Callback): Promise; /** @@ -1485,7 +1470,6 @@ declare namespace cloudSync { * @throws { BusinessError } 22400007 - The version file specified to replace the original file does not exist. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @since 20 - * @arkts 1.1&1.2 */ replaceFileWithHistoryVersion(originalUri: string, versionUri: string): Promise; /** @@ -1506,7 +1490,6 @@ declare namespace cloudSync { *
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 */ isFileConflict(uri: string): Promise; /** @@ -1527,7 +1510,6 @@ declare namespace cloudSync { *
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 */ clearFileConflict(uri: string): Promise; } diff --git a/api/@ohos.file.cloudSyncManager.d.ts b/api/@ohos.file.cloudSyncManager.d.ts index 4b911cc2828f1c3f55e600639f0fe07579c28a0c..6a7622731403f0f1f9960d875644a5c11f44d669 100644 --- a/api/@ohos.file.cloudSyncManager.d.ts +++ b/api/@ohos.file.cloudSyncManager.d.ts @@ -177,7 +177,7 @@ declare namespace cloudSyncManager { /** * Describes the clear action type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @systemapi * @since arkts{ '1.1':'10','1.2':'20'} @@ -245,7 +245,7 @@ declare namespace cloudSyncManager { * Notify the change of data in cloud. * * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER - * @param { number } userId - The Id of the user whose cloud data changed + * @param { int } userId - The Id of the user whose cloud data changed * @param { ExtraData } extraData - The change info from push notification * @returns { Promise } Return Promise * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. @@ -258,13 +258,13 @@ declare namespace cloudSyncManager { * @since arkts{ '1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - function notifyDataChange(userId: number, extraData: ExtraData): Promise; + function notifyDataChange(userId: int, extraData: ExtraData): Promise; /** * Notify the change of data in cloud. * * @permission ohos.permission.CLOUDFILE_SYNC_MANAGER - * @param { number } userId - The Id of the user whose cloud data changed + * @param { int } userId - The Id of the user whose cloud data changed * @param { ExtraData } extraData - The change info from push notification * @param { AsyncCallback } callback - Callback function * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. @@ -277,7 +277,7 @@ declare namespace cloudSyncManager { * @since arkts{ '1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - function notifyDataChange(userId: number, extraData: ExtraData, callback: AsyncCallback): void; + function notifyDataChange(userId: int, extraData: ExtraData, callback: AsyncCallback): void; /** * The change info from push notification. @@ -316,7 +316,6 @@ declare namespace cloudSyncManager { * @enum { number } DownloadStopReason * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ enum DownloadStopReason { @@ -324,7 +323,6 @@ declare namespace cloudSyncManager { * download task is not stopped. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ NO_STOP = 0, @@ -332,7 +330,6 @@ declare namespace cloudSyncManager { * Network is unavailable. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ NETWORK_UNAVAILABLE = 1, @@ -340,7 +337,6 @@ declare namespace cloudSyncManager { * The local storage space is full. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ LOCAL_STORAGE_FULL = 2, @@ -348,7 +344,6 @@ declare namespace cloudSyncManager { * Temperature control Limits. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ TEMPERATURE_LIMIT = 3, @@ -356,7 +351,6 @@ declare namespace cloudSyncManager { * User stopped the download task. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ USER_STOPPED = 4, @@ -364,7 +358,6 @@ declare namespace cloudSyncManager { * The local application has been unloaded. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ APP_UNLOAD = 5, @@ -372,7 +365,6 @@ declare namespace cloudSyncManager { * Other reasons of some internal error. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ OTHER_REASON = 6 } @@ -382,7 +374,6 @@ declare namespace cloudSyncManager { * @enum { number } DownloadState * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ enum DownloadState { @@ -390,7 +381,6 @@ declare namespace cloudSyncManager { * Indicates that the download task in process now. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ RUNNING = 0, @@ -398,7 +388,6 @@ declare namespace cloudSyncManager { * Indicates that the download task finished. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ COMPLETED = 1, @@ -406,7 +395,6 @@ declare namespace cloudSyncManager { * Indicates that the download task stopped. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ STOPPED = 2 } @@ -416,7 +404,6 @@ declare namespace cloudSyncManager { * @typedef CloudFileInfo * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ interface CloudFileInfo { @@ -425,7 +412,6 @@ declare namespace cloudSyncManager { * @type { number } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ cloudFileCount: number; @@ -434,7 +420,6 @@ declare namespace cloudSyncManager { * @type { number } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ cloudFileTotalSize: number; @@ -443,7 +428,6 @@ declare namespace cloudSyncManager { * @type { number } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ localFileCount: number; @@ -452,7 +436,6 @@ declare namespace cloudSyncManager { * @type { number } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ localFileTotalSize: number; @@ -461,7 +444,6 @@ declare namespace cloudSyncManager { * @type { number } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ bothFileCount: number; @@ -470,7 +452,6 @@ declare namespace cloudSyncManager { * @type { number } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ bothFileTotalSize: number; } @@ -479,7 +460,6 @@ declare namespace cloudSyncManager { * Defines DownloadProgress object. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ class DownloadProgress { @@ -488,7 +468,6 @@ declare namespace cloudSyncManager { * @type { DownloadState } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ state: DownloadState; @@ -497,7 +476,6 @@ declare namespace cloudSyncManager { * @type { number } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ successfulCount: number; @@ -506,7 +484,6 @@ declare namespace cloudSyncManager { * @type { number } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ failedCount: number; @@ -515,7 +492,6 @@ declare namespace cloudSyncManager { * @type { number } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ totalCount: number; @@ -524,7 +500,6 @@ declare namespace cloudSyncManager { * @type { number } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ downloadedSize: number; @@ -533,7 +508,6 @@ declare namespace cloudSyncManager { * @type { number } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ totalSize: number; @@ -542,7 +516,6 @@ declare namespace cloudSyncManager { * @type { DownloadStopReason } * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @since 20 - * @arkts 1.1&1.2 */ stopReason: DownloadStopReason; } @@ -553,7 +526,6 @@ declare namespace cloudSyncManager { * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @systemapi * @since 20 - * @arkts 1.1&1.2 */ class DowngradeDownload { @@ -572,7 +544,6 @@ declare namespace cloudSyncManager { * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @systemapi * @since 20 - * @arkts 1.1&1.2 */ constructor(bundleName: string); @@ -592,7 +563,6 @@ declare namespace cloudSyncManager { * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @systemapi * @since 20 - * @arkts 1.1&1.2 */ getCloudFileInfo(): Promise; @@ -616,7 +586,6 @@ declare namespace cloudSyncManager { * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @systemapi * @since 20 - * @arkts 1.1&1.2 */ startDownload(callback: Callback): Promise; @@ -635,7 +604,6 @@ declare namespace cloudSyncManager { * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSyncManager * @systemapi * @since 20 - * @arkts 1.1&1.2 */ stopDownload(): Promise; } diff --git a/api/@ohos.file.environment.d.ts b/api/@ohos.file.environment.d.ts index 5d89e2c967fc799815049604852d2b59344036a2..cb5c78b0fd6a47e2f5d2dedc6d893ae01600dffb 100644 --- a/api/@ohos.file.environment.d.ts +++ b/api/@ohos.file.environment.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 @@ -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..1525dbedaa91046ce938431840e0f9c6861625f4 100644 --- a/api/@ohos.file.fs.d.ets +++ b/api/@ohos.file.fs.d.ets @@ -20,14 +20,13 @@ */ import { AsyncCallback } from './@ohos.base'; +import stream from './@ohos.util.stream'; /** * FileIO * * @namespace fileIo * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ declare namespace fileIo { @@ -37,8 +36,6 @@ declare namespace fileIo { * * @namespace OpenMode * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ namespace OpenMode { @@ -47,8 +44,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ const READ_ONLY = 0o0; @@ -57,8 +52,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ const WRITE_ONLY = 0o1; @@ -67,8 +60,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ const READ_WRITE = 0o2; @@ -77,8 +68,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ const CREATE = 0o100; @@ -87,8 +76,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ const TRUNC = 0o1000; @@ -97,8 +84,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ const APPEND = 0o2000; @@ -107,7 +92,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ const NONBLOCK = 0o4000; @@ -116,7 +100,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ const DIR = 0o200000; @@ -125,7 +108,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ const NOFOLLOW = 0o400000; @@ -134,7 +116,6 @@ declare namespace fileIo { * * @constant * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ const SYNC = 0o4010000; @@ -159,8 +140,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 +162,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 +209,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; @@ -264,7 +239,7 @@ function accessSync(path: string, mode: AccessModeType, flag: AccessFlagType): b /** * Close file or fd. * - * @param { number | File } file - file object or fd. + * @param { int | File } file - file object or fd. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error @@ -273,16 +248,14 @@ 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; +function close(file: int | File): Promise; /** * Close file or fd. * - * @param { number | File } file - file object or fd. + * @param { int | File } file - file object or fd. * @param { AsyncCallback } callback - Return the callback function. * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error @@ -291,16 +264,14 @@ 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; +function close(file: int | File, callback: AsyncCallback): void; /** * Close file or fd with sync interface. * - * @param { number | File } file - file object or fd. + * @param { int | File } file - file object or fd. * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900008 - Bad file descriptor @@ -308,116 +279,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; +function closeSync(file: int | 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 { number } [mode = 0] - mode. + * @param { string } src - source path. + * @param { string } dest - destination path. + * @param { int } [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,392 +423,438 @@ 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?: int): 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. - * @throws { BusinessError } 13900002 - No such file or directory - * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900011 - Out of memory - * @throws { BusinessError } 13900018 - Not a directory - * @throws { BusinessError } 13900042 - Unknown error + * @param { string } src - source path. + * @param { string } dest - destination path. + * @param { AsyncCallback> } callback - Return the callback function. + * @throws { BusinessError } 13900015 - File exists * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function listFile(path: string, callback: AsyncCallback): void; +function copyDir(src: string, dest: string, callback: AsyncCallback>): void; /** - * List file. + * Copy directory. * - * @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 { int } 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, - options: ListFileOptions, - callback: AsyncCallback -): void; +function copyDir(src: string, dest: string, mode: int, callback: AsyncCallback): void; /** - * List file with sync interface. + * Copy directory. * - * @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 } 13900011 - Out of memory - * @throws { BusinessError } 13900018 - Not a directory - * @throws { BusinessError } 13900042 - Unknown error + * @param { string } src - source path. + * @param { string } dest - destination path. + * @param { int } mode - mode. + * @param { AsyncCallback> } callback - Return the callback function. + * @throws { BusinessError } 13900015 - File exists * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function listFileSync( - path: string, - options?: ListFileOptions -): string[]; +function copyDir(src: string, dest: string, mode: int, callback: AsyncCallback>): void; /** - * Make dir. + * Copy directory with sync interface. * - * @param { string } path - path. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 13900001 - Operation not permitted + * @param { string } src - source path. + * @param { string } dest - destination path. + * @param { int } [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): Promise; +function copyDirSync(src: string, dest: string, mode?: int): void; /** - * Make dir. + * Copy file. * - * @param { string } path - path. - * @param { boolean } recursion - whether to recursively make directory. + * @param { string | int } src - src. + * @param { string | int } dest - dest. + * @param { int } [mode = 0] - mode. * @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 } 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, recursion: boolean): Promise; +function copyFile(src: string | int, dest: string | int, mode?: int): Promise; /** - * Make dir. + * Copy file. * - * @param { string } path - path. + * @param { string | int } src - src. + * @param { string | int } dest - dest. * @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 } 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, callback: AsyncCallback): void; +function copyFile(src: string | int, dest: string | int, callback: AsyncCallback): void; /** - * Make dir. + * Copy file. * - * @param { string } path - path. - * @param { boolean } recursion - whether to recursively make directory. + * @param { string | int } src - src. + * @param { string | int } dest - dest. + * @param { int } [mode = 0] - mode. * @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 } 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, callback: AsyncCallback): void; +function copyFile( + src: string | int, + dest: string | int, + mode: int, + callback: AsyncCallback +): void; /** - * Make dir with sync interface. + * Copy file with sync interface. * - * @param { string } path - path. - * @throws { BusinessError } 13900001 - Operation not permitted + * @param { string | int } src - src. + * @param { string | int } dest - dest. + * @param { int } [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 mkdirSync(path: string): void; +function copyFileSync(src: string | int, dest: string | int, mode?: int): void; /** - * Make dir with sync interface. + * Create class Stream. * * @param { string } path - path. - * @param { boolean } recursion - whether to recursively make directory. + * @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 mkdirSync(path: string, recursion: boolean): void; - +function createStream(path: string, mode: string): Promise; /** - * Move file. + * Create class Stream. * - * @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 } 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 } 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): Promise; +function createStream(path: string, mode: string, callback: AsyncCallback): void; /** - * Move file. + * Create class Stream with sync interface. * - * @param { string } src - source file path. - * @param { string } dest - destination file path. - * @param { AsyncCallback } callback - Return the callback function. + * @param { string } path - path. + * @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 } 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, callback: AsyncCallback): 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. - * @param { AsyncCallback } callback - Return the callback function. + * @param { string | File } file - file path, object. + * @param { int } [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, callback: AsyncCallback): void; +function createRandomAccessFile(file: string | File, mode?: int, + options?: RandomAccessFileOptions): Promise; /** - * Move file with sync interface. + * 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 { 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 moveFileSync(src: string, dest: string, mode?: number): void; +function createRandomAccessFile(file: string | File, callback: AsyncCallback): void; /** - * Open file. + * Create class RandomAccessFile. * - * @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. + * @param { string | File } file - file path, object. + * @param { int } [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 @@ -849,19 +881,18 @@ function moveFileSync(src: string, dest: string, mode?: number): 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 open(path: string, mode?: number): Promise; +function createRandomAccessFile(file: string | File, mode: int, callback: AsyncCallback): void; /** - * Open file. + * Create class RandomAccessFile with sync interface. * - * @param { string } path - path. - * @param { AsyncCallback } callback - The callback is used to return the File object to record the file descriptor. + * @param { string | File } file - file path, object. + * @param { int } [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 @@ -888,1144 +919,3471 @@ function open(path: string, mode?: number): Promise; * @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 open(path: string, callback: AsyncCallback): void; +function createRandomAccessFileSync(file: string | File, mode?: int, + options?: RandomAccessFileOptions): RandomAccessFile; /** - * Open file. + * Create file read stream. * - * @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 { string } path - file path. + * @param { ReadStreamOptions } [options] - Optional parameters for ReadStream. + * @returns { ReadStream } Returns the ReadStream object which has been created. + * @throws { BusinessError } 401 - Parameter error * @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 - * @crossplatform - * @atomicservice * @since 20 */ -function open(path: string, mode: number, callback: AsyncCallback): void; +function createReadStream(path: string, options?: ReadStreamOptions): ReadStream; /** - * Open file with sync interface. + * Create file write stream. * - * @param { string } path - path. - * @param { number } [mode = OpenMode.READ_ONLY] - mode. - * @returns { File } Returns the File object to record the file descriptor. + * @param { string } path - file path. + * @param { WriteStreamOptions } [options] - Optional parameters for ReadStream. + * @returns { WriteStream } Returns the WriteStream object which has been created. + * @throws { BusinessError } 401 - Parameter error * @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 - * @crossplatform - * @atomicservice * @since 20 */ -function openSync(path: string, mode?: number): File; +function createWriteStream(path: string, options?: WriteStreamOptions): WriteStream; /** - * Read file. + * Create watcher to listen for file changes. * - * @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 + * @param { string } path - path. + * @param { int } 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 } 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 } 13900019 - Is a directory + * @throws { BusinessError } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not a directory * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900034 - Operation would block + * @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 - * @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 createWatcher(path: string, events: int, listener: WatchEventListener): Watcher; /** - * Read file. + * Duplicate fd to File Object. * - * @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. + * @param { int } 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 } 13900010 - Try again - * @throws { BusinessError } 13900013 - Bad address - * @throws { BusinessError } 13900019 - Is a directory + * @throws { BusinessError } 13900014 - Device or resource busy * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900034 - Operation would block + * @throws { BusinessError } 13900022 - Too many open files * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function read(fd: number, buffer: ArrayBuffer, callback: AsyncCallback): void; +function dup(fd: int): File; /** - * Read file. + * Synchronize file metadata. * - * @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 { int } 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 * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -function read( - fd: number, - buffer: ArrayBuffer, - options: ReadOptions, - callback: AsyncCallback -): void; +function fdatasync(fd: int): Promise; /** - * Read file with sync interface. + * Synchronize file metadata. * - * @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 + * @param { int } 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 - * @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 fdatasync(fd: int, callback: AsyncCallback): void; /** - * Read text. + * Synchronize file metadata with sync interface. * - * @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 + * @param { int } 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 } 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 } 13900041 - Quota exceeded * @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 fdatasyncSync(fd: int): void; /** - * Read text. + * Create class Stream by using fd. * - * @param { string } filePath - file path. - * @param { AsyncCallback } callback - The callback is used to return the contents of the read file. + * @param { int } 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 } 13900005 - I/O error + * @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 + * @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 - * @crossplatform - * @atomicservice * @since 20 */ -function readText(filePath: string, callback: AsyncCallback): void; +function fdopenStream(fd: int, mode: string): Promise; /** - * Read text. + * Create class Stream by using fd. * - * @param { string } filePath - file path. - * @param { ReadTextOptions } [options] - options. - * @param { AsyncCallback } callback - The callback is used to return the contents of the read file. + * @param { int } 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 } 13900005 - I/O error + * @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 + * @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 - * @crossplatform - * @atomicservice * @since 20 */ -function readText( - filePath: string, - options: ReadTextOptions, - callback: AsyncCallback -): void; +function fdopenStream(fd: int, mode: string, callback: AsyncCallback): void; /** - * Read text with sync interface. + * Create class Stream by using fd with sync interface. * - * @param { string } filePath - file path. - * @param { ReadTextOptions } [options] - options. - * @returns { string } Returns the contents of the read file. + * @param { int } 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 } 13900005 - I/O error + * @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 + * @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 - * @crossplatform - * @atomicservice * @since 20 */ -function readTextSync( - filePath: string, - options?: ReadTextOptions -): string; +function fdopenStreamSync(fd: int, mode: string): Stream; /** - * Delete dir. + * Synchronize file. * - * @param { string } path - path. + * @param { int } fd - fd. * @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 } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor * @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 } 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 rmdir(path: string): Promise; +function fsync(fd: int): Promise; /** - * Delete dir. + * Synchronize file. * - * @param { string } path - path. + * @param { int } fd - fd. * @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 } 13900005 - I/O error + * @throws { BusinessError } 13900008 - Bad file descriptor * @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 } 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 rmdir(path: string, callback: AsyncCallback): void; +function fsync(fd: int, callback: AsyncCallback): void; /** - * Delete dir with sync interface. + * Synchronize file with sync interface. + * + * @param { int } 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 fsyncSync(fd: int): void; + +/** + * List file. * * @param { string } path - path. - * @throws { BusinessError } 13900001 - Operation not permitted + * @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 } 13900011 - Out of memory + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function listFile( + path: string, + options?: ListFileOptions +): Promise; + +/** + * List file. + * + * @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 } 13900011 - Out of memory + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function listFile(path: string, callback: AsyncCallback): void; + +/** + * List file. + * + * @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 } 13900011 - Out of memory + * @throws { BusinessError } 13900018 - Not a directory + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function listFile( + path: string, + options: ListFileOptions, + callback: AsyncCallback +): void; + +/** + * List file with sync interface. + * + * @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 } 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 } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function listFileSync( + path: string, + options?: ListFileOptions +): string[]; + +/** + * Reposition file offset. + * + * @param { int } fd - file descriptor. + * @param { long } offset - file offset. + * @param { WhenceType } [whence = WhenceType.SEEK_SET] - directive whence. + * @returns { long } Returns the file offset relative to starting position of file. + * @throws { BusinessError } 13900008 - Bad file descriptor * @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 } 13900026 - Illegal seek + * @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 lseek(fd: int, offset: long, whence?: WhenceType): long; /** - * Get file information. + * Stat link file. * - * @param { string | number } file - path or file descriptor. + * @param { string } path - path. * @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 - * @crossplatform - * @atomicservice * @since 20 */ -function stat(file: string | number): Promise; +function lstat(path: string): Promise; /** - * Get file information. + * Stat link file. * - * @param { string | number } file - path or file descriptor. + * @param { string } path - path. * @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 - * @crossplatform - * @atomicservice * @since 20 */ -function stat(file: string | number, callback: AsyncCallback): void; +function lstat(path: string, callback: AsyncCallback): void; /** - * Get file information with sync interface. + * Stat link file with sync interface. * - * @param { string | number } file - path or file descriptor. + * @param { string } path - path. * @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 - * @crossplatform - * @atomicservice * @since 20 */ -function statSync(file: string | number): Stat; +function lstatSync(path: string): Stat; /** - * Truncate file. + * Make dir. * - * @param { string | number } file - path or file descriptor. - * @param { number } [len = 0] - len. + * @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 } 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): Promise; /** - * Truncate file. + * Make dir. * - * @param { string | number } file - path or file descriptor. - * @param { AsyncCallback } callback - Return the callback function. + * @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 } 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 mkdir(path: string, recursion: boolean): Promise; /** - * Truncate file. + * Make dir. * - * @param { string | number } file - path or file descriptor. - * @param { number } [len = 0] - len. + * @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 } 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 mkdir(path: string, callback: AsyncCallback): void; /** - * Truncate file with sync interface. + * Make dir. * - * @param { string | number } file - path or file descriptor. - * @param { number } [len = 0] - len. + * @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 truncateSync(file: string | number, len?: number): void; +function mkdir(path: string, recursion: boolean, callback: AsyncCallback): void; /** - * Delete file. + * Make dir with sync interface. * * @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 } 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 mkdirSync(path: string): void; /** - * Delete file. + * Make dir with sync interface. * * @param { string } path - path. - * @param { AsyncCallback } callback - Return the callback function. + * @param { boolean } recursion - whether to recursively make 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, callback: AsyncCallback): void; +function mkdirSync(path: string, recursion: boolean): void; /** - * Delete file with sync interface. + * Make temp dir. * - * @param { string } path - path. + * @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 } 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 unlinkSync(path: string): void; +function mkdtemp(prefix: string): Promise; /** - * Write file. + * Make temp dir. * - * @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 } 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 } 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 } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not 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 } 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 write( - fd: number, - buffer: ArrayBuffer | string, - options?: WriteOptions -): Promise; +function mkdtemp(prefix: string, callback: AsyncCallback): void; /** - * Write file. + * Make temp dir 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 } prefix - dir prefix. + * @returns { string } Returns the path to the new directory. * @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 } 13900015 - File exists + * @throws { BusinessError } 13900018 - Not 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 } 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 write(fd: number, buffer: ArrayBuffer | string, callback: AsyncCallback): void; +function mkdtempSync(prefix: string): string; /** - * Write file. + * Move directory. * - * @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 + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { int } [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 } 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 moveDir(src: string, dest: string, mode?: int): Promise; /** - * Write file with sync interface. + * Move directory. * - * @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 } 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 moveDir(src: string, dest: string, callback: AsyncCallback): void; + +/** + * Move directory. + * + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { AsyncCallback> } callback - Return the callback function. + * @throws { BusinessError } 13900015 - File exists + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function moveDir(src: string, dest: string, callback: AsyncCallback>): void; + +/** + * Move directory. + * + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { int } mode - 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 } 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 moveDir(src: string, dest: string, mode: int, callback: AsyncCallback): void; + +/** + * Move directory. + * + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { int } mode - move mode when duplicate file name exists. + * @param { AsyncCallback> } callback - Return the callback function. + * @throws { BusinessError } 13900015 - File exists + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function moveDir(src: string, dest: string, mode: int, callback: AsyncCallback>): void; + +/** + * Move directory with sync interface. + * + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { int } [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 moveDirSync(src: string, dest: string, mode?: int): void; + +/** + * Move file. + * + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { int } [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 } 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 moveFile(src: string, dest: string, mode?: int): Promise; + +/** + * Move 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 } 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 moveFile(src: string, dest: string, callback: AsyncCallback): void; + +/** + * Move file. + * + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { int } [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 + * @since 20 + */ +function moveFile(src: string, dest: string, mode: int, callback: AsyncCallback): void; + +/** + * Move file with sync interface. + * + * @param { string } src - source file path. + * @param { string } dest - destination file path. + * @param { int } [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?: int): void; + +/** + * Open file. + * + * @param { string } path - path. + * @param { int } [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?: int): 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 { int } [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: int, callback: AsyncCallback): void; + +/** + * Open file with sync interface. + * + * @param { string } path - path. + * @param { int } [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?: int): File; + +/** + * Read file. + * + * @param { int } 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: int, + buffer: ArrayBuffer, + options?: ReadOptions +): Promise; + +/** + * Read file. + * + * @param { int } 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: int, buffer: ArrayBuffer, callback: AsyncCallback): void; + +/** + * Read file. + * + * @param { int } 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: int, + buffer: ArrayBuffer, + options: ReadOptions, + callback: AsyncCallback +): void; + +/** + * Read file with sync interface. + * + * @param { int } fd - file descriptor. + * @param { ArrayBuffer } buffer - buffer. + * @param { ReadOptions } [options] - options. + * @returns { long } 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: int, + buffer: ArrayBuffer, + options?: ReadOptions +): long; + +/** + * 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 | int } 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 | int): Promise; + +/** + * Get file information. + * + * @param { string | int } 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 | int, callback: AsyncCallback): void; + +/** + * Get file information with sync interface. + * + * @param { string | int } 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 | int): 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 | int } file - path or file descriptor. + * @param { long } [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 | int, len?: long): Promise; + +/** + * Truncate file. + * + * @param { string | int } 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 | int, callback: AsyncCallback): void; + +/** + * Truncate file. + * + * @param { string | int } file - path or file descriptor. + * @param { long } [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 | int, len: long, callback: AsyncCallback): void; + +/** + * Truncate file with sync interface. + * + * @param { string | int } file - path or file descriptor. + * @param { long } [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 | int, len?: long): 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 { double } 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: double): void; + +/** + * Write file. + * + * @param { int } 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: int, + buffer: ArrayBuffer | string, + options?: WriteOptions +): Promise; + +/** + * Write file. + * + * @param { int } 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: int, buffer: ArrayBuffer | string, callback: AsyncCallback): void; + +/** + * Write file. + * + * @param { int } 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: int, + buffer: ArrayBuffer | string, + options: WriteOptions, + callback: AsyncCallback +): void; + +/** + * Write file with sync interface. + * + * @param { int } fd - file descriptor. + * @param { ArrayBuffer | string } buffer - buffer. + * @param { WriteOptions } [options] - options. + * @returns { long } 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: int, + buffer: ArrayBuffer | string, + options?: WriteOptions +): long; + +/** + * Connect Distributed File System. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { string } networkId - The networkId of device. + * @param { DfsListeners } listeners - The listeners of Distributed File System. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 401 - The parameter check failed.Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameter types. + * @throws { BusinessError } 13900045 - Connection failed. + * @throws { BusinessError } 13900046 - Software caused connection abort. + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function connectDfs(networkId: string, listeners: DfsListeners): Promise; + +/** + * Disconnect Distributed File System. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { string } networkId - The networkId of device. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 201 - Permission denied. + * @throws { BusinessError } 401 - The parameter check failed.Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameter types. + * @throws { BusinessError } 13600004 - Unmount failed. + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +function disconnectDfs(networkId: 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. + * @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 { long } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly processedSize: long; + + /** + * @type { long } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly totalSize: long; +} + +/** + * 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 { int } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly fd: int; + + /** + * 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 + * @since 20 + */ + readonly path: string; + + /** + * File name + * + * @type { string } + * @readonly + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly name: string; + + /** + * Get parent path of file. + * + * @returns { string } Return the parent path of file. + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14300002 - Invalid URI + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + getParent(): string; + + /** + * Lock file with blocking method. + * + * @param { boolean } exclusive - whether lock is exclusive. + * @returns { Promise } The promise returned by the 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): 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 { int } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly fd: int; + + /** + * File pointer + * + * @type { long } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly filePointer: long; + + /** + * Set file pointer. + * + * @param { long } 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: long): 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 { long } 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 + ): long; + + /** + * 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 { long } 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 + ): long; + + /** + * Generate read stream from RandomAccessFile object. + * + * @returns { ReadStream } Return ReadStream object. + * @throws { BusinessError } 401 - Parameter error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + getReadStream(): ReadStream; + + /** + * Generate write stream from RandomAccessFile object. + * + * @returns { WriteStream } Return WriteStream object. + * @throws { BusinessError } 401 - Parameter error + * @throws { BusinessError } 13900008 - Bad file descriptor + * @throws { BusinessError } 13900011 - Out of memory + * @throws { BusinessError } 13900012 - Permission denied + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + getWriteStream(): WriteStream; +} + +/** + * File Read Stream. + * + * @extends stream.Readable + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +class ReadStream extends stream.Readable { + /** + * The ReadStream constructor. + * + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + constructor(); + + /** + * The Number of bytes read in the stream. + * + * @type { long } + * @readonly + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly bytesRead: long; + + /** + * The path of the file being read. + * + * @type { string } + * @readonly + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly path: string; + + /** + * Set the file position indicator for the read stream. + * + * @param { long } offset - file offset. + * @param { WhenceType } [whence = WhenceType.SEEK_SET] - directive whence. + * @returns { long } Returns the offset relative to starting position of stream. + * @throws { BusinessError } 401 - Parameter error + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900026 - Illegal seek + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + seek(offset: long, whence?: WhenceType): long; + + /** + * Close ReadStream 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; +} + +/** + * File Write Stream. + * + * @extends stream.Writable + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +class WriteStream extends stream.Writable { + /** + * The WriteStream constructor. + * + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + constructor(); + + /** + * The Number of bytes written in the stream. + * + * @type { long } + * @readonly + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly bytesWritten: long; + + /** + * The path of the file being written. + * + * @type { string } + * @readonly + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly path: string; + + /** + * Set the file position indicator for the write stream. + * + * @param { long } offset - file offset. + * @param { WhenceType } [whence = WhenceType.SEEK_SET] - directive whence. + * @returns { long } Returns the offset relative to starting position of stream. + * @throws { BusinessError } 401 - Parameter error + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 13900026 - Illegal seek + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + seek(offset: long, whence?: WhenceType): long; + + /** + * Close WriteStream 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; +} + +/** + * 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; + + /** + * Create the file read stream. + * @returns { ReadStream } Returns the file read stream. + * @throws { BusinessError } 13900001 Operation not permitted + * @throws { BusinessError } 13900002 No such file or directory + * @throws { BusinessError } 13900012 Permission denied + * @throws { BusinessError } 13900042 Internal error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + openRead(): ReadStream; + + /** + * 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 + */ + readFully(): ArrayBuffer; + + /** + * Create the file write stream. + * @returns { WriteStream } Returns the file write stream. + * @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 + */ + startWrite(): WriteStream; + + /** + * If the file is written successfully, the file is closed. + * @throws { BusinessError } 13900042 Internal error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + finishWrite(): void; + + /** + * If writing to the file fails, the file is rolled back. + * @throws { BusinessError } 13900042 Internal error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + failWrite(): void; + + /** + * 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 + */ + delete(): void; +} /** - * File object. + * Stat object. * - * @interface File + * @interface Stat * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -interface File { +interface Stat { /** - * @type { number } + * @type { bigint } * @readonly + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ - readonly fd: number; + readonly ino: bigint; /** - * File path - * - * @type { string } + * @type { long } * @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; + readonly mode: long; /** - * File name - * - * @type { string } + * @type { long } * @readonly * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ - readonly name: string; + readonly uid: long; + + /** + * @type { long } + * @readonly + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly gid: long; + + /** + * @type { long } + * @readonly + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly size: long; + + /** + * @type { long } + * @readonly + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly atime: long; + + /** + * @type { long } + * @readonly + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly mtime: long; + + /** + * @type { long } + * @readonly + * @throws { BusinessError } 13900005 - I/O error + * @throws { BusinessError } 13900042 - Unknown error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly ctime: long; + + /** + * Returns nanosecond of the access time. + * @type { bigint } + * @readonly + * @throws { BusinessError } 13900042 - Internal error + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + 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; /** - * Get parent path of file. * - * @returns { string } Return the parent path of file. + * @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 - * @throws { BusinessError } 14300002 - Invalid URI * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ - getParent(): string; + isBlockDevice(): boolean; /** - * Lock file with blocking method. + * Whether path/fd is character device. * - * @param { boolean } exclusive - whether lock is exclusive. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900034 - Operation would block + * @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 - * @throws { BusinessError } 13900043 - No record locks available * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ - lock(exclusive?: boolean): Promise; + isCharacterDevice(): boolean; /** - * Lock file with blocking method. + * Whether path/fd is directory. * - * @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 + * @returns { boolean } Returns whether the path/fd point to a directory or not. + * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900042 - Unknown error - * @throws { BusinessError } 13900043 - No record locks available * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ - lock(callback: AsyncCallback): void; + isDirectory(): boolean; /** - * Lock file with blocking method. + * Whether path/fd is fifo. * - * @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 + * @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 - * @throws { BusinessError } 13900043 - No record locks available * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ - lock(exclusive: boolean, callback: AsyncCallback): void; + isFIFO(): boolean; /** - * Try to lock file with returning results immediately. + * Whether path/fd is file. * - * @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 + * @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 - * @throws { BusinessError } 13900043 - No record locks available * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ - tryLock(exclusive?: boolean): void; + isFile(): boolean; /** - * Unlock file. + * Whether path/fd is socket. * - * @throws { BusinessError } 13900004 - Interrupted system call - * @throws { BusinessError } 13900008 - Bad file descriptor - * @throws { BusinessError } 13900020 - Invalid argument - * @throws { BusinessError } 13900034 - Operation would block + * @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 - * @throws { BusinessError } 13900043 - No record locks available * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ - unlock(): void; + 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; } /** - * Stat object. + * Stream object * - * @interface Stat + * @interface Stream * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ -interface Stat { - +interface Stream { /** - * @type { bigint } - * @readonly + * 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 - * @crossplatform * @since 20 */ - readonly ino: bigint; + close(): Promise; /** - * @type { number } - * @readonly + * 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 - * @crossplatform - * @atomicservice * @since 20 */ - readonly mode: number; + close(callback: AsyncCallback): void; /** - * @type { number } - * @readonly - * @throws { BusinessError } 13900005 - I/O error - * @throws { BusinessError } 13900042 - Unknown error + * 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 - * @crossplatform * @since 20 */ - readonly uid: number; + closeSync(): void; /** - * @type { number } - * @readonly + * 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 - * @crossplatform * @since 20 */ - readonly gid: number; + flush(): Promise; /** - * @type { number } - * @readonly + * 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 - * @crossplatform - * @atomicservice * @since 20 */ - readonly size: number; + flush(callback: AsyncCallback): void; /** - * @type { number } - * @readonly + * 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 - * @crossplatform - * @atomicservice * @since 20 */ - readonly atime: number; + flushSync(): void; /** - * @type { number } - * @readonly + * 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 - * @crossplatform - * @atomicservice * @since 20 */ - readonly mtime: number; + write( + buffer: ArrayBuffer | string, + options?: WriteOptions + ): Promise; /** - * @type { number } - * @readonly + * 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 - * @crossplatform * @since 20 */ - readonly ctime: number; + write(buffer: ArrayBuffer | string, callback: AsyncCallback): void; /** - * Returns nanosecond of the access time. - * @type { bigint } - * @readonly - * @throws { BusinessError } 13900042 - Internal error + * 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 */ - readonly atimeNs?:bigint; + 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 { long } 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 + ): long; /** - * 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 { long } 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 + ): long; +} +/** + * 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 { int } 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. * - * @enum { number } location type + * @enum { int } location type * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ @@ -2050,10 +4408,8 @@ enum LocationType { /** * Enumeration of different types of access mode. * - * @enum { number } access mode type + * @enum { int } access mode type * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ enum AccessModeType { @@ -2061,8 +4417,6 @@ enum AccessModeType { * Check if the file exists. * * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ EXIST = 0, @@ -2071,8 +4425,6 @@ enum AccessModeType { * Check if the file has write permission. * * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ WRITE = 2, @@ -2081,8 +4433,6 @@ enum AccessModeType { * Check if the file has read permission. * * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ READ = 4, @@ -2091,8 +4441,6 @@ enum AccessModeType { * Check if the file has read and write permission. * * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ READ_WRITE = 6, @@ -2101,7 +4449,7 @@ enum AccessModeType { /** * Enumeration of different types of access flag. * - * @enum { number } access flag type + * @enum { int } access flag type * @syscap SystemCapability.FileManagement.File.FileIO * @since 20 */ @@ -2115,6 +4463,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 { int } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly event: int; + + /** + * Associated rename event. + * + * @type { int } + * @readonly + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + readonly cookie: int; +} + +/** + * 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 +4567,6 @@ enum AccessFlagType { * * @interface Filter * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ export interface Filter { @@ -2133,8 +4576,6 @@ export interface Filter { * * @type { ?Array } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ suffix?: Array; @@ -2144,8 +4585,6 @@ export interface Filter { * * @type { ?Array } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ displayName?: Array; @@ -2155,8 +4594,6 @@ export interface Filter { * * @type { ?Array } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ mimeType?: Array; @@ -2164,43 +4601,64 @@ export interface Filter { /** * The exceeding size of the file. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ - fileSizeOver?: number; + fileSizeOver?: long; /** * The last modification time of the file. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ - lastModifiedAfter?: number; + lastModifiedAfter?: double; /** * Whether to exclude media files. * * @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 +4667,6 @@ export interface Options { * * @type { ?string } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform * @since 20 */ encoding?: string; @@ -2220,31 +4677,25 @@ export interface Options { * * @interface ReadOptions * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ export interface ReadOptions { /** * The offset when reading the file. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ - offset?: number; + offset?: long; /** * The length for reading. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ - length?: number; + length?: long; } /** @@ -2253,8 +4704,6 @@ export interface ReadOptions { * @extends ReadOptions * @interface ReadTextOptions * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ export interface ReadTextOptions extends ReadOptions { @@ -2263,8 +4712,6 @@ export interface ReadTextOptions extends ReadOptions { * * @type { ?string } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ encoding?: string; @@ -2276,31 +4723,25 @@ export interface ReadTextOptions extends ReadOptions { * @extends Options * @interface WriteOptions * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ export interface WriteOptions extends Options { /** * The offset when writing the file. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ - offset?: number; + offset?: long; /** * The length for writing. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.FileManagement.File.FileIO - * @crossplatform - * @atomicservice * @since 20 */ - length?: number; + length?: long; } /** @@ -2308,7 +4749,6 @@ export interface WriteOptions extends Options { * * @interface ListFileOptions * @syscap SystemCapability.FileManagement.File.FileIO - * @atomicservice * @since 20 */ export interface ListFileOptions { @@ -2317,7 +4757,6 @@ export interface ListFileOptions { * * @type { ?boolean } * @syscap SystemCapability.FileManagement.File.FileIO - * @atomicservice * @since 20 */ recursion?: boolean; @@ -2325,22 +4764,144 @@ export interface ListFileOptions { /** * The number of files listed. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.FileManagement.File.FileIO - * @atomicservice * @since 20 */ - listNum?: number; + listNum?: long; /** * The filter of listing files. * * @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 { ?long } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + start?: long; + + /** + * The ending position of file offset. + * + * @type { ?long } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + end?: long; +} + +/** + * ReadStreamOptions type + * + * @interface ReadStreamOptions + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +export interface ReadStreamOptions { + /** + * The starting range for reading a file by stream. + * + * @type { ?long } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + start?: long; + + /** + * The ending range for reading a file by stream. + * + * @type { ?long } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + end?: long; +} + +/** + * WriteStreamOptions type + * + * @interface WriteStreamOptions + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +export interface WriteStreamOptions { + /** + * The mode for creating write stream. + * + * @type { ?int } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + mode?: int; + /** + * The starting range for writing a file by stream. + * + * @type { ?long } + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + start?: long; +} + +/** + * The listeners of Distributed File System. + * + * @typedef DfsListeners + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ +export interface DfsListeners { + /** + * The Listener of Distributed File System status + * + * @param { string } networkId - The networkId of device. + * @param { number } status - The status code of Distributed File System. + * @syscap SystemCapability.FileManagement.File.FileIO + * @since 20 + */ + onStatus(networkId: string, status: number): void; +} + +/** + * 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..6d8e4097b01247a3a3d005ab5f9daf2461149fd3 100644 --- a/api/@ohos.file.hash.d.ts +++ b/api/@ohos.file.hash.d.ts @@ -19,9 +19,7 @@ */ import type { AsyncCallback } from './@ohos.base'; -/*** if arkts 1.1 */ import stream from './@ohos.util.stream'; -/*** endif */ /** * Hash @@ -141,6 +139,7 @@ declare namespace hash { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ class HashStream extends stream.Transform { /** @@ -161,6 +160,7 @@ declare namespace hash { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ digest(): string; @@ -182,6 +182,7 @@ declare namespace hash { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ update(data: ArrayBuffer): void; } @@ -208,6 +209,7 @@ declare namespace hash { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ function createHash(algorithm: string): HashStream; } diff --git a/api/@ohos.file.photoAccessHelper.d.ts b/api/@ohos.file.photoAccessHelper.d.ts index 374a50ee0de8a77470d7c77dab1054582ec55a6c..9c482d200e4db25b39e2182373db0cf206cd99db 100644 --- a/api/@ohos.file.photoAccessHelper.d.ts +++ b/api/@ohos.file.photoAccessHelper.d.ts @@ -90,11 +90,11 @@ declare namespace photoAccessHelper { function getPhotoAccessHelper(context: Context): PhotoAccessHelper; /** - * Returns an instance of PhotoAccessHelper + * Obtains a PhotoAccessHelper instance for accessing and modifying media files in the album. * * @permission ohos.permission.INTERACT_ACROSS_LOCAL_ACCOUNTS * @param { Context } context - Hap context information - * @param { number } userId - Target userId + * @param { int } userId - Target userId * @returns { PhotoAccessHelper } Instance of PhotoAccessHelper * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 202 - Called by non-system application @@ -102,10 +102,10 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @StageModelOnly - * @crossplatform - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - function getPhotoAccessHelper(context: Context, userId: number): PhotoAccessHelper; + function getPhotoAccessHelper(context: Context, userId: int): PhotoAccessHelper; /** * Enumerates the types of av file format. @@ -131,14 +131,14 @@ declare namespace photoAccessHelper { /** * Enumerates media file types. * - * @enum { number } PhotoType + * @enum { int } PhotoType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 */ /** * Enumerates media file types. * - * @enum { number } PhotoType + * @enum { int } PhotoType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice * @since 11 @@ -146,7 +146,7 @@ declare namespace photoAccessHelper { /** * Enumerates media file types. * - * @enum { number } PhotoType + * @enum { int } PhotoType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @atomicservice @@ -205,7 +205,7 @@ declare namespace photoAccessHelper { /** * Enumerates the PhotoAsset types. * - * @enum { number } PhotoSubtype + * @enum { int } PhotoSubtype * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 10 @@ -213,7 +213,7 @@ declare namespace photoAccessHelper { /** * Enumerates the PhotoAsset types. * - * @enum { number } PhotoSubtype + * @enum { int } PhotoSubtype * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} @@ -268,7 +268,7 @@ declare namespace photoAccessHelper { /** * Enumerates the formats for displaying media assets. * - * @enum { number } DynamicRangeType + * @enum { int } DynamicRangeType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 @@ -295,10 +295,11 @@ declare namespace photoAccessHelper { /** * Ability to access thumbnail * - * @enum { number } ThumbnailVisibility + * @enum { int } ThumbnailVisibility * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enum ThumbnailVisibility { /** @@ -306,7 +307,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ INVISIBLE = 0, /** @@ -314,7 +316,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ VISIBLE = 1 } @@ -322,7 +325,7 @@ declare namespace photoAccessHelper { /** * Enumerates the file locations. * - * @enum { number } Photo asset position, such as local device or cloud + * @enum { int } Photo asset position, such as local device or cloud * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 10 @@ -330,7 +333,7 @@ declare namespace photoAccessHelper { /** * Enumerates the file locations. * - * @enum { number } Photo asset position, such as local device or cloud + * @enum { int } Photo asset position, such as local device or cloud * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since arkts {'1.1':'16','1.2':'20'} * @arkts 1.1&1.2 @@ -370,7 +373,8 @@ declare namespace photoAccessHelper { * Stored both on a local device and cloud. * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ LOCAL_AND_CLOUD = 3 } @@ -378,7 +382,7 @@ declare namespace photoAccessHelper { /** * Analysis type * - * @enum { number } AnalysisType + * @enum { int } AnalysisType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'11','1.2':'20'} @@ -534,7 +538,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ANALYSIS_SEARCH_INDEX = 16 } @@ -542,7 +547,7 @@ declare namespace photoAccessHelper { /** * Enumerates the types of recommended images. * - * @enum { number } RecommendationType + * @enum { int } RecommendationType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} @@ -654,7 +659,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ COLOR_STYLE_PHOTO = 12 } @@ -662,7 +668,7 @@ declare namespace photoAccessHelper { /** * Enumerates the asset delivery modes. * - * @enum { number } DeliveryMode + * @enum { int } DeliveryMode * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 @@ -699,7 +705,7 @@ declare namespace photoAccessHelper { /** * Enumerates the video transcoding mode. * - * @enum { number } CompatibleMode + * @enum { int } CompatibleMode * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since arkts {'1.1':'15','1.2':'20'} * @arkts 1.1&1.2 @@ -736,18 +742,18 @@ declare namespace photoAccessHelper { /** * Indicates the progress of required media asset data * - * @param { number } progress - Progress in percentage. Value range: 0 to 100 + * @param { int } progress - Progress in percentage. Value range: 0 to 100 * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since arkts {'1.1':'15','1.2':'20'} * @arkts 1.1&1.2 */ - onProgress(progress: number): void; + onProgress(progress: int): void; } /** * Enumerates the types of the file to read. * - * @enum { number } SourceMode + * @enum { int } SourceMode * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'11','1.2':'20'} @@ -778,7 +784,7 @@ declare namespace photoAccessHelper { /** * Enumeration type of permissions for accessing asset uri. * - * @enum { number } PhotoPermissionType + * @enum { int } PhotoPermissionType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'12','1.2':'20'} @@ -809,7 +815,7 @@ declare namespace photoAccessHelper { /** * Enumerates the types of media resource information to be hidden from an application. * - * @enum { number } HideSensitiveType + * @enum { int } HideSensitiveType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'12','1.2':'20'} @@ -860,7 +866,7 @@ declare namespace photoAccessHelper { /** * Enumerates the authorization modes. * - * @enum { number } AuthorizationMode + * @enum { int } AuthorizationMode * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'12','1.2':'20'} @@ -881,7 +887,7 @@ declare namespace photoAccessHelper { /** * Enumerates the watermark editable flags. * - * @enum { number } WatermarkType + * @enum { int } WatermarkType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'14','1.2':'20'} @@ -932,7 +938,7 @@ declare namespace photoAccessHelper { /** * Enum: complete button text * - * @enum { number } CompleteButtonText + * @enum { int } CompleteButtonText * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice * @since arkts {'1.1':'14','1.2':'20'} @@ -1092,7 +1098,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ class MediaAssetManager { /** @@ -1110,7 +1117,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @static * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ static requestImage( context: Context, @@ -1158,7 +1166,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @static * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ static requestImageData( context: Context, @@ -1200,7 +1209,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @static * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ static requestMovingPhoto( context: Context, @@ -1222,7 +1232,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @static * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ static cancelRequest(context: Context, requestId: string): Promise; @@ -1261,7 +1272,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @static * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ static requestVideoFile( context: Context, @@ -1298,7 +1310,8 @@ declare namespace photoAccessHelper { * @static * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ static loadMovingPhoto( context: Context, @@ -1310,20 +1323,20 @@ declare namespace photoAccessHelper { /** * Indicates the type of photo asset member. * - * @typedef { number | string | boolean } MemberType + * @typedef { int | long | double | string | boolean } MemberType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 */ /** * Indicates the type of photo asset member. * - * @typedef { number | string | boolean } MemberType + * @typedef { int | long | double | string | boolean } MemberType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - type MemberType = number | string | boolean; + type MemberType = int | long | double | string | boolean; /** * Provides APIs for encapsulating file asset attributes. @@ -1651,7 +1664,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getThumbnail(callback: AsyncCallback): void; /** @@ -1666,7 +1680,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getThumbnail(size: image.Size, callback: AsyncCallback): void; /** @@ -1699,7 +1714,8 @@ declare namespace photoAccessHelper { *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getThumbnailData(type: ThumbnailType): Promise; /** @@ -1829,7 +1845,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getExif(callback: AsyncCallback): void; /** @@ -1862,7 +1879,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getExif(): Promise; /** @@ -1878,7 +1896,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setPending(pendingState: boolean, callback: AsyncCallback): void; /** @@ -1894,7 +1913,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setPending(pendingState: boolean): Promise; /** @@ -1909,7 +1929,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isEdited(callback: AsyncCallback): void; /** @@ -1924,7 +1945,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isEdited(): Promise; /** @@ -1939,7 +1961,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ requestEditData(callback: AsyncCallback): void; /** @@ -1954,7 +1977,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ requestEditData(): Promise; /** @@ -1969,7 +1993,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getEditData(): Promise; /** @@ -1984,7 +2009,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - 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 - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ clone(title: string): Promise; /** @@ -2019,7 +2045,7 @@ declare namespace photoAccessHelper { * Opens the source file to obtain the FD. This API uses an asynchronous callback to return the result. * * @permission ohos.permission.READ_IMAGEVIDEO - * @param { AsyncCallback } callback - Callback used to return the FD. + * @param { AsyncCallback } callback - Callback used to return the FD. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Called by non-system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -2027,14 +2053,15 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - requestSource(callback: AsyncCallback): void; + requestSource(callback: AsyncCallback): void; /** * Opens the source file to obtain the FD. This API uses a promise to return the result. * * @permission ohos.permission.READ_IMAGEVIDEO - * @returns { Promise } Returns opened source asset fd. + * @returns { Promise } Returns opened source asset fd. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Called by non-system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -2042,9 +2069,10 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - requestSource(): Promise; + requestSource(): Promise; /** * Commits the edited image or video asset. This API uses an asynchronous callback to return the result. * @@ -2059,9 +2087,10 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - 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. * @@ -2076,7 +2105,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ commitEditedAsset(editData: string, uri: string): Promise; /** @@ -2091,9 +2121,10 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - 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. * @@ -2106,7 +2137,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ revertToOriginal(): Promise; /** @@ -2122,7 +2154,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ requestPhoto(callback: AsyncCallback): string; /** @@ -2139,7 +2172,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ requestPhoto(options: RequestPhotoOptions, callback: AsyncCallback): string; /** @@ -2154,14 +2188,15 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cancelPhotoRequest(requestId: string): void; /** * Obtains the thumbnail of the specified type for the key frame. This API uses a promise to return the result. * * @permission ohos.permission.READ_IMAGEVIDEO - * @param { number } beginFrameTimeMs - Time of the start frame, in ms. The value 0 indicates the cover frame. + * @param { long } beginFrameTimeMs - Time of the start frame, in ms. The value 0 indicates the cover frame. * @param { ThumbnailType } type - Type of the thumbnail. * @returns { Promise } Returns the thumbnail's pixelMap. * @throws { BusinessError } 201 - Permission denied @@ -2171,9 +2206,10 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - getKeyFrameThumbnail(beginFrameTimeMs: number, type: ThumbnailType): Promise; + getKeyFrameThumbnail(beginFrameTimeMs: long, type: ThumbnailType): Promise; } /** @@ -2787,7 +2823,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ SUPPORTED_WATERMARK_TYPE = 'supported_watermark_type', /** @@ -2795,7 +2832,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ THUMBNAIL_VISIBLE = 'thumbnail_visible', /** @@ -2803,7 +2841,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ IS_CE_AUTO = 'is_auto', /** @@ -2811,7 +2850,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ OWNER_ALBUM_ID = 'owner_album_id', /** @@ -2819,14 +2859,16 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ IS_RECENT_SHOW = 'is_recent_show', /** * Suffix of the asset, read only * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA_SUFFIX = 'media_suffix', /** @@ -2898,7 +2940,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ALBUM_LPATH = 'lpath', /** @@ -2906,7 +2949,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ BUNDLE_NAME = 'bundle_name', /** @@ -2932,7 +2976,7 @@ declare namespace photoAccessHelper { /** * Enumerates the display modes of hidden files in the system. * - * @enum { number } HiddenPhotosDisplayMode + * @enum { int } HiddenPhotosDisplayMode * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'11','1.2':'20'} @@ -3072,12 +3116,12 @@ declare namespace photoAccessHelper { /** * User id * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 19 */ - userId?: number; + userId?: int; } /** @@ -3219,7 +3263,8 @@ declare namespace photoAccessHelper { * @interface PhotoCreationSource * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface PhotoCreationSource { /** @@ -3228,7 +3273,8 @@ declare namespace photoAccessHelper { * @type { ?string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ bundleName?: string; /** @@ -3237,7 +3283,8 @@ declare namespace photoAccessHelper { * @type { ?string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ appName?: string; /** @@ -3246,18 +3293,20 @@ declare namespace photoAccessHelper { * @type { ?string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ appId?: string; /** * Token ID of the target application * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - tokenId?: number; + tokenId?: long; } /** @@ -3289,7 +3338,7 @@ declare namespace photoAccessHelper { /** * Obtains the total number of files in the result set. * - * @returns { number } Total number of objects. + * @returns { int } Total number of objects. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument @@ -3300,7 +3349,7 @@ declare namespace photoAccessHelper { /** * Obtains the total number of files in the result set. * - * @returns { number } Total number of objects. + * @returns { int } Total number of objects. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument @@ -3312,7 +3361,7 @@ declare namespace photoAccessHelper { /** * Obtains the total number of objects in the fetch result. * - * @returns { number } Total number of objects. + * @returns { int } Total number of objects. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3321,7 +3370,7 @@ declare namespace photoAccessHelper { * @since arkts {'1.1':'20','1.2':'20'} * @arkts 1.1&1.2 */ - getCount(): number; + getCount(): int; /** * Checks whether the cursor is in the last row of the result set. * You need to check whether the object is the last one before calling getNextObject. @@ -3358,6 +3407,7 @@ declare namespace photoAccessHelper { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ isAfterLast(): boolean; /** @@ -3545,6 +3595,7 @@ declare namespace photoAccessHelper { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ getLastObject(callback: AsyncCallback): void; /** @@ -3580,12 +3631,13 @@ declare namespace photoAccessHelper { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ getLastObject(): Promise; /** * Obtains a file asset with the specified index in the result set. This API uses an asynchronous callback to return the result. * - * @param { number } index - Index of the file asset to obtain. The value starts from 0. + * @param { int } index - Index of the file asset to obtain. The value starts from 0. * @param { AsyncCallback } callback - Callback used to return the file asset obtained. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. @@ -3597,7 +3649,7 @@ declare namespace photoAccessHelper { /** * Obtains a file asset with the specified index in the result set. This API uses an asynchronous callback to return the result. * - * @param { number } index - Index of the file asset to obtain. The value starts from 0. + * @param { int } index - Index of the file asset to obtain. The value starts from 0. * @param { AsyncCallback } callback - Callback used to return the file asset obtained. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. @@ -3610,7 +3662,7 @@ declare namespace photoAccessHelper { /** * Obtains the object with the specified index in the result set. * - * @param { number } index - Index of the file asset to obtain. The value starts from 0. + * @param { int } index - Index of the file asset to obtain. The value starts from 0. * @param { AsyncCallback } callback - Callback used to return the file asset obtained. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail @@ -3620,11 +3672,11 @@ declare namespace photoAccessHelper { * @since arkts {'1.1':'20','1.2':'20'} * @arkts 1.1&1.2 */ - getObjectByPosition(index: number, callback: AsyncCallback): void; + getObjectByPosition(index: int, callback: AsyncCallback): void; /** * Obtains a file asset with the specified index in the result set. This API uses a promise to return the result. * - * @param { number } index - Index of the file asset to obtain. The value starts from 0. + * @param { int } index - Index of the file asset to obtain. The value starts from 0. * @returns { Promise } Returns the object * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. @@ -3636,7 +3688,7 @@ declare namespace photoAccessHelper { /** * Obtains a file asset with the specified index in the result set. This API uses a promise to return the result. * - * @param { number } index - Index of the file asset to obtain. The value starts from 0. + * @param { int } index - Index of the file asset to obtain. The value starts from 0. * @returns { Promise } Returns the object * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. @@ -3649,7 +3701,7 @@ declare namespace photoAccessHelper { /** * Obtains the object with the specified index in the result set. * - * @param { number } index - Index of the file asset to obtain. The value starts from 0. + * @param { int } index - Index of the file asset to obtain. The value starts from 0. * @returns { Promise } Returns the object * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail @@ -3659,7 +3711,7 @@ declare namespace photoAccessHelper { * @since arkts {'1.1':'20','1.2':'20'} * @arkts 1.1&1.2 */ - getObjectByPosition(index: number): Promise; + getObjectByPosition(index: int): Promise; /** * Obtains all the file assets in the result set. This API uses an asynchronous callback to return the result. * @@ -3770,14 +3822,14 @@ declare namespace photoAccessHelper { /** * Enumerates the album types. * - * @enum { number } AlbumType + * @enum { int } AlbumType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 */ /** * Enumerates the album types. * - * @enum { number } AlbumType + * @enum { int } AlbumType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} @@ -3819,7 +3871,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SOURCE = 2048, /** @@ -3836,14 +3889,14 @@ declare namespace photoAccessHelper { /** * Enumerate the album subtypes. * - * @enum { number } AlbumSubtype + * @enum { int } AlbumSubtype * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 */ /** * Enumerate the album subtypes. * - * @enum { number } AlbumSubtype + * @enum { int } AlbumSubtype * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} @@ -4056,7 +4109,7 @@ declare namespace photoAccessHelper { /** * Enumerates the types of the operation for obtaining image or video thumbnails. * - * @enum { number } RequestPhotoType + * @enum { int } RequestPhotoType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'11','1.2':'20'} @@ -4217,7 +4270,7 @@ declare namespace photoAccessHelper { /** * Number of assets in the album * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 @@ -4225,14 +4278,14 @@ declare namespace photoAccessHelper { /** * Number of assets in the album * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - readonly count: number; + readonly count: int; /** * Cover uri for the album * @@ -4250,7 +4303,8 @@ declare namespace photoAccessHelper { * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ readonly lpath?: string; /** @@ -4291,7 +4345,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAssets(options: FetchOptions, callback: AsyncCallback>): void; /** @@ -4354,7 +4409,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ getSharedPhotoAssets(options: FetchOptions): Array; } @@ -4412,7 +4468,7 @@ declare namespace photoAccessHelper { /** * Number of image assets in the album * - * @type { ?number } + * @type { ?int } * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 11 @@ -4420,18 +4476,18 @@ declare namespace photoAccessHelper { /** * Number of image assets in the album * - * @type { ?number } + * @type { ?int } * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - readonly imageCount?: number; + readonly imageCount?: int; /** * Number of video assets in the album * - * @type { ?number } + * @type { ?int } * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 11 @@ -4439,34 +4495,36 @@ declare namespace photoAccessHelper { /** * Number of video assets in the album * - * @type { ?number } + * @type { ?int } * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - readonly videoCount?: number; + readonly videoCount?: int; /** * Album dateAdded * - * @type { ?number } + * @type { ?long } * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly dateAdded?: number; + readonly dateAdded?: long; /** * Album dateModified * - * @type { ?number } + * @type { ?long } * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly dateModified?: number; + readonly dateModified?: long; /** * Modify metadata for the album * @@ -5402,7 +5460,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getDataAnalysisProgress(analysisType: AnalysisType): Promise; /** @@ -5476,7 +5535,7 @@ declare namespace photoAccessHelper { * @permission ohos.permission.WRITE_IMAGEVIDEO * @param { string } bundleName - BundleName of the application which called the save dialog * @param { string } appName - AppName of the application which called the save dialog - * @param { number } tokenId - TokenId of the application which called the save dialog + * @param { long } tokenId - TokenId of the application which called the save dialog * @param { Array } photoCreationConfigs - List of the photo asset creation configs * @returns { Promise> } - Returns the media library file uri list to application which has been authorized * @throws { BusinessError } 201 - Permission denied @@ -5489,7 +5548,7 @@ declare namespace photoAccessHelper { * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ - createAssetsForApp(bundleName: string, appName: string, tokenId: number, photoCreationConfigs: Array): Promise>; + createAssetsForApp(bundleName: string, appName: string, tokenId: long, photoCreationConfigs: Array): Promise>; /** * Create asset and grant short term permission to the application. * @@ -5511,7 +5570,7 @@ declare namespace photoAccessHelper { * @param { string } bundleName - Bundle name of the target application. * @param { string } appName - Name of the target application. * @param { string } appId - ID of the target application. - * @param { number } tokenId - Unique identifier for the temporary authorization. + * @param { long } tokenId - Unique identifier for the temporary authorization. * @param { AuthorizationMode } authorizationMode - Mode of authorization * @param { Array } photoCreationConfigs - Configuration for creating (saving) the media assets in the media library. * @returns { Promise> } - Returns the media library file uri list to application which has been authorized @@ -5529,7 +5588,7 @@ declare namespace photoAccessHelper { bundleName: string, appName: string, appId: string, - tokenId: number, + tokenId: long, authorizationMode: AuthorizationMode, photoCreationConfigs: Array ): Promise>; @@ -5555,7 +5614,7 @@ declare namespace photoAccessHelper { *
If it is an empty string, all the media assets in the Gallery are obtained by default. * @param { FetchOptions } options - Fetch options. Only one search condition or sorting mode must be set in predicates. *
If no value is set or multiple search criteria or sorting modes are set, the API cannot be called successfully. - * @param { AsyncCallback } callback - Callback used to return the index obtained. + * @param { AsyncCallback } callback - Callback used to return the index obtained. * @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. @@ -5567,7 +5626,7 @@ declare namespace photoAccessHelper { * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - getPhotoIndex(photoUri: string, albumUri: string, options: FetchOptions, callback: AsyncCallback): void; + getPhotoIndex(photoUri: string, albumUri: string, options: FetchOptions, callback: AsyncCallback): void; /** * Obtains the index of an image or video in an album. This API uses a promise to return the result. * @@ -5576,7 +5635,7 @@ declare namespace photoAccessHelper { * @param { string } albumUri - Album URI, which can be an empty string. If it is an empty string, all the media assets in the Gallery are obtained by default. * @param { FetchOptions } options - Fetch options. Only one search condition or sorting mode must be set in predicates. *
If no value is set or multiple search criteria or sorting modes are set, the API cannot be called successfully. - * @returns { Promise } - Returns the index of the asset in the album + * @returns { Promise } - Returns the index of the asset in the album * @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. @@ -5588,7 +5647,7 @@ declare namespace photoAccessHelper { * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - getPhotoIndex(photoUri: string, albumUri: string, options: FetchOptions): Promise; + getPhotoIndex(photoUri: string, albumUri: string, options: FetchOptions): Promise; /** * Releases this PhotoAccessHelper instance. This API uses an asynchronous callback to return the result. * Call this API when the APIs of the PhotoAccessHelper instance are no longer used. @@ -5664,7 +5723,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ saveGalleryFormInfo(info: GalleryFormInfo): Promise; /** @@ -5680,7 +5740,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ removeFormInfo(info: FormInfo, callback: AsyncCallback): void; /** @@ -5696,7 +5757,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ removeFormInfo(info: FormInfo): Promise; /** @@ -5712,7 +5774,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ removeGalleryFormInfo(info: GalleryFormInfo): Promise; /** @@ -5728,7 +5791,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ updateGalleryFormInfo(info: GalleryFormInfo): Promise; /** @@ -5765,12 +5829,12 @@ declare namespace photoAccessHelper { * Grants an application the permission to access multiple URIs. This API uses a promise to return the result. * * @permission ohos.permission.READ_IMAGEVIDEO - * @param { number } tokenId - ID of the target application. + * @param { long } tokenId - ID of the target application. * @param { Array } uriList - A list of URIs, which cannot exceed 1000. * @param { PhotoPermissionType } photoPermissionType - Type of the permission to be granted. For details, see the enum. * @param { HideSensitiveType } hideSensitiveType - Type of the information to hide. *
This parameter is reserved. Currently, any enumerated value of HideSensitiveType can be passed in. - * @returns { Promise } Returns result of grant permission + * @returns { Promise } Returns result of grant permission * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 202 - Called by non-system application * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: 1. Incorrect uri format; @@ -5778,19 +5842,20 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - grantPhotoUrisPermission(tokenId: number, uriList: Array, photoPermissionType: PhotoPermissionType, hideSensitiveType: HideSensitiveType): Promise; + grantPhotoUrisPermission(tokenId: long, uriList: Array, photoPermissionType: PhotoPermissionType, hideSensitiveType: HideSensitiveType): Promise; /** * Grants an application the permission to access a URI. This API uses a promise to return the result. * * @permission ohos.permission.READ_IMAGEVIDEO - * @param { number } tokenId - ID of the target application. + * @param { long } tokenId - ID of the target application. * @param { string } uri - URI of the media asset. * @param { PhotoPermissionType } photoPermissionType - Type of the permission to be granted. For details, see the enum. * @param { HideSensitiveType } hideSensitiveType - Type of the information to hide. *
This parameter is reserved. Currently, any enumerated value of HideSensitiveType can be passed in. - * @returns { Promise } Returns result of grant permission + * @returns { Promise } Returns result of grant permission * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 202 - Called by non-system application * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: 1. Incorrect uri format; @@ -5801,15 +5866,15 @@ declare namespace photoAccessHelper { * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ - grantPhotoUriPermission(tokenId: number, uri: string, photoPermissionType: PhotoPermissionType, hideSensitiveType: HideSensitiveType): Promise; + grantPhotoUriPermission(tokenId: long, uri: string, photoPermissionType: PhotoPermissionType, hideSensitiveType: HideSensitiveType): Promise; /** * Cancels the permission for accessing an URI from an application. This API uses a promise to return the result. * * @permission ohos.permission.READ_IMAGEVIDEO - * @param { number } tokenId - ID of the target application. + * @param { long } tokenId - ID of the target application. * @param { string } uri - URI of the media asset. * @param { PhotoPermissionType } photoPermissionType - Permission type. - * @returns { Promise } Returns result of cancel permission + * @returns { Promise } Returns result of cancel permission * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 202 - Called by non-system application * @throws { BusinessError } 13900020 - Invalid argument. Possible causes: 1. Incorrect uri format; @@ -5817,16 +5882,17 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - cancelPhotoUriPermission(tokenId: number, uri: string, photoPermissionType: PhotoPermissionType): Promise; + cancelPhotoUriPermission(tokenId: long, uri: string, photoPermissionType: PhotoPermissionType): Promise; /** * Provides the capability of thumbnail generation according to specified rules. * * @permission ohos.permission.READ_IMAGEVIDEO * @param { dataSharePredicates.DataSharePredicates } predicate - Rule options for generating thumbnails. * @param { AsyncCallback } callback - Returns void when the task is completed. - * @returns { number } Create task id for generating thumbnails + * @returns { int } Create task id for generating thumbnails * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 202 - Called by non-system application * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -5834,14 +5900,15 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - startThumbnailCreationTask(predicate: dataSharePredicates.DataSharePredicates, callback: AsyncCallback): number; + startThumbnailCreationTask(predicate: dataSharePredicates.DataSharePredicates, callback: AsyncCallback): int; /** * Provides the capability of stop generating thumbnails. * * @permission ohos.permission.READ_IMAGEVIDEO - * @param { number } taskId - Stop generating thumbnail task id. + * @param { int } taskId - Stop generating thumbnail task id. * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 202 - Called by non-system application * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -5852,7 +5919,7 @@ declare namespace photoAccessHelper { * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - stopThumbnailCreationTask(taskId: number): void; + stopThumbnailCreationTask(taskId: int): void; /** * Fetch shared photo assets. * @@ -5866,7 +5933,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ getSharedPhotoAssets(options: FetchOptions): Array; /** @@ -5878,7 +5946,8 @@ declare namespace photoAccessHelper { *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14000011 - Internal system error. It is recommended to retry and check the logs. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedPhotoFormats(photoType: PhotoType): Promise>; /** @@ -5887,22 +5956,23 @@ declare namespace photoAccessHelper { * @permission ohos.permission.WRITE_IMAGEVIDEO * @param { AnalysisType } type - Smart analysis type. * @param { Array } assetUris - Array of asset URIs. - * @returns { Promise } Returns the task id of the service. + * @returns { Promise } Returns the task id of the service. * @throws { BusinessError } 201 - Permission denied * @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. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - startAssetAnalysis(type: AnalysisType, assetUris?: Array): Promise; + startAssetAnalysis(type: AnalysisType, assetUris?: Array): Promise; /** * Obtains album information by album IDs. This API uses a promise to return the result. * * @permission ohos.permission.READ_IMAGEVIDEO - * @param { Array } albumIds - Array of album IDs. - * @returns { Promise> } - Return the map of albums + * @param { Array } albumIds - Array of album IDs. + * @returns { Promise> } - Return the map of albums * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 202 - Called by non-system application * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -5910,9 +5980,10 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - getAlbumsByIds(albumIds: Array): Promise>; + getAlbumsByIds(albumIds: Array): Promise>; /** * Creates assets for the current application or other applications in the specified source or user album. This API uses a promise to return the result. * @@ -5929,7 +6000,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ createAssetsForAppWithAlbum(source: PhotoCreationSource, albumUri: string, isAuthorized: boolean, photoCreationConfigs: Array): Promise>; @@ -5946,7 +6018,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 +6034,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 +6052,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 +6070,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 +6088,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 +6106,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 +6122,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 +6138,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 +6156,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 +6174,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 +6192,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 +6210,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ off(type: 'trashedAlbumChange', callback?: Callback): void; @@ -6179,7 +6239,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ getPhotoAlbums(options?: FetchOptions): Promise>; @@ -6199,7 +6258,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ getPhotoAlbumOrder(orderStyle: number, options?: FetchOptions): Promise>; @@ -6219,7 +6277,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ setPhotoAlbumOrder(orderStyle: number, albumOrders: Array): Promise; } @@ -6231,7 +6288,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ enum ThumbnailChangeStatus { /** @@ -6240,7 +6296,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ THUMBNAIL_NOT_EXISTS = 0, @@ -6250,7 +6305,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ THUMBNAIL_ADD = 1, @@ -6260,7 +6314,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ THUMBNAIL_UPDATE = 2, @@ -6270,7 +6323,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ THUMBNAIL_NOT_CHANGE = 3 } @@ -6282,7 +6334,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ enum StrongAssociationType { /** @@ -6291,7 +6342,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ NORMAL = 0, /** @@ -6300,7 +6350,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ CLOUD_ENHANCEMENT = 1 } @@ -6311,7 +6360,6 @@ declare namespace photoAccessHelper { * @interface PhotoAssetChangeInfos * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ interface PhotoAssetChangeInfos { /** @@ -6320,7 +6368,6 @@ declare namespace photoAccessHelper { * @type { NotifyChangeType } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ type: NotifyChangeType; @@ -6330,7 +6377,6 @@ declare namespace photoAccessHelper { * @type { PhotoAssetChangeData[] | null } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ assetChangeDatas: PhotoAssetChangeData[] | null; @@ -6340,7 +6386,6 @@ declare namespace photoAccessHelper { * @type { boolean } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ isForRecheck: boolean; } @@ -6351,7 +6396,6 @@ declare namespace photoAccessHelper { * @interface PhotoAssetChangeData * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ interface PhotoAssetChangeData { /** @@ -6360,7 +6404,6 @@ declare namespace photoAccessHelper { * @type { PhotoAssetChangeInfo | null } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ assetBeforeChange: PhotoAssetChangeInfo | null; @@ -6370,7 +6413,6 @@ declare namespace photoAccessHelper { * @type { PhotoAssetChangeInfo | null } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ assetAfterChange: PhotoAssetChangeInfo | null; @@ -6380,7 +6422,6 @@ declare namespace photoAccessHelper { * @type { boolean } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ isContentChanged: boolean; @@ -6390,7 +6431,6 @@ declare namespace photoAccessHelper { * @type { boolean } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ isDeleted: boolean; @@ -6401,7 +6441,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ thumbnailChangeStatus: ThumbnailChangeStatus; @@ -6412,7 +6451,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ version: number; } @@ -6423,7 +6461,6 @@ declare namespace photoAccessHelper { * @interface PhotoAssetChangeInfo * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ interface PhotoAssetChangeInfo { /** @@ -6432,7 +6469,6 @@ declare namespace photoAccessHelper { * @type { string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ uri: string; @@ -6442,7 +6478,6 @@ declare namespace photoAccessHelper { * @type { PhotoType } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ mediaType: PhotoType; @@ -6452,7 +6487,6 @@ declare namespace photoAccessHelper { * @type { string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumUri: string; @@ -6463,7 +6497,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ fileId: number; @@ -6474,7 +6507,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ dateDay: string; @@ -6485,7 +6517,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ isFavorite: boolean; @@ -6496,7 +6527,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ isHidden: boolean; @@ -6507,7 +6537,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ strongAssociation: StrongAssociationType; @@ -6518,7 +6547,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ thumbnailVisible: ThumbnailVisibility; @@ -6529,7 +6557,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ dateTrashedMs: number; @@ -6540,7 +6567,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ dateAddedMs: number; @@ -6551,7 +6577,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ dateTakenMs: number; } @@ -6562,7 +6587,6 @@ declare namespace photoAccessHelper { * @interface AlbumChangeInfos * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ interface AlbumChangeInfos { /** @@ -6571,7 +6595,6 @@ declare namespace photoAccessHelper { * @type { NotifyChangeType } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ type: NotifyChangeType; @@ -6581,7 +6604,6 @@ declare namespace photoAccessHelper { * @type { AlbumChangeData[] | null } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumChangeDatas: AlbumChangeData[] | null; @@ -6591,7 +6613,6 @@ declare namespace photoAccessHelper { * @type { boolean } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ isForRecheck: boolean; } @@ -6602,7 +6623,6 @@ declare namespace photoAccessHelper { * @interface AlbumChangeData * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ interface AlbumChangeData { /** @@ -6611,7 +6631,6 @@ declare namespace photoAccessHelper { * @type { AlbumChangeInfo | null } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumBeforeChange: AlbumChangeInfo | null; @@ -6621,20 +6640,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 +6650,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ version: number; } @@ -6653,7 +6660,6 @@ declare namespace photoAccessHelper { * @interface AlbumChangeInfo * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ interface AlbumChangeInfo { /** @@ -6662,7 +6668,6 @@ declare namespace photoAccessHelper { * @type { AlbumType } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumType: AlbumType; @@ -6672,7 +6677,6 @@ declare namespace photoAccessHelper { * @type { AlbumSubtype } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumSubtype: AlbumSubtype; @@ -6682,7 +6686,6 @@ declare namespace photoAccessHelper { * @type { string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumName: string; @@ -6692,7 +6695,6 @@ declare namespace photoAccessHelper { * @type { string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ albumUri: string; @@ -6702,7 +6704,6 @@ declare namespace photoAccessHelper { * @type { number } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ imageCount: number; @@ -6712,7 +6713,6 @@ declare namespace photoAccessHelper { * @type { number } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ videoCount: number; @@ -6722,7 +6722,6 @@ declare namespace photoAccessHelper { * @type { number } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ count: number; @@ -6732,7 +6731,6 @@ declare namespace photoAccessHelper { * @type { string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 20 - * @arkts 1.1&1.2 */ coverUri: string; @@ -6743,7 +6741,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ hiddenCount: number; @@ -6754,7 +6751,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ hiddenCoverUri: string; @@ -6765,7 +6761,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ isCoverChanged: boolean; @@ -6776,7 +6771,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ isHiddenCoverChanged: boolean; @@ -6787,7 +6781,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ coverInfo?: PhotoAssetChangeInfo; @@ -6798,7 +6791,6 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 20 - * @arkts 1.1&1.2 */ hiddenCoverInfo?: PhotoAssetChangeInfo; } @@ -6809,7 +6801,8 @@ declare namespace photoAccessHelper { * @interface GalleryFormInfo * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface GalleryFormInfo { /** @@ -6818,7 +6811,8 @@ declare namespace photoAccessHelper { * @type { string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ formId: string; /** @@ -6827,7 +6821,8 @@ declare namespace photoAccessHelper { * @type { ?Array } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ assetUris?: Array; } @@ -6868,7 +6863,7 @@ declare namespace photoAccessHelper { /** * Enumeration types of data change. * - * @enum { number } NotifyType + * @enum { int } NotifyType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 @@ -6994,7 +6989,8 @@ declare namespace photoAccessHelper { * @type { Array } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ sharedPhotoAssets: Array; /** @@ -7003,7 +6999,8 @@ declare namespace photoAccessHelper { * @type { Array } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ sharedAlbumAssets: Array; /** @@ -7012,7 +7009,8 @@ declare namespace photoAccessHelper { * @type { Array } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ sharedExtraPhotoAssets: Array; } @@ -7127,7 +7125,7 @@ declare namespace photoAccessHelper { /** * Enumeration type of filter operator. * - * @enum { number } FilterOperator + * @enum { int } FilterOperator * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice * @since 19 @@ -7266,14 +7264,14 @@ declare namespace photoAccessHelper { /** * Maximum number of images for a single selection. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 */ /** * Maximum number of images for a single selection. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice * @since 11 @@ -7282,12 +7280,12 @@ declare namespace photoAccessHelper { * Maximum number of images for a single selection. * Move from class PhotoSelectOptions to it's base class BaseSelectOptions * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice * @since 12 */ - maxSelectNumber?: number; + maxSelectNumber?: int; /** * Support search. @@ -7614,7 +7612,8 @@ declare namespace photoAccessHelper { * @type { ?RecommendationType } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ recommendationType?: RecommendationType; @@ -7625,7 +7624,8 @@ declare namespace photoAccessHelper { * @type { ?TextContextInfo } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ textContextInfo?: TextContextInfo; } @@ -7896,7 +7896,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(compatibleFormat: string, formatVersion: string); @@ -7937,7 +7938,7 @@ declare namespace photoAccessHelper { /** * Enumerates the types of the resources to write. * - * @enum { number } ResourceType + * @enum { int } ResourceType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} @@ -7989,7 +7990,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PRIVATE_MOVING_PHOTO_METADATA = 5 } @@ -7997,7 +7999,7 @@ declare namespace photoAccessHelper { /** * Enumerates the types of image files to save. * - * @enum { number } ImageFileType + * @enum { int } ImageFileType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 @@ -8025,7 +8027,7 @@ declare namespace photoAccessHelper { /** * Enumeration of moving photo effect mode. * - * @enum { number } MovingPhotoEffectMode + * @enum { int } MovingPhotoEffectMode * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'12','1.2':'20'} @@ -8106,7 +8108,7 @@ declare namespace photoAccessHelper { /** * Enumerates the types of segmented video enhancement. * - * @enum { number } VideoEnhancementType + * @enum { int } VideoEnhancementType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} @@ -8386,8 +8388,8 @@ declare namespace photoAccessHelper { /** * Sets location information. * - * @param { number } longitude - Longitude. - * @param { number } latitude - Latitude. + * @param { double } longitude - Longitude. + * @param { double } latitude - Latitude. * @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. @@ -8397,7 +8399,7 @@ declare namespace photoAccessHelper { * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - setLocation(longitude: number, latitude: number): void; + setLocation(longitude: double, latitude: double): void; /** * Sets the media asset title. @@ -8442,7 +8444,7 @@ declare namespace photoAccessHelper { * Obtains the handler used for writing a file to cache. * * @permission ohos.permission.WRITE_IMAGEVIDEO - * @returns { Promise } Returns the write cache handler + * @returns { Promise } Returns the write cache handler * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. @@ -8452,7 +8454,7 @@ declare namespace photoAccessHelper { * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - getWriteCacheHandler(): Promise; + getWriteCacheHandler(): Promise; /** * Adds a resource using fileUri. @@ -8573,14 +8575,15 @@ declare namespace photoAccessHelper { /** * Sets the orientation of this image. * - * @param { number } orientation - Rotation angle of the image to set. The value can only be 0, 90, 180, or 270. + * @param { int } orientation - Rotation angle of the image to set. The value can only be 0, 90, 180, or 270. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - setOrientation(orientation: number): void; + setOrientation(orientation: int): void; /** * Set video enhancement attribute @@ -8630,7 +8633,8 @@ declare namespace photoAccessHelper { * @static * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ static deleteLocalAssetsPermanently(context: Context, assets: Array): Promise; @@ -8735,7 +8739,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ setIsRecentShow(isRencentShow: boolean): void; } @@ -9000,7 +9005,7 @@ declare namespace photoAccessHelper { /** * Set display level of the portrait album * - * @param { number } displayLevel - The level of display interface for portrait albums, such as homepage and more pages + * @param { int } displayLevel - The level of display interface for portrait albums, such as homepage and more pages * @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. @@ -9010,7 +9015,7 @@ declare namespace photoAccessHelper { * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - setDisplayLevel(displayLevel: number): void; + setDisplayLevel(displayLevel: int): void; /** * Remove assets from the smart album @@ -9100,13 +9105,13 @@ declare namespace photoAccessHelper { /** * File id of photo asset * - * @type { number } + * @type { int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - fileId: number; + fileId: int; /** * URI of photo asset * @@ -9150,83 +9155,83 @@ declare namespace photoAccessHelper { /** * Size of photo asset * - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - size: number; + size: long; /** * Added date of photo asset * - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - dateAdded: number; + dateAdded: long; /** * Modify date of photo asset * - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - dateModified: number; + dateModified: long; /** * Duration of video photo asset * - * @type { number } + * @type { int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - duration: number; + duration: int; /** * Width of photo asset * - * @type { number } + * @type { int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - width: number; + width: int; /** * Height of photo asset * - * @type { number } + * @type { int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - height: number; + height: int; /** * DateTaken of photo asset * - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - dateTaken: number; + dateTaken: long; /** * Orientation of photo asset * - * @type { number } + * @type { int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - orientation: number; + orientation: int; /** * Favorite state of photo asset * @@ -9260,13 +9265,13 @@ declare namespace photoAccessHelper { /** * Trashed date of photo asset * - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - dateTrashed: number; + dateTrashed: long; /** * Hidden state of photo asset * @@ -9340,33 +9345,33 @@ declare namespace photoAccessHelper { /** * Added date of photo asset in milliseconds * - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - dateAddedMs: number; + dateAddedMs: long; /** * Modified time of the asset in milliseconds * - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - dateModifiedMs: number; + dateModifiedMs: long; /** * Trashed time of the asset in milliseconds * - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - dateTrashedMs: number; + dateTrashedMs: long; /** * Subtype of photo asset * @@ -9430,19 +9435,21 @@ declare namespace photoAccessHelper { /** * modified time of thumbnail status * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ - thumbnailModifiedMs?: number; + thumbnailModifiedMs?: long; /** * visibility of thumbnails * * @type { ThumbnailVisibility } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ thumbnailVisible: ThumbnailVisibility; } @@ -9453,25 +9460,28 @@ declare namespace photoAccessHelper { * @interface SharedAlbumAsset * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface SharedAlbumAsset { /** * album id of album asset * - * @type { number } + * @type { int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ - albumId: number; + albumId: int; /** * type of album asset * * @type { AlbumType } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ albumType: AlbumType; /** @@ -9480,7 +9490,8 @@ declare namespace photoAccessHelper { * @type { AlbumSubtype } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ albumSubType: AlbumSubtype; /** @@ -9489,7 +9500,8 @@ declare namespace photoAccessHelper { * @type { string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ albumName: string; /** @@ -9498,36 +9510,40 @@ declare namespace photoAccessHelper { * @type { string } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ coverUri: string; /** * number of assets in this album * - * @type { number } + * @type { int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ - count: number; + count: int; /** * number of photo assets in this album * - * @type { number } + * @type { int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ - imageCount: number; + imageCount: int; /** * number of video assets in this album * - * @type { number } + * @type { int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ - videoCount: number; + videoCount: int; } /** @@ -9627,7 +9643,7 @@ declare namespace photoAccessHelper { /** * Enumerates the types of the highlights album information. * - * @enum { number } HighlightAlbumInfoType + * @enum { int } HighlightAlbumInfoType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'12','1.2':'20'} @@ -9657,7 +9673,7 @@ declare namespace photoAccessHelper { /** * Enumerates the user behavior types of the highlights album. * - * @enum { number } HighlightUserActionType + * @enum { int } HighlightUserActionType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'12','1.2':'20'} @@ -9759,7 +9775,7 @@ declare namespace photoAccessHelper { /** * Enumerates thumbnail types. * - * @enum { number } ThumbnailType + * @enum { int } ThumbnailType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} @@ -9792,7 +9808,8 @@ declare namespace photoAccessHelper { * @extends MediaAlbumChangeRequest * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ class MediaAnalysisAlbumChangeRequest extends MediaAlbumChangeRequest { /** @@ -9804,7 +9821,8 @@ declare namespace photoAccessHelper { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(album: Album); @@ -9813,7 +9831,7 @@ declare namespace photoAccessHelper { * * @permission ohos.permission.WRITE_IMAGEVIDEO * @param { Array } assets - Assets in the album for which the sequence needs to be set. - * @param { Array } position - Sequence of assets in the album. + * @param { Array } position - Sequence of assets in the album. * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 202 - Called by non-system application * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -9822,9 +9840,10 @@ declare namespace photoAccessHelper { *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - setOrderPosition(assets: Array, position: Array): void; + setOrderPosition(assets: Array, position: Array): void; } /** @@ -9832,7 +9851,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ class AnalysisAlbum { /** @@ -9844,7 +9864,8 @@ declare namespace photoAccessHelper { *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(album: Album); /** @@ -9852,7 +9873,7 @@ declare namespace photoAccessHelper { * * @permission ohos.permission.READ_IMAGEVIDEO * @param { Array } assets - Assets in the album whose sequence needs to be obtained. - * @returns { Promise> } Returns the order of positions of assets + * @returns { Promise> } Returns the order of positions of assets * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 202 - Called by non-system application * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -9861,9 +9882,10 @@ declare namespace photoAccessHelper { *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - getOrderPosition(assets: Array): Promise>; + getOrderPosition(assets: Array): Promise>; } /** @@ -9885,7 +9907,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(album: Album); @@ -9902,7 +9925,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getHighlightAlbumInfo(type: HighlightAlbumInfoType): Promise; @@ -9919,7 +9943,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getHighlightResource(resourceUri: string): Promise; @@ -9928,7 +9953,7 @@ declare namespace photoAccessHelper { * * @permission ohos.permission.WRITE_IMAGEVIDEO * @param { HighlightUserActionType } type - Type of the user behavior data to set. - * @param { number } actionData - Behavior data. + * @param { int } actionData - Behavior data. * @returns { Promise } Returns void * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 202 - Called by non-system application @@ -9937,9 +9962,10 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setHighlightUserActionData(type: HighlightUserActionType, actionData: number): Promise; + setHighlightUserActionData(type: HighlightUserActionType, actionData: int): Promise; /** * Set highlight sub title @@ -9955,7 +9981,8 @@ declare namespace photoAccessHelper { *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ setSubTitle(subTitle: string): Promise; @@ -9965,7 +9992,7 @@ declare namespace photoAccessHelper { * @permission ohos.permission.WRITE_IMAGEVIDEO * @param { Context } context - Context of the ability instance. * @param { Array } albums - Array of highlight albums to delete. - * @returns { Promise } Returns result of delete highlight album + * @returns { Promise } Returns result of delete highlight album * @throws { BusinessError } 201 - Permission denied * @throws { BusinessError } 202 - Called by non-system application * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -9975,15 +10002,16 @@ declare namespace photoAccessHelper { * @static * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - static deleteHighlightAlbums(context: Context, albums: Array): Promise; + static deleteHighlightAlbums(context: Context, albums: Array): Promise; } /** * Enumerates the cloud enhancement task states, which are returned by CloudEnhancementTaskState. * - * @enum { number } CloudEnhancementTaskStage + * @enum { int } CloudEnhancementTaskStage * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} @@ -10080,47 +10108,47 @@ declare namespace photoAccessHelper { /** * Indicates the transferred file size. * - * @type { ?number } + * @type { ?int } * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - readonly transferredFileSize?: number; + readonly transferredFileSize?: int; /** * Indicates the total file size. * - * @type { ?number } + * @type { ?int } * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - readonly totalFileSize?: number; + readonly totalFileSize?: int; /** * Indicates the expected duration of cloud enhancement queue time. * - * @type { ?number } + * @type { ?int } * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - readonly expectedDuration?: number; + readonly expectedDuration?: int; /** * Status code when failed in cloud enhancement. * - * @type { ?number } + * @type { ?int } * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - readonly statusCode?: number; + readonly statusCode?: int; } /** @@ -10165,7 +10193,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ submitCloudEnhancementTasks(photoAssets: Array, hasCloudWatermark: boolean): Promise; @@ -10176,7 +10205,7 @@ declare namespace photoAccessHelper { * @param { Array } photoAssets - PhotoAsset to enhance. * @param { boolean } hasCloudWatermark - Whether to add a cloud watermark to the enhanced image. * The value true means to add the watermark, and false means the opposite. - * @param { number } [triggerMode] - Trigger mode of the cloud enhancement task. + * @param { int } [triggerMode] - Trigger mode of the cloud enhancement task. * 0: manually triggered. 1: automatically triggered. The default value is 0. * @returns { Promise } Returns void * @throws { BusinessError } 201 - Permission denied @@ -10186,12 +10215,13 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ submitCloudEnhancementTasks( photoAssets: Array, hasCloudWatermark: boolean, - triggerMode?: number + triggerMode?: int ): Promise; /** @@ -10207,7 +10237,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ prioritizeCloudEnhancementTask(photoAsset: PhotoAsset): Promise; @@ -10224,7 +10255,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ cancelCloudEnhancementTasks(photoAssets: Array): Promise; @@ -10238,7 +10270,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ cancelAllCloudEnhancementTasks(): Promise; @@ -10255,7 +10288,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ queryCloudEnhancementTaskState(photoAsset: PhotoAsset): Promise; @@ -10269,7 +10303,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ syncCloudEnhancementTaskStatus(): Promise; @@ -10286,7 +10321,8 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ getCloudEnhancementPair(asset: PhotoAsset): Promise; } @@ -10294,7 +10330,7 @@ declare namespace photoAccessHelper { /** * Enumerates the cloud enhancement states. * - * @enum { number } CloudEnhancementState + * @enum { int } CloudEnhancementState * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} @@ -10342,10 +10378,11 @@ declare namespace photoAccessHelper { /** * Enumerates the statuses of tasks used for downloading cloud media assets. * - * @enum { number } CloudMediaAssetTaskStatus + * @enum { int } CloudMediaAssetTaskStatus * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enum CloudMediaAssetTaskStatus { /** @@ -10353,7 +10390,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ DOWNLOADING = 0, /** @@ -10361,7 +10399,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ PAUSED = 1, /** @@ -10369,7 +10408,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ IDLE = 2 } @@ -10377,10 +10417,11 @@ declare namespace photoAccessHelper { /** * Enumerates the reasons why a cloud media asset download task is paused. * - * @enum { number } CloudMediaTaskPauseCause + * @enum { int } CloudMediaTaskPauseCause * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enum CloudMediaTaskPauseCause { /** @@ -10388,7 +10429,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ NO_PAUSE = 0, /** @@ -10396,7 +10438,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ TEMPERATURE_LIMIT = 1, /** @@ -10404,7 +10447,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ ROM_LIMIT = 2, /** @@ -10412,7 +10456,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ NETWORK_FLOW_LIMIT = 3, /** @@ -10420,7 +10465,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ WIFI_UNAVAILABLE = 4, /** @@ -10428,7 +10474,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ POWER_LIMIT = 5, /** @@ -10436,7 +10483,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND_TASK_UNAVAILABLE = 6, /** @@ -10444,7 +10492,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ FREQUENT_USER_REQUESTS = 7, /** @@ -10452,7 +10501,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CLOUD_ERROR = 8, /** @@ -10460,7 +10510,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ USER_PAUSED = 9 } @@ -10472,7 +10523,8 @@ declare namespace photoAccessHelper { * @interface CloudMediaAssetStatus * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface CloudMediaAssetStatus { /** @@ -10482,7 +10534,8 @@ declare namespace photoAccessHelper { * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ readonly taskStatus: CloudMediaAssetTaskStatus; /** @@ -10493,7 +10546,8 @@ declare namespace photoAccessHelper { * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ readonly taskInfo: string; /** @@ -10503,7 +10557,8 @@ declare namespace photoAccessHelper { * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ readonly errorCode: CloudMediaTaskPauseCause; } @@ -10511,10 +10566,11 @@ declare namespace photoAccessHelper { /** * Enumerates the types of download tasks. * - * @enum { number } CloudMediaDownloadType + * @enum { int } CloudMediaDownloadType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enum CloudMediaDownloadType { /** @@ -10522,7 +10578,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ DOWNLOAD_FORCE = 0, /** @@ -10530,7 +10587,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ DOWNLOAD_GENTLE = 1 } @@ -10538,10 +10596,11 @@ declare namespace photoAccessHelper { /** * Enumerates the modes used for deleting cloud media assets. * - * @enum { number } CloudMediaRetainType + * @enum { int } CloudMediaRetainType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enum CloudMediaRetainType { /** @@ -10549,7 +10608,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ RETAIN_FORCE = 0 } @@ -10560,7 +10620,8 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ class CloudMediaAssetManager { /** @@ -10576,7 +10637,8 @@ declare namespace photoAccessHelper { * @static * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ static getCloudMediaAssetManagerInstance(context: Context): CloudMediaAssetManager; @@ -10594,7 +10656,8 @@ declare namespace photoAccessHelper { *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ startDownloadCloudMedia(downloadType: CloudMediaDownloadType): Promise; @@ -10609,7 +10672,8 @@ declare namespace photoAccessHelper { *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ pauseDownloadCloudMedia(): Promise; @@ -10624,7 +10688,8 @@ declare namespace photoAccessHelper { *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ cancelDownloadCloudMedia(): Promise; @@ -10642,7 +10707,8 @@ declare namespace photoAccessHelper { *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ retainCloudMediaAsset(retainType: CloudMediaRetainType): Promise; @@ -10657,7 +10723,8 @@ declare namespace photoAccessHelper { *
Possible causes: 1. Database corrupted; 2. The file system is abnormal; 3. The IPC request timed out. * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getCloudMediaAssetStatus(): Promise; } diff --git a/api/@ohos.file.statvfs.d.ts b/api/@ohos.file.statvfs.d.ts index 870676443a1bb0be163bd94503ef369f5695de6f..b844c7dd5f6c5aade5849e22df20113bda01a3a6 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 { /** @@ -61,7 +62,7 @@ declare namespace statfs { * Get the number of free bytes on the specified path. * * @param { string } path - path - * @returns { Promise } return Promise + * @returns { Promise } return Promise * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error @@ -78,8 +79,9 @@ declare namespace statfs { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ - function getFreeSize(path: string): Promise; + function getFreeSize(path: string): Promise; /** * Get the number of free bytes on the specified path. @@ -106,7 +108,7 @@ declare namespace statfs { * Get the number of free bytes on the specified path. * * @param { string } path - path - * @param { AsyncCallback } [callback] - callback + * @param { AsyncCallback } [callback] - callback * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error @@ -123,8 +125,9 @@ declare namespace statfs { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ - function getFreeSize(path: string, callback: AsyncCallback): void; + function getFreeSize(path: string, callback: AsyncCallback): void; /** * Get the number of free bytes on the specified path with sync interface. @@ -151,7 +154,7 @@ declare namespace statfs { * Get the number of free bytes on the specified path with sync interface. * * @param { string } path - path - * @returns { number } return the number of free bytes on the specified path + * @returns { long } return the number of free bytes on the specified path * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error @@ -168,8 +171,9 @@ declare namespace statfs { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ - function getFreeSizeSync(path: string): number; + function getFreeSizeSync(path: string): long; /** * Get the number of total bytes on the specified path. @@ -196,7 +200,7 @@ declare namespace statfs { * Get the number of total bytes on the specified path. * * @param { string } path - path - * @returns { Promise } return Promise + * @returns { Promise } return Promise * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error @@ -213,8 +217,9 @@ declare namespace statfs { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ - function getTotalSize(path: string): Promise; + function getTotalSize(path: string): Promise; /** * Get the number of total bytes on the specified path. @@ -241,7 +246,7 @@ declare namespace statfs { * Get the number of total bytes on the specified path. * * @param { string } path - path - * @param { AsyncCallback } [callback] - callback + * @param { AsyncCallback } [callback] - callback * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error @@ -258,8 +263,9 @@ declare namespace statfs { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ - function getTotalSize(path: string, callback: AsyncCallback): void; + function getTotalSize(path: string, callback: AsyncCallback): void; /** * Get the number of total bytes on the specified path with sync interface. @@ -286,7 +292,7 @@ declare namespace statfs { * Get the number of total bytes on the specified path with sync interface. * * @param { string } path - path - * @returns { number } return the number of total bytes + * @returns { long } return the number of total bytes * @throws { BusinessError } 13900002 - No such file or directory * @throws { BusinessError } 13900004 - Interrupted system call * @throws { BusinessError } 13900005 - I/O error @@ -303,8 +309,9 @@ declare namespace statfs { * @syscap SystemCapability.FileManagement.File.FileIO * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ - function getTotalSizeSync(path: string): number; + function getTotalSizeSync(path: string): long; } export default statfs; diff --git a/api/@ohos.fileshare.d.ts b/api/@ohos.fileshare.d.ts index ec9b89fe1afc1655b4478620db574d7e8154c3bc..aa44cc53f5dec75c5b65bb338d0c190f1d43710d 100644 --- a/api/@ohos.fileshare.d.ts +++ b/api/@ohos.fileshare.d.ts @@ -410,7 +410,7 @@ declare namespace fileShare { * Check permissions for the path. * * @permission ohos.permission.CHECK_SANDBOX_POLICY - * @param { number } tokenID - Token ID of the application. + * @param { int } tokenID - Token ID of the application. * @param { Array } policies - Policy information to check on paths. * @param { PolicyType } policyType - Persistent or temporary type. * @returns { Promise> } Returns the permission state of paths. @@ -423,7 +423,7 @@ declare namespace fileShare { * @systemapi * @since 15 */ - function checkPathPermission(tokenID: number, policies: Array, policyType: PolicyType): Promise>; + function checkPathPermission(tokenID: int, policies: Array, policyType: PolicyType): Promise>; } export default fileShare; 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.static.d.ets b/api/@ohos.font.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..45c3c8010b099268c22a13b439282d2468f4fee4 --- /dev/null +++ b/api/@ohos.font.static.d.ets @@ -0,0 +1,291 @@ +/* + * 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 + * @arkts 1.2 + */ +import { Resource } from './global/resource'; + +/** + * @namespace font + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare namespace font { + /** + * @typedef FontOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface FontOptions { + /** + * The font name to register. + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + familyName: string | Resource; + + /** + * The path of the font file. + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + familySrc: string | Resource; + } + /** + * @typedef FontInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface FontInfo { + /** + * The path of the font file. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + path: string; + /** + * The name of postscript. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + postScriptName: string; + /** + * The font name. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fullName: string; + /** + * A set of fonts with a common design. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + family: string; + /** + * A subset of the font family. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + subfamily: string; + /** + * The weight of the font. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + weight: number; + /** + * The width of the font style. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + width: number; + /** + * Whether it is italic. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + italic: boolean; + /** + * Whether it is compact. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + monoSpace: boolean; + /** + * Whether symbol fonts are supported. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + symbolic: boolean; + } + /** + * @typedef UIFontConfig + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface UIFontConfig { + /** + * The paths of system font files. + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontDir: Array; + /** + * The generic font info. + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + generic: Array; + /** + * The fallback font info. + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fallbackGroups: Array; + } + /** + * @typedef UIFontGenericInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface UIFontGenericInfo { + /** + * Name of the font set. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + family: string; + /** + * Alias info of the font set. + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + alias: Array; + /** + * Adjust info of the font set. + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + adjust: Array; + } + /** + * @typedef UIFontAliasInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface UIFontAliasInfo { + /** + * Font set name. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + 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 20 + */ + weight: number; + } + /** + * @typedef UIFontAdjustInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface UIFontAdjustInfo { + /** + * Original weight of the font + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + weight: number; + /** + * Font weight displayed in the app + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + to: number; + } + /** + * @typedef UIFontFallbackGroupInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + 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 20 + */ + fontSetName: string; + /** + * Fallback font list related. + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fallback: Array; + } + /** + * @typedef UIFontFallbackInfo + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interface UIFontFallbackInfo { + /** + * Language that font set support. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + language: string; + /** + * Font name related. + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + family: string; + } + /** + * Get font details according to the font name. + * + * @returns { UIFontConfig } Returns the ui font config + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + function getUIFontConfig(): UIFontConfig; +} +export default font; diff --git a/api/@ohos.fontManager.d.ts b/api/@ohos.fontManager.d.ts index 1ce457179ab2d403c5f19952f1d859cd12fb29fc..8f010e87fffd6b004eaead77fbc0855e1100ad50 100644 --- a/api/@ohos.fontManager.d.ts +++ b/api/@ohos.fontManager.d.ts @@ -24,7 +24,8 @@ * @namespace fontManager * @syscap SystemCapability.Global.FontManager * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace fontManager { /** @@ -32,7 +33,7 @@ declare namespace fontManager { * * @permission ohos.permission.UPDATE_FONT * @param { string } path - path indicates the font path. - * @returns { Promise } - Number indicates the font installation result. + * @returns { Promise } - Number indicates the font installation result. * 0 - Install successful. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Non-system application. @@ -44,16 +45,17 @@ declare namespace fontManager { * @throws { BusinessError } 31100106 - Other error. * @syscap SystemCapability.Global.FontManager * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ - function installFont(path: string): Promise; + function installFont(path: string): Promise; /** * Uninstalls the specified path font. * * @permission ohos.permission.UPDATE_FONT * @param { string } fullName - fullName indicates the font name. - * @returns { Promise } - number indicates the font uninstallation result. + * @returns { Promise } - number indicates the font uninstallation result. * 0 - Uninstall successful. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Non-system application. @@ -62,8 +64,9 @@ declare namespace fontManager { * @throws { BusinessError } 31100109 - Other error. * @syscap SystemCapability.Global.FontManager * @systemapi - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ - function uninstallFont(fullName: string): Promise; + function uninstallFont(fullName: string): Promise; } export default fontManager; \ No newline at end of file diff --git a/api/@ohos.geoLocationManager.d.ts b/api/@ohos.geoLocationManager.d.ts index d5413e5ba80581a42ab472f4701195a744a2580c..6e00ad602d8f547d7c488d804de7dd9475b3e73e 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; @@ -1403,80 +1432,89 @@ 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 { /** * Number of satellites. * - * @type { number } + * @type { int } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - satellitesNumber: number; + satellitesNumber: int; /** * Satellite ID array. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - satelliteIds: Array; + satelliteIds: Array; /** * Carrier to noise density array. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - carrierToNoiseDensitys: Array; + carrierToNoiseDensitys: Array; /** * Satellite altitude array. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - altitudes: Array; + altitudes: Array; /** * Satellite azimuth array. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - azimuths: Array; + azimuths: Array; /** * Satellite carrier frequency array. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - carrierFrequencies: Array; + carrierFrequencies: Array; /** * Satellite constellation type array. * * @type { ?Array } * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ satelliteConstellation?: Array; /** * Satellite additional information array. * - * @type { ?Array } + * @type { ?Array } * @syscap SystemCapability.Location.Location.Gnss - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - satelliteAdditionalInfo?: Array; + satelliteAdditionalInfo?: Array; } /** @@ -1484,24 +1522,27 @@ 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 { /** * GNSS cache location report period. * - * @type { number } + * @type { int } * @syscap SystemCapability.Location.Location.Gnss - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - reportingPeriodSec: number; + reportingPeriodSec: int; /** * Indicates whether to wake up the listener when the GNSS cache location queue is full. * * @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 +1678,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 +1687,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,36 +1697,40 @@ 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; /** * Latitude for reverse geocoding query. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - latitude: number; + latitude: double; /** * Longitude for reverse geocoding query. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - longitude: number; + longitude: double; /** * Indicates the maximum number of addresses returned by reverse geocoding query. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - maxItems?: number; + maxItems?: int; } /** @@ -1691,7 +1738,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 +1747,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 +1757,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,54 +1767,60 @@ 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; /** * Indicates the maximum number of geocode query results. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - maxItems?: number; + maxItems?: int; /** * Indicates the minimum latitude for geocoding query results. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - minLatitude?: number; + minLatitude?: double; /** * Indicates the minimum longitude for geocoding query results. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - minLongitude?: number; + minLongitude?: double; /** * Indicates the maximum latitude for geocoding query results. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - maxLatitude?: number; + maxLatitude?: double; /** * Indicates the maximum longitude for geocoding query results. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - maxLongitude?: number; + maxLongitude?: double; } /** @@ -1772,7 +1828,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 { /** @@ -1780,22 +1837,24 @@ declare namespace geoLocationManager { * A positive value indicates north latitude, * and a negative value indicates south latitude. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - latitude?: number; + latitude?: double; /** * Indicates longitude information. * A positive value indicates east longitude , * and a negative value indicates west longitude. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - longitude?: number; + longitude?: double; /** * Indicates language used for the location description. @@ -1803,7 +1862,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 +1872,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 +1882,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 +1892,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 +1902,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 +1912,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 +1922,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 +1932,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 +1942,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 +1952,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 +1962,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 +1972,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 +1982,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 +1992,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,18 +2002,20 @@ 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; /** * Indicates the amount of additional descriptive information. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Location.Location.Geocoder - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - descriptionsSize?: number; + descriptionsSize?: int; /** * Indicates whether it is an mock GeoAddress @@ -1948,7 +2023,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 +2042,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 +2059,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,60 +2077,64 @@ 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; /** * Location report interval. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Location.Location.Core * @since 9 */ /** * Location report interval. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - timeInterval?: number; + timeInterval?: int; /** * Location report distance interval. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Core * @since 9 */ /** * Location report distance interval. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - distanceInterval?: number; + distanceInterval?: double; /** * Accuracy requirements for reporting locations. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Core * @since 9 */ /** * Accuracy requirements for reporting locations. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - maxAccuracy?: number; + maxAccuracy?: double; } /** @@ -2111,38 +2193,38 @@ declare namespace geoLocationManager { /** * Accuracy requirements for reporting locations. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Core * @since 9 */ /** * Accuracy requirements for reporting locations. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - maxAccuracy?: number; + maxAccuracy?: double; /** * Timeout interval of a single location request. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Location.Location.Core * @since 9 */ /** * Timeout interval of a single location request. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - timeoutMs?: number; + timeoutMs?: int; } /** @@ -2178,18 +2260,20 @@ 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 { /** * Location report interval, in seconds. * - * @type { number } + * @type { int } * @syscap SystemCapability.Location.Location.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - interval: number; + interval: int; /** * Location scenario. You can select a user activity scenario or power consumption scenario. @@ -2197,7 +2281,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 +2294,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; @@ -2248,13 +2334,13 @@ declare namespace geoLocationManager { /** * Timeout of a single location request, in milliseconds. * - * @type { number } + * @type { int } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - locatingTimeoutMs: number; + locatingTimeoutMs: int; /** * Indicates whether to obtain POI information near the current location. @@ -2289,7 +2375,7 @@ declare namespace geoLocationManager { * A positive value indicates north latitude, * and a negative value indicates south latitude. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Core * @since 9 */ @@ -2298,20 +2384,20 @@ declare namespace geoLocationManager { * A positive value indicates north latitude, * and a negative value indicates south latitude. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - latitude: number; + latitude: double; /** * Indicates Longitude information. * A positive value indicates east longitude , * and a negative value indicates west longitude. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Core * @since 9 */ @@ -2320,121 +2406,121 @@ declare namespace geoLocationManager { * A positive value indicates east longitude , * and a negative value indicates west longitude. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - longitude: number; + longitude: double; /** * Indicates location altitude, in meters. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Core * @since 9 */ /** * Indicates location altitude, in meters. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - altitude: number; + altitude: double; /** * Indicates location accuracy, in meters. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Core * @since 9 */ /** * Indicates location accuracy, in meters. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - accuracy: number; + accuracy: double; /** * Indicates speed, in m/s. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Core * @since 9 */ /** * Indicates speed, in m/s. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - speed: number; + speed: double; /** * Indicates location timestamp in the UTC format. * - * @type { number } + * @type { long } * @syscap SystemCapability.Location.Location.Core * @since 9 */ /** * Indicates location timestamp in the UTC format. * - * @type { number } + * @type { long } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - timeStamp: number; + timeStamp: long; /** * Indicates direction information. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Core * @since 9 */ /** * Indicates direction information. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - direction: number; + direction: double; /** * Indicates location timestamp since boot. * - * @type { number } + * @type { long } * @syscap SystemCapability.Location.Location.Core * @since 9 */ /** * Indicates location timestamp since boot. * - * @type { number } + * @type { long } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - timeSinceBoot: number; + timeSinceBoot: long; /** * Indicates additional information. @@ -2468,20 +2554,20 @@ declare namespace geoLocationManager { /** * Indicates the amount of additional descriptive information. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Location.Location.Core * @since 9 */ /** * Indicates the amount of additional descriptive information. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - additionSize?: number; + additionSize?: int; /** * Indicates whether it is an mock location. @@ -2497,46 +2583,46 @@ declare namespace geoLocationManager { /** * Indicates vertical position accuracy in meters. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - altitudeAccuracy?: number; + altitudeAccuracy?: double; /** * Indicates speed accuracy in meter per seconds. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - speedAccuracy?: number; + speedAccuracy?: double; /** * Indicates direction accuracy in degrees. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - directionAccuracy?: number; + directionAccuracy?: double; /** * Time uncertainty Of timeSinceBoot in nanosecond. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - uncertaintyOfTimeSinceBoot?: number; + uncertaintyOfTimeSinceBoot?: long; /** * Indicates the source of the location. @@ -2565,7 +2651,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 +2661,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 +2672,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; @@ -2592,23 +2681,25 @@ declare namespace geoLocationManager { * Indicates the interval between scans. The unit is millisecond. * This parameter needs to be set only when scanning information is continuously monitored. * - * @type {?number} + * @type {?int} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - scanInterval?: number; + scanInterval?: int; /** * Indicates the timeout period of a single scan. The unit is millisecond. The default value is 10000. * This parameter needs to be set only when getLocatingRequiredData is used. * - * @type {?number} + * @type {?int} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - scanTimeout?: number; + scanTimeout?: int; } /** @@ -2616,7 +2707,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 +2717,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 +2728,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 +2739,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 +2749,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,39 +2760,43 @@ 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; /** * Received signal strength indicator (RSSI). * - * @type {number} + * @type {int} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - rssi: number; + rssi: int; /** * Frequency * - * @type {number} + * @type {int} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - frequency: number; + frequency: int; /** * Time stamp. * - * @type {number} + * @type {long} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - timestamp: number; + timestamp: long; } /** @@ -2705,7 +2805,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 +2815,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,29 +2826,32 @@ 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; /** * RSSI of the remote device. * - * @type {number} + * @type {int} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - rssi: number; + rssi: int; /** * Time stamp. * - * @type {number} + * @type {long} * @syscap SystemCapability.Location.Location.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - timestamp: number; + timestamp: long; } /** @@ -2754,7 +2859,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,25 +2868,28 @@ 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; /** * RSSI of the scanned device * - * @type { number } + * @type { int } * @syscap SystemCapability.Location.Location.Core - * @since 16 + * @since arkts {'1.1':'16','1.2':'20'} + * @arkts 1.1&1.2 */ - rssi: number; + rssi: int; /** * The raw data of broadcast packet * * @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 +2898,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 +2908,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; } @@ -2947,7 +3058,7 @@ declare namespace geoLocationManager { /** * Enum for the source of the location. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} @@ -2998,16 +3109,18 @@ declare namespace geoLocationManager { /** * Enum for coordinate system type. * - * @enum { number } + * @enum { int } * @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 +3128,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 } @@ -3023,10 +3137,11 @@ declare namespace geoLocationManager { /** * Enum for location icon status. * - * @enum { number } + * @enum { int } * @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 +3149,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 +3159,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 +3169,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 } @@ -3060,10 +3178,11 @@ declare namespace geoLocationManager { /** * Enum for location error code. * - * @enum { number } + * @enum { int } * @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 +3190,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 +3200,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 +3210,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 +3220,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 +3230,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 } @@ -3115,7 +3239,7 @@ declare namespace geoLocationManager { /** * Enum for geofence transition status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Geofence * @since 12 */ @@ -3148,16 +3272,18 @@ declare namespace geoLocationManager { /** * Enum for satellite constellation category. * - * @enum { number } + * @enum { int } * @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 +3291,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 +3300,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 +3309,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 +3318,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 +3327,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 +3336,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 +3345,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 } @@ -3221,16 +3354,18 @@ declare namespace geoLocationManager { /** * Enum for satellite additional information. * - * @enum { number } + * @enum { int } * @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 +3373,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 +3382,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 +3391,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 +3400,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 } @@ -3270,10 +3409,11 @@ declare namespace geoLocationManager { /** * Enum for user activity scenario. * - * @enum { number } + * @enum { int } * @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 +3421,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 +3431,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 +3441,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 +3451,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 } @@ -3316,7 +3460,7 @@ declare namespace geoLocationManager { /** * Enum for locating priority. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} @@ -3347,14 +3491,14 @@ declare namespace geoLocationManager { /** * Enum for location priority. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Core * @since 9 */ /** * Enum for location priority. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} @@ -3429,14 +3573,14 @@ declare namespace geoLocationManager { /** * Enum for location scenario. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Core * @since 9 */ /** * Enum for location scenario. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} @@ -3543,10 +3687,11 @@ declare namespace geoLocationManager { /** * Enum for power consumption scenario. * - * @enum { number } + * @enum { int } * @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 +3699,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 +3709,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 +3719,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 } @@ -3580,10 +3728,11 @@ declare namespace geoLocationManager { /** * Enum for location privacy type. * - * @enum { number } + * @enum { int } * @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 +3740,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 +3750,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 +3760,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 } @@ -3617,10 +3769,11 @@ declare namespace geoLocationManager { /** * Enum for sports type * - * @enum { number } + * @enum { int } * @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 +3781,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 +3791,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 +3801,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 +3839,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 +3848,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 +3858,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; } @@ -3708,16 +3867,18 @@ declare namespace geoLocationManager { /** * Enum for country code type. * - * @enum { number } + * @enum { int } * @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 +3886,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 +3895,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 +3904,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 } @@ -3749,10 +3913,11 @@ declare namespace geoLocationManager { /** * Enum for locating required data type. * - * @enum { number } + * @enum { int } * @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 +3925,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,7 +3935,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 */ BLUETOOTH } diff --git a/api/@ohos.graphics.colorSpaceManager.d.ts b/api/@ohos.graphics.colorSpaceManager.d.ts index 3357dfec7ac4ce0912e8a02ed73c817f45b25004..30116193297ab4f965d8a3fadf49606933d35afb 100644 --- a/api/@ohos.graphics.colorSpaceManager.d.ts +++ b/api/@ohos.graphics.colorSpaceManager.d.ts @@ -46,20 +46,20 @@ declare namespace colorSpaceManager { /** * Enumerates color space types. - * @enum { number } ColorSpace + * @enum { int } ColorSpace * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @since 9 */ /** * Enumerates color space types. - * @enum { number } ColorSpace + * @enum { int } ColorSpace * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since 11 */ /** * Enumerates color space types. - * @enum { number } ColorSpace + * @enum { int } ColorSpace * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @atomicservice @@ -597,123 +597,123 @@ declare namespace colorSpaceManager { interface ColorSpacePrimaries { /** * Coordinate value x of red color - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @since 9 */ /** * Coordinate value x of red color - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} */ - redX: number; + redX: double; /** * Coordinate value y of red color - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @since 9 */ /** * Coordinate value y of red color - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} */ - redY: number; + redY: double; /** * Coordinate value x of green color - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @since 9 */ /** * Coordinate value x of green color - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} */ - greenX: number; + greenX: double; /** * Coordinate value y of green color - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @since 9 */ /** * Coordinate value y of green color - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} */ - greenY: number; + greenY: double; /** * Coordinate value x of blue color - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @since 9 */ /** * Coordinate value x of blue color - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} */ - blueX: number; + blueX: double; /** * Coordinate value y of blue color - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @since 9 */ /** * Coordinate value y of blue color - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} */ - blueY: number; + blueY: double; /** * Coordinate value x of white point - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @since 9 */ /** * Coordinate value x of white point - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} */ - whitePointX: number; + whitePointX: double; /** * Coordinate value y of white point - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @since 9 */ /** * Coordinate value y of white point - * @type { number } + * @type { double } * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} */ - whitePointY: number; + whitePointY: double; } /** @@ -749,37 +749,37 @@ declare namespace colorSpaceManager { /** * Get white point(x, y) of color space. - * @returns { Array } Returns the white point value of color space. + * @returns { Array } Returns the white point value of color space. * @throws { BusinessError } 18600001 - The parameter value is abnormal. * @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. + * @returns { Array } Returns the white point value of color space. * @throws { BusinessError } 18600001 - The parameter value is abnormal. * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} */ - getWhitePoint(): Array; + getWhitePoint(): Array; /** * Get gamma value of color space. - * @returns { number } Returns the gamma value of color space. + * @returns { double } Returns the gamma value of color space. * @throws { BusinessError } 18600001 - The parameter value is abnormal. * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @since 9 */ /** * Get gamma value of color space. - * @returns { number } Returns the gamma value of color space. + * @returns { double } Returns the gamma value of color space. * @throws { BusinessError } 18600001 - The parameter value is abnormal. * @syscap SystemCapability.Graphic.Graphic2D.ColorManager.Core * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} */ - getGamma(): number; + getGamma(): double; } /** @@ -808,7 +808,7 @@ declare namespace colorSpaceManager { /** * Create a customized color space manager by its color primaries and gamma value * @param { ColorSpacePrimaries } primaries - Indicates the customized color primaries - * @param { number } gamma - Indicates display gamma value + * @param { double } gamma - Indicates display gamma value * @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. @@ -819,7 +819,7 @@ declare namespace colorSpaceManager { /** * Create a customized color space manager by its color primaries and gamma value * @param { ColorSpacePrimaries } primaries - Indicates the customized color primaries - * @param { number } gamma - Indicates display gamma value + * @param { double } gamma - Indicates display gamma value * @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. @@ -828,7 +828,7 @@ declare namespace colorSpaceManager { * @crossplatform * @since arkts {'1.1':'11', '1.2':'20'} */ - function create(primaries: ColorSpacePrimaries, gamma: number): ColorSpaceManager; + function create(primaries: ColorSpacePrimaries, gamma: double): ColorSpaceManager; } export default colorSpaceManager; \ No newline at end of file diff --git a/api/@ohos.graphics.common2D.d.ts b/api/@ohos.graphics.common2D.d.ts index ea035d27bd19322de502af069eb0554ac12a710a..9e9838befe546e2d2cfbdf252af2164abade7d88 100644 --- a/api/@ohos.graphics.common2D.d.ts +++ b/api/@ohos.graphics.common2D.d.ts @@ -22,105 +22,189 @@ * * @namespace common2D * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace common2D { /** * Describes a color in ARGB format. * @typedef Color * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface Color { /** * Alpha component of the color. The value is an integer ranging from 0 to 255. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - alpha: number; + /** + * Alpha component of the color. The value is an integer ranging from 0 to 255. + * @type { int } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + alpha: int; /** * Red component of the color. The value is an integer ranging from 0 to 255. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - red: number; + /** + * Red component of the color. The value is an integer ranging from 0 to 255. + * @type { int } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + red: int; /** * Green component of the color. The value is an integer ranging from 0 to 255. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - green: number; + /** + * Green component of the color. The value is an integer ranging from 0 to 255. + * @type { int } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + green: int; /** * Blue component of the color. The value is an integer ranging from 0 to 255. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - blue: number; + /** + * Blue component of the color. The value is an integer ranging from 0 to 255. + * @type { int } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + blue: int; } /** * 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 - * @since 11 + * @since arkts {'1.1':'11', '1.2':'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. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - left: number; + /** + * X coordinate of the upper left corner of the rectangle. The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + left: double; /** * Y coordinate of the upper left corner of the rectangle. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - top: number; + /** + * Y coordinate of the upper left corner of the rectangle. The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + top: double; /** * X coordinate of the lower right corner of the rectangle. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - right: number; + /** + * X coordinate of the lower right corner of the rectangle. The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + right: double; /** * Y coordinate of the lower right corner of the rectangle. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - bottom: number; + /** + * Y coordinate of the lower right corner of the rectangle. The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + bottom: double; } /** * Describes a coordinate point. * @typedef Point * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface Point { /** * Horizontal coordinate. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - x: number; + /** + * Horizontal coordinate. The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + x: double; /** * Vertical coordinate. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - y: number; + /** + * Vertical coordinate. The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + y: double; } /** @@ -134,11 +218,18 @@ declare namespace common2D { interface Point3d extends Point { /** * Z-axis coordinate. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - z: number; + /** + * Z-axis coordinate. The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + z: double; } /** @@ -151,36 +242,36 @@ declare namespace common2D { interface Color4f { /** * Alpha component of color, represented as a floating point number between 0 and 1. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - alpha: number; + alpha: double; /** * Red component of color, represented as a floating point number between 0 and 1. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - red: number; + red: double; /** * Green component of color, represented as a floating point number between 0 and 1. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - green: number; + green: double; /** * Blue component of color, represented as a floating point number between 0 and 1. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - blue: number; + blue: double; } } diff --git a/api/@ohos.graphics.displaySync.d.ts b/api/@ohos.graphics.displaySync.d.ts index 64492f0336280453755cfa140c410a7d45eb7a0f..18e8192b672ea11a96a030739ac7308476107312 100644 --- a/api/@ohos.graphics.displaySync.d.ts +++ b/api/@ohos.graphics.displaySync.d.ts @@ -16,40 +16,44 @@ /** * @file * @kit ArkGraphics2D + * @arkts 1.1&1.2 */ 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'} */ 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'} */ 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'} */ - 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'} */ - targetTimestamp: number; + targetTimestamp: long; } /** @@ -57,7 +61,7 @@ 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'} */ interface DisplaySync { /** @@ -71,7 +75,7 @@ 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'} */ setExpectedFrameRateRange(rateRange: ExpectedFrameRateRange) : void; @@ -81,7 +85,7 @@ 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'} */ on(type: 'frame', callback: Callback): void; @@ -92,7 +96,7 @@ 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'} */ off(type: 'frame', callback?: Callback): void; @@ -100,7 +104,7 @@ 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'} */ start(): void; @@ -108,7 +112,7 @@ 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'} */ stop(): void; } @@ -117,7 +121,7 @@ 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'} */ function create(): DisplaySync; } diff --git a/api/@ohos.graphics.drawing.d.ts b/api/@ohos.graphics.drawing.d.ts index 01ab26aafa2ab71f291ab0998ee70e59d3c7f851..00cfbe02520788b51f8d3e305d8e5bf51ee8cdd5 100644 --- a/api/@ohos.graphics.drawing.d.ts +++ b/api/@ohos.graphics.drawing.d.ts @@ -28,7 +28,8 @@ import { Resource } from './global/resource'; * * @namespace drawing * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace drawing { /** @@ -50,191 +51,221 @@ declare namespace drawing { * 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 } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ enum BlendMode { /** * r = 0, sets the the destination pixels to fully transparent. * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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, * and then inverts the result, typically producing a brighter outcome. * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'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 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ LUMINOSITY = 28, } /** * Enumerates the directions of a closed contour. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -256,7 +287,7 @@ declare namespace drawing { /** * Enumerates the fill types of a path. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -299,7 +330,7 @@ declare namespace drawing { /** * Enumerates the dimensions of matrix information in path measurement. * It is often used in animation scenarios where objects move along a path. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -328,7 +359,8 @@ declare namespace drawing { * Implements a rounded rectangle. * * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ class RoundRect { @@ -342,29 +374,63 @@ declare namespace drawing { constructor(roundRect: RoundRect); /** - * A constructor used to create a RoundRect object. A rounded rectangle is created when both xRadii and yRadii are greater than 0. + * 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. + * @param { double } xRadii - Radius of the rounded corner on the X axis. + * The value is a floating point number. A negative number is invalid. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - constructor(rect: common2D.Rect, xRadii: number, yRadii: number); + /** + * 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 { double } xRadii - Radius of the rounded corner on the X axis. + * The value is a floating point number. A negative number is invalid. + * @param { double } 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: double, yRadii: double); /** * 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. + * @param { double } x - Radius of the rounded corner on the X axis. + * The value is a floating point number. A negative number is invalid. + * @param { double } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - setCorner(pos: CornerPos, x: number, y: number): void; + /** + * Sets the radii of the specified rounded corner in this rounded rectangle. + * @param { CornerPos } pos - Position of the rounded corner. + * @param { double } x - Radius of the rounded corner on the X axis. + * The value is a floating point number. A negative number is invalid. + * @param { double } 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: double, y: double): void; /** * Obtains the radii of the specified rounded corner in this rounded rectangle. @@ -380,64 +446,86 @@ declare namespace drawing { /** * 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. + * @param { double } 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 { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - offset(dx: number, dy: number): void; + /** + * Translates this rounded rectangle by an offset along the X axis and Y axis. + * @param { double } 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 { double } 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: double, dy: double): void; } /** * Enumerates the path operation types. It is often used in path combination and clipping scenarios. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum PathOp { /** * Difference operation. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DIFFERENCE = 0, /** * Intersection operation. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ INTERSECT = 1, /** * Union operation. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ UNION = 2, /** * XOR operation. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ XOR = 3, /** * Reverse difference operation. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ REVERSE_DIFFERENCE = 4, } /** * Enumerates the path operation types contained in an iterator. It is used to read path operation instructions. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 18 */ @@ -496,28 +584,43 @@ declare namespace drawing { * Implements a path operation iterator. You can read path operation instructions by traversing the iterator. * * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ class PathIterator { /** * Creates an iterator and binds it with a path. * @param { Path } path - Path object bound to the iterator. * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(path: Path); /** * 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. + * @param { int } [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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - next(points: Array, offset?: number): PathIteratorVerb; + /** + * Retrieves the next operation in this path and moves the iterator to that operation. + * @param { Array } points - Indicates the point array. + * @param { int } [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?: int): PathIteratorVerb; /** * Retrieves the next operation in this path, without moving the iterator. @@ -540,13 +643,15 @@ declare namespace drawing { * A compound geometric path consisting of line segments, arcs, quadratic Bezier curves, and cubic Bezier curves. * * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ class Path { /** * Constructs a path. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -554,7 +659,8 @@ declare namespace drawing { * Constructs a copy of an existing path. * @param { Path } path - Path to copy. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(path: Path); @@ -569,173 +675,414 @@ declare namespace drawing { /** * 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. + * @param { double } x - X coordinate of the start point. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - moveTo(x: number, y: number): void; + /** + * Sets the start point of this path. + * @param { double } x - X coordinate of the start point. The value is a floating point number. + * @param { double } 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: double, y: double): void; /** - * 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. + * 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 { double } x - X coordinate of the target point. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - lineTo(x: number, y: number): void; + /** + * 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 { double } x - X coordinate of the target point. The value is a floating point number. + * @param { double } 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: double, y: double): 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. + * @param { double } x1 - X coordinate of the upper left corner of the rectangle. + * The value is a floating point number. + * @param { double } y1 - Y coordinate of the upper left corner of the rectangle. + * The value is a floating point number. + * @param { double } x2 - X coordinate of the lower right corner of the rectangle. + * The value is a floating point number. + * @param { double } y2 - Y coordinate of the lower right corner of the rectangle. + * The value is a floating point number. + * @param { double } startDeg - Start angle. The start direction (0°) of the angle is + * the positive direction of the X axis. + * @param { double } 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 * @since 11 */ - arcTo(x1: number, y1: number, x2: number, y2: number, startDeg: number, sweepDeg: 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 { double } x1 - X coordinate of the upper left corner of the rectangle. + * The value is a floating point number. + * @param { double } y1 - Y coordinate of the upper left corner of the rectangle. + * The value is a floating point number. + * @param { double } x2 - X coordinate of the lower right corner of the rectangle. + * The value is a floating point number. + * @param { double } y2 - Y coordinate of the lower right corner of the rectangle. + * The value is a floating point number. + * @param { double } startDeg - Start angle. The start direction (0°) of the angle is + * the positive direction of the X axis. + * @param { double } 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: double, y1: double, x2: double, y2: double, startDeg: double, sweepDeg: double): 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. + * 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 { double } ctrlX - X coordinate of the control point. The value is a floating point number. + * @param { double } ctrlY - Y coordinate of the control point. The value is a floating point number. + * @param { double } endX - X coordinate of the target point. The value is a floating point number. + * @param { double } 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 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 { double } ctrlX - X coordinate of the control point. The value is a floating point number. + * @param { double } ctrlY - Y coordinate of the control point. The value is a floating point number. + * @param { double } endX - X coordinate of the target point. The value is a floating point number. + * @param { double } 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: double, ctrlY: double, endX: double, endY: double): 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. - * @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. + * 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 { double } ctrlX - X coordinate of the control point. The value is a floating point number. + * @param { double } ctrlY - Y coordinate of the control point. The value is a floating point number. + * @param { double } endX - X coordinate of the target point. The value is a floating point number. + * @param { double } endY - Y coordinate of the target point. The value is a floating point number. + * @param { double } 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 * @since 12 */ - conicTo(ctrlX: number, ctrlY: number, endX: number, endY: number, weight: 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 { double } ctrlX - X coordinate of the control point. The value is a floating point number. + * @param { double } ctrlY - Y coordinate of the control point. The value is a floating point number. + * @param { double } endX - X coordinate of the target point. The value is a floating point number. + * @param { double } endY - Y coordinate of the target point. The value is a floating point number. + * @param { double } 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: double, ctrlY: double, endX: double, endY: double, weight: double): void; /** - * 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. + * 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 { double } ctrlX1 - X coordinate of the first control point. The value is a floating point number. + * @param { double } ctrlY1 - Y coordinate of the first control point. The value is a floating point number. + * @param { double } ctrlX2 - X coordinate of the second control point. The value is a floating point number. + * @param { double } ctrlY2 - Y coordinate of the second control point. The value is a floating point number. + * @param { double } endX - X coordinate of the target point. The value is a floating point number. + * @param { double } 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 */ - cubicTo(ctrlX1: number, ctrlY1: number, ctrlX2: number, ctrlY2: number, endX: number, endY: number): void; - /** - * 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. + * 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 { double } ctrlX1 - X coordinate of the first control point. The value is a floating point number. + * @param { double } ctrlY1 - Y coordinate of the first control point. The value is a floating point number. + * @param { double } ctrlX2 - X coordinate of the second control point. The value is a floating point number. + * @param { double } ctrlY2 - Y coordinate of the second control point. The value is a floating point number. + * @param { double } endX - X coordinate of the target point. The value is a floating point number. + * @param { double } 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: double, ctrlY1: double, ctrlX2: double, ctrlY2: double, endX: double, endY: double): void; + + /** + * 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 { double } 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 { double } 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 * @since 12 */ - rMoveTo(dx: number, dy: number): void; + /** + * 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 { double } 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 { double } 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: double, dy: double): void; /** * 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. + * @param { double } 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 { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - rLineTo(dx: number, dy: number): void; + /** + * 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 { double } 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 { double } 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: double, dy: double): void; /** * 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. + * @param { double } 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 { double } 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 { double } 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 { double } 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 * @since 12 */ - rQuadTo(dx1: number, dy1: number, dx2: number, dy2: number): void; - /** - * 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. + * 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 { double } 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 { double } 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 { double } 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 { double } 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 - * @since 12 + * @crossplatform + * @since 20 + */ + rQuadTo(dx1: double, dy1: double, dx2: double, dy2: double): void; + + /** + * 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 { double } 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 { double } 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 { double } 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 { double } 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 { double } 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 + * @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 { double } 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 { double } 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 { double } 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 { double } 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 { double } 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; + rConicTo(ctrlX: double, ctrlY: double, endX: double, endY: double, weight: double): void; /** * 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. + * @param { double } 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 { double } 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 { double } 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 { double } 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 { double } 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 { double } 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 * @since 12 */ - rCubicTo(ctrlX1: number, ctrlY1: number, ctrlX2: number, ctrlY2: number, endX: number, endY: number): void; + /** + * 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 { double } 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 { double } 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 { double } 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 { double } 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 { double } 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 { double } 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: double, ctrlY1: double, ctrlX2: double, ctrlY2: double, endX: double, endY: double): void; /** * Adds a polygon to this path. @@ -772,22 +1119,46 @@ declare namespace drawing { * * 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. + * @param { double } 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 { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - addArc(rect: common2D.Rect, startAngle: number, sweepAngle: number): void; + /** + * 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 { double } 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 { double } 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: double, sweepAngle: double): void; /** * 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. + * @param { double } x - X coordinate of the center of the circle. The value is a floating point number. + * @param { double } y - Y coordinate of the center of the circle. The value is a floating point number. + * @param { double } 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; @@ -795,12 +1166,25 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - addCircle(x: number, y: number, radius: number, pathDirection?: PathDirection): void; + /** + * Adds a circle to this path in the specified direction. The start point of the circle is (x + radius, y). + * @param { double } x - X coordinate of the center of the circle. The value is a floating point number. + * @param { double } y - Y coordinate of the center of the circle. The value is a floating point number. + * @param { double } 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: double, y: double, radius: double, pathDirection?: PathDirection): void; /** * 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. + * @param { int } 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; @@ -808,7 +1192,21 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - addOval(rect: common2D.Rect, start: number, pathDirection?: PathDirection): void; + /** + * Adds the inscribed ellipse of a rectangle to this path in the specified direction. + * @param { common2D.Rect } rect - Rectangular boundary of the oval. + * @param { int } 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: int, pathDirection?: PathDirection): void; /** * Adds a rectangle to this path in the specified direction. The start point is the upper left corner of the rectangle. @@ -858,25 +1256,38 @@ declare namespace drawing { /** * 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. + * @param { double } x - X coordinate. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - contains(x: number, y: number): boolean; + /** + * Checks whether a coordinate point is included in this path. For details, see PathFillType. + * @param { double } x - X coordinate. The value is a floating point number. + * @param { double } 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: double, y: double): boolean; /** * Changes the last point of the path to specific value. - * @param { number } x - Indicates the new x-axis value for the last point. - * @param { number } y - Indicates the new y-axis value for the last point. + * @param { double } x - Indicates the new x-axis value for the last point. + * @param { double } y - Indicates the new y-axis value for the last point. * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - setLastPoint(x: number, y: number): void; + setLastPoint(x: double, y: double): void; /** * Sets the fill type of this path. The fill type determines how "inside" of the path is drawn. @@ -915,23 +1326,46 @@ declare namespace drawing { close(): void; /** - * 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. + * Offsets this path by specified distances along the X axis and Y axis and + * stores the resulting path in the Path object returned. + * @param { double } 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 { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - offset(dx: number, dy: number): Path; + /** + * Offsets this path by specified distances along the X axis and Y axis and + * stores the resulting path in the Path object returned. + * @param { double } 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 { double } 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: double, dy: double): Path; /** * Resets the path data. * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ reset(): void; @@ -966,49 +1400,112 @@ declare namespace drawing { * @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. + * @returns { double } Return path length. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getLength(forceClosed: boolean): number; + /** + * 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 { double } Return path length. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + getLength(forceClosed: boolean): double; /** * 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. + * 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 { double } 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 + * @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 { double } 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. + * 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. + * 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @crossplatform + * @since 20 */ - getPositionAndTangent(forceClosed: boolean, distance: number, position: common2D.Point, tangent: common2D.Point): boolean; + getPositionAndTangent(forceClosed: boolean, distance: double, position: common2D.Point, tangent: common2D.Point): boolean; /** * 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. + * @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 { double } 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 { double } 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 * @since 18 */ - getSegment(forceClosed: boolean, start: number, stop: number, startWithMoveTo: boolean, dst: Path): boolean; + /** + * 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 { double } 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 { double } 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: double, stop: double, startWithMoveTo: boolean, dst: Path): boolean; /** * Checks whether a path is closed. @@ -1020,21 +1517,45 @@ declare namespace drawing { isClosed(): boolean; /** - * Obtains a transformation matrix at a specific position along the path, which represents the coordinates and orientation of that point. + * 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 { 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 { double } 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. + * 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 * @since 12 */ - getMatrix(forceClosed: boolean, distance: number, matrix: Matrix, flags: PathMeasureMatrixFlags): boolean; + /** + * 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 { double } 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: double, matrix: Matrix, flags: PathMeasureMatrixFlags): boolean; /** * Parses the path represented by an SVG string. @@ -1059,8 +1580,8 @@ declare namespace drawing { /** * Approximates the path with a series of line segments. * - * @param { number } acceptableError - Indicates the acceptable error for a line on the path. Should be no less than 0. - * @returns { Array } - Returns with the array containing point components. + * @param { double } acceptableError - Indicates the acceptable error for a line on the path. Should be no less than 0. + * @returns { Array } - Returns with the array containing point components. *
There are three components for each point: *
1. Fraction along the length of the path that the point resides [0.0, 1.0]. *
2. The x coordinate of the point. @@ -1070,13 +1591,13 @@ declare namespace drawing { * @crossplatform * @since 20 */ - approximate(acceptableError: number): Array; + approximate(acceptableError: double): Array; /** * Performs interpolation between the current path and another path based on a given weight, and stores the result in the target path object. * * @param { Path } other - Indicates the other path to be interpolated with the current path. - * @param { number } weight - Indicates the interpolation weight, which must be in the range [0, 1]. + * @param { double } weight - Indicates the interpolation weight, which must be in the range [0, 1]. * @param { Path } interpolatedPath - Indicates the target path object where the interpolation result will be stored. * @returns { boolean } - Returns true if the interpolation operation was successful; returns false otherwise. *
Possible reasons for failure include: @@ -1087,7 +1608,7 @@ declare namespace drawing { * @crossplatform * @since 20 */ - interpolate(other: Path, weight: number, interpolatedPath: Path): boolean; + interpolate(other: Path, weight: double, interpolatedPath: Path): boolean; /** * Checks whether the current path is compatible with another path (other) for interpolation, which means @@ -1105,7 +1626,7 @@ declare namespace drawing { /** * Enumerates the modes for drawing multiple points in an array. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -1134,29 +1655,32 @@ declare namespace drawing { /** * Enumerates the filter modes. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FilterMode { /** * Nearest filter mode. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FILTER_MODE_NEAREST = 0, /** * Linear filter mode. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FILTER_MODE_LINEAR = 1, } /** * Enumerates the shadow drawing behaviors. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -1193,13 +1717,15 @@ declare namespace drawing { /** * Implements sampling options. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'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 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); /** @@ -1208,7 +1734,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 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(filterMode: FilterMode); } @@ -1216,7 +1743,8 @@ declare namespace drawing { /** * A carrier that carries the drawn content and drawing status. * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ class Canvas { /** @@ -1225,7 +1753,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 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(pixelmap: image.PixelMap); @@ -1237,20 +1766,53 @@ 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; /** - * 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. + * Draws a rectangle. By default, black is used for filling. + * This API provides better performance than drawRect and is recommended. + * @param { double } left - X coordinate of the upper left corner of the rectangle. + * The value is a floating point number. + * @param { double } top - Y coordinate of the upper left corner of the rectangle. + * The value is a floating point number. + * @param { double } right - X coordinate of the lower right corner of the rectangle. + * The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @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 { double } left - X coordinate of the upper left corner of the rectangle. + * The value is a floating point number. + * @param { double } top - Y coordinate of the upper left corner of the rectangle. + * The value is a floating point number. + * @param { double } right - X coordinate of the lower right corner of the rectangle. + * The value is a floating point number. + * @param { double } 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: double, top: double, right: double, bottom: double): void; /** * Draws a rounded rectangle. @@ -1287,19 +1849,37 @@ declare namespace drawing { /** * 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 } 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 { double } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - drawShadow(path: Path, planeParams: common2D.Point3d, devLightPos: common2D.Point3d, lightRadius: number, + /** + * 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 { double } 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: double, ambientColor: common2D.Color, spotColor: common2D.Color, flag: ShadowFlag) : void; /** @@ -1307,35 +1887,67 @@ declare namespace drawing { * @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 { double } lightRadius - Radius of the light. The value is a floating point number. + * @param { common2D.Color | int } ambientColor - Ambient shadow color, + * represented by a 32-bit unsigned integer in hexadecimal ARGB format. + * @param { common2D.Color | int } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - drawShadow(path: Path, planeParams: common2D.Point3d, devLightPos: common2D.Point3d, lightRadius: number, - ambientColor: common2D.Color | number, spotColor: common2D.Color | number, flag: ShadowFlag) : void; + /** + * 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 { double } lightRadius - Radius of the light. The value is a floating point number. + * @param { common2D.Color | int } ambientColor - Ambient shadow color, + * represented by a 32-bit unsigned integer in hexadecimal ARGB format. + * @param { common2D.Color | int } 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: double, + ambientColor: common2D.Color | int, spotColor: common2D.Color | int, flag: ShadowFlag) : void; /** - * 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. + * Draws a circle. If the radius is less than or equal to zero, nothing is drawn. + * By default, black is used for filling. + * @param { double } x - X coordinate of the center of the circle. The value is a floating point number. + * @param { double } y - Y coordinate of the center of the circle. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - drawCircle(x: number, y: number, radius: number): void; + /** + * Draws a circle. If the radius is less than or equal to zero, nothing is drawn. + * By default, black is used for filling. + * @param { double } x - X coordinate of the center of the circle. The value is a floating point number. + * @param { double } y - Y coordinate of the center of the circle. The value is a floating point number. + * @param { double } 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: double, y: double, radius: double): void; /** * Draw a pixelmap, with the upper left corner at (left, top). * @param { image.PixelMap } pixelmap - PixelMap. - * @param { number } left - Left side of image. - * @param { number } top - Top side of image. + * @param { double } left - Left side of image. + * @param { double } top - Top side of image. * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Graphics.Drawing * @since 11 @@ -1343,15 +1955,32 @@ declare namespace drawing { /** * 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. + * @param { double } left - X coordinate of the upper left corner of the image. + * The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - drawImage(pixelmap: image.PixelMap, left: number, top: number, samplingOptions?: SamplingOptions): void; + /** + * Draws an image. The coordinates of the upper left corner of the image are (left, top). + * @param { image.PixelMap } pixelmap - PixelMap. + * @param { double } left - X coordinate of the upper left corner of the image. + * The value is a floating point number. + * @param { double } 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: double, top: double, samplingOptions?: SamplingOptions): void; /** * Splits an image into multiple sections based on the lattice object's configuration and @@ -1398,7 +2027,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 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ drawImageRect(pixelmap: image.PixelMap, dstRect: common2D.Rect, samplingOptions?: SamplingOptions): void; @@ -1421,7 +2051,7 @@ declare namespace drawing { /** * 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. + * @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 @@ -1430,33 +2060,62 @@ declare namespace drawing { drawColor(color: common2D.Color, blendMode?: BlendMode): void; /** - * 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. + * Fills the drawable area of the canvas with the specified color and blend mode. + * This API provides better performance and is recommended. + * @param { int } 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 { int } 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 { int } 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 { int } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - drawColor(alpha: number, red: number, green: number, blue: number, blendMode?: BlendMode): void; + /** + * Fills the drawable area of the canvas with the specified color and blend mode. + * This API provides better performance and is recommended. + * @param { int } 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 { int } 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 { int } 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 { int } 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: int, red: int, green: int, blue: int, blendMode?: BlendMode): void; /** * 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. + * @param { int } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - drawColor(color: number, blendMode?: BlendMode): void; + /** + * Fills the drawable area of the canvas with the specified color and blend mode. + * @param { int } 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: int, blendMode?: BlendMode): void; /** * Draws an oval on the canvas, where the shape and position of the oval are defined by its bounding rectangle. @@ -1472,30 +2131,48 @@ declare namespace drawing { * 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. + * @param { double } 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 { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - drawArc(arc: common2D.Rect, startAngle: number, sweepAngle: number): void; + /** + * 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 { double } 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 { double } 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: double, sweepAngle: double): void; /** * 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. + * @param { double } 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. + * @param { double } 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. @@ -1503,18 +2180,45 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - drawArcWithCenter(arc: common2D.Rect, startAngle: number, sweepAngle: number, useCenter: boolean): void; + /** + * 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 { double } 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 { double } 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: double, sweepAngle: double, useCenter: boolean): void; /** * 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. + * @param { double } x - X coordinate of the point. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - drawPoint(x: number, y: number): void; + /** + * Draws a point. + * @param { double } x - X coordinate of the point. The value is a floating point number. + * @param { double } 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: double, y: double): void; /** * 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. @@ -1538,67 +2242,129 @@ declare namespace drawing { 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. + * 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 { double } x0 - X coordinate of the start point of the line segment. The value is a floating point number. + * @param { double } y0 - Y coordinate of the start point of the line segment. The value is a floating point number. + * @param { double } x1 - X coordinate of the end point of the line segment. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - drawLine(x0: number, y0: number, x1: number, y1: number): 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 { double } x0 - X coordinate of the start point of the line segment. The value is a floating point number. + * @param { double } y0 - Y coordinate of the start point of the line segment. The value is a floating point number. + * @param { double } x1 - X coordinate of the end point of the line segment. The value is a floating point number. + * @param { double } 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 + * @crossplatform + * @since 20 + */ + drawLine(x0: double, y0: double, x1: double, y1: double): void; /** * 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. + * @param { double } 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 { double } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - drawSingleCharacter(text: string, font: Font, x: number, y: number): void; + /** + * 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 { double } 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 { double } 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: double, y: double): void; /** - * Draws a text blob. If the typeface used to construct blob does not support a character, that character will not be drawn. + * 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. + * @param { double } 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 { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - drawTextBlob(blob: TextBlob, x: number, y: number): 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. + * @param { double } 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 { double } 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: double, y: double): void; /** * 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. + * @param { image.PixelMap } pixelmap - The pixelmap to draw using the mesh. + * @param { int } meshWidth - The number of columns in the mesh. + * @param { int } meshHeight - The number of rows in the mesh. + * @param { Array } vertices - Array of vertices, specifying where the mesh should be drawn. + * @param { int } vertOffset - Number of vert elements to skip before drawing. + * @param { Array } colors - Array of colors, specifying a color at each vertex. + * @param { int } colorOffset - Number of color elements to skip before drawing. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - drawPixelMapMesh(pixelmap: image.PixelMap, meshWidth: number, meshHeight: number, - vertices: Array, vertOffset: number, colors: Array, colorOffset: number): void; + /** + * Draws a PixelMap based on a mesh, where mesh vertices are evenly distributed across the PixelMap. + * @param { image.PixelMap } pixelmap - PixelMap to draw. + * @param { int } meshWidth - Number of columns in the mesh. The value is an integer greater than 0. + * @param { int } 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 { int } 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 { int } 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: int, meshHeight: int, + vertices: Array, vertOffset: int, colors: Array, colorOffset: int): void; /** * Draws a region. @@ -1626,7 +2392,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 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ attachBrush(brush: Brush): void; @@ -1640,31 +2407,54 @@ declare namespace drawing { /** * 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 - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ detachBrush(): void; /** - * 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. + * 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 { int } Number of canvas statuses. The value is a positive integer. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - save(): number; + /** + * 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 { int } Number of canvas statuses. The value is a positive integer. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + save(): int; + /** + * Saves the matrix and clip, and allocates a bitmap for subsequent drawing. + * Calling restore doscards changes to matrix and clip, and draws the bitmap. + * @param { common2D.Rect | null} rect - Optional layer size. The default value is null. + * @param { Brush | null} brush - Optional brush effect effect used to draw the layer. The default value is null. + * @returns { long } Return the number of saved states before this call. + * @throws { BusinessError } 401 - Parameter error. Possible causes: Mandatory parameters are left unspecified. + * @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. + * 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 { long } 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 - * @since 12 + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 */ - saveLayer(rect?: common2D.Rect | null, brush?: Brush | null): number; + saveLayer(rect?: common2D.Rect | null, brush?: Brush | null): long; /** * Clears the canvas with a given color. This API has the same effect as drawColor. @@ -1678,54 +2468,94 @@ declare namespace drawing { /** * Clears the canvas with a given color. - * @param { common2D.Color | number } color - Color, represented by an unsigned integer in hexadecimal ARGB format. + * @param { common2D.Color | int } color - Color, represented by an unsigned integer in hexadecimal ARGB format. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - clear(color: common2D.Color | number): void; + /** + * Clears the canvas with a given color. + * @param { common2D.Color | int } color - Color, represented by an unsigned integer in hexadecimal ARGB format. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + clear(color: common2D.Color | int): void; /** * Restores the canvas state (canvas matrix and clipping area) saved on the top of the stack. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ restore(): void; /** * 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. + * @param { int } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - restoreToCount(count: number): void; + /** + * Restores the canvas state (canvas matrix and clipping area) to a specified number. + * @param { int } 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: int): void; /** * 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. + * @returns { int } Number of canvas statuses that have been saved. The value is a positive integer. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getSaveCount(): number; + /** + * Obtains the number of canvas states (canvas matrix and clipping area) saved in the stack. + * @returns { int } Number of canvas statuses that have been saved. The value is a positive integer. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + getSaveCount(): int; /** * Obtains the canvas width. - * @returns { number } Canvas width. The value is a floating point number. + * @returns { int } Canvas width. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getWidth(): number; + /** + * Obtains the canvas width. + * @returns { int } Canvas width. The value is a floating point number. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + getWidth(): int; /** * Obtains the canvas height. - * @returns { number } Canvas height. The value is a floating point number. + * @returns { int } Canvas height. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getHeight(): number; + /** + * Obtains the canvas height. + * @returns { int } Canvas height. The value is a floating point number. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + getHeight(): int; /** * Obtains the bounds of the cropping region of the canvas. @@ -1744,58 +2574,110 @@ declare namespace drawing { getTotalMatrix(): Matrix; /** - * 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. + * Scales the canvas. + * @param { double } sx - Scale ratio on the X axis. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - scale(sx: number, sy: number): void; + /** + * 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 { double } sx - Scale ratio on the X axis. The value is a floating point number. + * @param { double } 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: double, sy: double): void; /** - * 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. + * Skews the canvas in both the horizontal and vertical directions. + * @param { double } 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 { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - skew(sx: number, sy: number) : void; + /** + * 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 { double } 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 { double } 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: double, sy: double) : void; /** - * 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. + * Rotates by degrees, positive degrees rotates clockwise. + * @param { double } degrees - Indicates the amount to rotate, in degrees. + * @param { double } sx - Indicates the x-axis valie of the point to rotate about. + * @param { double } sy - Indicates the y-axis valie of the point to rotate about. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - rotate(degrees: number, sx: number, sy: number) : void; + /** + * 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 { double } 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 { double } sx - X coordinate of the rotation center. The value is a floating point number. + * @param { double } 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: double, sx: double, sy: double) : 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. + * Subsequent drawing and clipping operations will automatically have a translation effect applied + * to the shapes and positions. + * @param { double } dx - Distance to translate on the X axis. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @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 { double } dx - Distance to translate on the X axis. The value is a floating point number. + * @param { double } 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: double, dy: double): void; /** * Clips the drawable area of the canvas using a custom path. @@ -1867,14 +2749,25 @@ declare namespace drawing { isClipEmpty(): boolean; /** - * Sets a matrix for the canvas. Subsequent drawing and clipping operations will be affected by this matrix in terms of shape and position. + * 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - setMatrix(matrix: Matrix): void; + /** + * 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; /** * Resets the matrix of this canvas to an identity matrix. @@ -1905,21 +2798,24 @@ declare namespace drawing { /** * Enumerates the canvas clipping modes. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'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 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DIFFERENCE = 0, /** * Retains a specified area. That is, the intersection is obtained. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ INTERSECT = 1, } @@ -1933,31 +2829,52 @@ declare namespace drawing { interface TextBlobRunBuffer { /** * Index of the glyph. The value is an integer. If a floating point number is passed in, the value is rounded down. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - glyph: number; + /** + * Index of the glyph. The value is an integer. If a floating point number is passed in, the value is rounded down. + * @type { int } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + glyph: int; /** * X coordinate of the start point of the text blob. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - positionX: number; + /** + * X coordinate of the start point of the text blob. The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + positionX: double; /** * Y coordinate of the start point of the text blob. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - positionY: number; + /** + * Y coordinate of the start point of the text blob. The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + positionY: double; } /** * Enumerates the text encoding types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ @@ -2013,20 +2930,38 @@ declare namespace drawing { /** * 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. + * 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 { int } 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. + * 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. + *
2. Incorrect parameter types. * @static * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - static makeFromPosText(text: string, len: number, points: common2D.Point[], font: Font): TextBlob; + /** + * 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 { int } 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: int, points: common2D.Point[], font: Font): TextBlob; /** * Creates a Textblob object based on the RunBuffer information. @@ -2052,11 +2987,18 @@ declare namespace drawing { /** * Obtains the unique, non-zero identifier of this TextBlob object. - * @returns { number } Unique, non-zero identifier of this TextBlob object. + * @returns { long } Unique, non-zero identifier of this TextBlob object. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - uniqueID(): number; + /** + * Obtains the unique, non-zero identifier of this TextBlob object. + * @returns { long } Unique, non-zero identifier of this TextBlob object. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + uniqueID(): long; } /** @@ -2076,20 +3018,21 @@ declare namespace drawing { /** * Adds variation axis for the TypefaceArguments. * @param { string } axis - Indicates the axis tag, which must contain four ASCII characters. - * @param { number } value - Indicates the value of the axis field. + * @param { double } value - Indicates the value of the axis field. * @throws { BusinessError } 25900001 - Parameter error. Possible causes: Incorrect parameter range. * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - addVariation(axis: string, value: number); + addVariation(axis: string, value: double); } /** * Describes the style of a typeface, such as SimSun or KaiTi. * * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ class Typeface { /** @@ -2117,7 +3060,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 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ static makeFromFile(filePath: string): Typeface; @@ -2162,7 +3106,7 @@ declare namespace drawing { /** * Enumerates the font edging types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -2192,7 +3136,7 @@ declare namespace drawing { /** * Enumerates the font hinting types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -2230,7 +3174,8 @@ declare namespace drawing { * Describes the attributes used for text rendering, such as size and typeface. * * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ class Font { /** @@ -2268,22 +3213,40 @@ declare namespace drawing { /** * Sets the font size. - * @param { number } textSize - Font size. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - setSize(textSize: number): void; + /** + * Sets the font size. + * @param { double } 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: double): void; /** * Obtains the font size. - * @returns { number } Font size. The value is a floating point number. + * @returns { double } Font size. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - getSize(): number; + /** + * Obtains the font size. + * @returns { double } Font size. The value is a floating point number. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + getSize(): double; /** * Sets the typeface style (including attributes such as font name, weight, and italic) for the font. @@ -2291,7 +3254,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 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setTypeface(typeface: Typeface): void; @@ -2307,54 +3271,100 @@ declare namespace drawing { * Obtains the font metrics of the typeface. * @returns { FontMetrics } The fontMetrics value returned to the caller. * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getMetrics(): FontMetrics; /** * 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. + * 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. + * @returns { double } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - measureSingleCharacter(text: string): number; + /** + * 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 { double } 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): double; /** * 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. + * @returns { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - measureText(text: string, encoding: TextEncoding): number; + /** + * Measures the text width. + * @param { string } text - Text Symbol Content. + * @param { TextEncoding } encoding - Encoding format. + * @returns { double } 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): double; /** * Sets a horizontal scale factor for this font. - * @param { number } scaleX - Horizontal scale factor. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - setScaleX(scaleX: number): void; + /** + * Sets a horizontal scale factor for this font. + * @param { double } 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: double): void; /** * 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. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - setSkewX(skewX: number): void; + /** + * Sets a horizontal skew factor for this font. + * @param { double } 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: double): void; /** * Sets a font edging effect. @@ -2379,13 +3389,23 @@ declare namespace drawing { /** * 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. + * @returns { int } 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 * @since 12 */ - countText(text: string): number; + /** + * Obtains the number of glyphs represented by text. + * @param { string } text - Indicates the character storage encoded with text encoding. + * @returns { int } 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): int; /** * Sets whether to request that baselines be snapped to pixels when the current canvas matrix is axis aligned. @@ -2447,27 +3467,51 @@ declare namespace drawing { /** * 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. + * @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 * @since 12 */ - getWidths(glyphs: Array): Array; + /** + * 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; /** * 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. + * @param { int } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - textToGlyphs(text: string, glyphCount?: number): Array; + /** + * Converts text into glyph indexes. + * @param { string } text - Text string. + * @param { int } 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?: int): Array; /** * Checks whether sub-pixel rendering is used for this font. @@ -2487,11 +3531,18 @@ declare namespace drawing { /** * Obtains the horizontal skew factor of this font. - * @returns { number } Horizontal skew factor. + * @returns { double } Horizontal skew factor. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getSkewX(): number; + /** + * Obtains the horizontal skew factor of this font. + * @returns { double } Horizontal skew factor. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + getSkewX(): double; /** * Checks whether the bold effect is set for this font. @@ -2504,11 +3555,18 @@ declare namespace drawing { /** * Obtains the horizontal scale ratio of this font. - * @returns { number } Horizontal scale ratio. + * @returns { double } Horizontal scale ratio. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getScaleX(): number; + /** + * Obtains the horizontal scale ratio of this font. + * @returns { double } Horizontal scale ratio. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + getScaleX(): double; /** * Obtains the font hinting effect. @@ -2528,40 +3586,76 @@ declare namespace drawing { /** * Obtains the outline path of a glyph. - * @param { number } index - Index of the glyph. + * @param { int } 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 * @since 18 */ - createPathForGlyph(index: number): Path; + /** + * Obtains the outline path of a glyph. + * @param { int } 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: int): Path; /** * Obtains the rectangular bounding box of each glyph in an array. - * @param { Array } glyphs - Glyph array, which can be generated by textToGlyphs. + * @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. + * 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 * @since 18 */ - getBounds(glyphs: Array): Array; + /** + * 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; /** * 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. + * @param { int } 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 { double } x - X coordinate of the text in the drawing area, with the origin as the start point. + * @param { double } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - getTextPath(text: string, byteLength: number, x: number, y: number): Path; + /** + * Obtains the outline path of a text. + * @param { string } text - UTF-8 text-encoded characters. + * @param { int } 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 { double } x - X coordinate of the text in the drawing area, with the origin as the start point. + * @param { double } 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: int, x: double, y: double): Path; /** * Sets whether to follow the theme font. When followed is set to true, @@ -2586,7 +3680,7 @@ declare namespace drawing { /** * Enumerates the font measurement flags, which is used to specify whether a field in the font measurement information is valid. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -2631,7 +3725,8 @@ declare namespace drawing { * Describes the attributes that describe the font size and layout. A typeface has similar font metrics. * @typedef FontMetrics * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface FontMetrics { /** @@ -2644,32 +3739,64 @@ declare namespace drawing { /** * Maximum distance from the baseline to the highest coordinate of the text. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - top: number; + /** + * Maximum distance from the baseline to the highest coordinate of the text. The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + top: double; /** * Distance from the baseline to the highest coordinate of the text. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - ascent: number; + /** + * Distance from the baseline to the highest coordinate of the text. The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + ascent: double; /** * Distance from the baseline to the lowest coordinate of the text. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - descent: number; + /** + * Distance from the baseline to the lowest coordinate of the text. The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + descent: double; /** * Maximum distance from the baseline to the lowest coordinate of the text. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - bottom: number; + /** + * Maximum distance from the baseline to the lowest coordinate of the text. The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + bottom: double; /** * 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. @@ -2677,94 +3804,176 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - leading: number; + /** + * 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 { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + leading: double; /** * Average character width. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - avgCharWidth?: number; + /** + * Average character width. + * @type { ?double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + avgCharWidth?: double; /** * Maximum character width. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - maxCharWidth?: number; + /** + * Maximum character width. + * @type { ?double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + maxCharWidth?: double; /** * 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 } + * @type { ?double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - xMin?: 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 { ?double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + xMin?: double; /** * 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 } + * @type { ?double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - xMax?: number; + /** + * 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 { ?double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + xMax?: double; /** * Height of the lowercase letter x. The value is usually a negative value. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - xHeight?: number; + /** + * Height of the lowercase letter x. The value is usually a negative value. + * @type { ?double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + xHeight?: double; /** * Height of a capital letter. The value is usually a negative value. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - capHeight?: number; + /** + * Height of a capital letter. The value is usually a negative value. + * @type { ?double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + capHeight?: double; /** * Thickness of the underline. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - underlineThickness?: number; + /** + * Thickness of the underline. + * @type { ?double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + underlineThickness?: double; /** * Vertical distance from the baseline to the top of the underline. The value is usually a positive number. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - underlinePosition?: number; + /** + * Vertical distance from the baseline to the top of the underline. The value is usually a positive number. + * @type { ?double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + underlinePosition?: double; /** * Thickness of the strikethrough. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - strikethroughThickness?: number; + /** + * Thickness of the strikethrough. + * @type { ?double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + strikethroughThickness?: double; /** * Vertical distance from the baseline to the bottom of the strikethrough. The value is usually a negative value. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - strikethroughPosition?: number; + /** + * Vertical distance from the baseline to the bottom of the strikethrough. The value is usually a negative value. + * @type { ?double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + strikethroughPosition?: double; } /** * Implements a lattice object, which is used to divide an image by lattice. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ class Lattice { /** @@ -2772,80 +3981,138 @@ declare namespace drawing { * 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). + * @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 { int } fXCount - Size of the array that holds the X coordinates. The value range is [0, 5]. + * @param { int } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - static createImageLattice(xDivs: Array, yDivs: Array, fXCount: number, fYCount: number, - fBounds?: common2D.Rect | null, fRectTypes?: Array | null, fColors?: Array | null): Lattice; - /** * 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). + * @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 { int } fXCount - Size of the array that holds the X coordinates. The value range is [0, 5]. + * @param { int } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Graphics.Drawing - * @since 18 - */ - static createImageLattice(xDivs: Array, yDivs: Array, fXCount: number, fYCount: number, - fBounds?: common2D.Rect | null, fRectTypes?: Array | null, fColors?: Array | null): Lattice; + * @crossplatform + * @since 20 + * @arkts 1.1&1.2 + */ + static createImageLattice(xDivs: Array, yDivs: Array, fXCount: int, fYCount: int, + fBounds?: common2D.Rect | null, fRectTypes?: Array | null, fColors?: Array | null): Lattice; + + /** + * 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 { int } fXCount - Size of the array that holds the X coordinates. The value range is [0, 5]. + * @param { int } 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 + * @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 { int } fXCount - Size of the array that holds the X coordinates. The value range is [0, 5]. + * @param { int } 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: int, fYCount: int, + fBounds?: common2D.Rect | null, fRectTypes?: Array | null, fColors?: Array | null): Lattice; } /** * Enumerates the types of rectangles used to fill the lattices. This enum is used only in Lattice. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum RectType { /** * Draws an image into the lattice. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, /** * Sets the lattice to transparent. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ TRANSPARENT = 1, /** * Draws the colors in the fColors array in Lattice into the lattice. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ FIXEDCOLOR = 2 } @@ -2859,20 +4126,34 @@ declare namespace drawing { /** * 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. + * @param { double } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - static createBlurMaskFilter(blurType: BlurType, sigma: number): MaskFilter; + /** + * Creates a mask filter with a blur effect. + * @param { BlurType } blurType - Blur type. + * @param { double } 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: double): MaskFilter; } /** * Enumerates the styles of the dashed path effect. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 18 */ @@ -2905,44 +4186,88 @@ declare namespace drawing { class PathEffect { /** * Creates a PathEffect object that converts a path into a dotted line. - * @param { Array } intervals - Array of ON and OFF lengths of dotted lines. + * @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. + * @param { double } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - static createDashPathEffect(intervals: Array, phase: number): PathEffect; + /** + * 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 { double } 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: double): PathEffect; /** - * 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. + * Creates a path effect that transforms the sharp angle between line segments + * into a rounded corner with the specified radius. + * @param { double } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - static createCornerPathEffect(radius: number): PathEffect; + /** + * Creates a path effect that transforms the sharp angle between line segments + * into a rounded corner with the specified radius. + * @param { double } 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: double): PathEffect; /** * 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. + * @param { double } 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 { double } 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 { int } [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 * @since 18 */ - static createDiscretePathEffect(segLength: number, dev: number, seedAssist?: number): PathEffect; + /** + * Creates an effect that segments the path and scatters the segments in an irregular pattern along the path. + * @param { double } 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 { double } 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 { int } [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: double, dev: double, seedAssist?: int): PathEffect; /** * Creates a path effect by sequentially applying the inner effect and then the outer effect. @@ -2955,22 +4280,40 @@ declare namespace drawing { */ static createComposePathEffect(outer: PathEffect, inner: PathEffect): PathEffect; - /** + /** * 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 { double } advance - Distance between two consecutive dashes. + * The value is a floating point number greater than 0. + * Otherwise, an error code is thrown. + * @param { double } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - static createPathDashEffect(path: Path, advance: number, phase: number, style: PathDashStyle): PathEffect; + /** + * 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 { double } advance - Distance between two consecutive dashes. + * The value is a floating point number greater than 0. + * Otherwise, an error code is thrown. + * @param { double } 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: double, phase: double, style: PathDashStyle): PathEffect; /** * Creates an overlay path effect based on two distinct path effects. @@ -2995,114 +4338,250 @@ declare namespace drawing { class ShaderEffect { /** * Creates a ShaderEffect object with a single color. - * @param { number } color - Color in the ARGB format. The value is a 32-bit unsigned integer. + * @param { int } 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. + *
2. Incorrect parameter types. + * @static * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - static createColorShader(color: number): ShaderEffect; + /** + * Creates a ShaderEffect object with a single color. + * @param { int } 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. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + static createColorShader(color: int): ShaderEffect; /** * 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 { 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 { 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. + * 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - static createLinearGradient(startPt: common2D.Point, endPt: common2D.Point, colors: Array, - mode: TileMode, pos?: Array | null, matrix?: Matrix | null): ShaderEffect; + /** + * 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. + * @static + * @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; /** * 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 { double } 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 { 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. + * 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - static createRadialGradient(centerPt: common2D.Point, radius: number, colors: Array, - mode: TileMode, pos?: Array | null, matrix?: Matrix | null): ShaderEffect; + /** + * 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 { double } 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. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + static createRadialGradient(centerPt: common2D.Point, radius: double, colors: Array, + mode: TileMode, pos?: Array | null, matrix?: Matrix | null): ShaderEffect; /** * 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 { 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 { double } 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 { double } 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. + * 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - static createSweepGradient(centerPt: common2D.Point, colors: Array, - mode: TileMode, startAngle: number, endAngle: number, pos?: Array | null, + /** + * 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 { double } 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 { double } 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. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + static createSweepGradient(centerPt: common2D.Point, colors: Array, + mode: TileMode, startAngle: double, endAngle: double, pos?: Array | null, matrix?: Matrix | null): ShaderEffect; /** * 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 { double } 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 { double } 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 { 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. + * 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. + * @static * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - static createConicalGradient(startPt: common2D.Point, startRadius: number, endPt: common2D.Point, - endRadius: number, colors: Array, mode: TileMode, - pos?: Array | null, matrix?: Matrix | null): ShaderEffect; + /** + * 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 { double } 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 { double } 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. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + static createConicalGradient(startPt: common2D.Point, startRadius: double, endPt: common2D.Point, + endRadius: double, colors: Array, mode: TileMode, + pos?: Array | null, matrix?: Matrix | null): ShaderEffect; /** * Creates an ShaderEffect object that generates a shader with single image. @@ -3139,7 +4618,7 @@ declare namespace drawing { /** * Enumerates the tile modes of the shader effect. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -3182,41 +4661,78 @@ declare namespace drawing { /** * 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. + * @param { double } blurRadius - Radius of the shadow layer. + * The value must be a floating point number greater than 0. + * @param { double } x - Offset on the X axis. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - static create(blurRadius: number, x: number, y: number, color: common2D.Color): ShadowLayer; + /** + * Creates a ShadowLayer object. + * + * @param { double } blurRadius - Radius of the shadow layer. + * The value must be a floating point number greater than 0. + * @param { double } x - Offset on the X axis. The value is a floating point number. + * @param { double } 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: double, x: double, y: double, color: common2D.Color): ShadowLayer; /** * 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. + * @param { double } blurRadius - Radius of the shadow layer. + * The value must be a floating point number greater than 0. + * @param { double } x - Offset on the X axis. The value is a floating point number. + * @param { double } y - Offset on the Y axis. The value is a floating point number. + * @param { common2D.Color | int } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - static create(blurRadius: number, x: number, y: number, color: common2D.Color | number): ShadowLayer; + /** + * Creates a ShadowLayer object. + * + * @param { double } blurRadius - Radius of the shadow layer. + * The value must be a floating point number greater than 0. + * @param { double } x - Offset on the X axis. The value is a floating point number. + * @param { double } y - Offset on the Y axis. The value is a floating point number. + * @param { common2D.Color | int } 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: double, x: double, y: double, color: common2D.Color | int): ShadowLayer; } /** * Defines a color filter. * * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ class ColorFilter { /** @@ -3230,11 +4746,24 @@ 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; /** * 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 { common2D.Color | int } 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; @@ -3243,7 +4772,20 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - static createBlendModeColorFilter(color: common2D.Color | number, mode: BlendMode): ColorFilter; + /** + * Creates a ColorFilter object with a given color and blend mode. + * @param { common2D.Color | int } 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 | int, mode: BlendMode): ColorFilter; /** * Creates a ColorFilter object by combining another two color filters. @@ -3286,27 +4828,38 @@ declare namespace drawing { static createLumaColorFilter(): ColorFilter; /** * Creates a color filter object with a 4*5 color matrix. - * @param { Array } matrix - An array of 20 numbers, indicating the 4*5 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - static createMatrixColorFilter(matrix: Array): ColorFilter; + /** + * 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; /** * Makes a color filter with the given mutColor and addColor. - * @param { common2D.Color | number } mutColor - The range of color channels must be [0, 255], used to multiply source color. - * @param { common2D.Color | number } addColor - The range of color channels must be [0, 255], used to add to source color. + * @param { common2D.Color | int } mutColor - The range of color channels must be [0, 255], used to multiply source color. + * @param { common2D.Color | int } addColor - The range of color channels must be [0, 255], used to add to source color. * @returns { ColorFilter } Colorfilter object. * @static * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - static createLightingColorFilter(mutColor: common2D.Color | number, addColor: common2D.Color | number): ColorFilter; + static createLightingColorFilter(mutColor: common2D.Color | int, addColor: common2D.Color | int): ColorFilter; } @@ -3319,19 +4872,38 @@ declare namespace drawing { class ImageFilter { /** * 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 { double } sigmaX - Standard deviation of the Gaussian blur along the X axis. + * The value must be a floating point number greater than 0. + * @param { double } 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. + * 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - static createBlurImageFilter(sigmaX: number, sigmaY: number, + /** + * Creates an image filter with a given blur effect. + * @param { double } sigmaX - Standard deviation of the Gaussian blur along the X axis. + * The value must be a floating point number greater than 0. + * @param { double } 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: double, sigmaY: double, tileMode: TileMode, imageFilter?: ImageFilter | null): ImageFilter; /** * Creates an image filter object with a given color filter effect. @@ -3349,9 +4921,9 @@ declare namespace drawing { /** * Makes an ImageFilter object that instance with the provided x and y offset. - * @param { number } dx - Indicates the offset in the X direction. - * @param { number } dy - Indicates the offset in the Y direction. - * @param { ImageFilter | null } input - Indicates the input image filter used to generate offset effects, or uses + * @param { double } dx - Indicates the offset in the X direction. + * @param { double } dy - Indicates the offset in the Y direction. + * @param { ImageFilter | null } [input] - Indicates the input image filter used to generate offset effects, or uses * the source bitmap if this is null. * @returns { ImageFilter } ImageFilter object. * @static @@ -3359,7 +4931,7 @@ declare namespace drawing { * @crossplatform * @since 20 */ - static createOffsetImageFilter(dx: number, dy: number, input?: ImageFilter | null): ImageFilter; + static createOffsetImageFilter(dx: double, dy: double, input?: ImageFilter | null): ImageFilter; /** * Makes an ImageFilter object that applies the bitmap to the input. @@ -3416,7 +4988,7 @@ declare namespace drawing { } /** * 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 } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -3446,7 +5018,7 @@ declare namespace drawing { /** * 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 } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -3475,7 +5047,7 @@ declare namespace drawing { /** * Enumerates the blur types of a mask filter. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -3512,13 +5084,15 @@ declare namespace drawing { /** * Defines a pen, which is used to describe the style and color to outline a shape. * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ class Pen { /** * A constructor used to create a Pen object. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -3528,7 +5102,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 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(pen: Pen); @@ -3536,22 +5111,43 @@ declare namespace drawing { * 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. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - setMiterLimit(miter: number): void; + /** + * 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 { double } 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: double): void; /** * Obtains the maximum ratio allowed between the sharp corner length of a polyline and its line width. - * @returns { number } Returns the miter limit. + * @returns { double } Returns the miter limit. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getMiterLimit(): number; + /** + * Obtains the maximum ratio allowed between the sharp corner length of a polyline and its line width. + * @returns { double } Returns the miter limit. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + getMiterLimit(): double; /** * Sets the shader effect for this pen. @@ -3564,39 +5160,81 @@ declare namespace drawing { setShaderEffect(shaderEffect: ShaderEffect): void; /** - * 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 - * @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 + * @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; /** - * 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 - * @since 12 - */ - setColor(alpha: number, red: number, green: number, blue: number): void; + * Sets a color for this pen. This API provides better performance than setColor and is recommended. + * @param { int } 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 { int } 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 { int } 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 { int } 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 + * @since 12 + */ + /** + * Sets a color for this pen. This API provides better performance than setColor and is recommended. + * @param { int } 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 { int } 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 { int } 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 { int } 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: int, red: int, green: int, blue: int): void; /** - * Sets a color for this pen. - * @param { number } color - Color in hexadecimal ARGB format. - * @syscap SystemCapability.Graphics.Drawing - * @since 18 - */ - setColor(color: number): void; + * Sets a color for this pen. + * @param { int } color - Color in hexadecimal ARGB format. + * @syscap SystemCapability.Graphics.Drawing + * @since 18 + */ + /** + * Sets a color for this pen. + * @param { int } color - Color in hexadecimal ARGB format. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + setColor(color: int): void; /** * Set the color by four floating point values, unpremultiplied. The color values are interpreted as being in @@ -3629,32 +5267,58 @@ declare namespace drawing { /** * Obtains the color of this pen. - * @returns { number } Returns a 32-bit (ARGB) variable that describes the color of hexadecimal format. + * @returns { int } Returns a 32-bit (ARGB) variable that describes the color of hexadecimal format. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - getHexColor(): number; + /** + * Obtains the color of this pen. + * @returns { int } Returns a 32-bit (ARGB) variable that describes the color of hexadecimal format. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + getHexColor(): int; /** - * 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 - * @since 11 - */ - setStrokeWidth(width: number): void; + * 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 { double } 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 + * @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 { double } 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: double): void; /** * 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. + * @returns { double } Stroke width for the pen, in px. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getWidth(): number; + /** + * Obtains the stroke width of this pen. The width describes the thickness of the outline of a shape. + * @returns { double } Stroke width for the pen, in px. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + getWidth(): double; /** * Enables anti-aliasing for this pen. Anti-aliasing makes the edges of the content smoother. @@ -3679,21 +5343,40 @@ declare namespace drawing { /** * 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. + * @param { int } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - setAlpha(alpha: number): void; + /** + * Sets an alpha value for this pen. + * + * @param { int } 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 + */ + setAlpha(alpha: int): void; /** * Obtains the alpha value of this pen. - * @returns { number } Returns a 8-bit variable that describes the alpha. + * @returns { int } Returns a 8-bit variable that describes the alpha. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getAlpha(): number; + /** + * Obtains the alpha value of this pen. + * @returns { int } Returns a 8-bit variable that describes the alpha. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + getAlpha(): int; /** * Sets a color filter for this pen. @@ -3761,7 +5444,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 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setBlendMode(mode: BlendMode): void; @@ -3819,7 +5503,8 @@ declare namespace drawing { /** * Resets this pen to the initial state. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ reset(): void; /** @@ -3839,13 +5524,15 @@ declare namespace drawing { /** * Defines a brush, which is used to describe the style and color to fill in a shape. * @syscap SystemCapability.Graphics.Drawing - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ class Brush { /** * A constructor used to create a Brush object. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -3855,46 +5542,83 @@ 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 arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(brush: Brush); /** * 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. + * @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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @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; /** * 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. + * @param { int } 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. + * @param { int } 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. + * @param { int } 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. + * @param { int } 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 * @since 12 */ - setColor(alpha: number, red: number, green: number, blue: number): void; + /** + * Sets a color for this brush. This API provides better performance than setColor and is recommended. + * @param { int } 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 { int } 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 { int } 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 { int } 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: int, red: int, green: int, blue: int): void; /** * Sets a color for this brush. - * @param { number } color - Color in hexadecimal ARGB format. + * @param { int } 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 * @since 18 */ - setColor(color: number): void; + /** + * Sets a color for this brush. + * @param { int } 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: int): void; /** * Sets the color by four floating point values, unpremultiplied. The color values are interpreted as being in @@ -3927,11 +5651,18 @@ declare namespace drawing { /** * Obtains the color of this brush. - * @returns { number } Returns a 32-bit (ARGB) variable that describes the color of hexadecimal format. + * @returns { int } Returns a 32-bit (ARGB) variable that describes the color of hexadecimal format. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - getHexColor(): number; + /** + * Obtains the color of this brush. + * @returns { int } Returns a 32-bit (ARGB) variable that describes the color of hexadecimal format. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + getHexColor(): int; /** * Enables anti-aliasing for this brush. Anti-aliasing makes the edges of the content smoother. @@ -3954,21 +5685,39 @@ declare namespace drawing { /** * 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. + * @param { int } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 11 */ - setAlpha(alpha: number): void; + /** + * Sets an alpha value for this brush. + * @param { int } 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 + */ + setAlpha(alpha: int): void; /** * Obtains the alpha value of this brush. - * @returns { number } Returns a 8-bit variable that describes the alpha. + * @returns { int } Returns a 8-bit variable that describes the alpha. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getAlpha(): number; + /** + * Obtains the alpha value of this brush. + * @returns { int } Returns a 8-bit variable that describes the alpha. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + getAlpha(): int; /** * Sets a color filter for this brush. @@ -4033,14 +5782,16 @@ 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 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ setBlendMode(mode: BlendMode): void; /** * Resets this brush to the initial state. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ reset(): void; } @@ -4049,13 +5800,15 @@ declare namespace drawing { * Implements a matrix. * * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ class Matrix { /** * Creates a Matrix object. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -4088,72 +5841,118 @@ declare namespace drawing { /** * 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. + * @param { double } 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 { double } px - X coordinate of the rotation point. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - setRotation(degree: number, px: number, py: number): void; + /** + * Sets this matrix as an identity matrix and rotates it by a given degree around the rotation point (px, py). + * @param { double } 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 { double } px - X coordinate of the rotation point. The value is a floating point number. + * @param { double } 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: double, px: double, py: double): void; /** * 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. + * @param { double } 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 { double } 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 { double } px - X coordinate of the scale point. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - setScale(sx: number, sy: number, px: number, py: number): void; + /** + * Sets this matrix as an identity matrix and scales it with the coefficients (sx, sy) at the scale point (px, py). + * @param { double } 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 { double } 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 { double } px - X coordinate of the scale point. The value is a floating point number. + * @param { double } 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: double, sy: double, px: double, py: double): void; /** * 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. + * @param { double } 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 { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - setTranslation(dx: number, dy: number): void; + /** + * Sets this matrix as an identity matrix and translates it by a given distance (dx, dy). + * @param { double } 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 { double } 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 + */ + setTranslation(dx: double, dy: double): void; /** * Sets the skew transformation with a pivot point. - * @param { number } kx - The skew factor along the x-axis. - * @param { number } ky - The skew factor along the y-axis. - * @param { number } px - The x-coordinate of the point around which to apply the skew. - * @param { number } py - The y-coordinate of the point around which to apply the skew. + * @param { double } kx - The skew factor along the x-axis. + * @param { double } ky - The skew factor along the y-axis. + * @param { double } px - The x-coordinate of the point around which to apply the skew. + * @param { double } py - The y-coordinate of the point around which to apply the skew. * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - setSkew(kx: number, ky: number, px: number, py: number): void; + setSkew(kx: double, ky: double, px: double, py: double): void; /** * Sets the sine and cosine values for a rotation transformation around a point. - * @param { number } sinValue - The sine of the angle of rotation. - * @param { number } cosValue - The cosine of the angle of rotation. - * @param { number } px - The x-coordinate of the point around which to rotate. - * @param { number } py - The y-coordinate of the point around which to rotate. + * @param { double } sinValue - The sine of the angle of rotation. + * @param { double } cosValue - The cosine of the angle of rotation. + * @param { double } px - The x-coordinate of the point around which to rotate. + * @param { double } py - The y-coordinate of the point around which to rotate. * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - setSinCos(sinValue: number, cosValue: number, px: number, py: number): void; + setSinCos(sinValue: double, cosValue: double, px: double, py: double): void; /** * Sets parameters for this matrix. - * @param { Array } values - Each value in the array represents the following parameters: + * @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. @@ -4168,16 +5967,34 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - setMatrix(values: Array): void; + /** + * 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; /** * Sets matrix to the copy of anther matrix object. - * @param { Array | Matrix } matrix - Indicates the Matrix object to copy. + * @param { Array | Matrix } matrix - Indicates the Matrix object to copy. * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - setMatrix(matrix: Array | Matrix): void; + setMatrix(matrix: Array | Matrix): void; /** * Sets matrix to the product of matrix A and matrix B. @@ -4241,126 +6058,237 @@ declare namespace drawing { /** * 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. + * @param { int } index - Index. The value is an integer ranging from 0 to 8. + * @returns { double } 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. + *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getValue(index: number): number; + /** + * Obtains the value of a given index in this matrix. The index ranges from 0 to 8. + * @param { int } index - Index. The value is an integer ranging from 0 to 8. + * @returns { double } 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 + */ + getValue(index: int): double; /** * 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. + * @param { double } 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 { double } px - X coordinate of the rotation point. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - 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 rotated by a + * given degree around the rotation point (px, py). + * @param { double } 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 { double } px - X coordinate of the rotation point. The value is a floating point number. + * @param { double } 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: double, px: double, py: double): void; /** * 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. + * @param { double } 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 { double } 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 { double } px - X coordinate of the scale point. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - 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). - * @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. + * 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 { double } 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 { double } 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 { double } px - X coordinate of the scale point. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + postScale(sx: double, sy: double, px: double, py: double): 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). + * @param { double } 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 { double } 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 * @since 12 */ - postTranslate(dx: number, dy: 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). + * @param { double } 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 { double } 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: double, dy: double): void; /** * 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. + * @param { double } 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 { double } px - X coordinate of the rotation point. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - preRotate(degree: number, px: number, py: number): void; + /** + * 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 { double } 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 { double } px - X coordinate of the rotation point. The value is a floating point number. + * @param { double } 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: double, px: double, py: double): void; /** * Sets matrix to matrix constructed from skewing by (kx, ky) about pivot point (px, py), multiplied by matrix. * This can be thought of as skewing relative to a pivot point after applying matrix. - * @param { number } kx - Indicates the horizontal skew factor. - * @param { number } ky - Indicates the vertical skew factor. - * @param { number } px - Indicates the pivot on x-axis. - * @param { number } py - Indicates the pivot on y-axis. + * @param { double } kx - Indicates the horizontal skew factor. + * @param { double } ky - Indicates the vertical skew factor. + * @param { double } px - Indicates the pivot on x-axis. + * @param { double } py - Indicates the pivot on y-axis. * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - postSkew(kx: number, ky: number, px: number, py: number): void; + postSkew(kx: double, ky: double, px: double, py: double): void; /** * 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. + * @param { double } 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 { double } 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 { double } px - X coordinate of the scale point. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - 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). - * @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. + * 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 { double } 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 { double } 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 { double } px - X coordinate of the scale point. The value is a floating point number. + * @param { double } 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. + *
2. Incorrect parameter types. + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 + */ + preScale(sx: double, sy: double, px: double, py: double): 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). + * @param { double } 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 { double } 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 * @since 12 */ - preTranslate(dx: number, dy: 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). + * @param { double } 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 { double } 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: double, dy: double): void; /** * Sets matrix to matrix multiplied by matrix constructed from skewing by (kx, ky) about pivot point (px, py). * This can be thought of as scaling relative to a pivot point before applying matrix. - * @param { number } kx - Indicates the horizontal skew factor. - * @param { number } ky - Indicates the vertical skew factor. - * @param { number } px - Indicates the pivot on x-axis. - * @param { number } py - Indicates the pivot on y-axis. + * @param { double } kx - Indicates the horizontal skew factor. + * @param { double } ky - Indicates the vertical skew factor. + * @param { double } px - Indicates the pivot on x-axis. + * @param { double } py - Indicates the pivot on y-axis. * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - preSkew(kx: number, ky: number, px: number, py: number): void; + preSkew(kx: double, ky: double, px: double, py: double): void; /** * Resets this matrix to an identity matrix. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ reset(): void; /** @@ -4377,13 +6305,13 @@ declare namespace drawing { /** * Forms a circle by radius and maps it to a ellipse, returns the average radius of the ellipse. * The average radius is equal to the square root of the product of the major axis length and the minor axis length. - * @param { number } radius - circle size to map. - * @returns { number } Return average mapped radius. + * @param { double } radius - circle size to map. + * @returns { double } Return average mapped radius. * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - mapRadius(radius: number): number; + mapRadius(radius: double): double; /** * Obtains all element values of this matrix. @@ -4391,7 +6319,14 @@ declare namespace drawing { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getAll(): Array; + /** + * 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 * with a matrix transformation. As shown in the figure below, the blue rectangle represents the source rectangle, @@ -4425,21 +6360,38 @@ declare namespace drawing { /** * 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. + * @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 { int } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - setPolyToPoly(src: Array, dst: Array, count: number): boolean; + /** + * 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 { int } 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: int): boolean; } /** * Enumerates the modes of scaling a source rectangle into a destination rectangle. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -4476,7 +6428,8 @@ declare namespace drawing { /** * Describes a region, which is used to describe the region where the shape can be drawn. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ class Region { /** @@ -4498,15 +6451,15 @@ declare namespace drawing { /** * Creates a region with a rectangle. - * @param { number } left - Indicates the left edge of the rectangle. - * @param { number } top - Indicates the top edge of the rectangle. - * @param { number } right - Indicates the right edge of the rectangle. - * @param { number } bottom - Indicates the bottom edge of the rectangle. + * @param { int } left - Indicates the left edge of the rectangle. + * @param { int } top - Indicates the top edge of the rectangle. + * @param { int } right - Indicates the right edge of the rectangle. + * @param { int } bottom - Indicates the bottom edge of the rectangle. * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - constructor(left: number, top: number, right: number, bottom: number); + constructor(left: int, top: int, right: int, bottom: int); /** * Query whether this region is equal to the other region. @@ -4557,15 +6510,30 @@ declare namespace drawing { /** * 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. + * @param { int } 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 { int } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - isPointContained(x: number, y:number): boolean; + /** + * Checks whether a point is contained in this region. + * @param { int } 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 { int } 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: int, y:int): boolean; /** * Checks whether another region is contained in this region. @@ -4593,28 +6561,52 @@ declare namespace drawing { /** * Offsets the region by adding dx along the x-axis and dy along the y-axis. - * @param { number } dx - Indicates the x coordinate of the point. The parameter must be an integer. - * @param { number } dy - Indicates the y coordinate of the point. The parameter must be an integer. + * @param { int } dx - Indicates the x coordinate of the point. The parameter must be an integer. + * @param { int } dy - Indicates the y coordinate of the point. The parameter must be an integer. * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - offset(dx: number, dy: number): void; + offset(dx: int, dy: int): void; /** * 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. + * 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 { int } 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 { int } 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 { int } 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 { int } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - quickReject(left: number, top: number, right: number, bottom: number): boolean; + /** + * 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 { int } 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 { int } 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 { int } 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 { int } 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: int, top: int, right: int, bottom: int): boolean; /** * Determines whether region is intersect with another. @@ -4641,17 +6633,38 @@ declare namespace drawing { /** * 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. + * @param { int } 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 { int } 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 { int } 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 { int } 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - setRect(left: number, top: number, right: number, bottom: number): boolean; + /** + * Sets a rectangle. + * @param { int } 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 { int } 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 { int } 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 { int } 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: int, top: int, right: int, bottom: int): boolean; /** * Sets the region to the specified region. @@ -4673,50 +6686,57 @@ declare namespace drawing { /** * Enumerates the operations for combining two regions. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum RegionOp { /** * Difference operation. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DIFFERENCE = 0, /** * Intersect operation. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ INTERSECT = 1, /** * Union operation. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ UNION = 2, /** * Xor operation. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ XOR = 3, /** * Reverse difference operation. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ REVERSE_DIFFERENCE = 4, /** * Replace operation. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ REPLACE = 5 } @@ -4724,7 +6744,7 @@ declare namespace drawing { /** * Enumerates the corner positions of a rounded rectangle. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -4762,7 +6782,7 @@ declare namespace drawing { * 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 } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -4828,17 +6848,17 @@ declare namespace drawing { /** * Makes a 2D rectangular object from boundary coordinates. - * @param { number } left - Indicates the X-coordinate of the left edge. - * @param { number } top - Indicates the Y-coordinate of the top edge. - * @param { number } right - Indicates the X-coordinate of the right edge. - * @param { number } bottom - Indicates the Y-coordinate of the bottom edge. + * @param { double } left - Indicates the X-coordinate of the left edge. + * @param { double } top - Indicates the Y-coordinate of the top edge. + * @param { double } right - Indicates the X-coordinate of the right edge. + * @param { double } bottom - Indicates the Y-coordinate of the bottom edge. * @returns { common2D.Rect } - Returns an Rect object with the specific coordinates (left, top, right, bottom). * @static * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - static makeLtrb(left: number, top: number, right: number, bottom: number) : common2D.Rect; + static makeLtrb(left: double, top: double, right: double, bottom: double) : common2D.Rect; /** * Makes a deep copy of a 2D rectangular object. @@ -4855,49 +6875,49 @@ declare namespace drawing { * Gets the width of a 2D rectangular object. * * @param { common2D.Rect } rect - Indicates the Rect object to query. - * @returns { number } - Returns the width. + * @returns { double } - Returns the width. * @static * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - static getWidth(rect: common2D.Rect): number; + static getWidth(rect: common2D.Rect): double; /** * Gets the height of a 2D rectangular object. * * @param { common2D.Rect } rect - Indicates the Rect object to query. - * @returns { number } - Returns the height. + * @returns { double } - Returns the height. * @static * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - static getHeight(rect: common2D.Rect): number; + static getHeight(rect: common2D.Rect): double; /** * Calculates the x-coordinate of the center point of the 2D rectangular object. * * @param { common2D.Rect } rect - Indicates the Rect object to query. - * @returns { number } - Returns the center X coordinate. + * @returns { double } - Returns the center X coordinate. * @static * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - static centerX(rect: common2D.Rect): number; + static centerX(rect: common2D.Rect): double; /** * Calculates the y-coordinate of the center point of the 2D rectangular object. * * @param { common2D.Rect } rect - Indicates the Rect object to query. - * @returns { number } - Returns the center Y coordinate. + * @returns { double } - Returns the center Y coordinate. * @static * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - static centerY(rect: common2D.Rect): number; + static centerY(rect: common2D.Rect): double; /** * Checks if one 2D rectangular object fully contains another. @@ -4916,46 +6936,46 @@ declare namespace drawing { * Checks if one 2D rectangular object fully contains the specified boundary coordinates. * * @param { common2D.Rect } rect - The container Rect object. - * @param { number } left - Indicates the left boundary of the target region. - * @param { number } top - Indicates the top boundary of the target region. - * @param { number } right - Indicates the right boundary of the target region. - * @param { number } bottom - Indicates the bottom boundary of the target region. + * @param { double } left - Indicates the left boundary of the target region. + * @param { double } top - Indicates the top boundary of the target region. + * @param { double } right - Indicates the right boundary of the target region. + * @param { double } bottom - Indicates the bottom boundary of the target region. * @returns { boolean } - Returns true if 'rect' fully contains the specified boundary coordinates; returns false otherwise. * @static * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - static contains(rect: common2D.Rect, left: number, top: number, right: number, bottom: number): boolean; + static contains(rect: common2D.Rect, left: double, top: double, right: double, bottom: double): boolean; /** * Checks if one 2D rectangular object contains a specific point. * * @param { common2D.Rect } rect - The container Rect object. - * @param { number } x - Indicates the X-coordinate of the point to check. - * @param { number } y - Indicates the Y-coordinate of the point to check. + * @param { double } x - Indicates the X-coordinate of the point to check. + * @param { double } y - Indicates the Y-coordinate of the point to check. * @returns { boolean } - Returns true if 'rect' contains the specified point; returns false otherwise. * @static * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - static contains(rect: common2D.Rect, x: number, y: number): boolean; + static contains(rect: common2D.Rect, x: double, y: double): boolean; /** * Modifies a 2D rectangular's boundaries by inward offsets. * * @param { common2D.Rect } rect - The Rect object to adjust. - * @param { number } left - Indicates the amount to add from the left boundary. - * @param { number } top - Indicates the amount to add from the top boundary. - * @param { number } right - Indicates the amount to substract from the right boundary. - * @param { number } bottom - Indicates the amount to substract from the bottom boundary. + * @param { double } left - Indicates the amount to add from the left boundary. + * @param { double } top - Indicates the amount to add from the top boundary. + * @param { double } right - Indicates the amount to substract from the right boundary. + * @param { double } bottom - Indicates the amount to substract from the bottom boundary. * @static * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - static inset(rect: common2D.Rect, left: number, top: number, right: number, bottom: number): void; + static inset(rect: common2D.Rect, left: double, top: double, right: double, bottom: double): void; /** * Relpace a 2D rectangular object by the intersection of itself and another. @@ -5014,27 +7034,27 @@ declare namespace drawing { * and adding dy to its top and bottom coordinates. * * @param { common2D.Rect } rect - Indicates the Rect object. - * @param { number } dx - Indicates the amount to add to the rectangle's left and right coordinates. - * @param { number } dy - Indicates the amount to add to the rectangle's top and bottom coordinates. + * @param { double } dx - Indicates the amount to add to the rectangle's left and right coordinates. + * @param { double } dy - Indicates the amount to add to the rectangle's top and bottom coordinates. * @static * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - static offset(rect: common2D.Rect, dx: number, dy: number): void; + static offset(rect: common2D.Rect, dx: double, dy: double): void; /** * Offsets the rectangle to a specific position and kepps the width and height unchanged. * * @param { common2D.Rect } rect - Indicates the Rect object. - * @param { number } newLeft - Indicates the new left coordinates. - * @param { number } newTop - Indicates the new top coordinates. + * @param { double } newLeft - Indicates the new left coordinates. + * @param { double } newTop - Indicates the new top coordinates. * @static * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - static offsetTo(rect: common2D.Rect, newLeft: number, newTop: number): void; + static offsetTo(rect: common2D.Rect, newLeft: double, newTop: double): void; /** * Sets the boundary coordinates of a 2D rectangular object with that of another. @@ -5050,16 +7070,16 @@ declare namespace drawing { /** * Sets the boundary coordinates of a 2D rectangular object with that of specific value. * @param { common2D.Rect } rect - Indicates the Rect object to be modified. - * @param { number } left - Indicates the X-coordinate of the left edge. - * @param { number } top - Indicates the Y-coordinate of the top edge. - * @param { number } right - Indicates the X-coordinate of the right edge. - * @param { number } bottom - Indicates the Y-coordinate of the bottom edge. + * @param { double } left - Indicates the X-coordinate of the left edge. + * @param { double } top - Indicates the Y-coordinate of the top edge. + * @param { double } right - Indicates the X-coordinate of the right edge. + * @param { double } bottom - Indicates the Y-coordinate of the bottom edge. * @static * @syscap SystemCapability.Graphics.Drawing * @crossplatform * @since 20 */ - static setLtrb(rect: common2D.Rect, left: number, top: number, right: number, bottom: number): void; + static setLtrb(rect: common2D.Rect, left: double, top: double, right: double, bottom: double): void; /** * Sets the boundary coordinates of a 2D rectangular object to zero. @@ -5100,4 +7120,4 @@ declare namespace drawing { } } -export default drawing; +export default drawing; \ No newline at end of file diff --git a/api/@ohos.graphics.scene.d.ts b/api/@ohos.graphics.scene.d.ts index bb398ee4e3118d486dd4b448e48f093cfe584a79..7f164ea157c1a4d391180d1c6ad51816159ade4a 100644 --- a/api/@ohos.graphics.scene.d.ts +++ b/api/@ohos.graphics.scene.d.ts @@ -24,6 +24,13 @@ * @since 12 */ export { ToneMappingType, ToneMappingSettings, PostProcessSettings, BloomSettings } from './graphics3d/ScenePostProcessSettings'; +/** + * Export post processing settings + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { ToneMappingType, ToneMappingSettings, PostProcessSettings } from './graphics3d/ScenePostProcessSettings'; /** * Export scene types @@ -32,6 +39,13 @@ export { ToneMappingType, ToneMappingSettings, PostProcessSettings, BloomSetting */ export { Vec2, Vec3, Vec4, Color, Rect, Quaternion, Aabb, Position3, Rotation3, Scale3, GeometryType, GeometryDefinition, PrimitiveTopology, CustomGeometry, CubeGeometry, PlaneGeometry, SphereGeometry } from './graphics3d/SceneTypes'; +/** + * Export scene types + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { Vec2, Vec3, Vec4, Color, Rect, Quaternion, Position3, Scale3 } from './graphics3d/SceneTypes'; /** * Export scene resources @@ -42,6 +56,13 @@ export { SceneResourceType, SceneResource, Shader, MaterialType, Material, Shade SubMesh, Mesh, Animation, EnvironmentBackgroundType, Environment, Image, CullMode, Blend, RenderSort, MaterialProperty, MetallicRoughnessMaterial, MeshResource, Morpher, Sampler, SamplerFilter, SamplerAddressMode } from './graphics3d/SceneResources'; +/** + * Export scene resources + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { SceneResource, Animation, EnvironmentBackgroundType, Environment } from './graphics3d/SceneResources'; /** * Export scene nodes @@ -50,6 +71,13 @@ export { SceneResourceType, SceneResource, Shader, MaterialType, Material, Shade */ export { LayerMask, NodeType, Container, Node, Geometry, LightType, Light, SpotLight, DirectionalLight, Camera } from './graphics3d/SceneNodes'; +/** + * Export scene nodes + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { NodeType, Node, LightType, Light, DirectionalLight, Camera } from './graphics3d/SceneNodes'; /** * Export scene @@ -58,3 +86,11 @@ export { LayerMask, NodeType, Container, Node, Geometry, LightType, Light, SpotL */ export { SceneResourceParameters, SceneNodeParameters, SceneResourceFactory, Scene, RaycastResult, RaycastParameters, RenderParameters, RenderResourceFactory, SceneComponent, RenderContext } from './graphics3d/Scene'; +/** + * Export scene + * @syscap SystemCapability.ArkUi.Graphics3D + * @since 20 + * @arkts 1.2 + */ +export { SceneResourceParameters, SceneNodeParameters, SceneResourceFactory, Scene, RenderParameters, + RenderResourceFactory } from './graphics3d/Scene'; diff --git a/api/@ohos.graphics.text.d.ts b/api/@ohos.graphics.text.d.ts index cbf875404c4960cf915e1bb1fc4dfd517fbfdc12..0ed022e33c07521319e538f8ce837a90dff7cd3f 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,52 +274,59 @@ 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; /** * Scale factor for the thickness of the decoration line. The value is a floating point number. * The default value is 1.0. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - decorationThicknessScale?: number; + decorationThicknessScale?: double; } /** * 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,111 +698,125 @@ 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; /** * The value sets special effect radius of blurring 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" + * @type { ?double } 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; + blurRadius?: double; } /** * 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; /** * Left top radius of the rectangle. - * @type { number } it is double type data + * @type { double } 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; + leftTopRadius: double; /** * Right top radius of the rectangle. - * @type { number } it is double type data + * @type { double } 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; + rightTopRadius: double; /** * Right bottom radius of the rectangle. - * @type { number } it is double type data + * @type { double } 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; + rightBottomRadius: double; /** * Left bottom radius of the rectangle. - * @type { number } it is double type data + * @type { double } 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; + leftBottomRadius: double; } /** * 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 + * @type { int } feature value * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - value: number; + value: int; } /** * 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 + * @type { double } variation value * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - value: number; + value: double; } /** @@ -759,7 +850,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 +859,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 +868,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 +879,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 +888,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 +897,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,44 +906,49 @@ 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; /** * 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 + * @type { ?double } 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; + fontSize?: double; /** * Letter spacing, in units of px. The value is a floating point number. * The default value is 0.0. A positive value causes characters to spread farther apart, * and a negative value bring characters closer together. - * @type { ?number } it is double type data + * @type { ?double } 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; + letterSpacing?: double; /** * 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 + * @type { ?double } 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; + wordSpacing?: double; /** * 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 + * @type { ?double } 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; + heightScale?: double; /** * Whether half leading is enabled. @@ -854,7 +956,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 +967,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 +976,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 +985,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,23 +995,26 @@ 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; /** * Shift of the baseline. The value is a floating point number. The default value is 0.0px. - * @type { ?number } it is double type data. + * @type { ?double } 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; + baselineShift?: double; /** * 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 +1022,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 +1031,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 +1040,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; @@ -945,14 +1057,16 @@ declare namespace text { /** * 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 +1078,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 +1094,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 +1135,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 +1146,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 +1163,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 +1172,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,40 +1183,45 @@ 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; /** * 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 + * @type { ?double } 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; + fontSize?: double; /** * 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 + * @type { ?double } 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; + height?: double; /** * 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 + * @type { ?double } 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; + leading?: double; /** * Whether to forcibly use the strut height for all lines. The value true means to forcibly use the strut height * 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 +1230,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 +1240,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 +1251,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 +1261,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 +1278,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 +1287,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,23 +1296,26 @@ 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; /** * Maximum number of lines. The value is an integer. The default value is 1e9. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - maxLines?: number; + maxLines?: int; /** * 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 +1323,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 +1332,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 +1343,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; @@ -1305,19 +1444,19 @@ declare namespace text { interface PlaceholderSpan { /** * Width of the placeholder, in units of px. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - width: number; + width: double; /** * Height of the placeholder, in units of px. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - height: number; + height: double; /** * Vertical alignment of the placeholder relative to the surrounding text. @@ -1337,11 +1476,11 @@ declare namespace text { /** * Offset to the text baseline, in units of px. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - baselineOffset: number; + baselineOffset: double; } /** @@ -1353,19 +1492,19 @@ declare namespace text { interface Range { /** * Index of the leftmost point of the interval. The value is an integer. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - start: number; + start: int; /** * Index of the rightmost point of the interval. The value is an integer. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - end: number; + end: int; } /** @@ -1469,20 +1608,20 @@ declare namespace text { /** * Font width. The value is an integer ranging from 1 to 9. The default value is 0. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Graphics.Drawing * @since 14 */ - width?: number; + width?: int; /** * Whether the font is italic. The value 0 means that the font is not italic, and 1 means the opposite. * The default value is 0. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Graphics.Drawing * @since 14 */ - italic?: number; + italic?: int; /** * Whether the font is monospaced. The value true means that the font is monospaced, and false means the opposite. @@ -1507,117 +1646,122 @@ 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. + * @param { double } 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; + layoutSync(width: double): void; /** * Performs layout and calculates the positions of all glyphs. This API uses a promise to return the result. - * @param { number } width - Maximum width of a single line, in units of px. The value is a floating point number. + * @param { double } width - Maximum width of a single line, in units of px. The value is a floating point number. * @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. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - layout(width: number): Promise; + layout(width: double): Promise; /** * Paints the text on the canvas with the coordinate point (x, y) as the upper left corner. * @param { drawing.Canvas } canvas - Target canvas. - * @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. + * @param { double } x - X coordinate of the upper left corner. The value is a floating point number. + * @param { double } 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; + paint(canvas: drawing.Canvas, x: double, y: double): void; /** * Draw the laid out text onto the supplied canvas along the path and offset. * @param { drawing.Canvas } canvas - Canvas used to carry the drawn content and drawing status. * @param { drawing.Path } path - Path used to determine the position of the text. - * @param { number } hOffset - Horizontal offset along the path direction. A positive number indicates a position + * @param { double } hOffset - Horizontal offset along the path direction. A positive number indicates a position * that is ahead along the path from its start point, and a negative number indicates a position that is behind * from the start point. - * @param { number } vOffset - Vertical offset along the path direction. A positive number indicates a position + * @param { double } 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; + paintOnPath(canvas: drawing.Canvas, path: drawing.Path, hOffset: double, vOffset: double): void; /** * Obtains the maximum width of the line in the text. - * @returns { number } Maximum line width, in units of px. The value is a floating point number. + * @returns { double } Maximum line width, in units of px. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getMaxWidth(): number; + getMaxWidth(): double; /** * Obtains the total height of the text. - * @returns { number } Total height, in units of px. The value is a floating point number. + * @returns { double } Total height, in units of px. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getHeight(): number; + getHeight(): double; /** * Obtains the longest line in the text. - * @returns { number } Longest line, in units of px. The value is a floating point number. + * @returns { double } 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; + getLongestLine(): double; /** * Obtains the width of the longest line, including its indentation, in the text. * You are advised to round up the return value. If the text content is empty, 0 is returned. - * @returns { number } Width of the longest line, including its indentation. + * @returns { double } Width of the longest line, including its indentation. * The value is a floating point number, in px. * @syscap SystemCapability.Graphics.Drawing * @since 13 */ - getLongestLineWithIndent(): number; + getLongestLineWithIndent(): double; /** * Obtains the minimum intrinsic width of the paragraph. - * @returns { number } Minimum intrinsic width, in units of px. The value is a floating point number. + * @returns { double } Minimum intrinsic width, in units of px. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getMinIntrinsicWidth(): number; + getMinIntrinsicWidth(): double; /** * Obtains the maximum intrinsic width of the paragraph. - * @returns { number } Maximum intrinsic width, in units of px. The value is a floating point number. + * @returns { double } Maximum intrinsic width, in units of px. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getMaxIntrinsicWidth(): number; + getMaxIntrinsicWidth(): double; /** * Obtains the alphabetic baseline. - * @returns { number } Alphabetic baseline, in units of px. The value is a floating point number. + * @returns { double } Alphabetic baseline, in units of px. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getAlphabeticBaseline(): number; + getAlphabeticBaseline(): double; /** * Obtains the ideographic baseline. - * @returns { number } Ideographic baseline, in units of px. The value is a floating point number. + * @returns { double } Ideographic baseline, in units of px. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getIdeographicBaseline(): number; + getIdeographicBaseline(): double; /** * Obtains the rectangles occupied by the characters in the range of the text under the given rectangle width and @@ -1641,48 +1785,48 @@ declare namespace text { /** * Obtains the position of a glyph closest to the given coordinates. - * @param { number } x - X coordinate. The value is a floating point number. - * @param { number } y - Y coordinate. The value is a floating point number. + * @param { double } x - X coordinate. The value is a floating point number. + * @param { double } y - Y coordinate. The value is a floating point number. * @returns { PositionWithAffinity } Position of the glyph. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getGlyphPositionAtCoordinate(x: number, y: number): PositionWithAffinity; + getGlyphPositionAtCoordinate(x: double, y: double): PositionWithAffinity; /** * Obtains the range of the word where the glyph with a given offset is located. - * @param { number } offset - Offset of the glyph. The value is an integer. + * @param { int } offset - Offset of the glyph. The value is an integer. * @returns { Range } Range of the word. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getWordBoundary(offset: number): Range; + getWordBoundary(offset: int): Range; /** * Obtains the number of text lines. - * @returns { number } Number of text lines. The value is an integer. + * @returns { int } Number of text lines. The value is an integer. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getLineCount(): number; + getLineCount(): int; /** * Obtains the height of a given line. - * @param { number } line - Index of the line. The value is an integer ranging from 0 to getLineCount() – 1. - * @returns { number } The line height value returned to the caller. + * @param { int } line - Index of the line. The value is an integer ranging from 0 to getLineCount() – 1. + * @returns { double } The line height value returned to the caller. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getLineHeight(line: number): number; + getLineHeight(line: int): double; /** * Obtains the width of a given line. - * @param { number } line - Index of the line. The value is an integer ranging from 0 to getLineCount() – 1. - * @returns { number } The line width value returned to the caller. + * @param { int } line - Index of the line. The value is an integer ranging from 0 to getLineCount() – 1. + * @returns { double } The line width value returned to the caller. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getLineWidth(line: number): number; + getLineWidth(line: int): double; /** * Checks whether the number of lines in the paragraph exceeds the maximum. @@ -1703,7 +1847,7 @@ declare namespace text { /** * Obtains the actually visible text range in the specified line, excluding any overflow ellipsis. - * @param { number } lineNumber - Line number of the text range, starting from 0. This API can only be used to + * @param { int } lineNumber - Line number of the text range, starting from 0. This API can only be used to * obtain the bounds of existing lines. That is, the line number must start from 0, and the maximum line number * is getLineCount - 1. * @param { boolean } includeSpaces - Whether spaces are included. The value true means that spaces are contained, @@ -1712,26 +1856,28 @@ declare namespace text { * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getActualTextRange(lineNumber: number, includeSpaces: boolean): Range; + getActualTextRange(lineNumber: int, includeSpaces: boolean): Range; /** * 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; /** * Obtains the line measurement information of a line. - * @param { number } lineNumber - Line number, starting from 0. + * @param { int } lineNumber - Line number, starting from 0. * @returns { LineMetrics | undefined } LineMetrics object containing the measurement information if the specified * 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; + getLineMetrics(lineNumber: int): LineMetrics | undefined; /** * Synchronously updates the text color of the typography. @@ -1760,22 +1906,22 @@ declare namespace text { class LineTypeset { /** * Obtains the number of characters that can fit in the layout from the specified position within a limited width. - * @param { number } startIndex - Start position (inclusive) for calculation. The value is an integer in the range + * @param { int } startIndex - Start position (inclusive) for calculation. The value is an integer in the range * [0, total number of text characters). If the parameter is invalid, an exception is thrown. - * @param { number } width - Layout width. The value is a floating point number greater than 0, in px. - * @returns { number } Number of characters. + * @param { double } width - Layout width. The value is a floating point number greater than 0, in px. + * @returns { int } Number of characters. * @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 */ - getLineBreak(startIndex: number, width: number): number; + getLineBreak(startIndex: int, width: double): int; /** * Generates a text line object based on the specified layout range. - * @param { number } startIndex - Start position for layout calculation. The value is an integer in the + * @param { int } startIndex - Start position for layout calculation. The value is an integer in the * range [0, total number of text characters). - * @param { number } count - Number of characters from the specified start position. The value is an integer in + * @param { int } count - Number of characters from the specified start position. The value is an integer in * the range [0, total number of text characters). The sum of startIndex and count cannot be greater than * the total number of text characters. When count is 0, the range is [startIndex, end of the text]. * You can use getLineBreak to obtain the number of characters that can fit in the layout. @@ -1785,7 +1931,7 @@ declare namespace text { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - createLine(startIndex: number, count: number): TextLine; + createLine(startIndex: int, count: int): TextLine; } /** @@ -1821,11 +1967,11 @@ declare namespace text { interface PositionWithAffinity { /** * Index of the glyph relative to the paragraph. The value is an integer. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - position: number; + position: int; /** * Affinity of the position. @@ -1936,7 +2082,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 +2091,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 +2104,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 +2122,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 +2140,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; @@ -2003,13 +2155,13 @@ declare namespace text { /** * Inserts a symbol into the paragraph being built. - * @param { number } symbolId - Symbol code to insert. The value is a hexadecimal number in the + * @param { int } symbolId - Symbol code to insert. The value is a hexadecimal number in the * range 0xF0000-0xF0C97. For details about the configurable symbol codes (unicode values in the list view), * see HarmonyOS Symbol. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - addSymbol(symbolId: number): void; + addSymbol(symbolId: int): void; } /** @@ -2024,35 +2176,35 @@ declare namespace text { interface TypographicBounds { /** * Ascent of a text line. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - ascent: number; + ascent: double; /** * Descent of a text line. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - descent: number; + descent: double; /** * Leading of a text line. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - leading: number; + leading: double; /** * Width of the typographic boundaries. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - width: number; + width: double; } /** @@ -2060,8 +2212,8 @@ declare namespace text { * as its parameters. * * @typedef { function } CaretOffsetsCallback - * @param { number } offset - Offset of each character in a text line. The value is a floating point number. - * @param { number } index - Index of each character in a text line. The value is an integer. + * @param { int } offset - Offset of each character in a text line. The value is a floating point number. + * @param { int } index - Index of each character in a text line. The value is an integer. * @param { boolean } leadingEdge - Whether the cursor is located at the front of the character. The value true means * that the cursor is located at the front of the character, that is, the offset does not contain the character * width. The value false means that the cursor is located at the rear of the character, that is, the offset @@ -2072,7 +2224,7 @@ declare namespace text { * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - type CaretOffsetsCallback = (offset: number, index: number, leadingEdge: boolean) => boolean; + type CaretOffsetsCallback = (offset: int, index: int, leadingEdge: boolean) => boolean; /** * Implements a carrier that describes the basic text line structure of a paragraph. @@ -2084,11 +2236,11 @@ declare namespace text { class TextLine { /** * Obtains the number of glyphs in this text line. - * @returns { number } Number of glyphs. The value is an integer. + * @returns { int } Number of glyphs. The value is an integer. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getGlyphCount(): number; + getGlyphCount(): int; /** * Obtains the range of the text in this text line in the entire paragraph. @@ -2109,23 +2261,23 @@ declare namespace text { /** * Paints this text line on the canvas with the coordinate point (x, y) as the upper left corner. * @param { drawing.Canvas } canvas - Target canvas. - * @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. + * @param { double } x - X coordinate of the upper left corner. The value is a floating point number. + * @param { double } y - Y coordinate of the upper left corner. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - paint(canvas: drawing.Canvas, x: number, y: number): void; + paint(canvas: drawing.Canvas, x: double, y: double): void; /** * Creates a truncated text line object. - * @param { number } width - Width of the line after truncation. The value is a floating point number. + * @param { double } width - Width of the line after truncation. The value is a floating point number. * @param { EllipsisMode } ellipsisMode - Ellipsis mode. Currently, only START and END are supported. * @param { string } ellipsis - String used to mark a truncation. * @returns { TextLine } Truncated text line object. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - createTruncatedLine(width: number, ellipsisMode: EllipsisMode, ellipsis: string): TextLine; + createTruncatedLine(width: double, ellipsisMode: EllipsisMode, ellipsis: string): TextLine; /** * Obtains the typographic boundaries of this text line. These boundaries depend on the typographic font and font @@ -2154,29 +2306,29 @@ declare namespace text { /** * Obtains the width of the spaces at the end of this text line. - * @returns { number } Number of spaces at the end of the text line. The value is a floating point number. + * @returns { double } Number of spaces at the end of the text line. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - getTrailingSpaceWidth(): number; + getTrailingSpaceWidth(): double; /** * Obtains the index of a character at the specified position in the original string. * @param { common2D.Point } point - Position of the character. - * @returns { number } Index of the character in the text line. The value is an integer. + * @returns { int } Index of the character in the text line. The value is an integer. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - getStringIndexForPosition(point: common2D.Point): number; + getStringIndexForPosition(point: common2D.Point): int; /** * Obtains the offset of a character with the specified index in this text line. - * @param { number } index - Index of the character. The value is an integer. - * @returns { number } Offset of the character with the specified index. The value is a floating point number. + * @param { int } index - Index of the character. The value is an integer. + * @returns { double } Offset of the character with the specified index. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - getOffsetForStringIndex(index: number): number; + getOffsetForStringIndex(index: int): double; /** * Enumerates the offset and index of each character in a text line. @@ -2189,18 +2341,18 @@ declare namespace text { /** * Obtains the offset of this text line after alignment based on the alignment factor and alignment width. - * @param { number } alignmentFactor - Alignment factor, which determines how text is aligned. The value is a + * @param { double } alignmentFactor - Alignment factor, which determines how text is aligned. The value is a * floating point number. A value less than or equal to 0.0 means that the text is left-aligned; a value * between 0.0 and 0.5 means that the text is slightly left-aligned; the value 0.5 means that is text * is centered; a value between 0.5 and 1 means that the text is slightly right-aligned; a value greater than * or equal to 1.0 means that the text is right-aligned. - * @param { number } alignmentWidth - Alignment width, that is, the width of the text line. The value is a floating + * @param { double } alignmentWidth - Alignment width, that is, the width of the text line. The value is a floating * point number. If the width is less than the actual width of the text line, 0 is returned. - * @returns { number } Offset required for alignment. The value is a floating point number. + * @returns { double } Offset required for alignment. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - getAlignmentOffset(alignmentFactor: number, alignmentWidth: number): number; + getAlignmentOffset(alignmentFactor: double, alignmentWidth: double): double; } /** @@ -2212,19 +2364,19 @@ declare namespace text { class Run { /** * Obtains the number of glyphs in this run. - * @returns { number } Number of glyphs. The value is an integer. + * @returns { int } Number of glyphs. The value is an integer. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getGlyphCount(): number; + getGlyphCount(): int; /** * Obtains the index of each glyph in this run. - * @returns { Array } Array holding the index of each glyph in the run. + * @returns { Array } Array holding the index of each glyph in the run. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - getGlyphs(): Array; + getGlyphs(): Array; /** * Obtains the index of each glyph in the specified range of this run. @@ -2232,11 +2384,11 @@ declare namespace text { * range. end indicates the length of the range. If the length is 0, the range is from range.start to the end * of the run. If range.end or range.start is set to a negative value, null, or undefined, undefined is * returned. - * @returns { Array } Array holding the index of each glyph in the run. + * @returns { Array } Array holding the index of each glyph in the run. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - getGlyphs(range: Range): Array; + getGlyphs(range: Range): Array; /** * Obtains the position of each glyph relative to the respective line in this run. @@ -2278,25 +2430,25 @@ declare namespace text { /** * Paints this run on the canvas with the coordinate point (x, y) as the upper left corner. * @param { drawing.Canvas } canvas - Target canvas. - * @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. + * @param { double } x - X coordinate of the upper left corner. The value is a floating point number. + * @param { double } y - Y coordinate of the upper left corner. The value is a floating point number. * @syscap SystemCapability.Graphics.Drawing * @since 12 */ - paint(canvas: drawing.Canvas, x: number, y: number): void; + paint(canvas: drawing.Canvas, x: double, y: double): void; /** * Obtains an array of character indices for glyphs within a specified range of this run, where the indices are * offsets relative to the entire paragraph. - * @param { Range } range - Range of the glyphs, where range.start indicates the start position of the range, and + * @param { Range } [range] - Range of the glyphs, where range.start indicates the start position of the range, and * range.end indicates the length of the range. If the length is 0, the range is from range.start to the end of * the run. If range.end or range.start is set to a negative value, null, or undefined, undefined is returned. * If this parameter is not passed, the entire run is obtained. - * @returns { Array } Array of character indices. + * @returns { Array } Array of character indices. * @syscap SystemCapability.Graphics.Drawing * @since 18 */ - getStringIndices(range?: Range): Array; + getStringIndices(range?: Range): Array; /** * Obtains the range of glyphs generated by this run. @@ -2352,14 +2504,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 +2521,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,98 +2531,110 @@ 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 } + * @type { int } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - startIndex: number; + startIndex: int; /** * End index of the line in the text buffer. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - endIndex: number; + endIndex: int; /** * Ascent, that is, the distance from the baseline to the top of the character. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - ascent: number; + ascent: double; /** * Descent, that is, the distance from the baseline to the bottom of the character. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - descent: number; + descent: double; /** * Height of the line, which is Math.round(ascent + descent). - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - height: number; + height: double; /** * Width of the line. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - width: number; + width: double; /** * Left edge of the line. The right edge is the value of left plus the value of width. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - left: number; + left: double; /** * Y coordinate of the baseline in the line relative to the top of the paragraph. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - baseline: number; + baseline: double; /** * Line number, starting from 0. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - lineNumber: number; + lineNumber: int; /** * Height from the top to the current line. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - topHeight: number; + topHeight: double; /** * Mapping between text index ranges and the FontMetrics associated with * them. The first run will be keyed under start_index. The metrics here. * are before layout and are the base values we calculate from. - * @type { Map } + * @type { Map } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts{ '1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - runMetrics: Map; + runMetrics: Map; } /** @@ -2515,7 +2682,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,18 +2692,20 @@ 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 } + * @type { double } * @syscap SystemCapability.Graphics.Drawing - * @since 18 + * @since arkts{ '1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - location: number; + location: double; } /** diff --git a/api/@ohos.graphics.uiEffect.d.ts b/api/@ohos.graphics.uiEffect.d.ts index 929fbdc1dbde733fbc6ded31ea5204e6fe17dbeb..e1761d612b5f30e340b4511986c28287606880fa 100644 --- a/api/@ohos.graphics.uiEffect.d.ts +++ b/api/@ohos.graphics.uiEffect.d.ts @@ -19,10 +19,7 @@ */ import { AsyncCallback } from './@ohos.base'; -/*** if arkts 1.1 */ -import type common2D from './@ohos.graphics.common2D'; -import type image from './@ohos.multimedia.image'; -/*** endif */ + /** * @namespace uiEffect @@ -31,7 +28,6 @@ import type image from './@ohos.multimedia.image'; * @arkts 1.1&1.2 */ declare namespace uiEffect { - /** * The Filter for Component. * @typedef Filter @@ -43,60 +39,64 @@ declare namespace uiEffect { /** * Set the edge pixel stretch effect of the Component. * - * @param { Array } stretchSizes + * @param { Array } stretchSizes * @param { TileMode } tileMode * @returns { Filter } * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - pixelStretch(stretchSizes: Array, tileMode: TileMode): Filter; + pixelStretch(stretchSizes: Array, tileMode: TileMode): Filter; /** * Set blur effect of the Component. * - * @param { number } blurRadius + * @param { double } blurRadius * @returns { Filter } * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - blur(blurRadius: number): Filter; + blur(blurRadius: double): Filter; /** * Set waterRipple effect of the Component. * - * @param { number } progress - Indicates the ripple progress. The value 1 indicates that ripples are displayed on all screens. - * @param { number } waveCount - The number of waves when the water ripples. The maximum count of waves is 3, the minimum value is 1, default is 2. - * @param { number } x - Represents the X-axis position of center point where the water ripple first appears on the screen. - * @param { number } y - Represents the Y-axis position of center point where the water ripple first appears on the screen. + * @param { double } progress - Indicates the ripple progress. The value 1 indicates that ripples are displayed on all screens. + * @param { int } waveCount - The number of waves when the water ripples. The maximum count of waves is 3, the minimum value is 1, default is 2. + * @param { double } x - Represents the X-axis position of center point where the water ripple first appears on the screen. + * @param { double } y - Represents the Y-axis position of center point where the water ripple first appears on the screen. * @param { WaterRippleMode } rippleMode - Set the mode of water ripple, * 0 for mobile to desktop(Receive), 1 for mobile to desktop(Send), 2 for mobile to mobile, 3 for cross platform. * @returns { Filter } - Returns water ripple Filter. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - waterRipple(progress: number, waveCount: number, x: number, y: number, rippleMode: WaterRippleMode): Filter; + waterRipple(progress: double, waveCount: int, x: double, y: double, rippleMode: WaterRippleMode): Filter; /** * Set the fly in or fly out effect of the component. * - * @param { number } degree - set the degree of fly in or fly out effect, value range [0, 1]. + * @param { double } degree - set the degree of fly in or fly out effect, value range [0, 1]. * @param { FlyMode } flyMode - set the location of stretching when fly in or out * If the value is 0, the component keep same, else the value is 1, component are fully fly out or fly in. * @returns { Filter } - Returns fly in fly out Filter. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - flyInFlyOutEffect(degree: number, flyMode: FlyMode): Filter; + flyInFlyOutEffect(degree: double, flyMode: FlyMode): Filter; /** * Set distort effect of the component. * - * @param { number } distortionK - set the degree of distort effect, value range [-1, 1]. + * @param { double } distortionK - set the degree of distort effect, value range [-1, 1]. * If the value is 0, the component keep same, * if the value is less than 0, the component is barrel distortion, * if the value is more than 0, the component is pincushion distortion. @@ -104,23 +104,24 @@ declare namespace uiEffect { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ - distort(distortionK: number): Filter; + distort(distortionK: double): Filter; /** * 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 { double } 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: double, gradientParam: LinearGradientBlurOptions): Filter; /** * Sets the deformation effect controlled by bezier curves of the component. @@ -139,7 +140,7 @@ declare namespace uiEffect { * * @param { common2D.Point3d } lightPosition * @param { common2D.Color } lightColor - * @param { number } lightIntensity + * @param { double } lightIntensity * @param { Mask } [displacementMap] * @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. @@ -147,7 +148,7 @@ declare namespace uiEffect { * @systemapi * @since 20 */ - contentLight(lightPosition: common2D.Point3d, lightColor: common2D.Color, lightIntensity: number, + contentLight(lightPosition: common2D.Point3d, lightColor: common2D.Color, lightIntensity: double, displacementMap?: Mask): Filter; /** @@ -155,7 +156,7 @@ declare namespace uiEffect { * * @param { Array } colors * @param { Array } positions - * @param { Array } strengths + * @param { Array } strengths * @param { Mask } [alphaMask] * @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. @@ -163,13 +164,13 @@ declare namespace uiEffect { * @systemapi * @since 20 */ - colorGradient(colors: Array, positions: Array, strengths: Array, + colorGradient(colors: Array, positions: Array, strengths: Array, alphaMask?: Mask): Filter; /** * Detects and glows edges of contents. * - * @param { number } alpha + * @param { double } alpha * @param { Color } [color] * @param { Mask } [mask] * @param { boolean } [bloom] @@ -179,57 +180,103 @@ declare namespace uiEffect { * @systemapi * @since 20 */ - edgeLight(alpha: number, color?: Color, mask?: Mask, bloom?: boolean): Filter; + edgeLight(alpha: double, color?: Color, mask?: Mask, bloom?: boolean): Filter; /** * Sets distort effect with displacement map. * * @param { Mask } displacementMap - * @param { [number, number] } [factor] + * @param { [double, double] } [factor] * @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 */ - displacementDistort(displacementMap: Mask, factor?: [number, number]): Filter; + displacementDistort(displacementMap: Mask, factor?: [double, double]): Filter; /** * Sets dispersion effect with mask map. * * @param { Mask } dispersionMap - * @param { number } alpha - * @param { [number, number] } [rFactor] - * @param { [number, number] } [gFactor] - * @param { [number, number] } [bFactor] + * @param { double } alpha + * @param { [double, double] } [rFactor] + * @param { [double, double] } [gFactor] + * @param { [double, double] } [bFactor] * @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 */ - maskDispersion(dispersionMap: Mask, alpha: number, rFactor?: [number, number], gFactor?: [number, number], - bFactor?: [number, number]): Filter; + maskDispersion(dispersionMap: Mask, alpha: double, rFactor?: [double, double], gFactor?: [double, double], + bFactor?: [double, double]): Filter; /** * Applies a high dynamic range (HDR) brightness enhancement filter to the component. - * @param { number } ratio - The brightness multiplier ratio (1.0 = original, >1.0 = brighter). + * @param { double } ratio - The brightness multiplier ratio (1.0 = original, >1.0 = brighter). * @returns { Filter } - Returns hdr brightness Filter. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since 20 */ - hdrBrightnessRatio(ratio: number): Filter; + hdrBrightnessRatio(ratio: double): Filter; + + /** + * Sets variable radius blur effect with radius map. + * + * @param { double } 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: double, 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 { double } intensity - Intensity of light + * @param { Mask } [mask] - Mask, as a displacement map that affects lighting effects + * @param { double } [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: double, mask?: Mask, factor?: double): Filter; + + /** + * Applies Transition with alpha mask + * + * @param { Mask } alphaMask - Animatable mask object + * @param { double } [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?: double, inverse?: boolean): Filter; } /** * TileMode enumeration description * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum TileMode { /** @@ -237,7 +284,8 @@ declare namespace uiEffect { * * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CLAMP = 0, @@ -246,7 +294,8 @@ declare namespace uiEffect { * * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ REPEAT = 1, @@ -255,7 +304,8 @@ declare namespace uiEffect { * * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ MIRROR = 2, @@ -264,7 +314,8 @@ declare namespace uiEffect { * * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DECAL = 3, } @@ -272,10 +323,11 @@ declare namespace uiEffect { /** * WaterRippleMode enumeration description * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum WaterRippleMode { /** @@ -283,7 +335,8 @@ declare namespace uiEffect { * * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SMALL2MEDIUM_RECV = 0, @@ -292,7 +345,8 @@ declare namespace uiEffect { * * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SMALL2MEDIUM_SEND = 1, @@ -301,7 +355,8 @@ declare namespace uiEffect { * * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SMALL2SMALL = 2, @@ -310,7 +365,8 @@ declare namespace uiEffect { * * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 17 + * @since arkts {'1.1':'17', '1.2':'20'} + * @arkts 1.1&1.2 */ MINI_RECV = 3, } @@ -318,10 +374,11 @@ declare namespace uiEffect { /** * FlyMode enumeration description * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FlyMode { /** @@ -329,7 +386,8 @@ declare namespace uiEffect { * * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ BOTTOM = 0, @@ -338,7 +396,8 @@ declare namespace uiEffect { * * @syscap SystemCapability.Graphics.Drawing * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ TOP = 1, } @@ -363,20 +422,20 @@ declare namespace uiEffect { backgroundColorBlender(blender: BrightnessBlender): VisualEffect; /** - * Sets the border light effect. - * - * @param { common2D.Point3d } lightPosition - * @param { common2D.Color } lightColor - * @param { number } lightIntensity - * @param { number } borderWidth - * @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 - */ - borderLight(lightPosition: common2D.Point3d, lightColor: common2D.Color, lightIntensity: number, - borderWidth: number): VisualEffect; + * Sets the border light effect. + * + * @param { common2D.Point3d } lightPosition + * @param { common2D.Color } lightColor + * @param { double } lightIntensity + * @param { double } borderWidth + * @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 + */ + borderLight(lightPosition: common2D.Point3d, lightColor: common2D.Color, lightIntensity: double, + borderWidth: double): VisualEffect; } /** @@ -401,90 +460,90 @@ declare namespace uiEffect { /** * Defines third-order rate for grayscale adjustment. * - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - cubicRate: number; + cubicRate: double; /** * Defines second-order rate for grayscale adjustment. * - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - quadraticRate: number; + quadraticRate: double; /** * Defines linear rate for grayscale adjustment. * - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - linearRate: number; + linearRate: double; /** * Defines grayscale adjustment degree. * - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - degree: number; + degree: double; /** * Defines the reference saturation for brightness. * - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - saturation: number; + saturation: double; /** * Defines the positive adjustment coefficients in RGB channels based on the reference saturation. * - * @type { [number, number, number] } + * @type { [double, double, double] } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - positiveCoefficient: [number, number, number]; + positiveCoefficient: [double, double, double]; /** * Defines the negative adjustment coefficients in RGB channels based on the reference saturation. * - * @type { [number, number, number] } + * @type { [double, double, double] } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - negativeCoefficient: [number, number, number]; + negativeCoefficient: [double, double, double]; /** * Defines the blending fraction for brightness effect. * - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - fraction: number; + fraction: double; } /** @@ -497,36 +556,36 @@ declare namespace uiEffect { interface Color { /** * Red component of color. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since 20 */ - red: number; + red: double; /** * Green component of color. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since 20 */ - green: number; + green: double; /** * Blue component of color - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since 20 */ - blue: number; + blue: double; /** * Alpha component of color. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since 20 */ - alpha: number; + alpha: double; } /** @@ -540,9 +599,9 @@ declare namespace uiEffect { /** * Create a Mask of ripple. * @param { common2D.Point } center - * @param { number } radius - * @param { number } width - * @param { number } [offset] + * @param { double } radius + * @param { double } width + * @param { double } [offset] * @returns { Mask } * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @static @@ -550,7 +609,7 @@ declare namespace uiEffect { * @systemapi * @since 20 */ - static createRippleMask(center: common2D.Point, radius: number, width: number, offset?: number): Mask; + static createRippleMask(center: common2D.Point, radius: double, width: double, offset?: double): Mask; /** * Create a Mask of pixelmap. @@ -571,9 +630,9 @@ declare namespace uiEffect { /** * Create a Mask of radial gradient. * @param { common2D.Point } center - * @param { number } radiusX - * @param { number } radiusY - * @param { Array<[number, number]> } values + * @param { double } radiusX + * @param { double } radiusY + * @param { Array<[double, double]> } gradients * @returns { Mask } * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @static @@ -581,15 +640,33 @@ declare namespace uiEffect { * @systemapi * @since 20 */ - static createRadialGradientMask(center: common2D.Point, radiusX: number, radiusY: number, - values: Array<[number, number]>): Mask; + static createRadialGradientMask(center: common2D.Point, radiusX: double, radiusY: double, + gradients: Array<[double, double]>): Mask; + + /** + * Create a Mask of single wave gradient. + * @param { common2D.Point } center - The wave source center of the single-wave mask. + * @param { double } width - The circular ring width of the single-wave mask. + * @param { double } propagationRadius - The outer diffusion radius of the single-wave mask. + * @param { double } blurRadius - The blur radius of the single-wave mask. + * @param { double } [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: double, propagationRadius: double, + blurRadius: double, turbulenceStrength?: double): Mask; } /** * Create a Filter to add multiple effects to the component. * @returns { Filter } Returns the head node of Filter. * @syscap SystemCapability.Graphics.Drawing - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function createFilter(): Filter; @@ -626,90 +703,90 @@ declare interface BrightnessBlenderParam { /** * Defines third-order rate for grayscale adjustment. * - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - cubicRate: number; + cubicRate: double; /** * Defines second-order rate for grayscale adjustment. * - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - quadraticRate: number; + quadraticRate: double; /** * Defines linear rate for grayscale adjustment. * - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - linearRate: number; + linearRate: double; /** * Defines grayscale adjustment degree. * - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - degree: number; + degree: double; /** * Defines the reference saturation for brightness. * - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - saturation: number; + saturation: double; /** * Defines the positive adjustment coefficients in RGB channels based on the reference saturation. * - * @type { [number, number, number] } + * @type { [double, double, double] } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - positiveCoefficient: [number, number, number]; + positiveCoefficient: [double, double, double]; /** * Defines the negative adjustment coefficients in RGB channels based on the reference saturation. * - * @type { [number, number, number] } + * @type { [double, double, double] } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - negativeCoefficient: [number, number, number]; + negativeCoefficient: [double, double, double]; /** * Defines the blending fraction for brightness effect. * - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - fraction: number; + fraction: double; } export default uiEffect; \ No newline at end of file diff --git a/api/@ohos.hiSysEvent.d.ts b/api/@ohos.hiSysEvent.d.ts index 68feb315d7dceac77661e46aa0bf03bc987f7e28..af3e8719de0df4ef9242c15735489b976e6ca831 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'; @@ -36,7 +35,7 @@ declare namespace hiSysEvent { /** * Enumerate system event types. * - * @enum {number} + * @enum {int} * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use * @since arkts {'1.1':'9','1.2':'20'} @@ -198,10 +197,11 @@ declare namespace hiSysEvent { /** * Enumerate search system event rule type. * - * @enum {number} + * @enum {int} * @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,58 +348,64 @@ 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 { /** * Begin time * - * @type { number } + * @type { long } * @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; + beginTime: long; /** * End time * - * @type { number } + * @type { long } * @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; + endTime: long; /** * Max number of receive system event * - * @type { number } + * @type { long } * @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; + maxEvents: long; /** * Begin sequence * - * @type { ?number } + * @type { ?long } * @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; + fromSeq?: long; /** * End sequence * - * @type { ?number } + * @type { ?long } * @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; + toSeq?: long } /** @@ -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,9 +479,10 @@ 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; + onComplete: (reason: int, total: int) => 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; @@ -526,7 +554,7 @@ declare namespace hiSysEvent { * @permission ohos.permission.READ_DFX_SYSEVENT * @param {QueryArg} queryArg common arguments of query system event * @param {QueryRule[]} rules rule of query system event - * @returns {number} return hiview receive task time. + * @returns {long} return hiview receive task time. * @throws {BusinessError} 201 - Permission denied. An attempt was made to read system event forbidden by permission: ohos.permission.READ_DFX_SYSEVENT. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. * @throws {BusinessError} 401 - Parameter error. Possible causes: @@ -538,16 +566,17 @@ 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; + function exportSysEvents(queryArg: QueryArg, rules: QueryRule[]): long; /** * Subscribe system event * * @permission ohos.permission.READ_DFX_SYSEVENT * @param {QueryRule[]} rules rule of subscribe system event - * @returns {number} return hiview receive task time. + * @returns {long} return hiview receive task time. * @throws {BusinessError} 201 - Permission denied. An attempt was made to read system event forbidden by permission: ohos.permission.READ_DFX_SYSEVENT. * @throws {BusinessError} 202 - System API is not allowed called by Non-system application. * @throws {BusinessError} 401 - Parameter error. Possible causes: @@ -558,9 +587,10 @@ 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; + function subscribe(rules: QueryRule[]): long; /** * Unsubscribe system event @@ -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..2171646d3b58d509c018351d4acec1efebc404d9 100644 --- a/api/@ohos.hiTraceChain.d.ts +++ b/api/@ohos.hiTraceChain.d.ts @@ -26,22 +26,25 @@ * * @namespace hiTraceChain * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace hiTraceChain { /** * Enumerate trace flag * - * @enum { number } + * @enum { int } * @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 } @@ -105,16 +115,18 @@ declare namespace hiTraceChain { /** * Enumerate trace point type * - * @enum { number } + * @enum { int } * @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 } @@ -154,16 +170,18 @@ declare namespace hiTraceChain { /** * Enumerate trace communication mode * - * @enum { number } + * @enum { int } * @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,56 +218,62 @@ 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 { /** - * Chain id. + * Chain id. The lower 60 bits are valid. * * @type { bigint } * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ chainId: bigint; /** - * Span id. + * Span id. The lower 26 bits are valid. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ - spanId?: number; + spanId?: int; /** - * Parent span id. + * Parent span id. The lower 26 bits are valid. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ - parentSpanId?: number; + parentSpanId?: int; /** - * Trace flag. + * Trace flag. The lower 16 bits are valid. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiTrace - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ - flags?: number; + flags?: int; } /** * Start tracing a process impl. * * @param { string } name Process name. - * @param { number } flags Trace function flag. + * @param { int } 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; + function begin(name: string, flags?: int): HiTraceId; /** * Stop process tracing and clear trace id of current thread if the given trace @@ -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..39d75c76e24ec67cf985a3ebd36f9445571f7dc1 100644 --- a/api/@ohos.hiTraceMeter.d.ts +++ b/api/@ohos.hiTraceMeter.d.ts @@ -121,7 +121,7 @@ declare namespace hiTraceMeter { * Enumerates the HiTrace output levels. The output level threshold system parameter determines * the minimum output trace. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.HiviewDFX.HiTrace * @atomicservice * @since 19 @@ -130,11 +130,12 @@ declare namespace hiTraceMeter { * Enumerates the HiTrace output levels. The output level threshold system parameter determines * the minimum output trace. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.HiviewDFX.HiTrace * @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 } @@ -232,7 +238,7 @@ declare namespace hiTraceMeter { * {@link #finishTrace}, the name and taskId need to be the same. * * @param { string } name Indicates the task name. - * @param { number } taskId The unique id used to distinguish the tasks and match with the id in follow finishTrace. + * @param { int } taskId The unique id used to distinguish the tasks and match with the id in follow finishTrace. * @syscap SystemCapability.HiviewDFX.HiTrace * @since 8 */ @@ -245,7 +251,7 @@ declare namespace hiTraceMeter { * {@link #finishTrace}, the name and taskId need to be the same. * * @param { string } name Indicates the task name. - * @param { number } taskId The unique id used to distinguish the tasks and match with the id in follow finishTrace. + * @param { int } taskId The unique id used to distinguish the tasks and match with the id in follow finishTrace. * @syscap SystemCapability.HiviewDFX.HiTrace * @atomicservice * @since 19 @@ -259,14 +265,14 @@ declare namespace hiTraceMeter { * {@link #finishTrace}, the name and taskId need to be the same. * * @param { string } name Indicates the task name. - * @param { number } taskId The unique id used to distinguish the tasks and match with the id in follow finishTrace. + * @param { int } taskId The unique id used to distinguish the tasks and match with the id in follow finishTrace. * @syscap SystemCapability.HiviewDFX.HiTrace * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ - function startTrace(name: string, taskId: number): void; + function startTrace(name: string, taskId: int): void; /** * Records a trace and marks it as the end of a task. @@ -275,8 +281,8 @@ declare namespace hiTraceMeter { * is specified by {@code name}. This method must be invoked after the the startTrace. * * @param { string } name Indicates the task name. It must be the same with the {@code name} of startTrace. - * @param { number } taskId The unique id used to distinguish the tasks and must be the same with the . - * {@code taskId} of startTrace. + * @param { int } taskId The unique id used to distinguish the tasks and must be the same with the . + * {@code taskId} of startTrace. * @syscap SystemCapability.HiviewDFX.HiTrace * @since 8 */ @@ -287,8 +293,8 @@ declare namespace hiTraceMeter { * is specified by {@code name}. This method must be invoked after {@link #startTrace}. * * @param { string } name Indicates the task name. It must be the same with the {@code name} of startTrace. - * @param { number } taskId The unique id used to distinguish the tasks and must be the same with the - * {@code taskId} of startTrace. + * @param { int } taskId The unique id used to distinguish the tasks and must be the same with the + * {@code taskId} of startTrace. * @syscap SystemCapability.HiviewDFX.HiTrace * @atomicservice * @since 19 @@ -300,21 +306,21 @@ declare namespace hiTraceMeter { * is specified by {@code name}. This method must be invoked after {@link #startTrace}. * * @param { string } name Indicates the task name. It must be the same with the {@code name} of startTrace. - * @param { number } taskId The unique id used to distinguish the tasks and must be the same with the - * {@code taskId} of startTrace. + * @param { int } taskId The unique id used to distinguish the tasks and must be the same with the + * {@code taskId} of startTrace. * @syscap SystemCapability.HiviewDFX.HiTrace * @crossplatform * @atomicservice * @since 20 * @arkts 1.1&1.2 */ - function finishTrace(name: string, taskId: number): void; + function finishTrace(name: string, taskId: int): void; /** * Records a trace for generating a count, such as clock pulse and the number of layers. * * @param { string } name Indicates the name used to identify the count. - * @param { number } count Indicates the number of the count. + * @param { long } count Indicates the number of the count. * @syscap SystemCapability.HiviewDFX.HiTrace * @since 8 */ @@ -322,7 +328,7 @@ declare namespace hiTraceMeter { * Records a trace for generating a count, such as clock pulse and the number of layers. * * @param { string } name Indicates the name used to identify the count. - * @param { number } count Indicates the number of the count. + * @param { long } count Indicates the number of the count. * @syscap SystemCapability.HiviewDFX.HiTrace * @atomicservice * @since 19 @@ -331,13 +337,14 @@ declare namespace hiTraceMeter { * Records a trace for generating a count, such as clock pulse and the number of layers. * * @param { string } name Indicates the name used to identify the count. - * @param { number } count Indicates the number of the count. + * @param { long } count Indicates the number of the count. * @syscap SystemCapability.HiviewDFX.HiTrace * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ - function traceByValue(name: string, count: number): void; + function traceByValue(name: string, count: long): void; /** * Records a trace marking it as the start of a task. @@ -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; @@ -408,11 +417,11 @@ declare namespace hiTraceMeter { * * @param { HiTraceOutputLevel } level Indicates trace output priority level. * @param { string } name Indicates the task name. - * @param { number } taskId The unique id used to distinguish the task and match with the id of the - * corresponding finishAsyncTrace. + * @param { int } 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 - * as Separator. + * @param { string } [customArgs] Indicates key=value pair to be output in trace; multiple pairs should use comma + * as Separator. * @syscap SystemCapability.HiviewDFX.HiTrace * @atomicservice * @since 19 @@ -422,22 +431,23 @@ declare namespace hiTraceMeter { * * This method is invoked at the start of a transaction to indicate that a task has started, whose name * is specified by {@code name}, and the taskId is used to distinguish the tasks. It must be followed by a - * corresponding {@link #finishAsyncTrace}, with the same level, name, and taskId. + * corresponding {@link #finishAsyncTrace}, with the same level, name, and taskId. * * @param { HiTraceOutputLevel } level Indicates trace output priority level. * @param { string } name Indicates the task name. - * @param { number } taskId The unique id used to distinguish the task and match with the id of the - * corresponding finishAsyncTrace. + * @param { int } 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 - * as Separator. + * @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; + function startAsyncTrace(level: HiTraceOutputLevel, name: string, taskId: int, customCategory: string, + customArgs?: string): void; /** * Records a trace and marks it as the end of a task. @@ -448,8 +458,8 @@ declare namespace hiTraceMeter { * * @param { HiTraceOutputLevel } level Indicates trace output priority level. * @param { string } name Indicates the task name. - * @param { number } taskId The unique id used to distinguish the task and match with the id of the corresponding - * startAsyncTrace. + * @param { int } taskId The unique id used to distinguish the task and match with the id of the corresponding + * startAsyncTrace. * @syscap SystemCapability.HiviewDFX.HiTrace * @atomicservice * @since 19 @@ -463,21 +473,22 @@ declare namespace hiTraceMeter { * * @param { HiTraceOutputLevel } level Indicates trace output priority level. * @param { string } name Indicates the task name. - * @param { number } taskId The unique id used to distinguish the task and match with the id of the corresponding - * startAsyncTrace. + * @param { int } taskId The unique id used to distinguish the task and match with the id of the corresponding + * startAsyncTrace. * @syscap SystemCapability.HiviewDFX.HiTrace * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ - function finishAsyncTrace(level: HiTraceOutputLevel, name: string, taskId: number): void; + function finishAsyncTrace(level: HiTraceOutputLevel, name: string, taskId: int): void; /** * Records a trace for generating a count, such as clock pulse and the number of layers. * * @param { HiTraceOutputLevel } level Indicates trace output priority level. * @param { string } name Indicates the name used to identify the count. - * @param { number } count Indicates the number of the count. + * @param { long } count Indicates the number of the count. * @syscap SystemCapability.HiviewDFX.HiTrace * @atomicservice * @since 19 @@ -487,13 +498,14 @@ declare namespace hiTraceMeter { * * @param { HiTraceOutputLevel } level Indicates trace output priority level. * @param { string } name Indicates the name used to identify the count. - * @param { number } count Indicates the number of the count. + * @param { long } count Indicates the number of the count. * @syscap SystemCapability.HiviewDFX.HiTrace * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ - function traceByValue(level: HiTraceOutputLevel, name: string, count: number): void; + function traceByValue(level: HiTraceOutputLevel, name: string, count: long): void; /** * Return whether the current process is allowed to output trace. @@ -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..78003f5f777153981fb26ce3921357d38f6e9c9a 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,18 +112,20 @@ 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; /** * Obtains the CPU usage of a process. * - * @returns { number } Returns the CPU usage of the process. + * @returns { double } 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; + function getCpuUsage(): double; /** * @@ -202,52 +211,57 @@ declare namespace hidebug { * This API can be called only by system application. * * @permission ohos.permission.DUMP - * @param { number } serviceid - Obtains the system service information based on the specified service ID. - * @param { number } fd - File descriptor to which data is written by the API. + * @param { int } serviceid - Obtains the system service information based on the specified service ID. + * @param { int } fd - File descriptor to which data is written by the API. * @param { Array } args - Parameter list of the Dump API of the system service. * @throws {BusinessError} 401 - the parameter check failed,Possible causes: * 1.the parameter type error * 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; + function getServiceDump(serviceid: int, fd: int, args: Array): void; /** * Obtains the CPU usage of the system. * - * @returns { number } Returns the CPU usage of the system. + * @returns { double } 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; + function getSystemCpuUsage(): double; /** * Describes the CPU usage of a thread. * * @interface ThreadCpuUsage * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ThreadCpuUsage { /** * Thread id * - * @type { number } + * @type { long } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - threadId: number; + threadId: long; /** * CPU usage of the thread. * - * @type { number } + * @type { double } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - cpuUsage: number; + cpuUsage: double; } /** @@ -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; @@ -395,7 +424,8 @@ declare namespace hidebug { * * @interface MemoryLimit * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface MemoryLimit { /** @@ -403,7 +433,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 */ rssLimit: bigint; /** @@ -411,7 +442,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 */ vssLimit: bigint; /** @@ -419,7 +451,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 */ vmHeapLimit: bigint; /** @@ -427,7 +460,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 */ vmTotalHeapSize: bigint; } @@ -437,7 +471,8 @@ declare namespace hidebug { * * @returns { MemoryLimit } Returns the memory limit 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 getAppMemoryLimit(): MemoryLimit; @@ -446,7 +481,8 @@ declare namespace hidebug { * * @interface VMMemoryInfo * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface VMMemoryInfo { /** @@ -454,7 +490,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 */ totalHeap: bigint; /** @@ -462,7 +499,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 */ heapUsed: bigint; /** @@ -470,7 +508,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 */ allArraySize: bigint; } @@ -480,30 +519,34 @@ declare namespace hidebug { * * @returns { VMMemoryInfo } Returns the VM memory information. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getAppVMMemoryInfo(): VMMemoryInfo; /** * Describes types of trace collection threads, including the main thread and all threads. * - * @enum { number } + * @enum { int } * @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,233 +556,266 @@ 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; + const ABILITY_MANAGER: long; /** * 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; + const ARKUI: long; /** * 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; + const ARK: long; /** * 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; + const BLUETOOTH: long; /** * 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; + const COMMON_LIBRARY: long; /** * 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; + const DISTRIBUTED_HARDWARE_DEVICE_MANAGER: long; /** * 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; + const DISTRIBUTED_AUDIO: long; /** * 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; + const DISTRIBUTED_CAMERA: long; /** * 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; + const DISTRIBUTED_DATA: long; /** * 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; + const DISTRIBUTED_HARDWARE_FRAMEWORK: long; /** * 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; + const DISTRIBUTED_INPUT: long; /** * 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; + const DISTRIBUTED_SCREEN: long; /** * 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; + const DISTRIBUTED_SCHEDULER: long; /** * 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; + const FFRT: long; /** * 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; + const FILE_MANAGEMENT: long; /** * 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; + const GLOBAL_RESOURCE_MANAGER: long; /** * 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; + const GRAPHICS: long; /** * 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; + const HDF: long; /** * 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; + const MISC: long; /** * 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; + const MULTIMODAL_INPUT: long; /** * 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; + const NET: long; /** * 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; + const NOTIFICATION: long; /** * 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; + const NWEB: long; /** * 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; + const OHOS: long; /** * 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; + const POWER_MANAGER: long; /** * 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; + const RPC: long; /** * 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; + const SAMGR: long; /** * 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; + const WINDOW_MANAGER: long; /** * 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; + const AUDIO: long; /** * 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; + const CAMERA: long; /** * 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; + const IMAGE: long; /** * 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; + const MEDIA: long; } /** @@ -748,9 +824,9 @@ declare namespace hidebug { * using this API, you are advised to run the hitrace command to capture trace logs and select the key scope * of trace collection to improve the API performance. * - * @param { number[] } tags - Scope for trace collection. For details, see tags. + * @param { long[] } tags - Scope for trace collection. For details, see tags. * @param { TraceFlag } flag - For details, see TraceFlag. - * @param { number } limitSize - Limit on the trace file size, in bytes. The maximum size of a single file is 500 MB. + * @param { int } limitSize - Limit on the trace file size, in bytes. The maximum size of a single file is 500 MB. * @returns { string } Returns the path of the trace file. * @throws { BusinessError } 401 - Invalid argument, Possible causes: * 1.The limit parameter is too small @@ -760,9 +836,10 @@ 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; + function startAppTraceCapture(tags: long[], flag: TraceFlag, limitSize: int): string; /** * Stops application trace collection. Use startAppTraceCapture() to start collection before calling this API. @@ -771,7 +848,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; @@ -779,18 +857,20 @@ declare namespace hidebug { * Describes the key-value pair used to store GC statistics. This type does not support multi-thread operations. * If this type is operated by multiple threads at the same time in an application, use a lock for it. * - * @typedef { Record } GcStats + * @typedef { Record } GcStats * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - type GcStats = Record; + type GcStats = Record; /** * Obtains all system GC statistics. * * @returns { GcStats } Returns the system GC statistics. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getVMRuntimeStats(): GcStats; @@ -798,20 +878,21 @@ declare namespace hidebug { * Obtains the specified system GC statistics based on parameters. * * @param { string } item - statistical item. - * @returns { number } Returns the item of the GC statistics to be obtained. + * @returns { long } Returns the item of the GC statistics to be obtained. * @throws { BusinessError } 401 - Possible causes: * 1. Invalid parameter, a string parameter required. * 2. Invalid parameter, unknown property. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - function getVMRuntimeStat(item: string): number; + function getVMRuntimeStat(item: string): long; /** * 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 +910,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 @@ -837,31 +918,34 @@ declare namespace hidebug { * * @returns { boolean } true if the application is in the debugging state. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function isDebugState(): boolean; /** * Obtains the size of the GPU memory. This API uses a promise to return the result. * - * @returns { Promise } Returns the size of the GPU memory, in KB. + * @returns { Promise } Returns the size of the GPU memory, in KB. * @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; + function getGraphicsMemory(): Promise; /** * Obtains the size of the GPU memory synchronously. * - * @returns { number } Returns the size of the GPU memory, in KB. + * @returns { int } Returns the size of the GPU memory, in KB. * @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; + function getGraphicsMemorySync(): int; /** * Dumps the original heap snapshot of the VM for the current thread. The API uses a promise to return the path of the @@ -908,30 +992,30 @@ declare namespace hidebug { /** * sample rate of GWP-ASAN * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug * @since 20 */ - sampleRate?: number; + sampleRate?: int; /** * the max simutaneous allocations of GWP-ASAN * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug * @since 20 */ - maxSimutaneousAllocations?: number; + maxSimutaneousAllocations?: int; } /** * Enable the GWP-ASAN grayscale of your application. * @param { GwpAsanOptions } [options] - The options of GWP-ASAN grayscale. - * @param { number } [duration] - The duration days of GWP-ASAN grayscale. + * @param { int } [duration] - The duration days of GWP-ASAN grayscale. * @throws { BusinessError } 11400114 - The number of GWP-ASAN applications of this device overflowed after last boot. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug * @since 20 */ - function enableGwpAsanGrayscale(options?: GwpAsanOptions, duration?: number): void; + function enableGwpAsanGrayscale(options?: GwpAsanOptions, duration?: int): void; /** * Disable the GWP-ASAN grayscale of your application. @@ -944,11 +1028,11 @@ declare namespace hidebug { /** * Obtain the remaining days of GWP-ASan grayscale for your application. * - * @returns { number } The remaining days of GWP-ASan grayscale. + * @returns { int } The remaining days of GWP-ASan grayscale. * @syscap SystemCapability.HiviewDFX.HiProfiler.HiDebug * @since 20 */ - function getGwpAsanGrayscaleState(): number; + function getGwpAsanGrayscaleState(): int; /** * Trimming level of raw heap snapshot. @@ -969,7 +1053,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..e41fa2654e5c71d3814f1b7f0cd006f6d3adcea4 100644 --- a/api/@ohos.hilog.d.ts +++ b/api/@ohos.hilog.d.ts @@ -20,30 +20,30 @@ */ /** -* 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 { /** @@ -85,17 +85,18 @@ declare namespace hilog { /** * Outputs debug-level logs. * - * @param { number } domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFF + * @param { int } 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. * @syscap SystemCapability.HiviewDFX.HiLog * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - function debug(domain: number, tag: string, format: string, ...args: (Object | undefined | null)[]): void; + function debug(domain: int, tag: string, format: string, ...args: (Object | undefined | null)[]): void; /** * Outputs info-level logs. @@ -136,17 +137,18 @@ declare namespace hilog { /** * Outputs info-level logs. * - * @param { number } domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFF + * @param { int } 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. * @syscap SystemCapability.HiviewDFX.HiLog * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - function info(domain: number, tag: string, format: string, ...args: (Object | undefined | null)[]): void; + function info(domain: int, tag: string, format: string, ...args: (Object | undefined | null)[]): void; /** * Outputs warning-level logs. @@ -187,17 +189,18 @@ declare namespace hilog { /** * Outputs warning-level logs. * - * @param { number } domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFF + * @param { int } 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. * @syscap SystemCapability.HiviewDFX.HiLog * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - function warn(domain: number, tag: string, format: string, ...args: (Object | undefined | null)[]): void; + function warn(domain: int, tag: string, format: string, ...args: (Object | undefined | null)[]): void; /** * Outputs error-level logs. @@ -238,17 +241,18 @@ declare namespace hilog { /** * Outputs error-level logs. * - * @param { number } domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFF + * @param { int } 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. * @syscap SystemCapability.HiviewDFX.HiLog * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - function error(domain: number, tag: string, format: string, ...args: (Object | undefined | null)[]): void; + function error(domain: int, tag: string, format: string, ...args: (Object | undefined | null)[]): void; /** * Outputs fatal-level logs. @@ -289,17 +293,18 @@ declare namespace hilog { /** * Outputs fatal-level logs. * - * @param { number } domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFF + * @param { int } 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. * @syscap SystemCapability.HiviewDFX.HiLog * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - function fatal(domain: number, tag: string, format: string, ...args: (Object | undefined | null)[]): void; + function fatal(domain: int, tag: string, format: string, ...args: (Object | undefined | null)[]): void; /** * Checks whether logs of the specified tag, and level can be printed. @@ -315,7 +320,7 @@ declare namespace hilog { /** * Checks whether logs of the specified tag, and level can be printed. * - * @param { number } domain Indicates the service domain, which is a hexadecimal integer ranging from 0x0 to 0xFFFF + * @param { int } 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 { LogLevel } level log level @@ -325,7 +330,7 @@ declare namespace hilog { * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - function isLoggable(domain: number, tag: string, level: LogLevel): boolean; + function isLoggable(domain: int, tag: string, level: LogLevel): boolean; /** * Sets the lowest log level of the current application process. @@ -333,7 +338,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; @@ -354,7 +360,7 @@ declare namespace hilog { /** * Log level define * - * @enum { number } + * @enum { int } * @syscap SystemCapability.HiviewDFX.HiLog * @crossplatform * @atomicservice diff --git a/api/@ohos.hiviewdfx.hiAppEvent.d.ts b/api/@ohos.hiviewdfx.hiAppEvent.d.ts index 6ef79c5df6be8f8a229b71ef25cab6dc9bd6c58f..df75c9d381a7a3f4fbc5d486457bf101e123e3b7 100644 --- a/api/@ohos.hiviewdfx.hiAppEvent.d.ts +++ b/api/@ohos.hiviewdfx.hiAppEvent.d.ts @@ -16,10 +16,12 @@ /** * @file * @kit PerformanceAnalysisKit - * @arkts 1.1&1.2 */ import type { AsyncCallback } from './@ohos.base'; +/*** if arkts 1.2 */ +import type { RecordData } from './@ohos.base' +/*** endif */ /** * Provides the event logging function for applications to log the fault, statistical, security, @@ -56,14 +58,14 @@ declare namespace hiAppEvent { /** * Enumerates event types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 9 */ /** * Enumerates event types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since 11 @@ -71,7 +73,7 @@ declare namespace hiAppEvent { /** * Enumerates event types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice @@ -191,7 +193,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 +210,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 +244,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 +259,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 +275,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 +291,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 +309,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 +319,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 +329,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 +339,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 +349,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 +359,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 +369,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 +379,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 +389,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; @@ -384,6 +401,7 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ const APP_KILLED: string; } @@ -410,7 +428,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 +451,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 +475,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 +499,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; } @@ -516,7 +538,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 configure(config: ConfigOption): void; @@ -542,7 +565,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 +597,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 +633,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; } @@ -790,10 +816,34 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ params: object; + + /** + * Event parameter object, which consists of a parameter name and a parameter value. In system events, the fields + * contained in params are defined by system. For details about the fields, you can see the overviews of system + * events, for example, Crash Event Overview. For application events, you need to define the parameters of the + * Write API. The specifications are as follows: + *
- A parameter name is a string that contains a maximum of 32 characters, including digits (0 to 9), letters + * (a to z), underscore (_), and dollar sign ($). It must start with a letter or dollar sign ($) and end with a + * digit or letter. For example, testName and $123_name. + *
- The parameter value can be a string, number, boolean, or array. The string type parameter can contain a + * maximum of 8 x 1024 characters. If the length exceeds the limit, the parameter and its name will be discarded. + * The value of the number type parameter must be within the range of Number.MIN_SAFE_INTEGER to + * Number.MAX_SAFE_INTEGER. If the value exceeds the range, an uncertain value may be generated. The element type + * in the array type parameter can only be string, number, or boolean. The number of elements must be less than + * 100. If this limit is exceeded, excess elements will be discarded. + *
- The maximum number of parameters is 32. If this limit is exceeded, excess parameters will be discarded. + * + * @type { RecordData } + * @syscap SystemCapability.HiviewDFX.HiAppEvent + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + params: RecordData; } /** @@ -941,7 +991,7 @@ declare namespace hiAppEvent { /** * Type of a custom event parameter value. * - * @typedef {number | string | boolean | Array} + * @typedef {int | long | double | string | boolean | Array} * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since 12 @@ -949,13 +999,14 @@ declare namespace hiAppEvent { /** * Type of a custom event parameter value. * - * @typedef {number | string | boolean | Array} + * @typedef {int | long | double | string | boolean | Array} * @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; + type ParamType = int | long | double | string | boolean | Array; /** * Sets custom event parameters. This API uses a promise to return the result. During the same lifecycle, system @@ -1010,7 +1061,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 setEventParam(params: Record, domain: string, name?: string): Promise; @@ -1031,7 +1083,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,20 +1113,21 @@ 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 { /** * Event package ID, which is named from 0 in ascending order. * - * @type { number } + * @type { int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 9 */ /** * Event package ID, which is named from 0 in ascending order. * - * @type { number } + * @type { int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since 11 @@ -1081,25 +1135,26 @@ declare namespace hiAppEvent { /** * Event package ID, which is named from 0 in ascending order. * - * @type { number } + * @type { int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - packageId: number; + packageId: int; /** * Number of events in the event package. * - * @type { number } + * @type { int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 9 */ /** * Number of events in the event package. * - * @type { number } + * @type { int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since 11 @@ -1107,25 +1162,26 @@ declare namespace hiAppEvent { /** * Number of events in the event package. * - * @type { number } + * @type { int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - row: number; + row: int; /** * Event size of the event package, in bytes. * - * @type { number } + * @type { int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 9 */ /** * Event size of the event package, in bytes. * - * @type { number } + * @type { int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since 11 @@ -1133,13 +1189,14 @@ declare namespace hiAppEvent { /** * Event size of the event package, in bytes. * - * @type { number } + * @type { int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - size: number; + size: int; /** * Event data in the event package. @@ -1163,7 +1220,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 +1240,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 +1265,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,14 +1297,15 @@ 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); /** * Sets the threshold for the data size of the event package obtained each time. * - * @param { number } size Data size threshold, in bytes. The value range is [0, $2^{31}$-1]. If the value is out of + * @param { int } 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. @@ -1254,7 +1315,7 @@ declare namespace hiAppEvent { /** * Sets the threshold for the data size of the event package obtained each time. * - * @param { number } size Data size threshold, in bytes. The value range is [0, $2^{31}$-1]. If the value is out of + * @param { int } 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. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. @@ -1266,7 +1327,7 @@ declare namespace hiAppEvent { /** * Sets the threshold for the data size of the event package obtained each time. * - * @param { number } size Data size threshold, in bytes. The value range is [0, $2^{31}$-1]. If the value is out of + * @param { int } 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. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. @@ -1274,15 +1335,16 @@ declare namespace hiAppEvent { * @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; + setSize(size: int): void; /** * Sets the number of data records of the event package obtained each time. When setRow() and setSize() are called * at the same time, only setRow() takes effect. * - * @param { number } size Number of events. The value range is (0, $2^{31}$-1]. If the value is out of the range, an + * @param { int } size Number of events. 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. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. @@ -1295,7 +1357,7 @@ declare namespace hiAppEvent { * Sets the number of data records of the event package obtained each time. When setRow() and setSize() are called * at the same time, only setRow() takes effect. * - * @param { number } size Number of events. The value range is (0, $2^{31}$-1]. If the value is out of the range, an + * @param { int } size Number of events. 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. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. @@ -1303,9 +1365,10 @@ declare namespace hiAppEvent { * @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; + setRow(size: int): void; /** * Obtains the subscription event. @@ -1347,6 +1410,22 @@ declare namespace hiAppEvent { * @since 19 */ takeNext(): AppEventPackage; + /** + * Obtains the subscription event. + *
The system obtains the subscription event data based on the data size threshold specified by setSize or the + * number of data records specified by setRow. By default, one subscription event data record is obtained. When all + * subscription event data is obtained, null is returned. + *
When setRow and setSize are called at the same time, only setRow takes effect. + * + * @returns { AppEventPackage | null } Event package object. If all subscription event data has been retrieved, null is + * returned. + * @syscap SystemCapability.HiviewDFX.HiAppEvent + * @crossplatform + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + takeNext(): AppEventPackage | null; } /** @@ -1371,7 +1450,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 { /** @@ -1379,7 +1459,7 @@ declare namespace hiAppEvent { * indicating that no callback is triggered. If this parameter is set to a negative value, the default * value is used. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 9 */ @@ -1388,7 +1468,7 @@ declare namespace hiAppEvent { * indicating that no callback is triggered. If this parameter is set to a negative value, the default * value is used. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since 11 @@ -1398,20 +1478,21 @@ declare namespace hiAppEvent { * indicating that no callback is triggered. If this parameter is set to a negative value, the default * value is used. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - row?: number; + row?: int; /** * Total size of events that trigger callback. The value is a positive integer, in bytes. The default value is 0, * indicating that no callback is triggered. If this parameter is set to a negative value, the default value is * used. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 9 */ @@ -1420,7 +1501,7 @@ declare namespace hiAppEvent { * indicating that no callback is triggered. If this parameter is set to a negative value, the default value is * used. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since 11 @@ -1430,20 +1511,21 @@ declare namespace hiAppEvent { * indicating that no callback is triggered. If this parameter is set to a negative value, the default value is * used. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - size?: number; + size?: int; /** * Timeout interval for triggering callback. The value is a positive integer, in unit of 30s. The default value is * 0, indicating that no callback is triggered. If this parameter is set to a negative value, the default value is * used. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @since 9 */ @@ -1452,7 +1534,7 @@ declare namespace hiAppEvent { * 0, indicating that no callback is triggered. If this parameter is set to a negative value, the default value is * used. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since 11 @@ -1462,13 +1544,14 @@ declare namespace hiAppEvent { * 0, indicating that no callback is triggered. If this parameter is set to a negative value, the default value is * used. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - timeOut?: number; + timeOut?: int; } /** @@ -1499,7 +1582,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 +1611,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 +1638,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 +1658,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 +1681,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 +1700,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 +1720,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 +1751,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 +1783,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 +1813,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 +1843,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,9 +1882,10 @@ 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; + onTrigger?: (curRow: int, curSize: int, holder: AppEventPackageHolder) => void; /** * Real-time subscription callback. Only this callback function is triggered if it is passed together with @@ -1813,7 +1908,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; } @@ -1866,7 +1962,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 addWatcher(watcher: Watcher): AppEventPackageHolder; @@ -1903,7 +2000,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 removeWatcher(watcher: Watcher): void; @@ -1929,7 +2027,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 +2059,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 +2089,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 +2121,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 +2151,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 +2162,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 +2174,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 +2187,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 +2199,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; } @@ -2184,26 +2291,26 @@ declare namespace hiAppEvent { * Interval for event reporting, in seconds. The input value must be greater than or equal to 0. If the input value * is less than 0, the default value 0 is used and periodic reporting is not performed. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - periodReport?: number; + periodReport?: int; /** * Event reporting threshold. When the number of events reaches the threshold, an event is reported. The value must * be greater than 0 and less than 1000. If the value is not within the range, the default value 0 is used and no * events are reported. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - batchReport?: number; + batchReport?: int; /** * Name array of user IDs that can be reported by the data processor. name corresponds to the name parameter of the @@ -2246,13 +2353,13 @@ declare namespace hiAppEvent { * less than 0, the default value 0 is used. If the input value is greater than 0, the value uniquely identifies a * data processor with its name. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.HiviewDFX.HiAppEvent * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - configId?: number; + configId?: int; /** * Custom extended parameters. If the input parameter name and value do not meet the specifications, extended @@ -2290,7 +2397,7 @@ declare namespace hiAppEvent { * is preset in the device for interaction for the moment, migrating events to the cloud is unavailable. * * @param { Processor } processor Data processor. - * @returns { number } ID of the data processor of the reported event, which uniquely identifies the data processor + * @returns { long } ID of the data processor of the reported event, which uniquely identifies the data processor * and can be used to remove the data processor. If the operation fails, -1 is returned. If the operation is * successful, a value greater than 0 is returned. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -2301,15 +2408,15 @@ declare namespace hiAppEvent { * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - function addProcessor(processor: Processor): number; + function addProcessor(processor: Processor): long; /** * Add the processor from config asynchronously, who can report the event. * * @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. + * @returns { Promise } The processor unique ID. + * @throws { BusinessError } 11105001 - Invalid parameter value. Possible causes: 1. Incorrect parameter length; *
2. Incorrect parameter format. * @static * @syscap SystemCapability.HiviewDFX.HiAppEvent @@ -2317,21 +2424,22 @@ declare namespace hiAppEvent { * @since 20 * @arkts 1.1&1.2 */ - function addProcessorFromConfig(processorName: string, configName?: string): Promise; + function addProcessorFromConfig(processorName: string, configName?: string): Promise; /** * Removes the data processor of a reported event. * - * @param { number } id ID of a data processor. The value must be greater than 0. The value is obtained by calling + * @param { long } id ID of a data processor. The value must be greater than 0. The value is obtained by calling * addProcessor. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types. * @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; + function removeProcessor(id: long): void; } export default hiAppEvent; diff --git a/api/@ohos.i18n.d.ts b/api/@ohos.i18n.d.ts index 6b78d6c6d72aaa58e35acfcd4e7ed187715f06de..0dcb20174c84a220d1502c39406fddad06acc261 100644 --- a/api/@ohos.i18n.d.ts +++ b/api/@ohos.i18n.d.ts @@ -18,8 +18,13 @@ * @kit LocalizationKit */ +/*** if arkts 1.1&1.2 */ import { BusinessError } from './@ohos.base'; import intl from './@ohos.intl'; +/*** endif */ +/*** if arkts 1.2 */ +import { StyledString, TextStyle } from './arkui/component/styledString'; +/*** endif */ /** * Provides international settings related APIs. @@ -36,7 +41,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 +130,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 +175,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 +221,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 +239,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 +264,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 +294,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 +322,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 +339,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 +366,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 +383,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 +410,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 +425,7 @@ declare namespace i18n { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ static getSystemLocaleInstance(): Intl.Locale; @@ -431,23 +443,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 +479,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 +497,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; @@ -508,34 +507,38 @@ declare namespace i18n { * * @permission ohos.permission.UPDATE_CONFIGURATION * @param { string } language - Valid ID of the language to be added as a preferred language. - * @param { number } [index] - Position to which the preferred language is added. The default value is the length + * @param { int } [index] - Position to which the preferred language is added. The default value is the length * of the preferred language list. * @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. * @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; + static addPreferredLanguage(language: string, index?: int): void; /** * Removes a preferred language from the specified position on the preferred language list. * * @permission ohos.permission.UPDATE_CONFIGURATION - * @param { number } index - Position of the preferred language to delete. + * @param { int } index - Position of the preferred language to delete. * @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. * @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; + static removePreferredLanguage(index: int): void; /** * Access the system preferred language list. @@ -550,7 +553,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 +571,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 +611,7 @@ declare namespace i18n { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ static setAppPreferredLanguage(language: string): void; @@ -632,6 +638,7 @@ declare namespace i18n { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ static getAppPreferredLanguage(): string; @@ -648,7 +655,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 +674,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 +694,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 +710,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 +721,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 +734,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 +750,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 +761,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 +835,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 +844,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 +856,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 +872,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 +904,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 +945,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 @@ -948,15 +967,28 @@ declare namespace i18n { * @since 20 */ static getUsingNumericalDatePattern(): string; + + /** + * Gets temperatures used by system locale. + * + * @returns { Map } a map containing the type and name of temperatures + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @static + * @syscap SystemCapability.Global.I18n + * @systemapi + * @since 20 + */ + static getSystemTemperatures(): Map; } /** * Enumerates the first day of a week. The value ranges from Monday to Sunday. * - * @enum { number } + * @enum { int } * @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 +996,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 +1006,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 +1016,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 +1026,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 +1036,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 +1046,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 +1056,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 } @@ -1026,10 +1065,11 @@ declare namespace i18n { /** * Enumerates temperature units. * - * @enum { number } + * @enum { int } * @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 +1077,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 +1087,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 +1097,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 } @@ -1075,7 +1118,7 @@ declare namespace i18n { * * @param { UnitInfo } fromUnit - Measurement unit to be converted. * @param { UnitInfo } toUnit - Measurement unit to be converted to. - * @param { number } value - Value of the measurement unit to be converted. + * @param { double } value - Value of the measurement unit to be converted. * @param { string } locale - Locale ID used for formatting, for example, "zh-Hans-CN". * @param { string } [style] - Style used for formatting. The value can be "long", "short", or "narrow". The * default value is short. @@ -1085,7 +1128,7 @@ declare namespace i18n { * @deprecated since 9 * @useinstead ohos.i18n/i18n.I18NUtil#unitConvert */ - unitConvert(fromUnit: UnitInfo, toUnit: UnitInfo, value: number, locale: string, style?: string): string; + unitConvert(fromUnit: UnitInfo, toUnit: UnitInfo, value: double, locale: string, style?: string): string; } /** @@ -1107,7 +1150,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 { /** @@ -1115,7 +1159,7 @@ declare namespace i18n { * * @param { UnitInfo } fromUnit - Information of the unit to be converted. * @param { UnitInfo } toUnit - Information about the unit to be converted to. - * @param { number } value - Indicates the number to be formatted. + * @param { double } value - Indicates the number to be formatted. * @param { string } locale - The locale to be used. * @param { string } [style] - The style of format. * @returns { string } converted number and unit. @@ -1127,18 +1171,20 @@ declare namespace i18n { * * @param { UnitInfo } fromUnit - Measurement unit to be converted. * @param { UnitInfo } toUnit - Measurement unit to be converted to. - * @param { number } value - Value of the measurement unit to be converted. + * @param { double } value - Value of the measurement unit to be converted. * @param { string } locale - Locale ID, which consists of the language, script, and country/region, for example, * "zh-Hans-CN". * @param { string } [style] - Style used for formatting. The value can be long, short, or narrow. The default * 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; + static unitConvert(fromUnit: UnitInfo, toUnit: UnitInfo, value: double, locale: string, style?: string): string; /** * Get the order of year, month, day in the specified locale. Year, month, day are separated by '-'. @@ -1169,14 +1215,15 @@ 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; /** * Get the time period name for the specified hour. * - * @param { number } hour - the hour value. + * @param { int } hour - the hour value. * @param { string } [locale] - specified the locale. Use current app locale by default. It must be a valid locale. * @returns { string } the string of time period name. The return value may be empty string * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -1187,18 +1234,20 @@ declare namespace i18n { /** * Obtains the localized expression of the specified time in the specified locale. * - * @param { number } hour - Specified time, for example, 16. + * @param { int } hour - Specified time, for example, 16. * @param { string } [locale] - System locale, which consists of the language, script, and country/region. for * example, "zh-Hans-CN". The default value is the current system locale. * @returns { string } Localized expression of the specified time in the specified locale. * @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; + static getTimePeriodName(hour:int, locale?: string): string; /** * Obtains the locale that best matches a region from the specified locale list. @@ -1214,7 +1263,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 +1281,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 +1299,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 +1309,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,23 +1320,26 @@ 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 * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ static getUnicodeWrappedFilePath(path: string, delimiter?: string, locale?: Intl.Locale): string; } @@ -1302,7 +1357,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 +1373,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 +1390,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 +1418,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 +1454,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 +1479,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 +1509,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 +1534,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 +1565,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 +1587,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 +1636,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 +1660,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,21 +1686,22 @@ 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; /** * set the time. * - * @param { number } time - Indicates the elapsed milliseconds from 1970.1.1 00:00:00 GMT. + * @param { double } time - Indicates the elapsed milliseconds from 1970.1.1 00:00:00 GMT. * @syscap SystemCapability.Global.I18n * @since 8 */ /** * set the time. * - * @param { number } time - Indicates the elapsed milliseconds from 1970.1.1 00:00:00 GMT. + * @param { double } time - Indicates the elapsed milliseconds from 1970.1.1 00:00:00 GMT. * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -1643,36 +1709,37 @@ declare namespace i18n { /** * Sets the date and time for a Calendar object. * - * @param { number } time - Unix timestamp, which indicates the number of milliseconds that have elapsed since the + * @param { double } time - Unix timestamp, which indicates the number of milliseconds that have elapsed since the * Unix epoch. * @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; + setTime(time: double): void; /** * Set the time * - * @param { number } year - The year field of the calendar, ranges from 0 to 9999. - * @param { number } month - The month field of the calendar, ranges from 0 to 11. - * @param { number } date - The day field of the calendar, ranges from 1 to 31. - * @param { number } hour - The hour field of the calendar, ranges from 0 to 23. - * @param { number } minute - The minute field of the calendar, ranges from 0 to 59. - * @param { number } second - the second field of the calendar, ranges from 0 to 59. + * @param { int } year - The year field of the calendar, ranges from 0 to 9999. + * @param { int } month - The month field of the calendar, ranges from 0 to 11. + * @param { int } date - The day field of the calendar, ranges from 1 to 31. + * @param { int } hour - The hour field of the calendar, ranges from 0 to 23. + * @param { int } minute - The minute field of the calendar, ranges from 0 to 59. + * @param { int } second - the second field of the calendar, ranges from 0 to 59. * @syscap SystemCapability.Global.I18n * @since 8 */ /** * Set the time * - * @param { number } year - The year field of the calendar, ranges from 0 to 9999. - * @param { number } month - The month field of the calendar, ranges from 0 to 11. - * @param { number } date - The day field of the calendar, ranges from 1 to 31. - * @param { number } hour - The hour field of the calendar, ranges from 0 to 23. - * @param { number } minute - The minute field of the calendar, ranges from 0 to 59. - * @param { number } second - the second field of the calendar, ranges from 0 to 59. + * @param { int } year - The year field of the calendar, ranges from 0 to 9999. + * @param { int } month - The month field of the calendar, ranges from 0 to 11. + * @param { int } date - The day field of the calendar, ranges from 1 to 31. + * @param { int } hour - The hour field of the calendar, ranges from 0 to 23. + * @param { int } minute - The minute field of the calendar, ranges from 0 to 59. + * @param { int } second - the second field of the calendar, ranges from 0 to 59. * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -1680,18 +1747,19 @@ declare namespace i18n { /** * Sets the year, month, day, hour, minute, and second for this Calendar object. * - * @param { number } year - Year to set. - * @param { number } month - Month to set. Note: The month starts from 0. For example, 0 indicates January. - * @param { number } date - Day to set. - * @param { number } hour - Hour to set. The default value is the current system time. - * @param { number } minute - Minute to set. The default value is the current system time. - * @param { number } second - Second to set. The default value is the current system time. + * @param { int } year - Year to set. + * @param { int } month - Month to set. Note: The month starts from 0. For example, 0 indicates January. + * @param { int } date - Day to set. + * @param { int } hour - Hour to set. The default value is the current system time. + * @param { int } minute - Minute to set. The default value is the current system time. + * @param { int } second - Second to set. The default value is the current system time. * @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: int, month: int, date:int, hour?: int, minute?: int, second?: int): void; /** * Set the timezone of this calendar. @@ -1715,7 +1783,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 +1810,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; @@ -1749,14 +1818,14 @@ declare namespace i18n { /** * Get the start day of a week. 1 indicates Sunday, 7 indicates Saturday. * - * @returns { number } start day of a week. + * @returns { int } start day of a week. * @syscap SystemCapability.Global.I18n * @since 8 */ /** * Get the start day of a week. 1 indicates Sunday, 7 indicates Saturday. * - * @returns { number } start day of a week. + * @returns { int } start day of a week. * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -1764,25 +1833,26 @@ declare namespace i18n { /** * Obtains the first day of a week for this Calendar object. * - * @returns { number } First day of a week. The value 1 indicates Sunday, and the value 7 indicates Saturday. + * @returns { int } First day of a week. The value 1 indicates Sunday, and the value 7 indicates Saturday. * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getFirstDayOfWeek(): number; + getFirstDayOfWeek(): int; /** * Set the start day of a week. 1 indicates Sunday, 7 indicates Saturday. * - * @param { number } value - Indicates the start day of a week. 1 indicates Sunday, 7 indicates Saturday. + * @param { int } value - Indicates the start day of a week. 1 indicates Sunday, 7 indicates Saturday. * @syscap SystemCapability.Global.I18n * @since 8 */ /** * Set the start day of a week. 1 indicates Sunday, 7 indicates Saturday. * - * @param { number } value - Indicates the start day of a week. 1 indicates Sunday, 7 indicates Saturday. + * @param { int } value - Indicates the start day of a week. 1 indicates Sunday, 7 indicates Saturday. * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -1790,25 +1860,26 @@ declare namespace i18n { /** * Sets the first day of a week for this Calendar object. * - * @param { number } value - Start day of a week. The value 1 indicates Sunday, and the value 7 indicates Saturday. + * @param { int } value - Start day of a week. The value 1 indicates Sunday, and the value 7 indicates Saturday. * @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; + setFirstDayOfWeek(value: int): void; /** * Get the minimal days of a week, which is needed for the first day of a year. * - * @returns { number } the minimal days of a week. + * @returns { int } the minimal days of a week. * @syscap SystemCapability.Global.I18n * @since 8 */ /** * Get the minimal days of a week, which is needed for the first day of a year. * - * @returns { number } the minimal days of a week. + * @returns { int } the minimal days of a week. * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -1816,25 +1887,26 @@ declare namespace i18n { /** * Obtains the minimum number of days in the first week for this Calendar object. * - * @returns { number } Minimum number of days in the first week of a year. + * @returns { int } Minimum number of days in the first week of a year. * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMinimalDaysInFirstWeek(): number; + getMinimalDaysInFirstWeek(): int; /** * Set the minimal days of a week, which is needed for the first week of a year. * - * @param { number } value - The value to be set. + * @param { int } value - The value to be set. * @syscap SystemCapability.Global.I18n * @since 8 */ /** * Set the minimal days of a week, which is needed for the first week of a year. * - * @param { number } value - The value to be set. + * @param { int } value - The value to be set. * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -1842,13 +1914,14 @@ declare namespace i18n { /** * Sets the minimum number of days in the first week for this Calendar object. * - * @param { number } value - Minimum number of days in the first week of a year. + * @param { int } value - Minimum number of days in the first week of a year. * @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; + setMinimalDaysInFirstWeek(value: int): void; /** * Get the associated value with the field. @@ -1856,7 +1929,7 @@ declare namespace i18n { * @param { string } field - Field values such as era, year, month, week_of_year, week_of_month, date, day_of_year, day_of_week * day_of_week_in_month, hour, hour_of_day, minute, second, millisecond, zone_offset, dst_offset, year_woy, * dow_local, extended_year, julian_day, milliseconds_in_day, is_leap_month. - * @returns { number } the associated value. + * @returns { int } the associated value. * @syscap SystemCapability.Global.I18n * @since 8 */ @@ -1866,7 +1939,7 @@ declare namespace i18n { * @param { string } field - Field values such as era, year, month, week_of_year, week_of_month, date, day_of_year, day_of_week * day_of_week_in_month, hour, hour_of_day, minute, second, millisecond, zone_offset, dst_offset, year_woy, * dow_local, extended_year, julian_day, milliseconds_in_day, is_leap_month. - * @returns { number } the associated value. + * @returns { int } the associated value. * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -1875,15 +1948,15 @@ declare namespace i18n { * Obtains the values of the calendar attributes in this Calendar object. * * @param { string } field - Calendar attributes. The following table lists the supported attribute values. - * @returns { number } Value of the calendar attribute. For example, if the year of the internal date of the + * @returns { int } Value of the calendar attribute. For example, if the year of the internal date of the * current Calendar object is 1990, get('year') returns 1990. * @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; + get(field: string): int; /** * Get calendar's name localized for display in the given locale. @@ -1901,7 +1974,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 +2008,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; @@ -1943,7 +2018,7 @@ declare namespace i18n { * * @param { string } field - field values such as year, month, week_of_year, week_of_month, date, day_of_year, day_of_week * day_of_week_in_month, hour, hour_of_day, minute, second, millisecond - * @param { number } amount - the amount of date or time to be added to the field. + * @param { int } amount - the amount of date or time to be added to the field. * @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. * @syscap SystemCapability.Global.I18n @@ -1956,21 +2031,22 @@ declare namespace i18n { * @param { string } field - Calendar attribute. The value can be any of the following: year, month, week_of_year, * week_of_month, date, day_of_year, day_of_week, day_of_week_in_month, hour, * hour_of_day, minute, second, millisecond. For details about the values, see get. - * @param { number } amount - Addition or subtraction amount. + * @param { int } amount - Addition or subtraction amount. * @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. * @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; + add(field: string, amount: int): void; /** * Get the UTC milliseconds. * - * @returns { number } the calendar time as UTC milliseconds. + * @returns { long } the calendar time as UTC milliseconds. * @syscap SystemCapability.Global.I18n * @crossplatform * @since 11 @@ -1978,20 +2054,21 @@ declare namespace i18n { /** * Obtains the timestamp of this Calendar object. * - * @returns { number } Unix timestamp, which indicates the number of milliseconds that have elapsed since the + * @returns { long } Unix timestamp, which indicates the number of milliseconds that have elapsed since the * Unix epoch. * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getTimeInMillis(): number; + getTimeInMillis(): long; /** * Returns days comparison result. * * @param { Date } date - Date object to be compared. - * @returns { number } value of of the comparison result. A positive value indicates that the date is later, + * @returns { int } value of of the comparison result. A positive value indicates that the date is later, * and a negative value indicates that the date is earlier. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. * @syscap SystemCapability.Global.I18n @@ -2003,7 +2080,7 @@ declare namespace i18n { * days. * * @param { Date } date - Date and time. Note: The month starts from 0. For example, 0 indicates January. - * @returns { number } Difference in the number of days. A positive number indicates that the calendar date is + * @returns { int } Difference in the number of days. A positive number indicates that the calendar date is * earlier, and a negative number indicates the opposite. The value is accurate to * milliseconds. If the value is less than one day, it is considered as one day. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; @@ -2011,9 +2088,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 */ - compareDays(date: Date): number; + compareDays(date: Date): int; } /** @@ -2041,7 +2119,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 +2142,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,49 +2158,52 @@ 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 { /** * Obtains the current position of the BreakIterator instance. * - * @returns { number } the current position of the BreakIterator instance. + * @returns { int } the current position of the BreakIterator instance. * @syscap SystemCapability.Global.I18n * @since 8 */ /** * Obtains the position of the break iterator in the text. * - * @returns { number } Position of the break iterator in the text. + * @returns { int } 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; + current(): int; /** * Set the BreakIterator's position to the first break point, the first break point is always the beginning of the * processed text. * - * @returns { number } the index of the first break point. + * @returns { int } the index of the first break point. * @syscap SystemCapability.Global.I18n * @since 8 */ /** * Moves the break iterator to the first line break point, which is always at the beginning of the processed text. * - * @returns { number } Offset of the first line break point in the processed text. + * @returns { int } 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; + first(): int; /** * Set the BreakIterator's position to the last break point. the last break point is always the index beyond the * last character of the processed text. * - * @returns { number } the index of the last break point. + * @returns { int } the index of the last break point. * @syscap SystemCapability.Global.I18n * @since 8 */ @@ -2129,52 +2211,55 @@ declare namespace i18n { * Moves the break iterator to the last line break point, which is always the next position after the end of the * processed text. * - * @returns { number } Offset of the last line break point in the processed text. + * @returns { int } 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; + last(): int; /** * Set the BreakIterator's position to the nth break point from the current break point. * - * @param { number } [index] - indicates the number of break points to advance. If index is not given, n is treated as 1. - * @returns { number } the index of the BreakIterator after moving. If there is not enough break points, returns -1. + * @param { int } [index] - indicates the number of break points to advance. If index is not given, n is treated as 1. + * @returns { int } the index of the BreakIterator after moving. If there is not enough break points, returns -1. * @syscap SystemCapability.Global.I18n * @since 8 */ /** * Moves the break iterator backward by the specified number of line break points. * - * @param { number } [index] - Number of line break points for moving the break iterator. The value is an integer. + * @param { int } [index] - Number of line break points for moving the break iterator. The value is an integer. * A positive number means to move the break iterator backward, and a negative number * means to move the break iterator forward. The default value is 1. - * @returns { number } Position of the break iterator in the text after movement. The value -1 is returned if the + * @returns { int } Position of the break iterator in the text after movement. The value -1 is returned if the * 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; + next(index?: int): int; /** * Set the BreakIterator's position to the break point preceding the current break point. * - * @returns { number } the index of the BreakIterator after moving. If there is not enough break points, returns -1. + * @returns { int } the index of the BreakIterator after moving. If there is not enough break points, returns -1. * @syscap SystemCapability.Global.I18n * @since 8 */ /** * Moves the break iterator foreward by one line break point. * - * @returns { number } Position of the break iterator in the text after movement. The value -1 is returned if the + * @returns { int } Position of the break iterator in the text after movement. The value -1 is returned if the * 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; + previous(): int; /** * Set the text to be processed. @@ -2189,29 +2274,31 @@ 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; /** * Set the BreakIterator's position to the first break point following the specified offset. * - * @param { number } offset - * @returns { number } the index of the BreakIterator after moving. If there is not enough break points, returns -1. + * @param { int } offset + * @returns { int } the index of the BreakIterator after moving. If there is not enough break points, returns -1. * @syscap SystemCapability.Global.I18n * @since 8 */ /** * Moves the line break iterator to the line break point after the specified position. * - * @param { number } offset - Offset of the line break point. - * @returns { number } Position of the break iterator in the text after movement. The value -1 is returned if the + * @param { int } offset - Offset of the line break point. + * @returns { int } Position of the break iterator in the text after movement. The value -1 is returned if the * 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; + following(offset: int): int; /** * Obtains the text being processed. @@ -2226,7 +2313,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; @@ -2235,7 +2323,7 @@ declare namespace i18n { * position will be set to the position indicated by the offset if it returns true, otherwise the BreakIterator * will be moved to the break point following the offset. * - * @param { number } offset The offset to be checked. + * @param { int } offset The offset to be checked. * @returns { boolean } true if the offset is a break point. * @syscap SystemCapability.Global.I18n * @since 8 @@ -2243,7 +2331,7 @@ declare namespace i18n { /** * Checks whether the specified position is a line break point. * - * @param { number } offset - Specified position in the text. + * @param { int } offset - Specified position in the text. * @returns { boolean } Whether the specified position is a line break point. The value "true" indicates that the * specified position is a line break point, and the value "false" indicates the opposite. * If true is returned, the break iterator is moved to the position specified by offset. @@ -2251,9 +2339,10 @@ 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; + isBoundary(offset: int): boolean; } /** @@ -2273,9 +2362,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 +2380,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 +2397,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 +2415,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 +2435,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 +2453,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 +2587,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 +2611,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 +2643,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 +2675,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 +2714,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 +2739,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 +2771,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 +2803,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 +2835,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 +2867,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; } /** @@ -2800,7 +2910,7 @@ declare namespace i18n { * * @permission ohos.permission.UPDATE_CONFIGURATION * @param { string } language - Preferred language to add. - * @param { number } [index] - Position to which the preferred language is added. The default value is the length of + * @param { int } [index] - Position to which the preferred language is added. The default value is the length of * the preferred language list. * @returns { boolean } true if the operation is successful, and false otherwise. * @syscap SystemCapability.Global.I18n @@ -2808,13 +2918,13 @@ declare namespace i18n { * @deprecated since 9 * @useinstead ohos.i18n/i18n.System#addPreferredLanguage */ - export function addPreferredLanguage(language: string, index?: number): boolean; + export function addPreferredLanguage(language: string, index?: int): boolean; /** * Removes a preferred language from the specified position on the preferred language list. * * @permission ohos.permission.UPDATE_CONFIGURATION - * @param { number } index - Position of the preferred language to delete. + * @param { int } index - Position of the preferred language to delete. * @returns { boolean } Whether the operation is successful. The value "true" indicates that the operation is * successful, and the value "false" indicates the opposite. * @syscap SystemCapability.Global.I18n @@ -2822,7 +2932,7 @@ declare namespace i18n { * @deprecated since 9 * @useinstead ohos.i18n/i18n.System#removePreferredLanguage */ - export function removePreferredLanguage(index: number): boolean; + export function removePreferredLanguage(index: int): boolean; /** * Obtains the list of preferred languages. @@ -2871,7 +2981,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 +3005,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 +3031,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,21 +3056,22 @@ 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; /** * Get the raw offset of the TimeZone object. * - * @returns { number } a number represents the raw offset. + * @returns { int } a number represents the raw offset. * @syscap SystemCapability.Global.I18n * @since 7 */ /** * Get the raw offset of the TimeZone object. * - * @returns { number } a number represents the raw offset. + * @returns { int } a number represents the raw offset. * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -2967,27 +3079,28 @@ declare namespace i18n { /** * Obtains the raw offset of the specified time zone. * - * @returns { number } Raw offset of the time zone, in milliseconds. + * @returns { int } Raw offset of the time zone, in milliseconds. * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getRawOffset(): number; + getRawOffset(): int; /** * Get the offset of the TimeZone object. * - * @param { number } [date] - Indicates a date use to compute offset. - * @returns { number } a number represents the offset with date. + * @param { double } [date] - Indicates a date use to compute offset. + * @returns { int } a number represents the offset with date. * @syscap SystemCapability.Global.I18n * @since 7 */ /** * Get the offset of the TimeZone object. * - * @param { number } [date] - Indicates a date use to compute offset. - * @returns { number } a number represents the offset with date. + * @param { double } [date] - Indicates a date use to compute offset. + * @returns { int } a number represents the offset with date. * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -2995,15 +3108,16 @@ declare namespace i18n { /** * Obtains the offset of the specified time zone at the specified time. * - * @param { number } [date] - Specified time, in milliseconds. The default value is the system time. - * @returns { number } Time zone offset, in milliseconds. When the DST is used, the time zone offset + * @param { double } [date] - Specified time, in milliseconds. The default value is the system time. + * @returns { int } Time zone offset, in milliseconds. When the DST is used, the time zone offset * is the raw time zone offset plus the DST offset. * @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; + getOffset(date?: double): int; /** * Get available TimeZone ID list. @@ -3027,7 +3141,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 +3159,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 +3181,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,38 +3201,40 @@ 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; /** * Get the possible time zones from the specified longitude and latitude. * - * @param { number } longitude value - * @param { number } latitude value + * @param { double } longitude value + * @param { double } latitude value * @returns { Array } Returns a TimeZone array from the specified longitude and latitude. * @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. * @syscap SystemCapability.Global.I18n * @since 10 */ - /** * Creates an array of TimeZone objects corresponding to the specified location. * - * @param { number } longitude - Longitude. The value range is [-180, 179.9). A positive value is used for east + * @param { double } longitude - Longitude. The value range is [-180, 179.9). A positive value is used for east * longitude and a negative value is used for west longitude. - * @param { number } latitude - Latitude. The value range is [-90, 89.9). A positive value is used for north + * @param { double } latitude - Latitude. The value range is [-90, 89.9). A positive value is used for north * latitude and a negative value is used for south latitude. * @returns { Array } TimeZone objects corresponding to the specified location. * @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; + static getTimezonesByLocation(longitude: double, latitude: double): Array; /** * Get the zone rules object corresponds to the timezone objects. @@ -3139,13 +3258,13 @@ declare namespace i18n { /** * Get the next timezone offset transition after date. * - * @param { number } [ date ] - Indicates milliseconds. + * @param { double } [ date ] - Indicates milliseconds. * @returns { ZoneOffsetTransition } Returns a timezone offset transition after date. * @syscap SystemCapability.Global.I18n * @atomicservice * @since 20 */ - public nextTransition(date?: number): ZoneOffsetTransition; + public nextTransition(date?: double): ZoneOffsetTransition; } /** @@ -3159,32 +3278,32 @@ declare namespace i18n { /** * Obtains the timestamp of the change in the time zone offset. * - * @returns { number } Timestamp of the change in the time zone offset. + * @returns { double } Timestamp of the change in the time zone offset. * @syscap SystemCapability.Global.I18n * @atomicservice * @since 20 */ - public getMilliseconds(): number; + public getMilliseconds(): double; /** * Get the offset after time zone offset trasition. * - * @returns { number } Returns the offset after time zone offset trasition. + * @returns { int } Returns the offset after time zone offset trasition. * @syscap SystemCapability.Global.I18n * @atomicservice * @since 20 */ - public getOffsetAfter(): number; + public getOffsetAfter(): int; /** * Get the offset before time zone offset trasition. * - * @returns { number } Returns the offset before time zone offset trasition. + * @returns { int } Returns the offset before time zone offset trasition. * @syscap SystemCapability.Global.I18n * @atomicservice * @since 20 */ - public getOffsetBefore(): number; + public getOffsetBefore(): int; } /** @@ -3198,7 +3317,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 +3334,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 +3356,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 +3376,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; } @@ -3262,17 +3385,18 @@ declare namespace i18n { /** * Enumerates the Normalizer modes. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Global.I18n * @since 10 */ /** * Enumerates text normalization modes. * - * @enum { number } + * @enum { int } * @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 +3410,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 +3425,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 +3440,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 +3455,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 +3472,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 +3494,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 +3517,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; } @@ -3395,10 +3526,11 @@ declare namespace i18n { /** * Represents the language or country/region suggestion type. * - * @enum { number } + * @enum { int } * @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 +3538,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 +3547,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 +3556,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 +3568,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 +3579,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 +3592,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 +3605,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 +3617,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 +3627,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 +3638,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 +3649,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 +3672,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 +3682,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 +3693,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,19 +3704,21 @@ 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 } + * + * @type { int } * @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; + offset: int; /** * Time zone display name in the system locale. @@ -3576,19 +3726,21 @@ 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 } + * + * @type { ?int } * @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; + rawOffset?: int; } /** @@ -3596,7 +3748,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 +3757,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 +3786,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 +3816,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 +3836,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 +3855,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,60 +3872,64 @@ 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; /** * Holiday start year. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 11 */ /** * Year of the holiday. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - year: number; + year: int; /** * Holiday start month. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 11 */ /** * Month of the holiday. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - month: number; + month: int; /** * Holiday start day. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 11 */ /** * Day of the holiday. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - day: number; + day: int; /** * Holiday local name array. @@ -3782,7 +3944,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 +3963,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 +3980,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 +3998,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 +4015,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 +4037,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,14 +4062,15 @@ 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; /** * Obtains holiday info array for a specified year * - * @param { number } [year] - specified holiday year. If the year is not given, + * @param { int } [year] - specified holiday year. If the year is not given, * the current year is used. * @returns { Array } holiday information array for one year. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -3912,16 +4081,17 @@ declare namespace i18n { /** * Obtains the holiday information list of the specified year. * - * @param { number } [year] - Specified year, for example, 2023.
The default value is the current year. + * @param { int } [year] - Specified year, for example, 2023.
The default value is the current year. * @returns { Array } Holiday information list. * @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. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getHolidayInfoItemArray(year?: number): Array; + getHolidayInfoItemArray(year?: int): Array; } /** @@ -3937,42 +4107,45 @@ 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 { /** * Entity begin position. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 11 */ /** * Start position of the entity in the input string. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - begin: number; + begin: int; /** * Entity end position. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 11 */ /** * End position of the entity the input string. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - end: number; + end: int; /** * Entity type. Field values such as phone_number, date @@ -3988,7 +4161,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 +4178,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 +4202,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 +4225,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,20 +4246,25 @@ 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 * @since 20 + * @arkts 1.1&1.2 */ export function getSimpleDateTimeFormatByPattern(pattern: string, locale?: Intl.Locale): SimpleDateTimeFormat; @@ -4100,21 +4282,24 @@ 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 * @since 20 + * @arkts 1.1&1.2 */ export function getSimpleDateTimeFormatBySkeleton(skeleton: string, locale?: Intl.Locale): SimpleDateTimeFormat; @@ -4123,7 +4308,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 +4319,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,21 +4338,23 @@ 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 * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ export function getSimpleNumberFormatBySkeleton(skeleton: string, locale?: Intl.Locale): SimpleNumberFormat; @@ -4174,19 +4363,21 @@ 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 { /** * Formats a number. * - * @param { number } value - Number to be formatted. + * @param { double } value - Number to be formatted. * @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; + format(value: double): string; } /** @@ -4194,7 +4385,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 StyledNumberFormat { /** @@ -4207,6 +4399,7 @@ declare namespace i18n { * @atomicservice * @since 18 * @deprecated since 20 + * @useinstead constructor */ constructor(numberFormat: intl.NumberFormat | SimpleNumberFormat, options?: StyledNumberFormatOptions); @@ -4218,6 +4411,7 @@ declare namespace i18n { * @syscap SystemCapability.Global.I18n * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ constructor(numberFormat: Intl.NumberFormat | SimpleNumberFormat, options?: StyledNumberFormatOptions); @@ -4225,13 +4419,14 @@ declare namespace i18n { /** * Formats a number as a rich text object. * - * @param { number } value - Number to be formatted. + * @param { double } value - Number to be formatted. * @returns { StyledString } Rich text object after formatting. * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - format(value: number): StyledString; + format(value: double): StyledString; } /** @@ -4240,7 +4435,8 @@ declare namespace i18n { * @interface StyledNumberFormatOptions * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export interface StyledNumberFormatOptions { /** @@ -4249,7 +4445,8 @@ declare namespace i18n { * @type { ?TextStyle } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ integer?: TextStyle; @@ -4259,7 +4456,8 @@ declare namespace i18n { * @type { ?TextStyle } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ decimal?: TextStyle; @@ -4269,7 +4467,8 @@ declare namespace i18n { * @type { ?TextStyle } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ fraction?: TextStyle; @@ -4279,9 +4478,10 @@ declare namespace i18n { * @type { ?TextStyle } * @syscap SystemCapability.Global.I18n * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ unit?: TextStyle; } } -export default i18n; \ No newline at end of file +export default i18n; diff --git a/api/@ohos.inputMethod.Panel.d.ts b/api/@ohos.inputMethod.Panel.d.ts index b9c045c9c0d42af5464a6233081c725d6ffa3a21..b216b490585db704022eda789dccedd9b4c37ba0 100644 --- a/api/@ohos.inputMethod.Panel.d.ts +++ b/api/@ohos.inputMethod.Panel.d.ts @@ -23,7 +23,8 @@ * * @typedef PanelInfo * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface PanelInfo { /** @@ -31,7 +32,8 @@ export interface PanelInfo { * * @type { PanelType } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ type: PanelType; @@ -42,7 +44,8 @@ export interface PanelInfo { * @type { ?PanelFlag } * @default FLG_FIXED * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ flag?: PanelFlag; } @@ -52,7 +55,8 @@ export interface PanelInfo { * * @enum { number } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum PanelFlag { /** @@ -61,7 +65,8 @@ export enum PanelFlag { * When the flag is set, the soft keyboard is fixed at the bottom of the screen.

* * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FLAG_FIXED = 0, @@ -71,7 +76,8 @@ export enum PanelFlag { * When the flag is set, the soft keyboard is floating.

* * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FLAG_FLOATING, @@ -83,7 +89,8 @@ export enum PanelFlag { * Input method application developers are supposed to control the panel status on their own.

* * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ FLAG_CANDIDATE } @@ -93,14 +100,16 @@ export enum PanelFlag { * * @enum { number } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum PanelType { /** * Panel for displaying a virtual soft keyboard. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ SOFT_KEYBOARD = 0, @@ -108,7 +117,8 @@ export enum PanelType { * Panel for displaying status bar. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ STATUS_BAR } diff --git a/api/@ohos.inputMethod.d.ts b/api/@ohos.inputMethod.d.ts index f4e99ba13ca90f3ab24a8869c3e198d00eb5b900..a8a5e10de1f1f7f24e2de77a1aba5f3eef6b7295 100644 --- a/api/@ohos.inputMethod.d.ts +++ b/api/@ohos.inputMethod.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 @@ -18,16 +18,23 @@ * @kit IMEKit */ import type { Callback, AsyncCallback } from './@ohos.base'; -import type { ElementName } from './bundleManager/ElementName'; import InputMethodSubtype from './@ohos.InputMethodSubtype'; +/*** if arkts 1.1 */ +import type { ElementName } from './bundleManager/ElementName'; import type { PanelInfo } from './@ohos.inputMethod.Panel'; +/*** endif */ +/*** if arkts 1.2 */ +import { ElementName } from './bundleManager/ElementName'; +import { PanelInfo } from './@ohos.inputMethod.Panel'; +/*** endif */ /** * Input method * * @namespace inputMethod * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 6 + * @since arkts {'1.1':'6', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace inputMethod { /** @@ -67,7 +74,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800007 - input method setter error. Possible cause: * create InputmethodSetting object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getSetting(): InputMethodSetting; @@ -78,7 +86,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800006 - input method controller error. Possible cause: * create InputmethodController object failed. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getController(): InputMethodController; @@ -89,7 +98,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDefaultInputMethod(): InputMethodProperty; @@ -100,7 +110,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getSystemInputMethodConfigAbility(): ElementName; @@ -130,7 +141,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function switchInputMethod(target: InputMethodProperty, callback: AsyncCallback): void; @@ -160,7 +172,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function switchInputMethod(target: InputMethodProperty): Promise; @@ -169,7 +182,8 @@ declare namespace inputMethod { * * @returns { InputMethodProperty } the property of current inputmethod. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getCurrentInputMethod(): InputMethodProperty; @@ -214,7 +228,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function switchCurrentInputMethodSubtype(target: InputMethodSubtype, callback: AsyncCallback): void; @@ -259,7 +274,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function switchCurrentInputMethodSubtype(target: InputMethodSubtype): Promise; @@ -268,7 +284,8 @@ declare namespace inputMethod { * * @returns { InputMethodSubtype } the subtype of the current input method. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getCurrentInputMethodSubtype(): InputMethodSubtype; @@ -360,7 +377,8 @@ declare namespace inputMethod { * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function switchInputMethod(bundleName: string, subtypeId?: string): Promise; @@ -376,7 +394,8 @@ declare namespace inputMethod { /** * @interface InputMethodSetting * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface InputMethodSetting { /** @@ -385,7 +404,8 @@ declare namespace inputMethod { * @param { 'imeChange' } type - Indicates the event type. * @param { function } callback - the callback of 'imeChange' * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ on( type: 'imeChange', @@ -399,7 +419,8 @@ declare namespace inputMethod { * @param { function } [callback] - the callback of 'imeChange', * when subscriber unsubscribes all callback functions of event 'imeChange', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ off( type: 'imeChange', @@ -414,7 +435,8 @@ declare namespace inputMethod { * @throws { BusinessError } 202 - not system application. * @syscap SystemCapability.MiscServices.InputMethodFramework * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'imeShow', callback: (info: Array) => void): void; @@ -426,7 +448,8 @@ declare namespace inputMethod { * when subscriber unsubscribes all callback functions of event 'imeShow', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'imeShow', callback?: (info: Array) => void): void; @@ -438,7 +461,8 @@ declare namespace inputMethod { * @throws { BusinessError } 202 - not system application. * @syscap SystemCapability.MiscServices.InputMethodFramework * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'imeHide', callback: (info: Array) => void): void; @@ -450,7 +474,8 @@ declare namespace inputMethod { * when subscriber unsubscribes all callback functions of event 'imeHide', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'imeHide', callback?: (info: Array) => void): void; @@ -468,7 +493,8 @@ declare namespace inputMethod { * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ isPanelShown(panelInfo: PanelInfo): boolean; @@ -483,7 +509,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ listInputMethodSubtype( inputMethodProperty: InputMethodProperty, @@ -501,7 +528,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ listInputMethodSubtype(inputMethodProperty: InputMethodProperty): Promise>; @@ -513,7 +541,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ listCurrentInputMethodSubtype(callback: AsyncCallback>): void; @@ -525,7 +554,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ listCurrentInputMethodSubtype(): Promise>; @@ -542,7 +572,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getInputMethods(enable: boolean, callback: AsyncCallback>): void; @@ -559,7 +590,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ getInputMethods(enable: boolean): Promise>; @@ -576,7 +608,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getInputMethodsSync(enable: boolean): Array; @@ -588,7 +621,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getAllInputMethods(callback: AsyncCallback>): void; @@ -600,7 +634,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getAllInputMethods(): Promise>; @@ -612,7 +647,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ getAllInputMethodsSync(): Array; @@ -712,7 +748,8 @@ declare namespace inputMethod { /** * @interface InputMethodController * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 6 + * @since arkts {'1.1':'6', '1.2':'20'} + * @arkts 1.1&1.2 */ interface InputMethodController { /** @@ -728,7 +765,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ attach(showKeyboard: boolean, textConfig: TextConfig, callback: AsyncCallback): void; /** @@ -744,7 +782,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ attach(showKeyboard: boolean, textConfig: TextConfig): Promise; /** @@ -761,7 +800,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ attach(showKeyboard: boolean, textConfig: TextConfig, requestKeyboardReason: RequestKeyboardReason): Promise; @@ -787,7 +827,8 @@ declare namespace inputMethod { * a system error, such as null pointer, IPC exception. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ showTextInput(callback: AsyncCallback): void; /** @@ -800,7 +841,8 @@ declare namespace inputMethod { * a system error, such as null pointer, IPC exception. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ showTextInput(): Promise; /** @@ -814,7 +856,8 @@ declare namespace inputMethod { * a system error, such as null pointer, IPC exception. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ showTextInput(requestKeyboardReason: RequestKeyboardReason): Promise; /** @@ -827,7 +870,8 @@ declare namespace inputMethod { * a system error, such as null pointer, IPC exception. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ hideTextInput(callback: AsyncCallback): void; @@ -841,7 +885,8 @@ declare namespace inputMethod { * a system error, such as null pointer, IPC exception. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ hideTextInput(): Promise; @@ -854,7 +899,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ detach(callback: AsyncCallback): void; @@ -867,7 +913,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ detach(): Promise; @@ -1104,7 +1151,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ hideSoftKeyboard(callback: AsyncCallback): void; @@ -1120,7 +1168,8 @@ declare namespace inputMethod { * @throws { BusinessError } 12800008 - input method manager service error. Possible cause: * a system error, such as null pointer, IPC exception. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ hideSoftKeyboard(): Promise; @@ -1164,7 +1213,8 @@ declare namespace inputMethod { * @throws { BusinessError } 401 - parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'selectByRange', callback: Callback): void; @@ -1175,7 +1225,8 @@ declare namespace inputMethod { * @param { Callback } [callback] - the callback of 'selectByRange', * when subscriber unsubscribes all callback functions of event 'selectByRange', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'selectByRange', callback?: Callback): void; @@ -1190,7 +1241,8 @@ declare namespace inputMethod { * @throws { BusinessError } 401 - parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'selectByMovement', callback: Callback): void; @@ -1201,7 +1253,8 @@ declare namespace inputMethod { * @param { Callback } [callback] - the callback of 'selectByMovement', * when subscriber unsubscribes all callback functions of event 'selectByMovement', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'selectByMovement', callback?: Callback): void; @@ -1215,7 +1268,8 @@ declare namespace inputMethod { * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'insertText', callback: (text: string) => void): void; @@ -1226,7 +1280,8 @@ declare namespace inputMethod { * @param { function } [callback] - the callback of 'insertText', * when subscriber unsubscribes all callback functions of event 'insertText', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'insertText', callback?: (text: string) => void): void; @@ -1242,9 +1297,10 @@ declare namespace inputMethod { * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'deleteLeft', callback: (length: number) => void): void; + on(type: 'deleteLeft', callback: (length: int) => void): void; /** * Unregister the callback of deleteLeft. @@ -1253,9 +1309,10 @@ declare namespace inputMethod { * @param { function } [callback] - the callback of 'deleteLeft', * when subscriber unsubscribes all callback functions of event 'deleteLeft', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'deleteLeft', callback?: (length: number) => void): void; + off(type: 'deleteLeft', callback?: (length: int) => void): void; /** * Register a callback and when IME sends delete right event with length, @@ -1269,9 +1326,10 @@ declare namespace inputMethod { * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'deleteRight', callback: (length: number) => void): void; + on(type: 'deleteRight', callback: (length: int) => void): void; /** * Unregister the callback of deleteRight. @@ -1280,9 +1338,10 @@ declare namespace inputMethod { * @param { function } [callback] - the callback of 'deleteRight', * when subscriber unsubscribes all callback functions of event 'deleteRight', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'deleteRight', callback?: (length: number) => void): void; + off(type: 'deleteRight', callback?: (length: int) => void): void; /** * Register a callback and when IME sends keyboard status, the callback will be invoked. @@ -1294,7 +1353,8 @@ declare namespace inputMethod { * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'sendKeyboardStatus', callback: (keyboardStatus: KeyboardStatus) => void): void; @@ -1305,7 +1365,8 @@ declare namespace inputMethod { * @param { function } [callback] - the callback of 'sendKeyboardStatus', * when subscriber unsubscribes all callback functions of event 'sendKeyboardStatus', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'sendKeyboardStatus', callback?: (keyboardStatus: KeyboardStatus) => void): void; @@ -1320,7 +1381,8 @@ declare namespace inputMethod { * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'sendFunctionKey', callback: (functionKey: FunctionKey) => void): void; @@ -1331,7 +1393,8 @@ declare namespace inputMethod { * @param { function } [callback] - the callback of 'sendFunctionKey', * when subscriber unsubscribes all callback functions of event 'sendFunctionKey', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'sendFunctionKey', callback?: (functionKey: FunctionKey) => void): void; @@ -1346,7 +1409,8 @@ declare namespace inputMethod { * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'moveCursor', callback: (direction: Direction) => void): void; @@ -1357,7 +1421,8 @@ declare namespace inputMethod { * @param { function } [callback] - the callback of 'moveCursor', * when subscriber unsubscribes all callback functions of event 'moveCursor', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'moveCursor', callback?: (direction: Direction) => void): void; @@ -1371,7 +1436,8 @@ declare namespace inputMethod { * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'handleExtendAction', callback: (action: ExtendAction) => void): void; @@ -1382,7 +1448,8 @@ declare namespace inputMethod { * @param { function } [callback] - the callback of 'handleExtendAction', * when subscriber unsubscribes all callback functions of event 'handleExtendAction', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'handleExtendAction', callback?: (action: ExtendAction) => void): void; @@ -1396,9 +1463,10 @@ declare namespace inputMethod { * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'getLeftTextOfCursor', callback: (length: number) => string): void; + on(type: 'getLeftTextOfCursor', callback: (length: int) => string): void; /** * Unregister the callback of getLeftTextOfCursor event. @@ -1407,9 +1475,10 @@ declare namespace inputMethod { * @param { function } [callback] - the callback of 'getLeftTextOfCursor', * when subscriber unsubscribes all callback functions of event 'getLeftTextOfCursor', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'getLeftTextOfCursor', callback?: (length: number) => string): void; + off(type: 'getLeftTextOfCursor', callback?: (length: int) => string): void; /** * Register a callback and when input method ability gets right text of cursor, the callback will be invoked. @@ -1421,9 +1490,10 @@ declare namespace inputMethod { * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'getRightTextOfCursor', callback: (length: number) => string): void; + on(type: 'getRightTextOfCursor', callback: (length: int) => string): void; /** * Unregister the callback of getRightTextOfCursor event. @@ -1432,9 +1502,10 @@ declare namespace inputMethod { * @param { function } [callback] - the callback of 'getRightTextOfCursor', * when subscriber unsubscribes all callback functions of event 'getRightTextOfCursor', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'getRightTextOfCursor', callback?: (length: number) => string): void; + off(type: 'getRightTextOfCursor', callback?: (length: int) => string): void; /** * Register a callback and when input method ability gets the text index at cursor, the callback will be invoked. @@ -1446,9 +1517,10 @@ declare namespace inputMethod { * 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types; 3.Parameter verification failed. * @throws { BusinessError } 12800009 - input method client detached. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'getTextIndexAtCursor', callback: () => number): void; + on(type: 'getTextIndexAtCursor', callback: () => int): void; /** * Unregister the callback of getTextIndexAtCursor. @@ -1457,9 +1529,10 @@ declare namespace inputMethod { * @param { function } [callback] - the callback of 'getTextIndexAtCursor', * when subscriber unsubscribes all callback functions of event 'getTextIndexAtCursor', this parameter can be left blank. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'getTextIndexAtCursor', callback?: () => number): void; + off(type: 'getTextIndexAtCursor', callback?: () => int): void; /** *

Subscribe 'setPreviewText' event.

@@ -1513,7 +1586,8 @@ declare namespace inputMethod { * * @interface InputMethodProperty * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ interface InputMethodProperty { /** @@ -1544,7 +1618,8 @@ declare namespace inputMethod { * @type { string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly name: string; @@ -1554,7 +1629,8 @@ declare namespace inputMethod { * @type { string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly id: string; @@ -1564,19 +1640,21 @@ declare namespace inputMethod { * @type { ?string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly label?: string; /** * The label id of input method * - * @type { ?number } + * @type { ?double } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly labelId?: number; + readonly labelId?: double; /** * The icon of input method @@ -1584,19 +1662,21 @@ declare namespace inputMethod { * @type { ?string } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ readonly icon?: string; /** * The icon id of input method * - * @type { ?number } + * @type { ?double } * @readonly * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly iconId?: number; + readonly iconId?: double; /** * The enabledState of input method @@ -1628,16 +1708,18 @@ declare namespace inputMethod { /** * Enumerates the moving direction of cursor * - * @enum { number } + * @enum { int } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum Direction { /** * Cursor moves up * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ CURSOR_UP = 1, @@ -1645,7 +1727,8 @@ declare namespace inputMethod { * Cursor moves down * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ CURSOR_DOWN, @@ -1653,7 +1736,8 @@ declare namespace inputMethod { * Cursor moves left * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ CURSOR_LEFT, @@ -1661,7 +1745,8 @@ declare namespace inputMethod { * Cursor moves right * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ CURSOR_RIGHT } @@ -1671,26 +1756,29 @@ declare namespace inputMethod { * * @typedef Range * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface Range { /** * Indicates the index of the first character of the selected text. * - * @type { number } + * @type { int } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - start: number; + start: int; /** * Indicates the index of the last character of the selected text. * - * @type { number } + * @type { int } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - end: number; + end: int; } /** @@ -1698,7 +1786,8 @@ declare namespace inputMethod { * * @typedef Movement * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface Movement { /** @@ -1706,7 +1795,8 @@ declare namespace inputMethod { * * @type { Direction } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ direction: Direction; } @@ -1714,16 +1804,18 @@ declare namespace inputMethod { /** * Enumerates the text input type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum TextInputType { /** * The text input type is NONE. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE = -1, @@ -1731,7 +1823,8 @@ declare namespace inputMethod { * The text input type is TEXT. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ TEXT = 0, @@ -1739,7 +1832,8 @@ declare namespace inputMethod { * The text input type is MULTILINE. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ MULTILINE, @@ -1747,7 +1841,8 @@ declare namespace inputMethod { * The text input type is NUMBER. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ NUMBER, @@ -1755,7 +1850,8 @@ declare namespace inputMethod { * The text input type is PHONE. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ PHONE, @@ -1763,7 +1859,8 @@ declare namespace inputMethod { * The text input type is DATETIME. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ DATETIME, @@ -1771,7 +1868,8 @@ declare namespace inputMethod { * The text input type is EMAIL_ADDRESS. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ EMAIL_ADDRESS, @@ -1779,7 +1877,8 @@ declare namespace inputMethod { * The text input type is URL. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ URL, @@ -1787,7 +1886,8 @@ declare namespace inputMethod { * The text input type is VISIBLE_PASSWORD. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ VISIBLE_PASSWORD, @@ -1795,7 +1895,8 @@ declare namespace inputMethod { * The text input type is NUMBER_PASSWORD. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ NUMBER_PASSWORD, @@ -1843,16 +1944,18 @@ declare namespace inputMethod { /** * Enumerates the enter key type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum EnterKeyType { /** * The enter key type is UNSPECIFIED. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ UNSPECIFIED = 0, @@ -1860,7 +1963,8 @@ declare namespace inputMethod { * The enter key type is NONE. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE, @@ -1868,7 +1972,8 @@ declare namespace inputMethod { * The enter key type is GO. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ GO, @@ -1876,7 +1981,8 @@ declare namespace inputMethod { * The enter key type is SEARCH. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ SEARCH, @@ -1884,7 +1990,8 @@ declare namespace inputMethod { * The enter key type is SEND. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ SEND, @@ -1892,7 +1999,8 @@ declare namespace inputMethod { * The enter key type is NEXT. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ NEXT, @@ -1900,7 +2008,8 @@ declare namespace inputMethod { * The enter key type is DONE. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ DONE, @@ -1908,7 +2017,8 @@ declare namespace inputMethod { * The enter key type is PREVIOUS. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ PREVIOUS, @@ -1916,7 +2026,8 @@ declare namespace inputMethod { * The enter key type is NEWLINE. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ NEWLINE } @@ -1924,16 +2035,18 @@ declare namespace inputMethod { /** * Enumerates the keyboard status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum KeyboardStatus { /** * The keyboard status is none. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -1941,7 +2054,8 @@ declare namespace inputMethod { * The keyboard status is hide. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ HIDE = 1, @@ -1949,7 +2063,8 @@ declare namespace inputMethod { * The keyboard status is show. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ SHOW = 2 } @@ -1959,7 +2074,8 @@ declare namespace inputMethod { * * @typedef InputAttribute * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface InputAttribute { /** @@ -1967,7 +2083,8 @@ declare namespace inputMethod { * * @type { TextInputType } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ textInputType: TextInputType; @@ -1976,7 +2093,8 @@ declare namespace inputMethod { * * @type { EnterKeyType } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enterKeyType: EnterKeyType; @@ -2004,7 +2122,8 @@ declare namespace inputMethod { * * @typedef FunctionKey * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface FunctionKey { /** @@ -2012,7 +2131,8 @@ declare namespace inputMethod { * * @type { EnterKeyType } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enterKeyType: EnterKeyType; } @@ -2022,44 +2142,49 @@ declare namespace inputMethod { * * @typedef CursorInfo * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface CursorInfo { /** * Indicates the left point of the cursor info and must be absolute coordinate of the physical screen. * - * @type { number } + * @type { double } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - left: number; + left: double; /** * Indicates the top point of the cursor info and must be absolute coordinate of the physical screen. * - * @type { number } + * @type { double } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - top: number; + top: double; /** * Indicates the width point of the cursor info. * - * @type { number } + * @type { double } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - width: number; + width: double; /** * Indicates the height point of the cursor info. * - * @type { number } + * @type { double } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - height: number; + height: double; } /** @@ -2067,7 +2192,8 @@ declare namespace inputMethod { * * @typedef TextConfig * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface TextConfig { /** @@ -2075,7 +2201,8 @@ declare namespace inputMethod { * * @type { InputAttribute } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ inputAttribute: InputAttribute; @@ -2084,7 +2211,8 @@ declare namespace inputMethod { * * @type { ?CursorInfo } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ cursorInfo?: CursorInfo; @@ -2093,18 +2221,20 @@ declare namespace inputMethod { * * @type { ?Range } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ selection?: Range; /** * The window ID of the application currently bound to the input method. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - windowId?: number; + windowId?: int; /** *Indicates that this is a new edit box. @@ -2129,16 +2259,18 @@ declare namespace inputMethod { /** * Enumerates the extend action. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum ExtendAction { /** * Select all text. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ SELECT_ALL = 0, @@ -2146,7 +2278,8 @@ declare namespace inputMethod { * Cut selecting text. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ CUT = 3, @@ -2154,7 +2287,8 @@ declare namespace inputMethod { * Copy selecting text. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ COPY = 4, @@ -2162,7 +2296,8 @@ declare namespace inputMethod { * Paste from paste board. * * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ PASTE = 5 } @@ -2172,7 +2307,8 @@ declare namespace inputMethod { * * @typedef InputWindowInfo * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface InputWindowInfo { /** @@ -2180,45 +2316,50 @@ declare namespace inputMethod { * * @type { string } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ name: string; /** * Indicates the abscissa of the upper-left vertex of input window. * - * @type { number } + * @type { int } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - left: number; + left: int; /** * Indicates the ordinate of the upper-left vertex of input window. * - * @type { number } + * @type { int } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - top: number; + top: int; /** * Indicates the width of the input window. * - * @type { number } + * @type { double } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - width: number; + width: double; /** * Indicates the height of the input window. * - * @type { number } + * @type { double } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - height: number; + height: double; } /** @@ -2285,33 +2426,38 @@ declare namespace inputMethod { /** * requestKeyboardReason of input click * - * @enum { number } + * @enum { int } * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ export enum RequestKeyboardReason { /** * The request keyboard reason is NONE. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, /** * The request keyboard reason is MOUSE. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ MOUSE = 1, /** * The request keyboard reason is TOUCH. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ TOUCH = 2, /** * The request keyboard reason is OTHER. * @syscap SystemCapability.MiscServices.InputMethodFramework - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ OTHER = 20 } diff --git a/api/@ohos.intl.d.ts b/api/@ohos.intl.d.ts index 445c96bea50d0b0c9bfd8a39e9dfc02f552a60e6..0cbfb8e4cc7db463464282d8fdee70b5a1ecbb83 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,29 +2657,27 @@ 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; /** * Indicates the minimumIntegerDigits. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 6 */ /** * Indicates the minimumIntegerDigits. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @since 9 */ /** * Indicates the minimumIntegerDigits. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -2975,35 +2686,33 @@ declare namespace intl { * Minimum number of digits allowed in the integer part of a number. The value ranges from 1 to 21. * The default value is 1. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.minimumIntegerDigits */ - minimumIntegerDigits?: number; + minimumIntegerDigits?: int; /** * Indicates the minimumFractionDigits. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 6 */ /** * Indicates the minimumFractionDigits. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @since 9 */ /** * Indicates the minimumFractionDigits. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -3012,35 +2721,33 @@ declare namespace intl { * Minimum number of digits in the fraction part of a number. The value ranges from 0 to 20. * The default value is 0. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.minimumFractionDigits */ - minimumFractionDigits?: number; + minimumFractionDigits?: int; /** * Indicates the maximumFractionDigits. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 6 */ /** * Indicates the maximumFractionDigits. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @since 9 */ /** * Indicates the maximumFractionDigits. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -3049,35 +2756,33 @@ declare namespace intl { * Maximum number of digits in the fraction part of a number. The value ranges from 1 to 21. * The default value is 3. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.maximumFractionDigits */ - maximumFractionDigits?: number; + maximumFractionDigits?: int; /** * Indicates the minimumSignificantDigits. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 6 */ /** * Indicates the minimumSignificantDigits. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @since 9 */ /** * Indicates the minimumSignificantDigits. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -3085,35 +2790,33 @@ declare namespace intl { /** * Minimum number of the least significant digits. The value ranges from 1 to 21. The default value is 1. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.minimumSignificantDigits */ - minimumSignificantDigits?: number; + minimumSignificantDigits?: int; /** * Indicates the maximumSignificantDigits. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 6 */ /** * Indicates the maximumSignificantDigits. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @since 9 */ /** * Indicates the maximumSignificantDigits. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -3121,16 +2824,14 @@ declare namespace intl { /** * Maximum number of the least significant digits. The value ranges from 1 to 21. The default value is 21. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 - * @deprecated since 20 - * @useinstead Intl.NumberOptions.maximumSignificantDigits */ - maximumSignificantDigits?: number; + maximumSignificantDigits?: int; /** * Rounding priority used when both the maximum number of fraction digits and the maximum number of valid digits @@ -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; @@ -3151,14 +2851,13 @@ declare namespace intl { * Rounding increment. The value can be: 1, 2, 5, 10, 20, 25, 50, 100, 200, 250, 500, 1000, 2000, 2500, or 5000. * The default value is 1. * - * @type { ?number } + * @type { ?int } * @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; + roundingIncrement?: int; /** * Rounding mode. The value can be: @@ -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,15 +2965,13 @@ 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); /** * Obtains the formatted number string. * - * @param { number } number Indicates the number to be formatted. + * @param { double } number Indicates the number to be formatted. * @returns { string } a number string formatted based on the specified locale. * @syscap SystemCapability.Global.I18n * @since 6 @@ -3285,7 +2979,7 @@ declare namespace intl { /** * Obtains the formatted number string. * - * @param { number } number Indicates the number to be formatted. + * @param { double } number Indicates the number to be formatted. * @returns { string } a number string formatted based on the specified locale. * @syscap SystemCapability.Global.I18n * @crossplatform @@ -3294,31 +2988,28 @@ declare namespace intl { /** * Formats a number. * - * @param { number } number - Number to be formatted. + * @param { double } 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: double): string; /** * Formats a number range. * - * @param { number } startRange - Start number. - * @param { number } endRange - End number. + * @param { double } startRange - Start number. + * @param { double } endRange - End number. * @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; + formatRange(startRange: double, endRange: double): string; /** * Obtains the options of the NumberFormat object. @@ -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); @@ -3743,7 +3424,7 @@ declare namespace intl { * * @param { string } first - The first string to compare. * @param { string } second - The second string to compare. - * @returns { number } a number indicating how first compare to second: + * @returns { int } a number indicating how first compare to second: * a negative value if string1 comes before string2; * a positive value if string1 comes after string2; * 0 if they are considered equal. @@ -3755,7 +3436,7 @@ declare namespace intl { * * @param { string } first - The first string to compare. * @param { string } second - The second string to compare. - * @returns { number } a number indicating how first compare to second: + * @returns { int } a number indicating how first compare to second: * a negative value if string1 comes before string2; * a positive value if string1 comes after string2; * 0 if they are considered equal. @@ -3768,17 +3449,16 @@ declare namespace intl { * * @param { string } first - First string to compare. * @param { string } second - Second string to compare. - * @returns { number } Comparison result. If the value is a negative number, the first string comes before the + * @returns { int } Comparison result. If the value is a negative number, the first string comes before the * second string. If the value is 0, the first and second strings are in the same sequence. * If the value is a positive number, the first string is comes after the second string. * @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; + compare(first: string, second: string): int; /** * Returns a new object with properties that reflect the locale and collation options computed @@ -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 @@ -3914,7 +3595,7 @@ declare namespace intl { * The minimum number of integer digits to use. * Possible values are from 1 to 21; the default is 1. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 8 */ @@ -3922,7 +3603,7 @@ declare namespace intl { * The minimum number of integer digits to use. * Possible values are from 1 to 21; the default is 1. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @since 9 */ @@ -3930,7 +3611,7 @@ declare namespace intl { * The minimum number of integer digits to use. * Possible values are from 1 to 21; the default is 1. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -3939,7 +3620,7 @@ declare namespace intl { * Minimum number of digits allowed in the integer part of a number. The value ranges from 1 to 21. * The default value is 1. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice @@ -3947,13 +3628,13 @@ declare namespace intl { * @deprecated since 20 * @useinstead Intl.PluralRulesOptions.minimumIntegerDigits */ - minimumIntegerDigits?: number; + minimumIntegerDigits?: int; /** * The minimum number of fraction digits to use. * Possible values are from 0 to 20; the default for plain number and percent formatting is 0; * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 8 */ @@ -3961,7 +3642,7 @@ declare namespace intl { * The minimum number of fraction digits to use. * Possible values are from 0 to 20; the default for plain number and percent formatting is 0; * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @since 9 */ @@ -3969,7 +3650,7 @@ declare namespace intl { * The minimum number of fraction digits to use. * Possible values are from 0 to 20; the default for plain number and percent formatting is 0; * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -3978,7 +3659,7 @@ declare namespace intl { * Minimum number of digits in the fraction part of a number. The value ranges from 0 to 20. * The default value is 0. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice @@ -3986,14 +3667,14 @@ declare namespace intl { * @deprecated since 20 * @useinstead Intl.PluralRulesOptions.minimumFractionDigits */ - minimumFractionDigits?: number; + minimumFractionDigits?: int; /** * The maximum number of fraction digits to use. * Possible values are from 0 to 20; * the default for plain number formatting is the larger of minimumFractionDigits and 3; * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 8 */ @@ -4002,7 +3683,7 @@ declare namespace intl { * Possible values are from 0 to 20; * the default for plain number formatting is the larger of minimumFractionDigits and 3; * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @since 9 */ @@ -4011,7 +3692,7 @@ declare namespace intl { * Possible values are from 0 to 20; * the default for plain number formatting is the larger of minimumFractionDigits and 3; * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -4020,7 +3701,7 @@ declare namespace intl { * Maximum number of digits in the fraction part of a number. The value ranges from 1 to 21. * The default value is 3. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice @@ -4028,13 +3709,13 @@ declare namespace intl { * @deprecated since 20 * @useinstead Intl.PluralRulesOptions.maximumFractionDigits */ - maximumFractionDigits?: number; + maximumFractionDigits?: int; /** * The minimum number of significant digits to use. * Possible values are from 1 to 21; the default is 1. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 8 */ @@ -4042,7 +3723,7 @@ declare namespace intl { * The minimum number of significant digits to use. * Possible values are from 1 to 21; the default is 1. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @since 9 */ @@ -4050,7 +3731,7 @@ declare namespace intl { * The minimum number of significant digits to use. * Possible values are from 1 to 21; the default is 1. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -4058,7 +3739,7 @@ declare namespace intl { /** * Minimum number of the least significant digits. The value ranges from 1 to 21. The default value is 1. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice @@ -4066,13 +3747,13 @@ declare namespace intl { * @deprecated since 20 * @useinstead Intl.PluralRulesOptions.minimumSignificantDigits */ - minimumSignificantDigits?: number; + minimumSignificantDigits?: int; /** * The maximum number of significant digits to use. * Possible values are from 1 to 21; the default is 21. * - * @type { number } + * @type { int } * @syscap SystemCapability.Global.I18n * @since 8 */ @@ -4080,7 +3761,7 @@ declare namespace intl { * The maximum number of significant digits to use. * Possible values are from 1 to 21; the default is 21. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @since 9 */ @@ -4088,7 +3769,7 @@ declare namespace intl { * The maximum number of significant digits to use. * Possible values are from 1 to 21; the default is 21. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @since 10 @@ -4096,7 +3777,7 @@ declare namespace intl { /** * Maximum number of the least significant digits. The value ranges from 1 to 21. The default value is 21. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Global.I18n * @crossplatform * @atomicservice @@ -4104,7 +3785,7 @@ declare namespace intl { * @deprecated since 20 * @useinstead Intl.PluralRulesOptions.maximumSignificantDigits */ - maximumSignificantDigits?: number; + maximumSignificantDigits?: int; } /** @@ -4127,6 +3808,8 @@ declare namespace intl { * @crossplatform * @atomicservice * @since 12 + * @deprecated since 20 + * @useinstead Intl.PluralRules */ export class PluralRules { /** @@ -4191,7 +3874,7 @@ declare namespace intl { /** * Returns a string indicating which plural rule to use for locale-aware formatting. * - * @param { number } n - The number to get a plural rule for. + * @param { double } n - The number to get a plural rule for. * @returns { string } A string representing the pluralization category of the number, * can be one of zero, one, two, few, many or other. * @syscap SystemCapability.Global.I18n @@ -4200,7 +3883,7 @@ declare namespace intl { /** * Returns a string indicating which plural rule to use for locale-aware formatting. * - * @param { number } n - The number to get a plural rule for. + * @param { double } n - The number to get a plural rule for. * @returns { string } A string representing the pluralization category of the number, * can be one of zero, one, two, few, many or other. * @syscap SystemCapability.Global.I18n @@ -4210,7 +3893,7 @@ declare namespace intl { /** * Obtains the singular-plural type of the specified number. * - * @param { number } n - Number for which the singular-plural type is to be obtained. + * @param { double } n - Number for which the singular-plural type is to be obtained. * @returns { string } Singular-plural type. The value can be any of the following: "zero", "one", "two", "few", * "many", "others". For details about the meanings of different values, see * [Language Plural Rules](https://www.unicode.org/cldr/charts/45/supplemental/language_plural_rules.html). @@ -4221,7 +3904,7 @@ declare namespace intl { * @deprecated since 20 * @useinstead Intl.PluralRules.select */ - select(n: number): string; + select(n: double): string; } /** @@ -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 { /** @@ -4591,7 +4280,7 @@ declare namespace intl { /** * formats a value and unit according to the locale and formatting options of this object. * - * @param { number } value - Numeric value to use in the internationalized relative time message. + * @param { double } value - Numeric value to use in the internationalized relative time message. * @param { string } unit - Unit to use in the relative time internationalized message. * Possible values are: year, quarter, month, week, day, hour, minute, second. * @returns { string } formatted language-sensitive relative time. @@ -4601,7 +4290,7 @@ declare namespace intl { /** * formats a value and unit according to the locale and formatting options of this object. * - * @param { number } value - Numeric value to use in the internationalized relative time message. + * @param { double } value - Numeric value to use in the internationalized relative time message. * @param { string } unit - Unit to use in the relative time internationalized message. * Possible values are: year, quarter, month, week, day, hour, minute, second. * @returns { string } formatted language-sensitive relative time. @@ -4612,7 +4301,7 @@ declare namespace intl { /** * Formats a relative time. * - * @param { number } value - Value to format. + * @param { double } value - Value to format. * @param { string } unit - Unit of the relative time.
The value can be any of the following: "year", "quarter", * "month", "week", "day", "hour", "minute", or "second". * @returns { string } Relative time after formatting. @@ -4623,13 +4312,13 @@ declare namespace intl { * @deprecated since 20 * @useinstead Intl.RelativeTimeFormat.format */ - format(value: number, unit: string): string; + format(value: double, unit: string): string; /** * returns an Array of objects representing the relative time format in parts that can be used for * custom locale-aware formatting * - * @param { number } value - Numeric value to use in the internationalized relative time message. + * @param { double } value - Numeric value to use in the internationalized relative time message. * @param { string } unit - to use in the relative time internationalized message. * Possible values are: year, quarter, month, week, day, hour, minute, second. * @returns { Array } an Array of objects representing the relative time format in parts @@ -4640,7 +4329,7 @@ declare namespace intl { * returns an Array of objects representing the relative time format in parts that can be used for * custom locale-aware formatting * - * @param { number } value - Numeric value to use in the internationalized relative time message. + * @param { double } value - Numeric value to use in the internationalized relative time message. * @param { string } unit - to use in the relative time internationalized message. * Possible values are: year, quarter, month, week, day, hour, minute, second. * @returns { Array } an Array of objects representing the relative time format in parts @@ -4651,7 +4340,7 @@ declare namespace intl { /** * Formats the relative time. * - * @param { number } value - Value to format. + * @param { double } value - Value to format. * @param { string } unit - Unit of the relative time.
The value can be any of the following: "year", "quarter", * "month", "week", "day", "hour", "minute", or "second". * @returns { Array } to parts. @@ -4662,7 +4351,7 @@ declare namespace intl { * @deprecated since 20 * @useinstead Intl.RelativeTimeFormat.formatToParts */ - formatToParts(value: number, unit: string): Array; + formatToParts(value: double, unit: string): Array; /** * Returns a new object with properties that reflect the locale and formatting options computed during @@ -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..a3156537e78a234a3dfd25403cafebfbdefdebd2 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,29 +44,32 @@ 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; /** * File modification time, expressed by the number of seconds elapsed from 1970-01-01 * - * @type { number } + * @type { long } * @syscap SystemCapability.HiviewDFX.Hiview.LogLibrary * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - mtime: number; + mtime: long; /** * Log file size, byte * - * @type { number } + * @type { long } * @syscap SystemCapability.HiviewDFX.Hiview.LogLibrary * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - size: number; + size: long; } /** @@ -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..1aa87f826f96aeffd783336f434280a9e5b337d6 100644 --- a/api/@ohos.matrix4.d.ts +++ b/api/@ohos.matrix4.d.ts @@ -882,7 +882,6 @@ declare namespace matrix4 { * @since 12 */ setPolyToPoly(options: PolyToPolyOptions): Matrix4Transit - } /** diff --git a/api/@ohos.matrix4.static.d.ets b/api/@ohos.matrix4.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..e82b064b17e51ba6e9388e1e52633ca32af6ff2b --- /dev/null +++ b/api/@ohos.matrix4.static.d.ets @@ -0,0 +1,443 @@ +'use static' +/* + * 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 ArkUI + * @arkts 1.2 + */ + +/** + * Used to do matrix operations + * + * @namespace matrix4 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare namespace matrix4 { + + /** + * Set translation parameters + * + * @interface TranslateOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface TranslateOption { + + /** + * Indicates the translation distance of the x-axis, in px. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + x?: number; + + /** + * Indicates the translation distance of the y-axis, in px. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + y?: number; + + /** + * Indicates the translation distance of the z-axis, in px. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + z?: number; + } + + /** + * Set scaling parameters + * + * @interface ScaleOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface ScaleOption { + + /** + * Zoom factor of the x-axis. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + x?: number; + + + /** + * Zoom factor of the y-axis. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + y?: number; + + /** + * Zoom factor of the z-axis. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + z?: number; + + + /** + * Transform the x-axis coordinate of the center point. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + centerX?: number; + + /** + * Transform the y-axis coordinate of the center point. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + centerY?: number; + } + + /** + * Set Rotation Parameters. + * + * @interface RotateOption + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface RotateOption { + + /** + * Axis of rotation vector x coordinate. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + x?: number; + + /** + * Axis of rotation vector y coordinate. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + y?: number; + + /** + * Axis of rotation vector z coordinate. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + z?: number; + + /** + * Transform the x-axis coordinate of the center point. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + centerX?: number; + + /** + * Transform the y-axis coordinate of the center point. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + centerY?: number; + + /** + * Rotation angle. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + angle?: number; + } + /** + * Set poly to poly point. + * + * @interface Point + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface Point { + /** + * Point x. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + x: number; + /** + * Point y. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + y: number; + } + /** + * Set poly to poly point options. + * + * @interface PolyToPolyOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface PolyToPolyOptions { + /** + * Array of point coordinates for the source polygon. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + src: Array; + /** + * Start point index of the source polygon, which defaults to 0. + * @type { ?number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + srcIndex?: number; + /** + * Array of point coordinates for the target polygon. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + dst: Array; + /** + * Start index of the target polygon, which defaults to 0. + * + * @type { ?number } + * @default src.Length/2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + dstIndex?: number; + /** + * The number of points to be used. + * If it is 0, it returns the identity matrix. + * If it is 1, it returns a translation matrix that changed before two points. + * If it is 2-4, it returns a transformation matrix. + * @type { ?number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + pointCount?: number; + } + + + /** + * Matrix4Transit. + * + * @interface Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface Matrix4Transit { + + + /** + * Copy function of Matrix, which can copy a copy of the current matrix object. + * + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + copy(): Matrix4Transit; + + + /** + * The inverse function of Matrix returns an inverse matrix of the current matrix object, That is, the effect is exactly the opposite. + * + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + invert(): Matrix4Transit; + + + /** + * Matrix superposition function, Which can superpose the effects of two matrices to generate a new matrix object. + * + * @param { Matrix4Transit } options + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + combine(options: Matrix4Transit): Matrix4Transit; + + + /** + * Matrix translation function, Which can add the x-axis, Y-axis, or Z-axis translation effect to the current matrix. + * + * @param { TranslateOption } options + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + translate(options: TranslateOption): Matrix4Transit; + + + /** + * 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 + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + scale(options: ScaleOption): Matrix4Transit; + /** + * 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 - 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 + * @since 20 + */ + skew(x: number, y: number): Matrix4Transit; + + + /** + * 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 + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + rotate(options: RotateOption): Matrix4Transit; + + + /** + * Matrix coordinate point conversion function, Which can apply the current transformation effect to a coordinate point. + * + * @param { [number, number] } options + * @returns { [number, number] } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + transformPoint(options: [ + number, + number + ]): [ + number, + number + ]; + /** + * Sets matrix to map src to dst. + * + * @param { PolyToPolyOptions } options - polyToPoly options + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setPolyToPoly(options: PolyToPolyOptions): Matrix4Transit; + } + + + + /** + * Constructor of Matrix, which can create a fourth-order matrix based on the input parameters. The matrix is column-first. + * + * @param { [number,number,number,number,number,number,number,number,number,number,number,number,number,number,number,number] } options + * options indicates a fourth-order matrix + * The default value: + * [1, 0, 0, 0, + * 0, 1, 0, 0, + * 0, 0, 1, 0, + * 0, 0, 0, 1] + * Fourth-order matrix notes: + * m00 { number } -The x-axis scale value, the identity matrix defaults to 1. + * m01 { number } -The second value, the rotation and skew of the xyz axis affects this value. + * m02 { number } -The third value, the rotation of the xyz axis affects this value. + * m03 { number } -The fourth value, the perspective projection affects this value. + * m10 { number } -The fifth value, the rotation and skew of the xyz axis affects this value. + * m11 { number } -The y-axis scales the value, and the identity matrix defaults to 1. + * m12 { number } -The 7th value, the rotation of the xyz axis affects this value. + * m13 { number } -The 8th value, the perspective projection affects this value. + * m20 { number } -The 9th value, the rotation of the xyz axis affects this value. + * m21 { number } -The 10th value, xyz axis rotation affects this value. + * m22 { number } -The z-axis scale value, the identity matrix defaults to 1. + * m23 { number } -The 12th value, the perspective projection affects this value. + * m30 { number } -The x-axis translation value in px, the identity matrix defaults to 0. + * m31 { number } -Y-axis translation value, in px, the identity matrix defaults to 0. + * m32 { number } -The z-axis translation value in px, the identity matrix defaults to 0. + * m33 { number } -It takes effect in homogeneous coordinates to produce a perspective projection effect. + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + function init(options: [ + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number, + number + ]): Matrix4Transit; + + + /** + * Matrix initialization function, which can return an identity matrix object. + * + * @returns { Matrix4Transit } Return to Matrix4Transit + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + function identity(): Matrix4Transit; +} +export default matrix4; diff --git a/api/@ohos.measure.d.ts b/api/@ohos.measure.d.ts index 8418f45f655549d87596938803983727d64e2858..3f7396fd46559538b10fbb8e86e865298fbe7da3 100644 --- a/api/@ohos.measure.d.ts +++ b/api/@ohos.measure.d.ts @@ -1,403 +1,402 @@ -/* - * 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 - */ - - -/** - * 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 default 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 - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.MeasureUtils#measureText - */ - 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 - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.MeasureUtils#measureTextSize - */ - static measureTextSize(options: MeasureOptions): SizeOptions; -} +/* + * 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 + */ + +/** + * 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 default 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 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.MeasureUtils#measureText + */ + 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 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.MeasureUtils#measureTextSize + */ + static measureTextSize(options: MeasureOptions): SizeOptions; +} \ No newline at end of file diff --git a/api/@ohos.measure.d.ets b/api/@ohos.measure.static.d.ets similarity index 46% rename from api/@ohos.measure.d.ets rename to api/@ohos.measure.static.d.ets index 617503d81be79cc7b123421e8027a5ba4479bbd4..0167c231cd9520123680050dbc5b153634db867c 100644 --- a/api/@ohos.measure.d.ets +++ b/api/@ohos.measure.static.d.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * 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 @@ -16,6 +16,7 @@ /** * @file * @kit ArkUI + * @arkts 1.2 */ import { FontStyle, FontWeight, TextAlign, TextOverflow, TextCase, WordBreak } from './arkui/component/enums' @@ -27,48 +28,16 @@ import { Resource } from './global/resource' * * @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 + * @since 20 */ 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 + * @since 20 */ textContent: string | Resource; @@ -77,16 +46,7 @@ export interface MeasureOptions { * * @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 + * @since 20 */ constraintWidth?: number | string | Resource; @@ -95,16 +55,7 @@ export interface MeasureOptions { * * @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 + * @since 20 */ fontSize?: number | string | Resource; @@ -113,16 +64,7 @@ export interface MeasureOptions { * * @type { ?(number | FontStyle) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Font style. - * - * @type { ?(number | FontStyle) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ fontStyle?: number | FontStyle; @@ -131,16 +73,7 @@ export interface MeasureOptions { * * @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 + * @since 20 */ fontWeight?: number | string | FontWeight; @@ -149,16 +82,7 @@ export interface MeasureOptions { * * @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 + * @since 20 */ fontFamily?: string | Resource; @@ -167,16 +91,7 @@ export interface MeasureOptions { * * @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 + * @since 20 */ letterSpacing?: number | string; @@ -185,16 +100,7 @@ export interface MeasureOptions { * * @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 + * @since 20 */ textAlign?: number | TextAlign; @@ -203,16 +109,7 @@ export interface MeasureOptions { * * @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 + * @since 20 */ overflow?: number | TextOverflow; @@ -221,16 +118,7 @@ export interface MeasureOptions { * * @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 + * @since 20 */ maxLines?: number; @@ -239,16 +127,7 @@ export interface MeasureOptions { * * @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 + * @since 20 */ lineHeight?: number | string | Resource; @@ -257,16 +136,7 @@ export interface MeasureOptions { * * @type { ?(number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Baseline offset. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ baselineOffset?: number | string; @@ -275,35 +145,16 @@ export interface MeasureOptions { * * @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 + * @since 20 */ 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 + * @since 20 */ textIndent?: number | string; @@ -312,17 +163,7 @@ export interface MeasureOptions { * * @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 + * @since 20 */ wordBreak?: WordBreak; } @@ -331,43 +172,17 @@ export interface MeasureOptions { * Defines the Measure interface. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ -/** - * Defines the Measure interface. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ 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 + * @since 20 */ static measureText(options: MeasureOptions): number; @@ -377,26 +192,7 @@ export declare class MeasureText { * @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 + * @since 20 */ static measureTextSize(options: MeasureOptions): SizeOptions; } diff --git a/api/@ohos.mediaquery.d.ets b/api/@ohos.mediaquery.d.ets deleted file mode 100644 index 4d345de895572f6e280ff7ba45d6ee15d00ddccc..0000000000000000000000000000000000000000 --- a/api/@ohos.mediaquery.d.ets +++ /dev/null @@ -1,344 +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 { Callback } from './@ohos.base'; - -/** - * Used to do mediaquery operations. - * - * @namespace mediaquery - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Used to do mediaquery operations. - * - * @namespace mediaquery - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Used to do mediaquery operations. - * - * @namespace mediaquery - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -/** - * Used to do mediaquery operations. - * - * @namespace mediaquery - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ -declare namespace mediaquery { - - /** - * Defines the Result of mediaquery. - * - * @interface MediaQueryResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Defines the Result of mediaquery. - * - * @interface MediaQueryResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Defines the Result of mediaquery. - * - * @interface MediaQueryResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Defines the Result of mediaquery. - * - * @interface MediaQueryResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - export interface MediaQueryResult { - /** - * Whether the match condition is met. - * This parameter is read-only. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Whether the match condition is met. - * This parameter is read-only. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether the match condition is met. - * This parameter is read-only. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Whether the match condition is met. - * This parameter is read-only. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - readonly matches: boolean; - - /** - * Matching condition of a media event. - * This parameter is read-only. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Matching condition of a media event. - * This parameter is read-only. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Matching condition of a media event. - * This parameter is read-only. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Matching condition of a media event. - * This parameter is read-only. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - readonly media: string; - } - - /** - * Defines the Listener of mediaquery. - * - * @interface MediaQueryListener - * @extends MediaQueryResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Defines the Listener of mediaquery. - * - * @interface MediaQueryListener - * @extends MediaQueryResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Defines the Listener of mediaquery. - * - * @interface MediaQueryListener - * @extends MediaQueryResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Defines the Listener of mediaquery. - * - * @interface MediaQueryListener - * @extends MediaQueryResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - export interface MediaQueryListener extends MediaQueryResult { - /** - * Registers a callback with the corresponding query condition by using the handle. - * This callback is triggered when the media attributes change. - * - * @param { 'change' } type - * @param { Callback } callback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Registers a callback with the corresponding query condition by using the handle. - * This callback is triggered when the media attributes change. - * - * @param { 'change' } type - * @param { Callback } callback - * @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 media attributes change. - * - * @param { 'change' } type - * @param { Callback } callback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Registers a callback with the corresponding query condition by using the handle. - * This callback is triggered when the media attributes change. - * - * @param { 'change' } type - * @param { Callback } callback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - 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. - * - * @param { 'change' } type - * @param { Callback } callback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Deregisters a callback with the corresponding query condition by using the handle. - * This callback is not triggered when the media attributes chang. - * - * @param { 'change' } type - * @param { Callback } callback - * @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 media attributes chang. - * - * @param { 'change' } type - * @param { Callback } callback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Deregisters a callback with the corresponding query condition by using the handle. - * This callback is not triggered when the media attributes chang. - * - * @param { 'change' } type - * @param { Callback } callback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - off(type: 'change', callback?: Callback): void; - } - - /** - * Sets the media query criteria and returns the corresponding listening handle - * - * @param { string } condition - * @returns { MediaQueryListener } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the media query criteria and returns the corresponding listening handle - * - * @param { string } condition - * @returns { MediaQueryListener } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the media query criteria and returns the corresponding listening handle - * - * @param { string } condition - * @returns { MediaQueryListener } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Sets the media query criteria and returns the corresponding listening handle - * - * @param { string } condition - * @returns { MediaQueryListener } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - export function matchMediaSync(condition: string): MediaQueryListener; -} - -export default mediaquery; \ No newline at end of file diff --git a/api/@ohos.arkui.inspector.d.ets b/api/@ohos.mediaquery.static.d.ets similarity index 31% rename from api/@ohos.arkui.inspector.d.ets rename to api/@ohos.mediaquery.static.d.ets index d9cd08204298a12478cef2859e9cdecc0684c1b2..f7605eeff394f71fc95ca2fbc813bccf312944a2 100644 --- a/api/@ohos.arkui.inspector.d.ets +++ b/api/@ohos.mediaquery.static.d.ets @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Huawei Device Co., Ltd. + * 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 @@ -16,102 +16,92 @@ /** * @file * @kit ArkUI + * @arkts 1.2 */ +import { Callback } from './@ohos.base'; + /** - * 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 + * Used to do mediaquery operations. + * + * @namespace mediaquery * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -declare namespace inspector { + * @since 20 + */ +declare namespace mediaquery { /** - * The ComponentObserver is used to listen for layout and draw events. + * Defines the Result of mediaquery. + * + * @interface MediaQueryResult * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 + * @since 20 */ - /** - * 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 { + export interface MediaQueryResult { /** - * 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. + * Whether the match condition is met. + * This parameter is read-only. + * + * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 + * @since 20 */ + readonly matches: boolean; + /** - * 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. + * Matching condition of a media event. + * This parameter is read-only. + * + * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ - on(type: 'layout' | 'draw', callback: () => void): void; + readonly media: string; + } + + /** + * Defines the Listener of mediaquery. + * + * @interface MediaQueryListener + * @extends MediaQueryResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface MediaQueryListener extends MediaQueryResult { /** - * 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. + * Registers a callback with the corresponding query condition by using the handle. + * This callback is triggered when the media attributes change. + * + * @param { 'change' } type + * @param { Callback } callback * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 + * @since 20 */ + 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 component layout complete. - * @param { 'layout' | 'draw' } type - type of the listened event. - * @param { function } callback - callback of the listened event. + * This callback is not triggered when the media attributes chang. + * + * @param { 'change' } type + * @param { Callback } callback * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ - off(type: 'layout' | 'draw', callback?: () => void): void; + off(type: 'change', callback?: Callback): 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. + * Sets the media query criteria and returns the corresponding listening handle + * + * @param { string } condition + * @returns { MediaQueryListener } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 + * @since 20 */ - export function createComponentObserver(id: string): ComponentObserver; + export function matchMediaSync(condition: string): MediaQueryListener; } -export default inspector; \ No newline at end of file + +export default mediaquery; \ No newline at end of file diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index 51e751d8c421d758c9fd1610614bd1937165cf64..8b0980542e330ef7c5ed5e8070665ab414c23ce1 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -29,21 +29,23 @@ import { ErrorCallback, AsyncCallback, Callback } from './@ohos.base'; * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace audio { /** * Enumerates audio errors. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 9 */ /** * Enumerates audio errors. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioErrors { /** @@ -55,7 +57,8 @@ declare namespace audio { * Invalid parameter. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_INVALID_PARAM = 6800101, /** @@ -67,7 +70,8 @@ declare namespace audio { * Allocate memory failed. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_NO_MEMORY = 6800102, /** @@ -79,7 +83,8 @@ declare namespace audio { * Operation not permit at current state. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_ILLEGAL_STATE = 6800103, /** @@ -91,19 +96,22 @@ declare namespace audio { * Unsupported option. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_UNSUPPORTED = 6800104, /** * Time out. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_TIMEOUT = 6800105, /** * Audio specific errors. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_STREAM_LIMIT = 6800201, /** @@ -115,7 +123,8 @@ declare namespace audio { * Default error. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_SYSTEM = 6800301 } @@ -124,7 +133,8 @@ declare namespace audio { * Define local device network id for audio * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ const LOCAL_NETWORK_ID: string; @@ -137,16 +147,18 @@ declare namespace audio { * Define default volume group id for audio * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - const DEFAULT_VOLUME_GROUP_ID: number; + const DEFAULT_VOLUME_GROUP_ID: int; /** * Define default interrupt group id for audio * @syscap SystemCapability.Multimedia.Audio.Interrupt - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - const DEFAULT_INTERRUPT_GROUP_ID: number; + const DEFAULT_INTERRUPT_GROUP_ID: int; /** * Obtains an {@link AudioManager} instance. @@ -163,7 +175,8 @@ declare namespace audio { * @returns { AudioManager } this {@link AudioManager} object. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getAudioManager(): AudioManager; @@ -184,7 +197,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the audio capturer instance. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createAudioCapturer(options: AudioCapturerOptions, callback: AsyncCallback): void; @@ -205,7 +219,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the audio capturer instance. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createAudioCapturer(options: AudioCapturerOptions): Promise; @@ -240,7 +255,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the audio renderer instance. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createAudioRenderer(options: AudioRendererOptions, callback: AsyncCallback): void; @@ -275,7 +291,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the audio renderer instance. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createAudioRenderer(options: AudioRendererOptions): Promise; @@ -285,7 +302,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the tonePlayer instance. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function createTonePlayer(options: AudioRendererInfo, callback: AsyncCallback): void; @@ -295,7 +313,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the tonePlayer instance. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function createTonePlayer(options: AudioRendererInfo): Promise; @@ -316,16 +335,17 @@ declare namespace audio { /** * Enumerates the audio states. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Enumerates the audio states. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioState { /** @@ -337,7 +357,8 @@ declare namespace audio { * Invalid state. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_INVALID = -1, /** @@ -349,7 +370,8 @@ declare namespace audio { * Create new instance state. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_NEW = 0, /** @@ -361,7 +383,8 @@ declare namespace audio { * Prepared state. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_PREPARED = 1, /** @@ -373,7 +396,8 @@ declare namespace audio { * Running state. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_RUNNING = 2, /** @@ -385,7 +409,8 @@ declare namespace audio { * Stopped state. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_STOPPED = 3, /** @@ -397,7 +422,8 @@ declare namespace audio { * Released state. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_RELEASED = 4, /** @@ -409,7 +435,8 @@ declare namespace audio { * Paused state. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_PAUSED = 5 } @@ -464,16 +491,17 @@ declare namespace audio { /** * Enumerates audio stream types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @since 7 */ /** * Enumerates audio stream types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioVolumeType { /** @@ -485,7 +513,8 @@ declare namespace audio { * Audio volume type for voice calls. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VOICE_CALL = 0, /** @@ -497,7 +526,8 @@ declare namespace audio { * Audio volume type for ringtones. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RINGTONE = 2, /** @@ -509,7 +539,8 @@ declare namespace audio { * Audio volume type for media purpose. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA = 3, /** @@ -521,7 +552,8 @@ declare namespace audio { * Audio volume type for alarm purpose. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ALARM = 4, /** @@ -533,20 +565,31 @@ declare namespace audio { * Audio volume type for accessibility purpose. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ACCESSIBILITY = 5, + /** + * Audio volume for system sound. + * @syscap SystemCapability.Multimedia.Audio.Volume + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + SYSTEM = 6, /** * Audio volume type for voice assistant. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ VOICE_ASSISTANT = 9, /** * Audio volume type for ultrasonic. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ ULTRASONIC = 10, /** @@ -567,30 +610,33 @@ declare namespace audio { * Audio volume type for all common. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ ALL = 100, } /** * Enumerates audio device flags. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @since 7 */ /** * Enumerates audio device flags. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum DeviceFlag { /** * None devices. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ NONE_DEVICES_FLAG = 0, /** @@ -602,7 +648,8 @@ declare namespace audio { * Output devices. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OUTPUT_DEVICES_FLAG = 1, /** @@ -614,7 +661,8 @@ declare namespace audio { * Input devices. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INPUT_DEVICES_FLAG = 2, /** @@ -626,90 +674,102 @@ declare namespace audio { * All devices. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ALL_DEVICES_FLAG = 3, /** * Distributed output devices. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ DISTRIBUTED_OUTPUT_DEVICES_FLAG = 4, /** * Distributed input devices. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ DISTRIBUTED_INPUT_DEVICES_FLAG = 8, /** * All Distributed devices. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ ALL_DISTRIBUTED_DEVICES_FLAG = 12, } /** * Enumerates audio device for usage. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum DeviceUsage { /** * Media output devices. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA_OUTPUT_DEVICES = 1, /** * Media input devices. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA_INPUT_DEVICES = 2, /** * All media devices. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ALL_MEDIA_DEVICES = 3, /** * Call output devices. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CALL_OUTPUT_DEVICES = 4, /** * Call input devices. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CALL_INPUT_DEVICES = 8, /** * All call devices. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ALL_CALL_DEVICES = 12, } /** * Enumerates device roles. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @since 7 */ /** * Enumerates device roles. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum DeviceRole { /** @@ -722,7 +782,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INPUT_DEVICE = 1, /** @@ -735,24 +796,26 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OUTPUT_DEVICE = 2, } /** * Enumerates device types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @since 7 */ /** * Enumerates device types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum DeviceType { /** @@ -765,7 +828,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INVALID = 0, /** @@ -778,7 +842,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EARPIECE = 1, /** @@ -791,7 +856,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPEAKER = 2, /** @@ -804,7 +870,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ WIRED_HEADSET = 3, /** @@ -817,7 +884,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ WIRED_HEADPHONES = 4, /** @@ -830,7 +898,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BLUETOOTH_SCO = 7, /** @@ -843,7 +912,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BLUETOOTH_A2DP = 8, /** @@ -856,7 +926,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MIC = 15, /** @@ -869,54 +940,62 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ USB_HEADSET = 22, /** * Display port device. * @syscap SystemCapability.Multimedia.Audio.Device * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DISPLAY_PORT = 23, /** * Device type for rerouting audio to other remote devices by system application * @syscap SystemCapability.Multimedia.Audio.Device * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ REMOTE_CAST = 24, /** * USB audio device. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ USB_DEVICE = 25, /** * Accessory devices, such as the mic on remote control. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ ACCESSORY = 26, /** * HDMI device, such as HDMI, ARC, eARC * @syscap SystemCapability.Multimedia.Audio.Device - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ HDMI = 27, /** * Line connected digital output device, such as s/pdif * @syscap SystemCapability.Multimedia.Audio.Device - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ LINE_DIGITAL = 28, /** * Distributed virtualization audio device. * @syscap SystemCapability.Multimedia.Audio.Device * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ REMOTE_DAUDIO = 29, /** @@ -935,7 +1014,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 1000, } @@ -968,16 +1048,17 @@ declare namespace audio { /** * Enumerates the available device types for communication. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Communication * @since 9 */ /** * Enumerates the available device types for communication. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum CommunicationDeviceType { /** @@ -989,23 +1070,25 @@ declare namespace audio { * Speaker. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPEAKER = 2 } /** * Enumerates ringer modes. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Communication * @since 7 */ /** * Enumerates ringer modes. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioRingMode { /** @@ -1017,7 +1100,8 @@ declare namespace audio { * Silent mode. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RINGER_MODE_SILENT = 0, /** @@ -1029,7 +1113,8 @@ declare namespace audio { * Vibration mode. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RINGER_MODE_VIBRATE = 1, /** @@ -1041,47 +1126,52 @@ declare namespace audio { * Normal mode. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RINGER_MODE_NORMAL = 2, } /** * Enumerates type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum PolicyType { /** * EDM type. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EDM = 0, /** * PRIVACY type. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRIVACY = 1, } /** * Enumerates the audio sample formats. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Enumerates the audio sample formats. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioSampleFormat { /** @@ -1093,7 +1183,8 @@ declare namespace audio { * Invalid format. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_FORMAT_INVALID = -1, /** @@ -1105,7 +1196,8 @@ declare namespace audio { * Unsigned 8 format. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_FORMAT_U8 = 0, /** @@ -1117,7 +1209,8 @@ declare namespace audio { * Signed 16 bit integer, little endian. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_FORMAT_S16LE = 1, /** @@ -1129,7 +1222,8 @@ declare namespace audio { * Signed 24 bit integer, little endian. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_FORMAT_S24LE = 2, /** @@ -1141,7 +1235,8 @@ declare namespace audio { * Signed 32 bit integer, little endian. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_FORMAT_S32LE = 3, /** @@ -1153,23 +1248,25 @@ declare namespace audio { * Signed 32 bit float, little endian. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_FORMAT_F32LE = 4, } /** * Enumerates the audio channel. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Enumerates the audio channel. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioChannel { /** @@ -1181,7 +1278,8 @@ declare namespace audio { * Channel 1. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_1 = 1, /** @@ -1193,7 +1291,8 @@ declare namespace audio { * Channel 2. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_2 = 2, /** @@ -1205,7 +1304,8 @@ declare namespace audio { * Channel 3. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_3 = 3, /** @@ -1217,7 +1317,8 @@ declare namespace audio { * Channel 4. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_4 = 4, /** @@ -1229,7 +1330,8 @@ declare namespace audio { * Channel 5. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_5 = 5, /** @@ -1241,7 +1343,8 @@ declare namespace audio { * Channel 6. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_6 = 6, /** @@ -1253,7 +1356,8 @@ declare namespace audio { * Channel 7. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_7 = 7, /** @@ -1265,7 +1369,8 @@ declare namespace audio { * Channel 8. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_8 = 8, /** @@ -1277,7 +1382,8 @@ declare namespace audio { * Channel 9. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_9 = 9, /** @@ -1289,7 +1395,8 @@ declare namespace audio { * Channel 10. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_10 = 10, /** @@ -1301,7 +1408,8 @@ declare namespace audio { * Channel 12. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_12 = 12, /** @@ -1313,7 +1421,8 @@ declare namespace audio { * Channel 14. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_14 = 14, /** @@ -1325,23 +1434,25 @@ declare namespace audio { * Channel 16. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CHANNEL_16 = 16 } /** * Enumerates the audio sampling rate. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Enumerates the audio sampling rate. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioSamplingRate { /** @@ -1353,7 +1464,8 @@ declare namespace audio { * 8kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_8000 = 8000, /** @@ -1365,7 +1477,8 @@ declare namespace audio { * 11.025kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_11025 = 11025, /** @@ -1377,7 +1490,8 @@ declare namespace audio { * 12kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_12000 = 12000, /** @@ -1389,7 +1503,8 @@ declare namespace audio { * 16kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_16000 = 16000, /** @@ -1401,7 +1516,8 @@ declare namespace audio { * 22.05kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_22050 = 22050, /** @@ -1413,7 +1529,8 @@ declare namespace audio { * 24kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_24000 = 24000, /** @@ -1425,7 +1542,8 @@ declare namespace audio { * 32kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_32000 = 32000, /** @@ -1437,7 +1555,8 @@ declare namespace audio { * 44.1kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_44100 = 44100, /** @@ -1449,7 +1568,8 @@ declare namespace audio { * 48kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_48000 = 48000, /** @@ -1461,13 +1581,15 @@ declare namespace audio { * 64kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_64000 = 64000, /** * 88.2kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_88200 = 88200, /** @@ -1479,36 +1601,40 @@ declare namespace audio { * 96kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_96000 = 96000, /** * 176.4kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_176400 = 176400, /** * 192kHz sample rate. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SAMPLE_RATE_192000 = 192000 } /** * Enumerates the audio encoding type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Enumerates the audio encoding type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioEncodingType { /** @@ -1521,7 +1647,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ENCODING_TYPE_INVALID = -1, /** @@ -1534,7 +1661,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ENCODING_TYPE_RAW = 0 } @@ -1600,17 +1728,18 @@ declare namespace audio { /** * Enumerates the stream usage. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 7 */ /** * Enumerates the stream usage. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum StreamUsage { /** @@ -1623,7 +1752,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_UNKNOWN = 0, /** @@ -1647,7 +1777,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_MUSIC = 1, /** @@ -1660,7 +1791,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_VOICE_COMMUNICATION = 2, /** @@ -1673,7 +1805,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_VOICE_ASSISTANT = 3, /** @@ -1686,7 +1819,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_ALARM = 4, /** @@ -1698,7 +1832,8 @@ declare namespace audio { * Voice message usage. * @syscap SystemCapability.Multimedia.Audio.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_VOICE_MESSAGE = 5, /** @@ -1719,7 +1854,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_RINGTONE = 6, /** @@ -1732,7 +1868,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_NOTIFICATION = 7, /** @@ -1745,14 +1882,16 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_ACCESSIBILITY = 8, /** * System usage, such as screen lock or key click. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_SYSTEM = 9, /** @@ -1765,7 +1904,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_MOVIE = 10, /** @@ -1778,7 +1918,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_GAME = 11, /** @@ -1791,7 +1932,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_AUDIOBOOK = 12, /** @@ -1804,59 +1946,67 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_NAVIGATION = 13, /** * DTMF dial tone usage. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_DTMF = 14, /** * Enforced tone usage, such as camera shutter. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_ENFORCED_TONE = 15, /** * Ultrasonic playing usage. This type is only used for msdp condition. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_ULTRASONIC = 16, /** * Used for network video call. * @syscap SystemCapability.Multimedia.Audio.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_VIDEO_COMMUNICATION = 17, /** * Voice call assistant type. This type is only used for call assistant functionalities. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STREAM_USAGE_VOICE_CALL_ASSISTANT = 21, } /** * Enumerates the audio interrupt request type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ enum InterruptRequestType { /** * Default type to request audio interrupt. * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_REQUEST_TYPE_DEFAULT = 0, } @@ -1864,17 +2014,19 @@ declare namespace audio { /** * Enumerates volume related operations. * Flags should be powers of 2! - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum VolumeFlag { /** * Show system volume bar. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FLAG_SHOW_SYSTEM_UI = 1, } @@ -1890,7 +2042,8 @@ declare namespace audio { * @typedef AudioStreamInfo * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioStreamInfo { /** @@ -1904,7 +2057,8 @@ declare namespace audio { * @type { AudioSamplingRate } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ samplingRate: AudioSamplingRate; /** @@ -1918,7 +2072,8 @@ declare namespace audio { * @type { AudioChannel } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ channels: AudioChannel; /** @@ -1932,7 +2087,8 @@ declare namespace audio { * @type { AudioSampleFormat } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sampleFormat: AudioSampleFormat; /** @@ -1946,7 +2102,8 @@ declare namespace audio { * @type { AudioEncodingType } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ encodingType: AudioEncodingType; /** @@ -1960,7 +2117,8 @@ declare namespace audio { * @type { ?AudioChannelLayout } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ channelLayout?: AudioChannelLayout; } @@ -1977,7 +2135,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioRendererInfo { /** @@ -2007,30 +2166,33 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ usage: StreamUsage; /** * Audio renderer flags. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Audio renderer flags. This method is currently reserved, suggest setting the default value to 0. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - rendererFlags: number; + rendererFlags: int; /** * Audio volume mode config. If volumeMode is set to {@link AudioVolumeMode.APP_INDIVIDUAL}, this audio renderer * will be affeted by app volume percentage setted by {@link setAppVolumePercentage} * @type { ?AudioVolumeMode } * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ volumeMode?: AudioVolumeMode; } @@ -2040,33 +2202,37 @@ declare namespace audio { * @typedef AudioRendererFilter * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioRendererFilter { /** * Application uid. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - uid?: number; + uid?: int; /** * Renderer information. * @type { ?AudioRendererInfo } * @syscap SystemCapability.Multimedia.Audio.Renderer * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ rendererInfo?: AudioRendererInfo; /** * AudioRenderer id. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - rendererId?: number; + rendererId?: int; } /** @@ -2074,23 +2240,26 @@ declare namespace audio { * @typedef AudioCapturerFilter * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioCapturerFilter { /** * Application uid. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - uid?: number; + uid?: int; /** * Capturer information. * @type { ?AudioCapturerInfo } * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ capturerInfo?: AudioCapturerInfo; } @@ -2106,7 +2275,8 @@ declare namespace audio { * @typedef AudioRendererOptions * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioRendererOptions { /** @@ -2120,7 +2290,8 @@ declare namespace audio { * @type { AudioStreamInfo } * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ streamInfo: AudioStreamInfo; /** @@ -2134,7 +2305,8 @@ declare namespace audio { * @type { AudioRendererInfo } * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ rendererInfo: AudioRendererInfo; /** @@ -2148,23 +2320,25 @@ declare namespace audio { * @type { ?AudioPrivacyType } * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ privacyType?: AudioPrivacyType; } /** * Enumerates audio stream privacy type for playback capture. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture * @since 10 */ /** * Enumerates audio stream privacy type for playback capture. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioPrivacyType { /** @@ -2176,7 +2350,8 @@ declare namespace audio { * Privacy type that stream can be captured by third party applications. * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRIVACY_TYPE_PUBLIC = 0, @@ -2189,24 +2364,26 @@ declare namespace audio { * Privacy type that stream can not be captured. * @syscap SystemCapability.Multimedia.Audio.PlaybackCapture * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRIVACY_TYPE_PRIVATE = 1, } /** * Enumerates the interrupt modes. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Interrupt * @since 9 */ /** * Enumerates the interrupt modes. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum InterruptMode { /** @@ -2219,7 +2396,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SHARE_MODE = 0, /** @@ -2232,51 +2410,57 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INDEPENDENT_MODE = 1 } /** * Enumerates the audio renderer rates. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioRendererRate { /** * Normal playback render rate. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ RENDER_RATE_NORMAL = 0, /** * Double playback render rate. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ RENDER_RATE_DOUBLE = 1, /** * Half playback render rate. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ RENDER_RATE_HALF = 2 } /** * Enumerates the interrupt types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 7 */ /** * Enumerates the interrupt types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum InterruptType { /** @@ -2289,7 +2473,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_TYPE_BEGIN = 1, @@ -2303,24 +2488,26 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_TYPE_END = 2 } /** * Enumerates the interrupt hints. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 7 */ /** * Enumerates the interrupt hints. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum InterruptHint { /** @@ -2332,7 +2519,8 @@ declare namespace audio { * None. * @syscap SystemCapability.Multimedia.Audio.Renderer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_HINT_NONE = 0, /** @@ -2345,7 +2533,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_HINT_RESUME = 1, @@ -2358,7 +2547,8 @@ declare namespace audio { * Paused/Pause the playback. * @syscap SystemCapability.Multimedia.Audio.Renderer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_HINT_PAUSE = 2, @@ -2371,7 +2561,8 @@ declare namespace audio { * Stopped/Stop the playback. * @syscap SystemCapability.Multimedia.Audio.Renderer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_HINT_STOP = 3, @@ -2384,7 +2575,8 @@ declare namespace audio { * Ducked the playback. (In ducking, the audio volume is reduced, but not silenced.) * @syscap SystemCapability.Multimedia.Audio.Renderer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_HINT_DUCK = 4, @@ -2397,7 +2589,8 @@ declare namespace audio { * Unducked the playback. * @syscap SystemCapability.Multimedia.Audio.Renderer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_HINT_UNDUCK = 5, @@ -2418,17 +2611,18 @@ declare namespace audio { /** * Enumerates the interrupt force types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 9 */ /** * Enumerates the interrupt force types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum InterruptForceType { /** @@ -2441,7 +2635,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_FORCE = 0, /** @@ -2453,7 +2648,8 @@ declare namespace audio { * Share type, application can choose to take action or ignore. * @syscap SystemCapability.Multimedia.Audio.Renderer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_SHARE = 1 } @@ -2470,7 +2666,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface InterruptEvent { /** @@ -2485,7 +2682,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ eventType: InterruptType; @@ -2501,7 +2699,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ forceType: InterruptForceType; @@ -2517,7 +2716,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ hintType: InterruptHint; } @@ -2550,16 +2750,17 @@ declare namespace audio { /** * Enumerates device change types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @since 7 */ /** * Enumerates device change types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum DeviceChangeType { /** @@ -2571,7 +2772,8 @@ declare namespace audio { * Device connection. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONNECT = 0, @@ -2584,23 +2786,25 @@ declare namespace audio { * Device disconnection. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DISCONNECT = 1, } /** * Enumerates audio scenes. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Communication * @since 8 */ /** * Enumerates audio scenes. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioScene { /** @@ -2612,19 +2816,22 @@ declare namespace audio { * Default audio scene * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_SCENE_DEFAULT = 0, /** * Ringing audio scene * @syscap SystemCapability.Multimedia.Audio.Communication - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_SCENE_RINGING = 1, /** * Phone call audio scene * @syscap SystemCapability.Multimedia.Audio.Communication - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_SCENE_PHONE_CALL = 2, /** @@ -2636,31 +2843,35 @@ declare namespace audio { * Voice chat audio scene * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_SCENE_VOICE_CHAT = 3 } /** * Enumerates volume adjustment types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ enum VolumeAdjustType { /** * Adjust volume up. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ VOLUME_UP = 0, /** * Adjust volume down. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ VOLUME_DOWN = 1, } @@ -2676,7 +2887,8 @@ declare namespace audio { * @typedef AudioManager * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioManager { /** @@ -2993,7 +3205,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setExtraParameters(mainKey: string, kvpairs: Record): Promise; @@ -3009,7 +3222,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getExtraParameters(mainKey: string, subKeys?: Array): Promise>; @@ -3088,7 +3302,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Communication * @systemapi - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ setAudioScene(scene: AudioScene, callback: AsyncCallback): void; /** @@ -3097,7 +3312,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Communication * @systemapi - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ setAudioScene(scene: AudioScene): Promise; /** @@ -3111,7 +3327,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the audio scene mode. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioScene(callback: AsyncCallback): void; /** @@ -3125,7 +3342,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the audio scene mode. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioScene(): Promise; /** @@ -3139,7 +3357,8 @@ declare namespace audio { * @returns { AudioScene } Current audio scene mode. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioSceneSync(): AudioScene; @@ -3223,7 +3442,8 @@ declare namespace audio { * @returns { AudioVolumeManager } AudioVolumeManager instance. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getVolumeManager(): AudioVolumeManager; @@ -3238,7 +3458,8 @@ declare namespace audio { * @returns { AudioStreamManager } AudioStreamManager instance. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStreamManager(): AudioStreamManager; @@ -3253,7 +3474,8 @@ declare namespace audio { * @returns { AudioRoutingManager } AudioRoutingManager instance. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRoutingManager(): AudioRoutingManager; @@ -3262,7 +3484,8 @@ declare namespace audio { * @returns { AudioSessionManager } AudioSessionManager instance. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSessionManager(): AudioSessionManager; @@ -3270,7 +3493,8 @@ declare namespace audio { * Obtains an {@link AudioSpatializationManager} instance. * @returns { AudioSpatializationManager } AudioSpatializationManager instance. * @syscap SystemCapability.Multimedia.Audio.Spatialization - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getSpatializationManager(): AudioSpatializationManager; @@ -3280,7 +3504,8 @@ declare namespace audio { * @throws { BusinessError } 202 - Not system App. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getEffectManager(): AudioEffectManager; @@ -3302,31 +3527,35 @@ declare namespace audio { * @throws { BusinessError } 202 - Not system App. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ disableSafeMediaVolume(): Promise; } /** * Enumerates audio interrupt request result type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ enum InterruptRequestResultType { /** * Request audio interrupt success * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_REQUEST_GRANT = 0, /** * Request audio interrupt fail, may have higher priority type * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ INTERRUPT_REQUEST_REJECT = 1 } @@ -3336,7 +3565,8 @@ declare namespace audio { * @typedef InterruptResult * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface InterruptResult { /** @@ -3344,36 +3574,41 @@ declare namespace audio { * @type { InterruptRequestResultType } * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ requestResult: InterruptRequestResultType; /** * Interrupt node as a unit to receive interrupt change event. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Interrupt * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - interruptNode: number; + interruptNode: int; } /** * Desribes audio device block status. By default, the device is consider as unblocked. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enum DeviceBlockStatus { /** * Device is unblocked. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ UNBLOCKED = 0, /** * Device is blocked. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ BLOCKED = 1, } @@ -3382,14 +3617,16 @@ declare namespace audio { * Desribes audio device block status info. * @typedef DeviceBlockStatusInfo * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface DeviceBlockStatusInfo { /** * Device block status. * @type {DeviceBlockStatus} * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ blockStatus: DeviceBlockStatus; @@ -3397,7 +3634,8 @@ declare namespace audio { * Audio device descriptors whose block status has changed. * @type {AudioDeviceDescriptors} * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ devices: AudioDeviceDescriptors; } @@ -3413,7 +3651,8 @@ declare namespace audio { * @typedef AudioRoutingManager * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioRoutingManager { /** @@ -3429,7 +3668,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the device list. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getDevices(deviceFlag: DeviceFlag, callback: AsyncCallback): void; /** @@ -3445,7 +3685,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the device list. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getDevices(deviceFlag: DeviceFlag): Promise; /** @@ -3469,7 +3710,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getDevicesSync(deviceFlag: DeviceFlag): AudioDeviceDescriptors; @@ -3498,7 +3740,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'deviceChange', deviceFlag: DeviceFlag, callback: Callback): void; @@ -3523,7 +3766,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'deviceChange', callback?: Callback): void; @@ -3536,7 +3780,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAvailableDevices(deviceUsage: DeviceUsage): AudioDeviceDescriptors; @@ -3551,7 +3796,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'availableDeviceChange', deviceUsage: DeviceUsage, callback: Callback): void; @@ -3564,7 +3810,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'availableDeviceChange', callback?: Callback): void; @@ -3586,7 +3833,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setCommunicationDevice(deviceType: CommunicationDeviceType, active: boolean, callback: AsyncCallback): void; /** @@ -3607,7 +3855,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setCommunicationDevice(deviceType: CommunicationDeviceType, active: boolean): Promise; @@ -3624,7 +3873,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the active status of the device. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isCommunicationDeviceActive(deviceType: CommunicationDeviceType, callback: AsyncCallback): void; /** @@ -3640,7 +3890,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the active status of the device. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isCommunicationDeviceActive(deviceType: CommunicationDeviceType): Promise; /** @@ -3664,7 +3915,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Communication * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isCommunicationDeviceActiveSync(deviceType: CommunicationDeviceType): boolean; @@ -3674,7 +3926,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ selectOutputDevice(outputAudioDevices: AudioDeviceDescriptors, callback: AsyncCallback): void; /** @@ -3683,7 +3936,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ selectOutputDevice(outputAudioDevices: AudioDeviceDescriptors): Promise; @@ -3694,7 +3948,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ selectOutputDeviceByFilter(filter: AudioRendererFilter, outputAudioDevices: AudioDeviceDescriptors, callback: AsyncCallback): void; /** @@ -3704,7 +3959,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ selectOutputDeviceByFilter(filter: AudioRendererFilter, outputAudioDevices: AudioDeviceDescriptors): Promise; @@ -3714,7 +3970,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ selectInputDevice(inputAudioDevices: AudioDeviceDescriptors, callback: AsyncCallback): void; /** @@ -3723,7 +3980,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ selectInputDevice(inputAudioDevices: AudioDeviceDescriptors): Promise; @@ -3736,7 +3994,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ selectInputDeviceByFilter(filter: AudioCapturerFilter, inputAudioDevices: AudioDeviceDescriptors): Promise; @@ -3763,7 +4022,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by callback. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo, callback: AsyncCallback): void; /** @@ -3789,7 +4049,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreferOutputDeviceForRendererInfo(rendererInfo: AudioRendererInfo): Promise; @@ -3814,7 +4075,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreferredOutputDeviceForRendererInfoSync(rendererInfo: AudioRendererInfo): AudioDeviceDescriptors; @@ -3826,7 +4088,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getPreferredOutputDeviceByFilter(filter: AudioRendererFilter): AudioDeviceDescriptors; @@ -3857,7 +4120,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'preferOutputDeviceChangeForRendererInfo', rendererInfo: AudioRendererInfo, callback: Callback): void; /** @@ -3883,7 +4147,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'preferOutputDeviceChangeForRendererInfo', callback?: Callback): void; @@ -3910,7 +4175,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by callback. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreferredInputDeviceForCapturerInfo(capturerInfo: AudioCapturerInfo, callback: AsyncCallback): void; /** @@ -3936,7 +4202,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreferredInputDeviceForCapturerInfo(capturerInfo: AudioCapturerInfo): Promise; @@ -3948,7 +4215,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getPreferredInputDeviceByFilter(filter: AudioCapturerFilter): AudioDeviceDescriptors; @@ -3977,7 +4245,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'preferredInputDeviceChangeForCapturerInfo', capturerInfo: AudioCapturerInfo, callback: Callback): void; /** @@ -4001,7 +4270,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'preferredInputDeviceChangeForCapturerInfo', callback?: Callback): void; @@ -4026,7 +4296,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPreferredInputDeviceForCapturerInfoSync(capturerInfo: AudioCapturerInfo): AudioDeviceDescriptors; @@ -4034,7 +4305,8 @@ declare namespace audio { * Query whether microphone block detection is supported on current device. * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ isMicBlockDetectionSupported():Promise; @@ -4050,7 +4322,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'micBlockStatusChanged', callback: Callback): void; @@ -4063,7 +4336,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'micBlockStatusChanged', callback?: Callback): void; @@ -4080,7 +4354,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ excludeOutputDevices(usage: DeviceUsage, devices: AudioDeviceDescriptors): Promise; @@ -4095,7 +4370,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ unexcludeOutputDevices(usage: DeviceUsage, devices: AudioDeviceDescriptors): Promise; @@ -4109,7 +4385,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ unexcludeOutputDevices(usage: DeviceUsage): Promise; @@ -4121,7 +4398,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getExcludedDevices(usage: DeviceUsage): AudioDeviceDescriptors; } @@ -4137,7 +4415,8 @@ declare namespace audio { * @typedef AudioStreamManager * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioStreamManager { /** @@ -4153,7 +4432,8 @@ declare namespace audio { * of current existing audio renderers. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentAudioRendererInfoArray(callback: AsyncCallback): void; @@ -4170,7 +4450,8 @@ declare namespace audio { * existing audio renderers. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentAudioRendererInfoArray(): Promise; @@ -4185,7 +4466,8 @@ declare namespace audio { * @returns { AudioRendererChangeInfoArray } The information of current existing audio renderers. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentAudioRendererInfoArraySync(): AudioRendererChangeInfoArray; @@ -4202,7 +4484,8 @@ declare namespace audio { * of current existing audio capturers. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentAudioCapturerInfoArray(callback: AsyncCallback): void; @@ -4219,7 +4502,8 @@ declare namespace audio { * audio capturers. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentAudioCapturerInfoArray(): Promise; @@ -4234,7 +4518,8 @@ declare namespace audio { * @returns { AudioCapturerChangeInfoArray } The information of current existing audio capturers. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentAudioCapturerInfoArraySync(): AudioCapturerChangeInfoArray; @@ -4247,7 +4532,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. Return by callback. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioEffectInfoArray(usage: StreamUsage, callback: AsyncCallback): void; @@ -4260,7 +4546,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioEffectInfoArray(usage: StreamUsage): Promise; @@ -4273,7 +4560,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioEffectInfoArraySync(usage: StreamUsage): AudioEffectInfoArray; @@ -4300,7 +4588,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioRendererChange', callback: Callback): void; @@ -4332,7 +4621,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'audioRendererChange', callback?: Callback): void; @@ -4359,7 +4649,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioCapturerChange', callback: Callback): void; @@ -4391,7 +4682,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'audioCapturerChange', callback?: Callback): void; @@ -4410,7 +4702,10 @@ declare namespace audio { * The value true means that the stream is active, and false means the opposite. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioStreamManager#isStreamActive + * @arkts 1.1&1.2 */ isActive(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** @@ -4428,7 +4723,10 @@ declare namespace audio { * true means that the stream is active, and false means the opposite. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioStreamManager#isStreamActive + * @arkts 1.1&1.2 */ isActive(volumeType: AudioVolumeType): Promise; /** @@ -4452,7 +4750,10 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioStreamManager#isStreamActive + * @arkts 1.1&1.2 */ isActiveSync(volumeType: AudioVolumeType): boolean; @@ -4501,62 +4802,70 @@ declare namespace audio { /** * Audio concurrency mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioConcurrencyMode { /** * Default concurrency mode. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONCURRENCY_DEFAULT = 0, /** * Mix with others mode. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONCURRENCY_MIX_WITH_OTHERS = 1, /** * Duck others mode. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONCURRENCY_DUCK_OTHERS = 2, /** * Pause others mode. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONCURRENCY_PAUSE_OTHERS = 3, } /** * Audio session deactivated reason. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioSessionDeactivatedReason { /** * Lower priority. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEACTIVATED_LOWER_PRIORITY = 0, /** * Time out. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEACTIVATED_TIMEOUT = 1, } @@ -4566,7 +4875,8 @@ declare namespace audio { * @typedef AudioSessionStrategy * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioSessionStrategy { /** @@ -4574,7 +4884,8 @@ declare namespace audio { * @type { AudioConcurrencyMode } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ concurrencyMode: AudioConcurrencyMode; } @@ -4584,7 +4895,8 @@ declare namespace audio { * @typedef AudioSessionDeactivatedEvent * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioSessionDeactivatedEvent { /** @@ -4592,7 +4904,8 @@ declare namespace audio { * @type { AudioSessionDeactivatedReason } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reason: AudioSessionDeactivatedReason; } @@ -4602,7 +4915,8 @@ declare namespace audio { * @typedef AudioSessionManager * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioSessionManager { /** @@ -4616,7 +4930,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Returned by promise. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ activateAudioSession(strategy: AudioSessionStrategy): Promise; @@ -4626,7 +4941,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Returned by promise. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deactivateAudioSession(): Promise; @@ -4635,7 +4951,8 @@ declare namespace audio { * @returns { boolean } The active audio session status for the current pid application. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isAudioSessionActivated(): boolean; @@ -4650,7 +4967,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioSessionDeactivated', callback: Callback): void; @@ -4664,7 +4982,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'audioSessionDeactivated', callback?: Callback): void; } @@ -4689,7 +5008,8 @@ declare namespace audio { * @typedef AudioVolumeManager * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioVolumeManager { /** @@ -4698,7 +5018,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ getVolumeGroupInfos(networkId: string, callback: AsyncCallback): void; /** @@ -4707,7 +5028,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ getVolumeGroupInfos(networkId: string): Promise; /** @@ -4720,45 +5042,48 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getVolumeGroupInfosSync(networkId: string): VolumeGroupInfos; /** * Obtains an AudioVolumeGroupManager instance. This method uses an asynchronous callback to return the result. - * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default + * @param { int } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains an AudioVolumeGroupManager instance. This method uses an asynchronous callback to return the result. - * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default + * @param { int } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getVolumeGroupManager(groupId: number, callback: AsyncCallback): void; + getVolumeGroupManager(groupId: int, callback: AsyncCallback): void; /** * Obtains an AudioVolumeGroupManager instance. This method uses a promise to return the result. - * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default + * @param { int } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains an AudioVolumeGroupManager instance. This method uses a promise to return the result. - * @param { number } groupId - volume group id, use {@link DEFAULT_VOLUME_GROUP_ID} in default + * @param { int } groupId - volume group id, use {@link DEFAULT_VOLUME_GROUP_ID} in default * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getVolumeGroupManager(groupId: number): Promise; + getVolumeGroupManager(groupId: int): Promise; /** * Obtains an AudioVolumeGroupManager instance. - * @param { number } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default + * @param { int } groupId - volume group id, use LOCAL_VOLUME_GROUP_ID in default * @returns { AudioVolumeGroupManager } The audio volume group manager instance. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; @@ -4769,7 +5094,7 @@ declare namespace audio { */ /** * Obtains an AudioVolumeGroupManager instance. - * @param { number } groupId - volume group id, use {@link DEFAULT_VOLUME_GROUP_ID} in default + * @param { int } groupId - volume group id, use {@link DEFAULT_VOLUME_GROUP_ID} in default * @returns { AudioVolumeGroupManager } The audio volume group manager instance. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; @@ -4777,29 +5102,31 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getVolumeGroupManagerSync(groupId: number): AudioVolumeGroupManager; + getVolumeGroupManagerSync(groupId: int): AudioVolumeGroupManager; /** * Get the volume for specified app with range from 0 to 100. Applications with same uid share the same volume. * @permission ohos.permission.MANAGE_AUDIO_CONFIG - * @param { number } uid - App's uid. - * @returns { Promise } Promise used to return the result. + * @param { int } uid - App's uid. + * @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. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - getAppVolumePercentageForUid(uid: number): Promise; + getAppVolumePercentageForUid(uid: int): Promise; /** * Sets the volume for specified app with range from 0 to 100. Applications with same uid share the same volume. * @permission ohos.permission.MANAGE_AUDIO_CONFIG - * @param { number } uid - App's uid. - * @param { number } volume - Volume to set. The value range is from 0 to 100. + * @param { int } uid - App's uid. + * @param { int } volume - Volume to set. The value range is from 0 to 100. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system App. @@ -4807,15 +5134,16 @@ declare namespace audio { * @throws { BusinessError } 6800301 - Crash or blocking occurs in system process. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - setAppVolumePercentageForUid(uid: number, volume: number): Promise; + setAppVolumePercentageForUid(uid: int, volume: int): Promise; /** * Checks whether the app volume is muted. If there are multiple callers setting muted states, * only when all callers cancel muted state the volume of this app will be truly unmuted. * @permission ohos.permission.MANAGE_AUDIO_CONFIG - * @param { number } uid - App's uid. + * @param { int } uid - App's uid. * @param { boolean } owned - If true is passed, the result will be indicated your owned muted state * settings to this app. Otherwise if false is passed, the result will be indicated the real muted state. * @returns { Promise } Promise used to return the result. @@ -4824,15 +5152,16 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - isAppVolumeMutedForUid(uid: number, owned: boolean): Promise; + isAppVolumeMutedForUid(uid: int, owned: boolean): Promise; /** * Change mute state of specified application volume. If there are multiple callers setting muted states, * only when all callers cancel muted state the volume of this app will be truly unmuted. * @permission ohos.permission.MANAGE_AUDIO_CONFIG - * @param { number } uid - App's uid. + * @param { int } uid - App's uid. * @param { boolean } muted - Muted state to set. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 201 - Permission denied. @@ -4841,17 +5170,19 @@ declare namespace audio { * @throws { BusinessError } 6800301 - Crash or blocking occurs in system process. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - setAppVolumeMutedForUid(uid: number, muted: boolean): Promise; + setAppVolumeMutedForUid(uid: int, muted: boolean): Promise; /** * Get the volume for your app with range from 0 to 100. Applications with the same uid share the same volume. - * @returns { Promise } The application's volume percentage. The value range is from 0 to 100. + * @returns { Promise } The application's volume percentage. The value range is from 0 to 100. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - getAppVolumePercentage(): Promise; + getAppVolumePercentage(): Promise; /** * Sets the volume for your app with range from 0 to 100. Applications with the same uid share the same volume. @@ -4860,14 +5191,15 @@ declare namespace audio { * When you change your app's volume, your will receive 'appVolumeChange' callback event. * Your app volume can be also changed by other system settings, and you can monitor the changes through * 'appVolumeChange' callback. - * @param { number } volume - Volume to set. The value range is from 0 to 100. + * @param { int } volume - Volume to set. The value range is from 0 to 100. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 6800101 - Parameter verification failed. * @throws { BusinessError } 6800301 - Crash or blocking occurs in system process. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - setAppVolumePercentage(volume: number): Promise; + setAppVolumePercentage(volume: int): Promise; /** * Listens for system volume change events. This method uses a callback to get volume change events. @@ -4890,7 +5222,10 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#event:streamVolumeChange + * @arkts 1.1&1.2 */ on(type: 'volumeChange', callback: Callback): void; @@ -4903,7 +5238,10 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#event:streamVolumeChange + * @arkts 1.1&1.2 */ off(type: 'volumeChange', callback?: Callback): void; @@ -4913,16 +5251,17 @@ declare namespace audio { * @permission ohos.permission.MANAGE_AUDIO_CONFIG * @param { 'appVolumeChangeForUid' } type - Type of the event to listen for. Only the * appVolumeChangeForUid event is supported. - * @param { number } uid - The app's uid. + * @param { int } uid - The app's uid. * @param { Callback } callback - Callback used to get the app volume change event. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system App. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'appVolumeChangeForUid', uid: number, callback: Callback): void; + on(type: 'appVolumeChangeForUid', uid: int, callback: Callback): void; /** * Unsubscribes to the app volume change events.. @@ -4935,7 +5274,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'appVolumeChangeForUid', callback?: Callback): void; @@ -4946,7 +5286,8 @@ declare namespace audio { * @param { Callback } callback - Callback used to get the app volume change event. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'appVolumeChange', callback: Callback): void; @@ -4957,7 +5298,8 @@ declare namespace audio { * @param { Callback } callback - Callback used to obtain the invoking volume change event. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'appVolumeChange', callback?: Callback): void; @@ -5198,50 +5540,54 @@ declare namespace audio { * @typedef AudioVolumeGroupManager * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioVolumeGroupManager { /** * Sets the volume for a stream. This method uses an asynchronous callback 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 { int } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume. * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - setVolume(volumeType: AudioVolumeType, volume: number, callback: AsyncCallback): void; + setVolume(volumeType: AudioVolumeType, volume: int, callback: AsyncCallback): void; /** * 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 { int } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume. * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - setVolume(volumeType: AudioVolumeType, volume: number): Promise; + setVolume(volumeType: AudioVolumeType, volume: int): 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 } flags - volume flags used to enable different operations, can be union of {@link VolumeFlag} + * @param { int } volume - Volume to set. The value range can be obtained by calling getMinVolume and getMaxVolume. + * @param { int } flags - volume flags used to enable different operations, can be union of {@link VolumeFlag} * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system App. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setVolumeWithFlag(volumeType: AudioVolumeType, volume: number, flags: number): Promise; + setVolumeWithFlag(volumeType: AudioVolumeType, volume: int, flags: int): Promise; /** * Obtains the active volume type in the calling moment. This method returns in sync mode. - * @param { number } uid - The target uid's active volume type or + * @param { int } uid - The target uid's active volume type or * 0 which means the global active volume type. * @returns { AudioVolumeType } Current active volume type. * @throws { BusinessError } 202 - Not system App. @@ -5251,46 +5597,53 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - getActiveVolumeTypeSync(uid: number): AudioVolumeType; + getActiveVolumeTypeSync(uid: int): AudioVolumeType; /** * Obtains the volume of a stream. This method uses an asynchronous callback to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @param { AsyncCallback } callback - Callback used to return the volume. + * @param { AsyncCallback } callback - Callback used to return the volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains the volume of a volume type. This method uses an asynchronous callback to return the query result. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { AsyncCallback } callback - Callback used to return the volume. + * @param { AsyncCallback } callback - Callback used to return the volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getVolumeByStream + * @arkts 1.1&1.2 */ - getVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; + getVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** * Obtains the volume of a stream. This method uses a promise to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { Promise } Promise used to return the volume. + * @returns { Promise } Promise used to return the volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains the volume of a volume type. This method uses a promise to return the query result. * @param { AudioVolumeType } volumeType - Audio volume type. - * @returns { Promise } Promise used to return the volume. + * @returns { Promise } Promise used to return the volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getVolumeByStream + * @arkts 1.1&1.2 */ - getVolume(volumeType: AudioVolumeType): Promise; + getVolume(volumeType: AudioVolumeType): Promise; /** * Obtains the volume of a stream. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { number } Current system volume level. + * @returns { int } Current system volume level. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -5301,53 +5654,62 @@ declare namespace audio { /** * Obtains the volume of a volume type. * @param { AudioVolumeType } volumeType - Audio volume type. - * @returns { number } Current system volume level. + * @returns { int } Current system volume level. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getVolumeByStream + * @arkts 1.1&1.2 */ - getVolumeSync(volumeType: AudioVolumeType): number; + getVolumeSync(volumeType: AudioVolumeType): int; /** * Obtains the minimum volume allowed for a stream. This method uses an asynchronous callback to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @param { AsyncCallback } callback - Callback used to return the minimum volume. + * @param { AsyncCallback } callback - Callback used to return the minimum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains the minimum volume allowed for a volume type. This method uses an asynchronous callback to return the query result. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { AsyncCallback } callback - Callback used to return the minimum volume. + * @param { AsyncCallback } callback - Callback used to return the minimum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getMinVolumeByStream + * @arkts 1.1&1.2 */ - getMinVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; + getMinVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** * Obtains the minimum volume allowed for a stream. This method uses a promise to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { Promise } Promise used to return the minimum volume. + * @returns { Promise } Promise used to return the minimum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains the minimum volume allowed for a volume type. This method uses a promise to return the query result. * @param { AudioVolumeType } volumeType - Audio volume type. - * @returns { Promise } Promise used to return the minimum volume. + * @returns { Promise } Promise used to return the minimum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getMinVolumeByStream + * @arkts 1.1&1.2 */ - getMinVolume(volumeType: AudioVolumeType): Promise; + getMinVolume(volumeType: AudioVolumeType): Promise; /** * Obtains the minimum volume allowed for a stream. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { number } Min volume level. + * @returns { int } Min volume level. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -5358,53 +5720,62 @@ declare namespace audio { /** * Obtains the minimum volume allowed for a volume type. * @param { AudioVolumeType } volumeType - Audio volume type. - * @returns { number } Min volume level. + * @returns { int } Min volume level. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getMinVolumeByStream + * @arkts 1.1&1.2 */ - getMinVolumeSync(volumeType: AudioVolumeType): number; + getMinVolumeSync(volumeType: AudioVolumeType): int; /** * Obtains the maximum volume allowed for a stream. This method uses an asynchronous callback to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @param { AsyncCallback } callback - Callback used to return the maximum volume. + * @param { AsyncCallback } callback - Callback used to return the maximum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains the maximum volume allowed for a volume type. This method uses an asynchronous callback to return the query result. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { AsyncCallback } callback - Callback used to return the maximum volume. + * @param { AsyncCallback } callback - Callback used to return the maximum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getMaxVolumeByStream + * @arkts 1.1&1.2 */ - getMaxVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; + getMaxVolume(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** * Obtains the maximum volume allowed for a stream. This method uses a promise to return the query result. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { Promise } Promise used to return the maximum volume. + * @returns { Promise } Promise used to return the maximum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Obtains the maximum volume allowed for a volume type. This method uses a promise to return the query result. * @param { AudioVolumeType } volumeType - Audio volume type. - * @returns { Promise } Promise used to return the maximum volume. + * @returns { Promise } Promise used to return the maximum volume. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getMaxVolumeByStream + * @arkts 1.1&1.2 */ - getMaxVolume(volumeType: AudioVolumeType): Promise; + getMaxVolume(volumeType: AudioVolumeType): Promise; /** * Obtains the maximum volume allowed for a stream. * @param { AudioVolumeType } volumeType - Audio stream type. - * @returns { number } Max volume level. + * @returns { int } Max volume level. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -5415,16 +5786,19 @@ declare namespace audio { /** * Obtains the maximum volume allowed for a volume type. * @param { AudioVolumeType } volumeType - Audio volume type. - * @returns { number } Max volume level. + * @returns { int } Max volume level. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getMaxVolumeByStream + * @arkts 1.1&1.2 */ - getMaxVolumeSync(volumeType: AudioVolumeType): number; + getMaxVolumeSync(volumeType: AudioVolumeType): int; /** * Mutes a stream. This method uses an asynchronous callback to return the result. @@ -5434,7 +5808,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ mute(volumeType: AudioVolumeType, mute: boolean, callback: AsyncCallback): void; /** @@ -5445,7 +5820,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ mute(volumeType: AudioVolumeType, mute: boolean): Promise; @@ -5464,7 +5840,10 @@ declare namespace audio { * value true means that the volume type is muted, and false means the opposite. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#isSystemMutedForStream + * @arkts 1.1&1.2 */ isMute(volumeType: AudioVolumeType, callback: AsyncCallback): void; /** @@ -5482,7 +5861,10 @@ declare namespace audio { * means that the volume type is muted, and false means the opposite. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#isSystemMutedForStream + * @arkts 1.1&1.2 */ isMute(volumeType: AudioVolumeType): Promise; /** @@ -5508,7 +5890,10 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#isSystemMutedForStream + * @arkts 1.1&1.2 */ isMuteSync(volumeType: AudioVolumeType): boolean; @@ -5519,7 +5904,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ setRingerMode(mode: AudioRingMode, callback: AsyncCallback): void; /** @@ -5529,7 +5915,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ setRingerMode(mode: AudioRingMode): Promise; @@ -5544,7 +5931,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the ringer mode. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRingerMode(callback: AsyncCallback): void; /** @@ -5558,7 +5946,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the ringer mode. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRingerMode(): Promise; /** @@ -5572,7 +5961,8 @@ declare namespace audio { * @returns { AudioRingMode } Current ringer mode. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRingerModeSync(): AudioRingMode; @@ -5585,7 +5975,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'ringerModeChange', callback: Callback): void; @@ -5595,7 +5986,8 @@ declare namespace audio { * @param { Callback } callback - Callback used to get the updated ringer mode. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'ringerModeChange', callback?: Callback): void; @@ -5635,7 +6027,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setMicMute(mute: boolean): Promise; @@ -5653,7 +6046,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setMicMutePersistent(mute: boolean, type: PolicyType): Promise; @@ -5667,7 +6061,8 @@ declare namespace audio { * @throws { BusinessError } 202 - Not system App. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isPersistentMicMute(): boolean; @@ -5684,7 +6079,8 @@ declare namespace audio { * true means that the microphone is muted, and false means the opposite. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isMicrophoneMute(callback: AsyncCallback): void; /** @@ -5700,7 +6096,8 @@ declare namespace audio { * means that the microphone is muted, and false means the opposite. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isMicrophoneMute(): Promise; /** @@ -5716,7 +6113,8 @@ declare namespace audio { * means that the microphone is muted, and false means the opposite. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isMicrophoneMuteSync(): boolean; @@ -5729,7 +6127,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'micStateChange', callback: Callback): void; @@ -5742,7 +6141,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'micStateChange', callback?: Callback): void; @@ -5757,7 +6157,8 @@ declare namespace audio { * @returns { boolean } Whether it is volume unadjustable. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isVolumeUnadjustable(): boolean; @@ -5775,7 +6176,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by callback. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ adjustVolumeByStep(adjustType: VolumeAdjustType, callback: AsyncCallback): void; /** @@ -5792,7 +6194,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ adjustVolumeByStep(adjustType: VolumeAdjustType): Promise; @@ -5811,7 +6214,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by callback. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ adjustSystemVolumeByStep(volumeType: AudioVolumeType, adjustType: VolumeAdjustType, callback: AsyncCallback): void; /** @@ -5829,7 +6233,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ adjustSystemVolumeByStep(volumeType: AudioVolumeType, adjustType: VolumeAdjustType): Promise; @@ -5837,9 +6242,9 @@ declare namespace audio { * Gets the volume db value that system calculate by volume type, volume level and device type. * This method uses an asynchronous callback to return the result. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { number } volumeLevel - Volume level to set. + * @param { int } volumeLevel - Volume level to set. * @param { DeviceType } device - Output device type. - * @param { AsyncCallback } callback - Callback used to return the result. + * @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. @@ -5852,9 +6257,9 @@ declare namespace audio { * Gets the volume db value that system calculate by volume type, volume level and device type. * This method uses an asynchronous callback to return the result. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { number } volumeLevel - Volume level to set. + * @param { int } volumeLevel - Volume level to set. * @param { DeviceType } device - Output device type. - * @param { AsyncCallback } callback - Callback used to return the result. + * @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. @@ -5862,16 +6267,19 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by callback. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getVolumeInUnitOfDbByStream + * @arkts 1.1&1.2 */ - getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: DeviceType, callback: AsyncCallback): void; + getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: int, device: DeviceType, callback: AsyncCallback): void; /** * Gets the volume db value that system calculate by volume type, volume level and device type. * This method uses a promise to return the result. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { number } volumeLevel - Volume level to set. + * @param { int } volumeLevel - Volume level to set. * @param { DeviceType } device - Output device type. - * @returns { Promise } Promise used to return the result. + * @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. @@ -5884,9 +6292,9 @@ declare namespace audio { * Gets the volume db value that system calculate by volume type, volume level and device type. * This method uses a promise to return the result. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { number } volumeLevel - Volume level to set. + * @param { int } volumeLevel - Volume level to set. * @param { DeviceType } device - Output device type. - * @returns { Promise } Promise used to return the result. + * @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. @@ -5894,15 +6302,18 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getVolumeInUnitOfDbByStream + * @arkts 1.1&1.2 */ - getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: number, device: DeviceType): Promise; + getSystemVolumeInDb(volumeType: AudioVolumeType, volumeLevel: int, device: DeviceType): Promise; /** * Gets the volume db value that system calculate by volume type, volume level and device type. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { number } volumeLevel - Volume level to set. + * @param { int } volumeLevel - Volume level to set. * @param { DeviceType } device - Output device type. - * @returns { number } The system volume in dB. + * @returns { double } The system volume in dB. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -5913,47 +6324,52 @@ declare namespace audio { /** * Gets the volume db value that system calculate by volume type, volume level and device type. * @param { AudioVolumeType } volumeType - Audio volume type. - * @param { number } volumeLevel - Volume level to set. + * @param { int } volumeLevel - Volume level to set. * @param { DeviceType } device - Output device type. - * @returns { number } The system volume in dB. + * @returns { double } The system volume in dB. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @deprecated since 20 + * @useinstead ohos.multimedia.audio.AudioVolumeManager#getVolumeInUnitOfDbByStream + * @arkts 1.1&1.2 */ - getSystemVolumeInDbSync(volumeType: AudioVolumeType, volumeLevel: number, device: DeviceType): number; + getSystemVolumeInDbSync(volumeType: AudioVolumeType, volumeLevel: int, device: DeviceType): double; /** * Gets the max amplitude value for a specific input device. * This method uses a promise to return the result. * @param { AudioDeviceDescriptor } inputDevice - the target device. - * @returns { Promise } Promise used to return the max amplitude value. + * @returns { Promise } Promise used to return the max amplitude value. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise. * @throws { BusinessError } 6800301 - System error. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMaxAmplitudeForInputDevice(inputDevice: AudioDeviceDescriptor): Promise; + getMaxAmplitudeForInputDevice(inputDevice: AudioDeviceDescriptor): Promise; /** * Gets the max amplitude value for a specific output device. * This method uses a promise to return the result. * @param { AudioDeviceDescriptor } outputDevice - the target device. - * @returns { Promise } Promise used to return the max amplitude value. + * @returns { Promise } Promise used to return the max amplitude value. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise. * @throws { BusinessError } 6800301 - System error. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMaxAmplitudeForOutputDevice(outputDevice: AudioDeviceDescriptor): Promise; + getMaxAmplitudeForOutputDevice(outputDevice: AudioDeviceDescriptor): Promise; } /** @@ -5961,7 +6377,8 @@ declare namespace audio { * @interface AudioSpatialEnabledStateForDevice * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioSpatialEnabledStateForDevice { /** @@ -5969,7 +6386,8 @@ declare namespace audio { * @type { AudioDeviceDescriptor } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deviceDescriptor: AudioDeviceDescriptor; /** @@ -5977,7 +6395,8 @@ declare namespace audio { * @type { boolean } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enabled: boolean; } @@ -5986,7 +6405,8 @@ declare namespace audio { * Implements audio spatialization management. * @typedef AudioSpatializationManager * @syscap SystemCapability.Multimedia.Audio.Spatialization - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioSpatializationManager { /** @@ -5995,7 +6415,8 @@ declare namespace audio { * @throws { BusinessError } 202 - Not system App. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isSpatializationSupported(): boolean; @@ -6010,7 +6431,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isSpatializationSupportedForDevice(deviceDescriptor: AudioDeviceDescriptor): boolean; @@ -6020,7 +6442,8 @@ declare namespace audio { * @throws { BusinessError } 202 - Not system App. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isHeadTrackingSupported(): boolean; @@ -6035,7 +6458,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isHeadTrackingSupportedForDevice(deviceDescriptor: AudioDeviceDescriptor): boolean; @@ -6089,7 +6513,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setSpatializationEnabled(deviceDescriptor: AudioDeviceDescriptor, enabled: boolean): Promise; @@ -6115,7 +6540,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isSpatializationEnabled(deviceDescriptor: AudioDeviceDescriptor): boolean; @@ -6148,7 +6574,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'spatializationEnabledChangeForAnyDevice', callback: Callback): void; @@ -6179,7 +6606,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'spatializationEnabledChangeForAnyDevice', callback?: Callback): void; @@ -6233,7 +6661,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setHeadTrackingEnabled(deviceDescriptor: AudioDeviceDescriptor, enabled: boolean): Promise; @@ -6259,7 +6688,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isHeadTrackingEnabled(deviceDescriptor: AudioDeviceDescriptor): boolean; @@ -6292,7 +6722,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'headTrackingEnabledChangeForAnyDevice', callback: Callback): void; @@ -6323,7 +6754,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'headTrackingEnabledChangeForAnyDevice', callback?: Callback): void; @@ -6339,7 +6771,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ updateSpatialDeviceState(spatialDeviceState: AudioSpatialDeviceState): void; @@ -6355,7 +6788,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setSpatializationSceneType(spatializationSceneType: AudioSpatializationSceneType): void; @@ -6365,7 +6799,8 @@ declare namespace audio { * @throws { BusinessError } 202 - Not system App. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSpatializationSceneType(): AudioSpatializationSceneType; @@ -6373,7 +6808,8 @@ declare namespace audio { * Checks whether the spatialization is enabled by the current device. * @returns { boolean } Whether the spatialization is enabled by the current device. * @syscap SystemCapability.Multimedia.Audio.Spatialization - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ isSpatializationEnabledForCurrentDevice(): boolean; @@ -6384,7 +6820,8 @@ declare namespace audio { * @param { Callback } callback - Callback used to get the spatialization enable state. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'spatializationEnabledChangeForCurrentDevice', callback: Callback): void; @@ -6394,7 +6831,8 @@ declare namespace audio { * @param { Callback } callback - Callback used to get the spatialization enable state. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Spatialization - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'spatializationEnabledChangeForCurrentDevice', callback?: Callback): void; } @@ -6404,7 +6842,8 @@ declare namespace audio { * @typedef AudioEffectManager * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioEffectManager { /** @@ -6416,7 +6855,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedAudioEffectProperty(): Array; @@ -6434,7 +6874,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ setAudioEffectProperty(propertyArray: Array): void; @@ -6447,7 +6888,8 @@ declare namespace audio { * @throws { BusinessError } 6800301 - System error. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioEffectProperty(): Array; } @@ -6504,17 +6946,19 @@ declare namespace audio { /** * Connect type for device. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ enum ConnectType { /** * Connect type for local device. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ CONNECT_TYPE_LOCAL = 1, @@ -6522,7 +6966,8 @@ declare namespace audio { * Connect type for distributed device. * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ CONNECT_TYPE_DISTRIBUTED = 2 } @@ -6532,7 +6977,8 @@ declare namespace audio { * @typedef VolumeGroupInfo * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface VolumeGroupInfo { /** @@ -6541,29 +6987,32 @@ declare namespace audio { * @readonly * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly networkId: string; /** * Volume group id. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly groupId: number; + readonly groupId: int; /** * Volume mapping group id. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly mappingId: number; + readonly mappingId: int; /** * Volume group name. @@ -6571,7 +7020,8 @@ declare namespace audio { * @readonly * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly groupName: string; @@ -6581,7 +7031,8 @@ declare namespace audio { * @readonly * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly type: ConnectType; } @@ -6591,7 +7042,8 @@ declare namespace audio { * @typedef { Array> } VolumeGroupInfos * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ type VolumeGroupInfos = Array>; @@ -6606,7 +7058,8 @@ declare namespace audio { * @typedef { Array> } AudioRendererChangeInfoArray * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type AudioRendererChangeInfoArray = Array>; @@ -6621,34 +7074,37 @@ declare namespace audio { * @typedef AudioRendererChangeInfo * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioRendererChangeInfo { /** * Audio stream unique id. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 9 */ /** * Audio stream unique id. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly streamId: number; + readonly streamId: int; /** * Uid for audio renderer client application. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Renderer * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly clientUid: number; + readonly clientUid: int; /** * Audio renderer information. @@ -6662,7 +7118,8 @@ declare namespace audio { * @readonly * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly rendererInfo: AudioRendererInfo; @@ -6672,7 +7129,8 @@ declare namespace audio { * @readonly * @syscap SystemCapability.Multimedia.Audio.Renderer * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly rendererState: AudioState; @@ -6688,7 +7146,8 @@ declare namespace audio { * @readonly * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly deviceDescriptors: AudioDeviceDescriptors; } @@ -6704,7 +7163,8 @@ declare namespace audio { * @typedef { Array> } AudioCapturerChangeInfoArray * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type AudioCapturerChangeInfoArray = Array>; @@ -6719,34 +7179,37 @@ declare namespace audio { * @typedef AudioCapturerChangeInfo * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioCapturerChangeInfo { /** * Audio stream unique id. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 9 */ /** * Audio stream unique id. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly streamId: number; + readonly streamId: int; /** * Uid for audio capturer client application. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly clientUid: number; + readonly clientUid: int; /** * Audio capturer information. @@ -6760,7 +7223,8 @@ declare namespace audio { * @readonly * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly capturerInfo: AudioCapturerInfo; @@ -6770,7 +7234,8 @@ declare namespace audio { * @readonly * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly capturerState: AudioState; @@ -6786,7 +7251,8 @@ declare namespace audio { * @readonly * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly deviceDescriptors: AudioDeviceDescriptors; @@ -6802,7 +7268,8 @@ declare namespace audio { * @readonly * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly muted?: boolean; } @@ -6819,7 +7286,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioDeviceDescriptor { /** @@ -6835,7 +7303,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly deviceRole: DeviceRole; @@ -6852,26 +7321,28 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly deviceType: DeviceType; /** * Audio device id. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Device * @since 9 */ /** * Audio device id. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly id: number; + readonly id: int; /** * Audio device name. @@ -6886,7 +7357,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly name: string; @@ -6903,87 +7375,94 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly address: string; /** * Supported sampling rates. - * @type { Array } + * @type { Array } * @syscap SystemCapability.Multimedia.Audio.Device * @since 9 */ /** * Supported sampling rates. - * @type { Array } + * @type { Array } * @readonly * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly sampleRates: Array; + readonly sampleRates: Array; /** * Supported channel counts. - * @type { Array } + * @type { Array } * @syscap SystemCapability.Multimedia.Audio.Device * @since 9 */ /** * Supported channel counts. - * @type { Array } + * @type { Array } * @readonly * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly channelCounts: Array; + readonly channelCounts: Array; /** * Supported channel masks. - * @type { Array } + * @type { Array } * @syscap SystemCapability.Multimedia.Audio.Device * @since 9 */ /** * Supported channel masks. - * @type { Array } + * @type { Array } * @readonly * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly channelMasks: Array; + readonly channelMasks: Array; /** * Device network id * @type { string } * @readonly * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly networkId: string; /** * Interrupt group id - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly interruptGroupId: number; + readonly interruptGroupId: int; /** * Volume group id - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Device * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly volumeGroupId: number; + readonly volumeGroupId: int; /** * Name used to display, considering distributed device situation. * @type { string } @@ -6997,7 +7476,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly displayName: string; @@ -7014,7 +7494,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly encodingTypes?: Array; @@ -7023,20 +7504,22 @@ declare namespace audio { * @type { boolean } * @readonly * @syscap SystemCapability.Multimedia.Audio.Spatialization - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ readonly spatializationSupported?: boolean; /** * Only {@link DeviceType.SPEAKER} with networkId、{@link DeviceType.REMOTE_CAST} * or {@link DeviceType.REMOTE_DAUDIO} has dmDeviceType which indicated deviceTypeId. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly dmDeviceType?: number; + readonly dmDeviceType?: int; } /** @@ -7051,27 +7534,31 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type AudioDeviceDescriptors = Array>; /** * Volume mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioVolumeMode { /** * Audio volume affected by system volume level. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ SYSTEM_GLOBAL = 0, /** * Audio volume affected by app's individual percentage. * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ APP_INDIVIDUAL = 1 } @@ -7087,58 +7574,65 @@ declare namespace audio { * @typedef VolumeEvent * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface VolumeEvent { /** * Volume type of the current stream. * @type { AudioVolumeType } * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ volumeType: AudioVolumeType; /** * Volume level. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @since 9 */ /** * Volume level. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - volume: number; + volume: int; /** * Whether to show the volume change in UI. * @type { boolean } * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ updateUi: boolean; /** * volumeGroup id - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - volumeGroupId: number; + volumeGroupId: int; /** * Device network id * @type { string } * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ networkId: string; /** * Audio volume mode of this volume event * @type { ?AudioVolumeMode } * @syscap SystemCapability.Multimedia.Audio.Volume - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ volumeMode?: AudioVolumeMode; } @@ -7265,14 +7759,16 @@ declare namespace audio { * Describes the microphone state change event received by the app when the microphone state is changed. * @typedef MicStateChangeEvent * @syscap SystemCapability.Multimedia.Audio.Device - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface MicStateChangeEvent { /** * Mic mute state. * @type { boolean } * @syscap SystemCapability.Multimedia.Audio.Device - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ mute: boolean; } @@ -7287,7 +7783,8 @@ declare namespace audio { * @typedef DeviceChangeAction * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface DeviceChangeAction { /** @@ -7301,7 +7798,8 @@ declare namespace audio { * @type { DeviceChangeType } * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type: DeviceChangeType; @@ -7316,23 +7814,25 @@ declare namespace audio { * @type { AudioDeviceDescriptors } * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deviceDescriptors: AudioDeviceDescriptors; } /** * Enumerates channel blend mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 11 */ /** * Enumerates channel blend mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum ChannelBlendMode { /** @@ -7344,7 +7844,8 @@ declare namespace audio { * No channel process. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MODE_DEFAULT = 0, /** @@ -7356,7 +7857,8 @@ declare namespace audio { * Blend left and right channel. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MODE_BLEND_LR = 1, /** @@ -7368,7 +7870,8 @@ declare namespace audio { * Replicate left to right channel. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MODE_ALL_LEFT = 2, /** @@ -7380,24 +7883,26 @@ declare namespace audio { * Replicate right to left channel. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MODE_ALL_RIGHT = 3, } /** * Enumerates audio stream device change reason. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @since 11 */ /** * Enumerates audio stream device change reason. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioStreamDeviceChangeReason { /** @@ -7410,7 +7915,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ REASON_UNKNOWN = 0, /** @@ -7423,7 +7929,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ REASON_NEW_DEVICE_AVAILABLE = 1, /** @@ -7438,7 +7945,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ REASON_OLD_DEVICE_UNAVAILABLE = 2, /** @@ -7451,7 +7959,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ REASON_OVERRODE = 3, } @@ -7467,7 +7976,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioStreamDeviceChangeInfo { /** @@ -7482,7 +7992,8 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ devices: AudioDeviceDescriptors; /** @@ -7497,24 +8008,27 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ changeReason: AudioStreamDeviceChangeReason; } /** * Enumerates callback result. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioDataCallbackResult { /** * Indicates data of this callback is invalid. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INVALID = -1, @@ -7522,7 +8036,8 @@ declare namespace audio { * Indicates data of this callback is valid. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VALID = 0, } @@ -7541,31 +8056,48 @@ declare namespace audio { */ type AudioRendererWriteDataCallback = (data: ArrayBuffer) => AudioDataCallbackResult | void; + /** + * Type definition of callback function for audio renderer write data. + * + * @typedef { function } AudioRendererWriteDataCallback + * @param { ArrayBuffer } data - audio data array buffer. + * @returns { AudioDataCallbackResult } result of callback. If AudioDataCallbackResult.VALID + * is returned, it indicates the data is valid and will be played. If AudioDataCallbackResult.INVALID + * is returned, it indicates the data is will not be played. + * @syscap SystemCapability.Multimedia.Audio.Renderer + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + type AudioRendererWriteDataCallback = (data: ArrayBuffer) => AudioDataCallbackResult; /** * Audio timestamp info. * @typedef AudioTimestampInfo * @syscap SystemCapability.Multimedia.Audio.Core - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioTimestampInfo { /** * Frame position. - * @type { number } + * @type { long } * @readonly * @syscap SystemCapability.Multimedia.Audio.Core - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly framePos: number; + readonly framePos: long; /** * Timestamp when frame in {@link AudioTimestampInfo#framePos} was rendered or captured. - * @type { number } + * @type { long } * @readonly * @syscap SystemCapability.Multimedia.Audio.Core - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly timestamp: number; + readonly timestamp: long; } /** @@ -7579,7 +8111,8 @@ declare namespace audio { * @typedef AudioRenderer * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioRenderer { /** @@ -7594,7 +8127,8 @@ declare namespace audio { * @readonly * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly state: AudioState; @@ -7611,7 +8145,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the renderer information. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRendererInfo(callback: AsyncCallback): void; /** @@ -7627,7 +8162,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the renderer information. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRendererInfo(): Promise; /** @@ -7641,7 +8177,8 @@ declare namespace audio { * @returns { AudioRendererInfo } The renderer information. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRendererInfoSync(): AudioRendererInfo; @@ -7656,7 +8193,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the stream information. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStreamInfo(callback: AsyncCallback): void; /** @@ -7670,7 +8208,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the stream information. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStreamInfo(): Promise; /** @@ -7684,65 +8223,71 @@ declare namespace audio { * @returns { AudioStreamInfo } The stream information. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStreamInfoSync(): AudioStreamInfo; /** * Obtains the renderer stream id. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the stream id. + * @param { AsyncCallback } callback - Callback used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 9 */ /** * Obtains the renderer stream id. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the stream id. + * @param { AsyncCallback } callback - Callback used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioStreamId(callback: AsyncCallback): void; + getAudioStreamId(callback: AsyncCallback): void; /** * Obtains the renderer stream id. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the stream id. + * @returns { Promise } Promise used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 9 */ /** * Obtains the renderer stream id. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the stream id. + * @returns { Promise } Promise used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioStreamId(): Promise; + getAudioStreamId(): Promise; /** * Obtains the renderer stream id. - * @returns { number } The stream id. + * @returns { long } The stream id. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Obtains the renderer stream id. - * @returns { number } The stream id. + * @returns { long } The stream id. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioStreamIdSync(): number; + getAudioStreamIdSync(): long; /** * Obtains the current audio effect mode. This method uses an asynchronous callback to return the query result. * @param { AsyncCallback } callback - Callback used to return the current audio effect mode. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioEffectMode(callback: AsyncCallback): void; /** * Obtains the current audio effect mode. This method uses a promise to return the query result. * @returns { Promise } Promise used to return the current audio effect mode. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioEffectMode(): Promise; @@ -7755,7 +8300,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. Return by callback. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ setAudioEffectMode(mode: AudioEffectMode, callback: AsyncCallback): void; /** @@ -7767,7 +8313,8 @@ declare namespace audio { * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ setAudioEffectMode(mode: AudioEffectMode): Promise; @@ -7785,7 +8332,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(callback: AsyncCallback): void; /** @@ -7802,7 +8350,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(): Promise; @@ -7832,7 +8381,7 @@ declare namespace audio { /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses an * asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the timestamp. + * @param { AsyncCallback } callback - Callback used to return the timestamp. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 8 */ @@ -7840,16 +8389,17 @@ declare namespace audio { * Obtains the timestamp for audio frame that passed by system framework most recently. * The timestamp is not accurate because audio device latency is not considered very thoughtfully. * This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the audio timestamp based on the monotonic nanosecond system timer. + * @param { AsyncCallback } callback - Callback used to return the audio timestamp based on the monotonic nanosecond system timer. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioTime(callback: AsyncCallback): void; + getAudioTime(callback: AsyncCallback): void; /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses a * promise to return the result. - * @returns { Promise } Promise used to return the timestamp. + * @returns { Promise } Promise used to return the timestamp. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 8 */ @@ -7857,27 +8407,29 @@ declare namespace audio { * Obtains the timestamp for audio frame that passed by system framework most recently. * The timestamp is not accurate because audio device latency is not considered very thoughtfully. * This method uses a promise to return the result. - * @returns { Promise } Promise used to return the audio timestamp based on the monotonic nanosecond system timer. + * @returns { Promise } Promise used to return the audio timestamp based on the monotonic nanosecond system timer. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioTime(): Promise; + getAudioTime(): Promise; /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. - * @returns { number } The audio timestamp. + * @returns { long } The audio timestamp. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Obtains the timestamp for audio frame that passed by system framework most recently. * The timestamp is not accurate because audio device latency is not considered very thoughtfully. - * @returns { number } The audio timestamp based on the monotonic nanosecond system timer. + * @returns { long } The audio timestamp based on the monotonic nanosecond system timer. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioTimeSync(): number; + getAudioTimeSync(): long; /** * Obtains the timestamp info. @@ -7885,7 +8437,8 @@ declare namespace audio { * @returns { Promise } The Promise used to return timestamp info. * @throws { BusinessError } 6800103 - Operation not permit at current state. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioTimestampInfo(): Promise; @@ -7895,7 +8448,8 @@ declare namespace audio { * @returns { AudioTimestampInfo } The returned timestamp info. * @throws { BusinessError } 6800103 - Operation not permit at current state. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioTimestampInfoSync(): AudioTimestampInfo; @@ -7910,7 +8464,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ drain(callback: AsyncCallback): void; /** @@ -7924,7 +8479,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ drain(): Promise; @@ -7941,7 +8497,8 @@ declare namespace audio { * @throws { BusinessError } 6800103 - Operation not permit at current state. Return by promise. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ flush(): Promise; @@ -7956,7 +8513,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pause(callback: AsyncCallback): void; /** @@ -7970,7 +8528,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pause(): Promise; @@ -7985,7 +8544,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(callback: AsyncCallback): void; /** @@ -7999,7 +8559,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): Promise; @@ -8019,7 +8580,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; /** @@ -8038,54 +8600,58 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; /** * Obtains a reasonable minimum buffer size in bytes for rendering. This method uses an asynchronous callback to * return the result. - * @param { AsyncCallback } callback - Callback used to return the buffer size. + * @param { AsyncCallback } callback - Callback used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 8 */ /** * Obtains a reasonable minimum buffer size in bytes for rendering. This method uses an asynchronous callback to * return the result. - * @param { AsyncCallback } callback - Callback used to return the buffer size. + * @param { AsyncCallback } callback - Callback used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getBufferSize(callback: AsyncCallback): void; + getBufferSize(callback: AsyncCallback): void; /** * Obtains a reasonable minimum buffer size in bytes for rendering. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the buffer size. + * @returns { Promise } Promise used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 8 */ /** * Obtains a reasonable minimum buffer size in bytes for rendering. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the buffer size. + * @returns { Promise } Promise used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getBufferSize(): Promise; + getBufferSize(): Promise; /** * Obtains a reasonable minimum buffer size in bytes for rendering. - * @returns { number } The audio buffer size. + * @returns { long } The audio buffer size. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Obtains a reasonable minimum buffer size in bytes for rendering. - * @returns { number } The audio buffer size. + * @returns { long } The audio buffer size. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getBufferSizeSync(): number; + getBufferSizeSync(): long; /** * Sets the render rate. This method uses an asynchronous callback to return the result. @@ -8111,7 +8677,7 @@ declare namespace audio { /** * Sets the playback speed. - * @param { number } speed - Audio playback speed. The value type is float, form 0.25 to 4.0. + * @param { double } speed - Audio playback speed. The value type is float, form 0.25 to 4.0. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -8121,16 +8687,17 @@ declare namespace audio { */ /** * Sets the playback speed. - * @param { number } speed - Audio playback speed. The value type is float, form 0.25 to 4.0. + * @param { double } speed - Audio playback speed. The value type is float, form 0.25 to 4.0. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setSpeed(speed: number): void; + setSpeed(speed: double): void; /** * Obtains the current render rate. This method uses an asynchronous callback to return the result. @@ -8164,18 +8731,19 @@ declare namespace audio { /** * Obtains the current playback speed. - * @returns { number } The playback speed. + * @returns { double } The playback speed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 11 */ /** * Obtains the current playback speed. - * @returns { number } The playback speed. + * @returns { double } The playback speed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getSpeed(): number; + getSpeed(): double; /** * Set interrupt mode. @@ -8190,7 +8758,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setInterruptMode(mode: InterruptMode, callback: AsyncCallback): void; /** @@ -8206,7 +8775,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setInterruptMode(mode: InterruptMode): Promise; /** @@ -8228,55 +8798,59 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setInterruptModeSync(mode: InterruptMode): void; /** * Sets the volume for this stream. This method uses an asynchronous callback to return the result. - * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0. + * @param { double } volume - Volume to set. The value type is float, form 0.0 to 1.0. * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 9 */ /** * Sets the volume for this stream. This method uses an asynchronous callback to return the result. - * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0. + * @param { double } volume - Volume to set. The value type is float, form 0.0 to 1.0. * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setVolume(volume: number, callback: AsyncCallback): void; + setVolume(volume: double, callback: AsyncCallback): void; /** * Sets the volume for a stream. This method uses a promise to return the result. - * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0. + * @param { double } volume - Volume to set. The value type is float, form 0.0 to 1.0. * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 9 */ /** * Sets the volume for a stream. This method uses a promise to return the result. - * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0. + * @param { double } volume - Volume to set. The value type is float, form 0.0 to 1.0. * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setVolume(volume: number): Promise; + setVolume(volume: double): Promise; /** * Gets volume of this stream. - * @returns { number } Returns one float value. + * @returns { double } Returns one float value. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getVolume(): number; + getVolume(): double; /** * Changes the volume with ramp for a duration. - * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0. - * @param { number } duration - Duration for volume ramp, in millisecond. + * @param { double } volume - Volume to set. The value type is float, form 0.0 to 1.0. + * @param { int } duration - Duration for volume ramp, in millisecond. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. @@ -8286,146 +8860,156 @@ declare namespace audio { */ /** * Changes the volume with ramp for a duration. - * @param { number } volume - Volume to set. The value type is float, form 0.0 to 1.0. - * @param { number } duration - Duration for volume ramp, in millisecond. + * @param { double } volume - Volume to set. The value type is float, form 0.0 to 1.0. + * @param { int } duration - Duration for volume ramp, in millisecond. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setVolumeWithRamp(volume: number, duration: number): void; + setVolumeWithRamp(volume: double, duration: int): void; /** * Gets the min volume this stream can set. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets the min volume this stream can set. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMinStreamVolume(callback: AsyncCallback): void; + getMinStreamVolume(callback: AsyncCallback): void; /** * Gets the min volume this stream can set. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets the min volume this stream can set. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMinStreamVolume(): Promise; + getMinStreamVolume(): Promise; /** * Gets the min volume this stream can set. - * @returns { number } Min stream volume. + * @returns { double } Min stream volume. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets the min volume this stream can set. - * @returns { number } Min stream volume. + * @returns { double } Min stream volume. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMinStreamVolumeSync(): number; + getMinStreamVolumeSync(): double; /** * Gets the max volume this stream can set. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets the max volume this stream can set. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMaxStreamVolume(callback: AsyncCallback): void; + getMaxStreamVolume(callback: AsyncCallback): void; /** * Gets the max volume this stream can set. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets the max volume this stream can set. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMaxStreamVolume(): Promise; + getMaxStreamVolume(): Promise; /** * Gets the max volume this stream can set. - * @returns { number } Max stream volume. + * @returns { double } Max stream volume. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets the max volume this stream can set. - * @returns { number } Max stream volume. + * @returns { double } Max stream volume. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getMaxStreamVolumeSync(): number; + getMaxStreamVolumeSync(): double; /** * Gets buffer underflow count. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets buffer underflow count. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getUnderflowCount(callback: AsyncCallback): void; + getUnderflowCount(callback: AsyncCallback): void; /** * Gets buffer underflow count. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets buffer underflow count. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getUnderflowCount(): Promise; + getUnderflowCount(): Promise; /** * Gets buffer underflow count. - * @returns { number } Underflow count number. + * @returns { long } Underflow count number. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Gets buffer underflow count. - * @returns { number } Underflow count number. + * @returns { long } Underflow count number. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getUnderflowCountSync(): number; + getUnderflowCountSync(): long; /** * Gets the output device or devices for this stream. @@ -8440,7 +9024,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentOutputDevices(callback: AsyncCallback): void; /** @@ -8456,7 +9041,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentOutputDevices(): Promise; /** @@ -8470,7 +9056,8 @@ declare namespace audio { * @returns { AudioDeviceDescriptors } Output device or devices. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentOutputDevicesSync(): AudioDeviceDescriptors; @@ -8495,7 +9082,8 @@ declare namespace audio { * @throws { BusinessError } 6800103 - Operation not permit at current state. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setChannelBlendMode(mode: ChannelBlendMode): void; @@ -8505,7 +9093,8 @@ declare namespace audio { * true: set the silent mode and mix with other streams. * false: unset the silent mode, current stream will trigger the audio focus internally. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setSilentModeAndMixWithOthers(on: boolean): void; @@ -8515,7 +9104,8 @@ declare namespace audio { * true: current stream is in the silent mode and mix with other streams. * false: current stream in in the normal playback mode * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSilentModeAndMixWithOthers(): boolean; @@ -8535,7 +9125,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @throws { BusinessError } 6800103 - Operation not permit at current state. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setDefaultOutputDevice(deviceType: DeviceType): Promise; @@ -8587,7 +9178,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioInterrupt', callback: Callback): void; @@ -8597,7 +9189,8 @@ declare namespace audio { * @param { Callback } callback - Callback used to listen for interrupt callback. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Interrupt - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'audioInterrupt', callback?: Callback): void; @@ -8605,8 +9198,8 @@ declare namespace audio { * Subscribes to mark reached events. When the number of frames rendered reaches the value of the frame parameter, * the callback is invoked. * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. - * @param { number } frame - Number of frames to trigger the event. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Number of frames to trigger the event. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 8 */ @@ -8619,13 +9212,14 @@ declare namespace audio { *

* * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. - * @param { number } frame - Number of frames to trigger the event. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Number of frames to trigger the event. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'markReach', frame: number, callback: Callback): void; + on(type: 'markReach', frame: long, callback: Callback): void; /** * Unsubscribes from mark reached events. * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. @@ -8642,19 +9236,20 @@ declare namespace audio { /** * Unsubscribes from mark reached events. * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'markReach', callback?: Callback): void; + off(type: 'markReach', callback?: Callback): void; /** * Subscribes to period reached events. When the period of frame rendering reaches the value of frame parameter, * the callback is invoked. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. - * @param { number } frame - Period during which frame rendering is listened. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Period during which frame rendering is listened. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 8 */ @@ -8662,13 +9257,14 @@ declare namespace audio { * Subscribes to period reached events. When the period of frame rendering reaches the value of frame parameter, * the callback is invoked. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. - * @param { number } frame - Period during which frame rendering is listened. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Period during which frame rendering is listened. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'periodReach', frame: number, callback: Callback): void; + on(type: 'periodReach', frame: long, callback: Callback): void; /** * Unsubscribes from period reached events. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. @@ -8685,12 +9281,13 @@ declare namespace audio { /** * Unsubscribes from period reached events. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'periodReach', callback?: Callback): void; + off(type: 'periodReach', callback?: Callback): void; /** * Subscribes audio state change event callback. @@ -8705,7 +9302,8 @@ declare namespace audio { * @param { Callback } callback - Callback invoked when state change. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'stateChange', callback: Callback): void; @@ -8715,7 +9313,8 @@ declare namespace audio { * @param { Callback } callback - Callback invoked when state change. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'stateChange', callback?: Callback): void; @@ -8742,7 +9341,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'outputDeviceChange', callback: Callback): void; @@ -8769,7 +9369,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'outputDeviceChangeWithInfo', callback: Callback): void; @@ -8794,7 +9395,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'outputDeviceChange', callback?: Callback): void; @@ -8819,7 +9421,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'outputDeviceChangeWithInfo', callback?: Callback): void; @@ -8846,7 +9449,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'writeData', callback: AudioRendererWriteDataCallback): void; @@ -8871,29 +9475,32 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Renderer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'writeData', callback?: AudioRendererWriteDataCallback): void; } /** * Enumerates source types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Enumerates source types. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum SourceType { /** * Invalid source type. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 8 + * @since arkts {'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ SOURCE_TYPE_INVALID = -1, /** @@ -8905,7 +9512,8 @@ declare namespace audio { * Mic source type. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SOURCE_TYPE_MIC = 0, /** @@ -8917,7 +9525,8 @@ declare namespace audio { * Voice recognition source type. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SOURCE_TYPE_VOICE_RECOGNITION = 1, /** @@ -8933,7 +9542,8 @@ declare namespace audio { * Permission ohos.permission.MANAGE_INTELLIGENT_VOICE is needed when calling createAudioCapturer with this type. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ SOURCE_TYPE_WAKEUP = 3, @@ -8942,7 +9552,8 @@ declare namespace audio { * Permission ohos.permission.RECORD_VOICE_CALL is needed when calling createAudioCapturer with this type. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SOURCE_TYPE_VOICE_CALL = 4, @@ -8955,14 +9566,16 @@ declare namespace audio { * Voice communication source type. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SOURCE_TYPE_VOICE_COMMUNICATION = 7, /** * Voice message source type. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SOURCE_TYPE_VOICE_MESSAGE = 10, @@ -8970,21 +9583,24 @@ declare namespace audio { * Source type for voice transcription and processing. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SOURCE_TYPE_VOICE_TRANSCRIPTION = 12, /** * Camcorder source type. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ SOURCE_TYPE_CAMCORDER = 13, /** * Unprocessed source type. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ SOURCE_TYPE_UNPROCESSED = 14, /** @@ -9006,7 +9622,8 @@ declare namespace audio { * @typedef AudioCapturerInfo * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioCapturerInfo { /** @@ -9020,23 +9637,25 @@ declare namespace audio { * @type { SourceType } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ source: SourceType; /** * Audio capturer flags. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Core * @since 8 */ /** * Audio capturer flags. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - capturerFlags: number; + capturerFlags: int; } /** @@ -9050,7 +9669,8 @@ declare namespace audio { * @typedef AudioCapturerOptions * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioCapturerOptions { /** @@ -9064,7 +9684,8 @@ declare namespace audio { * @type { AudioStreamInfo } * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ streamInfo: AudioStreamInfo; /** @@ -9078,7 +9699,8 @@ declare namespace audio { * @type { AudioCapturerInfo } * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ capturerInfo: AudioCapturerInfo; /** @@ -9150,7 +9772,8 @@ declare namespace audio { * @typedef AudioCapturer * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioCapturer { /** @@ -9165,7 +9788,8 @@ declare namespace audio { * @readonly * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly state: AudioState; @@ -9182,7 +9806,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the capturer information. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCapturerInfo(callback: AsyncCallback): void; /** @@ -9198,7 +9823,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the capturer information. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCapturerInfo(): Promise; /** @@ -9212,7 +9838,8 @@ declare namespace audio { * @returns { AudioCapturerInfo } The capturer information. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCapturerInfoSync(): AudioCapturerInfo; @@ -9227,7 +9854,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the stream information. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStreamInfo(callback: AsyncCallback): void; /** @@ -9241,7 +9869,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the stream information. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStreamInfo(): Promise; /** @@ -9255,52 +9884,56 @@ declare namespace audio { * @returns { AudioStreamInfo } The stream information. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getStreamInfoSync(): AudioStreamInfo; /** * Obtains the capturer stream id. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the stream id. + * @param { AsyncCallback } callback - Callback used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 9 */ /** * Obtains the capturer stream id. This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the stream id. + * @param { AsyncCallback } callback - Callback used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioStreamId(callback: AsyncCallback): void; + getAudioStreamId(callback: AsyncCallback): void; /** * Obtains the capturer stream id. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the stream id. + * @returns { Promise } Promise used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 9 */ /** * Obtains the capturer stream id. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the stream id. + * @returns { Promise } Promise used to return the stream id. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioStreamId(): Promise; + getAudioStreamId(): Promise; /** * Obtains the capturer stream id. - * @returns { number } The stream id. + * @returns { long } The stream id. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 10 */ /** * Obtains the capturer stream id. - * @returns { number } The stream id. + * @returns { long } The stream id. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioStreamIdSync(): number; + getAudioStreamIdSync(): long; /** * Starts capturing. @@ -9316,7 +9949,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(callback: AsyncCallback): void; /** @@ -9333,7 +9967,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(): Promise; @@ -9364,7 +9999,7 @@ declare namespace audio { /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses an * asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the timestamp. + * @param { AsyncCallback } callback - Callback used to return the timestamp. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 8 */ @@ -9372,16 +10007,17 @@ declare namespace audio { * Obtains the timestamp for audio frame that passed by system framework most recently. * The timestamp is not accurate because audio device latency is not considered very thoughtfully. * This method uses an asynchronous callback to return the result. - * @param { AsyncCallback } callback - Callback used to return the audio timestamp based on the monotonic nanosecond system timer. + * @param { AsyncCallback } callback - Callback used to return the audio timestamp based on the monotonic nanosecond system timer. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioTime(callback: AsyncCallback): void; + getAudioTime(callback: AsyncCallback): void; /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. This method uses a * promise to return the result. - * @returns { Promise } Promise used to return the timestamp. + * @returns { Promise } Promise used to return the timestamp. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 8 */ @@ -9389,27 +10025,29 @@ declare namespace audio { * Obtains the timestamp for audio frame that passed by system framework most recently. * The timestamp is not accurate because audio device latency is not considered very thoughtfully. * This method uses a promise to return the result. - * @returns { Promise } Promise used to return the audio timestamp based on the monotonic nanosecond system timer. + * @returns { Promise } Promise used to return the audio timestamp based on the monotonic nanosecond system timer. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioTime(): Promise; + getAudioTime(): Promise; /** * Obtains the timestamp in Unix epoch time (starts from January 1, 1970), in nanoseconds. - * @returns { number } The audio timestamp. + * @returns { long } The audio timestamp. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 10 */ /** * Obtains the timestamp for audio frame that passed by system framework most recently. * The timestamp is not accurate because audio device latency is not considered very thoughtfully. - * @returns { number } The audio timestamp based on the monotonic nanosecond system timer. + * @returns { long } The audio timestamp based on the monotonic nanosecond system timer. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getAudioTimeSync(): number; + getAudioTimeSync(): long; /** * Obtains the timestamp info. @@ -9417,7 +10055,8 @@ declare namespace audio { * @returns { Promise } The Promise used to return timestamp info. * @throws { BusinessError } 6800103 - Operation not permit at current state. * @syscap SystemCapability.Multimedia.Audio.Capturer - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioTimestampInfo(): Promise; @@ -9427,7 +10066,8 @@ declare namespace audio { * @returns { AudioTimestampInfo } The returned timestamp info. * @throws { BusinessError } 6800103 - Operation not permit at current state. * @syscap SystemCapability.Multimedia.Audio.Capturer - * @since 19 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getAudioTimestampInfoSync(): AudioTimestampInfo; @@ -9442,7 +10082,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(callback: AsyncCallback): void; /** @@ -9456,7 +10097,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): Promise; @@ -9471,7 +10113,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; /** @@ -9485,54 +10128,58 @@ declare namespace audio { * @returns { Promise } - Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; /** * Obtains a reasonable minimum buffer size in bytes for capturing. This method uses an asynchronous callback to * return the result. - * @param { AsyncCallback } callback - Callback used to return the buffer size. + * @param { AsyncCallback } callback - Callback used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 8 */ /** * Obtains a reasonable minimum buffer size in bytes for capturing. This method uses an asynchronous callback to * return the result. - * @param { AsyncCallback } callback - Callback used to return the buffer size. + * @param { AsyncCallback } callback - Callback used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getBufferSize(callback: AsyncCallback): void; + getBufferSize(callback: AsyncCallback): void; /** * Obtains a reasonable minimum buffer size in bytes for capturing. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the buffer size. + * @returns { Promise } Promise used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 8 */ /** * Obtains a reasonable minimum buffer size in bytes for capturing. This method uses a promise to return the result. - * @returns { Promise } Promise used to return the buffer size. + * @returns { Promise } Promise used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getBufferSize(): Promise; + getBufferSize(): Promise; /** * Obtains a reasonable minimum buffer size in bytes for capturing. - * @returns { number } Promise used to return the buffer size. + * @returns { long } Promise used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 10 */ /** * Obtains a reasonable minimum buffer size in bytes for capturing. - * @returns { number } Promise used to return the buffer size. + * @returns { long } Promise used to return the buffer size. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getBufferSizeSync(): number; + getBufferSizeSync(): long; /** * Gets the input device or devices for this stream. @@ -9545,7 +10192,8 @@ declare namespace audio { * @returns { AudioDeviceDescriptors } Descriptors of input devices. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentInputDevices(): AudioDeviceDescriptors; @@ -9560,25 +10208,28 @@ declare namespace audio { * @returns { AudioCapturerChangeInfo } Full capture info. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentAudioCapturerChangeInfo(): AudioCapturerChangeInfo; /** * Gets overflow count. - * @returns { Promise } - Promise used to return the result. + * @returns { Promise } - Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Capturer - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getOverflowCount(): Promise + getOverflowCount(): Promise /** * Gets overflow count. - * @returns { number } Overflow count number. + * @returns { long } Overflow count number. * @syscap SystemCapability.Multimedia.Audio.Capturer - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getOverflowCountSync(): number; + getOverflowCountSync(): long; /** * Set if capturer want to be muted instead of interrupted. should be set before start @@ -9595,8 +10246,8 @@ declare namespace audio { * Subscribes to mark reached events. When the number of frames captured reaches the value of the frame parameter, * the callback is invoked. * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. - * @param { number } frame - Number of frames to trigger the event. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Number of frames to trigger the event. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 8 */ @@ -9604,13 +10255,14 @@ declare namespace audio { * Subscribes to mark reached events. When the number of frames captured reaches the value of the frame parameter, * the callback is invoked. * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. - * @param { number } frame - Number of frames to trigger the event. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Number of frames to trigger the event. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'markReach', frame: number, callback: Callback): void; + on(type: 'markReach', frame: long, callback: Callback): void; /** * Unsubscribes from the mark reached events. * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. @@ -9627,19 +10279,20 @@ declare namespace audio { /** * Unsubscribes from the mark reached events. * @param { 'markReach' } type - Type of the event to listen for. Only the markReach event is supported. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'markReach', callback?: Callback): void; + off(type: 'markReach', callback?: Callback): void; /** * Subscribes to period reached events. When the period of frame capturing reaches the value of frame parameter, * the callback is invoked. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. - * @param { number } frame - Period during which frame capturing is listened. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Period during which frame capturing is listened. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Capturer * @since 8 */ @@ -9647,13 +10300,14 @@ declare namespace audio { * Subscribes to period reached events. When the period of frame capturing reaches the value of frame parameter, * the callback is invoked. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. - * @param { number } frame - Period during which frame capturing is listened. The value must be greater than 0. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { long } frame - Period during which frame capturing is listened. The value must be greater than 0. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'periodReach', frame: number, callback: Callback): void; + on(type: 'periodReach', frame: long, callback: Callback): void; /** * Unsubscribes from period reached events. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. @@ -9670,12 +10324,13 @@ declare namespace audio { /** * Unsubscribes from period reached events. * @param { 'periodReach' } type - Type of the event to listen for. Only the periodReach event is supported. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'periodReach', callback?: Callback): void; + off(type: 'periodReach', callback?: Callback): void; /** * Subscribes audio state change event callback. @@ -9690,7 +10345,8 @@ declare namespace audio { * @param { Callback } callback - Callback used to listen for the audio state change event. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'stateChange', callback: Callback): void; @@ -9700,7 +10356,8 @@ declare namespace audio { * @param { Callback } callback - Callback used to listen for the audio state change event. * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Capturer - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'stateChange', callback?: Callback): void; @@ -9727,7 +10384,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioInterrupt', callback: Callback): void; @@ -9750,7 +10408,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Interrupt * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'audioInterrupt'): void; @@ -9777,7 +10436,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'inputDeviceChange', callback: Callback): void; /** @@ -9801,7 +10461,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Device * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'inputDeviceChange', callback?: Callback): void; @@ -9828,7 +10489,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioCapturerChange', callback: Callback): void; /** @@ -9852,7 +10514,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'audioCapturerChange', callback?: Callback): void; @@ -9879,7 +10542,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'readData', callback: Callback): void; @@ -9904,7 +10568,8 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'readData', callback?: Callback): void; @@ -9926,169 +10591,191 @@ declare namespace audio { /** * ASR noise suppression mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AsrNoiseSuppressionMode { /** * Bypass noise suppression. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BYPASS = 0, /** * Standard noise suppression. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 1, /** * Near field noise suppression. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NEAR_FIELD = 2, /** * Far field noise suppression. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FAR_FIELD = 3, } /** * ASR AEC mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AsrAecMode { /** * Bypass AEC. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BYPASS = 0, /** * Using standard AEC. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 1, } /** * ASR voice control mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AsrVoiceControlMode { /** * Send output stream to TX. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_2_VOICE_TX = 0, /** * Send both output stream and MIC input to TX. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_MIX_2_VOICE_TX = 1, /** * Based on the AUDIO_2_VOICE_TX, Send output stream to voice call record. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_2_VOICE_TX_EX = 2, /** * Based on the AUDIO_MIX_2_VOICE_TX, Send output stream to voice call record. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_MIX_2_VOICE_TX_EX = 3, } /** * ASR voice mute mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AsrVoiceMuteMode { /** * Mute the local output stream. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OUTPUT_MUTE = 0, /** * Mute the local MIC input stream. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ INPUT_MUTE = 1, /** * Send tts output stream to TX and mute the local output stream. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TTS_MUTE = 2, /** * Mute the voice call stream. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 - */ + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ CALL_MUTE = 3, /** * Based on the OUTPUT_MUTE, send output stream to voice call record. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OUTPUT_MUTE_EX = 4, } /** * ASR whisper detection mode. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AsrWhisperDetectionMode { /** * No operation. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BYPASS = 0, /** * Use standard whisper detection model. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 1, } @@ -10098,7 +10785,8 @@ declare namespace audio { * @typedef AsrProcessingController * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AsrProcessingController { /** @@ -10113,7 +10801,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAsrAecMode(mode: AsrAecMode): boolean; @@ -10124,7 +10813,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAsrAecMode(): AsrAecMode; @@ -10140,7 +10830,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAsrNoiseSuppressionMode(mode: AsrNoiseSuppressionMode): boolean; @@ -10151,7 +10842,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAsrNoiseSuppressionMode(): AsrNoiseSuppressionMode; @@ -10162,7 +10854,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isWhispering(): boolean; @@ -10179,7 +10872,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAsrVoiceControlMode(mode: AsrVoiceControlMode, enable: boolean): boolean; @@ -10196,7 +10890,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAsrVoiceMuteMode(mode: AsrVoiceMuteMode, enable: boolean): boolean; @@ -10212,7 +10907,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAsrWhisperDetectionMode(mode: AsrWhisperDetectionMode): boolean; @@ -10223,7 +10919,8 @@ declare namespace audio { * @throws { BusinessError } 6800104 - Operation not allowed. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAsrWhisperDetectionMode(): AsrWhisperDetectionMode; } @@ -10243,212 +10940,242 @@ declare namespace audio { * is already released. * @syscap SystemCapability.Multimedia.Audio.Capturer * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createAsrProcessingController(audioCapturer: AudioCapturer): AsrProcessingController; /** * Enumerates tone types for player. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ enum ToneType { /** * Dial tone for key 0. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_0 = 0, /** * Dial tone for key 1. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_1 = 1, /** * Dial tone for key 2. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_2 = 2, /** * Dial tone for key 3. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_3 = 3, /** * Dial tone for key 4. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_4 = 4, /** * Dial tone for key 5. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_5 = 5, /** * Dial tone for key 6. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_6 = 6, /** * Dial tone for key 7. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_7 = 7, /** * Dial tone for key 8. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_8 = 8, /** * Dial tone for key 9. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_9 = 9, /** * Dial tone for key *. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_S = 10, /** * Dial tone for key #. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_P = 11, /** * Dial tone for key A. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_A = 12, /** * Dial tone for key B. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_B = 13, /** * Dial tone for key C. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_C = 14, /** * Dial tone for key D. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_DIAL_D = 15, /** * Supervisory tone for dial. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_DIAL = 100, /** * Supervisory tone for busy. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_BUSY = 101, /** * Supervisory tone for dial. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_CONGESTION = 102, /** * Supervisory tone for radio path acknowledgment. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_RADIO_ACK = 103, /** * Supervisory tone for radio path not available. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_RADIO_NOT_AVAILABLE = 104, /** * Supervisory tone for call waiting. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_CALL_WAITING = 106, /** * Supervisory tone for ringtone. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_RINGTONE = 107, /** * Supervisory tone for call holding. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_SUPERVISORY_CALL_HOLDING = 108, /** * Proprietary tone for beep. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_PROPRIETARY_BEEP = 200, /** * Proprietary tone for positive acknowledgment. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_PROPRIETARY_ACK = 201, /** * Proprietary tone for prompt. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_PROPRIETARY_PROMPT = 203, /** * Proprietary tone for double beep. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ TONE_TYPE_COMMON_PROPRIETARY_DOUBLE_BEEP = 204, } @@ -10458,7 +11185,8 @@ declare namespace audio { * @typedef TonePlayer * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface TonePlayer { /** @@ -10467,7 +11195,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ load(type: ToneType, callback: AsyncCallback): void; /** @@ -10476,7 +11205,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ load(type: ToneType): Promise; @@ -10485,7 +11215,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ start(callback: AsyncCallback): void; /** @@ -10493,7 +11224,8 @@ declare namespace audio { * @returns { Promise }Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ start(): Promise; @@ -10502,7 +11234,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ stop(callback: AsyncCallback): void; /** @@ -10510,7 +11243,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): Promise; @@ -10519,7 +11253,8 @@ declare namespace audio { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; /** @@ -10527,7 +11262,8 @@ declare namespace audio { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Audio.Tone * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; } @@ -10536,22 +11272,24 @@ declare namespace audio { * Array of AudioEffectMode, which is read-only. * @typedef { Array> } AudioEffectInfoArray * @syscap SystemCapability.Multimedia.Audio.Renderer - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ type AudioEffectInfoArray = Array>; /** * Describes an audio effect mode group. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @since 10 */ /** * Describes an audio effect mode group. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Renderer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioEffectMode { /** @@ -10560,10 +11298,11 @@ declare namespace audio { * @since 10 */ /** - * Audio Effect Mode effect none. This effect mode will disable audio effect process for current audio renderer. + * Audio Effect Mode effect none. * @syscap SystemCapability.Multimedia.Audio.Renderer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EFFECT_NONE = 0, /** @@ -10575,7 +11314,8 @@ declare namespace audio { * Audio Effect Mode effect default. * @syscap SystemCapability.Multimedia.Audio.Renderer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EFFECT_DEFAULT = 1, } @@ -10585,7 +11325,8 @@ declare namespace audio { * @typedef AudioSpatialDeviceState * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioSpatialDeviceState { /** @@ -10593,7 +11334,8 @@ declare namespace audio { * @type { string } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ address: string; @@ -10602,7 +11344,8 @@ declare namespace audio { * @type { boolean } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isSpatializationSupported: boolean; @@ -10611,7 +11354,8 @@ declare namespace audio { * @type { boolean } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isHeadTrackingSupported: boolean; @@ -10620,97 +11364,110 @@ declare namespace audio { * @type { AudioSpatialDeviceType } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ spatialDeviceType: AudioSpatialDeviceType; } /** * Describes a spatial device type group. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioSpatialDeviceType { /** * Audio Spatial Device Type none. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SPATIAL_DEVICE_TYPE_NONE = 0, /** * Audio Spatial Device Type in-ear headphone. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SPATIAL_DEVICE_TYPE_IN_EAR_HEADPHONE = 1, /** * Audio Spatial Device Type half-in-ear headphone. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SPATIAL_DEVICE_TYPE_HALF_IN_EAR_HEADPHONE = 2, /** * Audio Spatial Device Type over-ear headphone. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SPATIAL_DEVICE_TYPE_OVER_EAR_HEADPHONE = 3, /** * Audio Spatial Device Type glasses. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SPATIAL_DEVICE_TYPE_GLASSES = 4, /** * Audio Spatial Device Type others. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SPATIAL_DEVICE_TYPE_OTHERS = 5, } /** * Describes a spatialization scene type group. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioSpatializationSceneType { /** * Audio Spatialization Scene Type Default. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEFAULT = 0, /** * Audio Spatialization Scene Type Music. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MUSIC = 1, /** * Audio Spatialization Scene Type Movie. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MOVIE = 2, /** * Audio Spatialization Scene Type Audio Book. * @syscap SystemCapability.Multimedia.Audio.Spatialization * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIOBOOK = 3, } @@ -10718,17 +11475,18 @@ declare namespace audio { /** * Audio AudioChannel Layout * A 64-bit integer indicates that the appearance and order of the speakers for recording or playback. - * @enum { number } + * @enum { long } * @syscap SystemCapability.Multimedia.Audio.Core * @since 11 */ /** * Audio AudioChannel Layout * A 64-bit integer indicates that the appearance and order of the speakers for recording or playback. - * @enum { number } + * @enum { long } * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioChannelLayout { /** @@ -10740,7 +11498,8 @@ declare namespace audio { * Unknown Channel Layout * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_UNKNOWN = 0x0, /** @@ -10754,7 +11513,8 @@ declare namespace audio { * Speaker layout: front center(FC) * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_MONO = 0x4, /** @@ -10768,14 +11528,16 @@ declare namespace audio { * Speaker layout: front left(FL), front right(FR) * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_STEREO = 0x3, /** * Channel Layout For Stereo-Downmix, 2 channels in total * Speaker layout: Stereo left, stereo right * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_STEREO_DOWNMIX = 0x60000000, /** @@ -10789,7 +11551,8 @@ declare namespace audio { * Speaker layout: Stereo plus low-frequency effects(LFE) * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_2POINT1 = 0xB, /** @@ -10803,7 +11566,8 @@ declare namespace audio { * Speaker layout: Stereo plus back center(BC) * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_3POINT0 = 0x103, /** @@ -10817,7 +11581,8 @@ declare namespace audio { * Speaker layout: Stereo plus FC * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_SURROUND = 0x7, /** @@ -10831,7 +11596,8 @@ declare namespace audio { * Speaker layout: Surround plus LFE * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_3POINT1 = 0xF, /** @@ -10845,7 +11611,8 @@ declare namespace audio { * Speaker layout: Surround plus BC * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_4POINT0 = 0x107, /** @@ -10859,14 +11626,16 @@ declare namespace audio { * Speaker layout: Stereo plus left and right back speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_QUAD = 0x33, /** * Channel Layout For Quad-Side, 4 channels in total * Speaker layout: Stereo plus left and right side speakers(SL, SR) * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_QUAD_SIDE = 0x603, /** @@ -10880,28 +11649,32 @@ declare namespace audio { * Speaker layout: Stereo plus left and right top side speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_2POINT0POINT2 = 0x3000000003, /** * Channel Layout For ORDER1-ACN-N3D First Order Ambisonic(FOA), 4 channels in total * First order, Ambisonic Channel Number(ACN) format, Normalization of three-D(N3D) * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER1_ACN_N3D = 0x100000000001, /** * Channel Layout For ORDER1-ACN-SN3D FOA, 4 channels in total * First order, ACN format, Semi-Normalization of three-D(SN3D) * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER1_ACN_SN3D = 0x100000001001, /** * Channel Layout For ORDER1-FUMA FOA, 4 channels in total * First order, Furse-Malham(FuMa) format * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER1_FUMA = 0x100000000101, /** @@ -10915,7 +11688,8 @@ declare namespace audio { * Speaker layout: 4.0 plus LFE * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_4POINT1 = 0x10F, /** @@ -10929,28 +11703,32 @@ declare namespace audio { * Speaker layout: Surround plus two side speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_5POINT0 = 0x607, /** * Channel Layout For 5.0-Back, 5 channels in total * Speaker layout: Surround plus two back speakers * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_5POINT0_BACK = 0x37, /** * Channel Layout For 2.1.2, 5 channels in total * Speaker layout: 2.0.2 plus LFE * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_2POINT1POINT2 = 0x300000000B, /** * Channel Layout For 3.0.2, 5 channels in total * Speaker layout: 2.0.2 plus FC * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_3POINT0POINT2 = 0x3000000007, /** @@ -10964,14 +11742,16 @@ declare namespace audio { * Speaker layout: 5.0 plus LFE * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_5POINT1 = 0x60F, /** * Channel Layout For 5.1-Back, 6 channels in total * Speaker layout: 5.0-Back plus LFE * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_5POINT1_BACK = 0x3F, /** @@ -10985,7 +11765,8 @@ declare namespace audio { * Speaker layout: 5.0 plus BC * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_6POINT0 = 0x707, /** @@ -10999,21 +11780,24 @@ declare namespace audio { * Speaker layout: 5.0-Back plus BC * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_HEXAGONAL = 0x137, /** * Channel Layout For 3.1.2, 6 channels in total * Speaker layout: 3.1 plus two top front speakers(TFL, TFR) * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_3POINT1POINT2 = 0x500F, /** * Channel Layout For 6.0-Front, 6 channels in total * Speaker layout: Quad-Side plus left and right front center speakers(FLC, FRC) * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_6POINT0_FRONT = 0x6C3, /** @@ -11027,21 +11811,24 @@ declare namespace audio { * Speaker layout: 5.1 plus BC * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_6POINT1 = 0x70F, /** * Channel Layout For 6.1-Back, 7 channels in total * Speaker layout: 5.1-Back plus BC * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_6POINT1_BACK = 0x13F, /** * Channel Layout For 6.1-Front, 7 channels in total * Speaker layout: 6.0-Front plus LFE * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_6POINT1_FRONT = 0x6CB, /** @@ -11055,7 +11842,8 @@ declare namespace audio { * Speaker layout: 5.0 plus two back speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_7POINT0 = 0x637, /** @@ -11069,7 +11857,8 @@ declare namespace audio { * Speaker layout: 5.0 plus left and right front center speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_7POINT0_FRONT = 0x6C7, /** @@ -11083,7 +11872,8 @@ declare namespace audio { * Speaker layout: 5.1 plus two back speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_7POINT1 = 0x63F, /** @@ -11097,7 +11887,8 @@ declare namespace audio { * Speaker layout: 5.0 plus BL, BR and BC. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_OCTAGONAL = 0x737, /** @@ -11111,42 +11902,48 @@ declare namespace audio { * Speaker layout: 5.1 plus two top side speakers. * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_5POINT1POINT2 = 0x300000060F, /** * Channel Layout For 7.1-Wide, 8 channels in total * Speaker layout: 5.1 plus left and right front center speakers. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_7POINT1_WIDE = 0x6CF, /** * Channel Layout For 7.1-Wide, 8 channels in total * Speaker layout: 5.1-Back plus left and right front center speakers. * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_7POINT1_WIDE_BACK = 0xFF, /** * Channel Layout For ORDER2-ACN-N3D Higher Order Ambisonics(HOA), 9 channels in total * Second order, ACN format, N3D * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER2_ACN_N3D = 0x100000000002, /** * Channel Layout For ORDER2-ACN-SN3D HOA, 9 channels in total * Second order, ACN format, SN3D * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER2_ACN_SN3D = 0x100000001002, /** * Channel Layout For ORDER2-FUMA HOA, 9 channels in total * Second order, FuMa format * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER2_FUMA = 0x100000000102, /** @@ -11160,7 +11957,8 @@ declare namespace audio { * Speaker layout: 5.1 plus four top speakers(TFL, TFR, TBL, TBR) * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_5POINT1POINT4 = 0x2D60F, /** @@ -11174,7 +11972,8 @@ declare namespace audio { * Speaker layout: 7.1 plus two top side speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_7POINT1POINT2 = 0x300000063F, /** @@ -11188,7 +11987,8 @@ declare namespace audio { * Speaker layout: 7.1 plus four top speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_7POINT1POINT4 = 0x2D63F, /** @@ -11202,14 +12002,16 @@ declare namespace audio { * Speaker layout: FL, FR, FC, TFL, TFR, BL, BR, BC, SL, SR, wide left(WL), and wide right(WR) * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_10POINT2 = 0x180005737, /** * Channel Layout For 9.1.4, 14 channels in total * Speaker layout: 7.1.4 plus two wide speakers(WL, WR) * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_9POINT1POINT4 = 0x18002D63F, /** @@ -11223,7 +12025,8 @@ declare namespace audio { * Speaker layout: 9.1.4 plus two top side speakers * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_9POINT1POINT6 = 0x318002D63F, /** @@ -11237,7 +12040,8 @@ declare namespace audio { * Speaker layout: Octagonal plus two wide speakers, six top speakers(TFL, TFR, TFC, TBL, TBR, TBC) * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_HEXADECAGONAL = 0x18003F737, /** @@ -11251,7 +12055,8 @@ declare namespace audio { * Third order, ACN format, N3D * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER3_ACN_N3D = 0x100000000003, /** @@ -11265,31 +12070,35 @@ declare namespace audio { * Third order, ACN format, N3D * @syscap SystemCapability.Multimedia.Audio.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER3_ACN_SN3D = 0x100000001003, /** * Channel Layout For ORDER3-FUMA HOA, 16 channels in total * Third order, FuMa format * @syscap SystemCapability.Multimedia.Audio.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CH_LAYOUT_AMB_ORDER3_FUMA = 0x100000000103 } /** * Enumerates audio effect flags. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enum EffectFlag { /** * Audio render effect. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ RENDER_EFFECT_FLAG = 0, @@ -11297,7 +12106,8 @@ declare namespace audio { * Audio capture effect. * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CAPTURE_EFFECT_FLAG = 1 } @@ -11307,7 +12117,8 @@ declare namespace audio { * @typedef AudioEffectProperty * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioEffectProperty { /** @@ -11315,7 +12126,8 @@ declare namespace audio { * @type { string } * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -11324,7 +12136,8 @@ declare namespace audio { * @type { string } * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ category: string; @@ -11333,7 +12146,8 @@ declare namespace audio { * @type { EffectFlag } * @syscap SystemCapability.Multimedia.Audio.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ flag: EffectFlag; } diff --git a/api/@ohos.multimedia.audioHaptic.d.ts b/api/@ohos.multimedia.audioHaptic.d.ts index 7e44f87dda65a9ac95084908c3e8dfa6ef11ea6b..429f0fd4666689554f7940513bdcb1bf406bbb45 100644 --- a/api/@ohos.multimedia.audioHaptic.d.ts +++ b/api/@ohos.multimedia.audioHaptic.d.ts @@ -26,28 +26,32 @@ import type audio from './@ohos.multimedia.audio'; * * @namespace audioHaptic * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace audioHaptic { /** * Obtains an {@link AudioHapticManager} instance. This object is singleton in one process. * @returns { AudioHapticManager } AudioHapticManager instance. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function getAudioHapticManager(): AudioHapticManager; /** * Audio Latency mode. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioLatencyMode { /** * Normal audio mode. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_LATENCY_MODE_NORMAL = 0, @@ -55,7 +59,8 @@ declare namespace audioHaptic { * Low latency mode. This mode should be used when duration of the audio source is short. If duration of the audio * source is long, it may be truncated. This behavior is the same with sound pool. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_LATENCY_MODE_FAST = 1 } @@ -64,14 +69,16 @@ declare namespace audioHaptic { * Audio haptic player options object. * @typedef AudioHapticPlayerOptions * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioHapticPlayerOptions { /** * Mute audio. * @type {?boolean} * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ muteAudio?: boolean; @@ -79,7 +86,8 @@ declare namespace audioHaptic { * Mute haptics. * @type {?boolean} * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ muteHaptics?: boolean; } @@ -88,7 +96,8 @@ declare namespace audioHaptic { * Audio haptic manager object. * @typedef AudioHapticManager * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioHapticManager { /** @@ -96,43 +105,46 @@ declare namespace audioHaptic { * source, it will returns the source id. This method uses a promise to return the source id. * @param { string } audioUri - Audio file uri. * @param { string } hapticUri - Haptic file uri. - * @returns { Promise } Promise used to return the source id. + * @returns { Promise } Promise used to return the source id. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - registerSource(audioUri: string, hapticUri: string): Promise; + registerSource(audioUri: string, hapticUri: string): Promise; /** * Unregister source. This method uses a promise to return the result. - * @param { number } id source id. + * @param { int } id source id. * @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. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - unregisterSource(id: number): Promise; + unregisterSource(id: int): Promise; /** * Set the audio latency mode of one source. - * @param { number } id - Source id. + * @param { int } id - Source id. * @param { AudioLatencyMode } latencyMode - Audio latency mode. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; * 2.Incorrect parameter types. * @throws { BusinessError } 5400102 - Operation not allowed. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - setAudioLatencyMode(id:number, latencyMode: AudioLatencyMode): void; + setAudioLatencyMode(id:int, latencyMode: AudioLatencyMode): void; /** * Set the stream usage of one source. - * @param { number } id - Source id. + * @param { int } id - Source id. * @param { audio.StreamUsage } usage - Stream usage. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; @@ -140,15 +152,16 @@ declare namespace audioHaptic { * 3.Parameter verification failed. * @throws { BusinessError } 5400102 - Operation not allowed. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - setStreamUsage(id: number, usage: audio.StreamUsage): void; + setStreamUsage(id: int, usage: audio.StreamUsage): void; /** * Create an audio haptic player. This method uses a promise to return the result. If haptics is needed, caller * should have the permission of ohos.permission.VIBRATE. * @permission ohos.permission.VIBRATE - * @param { number } id - Source id. + * @param { int } id - Source id. * @param { AudioHapticPlayerOptions } options - Options when creating audio haptic player. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 201 - Permission denied. @@ -159,9 +172,10 @@ declare namespace audioHaptic { * @throws { BusinessError } 5400103 - I/O error. * @throws { BusinessError } 5400106 - Unsupport format. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - createPlayer(id: number, options?: AudioHapticPlayerOptions): Promise; + createPlayer(id: int, options?: AudioHapticPlayerOptions): Promise; /** * Register audio and haptic file represented by fd into manager. Audio and haptic works are paired while playing. @@ -177,22 +191,25 @@ declare namespace audioHaptic { /** * Type of audio haptic. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioHapticType { /** * Audio. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_HAPTIC_TYPE_AUDIO = 0, /** * Haptic. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_HAPTIC_TYPE_HAPTIC = 1, } @@ -236,7 +253,8 @@ declare namespace audioHaptic { * Audio haptic player object. * @typedef AudioHapticPlayer * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface AudioHapticPlayer { /** @@ -247,7 +265,8 @@ declare namespace audioHaptic { * 1.Mandatory parameters are left unspecified; * 2.Parameter verification failed. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isMuted(type: AudioHapticType): boolean; @@ -258,7 +277,8 @@ declare namespace audioHaptic { * @throws { BusinessError } 5400103 - IO error. * @throws { BusinessError } 5400105 - Service died. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ start(): Promise; @@ -268,7 +288,8 @@ declare namespace audioHaptic { * @throws { BusinessError } 5400102 - Operate not permit. * @throws { BusinessError } 5400105 - Service died. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): Promise; @@ -277,7 +298,8 @@ declare namespace audioHaptic { * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 5400105 - Service died. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; @@ -286,7 +308,8 @@ declare namespace audioHaptic { * @param { 'endOfStream' } type - Type of the playback event to listen for. * @param { Callback } callback - Callback used to listen for the playback end of stream. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'endOfStream', callback: Callback): void; @@ -295,7 +318,8 @@ declare namespace audioHaptic { * @param { 'endOfStream' } type - Type of the playback event to listen for. * @param { Callback } callback - Callback used to listen for the playback end of stream. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'endOfStream', callback?: Callback): void; @@ -304,7 +328,8 @@ declare namespace audioHaptic { * @param { 'audioInterrupt' } type - Type of the playback event to listen for. * @param { Callback } callback - Callback used to listen for audio interrupt info. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioInterrupt', callback: Callback): void; @@ -313,7 +338,8 @@ declare namespace audioHaptic { * @param { 'audioInterrupt' } type - Type of the playback event to listen for. * @param { Callback } callback - Callback used to listen for audio interrupt info. * @syscap SystemCapability.Multimedia.AudioHaptic.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'audioInterrupt', callback?: Callback): void; diff --git a/api/@ohos.multimedia.avCastPickerParam.d.ts b/api/@ohos.multimedia.avCastPickerParam.d.ts index a98cb428214a67662a4b1f3e3950546f49e48549..bcfcb7f8f96aa4794026b15963053c975c865a05 100644 --- a/api/@ohos.multimedia.avCastPickerParam.d.ts +++ b/api/@ohos.multimedia.avCastPickerParam.d.ts @@ -20,16 +20,17 @@ /** * Definition of av cast picker state - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 */ /** * Definition of av cast picker state - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum AVCastPickerState { /** @@ -41,7 +42,8 @@ export declare enum AVCastPickerState { * The picker starts showing. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_APPEARING, @@ -54,24 +56,27 @@ export declare enum AVCastPickerState { * The picker finishes presenting. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_DISAPPEARING, } /** * Definition of av cast picker style - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum AVCastPickerStyle { /** * The picker shows in a panel style. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STYLE_PANEL, @@ -79,24 +84,27 @@ export declare enum AVCastPickerStyle { * The picker shows in a menu style. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STYLE_MENU, } /** * Definition of color mode of picker - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum AVCastPickerColorMode { /** * Auto mode which follows the definition of system. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO, @@ -104,7 +112,8 @@ export declare enum AVCastPickerColorMode { * Dark mode. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DARK, @@ -112,7 +121,8 @@ export declare enum AVCastPickerColorMode { * Light mode. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LIGHT, } \ No newline at end of file diff --git a/api/@ohos.multimedia.avsession.d.ts b/api/@ohos.multimedia.avsession.d.ts index be9a29d35a61545825242968a2f56afc36d408cb..ca5567f6ec513fd1eb3d6d682fca86a51be2ec7c 100644 --- a/api/@ohos.multimedia.avsession.d.ts +++ b/api/@ohos.multimedia.avsession.d.ts @@ -19,7 +19,7 @@ */ import type { ErrorCallback, AsyncCallback, Callback } from './@ohos.base'; -import { WantAgent } from './@ohos.wantAgent'; +import { WantAgent } from './@ohos.app.ability.wantAgent'; import { KeyEvent } from './@ohos.multimodalInput.keyEvent'; import { ElementName } from './bundleManager/ElementName'; import image from './@ohos.multimedia.image'; @@ -38,7 +38,8 @@ import type hdrCapability from './@ohos.graphics.hdrCapability'; * @namespace avSession * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace avSession { @@ -52,7 +53,8 @@ declare namespace avSession { * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback): void; @@ -79,7 +81,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createAVSession(context: Context, tag: string, type: AVSessionType): Promise; @@ -92,7 +95,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function getAllSessionDescriptors(callback: AsyncCallback>>): void; @@ -105,14 +109,15 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function getAllSessionDescriptors(): Promise>>; /** * Get history avsession records. These sessions have been destroyed. * @permission ohos.permission.MANAGE_MEDIA_RESOURCES - * @param { number } maxSize - Specifies the maximum size of the returned value array. + * @param { int } maxSize - Specifies the maximum size of the returned value array. * @param { AsyncCallback>> } callback - async callback for an array of AVSessionDescriptors. * If provided '0' or not provided, the maximum value is determined by the system. * @throws { BusinessError } 201 - permission denied @@ -122,14 +127,15 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi Hide this for inner system use - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - function getHistoricalSessionDescriptors(maxSize: number, callback: AsyncCallback>>): void; + function getHistoricalSessionDescriptors(maxSize: int, callback: AsyncCallback>>): void; /** * Get history avsession records. These sessions have been destroyed. * @permission ohos.permission.MANAGE_MEDIA_RESOURCES - * @param { number } maxSize - Specifies the maximum size of the returned value array. + * @param { int } maxSize - Specifies the maximum size of the returned value array. * If provided '0' or not provided, the maximum value is determined by the system. * @returns { Promise>> } Promise for an array of AVSessionDescriptors * @throws { BusinessError } 201 - permission denied @@ -139,15 +145,16 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi Hide this for inner system use - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - function getHistoricalSessionDescriptors(maxSize?: number): Promise>>; + function getHistoricalSessionDescriptors(maxSize?: int): Promise>>; /** * Get history play list information records. * @permission ohos.permission.MANAGE_MEDIA_RESOURCES - * @param { number } maxSize - Specifies the maximum size of the returned value array. - * @param { number } maxAppSize - Specifies the maximum app size of the returned value array. + * @param { int } maxSize - Specifies the maximum size of the returned value array. + * @param { int } maxAppSize - Specifies the maximum app size of the returned value array. * @param { AsyncCallback>> } callback - async callback for an array of AVQueueInfo. * If provided '0' or not provided, the maximum value is determined by the system. * @throws { BusinessError } 201 - permission denied @@ -157,24 +164,26 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi Hide this for inner system use - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - function getHistoricalAVQueueInfos(maxSize: number, maxAppSize: number, callback: AsyncCallback>>): void; + function getHistoricalAVQueueInfos(maxSize: int, maxAppSize: int, callback: AsyncCallback>>): void; /** * Get history play list information records. * @permission ohos.permission.MANAGE_MEDIA_RESOURCES - * @param { number } maxSize - Specifies the maximum size of the returned value array. - * @param { number } maxAppSize - Specifies the maximum app size of the returned value array. + * @param { int } maxSize - Specifies the maximum size of the returned value array. + * @param { int } maxAppSize - Specifies the maximum app size of the returned value array. * @returns { Promise>> } Promise for an array of AVQueueInfo * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi Hide this for inner system use - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - function getHistoricalAVQueueInfos(maxSize: number, maxAppSize: number): Promise>>; + function getHistoricalAVQueueInfos(maxSize: int, maxAppSize: int): Promise>>; /** * Create an avsession controller @@ -190,7 +199,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function createController(sessionId: string, callback: AsyncCallback): void; @@ -208,7 +218,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function createController(sessionId: string): Promise; @@ -228,7 +239,8 @@ declare namespace avSession { * @throws { BusinessError } 6600104 - The remote session connection failed. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function castAudio(session: SessionToken | 'all', audioDevices: Array, callback: AsyncCallback): void; @@ -248,7 +260,8 @@ declare namespace avSession { * @throws { BusinessError } 6600104 - The remote session connection failed. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function castAudio(session: SessionToken | 'all', audioDevices: Array): Promise; @@ -265,7 +278,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function startAVPlayback(bundleName: string, assetId: string): Promise; @@ -280,7 +294,8 @@ declare namespace avSession { * @throws { BusinessError } 6600109 - The remote connection is not established. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function getDistributedSessionController(distributedSessionType: DistributedSessionType): Promise>; @@ -289,7 +304,8 @@ declare namespace avSession { * @typedef SessionToken * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface SessionToken { /** @@ -298,31 +314,33 @@ declare namespace avSession { * @type { string } * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ sessionId: string; /** * Process id of session * @permission ohos.permission.MANAGE_MEDIA_RESOURCES - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - pid?: number; + pid?: long; /** * User id * @permission ohos.permission.MANAGE_MEDIA_RESOURCES - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - uid?: number; + uid?: long; } - /** * Register session create callback * @param { 'sessionCreate' } type - Registration Type, 'sessionCreate' @@ -333,7 +351,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'sessionCreate', callback: (session: AVSessionDescriptor) => void): void; @@ -347,7 +366,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'sessionDestroy', callback: (session: AVSessionDescriptor) => void): void; @@ -361,7 +381,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'topSessionChange', callback: (session: AVSessionDescriptor) => void): void; @@ -375,7 +396,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'sessionCreate', callback?: (session: AVSessionDescriptor) => void): void; @@ -389,7 +411,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'sessionDestroy', callback?: (session: AVSessionDescriptor) => void): void; @@ -403,7 +426,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'topSessionChange', callback?: (session: AVSessionDescriptor) => void): void; @@ -417,7 +441,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'sessionServiceDie', callback: () => void): void; @@ -431,7 +456,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Core * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'sessionServiceDie', callback?: () => void): void; @@ -444,7 +470,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'distributedSessionChange', distributedSessionType: DistributedSessionType, callback: Callback>): void; @@ -457,7 +484,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'distributedSessionChange', distributedSessionType: DistributedSessionType, callback?: Callback>): void; @@ -474,7 +502,8 @@ declare namespace avSession { * @throws { BusinessError } 6600105 - Invalid session command. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function sendSystemAVKeyEvent(event: KeyEvent, callback: AsyncCallback): void; @@ -491,7 +520,8 @@ declare namespace avSession { * @throws { BusinessError } 6600105 - Invalid session command. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function sendSystemAVKeyEvent(event: KeyEvent): Promise; @@ -509,7 +539,8 @@ declare namespace avSession { * @throws { BusinessError } 6600107 - Too many commands or events. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function sendSystemControlCommand(command: AVControlCommand, callback: AsyncCallback): void; @@ -527,36 +558,39 @@ declare namespace avSession { * @throws { BusinessError } 6600107 - Too many commands or events. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function sendSystemControlCommand(command: AVControlCommand): Promise; /** * Define different protocol capability - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 */ /** * Define different protocol capability - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum ProtocolType { /** - * The default cast type "local", media can be routed on the same device, + * The default cast type "local", media can be routed on the same device, * including internal speakers or audio jack on the device itself, A2DP devices. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 */ /** - * The default cast type "local", media can be routed on the same device, + * The default cast type "local", media can be routed on the same device, * including internal speakers or audio jack on the device itself, A2DP devices. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_LOCAL = 0, @@ -564,7 +598,8 @@ declare namespace avSession { * Cast+ mirror capability * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_CAST_PLUS_MIRROR = 1, @@ -579,7 +614,8 @@ declare namespace avSession { * the application need get an AVCastController to control remote playback. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_CAST_PLUS_STREAM = 2, @@ -588,7 +624,8 @@ declare namespace avSession { * the application needs to get an AVCastController to control remote playback. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_DLNA = 4, @@ -603,17 +640,19 @@ declare namespace avSession { /** * Define different distributed session type - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enum DistributedSessionType { /** * Remote session sensed from remote device. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_SESSION_REMOTE = 0, @@ -621,7 +660,8 @@ declare namespace avSession { * Migrated session from remote device to this device. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_SESSION_MIGRATE_IN = 1, @@ -629,7 +669,8 @@ declare namespace avSession { * Migrated session from this device to remote device. * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TYPE_SESSION_MIGRATE_OUT = 2, } @@ -640,22 +681,24 @@ declare namespace avSession { * @throws { BusinessError } 202 - Not System App. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function startCastDeviceDiscovery(callback: AsyncCallback): void; /** * Start device discovery. - * @param { number } filter device filter when discovering, can be an union of {@link ProtocolType} + * @param { int } filter device filter when discovering, can be an union of {@link ProtocolType} * @param { AsyncCallback } callback a callback function * @throws { BusinessError } 202 - Not System App. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - function startCastDeviceDiscovery(filter: number, callback: AsyncCallback): void; + function startCastDeviceDiscovery(filter: int, callback: AsyncCallback): void; /** * Start device discovery. @@ -669,7 +712,7 @@ declare namespace avSession { */ /** * Start device discovery. - * @param { number } [filter] - device filter when discovering, can be an union of {@link ProtocolType} + * @param { int } [filter] - device filter when discovering, can be an union of {@link ProtocolType} * @param { Array } [drmSchemes] - filter drm-enabled devices which are represented by uuid. * It is effective when protocol type is TYPE_CAST_PLUS_STREAM. * @returns { Promise } Promise for the result @@ -678,9 +721,10 @@ declare namespace avSession { * 2.Incorrect parameter types. 3.Parameter verification failed. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - function startCastDeviceDiscovery(filter?: number, drmSchemes?: Array): Promise; + function startCastDeviceDiscovery(filter?: int, drmSchemes?: Array): Promise; /** * Stop device discovery. @@ -688,7 +732,8 @@ declare namespace avSession { * @throws { BusinessError } 202 - Not System App. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function stopCastDeviceDiscovery(callback: AsyncCallback): void; @@ -698,7 +743,8 @@ declare namespace avSession { * @throws { BusinessError } 202 - Not System App. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function stopCastDeviceDiscovery(): Promise; @@ -711,7 +757,8 @@ declare namespace avSession { * 2.Parameter verification failed. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function setDiscoverable(enable: boolean, callback: AsyncCallback): void; @@ -724,7 +771,8 @@ declare namespace avSession { * 2.Parameter verification failed. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function setDiscoverable(enable: boolean): Promise; @@ -737,7 +785,8 @@ declare namespace avSession { * 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'deviceAvailable', callback: (device: OutputDeviceInfo) => void): void; @@ -750,7 +799,8 @@ declare namespace avSession { * 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'deviceAvailable', callback?: (device: OutputDeviceInfo) => void): void; @@ -763,7 +813,8 @@ declare namespace avSession { * 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'deviceOffline', callback: (deviceId: string) => void): void; @@ -776,7 +827,8 @@ declare namespace avSession { * 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'deviceOffline', callback?: (deviceId: string) => void): void; @@ -794,7 +846,8 @@ declare namespace avSession { * @throws {BusinessError} 6600102 - session does not exist * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function getAVCastController(sessionId: string, callback: AsyncCallback): void; @@ -812,7 +865,8 @@ declare namespace avSession { * @throws {BusinessError} 6600102 - session does not exist * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function getAVCastController(sessionId: string): Promise; @@ -830,7 +884,8 @@ declare namespace avSession { * @throws {BusinessError} 6600108 - Device connecting failed * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function startCasting(session: SessionToken, device: OutputDeviceInfo, callback: AsyncCallback): void; @@ -848,7 +903,8 @@ declare namespace avSession { * @throws {BusinessError} 6600108 - Device connecting failed * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function startCasting(session: SessionToken, device: OutputDeviceInfo): Promise; @@ -862,7 +918,8 @@ declare namespace avSession { * @throws { BusinessError } 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function stopCasting(session: SessionToken, callback: AsyncCallback): void; @@ -876,7 +933,8 @@ declare namespace avSession { * @throws { BusinessError } 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function stopCasting(session: SessionToken): Promise; @@ -884,7 +942,7 @@ declare namespace avSession { * Begin to write device logs into a file descriptor for the purpose of problem locating. * If the logs exceed max file size, no logs will be written and DEVICE_LOG_FULL event will be omitted. * @param { string } url - The file descriptor to be written. - * @param { number } maxSize - The max size to be written in kilobyte. + * @param { int } maxSize - The max size to be written in kilobyte. * if not set, then written process will exit when there is no space to write. * @returns { Promise } Promise for the result * @throws { BusinessError } 202 - Not System App. @@ -894,9 +952,10 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - function startDeviceLogging(url: string, maxSize?: number): Promise; + function startDeviceLogging(url: string, maxSize?: int): Promise; /** * Stop the current device written even the discovery is ongoing. @@ -906,7 +965,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function stopDeviceLogging(): Promise; @@ -921,7 +981,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'deviceLogEvent', callback: Callback): void; @@ -936,32 +997,36 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'deviceLogEvent', callback?: Callback): void; /** * Enumerates device log event code. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enum DeviceLogEventCode { /** - * Log is full. - * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @systemapi - * @since 13 - */ + * Log is full. + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 + */ DEVICE_LOG_FULL = 1, /** - * Log is written with exception, such as the fd cannot be written and so on. - * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @systemapi - * @since 13 - */ + * Log is written with exception, such as the fd cannot be written and so on. + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 + */ DEVICE_LOG_EXCEPTION = 2, } @@ -1058,7 +1123,8 @@ declare namespace avSession { * @typedef { 'audio' | 'video' | 'voice_call' | 'video_call' } AVSessionType * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type AVSessionType = 'audio' | 'video' | 'voice_call' | 'video_call'; @@ -1073,7 +1139,8 @@ declare namespace avSession { * @interface AVSession * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVSession { /** @@ -1087,7 +1154,8 @@ declare namespace avSession { * @readonly * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly sessionId: string; @@ -1103,7 +1171,8 @@ declare namespace avSession { * @readonly * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly sessionType: AVSessionType; @@ -1117,7 +1186,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ setAVMetadata(data: AVMetadata, callback: AsyncCallback): void; @@ -1144,7 +1214,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAVMetadata(data: AVMetadata): Promise; @@ -1157,7 +1228,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setCallMetadata(data: CallMetadata, callback: AsyncCallback): void; @@ -1170,7 +1242,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setCallMetadata(data: CallMetadata): Promise; @@ -1183,7 +1256,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback): void; @@ -1208,7 +1282,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAVPlaybackState(state: AVPlaybackState): Promise; @@ -1221,7 +1296,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setAVCallState(state: AVCallState, callback: AsyncCallback): void; @@ -1234,7 +1310,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setAVCallState(state: AVCallState): Promise; @@ -1247,7 +1324,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ setLaunchAbility(ability: WantAgent, callback: AsyncCallback): void; @@ -1272,7 +1350,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setLaunchAbility(ability: WantAgent): Promise; @@ -1282,13 +1361,24 @@ declare namespace avSession { * @param { object } args - The parameters of session event * @param { AsyncCallback} callback - The asyncCallback triggered when the command is executed successfully * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. + * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ - dispatchSessionEvent(event: string, args: {[key: string]: Object}, callback: AsyncCallback): void; + /** + * Dispatch the session event of this session. + * @param { string } event - Session event name to dispatch + * @param { Record } args - The parameters of session event + * @param { AsyncCallback} callback - The asyncCallback triggered when the command is executed successfully + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600102 - The session does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @since 20 + * @arkts 1.1&1.2 + */ + dispatchSessionEvent(event: string, args: Record, callback: AsyncCallback): void; /** * Dispatch the session event of this session. @@ -1296,7 +1386,7 @@ declare namespace avSession { * @param { object } args - The parameters of session event * @returns { Promise } void promise when executed successfully * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. + * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -1308,14 +1398,26 @@ declare namespace avSession { * @param { object } args - The parameters of session event * @returns { Promise } void promise when executed successfully * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. + * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - dispatchSessionEvent(event: string, args: {[key: string]: Object}): Promise; + /** + * Dispatch the session event of this session. + * @param { string } event - Session event name to dispatch + * @param { Record } args - The parameters of session event + * @returns { Promise } void promise when executed successfully + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600102 - The session does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + dispatchSessionEvent(event: string, args: Record): Promise; /** * Set the playlist of queueItem. Identifies the content of the playlist presented by this session. @@ -1326,7 +1428,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ setAVQueueItems(items: Array, callback: AsyncCallback): void; @@ -1351,7 +1454,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAVQueueItems(items: Array): Promise; @@ -1364,7 +1468,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ setAVQueueTitle(title: string, callback: AsyncCallback): void; @@ -1389,7 +1494,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAVQueueTitle(title: string): Promise; @@ -1398,20 +1504,30 @@ declare namespace avSession { * @param { object } extras - The custom media packets * @param { AsyncCallback } callback - The asyncCallback triggered when the command is executed successfully. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Parameter verification failed. + * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ - setExtras(extras: {[key: string]: Object}, callback: AsyncCallback): void; + /** + * Set the custom media packets for this session. + * @param { Record } extras - The custom media packets + * @param { AsyncCallback } callback - The asyncCallback triggered when the command is executed successfully. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600102 - The session does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @since 20 + * @arkts 1.1&1.2 + */ + setExtras(extras: Record, callback: AsyncCallback): void; /** * Set the custom media packets for this session. * @param { object } extras - The custom media packets * @returns { Promise } void promise when executed successfully * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Parameter verification failed. + * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -1422,14 +1538,25 @@ declare namespace avSession { * @param { object } extras - The custom media packets * @returns { Promise } void promise when executed successfully * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Parameter verification failed. + * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - setExtras(extras: {[key: string]: Object}): Promise; + /** + * Set the custom media packets for this session. + * @param { Record } extras - The custom media packets + * @returns { Promise } void promise when executed successfully + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600102 - The session does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + setExtras(extras: Record): Promise; /** * Get the current session's own controller @@ -1437,7 +1564,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getController(callback: AsyncCallback): void; @@ -1456,7 +1584,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getController(): Promise; @@ -1467,7 +1596,8 @@ declare namespace avSession { * @throws {BusinessError} 6600102 - The session does not exist * @throws {BusinessError} 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAVCastController(callback: AsyncCallback): void; @@ -1488,7 +1618,8 @@ declare namespace avSession { * @throws {BusinessError} 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAVCastController(): Promise; @@ -1498,7 +1629,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getOutputDevice(callback: AsyncCallback): void; @@ -1517,7 +1649,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getOutputDevice(): Promise; @@ -1536,7 +1669,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getOutputDeviceSync(): OutputDeviceInfo; @@ -1547,7 +1681,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAllCastDisplays(): Promise>; @@ -1582,7 +1717,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'play', callback: () => void): void; @@ -1617,7 +1753,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'pause', callback: () => void): void; @@ -1652,7 +1789,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'stop', callback: () => void): void; @@ -1687,7 +1825,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'playNext', callback: () => void): void; @@ -1722,7 +1861,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'playPrevious', callback: () => void): void; @@ -1757,9 +1897,10 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'fastForward', callback: (time ?: number) => void): void; + on(type: 'fastForward', callback: (time ?: long) => void): void; /** * Register rewind command callback. @@ -1792,9 +1933,10 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'rewind', callback: (time ?: number) => void): void; + on(type: 'rewind', callback: (time ?: long) => void): void; /** * Unregister play command callback. @@ -1819,7 +1961,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'play', callback?: () => void): void; @@ -1846,7 +1989,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'pause', callback?: () => void): void; @@ -1873,7 +2017,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'stop', callback?: () => void): void; @@ -1900,7 +2045,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'playNext', callback?: () => void): void; @@ -1927,7 +2073,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'playPrevious', callback?: () => void): void; @@ -1954,7 +2101,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'fastForward', callback?: () => void): void; @@ -1981,7 +2129,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'rewind', callback?: () => void): void; @@ -2094,9 +2243,10 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'seek', callback: (time: number) => void): void; + on(type: 'seek', callback: (time: long) => void): void; /** * Unregister seek command callback @@ -2119,9 +2269,10 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'seek', callback?: (time: number) => void): void; + off(type: 'seek', callback?: (time: long) => void): void; /** * Register setSpeed command callback @@ -2144,9 +2295,10 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'setSpeed', callback: (speed: number) => void): void; + on(type: 'setSpeed', callback: (speed: double) => void): void; /** * Unregister setSpeed command callback @@ -2169,9 +2321,10 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'setSpeed', callback?: (speed: number) => void): void; + off(type: 'setSpeed', callback?: (speed: double) => void): void; /** * Register setLoopMode command callback @@ -2194,7 +2347,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'setLoopMode', callback: (mode: LoopMode) => void): void; @@ -2219,7 +2373,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void; @@ -2271,7 +2426,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'toggleFavorite', callback: (assetId: string) => void): void; @@ -2298,7 +2454,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'toggleFavorite', callback?: (assetId: string) => void): void; @@ -2323,7 +2480,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'handleKeyEvent', callback: (event: KeyEvent) => void): void; @@ -2348,7 +2506,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void; @@ -2375,7 +2534,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'outputDeviceChange', callback: (state: ConnectionState, device: OutputDeviceInfo) => void): void; @@ -2402,7 +2562,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'outputDeviceChange', callback?: (state: ConnectionState, device: OutputDeviceInfo) => void): void; @@ -2410,9 +2571,9 @@ declare namespace avSession { * Register session custom command change callback * @param { 'commonCommand' } type - Registration Type 'commonCommand' * @param { function } callback - Used to handle event when the common command is received - * The callback provide the command name and command args + * The callback provide the command name and command args * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -2422,24 +2583,36 @@ declare namespace avSession { * Register session custom command change callback * @param { 'commonCommand' } type - Registration Type 'commonCommand' * @param { function } callback - Used to handle event when the common command is received - * The callback provide the command name and command args + * The callback provide the command name and command args * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - on(type: 'commonCommand', callback: (command: string, args: {[key: string]: Object}) => void): void; + /** + * Register session custom command change callback + * @param { 'commonCommand' } type - Registration Type 'commonCommand' + * @param { function } callback - Used to handle event when the common command is received + * The callback provide the command name and command args + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600102 - The session does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + on(type: 'commonCommand', callback: (command: string, args: Record) => void): void; /** * Unregister session custom command change callback * @param { 'commonCommand' } type - Registration Type 'commonCommand' * @param { function } callback - Used to cancel a specific listener - * The callback provide the command name and command args + * The callback provide the command name and command args * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -2449,16 +2622,28 @@ declare namespace avSession { * Unregister session custom command change callback * @param { 'commonCommand' } type - Registration Type 'commonCommand' * @param { function } callback - Used to cancel a specific listener - * The callback provide the command name and command args + * The callback provide the command name and command args * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - off(type: 'commonCommand', callback?: (command: string, args: {[key: string]: Object}) => void): void; + /** + * Unregister session custom command change callback + * @param { 'commonCommand' } type - Registration Type 'commonCommand' + * @param { function } callback - Used to cancel a specific listener + * The callback provide the command name and command args + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600102 - The session does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + off(type: 'commonCommand', callback?: (command: string, args: Record) => void): void; /** * Register the item to play from the playlist change callback @@ -2483,9 +2668,10 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'skipToQueueItem', callback: (itemId: number) => void): void; + on(type: 'skipToQueueItem', callback: (itemId: int) => void): void; /** * Unregister the item to play from the playlist change callback @@ -2510,9 +2696,10 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'skipToQueueItem', callback?: (itemId: number) => void): void; + off(type: 'skipToQueueItem', callback?: (itemId: int) => void): void; /** * Register answer command callback. @@ -2539,7 +2726,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'answer', callback: Callback): void; @@ -2564,7 +2752,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'answer', callback?: Callback): void; @@ -2593,7 +2782,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'hangUp', callback: Callback): void; @@ -2618,7 +2808,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'hangUp', callback?: Callback): void; @@ -2647,7 +2838,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'toggleCallMute', callback: Callback): void; @@ -2670,7 +2862,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'toggleCallMute', callback?: Callback): void; @@ -2684,7 +2877,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'castDisplayChange', callback: Callback): void; @@ -2698,7 +2892,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'castDisplayChange', callback?: Callback): void; @@ -2707,24 +2902,26 @@ declare namespace avSession { * @param { AsyncCallback } callback A callback instance used to return when cast stopped completed. * @throws { BusinessError } 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ stopCasting(callback: AsyncCallback): void; /** * Stop current cast and disconnect device connection. - * @returns { Promise } void result promise when executed successfully + * @returns { Promise } void result promise when executed successfully * @throws { BusinessError } 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 10 */ /** * Stop current cast and disconnect device connection. - * @returns { Promise } void result promise when executed successfully + * @returns { Promise } void result promise when executed successfully * @throws { BusinessError } 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stopCasting(): Promise; @@ -2734,7 +2931,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ activate(callback: AsyncCallback): void; @@ -2753,7 +2951,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ activate(): Promise; @@ -2763,7 +2962,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ deactivate(callback: AsyncCallback): void; @@ -2782,7 +2982,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deactivate(): Promise; @@ -2792,7 +2993,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ destroy(callback: AsyncCallback): void; @@ -2811,7 +3013,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ destroy(): Promise; } @@ -2829,7 +3032,8 @@ declare namespace avSession { * 'setVolume' | 'setSpeed' | 'setLoopMode' | 'toggleFavorite' | 'toggleMute' } AVCastControlCommandType * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type AVCastControlCommandType = 'play' | 'pause' | 'stop' | 'playNext' | 'playPrevious' | 'fastForward' | 'rewind' | 'seek' | 'setVolume' | 'setSpeed' | 'setLoopMode' | 'toggleFavorite' | 'toggleMute'; @@ -2845,12 +3049,13 @@ declare namespace avSession { * @interface AVCastControlCommand * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVCastControlCommand { /** * The command value {@link AVCastControlCommandType} - * + * * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 10 */ @@ -2859,7 +3064,8 @@ declare namespace avSession { * @type { AVCastControlCommandType } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ command: AVCastControlCommandType; @@ -2871,7 +3077,7 @@ declare namespace avSession { * The setSpeed command must carry the {@link #media.PlaybackSpeed} parameter. * The setLoopMode command must carry the {@link LoopMode} parameter. * Other commands do not need to carry parameters. - * @type { ?(media.PlaybackSpeed | number | string | LoopMode) } + * @type { ?(media.PlaybackSpeed | double | string | LoopMode) } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 10 */ @@ -2883,12 +3089,13 @@ declare namespace avSession { * The setSpeed command must carry the {@link #media.PlaybackSpeed} parameter. * The setLoopMode command must carry the {@link LoopMode} parameter. * Other commands do not need to carry parameters. - * @type { ?(media.PlaybackSpeed | number | string | LoopMode) } + * @type { ?(media.PlaybackSpeed | double | string | LoopMode) } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - parameter?: media.PlaybackSpeed | number | string | LoopMode; + parameter?: media.PlaybackSpeed | double | string | LoopMode; } /** @@ -2902,7 +3109,8 @@ declare namespace avSession { * @interface AVCastController * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVCastController { /** @@ -2915,7 +3123,8 @@ declare namespace avSession { * @throws { BusinessError } 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ setDisplaySurface(surfaceId: string, callback: AsyncCallback): void; @@ -2929,7 +3138,8 @@ declare namespace avSession { * @throws { BusinessError } 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ setDisplaySurface(surfaceId: string): Promise; @@ -2938,7 +3148,8 @@ declare namespace avSession { * @param { AsyncCallback } callback - The triggered asyncCallback when (getAVPlaybackState). * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAVPlaybackState(callback: AsyncCallback): void; @@ -2955,7 +3166,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAVPlaybackState(): Promise; @@ -2965,7 +3177,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedDecoders(): Promise>; @@ -2976,7 +3189,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getRecommendedResolutionLevel(decoderType: DecoderType): Promise; @@ -2986,19 +3200,21 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedHdrCapabilities(): Promise>; /** * Get supported speed of remote player. - * @returns { Promise> } supported speed returned through promise + * @returns { Promise> } supported speed returned through promise * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - getSupportedPlaySpeeds(): Promise>; + getSupportedPlaySpeeds(): Promise>; /** * Send control commands to remote player @@ -3010,7 +3226,8 @@ declare namespace avSession { * @throws { BusinessError } 6600105 - Invalid session command * @throws { BusinessError } 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ sendControlCommand(command: AVCastControlCommand, callback: AsyncCallback): void; @@ -3026,7 +3243,7 @@ declare namespace avSession { * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 10 */ - /** + /** * Send control commands to remote player * @param { AVCastControlCommand } command The command to be send. * @returns { Promise } Promise used to return the result. @@ -3037,7 +3254,8 @@ declare namespace avSession { * @throws { BusinessError } 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sendControlCommand(command: AVCastControlCommand): Promise; @@ -3050,7 +3268,8 @@ declare namespace avSession { * @throws {BusinessError} 6600101 - Session service exception * @throws {BusinessError} 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ start(item: AVQueueItem, callback: AsyncCallback): void; @@ -3075,7 +3294,8 @@ declare namespace avSession { * @throws {BusinessError} 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(item: AVQueueItem): Promise; @@ -3088,7 +3308,8 @@ declare namespace avSession { * @throws {BusinessError} 6600101 - Session service exception * @throws {BusinessError} 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ prepare(item: AVQueueItem, callback: AsyncCallback): void; @@ -3113,7 +3334,8 @@ declare namespace avSession { * @throws {BusinessError} 6600109 - The remote connection is not established * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ prepare(item: AVQueueItem): Promise; @@ -3122,7 +3344,8 @@ declare namespace avSession { * @param { AsyncCallback } callback - The triggered asyncCallback. * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentItem(callback: AsyncCallback): void; @@ -3139,7 +3362,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCurrentItem(): Promise; @@ -3148,7 +3372,8 @@ declare namespace avSession { * @param { AsyncCallback> } callback - The triggered asyncCallback when (getValidCommands). * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getValidCommands(callback: AsyncCallback>): void; @@ -3157,7 +3382,8 @@ declare namespace avSession { * @returns { Promise> } array of AVCastControlCommandType promise * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getValidCommands(): Promise>; @@ -3171,7 +3397,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ processMediaKeyResponse(assetId: string, response: Uint8Array): Promise; @@ -3180,7 +3407,8 @@ declare namespace avSession { * @param { AsyncCallback } callback - The asyncCallback triggered when the command is executed successfully. * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; @@ -3197,14 +3425,15 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; /** * Register playback state changed callback * @param { 'playbackStateChange' } type - * @param { Array | 'all' } filter - The properties of {@link AVPlaybackState} that you cared about + * @param { Array | 'all' } filter - The properties of {@link AVPlaybackState} that you cared about * @param { function } callback - The callback used to handle playback state changed event. * The callback function provides the {@link AVPlaybackState} parameter. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. @@ -3216,7 +3445,7 @@ declare namespace avSession { /** * Register playback state changed callback * @param { 'playbackStateChange' } type - * @param { Array | 'all' } filter - The properties of {@link AVPlaybackState} that you cared about + * @param { Array | 'all' } filter - The properties of {@link AVPlaybackState} that you cared about * @param { function } callback - The callback used to handle playback state changed event. * The callback function provides the {@link AVPlaybackState} parameter. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. @@ -3224,9 +3453,10 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'playbackStateChange', filter: Array | 'all', callback: (state: AVPlaybackState) => void): void; + on(type: 'playbackStateChange', filter: Array | 'all', callback: (state: AVPlaybackState) => void): void; /** * Unregister playback state changed callback @@ -3249,7 +3479,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void): void; @@ -3272,7 +3503,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'mediaItemChange', callback: Callback): void; @@ -3293,7 +3525,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'mediaItemChange'): void; @@ -3318,7 +3551,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'playNext', callback: Callback): void; @@ -3341,7 +3575,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'playNext'): void; @@ -3366,7 +3601,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'playPrevious', callback: Callback): void; @@ -3389,7 +3625,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'playPrevious'): void; @@ -3402,7 +3639,8 @@ declare namespace avSession { * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'requestPlay', callback: Callback): void; @@ -3414,7 +3652,8 @@ declare namespace avSession { * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'requestPlay', callback?: Callback): void; @@ -3427,7 +3666,8 @@ declare namespace avSession { * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'endOfStream', callback: Callback): void; @@ -3439,14 +3679,15 @@ declare namespace avSession { * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'endOfStream', callback?: Callback): void; /** * Register listens for playback events. * @param { 'seekDone' } type - Type of the 'seekDone' to listen for. - * @param { Callback } callback - Callback used to listen for the playback seekDone event. + * @param { Callback } callback - Callback used to listen for the playback seekDone event. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception @@ -3456,15 +3697,16 @@ declare namespace avSession { /** * Register listens for playback events. * @param { 'seekDone' } type - Type of the 'seekDone' to listen for. - * @param { Callback } callback - Callback used to listen for the playback seekDone event. + * @param { Callback } callback - Callback used to listen for the playback seekDone event. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'seekDone', callback: Callback): void; + on(type: 'seekDone', callback: Callback): void; /** * Unregister listens for playback events. @@ -3483,7 +3725,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'seekDone'): void; @@ -3499,7 +3742,18 @@ declare namespace avSession { * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 */ - on(type: 'validCommandChange', callback: Callback>); + /** + * Register the valid commands of the casted session changed callback + * @param { 'validCommandChange' } type - 'validCommandChange' + * @param { Callback> } callback - The callback used to handle the changes. + * The callback function provides an array of AVCastControlCommandType. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @since 20 + * @arkts 1.1&1.2 + */ + on(type: 'validCommandChange', callback: Callback>): void; /** * Unregister the valid commands of the casted session changed callback @@ -3513,7 +3767,18 @@ declare namespace avSession { * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 */ - off(type: 'validCommandChange', callback?: Callback>); + /** + * Unregister the valid commands of the casted session changed callback + * @param { 'validCommandChange' } type - 'validCommandChange' + * @param { Callback> } callback - The callback used to handle the changes. + * The callback function provides an array of AVCastControlCommandType. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.AVCast + * @since 20 + * @arkts 1.1&1.2 + */ + off(type: 'validCommandChange', callback?: Callback>): void; /** * Register listener for video size change event, used at remote side. @@ -3523,9 +3788,10 @@ declare namespace avSession { * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'videoSizeChange', callback: (width: number, height: number) => void): void; + on(type: 'videoSizeChange', callback: (width: int, height: int) => void): void; /** * Unregister listener for video size change event, used at remote side. @@ -3534,7 +3800,8 @@ declare namespace avSession { * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'videoSizeChange'): void; @@ -3569,7 +3836,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -3602,7 +3870,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error'): void; @@ -3629,7 +3898,8 @@ declare namespace avSession { * @throws { BusinessError } 6611108 - Operation is not allowed. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'castControlGenericError', callback: ErrorCallback): void; @@ -3641,7 +3911,8 @@ declare namespace avSession { * 2. Incorrect parameter types. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'castControlGenericError', callback?: ErrorCallback): void; @@ -3670,7 +3941,8 @@ declare namespace avSession { * @throws { BusinessError } 6612107 - An error occurs when sending packet from source device to sink device. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'castControlIoError', callback: ErrorCallback): void; @@ -3682,7 +3954,8 @@ declare namespace avSession { * 2. Incorrect parameter types. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'castControlIoError', callback?: ErrorCallback): void; @@ -3700,7 +3973,8 @@ declare namespace avSession { * @throws { BusinessError } 6613004 - Unsupported feature in the media manifest. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'castControlParsingError', callback: ErrorCallback): void; @@ -3712,7 +3986,8 @@ declare namespace avSession { * 2. Incorrect parameter types. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'castControlParsingError', callback?: ErrorCallback): void; @@ -3730,7 +4005,8 @@ declare namespace avSession { * @throws { BusinessError } 6614005 - The format of the content to decode is not supported. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'castControlDecodingError', callback: ErrorCallback): void; @@ -3742,7 +4018,8 @@ declare namespace avSession { * 2. Incorrect parameter types. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'castControlDecodingError', callback?: ErrorCallback): void; @@ -3757,7 +4034,8 @@ declare namespace avSession { * @throws { BusinessError } 6615002 - The audio renderer fails to write data. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'castControlAudioRendererError', callback: ErrorCallback): void; @@ -3769,7 +4047,8 @@ declare namespace avSession { * 2. Incorrect parameter types. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'castControlAudioRendererError', callback?: ErrorCallback): void; @@ -3791,7 +4070,8 @@ declare namespace avSession { * @throws { BusinessError } 6616100 - An error occurs when the DRM processes the key response. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'castControlDrmError', callback: ErrorCallback): void; @@ -3803,7 +4083,8 @@ declare namespace avSession { * 2. Incorrect parameter types. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'castControlDrmError', callback?: ErrorCallback): void; @@ -3816,7 +4097,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'keyRequest', callback: KeyRequestCallback): void; @@ -3829,7 +4111,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'keyRequest', callback?: KeyRequestCallback): void; } @@ -3839,7 +4122,8 @@ declare namespace avSession { * * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ class AVCastPickerHelper { /** @@ -3851,7 +4135,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(context: Context); @@ -3864,7 +4149,8 @@ declare namespace avSession { * 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ select(options?: AVCastPickerOptions): Promise; @@ -3877,7 +4163,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'pickerStateChange', callback: Callback) : void; @@ -3890,7 +4177,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'pickerStateChange', callback?: Callback) : void; } @@ -3921,7 +4209,8 @@ declare namespace avSession { * @typedef AVCastPickerOptions * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVCastPickerOptions { /** @@ -3931,7 +4220,8 @@ declare namespace avSession { * @type { ? AVSessionType } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ sessionType?: AVSessionType; } @@ -3944,17 +4234,19 @@ declare namespace avSession { * @param { Uint8Array } requestData - media key request data sent to media key server * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type KeyRequestCallback = (assetId: string, requestData: Uint8Array) => void; /** * Enumerates the cast display states. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum CastDisplayState { /** @@ -3962,7 +4254,8 @@ declare namespace avSession { * * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_OFF = 1, @@ -3971,7 +4264,8 @@ declare namespace avSession { * * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_ON = 2, } @@ -3981,25 +4275,28 @@ declare namespace avSession { * @typedef CastDisplayInfo * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface CastDisplayInfo { /** * Display ID. * The application can get more display information based on the same id from display interface. - * @type { number } + * @type { long } * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - id: number; + id: long; /** * Display name. * @type { string } * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -4008,41 +4305,45 @@ declare namespace avSession { * @type { CastDisplayState } * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ state: CastDisplayState; /** * Display width, in pixels. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - width: number; + width: int; /** * Display height, in pixels. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.AVSession.ExtendedDisplayCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - height: number; + height: int; } /** * Define the device connection state. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * Define the device connection state. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum ConnectionState { /** @@ -4054,7 +4355,8 @@ declare namespace avSession { * A connection state indicating the device is in the process of connecting. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_CONNECTING = 0, @@ -4067,7 +4369,8 @@ declare namespace avSession { * A connection state indicating the device is connected. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_CONNECTED = 1, @@ -4080,24 +4383,27 @@ declare namespace avSession { * The default connection state indicating the device is disconnected. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - STATE_DISCONNECTED = 6, + STATE_DISCONNECTED = 6 } /** * The pre-defined display tag by system. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum DisplayTag { /** * Indicate the AUDIO VIVID property of current media resource. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - TAG_AUDIO_VIVID = 1, + TAG_AUDIO_VIVID = 1 } /** @@ -4105,14 +4411,16 @@ declare namespace avSession { * @enum { string } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum DecoderType { /** * Defination of avc codec type. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ OH_AVCODEC_MIMETYPE_VIDEO_AVC = "video/avc", @@ -4120,7 +4428,8 @@ declare namespace avSession { * Defination of hevc codec type. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ OH_AVCODEC_MIMETYPE_VIDEO_HEVC = "video/hevc", @@ -4128,24 +4437,27 @@ declare namespace avSession { * Defination of audio vivid codec type. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - OH_AVCODEC_MIMETYPE_AUDIO_VIVID = "audio/av3a", + OH_AVCODEC_MIMETYPE_AUDIO_VIVID = "audio/av3a" } /** * The defination of suggested resolution. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum ResolutionLevel { /** * Defination of 480P which typically resolution is 640*480. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ RESOLUTION_480P = 0, @@ -4153,7 +4465,8 @@ declare namespace avSession { * Defination of 720P which typically resolution is 1280*720. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ RESOLUTION_720P = 1, @@ -4161,7 +4474,8 @@ declare namespace avSession { * Defination of 1080P which typically resolution is 1920*1080. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ RESOLUTION_1080P = 2, @@ -4169,7 +4483,8 @@ declare namespace avSession { * Defination of 2K which typically resolution is 2560*1440. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ RESOLUTION_2K = 3, @@ -4177,9 +4492,10 @@ declare namespace avSession { * Defination of 4K which typically resolution is 4096*3840. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - RESOLUTION_4K = 4, + RESOLUTION_4K = 4 } /** @@ -4187,7 +4503,8 @@ declare namespace avSession { * @interface AVQueueInfo * @syscap SystemCapability.Multimedia.AVSession.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVQueueInfo { /** @@ -4195,7 +4512,8 @@ declare namespace avSession { * @type { string } * @syscap SystemCapability.Multimedia.AVSession.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -4204,7 +4522,8 @@ declare namespace avSession { * @type { string } * @syscap SystemCapability.Multimedia.AVSession.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ avQueueName: string; @@ -4213,7 +4532,8 @@ declare namespace avSession { * @type { string } * @syscap SystemCapability.Multimedia.AVSession.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ avQueueId: string; @@ -4222,19 +4542,21 @@ declare namespace avSession { * @type { image.PixelMap | string } * @syscap SystemCapability.Multimedia.AVSession.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ avQueueImage: image.PixelMap | string; /** * The time when the user last played the playlist. * The time format can be system, such as 1611081385000, it means 2021-01-20 02:36:25. - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Multimedia.AVSession.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - lastPlayedTime?: number; + lastPlayedTime?: long; } /** @@ -4248,7 +4570,8 @@ declare namespace avSession { * @interface AVMetadata * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVMetadata { /** @@ -4262,7 +4585,8 @@ declare namespace avSession { * @type { string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ assetId: string; @@ -4277,7 +4601,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ title?: string; @@ -4292,7 +4617,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ artist?: string; @@ -4307,7 +4633,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ author?: string; @@ -4315,7 +4642,8 @@ declare namespace avSession { * The name of play list which current media belongs to * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ avQueueName?: string; @@ -4323,7 +4651,8 @@ declare namespace avSession { * The id of play list which current media belongs to, it should be an unique identifier in the application. * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ avQueueId?: string; @@ -4331,7 +4660,8 @@ declare namespace avSession { * The artwork of play list as a {@link PixelMap} or an uri formatted String, * @type { ?(image.PixelMap | string) } * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ avQueueImage?: image.PixelMap | string; @@ -4346,7 +4676,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ album?: string; @@ -4361,7 +4692,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ writer?: string; @@ -4369,24 +4701,26 @@ declare namespace avSession { * The composer of this media * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ composer?: string; /** * The duration of this media, used to automatically calculate playback position - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * The duration of this media, used to automatically calculate playback position - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - duration?: number; + duration?: long; /** * The image of the media as a {@link PixelMap} or an uri formatted String, @@ -4401,7 +4735,8 @@ declare namespace avSession { * @type { ?(image.PixelMap | string) } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mediaImage?: image.PixelMap | string; @@ -4410,7 +4745,8 @@ declare namespace avSession { * @type { ?image.PixelMap } * @readonly * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ readonly bundleIcon?: image.PixelMap; @@ -4418,7 +4754,8 @@ declare namespace avSession { * The publishDate of the media * @type { ?Date } * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ publishDate?: Date; @@ -4433,7 +4770,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ subtitle?: string; @@ -4448,7 +4786,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ description?: string; @@ -4456,7 +4795,8 @@ declare namespace avSession { * The lyric of the media, it should be in standard lyric format * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ lyric?: string; @@ -4465,7 +4805,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ singleLyricText?: string; @@ -4482,7 +4823,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ previousAssetId?: string; @@ -4499,32 +4841,35 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ nextAssetId?: string; /** * The protocols supported by this session, if not set, the default is {@link TYPE_CAST_PLUS_STREAM}. * See {@link ProtocolType} - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 11 */ /** * The protocols supported by this session, if not set, the default is {@link TYPE_CAST_PLUS_STREAM}. * See {@link ProtocolType} - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - filter?: number; + filter?: int; /** * The drm schemes supported by this session which are represented by uuid. * @type { ?Array } * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ drmSchemes?: Array; @@ -4533,17 +4878,19 @@ declare namespace avSession { * See {@link SkipIntervals} * @type { ?SkipIntervals } * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ skipIntervals?: SkipIntervals; /** * The display tags supported by application to be displayed on media center - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - displayTags?: number; + displayTags?: int; } /** @@ -4557,7 +4904,8 @@ declare namespace avSession { * @interface AVMediaDescription * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVMediaDescription { /** @@ -4571,7 +4919,8 @@ declare namespace avSession { * @type { string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ assetId: string; /** @@ -4585,7 +4934,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ title?: string; @@ -4600,7 +4950,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ subtitle?: string; @@ -4615,7 +4966,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ description?: string; @@ -4632,7 +4984,8 @@ declare namespace avSession { * @type { ?(image.PixelMap | string) } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mediaImage?: image.PixelMap | string; /** @@ -4641,7 +4994,14 @@ declare namespace avSession { * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ - extras?: {[key: string]: Object}; + /** + * Any additional attributes that can be represented as key-value pairs + * @type { ?Record } + * @syscap SystemCapability.Multimedia.AVSession.Core + * @since 20 + * @arkts 1.1&1.2 + */ + extras?: Record; /** * The type of this media, such as video, audio and so on. @@ -4654,24 +5014,26 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mediaType?: string; /** * The size of this media. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * The size of this media. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - mediaSize?: number; + mediaSize?: int; /** * The album title of this media @@ -4684,7 +5046,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ albumTitle?: string; @@ -4699,7 +5062,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ albumCoverUri?: string; @@ -4714,7 +5078,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lyricContent?: string; @@ -4729,7 +5094,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ lyricUri?: string; @@ -4744,7 +5110,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ artist?: string; @@ -4759,7 +5126,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mediaUri?: string; @@ -4774,7 +5142,8 @@ declare namespace avSession { * @type { ?media.AVFileDescriptor } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fdSrc?: media.AVFileDescriptor; @@ -4782,7 +5151,8 @@ declare namespace avSession { * DataSource descriptor. The caller ensures the fileSize and callback are valid. * @type { ?media.AVDataSrcDescriptor } * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dataSrc?: media.AVDataSrcDescriptor; @@ -4798,54 +5168,58 @@ declare namespace avSession { * The drm scheme supported by this resource which is represented by uuid. * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ drmScheme?: string; /** * The duration of this media - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * The duration of this media - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - duration?: number; + duration?: int; /** * Media start position, described by milliseconds. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * Media start position, described by milliseconds. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - startPosition?: number; + startPosition?: int; /** * Media credits position, described by milliseconds. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * Media credits position, described by milliseconds. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - creditsPosition?: number; + creditsPosition?: int; /** * Application name. @@ -4858,24 +5232,26 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ appName?: string; /** * The display tags supported by application to be displayed on media center - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 11 */ /** * The display tags supported by application to be displayed on media center - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - displayTags?: number; + displayTags?: int; } /** @@ -4889,23 +5265,25 @@ declare namespace avSession { * @interface AVQueueItem * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVQueueItem { /** * Sequence number of the item in the playlist. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * Sequence number of the item in the playlist. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - itemId: number; + itemId: int; /** * The media description of the item in the playlist. @@ -4918,7 +5296,8 @@ declare namespace avSession { * @type { ?AVMediaDescription } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ description?: AVMediaDescription; } @@ -4936,7 +5315,8 @@ declare namespace avSession { * @interface AVPlaybackState * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVPlaybackState { /** @@ -4950,24 +5330,26 @@ declare namespace avSession { * @type { ?PlaybackState } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ state?: PlaybackState; /** * Current playback speed - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * Current playback speed - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - speed?: number; + speed?: double; /** * Current playback position of this media. See {@link PlaybackPosition} @@ -4980,24 +5362,26 @@ declare namespace avSession { * @type { ?PlaybackPosition } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ position?: PlaybackPosition; /** * The current buffered time, the maximum playable position - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * The current buffered time, the maximum playable position - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - bufferedTime?: number; + bufferedTime?: long; /** * Current playback loop mode. See {@link LoopMode} @@ -5010,7 +5394,8 @@ declare namespace avSession { * @type { ?LoopMode } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ loopMode?: LoopMode; @@ -5025,54 +5410,58 @@ declare namespace avSession { * @type { ?boolean } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isFavorite?: boolean; /** * Current active item id - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * Current active item id - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - activeItemId?: number; + activeItemId?: int; /** * Current player volume - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * Current player volume - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - volume?: number; + volume?: int; /** * maximum volume - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 11 */ /** * maximum volume - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - maxVolume?: number; + maxVolume?: int; /** * Current muted status @@ -5085,47 +5474,51 @@ declare namespace avSession { * @type { ?boolean } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ muted?: boolean; /** * The duration of this media asset. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - duration?: number; + duration?: int; /** * The video width of this media asset. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 11 */ /** * The video width of this media asset. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - videoWidth?: number; + videoWidth?: int; /** * The video height of this media asset. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 11 */ /** * The video height of this media asset. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - videoHeight?: number; + videoHeight?: int; /** * Current custom media packets @@ -5140,7 +5533,15 @@ declare namespace avSession { * @atomicservice * @since 12 */ - extras?: {[key: string]: Object}; + /** + * Current custom media packets + * @type { ?Record } + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + extras?: Record; } /** @@ -5154,38 +5555,41 @@ declare namespace avSession { * @interface PlaybackPosition * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface PlaybackPosition { /** * Elapsed time(position) of this media set by the app. - * @type { number } + * @type { long } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * Elapsed time(position) of this media set by the app. - * @type { number } + * @type { long } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - elapsedTime: number; + elapsedTime: long; /** * Record the system time when elapsedTime is set. - * @type { number } + * @type { long } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * Record the system time when elapsedTime is set. - * @type { number } + * @type { long } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - updateTime: number; + updateTime: long; } /** @@ -5199,7 +5603,8 @@ declare namespace avSession { * @typedef CallMetadata * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface CallMetadata { /** @@ -5213,7 +5618,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name?: string; @@ -5228,7 +5634,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ phoneNumber?: string; @@ -5243,7 +5650,8 @@ declare namespace avSession { * @type { ?image.PixelMap } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ avatar?: image.PixelMap; } @@ -5259,7 +5667,8 @@ declare namespace avSession { * @typedef AVCallState * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVCallState { /** @@ -5273,7 +5682,8 @@ declare namespace avSession { * @type { CallState } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ state: CallState; @@ -5288,23 +5698,25 @@ declare namespace avSession { * @type { boolean } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ muted: boolean; } /** * Enumeration of current call state - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 11 */ /** * Enumeration of current call state - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum CallState { /** @@ -5316,7 +5728,8 @@ declare namespace avSession { * Idle state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CALL_STATE_IDLE = 0, @@ -5329,7 +5742,8 @@ declare namespace avSession { * Incoming state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CALL_STATE_INCOMING = 1, @@ -5342,7 +5756,8 @@ declare namespace avSession { * Active state in calling. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CALL_STATE_ACTIVE = 2, @@ -5355,7 +5770,8 @@ declare namespace avSession { * Dialing state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CALL_STATE_DIALING = 3, @@ -5368,7 +5784,8 @@ declare namespace avSession { * Waiting state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CALL_STATE_WAITING = 4, @@ -5381,7 +5798,8 @@ declare namespace avSession { * Holding state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CALL_STATE_HOLDING = 5, @@ -5394,37 +5812,40 @@ declare namespace avSession { * Disconnecting state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CALL_STATE_DISCONNECTING = 6, } /** * cast category indicating different playback scenes - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 10 */ /** * cast category indicating different playback scenes - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AVCastCategory { /** - * The default cast type "local", media can be routed on the same device, + * The default cast type "local", media can be routed on the same device, * including internal speakers or audio jack on the device itself, A2DP devices. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 10 */ /** - * The default cast type "local", media can be routed on the same device, + * The default cast type "local", media can be routed on the same device, * including internal speakers or audio jack on the device itself, A2DP devices. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CATEGORY_LOCAL = 0, @@ -5439,22 +5860,24 @@ declare namespace avSession { * the application needs to get an AVCastController to control remote playback. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CATEGORY_REMOTE = 1, } /** * Device type definition - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * Device type definition - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum DeviceType { /** @@ -5466,7 +5889,8 @@ declare namespace avSession { * A device type indicating the route is on internal speakers or audio jack on the device itself. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEVICE_TYPE_LOCAL = 0, @@ -5479,7 +5903,8 @@ declare namespace avSession { * A device type indicating the route is on a TV. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEVICE_TYPE_TV = 2, @@ -5492,7 +5917,8 @@ declare namespace avSession { * A device type indicating the route is on a smart speaker. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEVICE_TYPE_SMART_SPEAKER = 3, @@ -5505,7 +5931,8 @@ declare namespace avSession { * A device type indicating the route is on a bluetooth device. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DEVICE_TYPE_BLUETOOTH = 10, } @@ -5521,7 +5948,8 @@ declare namespace avSession { * @interface DeviceInfo * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface DeviceInfo { /** @@ -5535,7 +5963,8 @@ declare namespace avSession { * @type { AVCastCategory } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ castCategory: AVCastCategory; /** @@ -5551,7 +5980,8 @@ declare namespace avSession { * @type { string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; @@ -5568,7 +5998,8 @@ declare namespace avSession { * @type { string } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ deviceName: string; @@ -5592,7 +6023,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ manufacturer?: string; @@ -5601,7 +6033,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ modelName?: string; @@ -5610,7 +6043,8 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ networkId?: string; @@ -5619,40 +6053,44 @@ declare namespace avSession { * @type { ?string } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ ipAddress?: string; /** * device provider which supplies the route capability. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - providerId?: number; + providerId?: int; /** * The protocols supported by current device, can be union of {@link ProtocolType}. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @since 11 */ /** * The protocols supported by current device, can be union of {@link ProtocolType}. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - supportedProtocols?: number; + supportedProtocols?: int; /** * The drm capability supported by current device, each drm is represented by uuid. * @type { ?Array } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ supportedDrmCapabilities?: Array; @@ -5660,19 +6098,21 @@ declare namespace avSession { * Define different authentication status. * 0: Device not authenticated. * 1: Device already authenticated. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - authenticationStatus?: number; + authenticationStatus?: int; /** * Indicates the current device is legacy or not. * @type { ?boolean } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ isLegacy?: boolean; @@ -5680,12 +6120,13 @@ declare namespace avSession { * Medium types used to discover devices. * 1: BLE * 2: COAP - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - mediumTypes?: number; + mediumTypes?: int; /** * When the device protocol is {@link ProtocolType.TYPE_HIGH_DEFINITION_AUDIO}, @@ -5708,7 +6149,8 @@ declare namespace avSession { * @interface OutputDeviceInfo * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface OutputDeviceInfo { /** @@ -5722,23 +6164,25 @@ declare namespace avSession { * @type { Array } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ devices: Array; } /** * Loop Play Mode Definition - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * Loop Play Mode Definition - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum LoopMode { /** @@ -5750,7 +6194,8 @@ declare namespace avSession { * The default mode is sequential playback * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOOP_MODE_SEQUENCE = 0, @@ -5763,7 +6208,8 @@ declare namespace avSession { * Single loop mode * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOOP_MODE_SINGLE = 1, @@ -5776,7 +6222,8 @@ declare namespace avSession { * List loop mode * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOOP_MODE_LIST = 2, @@ -5789,7 +6236,8 @@ declare namespace avSession { * Shuffle playback mode * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LOOP_MODE_SHUFFLE = 3, @@ -5802,50 +6250,56 @@ declare namespace avSession { * Custom playback mode supported by application * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - LOOP_MODE_CUSTOM = 4, + LOOP_MODE_CUSTOM = 4 } /** * Supported skip intervals definition - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum SkipIntervals { /** * 10 seconds * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SECONDS_10 = 10, /** * 15 seconds * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SECONDS_15 = 15, /** * 30 seconds * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SECONDS_30 = 30, } /** * Definition of current playback state - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * Definition of current playback state - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum PlaybackState { /** @@ -5857,7 +6311,8 @@ declare namespace avSession { * Initial state. The initial state of media file * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLAYBACK_STATE_INITIAL = 0, @@ -5872,7 +6327,8 @@ declare namespace avSession { * the media is loading or buffering * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLAYBACK_STATE_PREPARE = 1, @@ -5885,7 +6341,8 @@ declare namespace avSession { * Playing state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLAYBACK_STATE_PLAY = 2, @@ -5898,7 +6355,8 @@ declare namespace avSession { * Paused state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLAYBACK_STATE_PAUSE = 3, @@ -5911,7 +6369,8 @@ declare namespace avSession { * Fast forwarding state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLAYBACK_STATE_FAST_FORWARD = 4, @@ -5924,7 +6383,8 @@ declare namespace avSession { * Rewinding state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLAYBACK_STATE_REWIND = 5, @@ -5937,7 +6397,8 @@ declare namespace avSession { * Stopped state.The server will clear the media playback position and other information. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLAYBACK_STATE_STOP = 6, @@ -5950,7 +6411,8 @@ declare namespace avSession { * Completed state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLAYBACK_STATE_COMPLETED = 7, @@ -5963,7 +6425,8 @@ declare namespace avSession { * Released state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLAYBACK_STATE_RELEASED = 8, @@ -5976,7 +6439,8 @@ declare namespace avSession { * error state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLAYBACK_STATE_ERROR = 9, @@ -5989,7 +6453,8 @@ declare namespace avSession { * Idle state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PLAYBACK_STATE_IDLE = 10, @@ -6002,9 +6467,10 @@ declare namespace avSession { * Buffering state. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - PLAYBACK_STATE_BUFFERING = 11, + PLAYBACK_STATE_BUFFERING = 11 } /** @@ -6012,7 +6478,8 @@ declare namespace avSession { * @interface AVSessionDescriptor * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVSessionDescriptor { /** @@ -6020,7 +6487,8 @@ declare namespace avSession { * @type { string } * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ sessionId: string; @@ -6029,7 +6497,8 @@ declare namespace avSession { * @type { AVSessionType } * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ type: AVSessionType; @@ -6038,7 +6507,8 @@ declare namespace avSession { * @type { string } * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ sessionTag: string; @@ -6047,7 +6517,8 @@ declare namespace avSession { * @type { ElementName } * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ elementName: ElementName; @@ -6056,7 +6527,8 @@ declare namespace avSession { * @type { boolean } * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ isActive: boolean; @@ -6065,7 +6537,8 @@ declare namespace avSession { * @type { boolean } * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ isTopSession: boolean; @@ -6075,7 +6548,8 @@ declare namespace avSession { * @type { OutputDeviceInfo } * @syscap SystemCapability.Multimedia.AVSession.Manager * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ outputDevice: OutputDeviceInfo; } @@ -6083,11 +6557,12 @@ declare namespace avSession { /** * The extra info object. * - * @typedef { object } ExtraInfo + * @typedef { Record } ExtraInfo * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - type ExtraInfo = { [key: string]: Object; }; + type ExtraInfo = Record; /** * Session controller,used to control media playback and get media information @@ -6100,7 +6575,8 @@ declare namespace avSession { * @typedef AVSessionController * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVSessionController { /** @@ -6115,7 +6591,8 @@ declare namespace avSession { * @readonly * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly sessionId: string; @@ -6126,7 +6603,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAVPlaybackState(callback: AsyncCallback): void; @@ -6147,7 +6625,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAVPlaybackState(): Promise; @@ -6168,7 +6647,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAVPlaybackStateSync(): AVPlaybackState; @@ -6179,7 +6659,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAVMetadata(callback: AsyncCallback): void; @@ -6200,7 +6681,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAVMetadata(): Promise; @@ -6221,7 +6703,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAVMetadataSync(): AVMetadata; @@ -6232,7 +6715,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getAVCallState(callback: AsyncCallback): void; @@ -6243,7 +6727,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getAVCallState(): Promise; @@ -6254,7 +6739,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getCallMetadata(callback: AsyncCallback): void; @@ -6265,7 +6751,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getCallMetadata(): Promise; @@ -6276,7 +6763,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAVQueueTitle(callback: AsyncCallback): void; @@ -6297,7 +6785,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAVQueueTitle(): Promise; @@ -6318,7 +6807,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAVQueueTitleSync(): string; @@ -6329,7 +6819,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getAVQueueItems(callback: AsyncCallback>): void; @@ -6350,7 +6841,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAVQueueItems(): Promise>; @@ -6371,13 +6863,14 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAVQueueItemsSync(): Array; /** * Set the item in the playlist to be played - * @param { number } itemId - The serial number of the item to be played + * @param { int } itemId - The serial number of the item to be played * @param { AsyncCallback } callback - The asyncCallback triggered when the command is executed successfully * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. @@ -6385,9 +6878,10 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - skipToQueueItem(itemId: number, callback: AsyncCallback): void; + skipToQueueItem(itemId: int, callback: AsyncCallback): void; /** * Set the item in the playlist to be played @@ -6403,7 +6897,7 @@ declare namespace avSession { */ /** * Set the item in the playlist to be played - * @param { number } itemId - The serial number of the item to be played + * @param { int } itemId - The serial number of the item to be played * @returns { Promise } void promise when executed successfully * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Parameter verification failed. @@ -6412,9 +6906,10 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - skipToQueueItem(itemId: number): Promise; + skipToQueueItem(itemId: int): Promise; /** * Get output device information @@ -6422,7 +6917,8 @@ declare namespace avSession { * @throws { BusinessError } 600101 - Session service exception. * @throws { BusinessError } 600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getOutputDevice(callback: AsyncCallback): void; @@ -6441,7 +6937,8 @@ declare namespace avSession { * @throws { BusinessError } 600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getOutputDevice(): Promise; @@ -6460,7 +6957,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getOutputDeviceSync(): OutputDeviceInfo; @@ -6476,7 +6974,8 @@ declare namespace avSession { * @throws { BusinessError } 600105 - Invalid session command. * @throws { BusinessError } 600106 - The session is not activated. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback): void; @@ -6507,7 +7006,8 @@ declare namespace avSession { * @throws { BusinessError } 600106 - The session is not activated. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sendAVKeyEvent(event: KeyEvent): Promise; @@ -6518,7 +7018,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getLaunchAbility(callback: AsyncCallback): void; @@ -6539,7 +7040,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getLaunchAbility(): Promise; @@ -6555,14 +7057,15 @@ declare namespace avSession { /** * Get the adjusted playback position. The time automatically calculated by the system * taking into account factors such as playback status, playback speed, and application update time. - * @returns { number } current playback position in ms.Note that the returns value of each call will be different. + * @returns { long } current playback position in ms.Note that the returns value of each call will be different. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getRealPlaybackPositionSync(): number; + getRealPlaybackPositionSync(): long; /** * Check if the current session is active @@ -6571,7 +7074,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ isActive(callback: AsyncCallback): void; @@ -6592,7 +7096,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isActive(): Promise; @@ -6613,7 +7118,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isActiveSync(): boolean; @@ -6623,7 +7129,8 @@ declare namespace avSession { * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ destroy(callback: AsyncCallback): void; @@ -6642,7 +7149,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ destroy(): Promise; @@ -6653,7 +7161,8 @@ declare namespace avSession { * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getValidCommands(callback: AsyncCallback>): void; @@ -6674,7 +7183,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getValidCommands(): Promise>; @@ -6695,7 +7205,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getValidCommandsSync(): Array; @@ -6712,7 +7223,8 @@ declare namespace avSession { * @throws { BusinessError } 6600106 - The session is not activated. * @throws { BusinessError } 6600107 - Too many commands or events. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ sendControlCommand(command: AVControlCommand, callback: AsyncCallback): void; @@ -6745,7 +7257,8 @@ declare namespace avSession { * @throws { BusinessError } 6600107 - Too many commands or events. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sendControlCommand(command: AVControlCommand): Promise; @@ -6755,7 +7268,7 @@ declare namespace avSession { * @param { object } args - The parameters of session event * @param { AsyncCallback } callback - The asyncCallback triggered when the command is executed successfully. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Parameter verification failed. + * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. @@ -6765,7 +7278,22 @@ declare namespace avSession { * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ - sendCommonCommand(command: string, args: {[key: string]: Object}, callback: AsyncCallback): void; + /** + * Send common commands to this session + * @param { string } command - The command name to be sent. + * @param { Record } args - The parameters of session event + * @param { AsyncCallback } callback - The asyncCallback triggered when the command is executed successfully. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600102 - The session does not exist. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @throws { BusinessError } 6600105 - Invalid session command. + * @throws { BusinessError } 6600106 - The session is not activated. + * @throws { BusinessError } 6600107 - Too many commands or events. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @since 20 + * @arkts 1.1&1.2 + */ + sendCommonCommand(command: string, args: Record, callback: AsyncCallback): void; /** * Send common commands to this session @@ -6773,7 +7301,7 @@ declare namespace avSession { * @param { object } args - The parameters of session event * @returns { Promise } void promise when executed successfully * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Parameter verification failed. + * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. @@ -6789,7 +7317,7 @@ declare namespace avSession { * @param { object } args - The parameters of session event * @returns { Promise } void promise when executed successfully * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Parameter verification failed. + * 2.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. @@ -6800,13 +7328,29 @@ declare namespace avSession { * @atomicservice * @since 12 */ - sendCommonCommand(command: string, args: {[key: string]: Object}): Promise; + /** + * Send common commands to this session + * @param { string } command - The command name to be sent. + * @param { Record } args - The parameters of session event + * @returns { Promise } void promise when executed successfully + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600102 - The session does not exist. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @throws { BusinessError } 6600105 - Invalid session command. + * @throws { BusinessError } 6600106 - The session is not activated. + * @throws { BusinessError } 6600107 - Too many commands or events. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + sendCommonCommand(command: string, args: Record): Promise; /** * Get custom media packets provided by the corresponding session * @param { AsyncCallback<{[key: string]: Object}> } callback - The triggered asyncCallback when (getExtras). * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. + * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. @@ -6815,13 +7359,25 @@ declare namespace avSession { * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ - getExtras(callback: AsyncCallback<{[key: string]: Object}>): void; + /** + * Get custom media packets provided by the corresponding session + * @param { AsyncCallback> } callback - The triggered asyncCallback when (getExtras). + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600102 - The session does not exist. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @throws { BusinessError } 6600105 - Invalid session command. + * @throws { BusinessError } 6600107 - Too many commands or events. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @since 20 + * @arkts 1.1&1.2 + */ + getExtras(callback: AsyncCallback>): void; /** * Get custom media packets provided by the corresponding session * @returns { Promise<{[key: string]: Object}> } the parameters of extras * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. + * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. @@ -6834,7 +7390,7 @@ declare namespace avSession { * Get custom media packets provided by the corresponding session * @returns { Promise<{[key: string]: Object}> } the parameters of extras * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. 3.Parameter verification failed. + * 2.Incorrect parameter types. 3.Parameter verification failed. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600102 - The session does not exist. * @throws { BusinessError } 6600103 - The session controller does not exist. @@ -6844,7 +7400,20 @@ declare namespace avSession { * @atomicservice * @since 12 */ - getExtras(): Promise<{[key: string]: Object}>; + /** + * Get custom media packets provided by the corresponding session + * @returns { Promise> } the parameters of extras + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600102 - The session does not exist. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @throws { BusinessError } 6600105 - Invalid session command. + * @throws { BusinessError } 6600107 - Too many commands or events. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + getExtras(): Promise>; /** * Get extra information for remote device, such as volume level, connected devices. @@ -6855,19 +7424,20 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @throws { BusinessError } 6600105 - Invalid session command. * @syscap SystemCapability.Multimedia.AVSession.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ getExtrasWithEvent(extraEvent: string): Promise; /** * Register metadata changed callback - * @param { 'metadataChange' } type + * @param { 'metadataChange' } type * @param { Array | 'all' } filter - The properties of {@link AVMetadata} that you cared about * @param { function } callback - The callback used to handle metadata changed event. - * The callback function provides the {@link AVMetadata} parameter. - * It only contains the properties set in the filter. + * The callback function provides the {@link AVMetadata} parameter. + * It only contains the properties set in the filter. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6875,20 +7445,34 @@ declare namespace avSession { */ /** * Register metadata changed callback - * @param { 'metadataChange' } type + * @param { 'metadataChange' } type * @param { Array | 'all' } filter - The properties of {@link AVMetadata} that you cared about * @param { function } callback - The callback used to handle metadata changed event. - * The callback function provides the {@link AVMetadata} parameter. - * It only contains the properties set in the filter. + * The callback function provides the {@link AVMetadata} parameter. + * It only contains the properties set in the filter. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - on(type: 'metadataChange', filter: Array | 'all', callback: (data: AVMetadata) => void); + /** + * Register metadata changed callback + * @param { 'metadataChange' } type + * @param { Array | 'all' } filter - The properties of {@link AVMetadata} that you cared about + * @param { function } callback - The callback used to handle metadata changed event. + * The callback function provides the {@link AVMetadata} parameter. + * It only contains the properties set in the filter. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + on(type: 'metadataChange', filter: Array | 'all', callback: (data: AVMetadata) => void): void; /** * Unregister metadata changed callback @@ -6917,16 +7501,30 @@ declare namespace avSession { * @atomicservice * @since 12 */ - off(type: 'metadataChange', callback?: (data: AVMetadata) => void); + /** + * Unregister metadata changed callback + * @param { 'metadataChange' } type + * @param { function } callback - The callback used to handle metadata changed event. + * The callback function provides the {@link AVMetadata} parameter. + * It only contains the properties set in the filter. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + off(type: 'metadataChange', callback?: (data: AVMetadata) => void): void; /** * Register playback state changed callback * @param { 'playbackStateChange' } type - * @param { Array | 'all' } filter - The properties of {@link AVPlaybackState} that you cared about + * @param { Array | 'all' } filter - The properties of {@link AVPlaybackState} + * that you cared about * @param { function } callback - The callback used to handle playback state changed event. - * The callback function provides the {@link AVPlaybackState} parameter. + * The callback function provides the {@link AVPlaybackState} parameter. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -6935,18 +7533,33 @@ declare namespace avSession { /** * Register playback state changed callback * @param { 'playbackStateChange' } type - * @param { Array | 'all' } filter - The properties of {@link AVPlaybackState} that you cared about + * @param { Array | 'all' } filter - The properties of {@link AVPlaybackState} + * that you cared about * @param { function } callback - The callback used to handle playback state changed event. - * The callback function provides the {@link AVPlaybackState} parameter. + * The callback function provides the {@link AVPlaybackState} parameter. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - on(type: 'playbackStateChange', filter: Array | 'all', callback: (state: AVPlaybackState) => void); + /** + * Register playback state changed callback + * @param { 'playbackStateChange' } type + * @param { Array | 'all' } filter - The properties of {@link AVPlaybackState} + * that you cared about + * @param { function } callback - The callback used to handle playback state changed event. + * The callback function provides the {@link AVPlaybackState} parameter. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + on(type: 'playbackStateChange', filter: Array | 'all', callback: (state: AVPlaybackState) => void): void; /** * Unregister playback state changed callback @@ -6973,7 +7586,19 @@ declare namespace avSession { * @atomicservice * @since 12 */ - off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void); + /** + * Unregister playback state changed callback + * @param { 'playbackStateChange' } type + * @param { function } callback - The callback used to handle playback state changed event. + * The callback function provides the {@link AVPlaybackState} parameter. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void): void; /** * Register call metadata changed callback @@ -6992,7 +7617,7 @@ declare namespace avSession { /** * Register call metadata changed callback * @param { 'callMetadataChange' } type - 'callMetadataChange' - * @param { Array | 'all' } filter - The properties of {@link CallMetadata} that you cared about + * @param { Array | 'all' } filter - The properties of {@link CallMetadata} that you cared about * @param { Callback } callback - The callback used to handle call metadata changed event. * The callback function provides the {@link CallMetadata} parameter. * It only contains the properties set in the filter. @@ -7002,18 +7627,19 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'callMetadataChange', filter: Array | 'all', callback: Callback): void; + on(type: 'callMetadataChange', filter: Array | 'all', callback: Callback): void; /** * Unregister call metadata changed callback * @param { 'callMetadataChange' } type - 'callMetadataChange' * @param { Callback } callback - The callback used to handle call metadata changed event. - * The callback function provides the {@link CallMetadata} parameter. + * The callback function provides the {@link CallMetadata} parameter. * It only contains the properties set in the filter. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -7023,7 +7649,7 @@ declare namespace avSession { * Unregister call metadata changed callback * @param { 'callMetadataChange' } type - 'callMetadataChange' * @param { Callback } callback - The callback used to handle call metadata changed event. - * The callback function provides the {@link CallMetadata} parameter. + * The callback function provides the {@link CallMetadata} parameter. * It only contains the properties set in the filter. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. @@ -7031,7 +7657,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'callMetadataChange', callback?: Callback): void; @@ -7040,9 +7667,9 @@ declare namespace avSession { * @param { 'callStateChange' } type - 'callStateChange' * @param { Array | 'all' } filter - The properties of {@link AVCallState} that you cared about * @param { Callback } callback - The callback used to handle call state changed event. - * The callback function provides the {@link AVCallState} parameter. + * The callback function provides the {@link AVCallState} parameter. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -7051,18 +7678,19 @@ declare namespace avSession { /** * Register call state changed callback * @param { 'callStateChange' } type - 'callStateChange' - * @param { Array | 'all' } filter - The properties of {@link AVCallState} that you cared about + * @param { Array | 'all' } filter - The properties of {@link AVCallState} that you cared about * @param { Callback } callback - The callback used to handle call state changed event. - * The callback function provides the {@link AVCallState} parameter. + * The callback function provides the {@link AVCallState} parameter. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since 20 + * @arkts 1.1&1.2 */ - on(type: 'callStateChange', filter: Array | 'all', callback: Callback): void; + on(type: 'callStateChange', filter: Array | 'all', callback: Callback): void; /** * Unregister playback state changed callback @@ -7087,7 +7715,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'callStateChange', callback?: Callback): void; @@ -7114,7 +7743,18 @@ declare namespace avSession { * @atomicservice * @since 12 */ - on(type: 'sessionDestroy', callback: () => void); + /** + * Register current session destroyed callback + * @param { 'sessionDestroy' } type + * @param { function } callback - The callback used to handle current session destroyed event. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + on(type: 'sessionDestroy', callback: () => void): void; /** * Unregister current session destroyed callback @@ -7139,7 +7779,18 @@ declare namespace avSession { * @atomicservice * @since 12 */ - off(type: 'sessionDestroy', callback?: () => void); + /** + * Unregister current session destroyed callback + * @param { 'sessionDestroy' } type - 'sessionDestroy' + * @param { function } callback - The callback used to handle current session destroyed event. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + off(type: 'sessionDestroy', callback?: () => void): void; /** * Register the active state of this session changed callback @@ -7166,15 +7817,27 @@ declare namespace avSession { * @atomicservice * @since 12 */ - on(type: 'activeStateChange', callback: (isActive: boolean) => void); + /** + * Register the active state of this session changed callback + * @param { 'activeStateChange' } type - 'activeStateChange' + * @param { function } callback - The callback used to handle the active state of this session changed event. + * The callback function provides the changed session state. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + on(type: 'activeStateChange', callback: (isActive: boolean) => void): void; /** * Unregister the active state of this session changed callback * @param { 'activeStateChange' } type - 'activeStateChange' * @param { function } callback - The callback used to handle the active state of this session changed event. - * The callback function provides the changed session state. + * The callback function provides the changed session state. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -7184,16 +7847,28 @@ declare namespace avSession { * Unregister the active state of this session changed callback * @param { 'activeStateChange' } type - 'activeStateChange' * @param { function } callback - The callback used to handle the active state of this session changed event. - * The callback function provides the changed session state. + * The callback function provides the changed session state. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - off(type: 'activeStateChange', callback?: (isActive: boolean) => void); + /** + * Unregister the active state of this session changed callback + * @param { 'activeStateChange' } type - 'activeStateChange' + * @param { function } callback - The callback used to handle the active state of this session changed event. + * The callback function provides the changed session state. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + off(type: 'activeStateChange', callback?: (isActive: boolean) => void): void; /** * Register the valid commands of the session changed callback @@ -7220,7 +7895,19 @@ declare namespace avSession { * @atomicservice * @since 12 */ - on(type: 'validCommandChange', callback: (commands: Array) => void); + /** + * Register the valid commands of the session changed callback + * @param { 'validCommandChange' } type - 'validCommandChange' + * @param { function } callback - The callback used to handle the changes. + * The callback function provides an array of AVControlCommandType. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + on(type: 'validCommandChange', callback: (commands: Array) => void): void; /** * Unregister the valid commands of the session changed callback @@ -7247,7 +7934,19 @@ declare namespace avSession { * @atomicservice * @since 12 */ - off(type: 'validCommandChange', callback?: (commands: Array) => void); + /** + * Unregister the valid commands of the session changed callback + * @param { 'validCommandChange' } type - 'validCommandChange' + * @param { function } callback - The callback used to handle the changes. + * The callback function provides an array of AVControlCommandType. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + off(type: 'validCommandChange', callback?: (commands: Array) => void): void; /** * Register session output device change callback @@ -7272,7 +7971,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'outputDeviceChange', callback: (state: ConnectionState, device: OutputDeviceInfo) => void): void; @@ -7299,7 +7999,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'outputDeviceChange', callback?: (state: ConnectionState, device: OutputDeviceInfo) => void): void; @@ -7307,9 +8008,9 @@ declare namespace avSession { * Register session event callback * @param { 'sessionEvent' } type - 'sessionEvent' * @param { function } callback - The callback used to handle session event changed event. - * The callback function provides the event string and key-value pair parameters. + * The callback function provides the event string and key-value pair parameters. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -7319,24 +8020,36 @@ declare namespace avSession { * Register session event callback * @param { 'sessionEvent' } type - 'sessionEvent' * @param { function } callback - The callback used to handle session event changed event. - * The callback function provides the event string and key-value pair parameters. + * The callback function provides the event string and key-value pair parameters. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - on(type: 'sessionEvent', callback: (sessionEvent: string, args: {[key: string]: Object}) => void): void; + /** + * Register session event callback + * @param { 'sessionEvent' } type - 'sessionEvent' + * @param { function } callback - The callback used to handle session event changed event. + * The callback function provides the event string and key-value pair parameters. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + on(type: 'sessionEvent', callback: (sessionEvent: string, args: Record) => void): void; /** * Unregister session event callback * @param { 'sessionEvent' } type - 'sessionEvent' * @param { function } callback - Used to cancel a specific listener - * The callback function provides the event string and key-value pair parameters. + * The callback function provides the event string and key-value pair parameters. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -7346,16 +8059,28 @@ declare namespace avSession { * Unregister session event callback * @param { 'sessionEvent' } type - 'sessionEvent' * @param { function } callback - Used to cancel a specific listener - * The callback function provides the event string and key-value pair parameters. + * The callback function provides the event string and key-value pair parameters. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - off(type: 'sessionEvent', callback?: (sessionEvent: string, args: {[key: string]: Object}) => void): void; + /** + * Unregister session event callback + * @param { 'sessionEvent' } type - 'sessionEvent' + * @param { function } callback - Used to cancel a specific listener + * The callback function provides the event string and key-value pair parameters. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + off(type: 'sessionEvent', callback?: (sessionEvent: string, args: Record) => void): void; /** * Register session playlist change callback @@ -7380,7 +8105,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'queueItemsChange', callback: (items: Array) => void): void; @@ -7407,7 +8133,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'queueItemsChange', callback?: (items: Array) => void): void; @@ -7434,7 +8161,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'queueTitleChange', callback: (title: string) => void): void; @@ -7461,7 +8189,8 @@ declare namespace avSession { * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'queueTitleChange', callback?: (title: string) => void): void; @@ -7469,9 +8198,9 @@ declare namespace avSession { * Register the custom media packets change callback * @param { 'extrasChange' } type - Registration Type 'extrasChange' * @param { function } callback - Used to handle custom media packets changed. - * The callback provides the new media packets. + * The callback provides the new media packets. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -7481,24 +8210,36 @@ declare namespace avSession { * Register the custom media packets change callback * @param { 'extrasChange' } type - Registration Type 'extrasChange' * @param { function } callback - Used to handle custom media packets changed. - * The callback provides the new media packets. + * The callback provides the new media packets. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - on(type: 'extrasChange', callback: (extras: {[key: string]: Object}) => void): void; + /** + * Register the custom media packets change callback + * @param { 'extrasChange' } type - Registration Type 'extrasChange' + * @param { function } callback - Used to handle custom media packets changed. + * The callback provides the new media packets. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + on(type: 'extrasChange', callback: (extras: Record) => void): void; /** * Unregister the custom media packets change callback * @param { 'extrasChange' } type - Registration Type 'extrasChange' * @param { function } callback - Used to handle custom media packets changed. - * The callback provides the new media packets. + * The callback provides the new media packets. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core @@ -7508,16 +8249,28 @@ declare namespace avSession { * Unregister the custom media packets change callback * @param { 'extrasChange' } type - Registration Type 'extrasChange' * @param { function } callback - Used to handle custom media packets changed. - * The callback provides the new media packets. + * The callback provides the new media packets. * @throws { BusinessError } 401 - parameter check failed. 1.Mandatory parameters are left unspecified. - * 2.Incorrect parameter types. + * 2.Incorrect parameter types. * @throws { BusinessError } 6600101 - Session service exception. * @throws { BusinessError } 6600103 - The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice * @since 12 */ - off(type: 'extrasChange', callback?: (extras: {[key: string]: Object}) => void): void; + /** + * Unregister the custom media packets change callback + * @param { 'extrasChange' } type - Registration Type 'extrasChange' + * @param { function } callback - Used to handle custom media packets changed. + * The callback provides the new media packets. + * @throws { BusinessError } 6600101 - Session service exception. + * @throws { BusinessError } 6600103 - The session controller does not exist. + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + off(type: 'extrasChange', callback?: (extras: Record) => void): void; } /** @@ -7556,12 +8309,13 @@ declare namespace avSession { /** * The type of control command, add new support 'playWithAssetId' * @typedef { 'play' | 'pause' | 'stop' | 'playNext' | 'playPrevious' | 'fastForward' | 'rewind' | 'seek' | - * 'setSpeed' | 'setLoopMode' | 'toggleFavorite' | 'playFromAssetId' | 'playWithAssetId' | 'answer' | 'hangUp' | - * 'toggleCallMute' | 'setTargetLoopMode' } AVControlCommandType - * @syscap SystemCapability.Multimedia.AVSession.Core - * @atomicservice - * @since 20 - */ + * 'setSpeed' | 'setLoopMode' | 'toggleFavorite' | 'playFromAssetId' | 'playWithAssetId' | 'answer' | 'hangUp' | + * 'toggleCallMute' | 'setTargetLoopMode'} AVControlCommandType + * @syscap SystemCapability.Multimedia.AVSession.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ type AVControlCommandType = 'play' | 'pause' | 'stop' | 'playNext' | 'playPrevious' | 'fastForward' | 'rewind' | 'seek' | 'setSpeed' | 'setLoopMode' | 'toggleFavorite' | 'playFromAssetId' | 'playWithAssetId' | 'answer' | 'hangUp' | 'toggleCallMute' | 'setTargetLoopMode'; @@ -7576,7 +8330,8 @@ declare namespace avSession { * @typedef AVControlCommand * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVControlCommand { /** @@ -7590,7 +8345,8 @@ declare namespace avSession { * @type { AVControlCommandType } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ command: AVControlCommandType; @@ -7612,26 +8368,28 @@ declare namespace avSession { * setLoopMode command requires a {@link LoopMode} parameter. * toggleFavorite command requires assetId {@link AVMetadata.assetId} parameter * other commands need no parameter - * @type { ?(LoopMode | string | number) } + * @type { ?(LoopMode | string | double) } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - parameter?: LoopMode | string | number; + parameter?: LoopMode | string | double; } /** * Enumerates ErrorCode types, returns in BusinessError.code. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Core * @since 10 */ /** * Enumerates ErrorCode types, returns in BusinessError.code. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AVSessionErrorCode { /** @@ -7643,7 +8401,8 @@ declare namespace avSession { * Session service exception. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_SERVICE_EXCEPTION = 6600101, @@ -7656,7 +8415,8 @@ declare namespace avSession { * The session does not exist * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_SESSION_NOT_EXIST = 6600102, @@ -7669,7 +8429,8 @@ declare namespace avSession { * The session controller does not exist. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CONTROLLER_NOT_EXIST = 6600103, @@ -7682,7 +8443,8 @@ declare namespace avSession { * The remote session connection failed. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_REMOTE_CONNECTION_ERR = 6600104, @@ -7695,7 +8457,8 @@ declare namespace avSession { * Invalid session command. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_COMMAND_INVALID = 6600105, @@ -7708,7 +8471,8 @@ declare namespace avSession { * The session is not activated. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_SESSION_INACTIVE = 6600106, @@ -7721,7 +8485,8 @@ declare namespace avSession { * Too many commands or events. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_MESSAGE_OVERLOAD = 6600107, @@ -7734,7 +8499,8 @@ declare namespace avSession { * Device connecting failed. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_DEVICE_CONNECTION_FAILED = 6600108, @@ -7747,7 +8513,8 @@ declare namespace avSession { * The remote connection is not established. * @syscap SystemCapability.Multimedia.AVSession.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_REMOTE_CONNECTION_NOT_EXIST = 6600109, @@ -7755,7 +8522,8 @@ declare namespace avSession { * The error code for cast control is unspecified. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_UNSPECIFIED = 6611000, @@ -7763,7 +8531,8 @@ declare namespace avSession { * An unspecified error occurs in the remote player. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_REMOTE_ERROR = 6611001, @@ -7771,7 +8540,8 @@ declare namespace avSession { * The playback position falls behind the live window. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_BEHIND_LIVE_WINDOW = 6611002, @@ -7779,7 +8549,8 @@ declare namespace avSession { * The process of cast control times out. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_TIMEOUT = 6611003, @@ -7787,7 +8558,8 @@ declare namespace avSession { * The runtime check failed. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_RUNTIME_CHECK_FAILED = 6611004, @@ -7795,7 +8567,8 @@ declare namespace avSession { * Cross-device data transmission is locked. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_PLAYER_NOT_WORKING = 6611100, @@ -7803,7 +8576,8 @@ declare namespace avSession { * The specified seek mode is not supported. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_SEEK_MODE_UNSUPPORTED = 6611101, @@ -7811,7 +8585,8 @@ declare namespace avSession { * The position to seek to is out of the range of the media asset or the specified seek mode is not supported. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_ILLEGAL_SEEK_TARGET = 6611102, @@ -7819,7 +8594,8 @@ declare namespace avSession { * The specified playback mode is not supported. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_PLAY_MODE_UNSUPPORTED = 6611103, @@ -7827,7 +8603,8 @@ declare namespace avSession { * The specified playback speed is not supported. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_PLAY_SPEED_UNSUPPORTED = 6611104, @@ -7835,7 +8612,8 @@ declare namespace avSession { * The action failed because either the media source device or the media sink device has been revoked. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DEVICE_MISSING = 6611105, @@ -7843,7 +8621,8 @@ declare namespace avSession { * The parameter is invalid, for example, the url is illegal to play. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_INVALID_PARAM = 6611106, @@ -7851,7 +8630,8 @@ declare namespace avSession { * Allocation of memory failed. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_NO_MEMORY = 6611107, @@ -7859,7 +8639,8 @@ declare namespace avSession { * Operation is not allowed. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_OPERATION_NOT_ALLOWED = 6611108, @@ -7867,7 +8648,8 @@ declare namespace avSession { * An unspecified input/output error occurs. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_UNSPECIFIED = 6612000, @@ -7875,7 +8657,8 @@ declare namespace avSession { * Network connection failure. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_NETWORK_CONNECTION_FAILED = 6612001, @@ -7883,7 +8666,8 @@ declare namespace avSession { * Network timeout. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_NETWORK_CONNECTION_TIMEOUT = 6612002, @@ -7891,7 +8675,8 @@ declare namespace avSession { * Invalid "Content-Type" HTTP header. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_INVALID_HTTP_CONTENT_TYPE = 6612003, @@ -7899,7 +8684,8 @@ declare namespace avSession { * The HTTP server returns an unexpected HTTP response status code. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_BAD_HTTP_STATUS = 6612004, @@ -7907,7 +8693,8 @@ declare namespace avSession { * The file does not exist. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_FILE_NOT_FOUND = 6612005, @@ -7915,7 +8702,8 @@ declare namespace avSession { * No permission is granted to perform the IO operation. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_NO_PERMISSION = 6612006, @@ -7923,7 +8711,8 @@ declare namespace avSession { * Access to cleartext HTTP traffic is not allowed by the app's network security configuration. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_CLEARTEXT_NOT_PERMITTED = 6612007, @@ -7931,7 +8720,8 @@ declare namespace avSession { * Reading data out of the data bound. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_READ_POSITION_OUT_OF_RANGE = 6612008, @@ -7939,7 +8729,8 @@ declare namespace avSession { * The media does not contain any contents that can be played. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_NO_CONTENTS = 6612100, @@ -7947,7 +8738,8 @@ declare namespace avSession { * The media cannot be read, for example, because of dust or scratches. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_READ_ERROR = 6612101, @@ -7955,7 +8747,8 @@ declare namespace avSession { * This resource is already in use. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_CONTENT_BUSY = 6612102, @@ -7963,7 +8756,8 @@ declare namespace avSession { * The content using the validity interval has expired. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_CONTENT_EXPIRED = 6612103, @@ -7971,7 +8765,8 @@ declare namespace avSession { * Using the requested content to play is not allowed. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_USE_FORBIDDEN = 6612104, @@ -7979,7 +8774,8 @@ declare namespace avSession { * The use of the allowed content cannot be verified. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_NOT_VERIFIED = 6612105, @@ -7987,7 +8783,8 @@ declare namespace avSession { * The number of times this content has been used as requested has reached the maximum allowed number of uses. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_EXHAUSTED_ALLOWED_USES = 6612106, @@ -7995,7 +8792,8 @@ declare namespace avSession { * An error occurs when sending packet from source device to sink device. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_IO_NETWORK_PACKET_SENDING_FAILED = 6612107, @@ -8003,7 +8801,8 @@ declare namespace avSession { * Unspecified error related to content parsing. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_PARSING_UNSPECIFIED = 6613000, @@ -8011,7 +8810,8 @@ declare namespace avSession { * Parsing error associated with media container format bit streams. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_PARSING_CONTAINER_MALFORMED = 6613001, @@ -8019,7 +8819,8 @@ declare namespace avSession { * Parsing error associated with the media manifest. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_PARSING_MANIFEST_MALFORMED = 6613002, @@ -8028,7 +8829,8 @@ declare namespace avSession { * or an unsupported media container feature. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_PARSING_CONTAINER_UNSUPPORTED = 6613003, @@ -8036,7 +8838,8 @@ declare namespace avSession { * Unsupported feature in the media manifest. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_PARSING_MANIFEST_UNSUPPORTED = 6613004, @@ -8044,7 +8847,8 @@ declare namespace avSession { * Unspecified decoding error. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DECODING_UNSPECIFIED = 6614000, @@ -8052,7 +8856,8 @@ declare namespace avSession { * Decoder initialization failed. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DECODING_INIT_FAILED = 6614001, @@ -8060,7 +8865,8 @@ declare namespace avSession { * Decoder query failed. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DECODING_QUERY_FAILED = 6614002, @@ -8068,7 +8874,8 @@ declare namespace avSession { * Decoding the media samples failed. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DECODING_FAILED = 6614003, @@ -8076,7 +8883,8 @@ declare namespace avSession { * The format of the content to decode exceeds the capabilities of the device. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DECODING_FORMAT_EXCEEDS_CAPABILITIES = 6614004, @@ -8084,7 +8892,8 @@ declare namespace avSession { * The format of the content to decode is not supported. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DECODING_FORMAT_UNSUPPORTED = 6614005, @@ -8092,7 +8901,8 @@ declare namespace avSession { * Unspecified errors related to the audio renderer. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_AUDIO_RENDERER_UNSPECIFIED = 6615000, @@ -8100,7 +8910,8 @@ declare namespace avSession { * Initializing the audio renderer failed. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_AUDIO_RENDERER_INIT_FAILED = 6615001, @@ -8108,7 +8919,8 @@ declare namespace avSession { * The audio renderer fails to write data. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_AUDIO_RENDERER_WRITE_FAILED = 6615002, @@ -8116,7 +8928,8 @@ declare namespace avSession { * Unspecified error related to DRM. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DRM_UNSPECIFIED = 6616000, @@ -8124,7 +8937,8 @@ declare namespace avSession { * The chosen DRM protection scheme is not supported by the device. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DRM_SCHEME_UNSUPPORTED = 6616001, @@ -8132,7 +8946,8 @@ declare namespace avSession { * Device provisioning failed. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DRM_PROVISIONING_FAILED = 6616002, @@ -8140,7 +8955,8 @@ declare namespace avSession { * The DRM-protected content to play is incompatible. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DRM_CONTENT_ERROR = 6616003, @@ -8148,7 +8964,8 @@ declare namespace avSession { * Failed to obtain a license. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DRM_LICENSE_ACQUISITION_FAILED = 6616004, @@ -8156,7 +8973,8 @@ declare namespace avSession { * The operation is disallowed by the license policy. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DRM_DISALLOWED_OPERATION = 6616005, @@ -8164,7 +8982,8 @@ declare namespace avSession { * An error occurs in the DRM system. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DRM_SYSTEM_ERROR = 6616006, @@ -8172,7 +8991,8 @@ declare namespace avSession { * The device has revoked DRM privileges. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DRM_DEVICE_REVOKED = 6616007, @@ -8180,7 +9000,8 @@ declare namespace avSession { * The DRM license being loaded into the open DRM session has expired. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DRM_LICENSE_EXPIRED = 6616008, @@ -8188,7 +9009,8 @@ declare namespace avSession { * An error occurs when the DRM processes the key response. * @syscap SystemCapability.Multimedia.AVSession.AVCast * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ERR_CODE_CAST_CONTROL_DRM_PROVIDE_KEY_RESPONSE_ERROR = 6616100, } diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts index c4eac85b28d0622b8ae4db07c4cdd630c2b0df0e..79e4f95f6b15707b6aee9e942c90f1e82695a290 100644 --- a/api/@ohos.multimedia.camera.d.ts +++ b/api/@ohos.multimedia.camera.d.ts @@ -33,7 +33,8 @@ import photoAccessHelper from './@ohos.file.photoAccessHelper'; * @namespace camera * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace camera { /** @@ -55,24 +56,26 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ function getCameraManager(context: Context): CameraManager; /** * Enum for camera status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Enum for camera status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum CameraStatus { /** @@ -86,7 +89,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_STATUS_APPEAR = 0, @@ -101,7 +105,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_STATUS_DISAPPEAR = 1, @@ -116,7 +121,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_STATUS_AVAILABLE = 2, @@ -131,7 +137,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_STATUS_UNAVAILABLE = 3 } @@ -139,17 +146,18 @@ declare namespace camera { /** * Enum for fold status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 12 */ /** * Enum for fold status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum FoldStatus { /** @@ -163,7 +171,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ NON_FOLDABLE = 0, @@ -178,7 +187,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ EXPANDED = 1, @@ -193,7 +203,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ FOLDED = 2 } @@ -211,7 +222,8 @@ declare namespace camera { * @typedef Profile * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface Profile { /** @@ -229,7 +241,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly format: CameraFormat; @@ -248,7 +261,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly size: Size; } @@ -266,13 +280,14 @@ declare namespace camera { * @typedef FrameRateRange * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface FrameRateRange { /** * Min frame rate. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 @@ -280,18 +295,19 @@ declare namespace camera { /** * Min frame rate. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly min: number; + readonly min: int; /** * Max frame rate. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 @@ -299,13 +315,14 @@ declare namespace camera { /** * Max frame rate. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly max: number; + readonly max: int; } /** @@ -323,7 +340,8 @@ declare namespace camera { * @typedef VideoProfile * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface VideoProfile extends Profile { /** @@ -341,7 +359,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly frameRateRange: FrameRateRange; } @@ -359,7 +378,8 @@ declare namespace camera { * @typedef CameraOutputCapability * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface CameraOutputCapability { /** @@ -377,7 +397,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly previewProfiles: Array; @@ -396,7 +417,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly photoProfiles: Array; @@ -415,7 +437,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly videoProfiles: Array; @@ -426,7 +449,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly depthProfiles: Array; @@ -445,7 +469,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly supportedMetadataObjectTypes: Array; } @@ -453,17 +478,18 @@ declare namespace camera { /** * Enum for camera error code. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Enum for camera error code. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum CameraErrorCode { /** @@ -477,7 +503,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ INVALID_ARGUMENT = 7400101, @@ -492,7 +519,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ OPERATION_NOT_ALLOWED = 7400102, @@ -507,7 +535,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ SESSION_NOT_CONFIG = 7400103, @@ -522,7 +551,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ SESSION_NOT_RUNNING = 7400104, @@ -537,7 +567,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ SESSION_CONFIG_LOCKED = 7400105, @@ -552,7 +583,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ DEVICE_SETTING_LOCKED = 7400106, @@ -567,7 +599,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CONFLICT_CAMERA = 7400107, @@ -582,7 +615,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ DEVICE_DISABLED = 7400108, @@ -597,7 +631,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ DEVICE_PREEMPTED = 7400109, @@ -612,7 +647,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ UNRESOLVED_CONFLICTS_WITH_CURRENT_CONFIGURATIONS = 7400110, @@ -621,7 +657,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ DEVICE_FREQUENTLY_SWITCHED = 7400111, @@ -630,7 +667,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_LENS_RETRACTED = 7400112, @@ -645,7 +683,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ SERVICE_FATAL_ERROR = 7400201 } @@ -653,10 +692,11 @@ declare namespace camera { /** * Enum for restore parameter. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum RestoreParamType { /** @@ -664,7 +704,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NO_NEED_RESTORE_PARAM = 0, @@ -673,7 +714,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PRESISTENT_DEFAULT_PARAM = 1, @@ -682,7 +724,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TRANSIENT_ACTIVE_PARAM = 2 } @@ -693,38 +736,42 @@ declare namespace camera { * @typedef SettingParam * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface SettingParam { /** * Skin smooth level value for restore. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - skinSmoothLevel: number; + skinSmoothLevel: int; /** * Face slender value for restore. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - faceSlender: number; + faceSlender: int; /** * Skin tone value for restore. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - skinTone: number; + skinTone: int; } /** @@ -733,7 +780,8 @@ declare namespace camera { * @typedef PrelaunchConfig * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface PrelaunchConfig { /** @@ -742,7 +790,8 @@ declare namespace camera { * @type { CameraDevice } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ cameraDevice: CameraDevice; @@ -752,19 +801,21 @@ declare namespace camera { * @type { ?RestoreParamType } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ restoreParamType?: RestoreParamType; /** * Begin active time. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - activeTime?: number; + activeTime?: int; /** * Setting parameter. @@ -772,7 +823,8 @@ declare namespace camera { * @type { ?SettingParam } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ settingParam?: SettingParam; } @@ -790,7 +842,8 @@ declare namespace camera { * @interface CameraManager * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface CameraManager { /** @@ -806,7 +859,8 @@ declare namespace camera { * @returns { Array } An array of supported cameras. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedCameras(): Array; @@ -838,7 +892,8 @@ declare namespace camera { * @returns { Array } An array of supported scene mode of camera. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedSceneModes(camera: CameraDevice): Array; @@ -859,7 +914,8 @@ declare namespace camera { * @returns { CameraOutputCapability } The camera output capability. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedOutputCapability(camera: CameraDevice, mode: SceneMode): CameraOutputCapability; @@ -876,7 +932,8 @@ declare namespace camera { * @returns { boolean } Is camera muted. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ isCameraMuted(): boolean; @@ -895,7 +952,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ isCameraMuteSupported(): boolean; @@ -922,7 +980,8 @@ declare namespace camera { * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ muteCameraPersistent(mute: boolean, type: PolicyType): void; @@ -964,7 +1023,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createCameraInput(camera: CameraDevice): CameraInput; @@ -1009,7 +1069,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createCameraInput(position: CameraPosition, type: CameraType): CameraInput; @@ -1045,7 +1106,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createPreviewOutput(profile: Profile, surfaceId: string): PreviewOutput; @@ -1072,7 +1134,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createPreviewOutput(surfaceId: string): PreviewOutput; @@ -1131,7 +1194,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createPhotoOutput(profile?: Profile): PhotoOutput; @@ -1167,7 +1231,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createVideoOutput(profile: VideoProfile, surfaceId: string): VideoOutput; @@ -1194,7 +1259,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createVideoOutput(surfaceId: string): VideoOutput; @@ -1227,7 +1293,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createMetadataOutput(metadataObjectTypes: Array): MetadataOutput; @@ -1240,7 +1307,8 @@ declare namespace camera { * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ createDepthDataOutput(profile: DepthProfile): DepthDataOutput; @@ -1281,7 +1349,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ createSession(mode: SceneMode): T; @@ -1304,7 +1373,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getCameraDevice(position: CameraPosition, type: CameraType): CameraDevice; @@ -1327,7 +1397,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getCameraConcurrentInfos(cameras: Array): Array; @@ -1350,7 +1421,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the camera status change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'cameraStatus', callback: AsyncCallback): void; @@ -1369,7 +1441,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the camera status change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'cameraStatus', callback?: AsyncCallback): void; @@ -1391,7 +1464,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the fold status change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'foldStatusChange', callback: AsyncCallback): void; @@ -1410,7 +1484,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the fold status change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'foldStatusChange', callback?: AsyncCallback): void; @@ -1431,7 +1506,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'cameraMute', callback: AsyncCallback): void; @@ -1452,7 +1528,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'cameraMute', callback?: AsyncCallback): void; @@ -1477,7 +1554,8 @@ declare namespace camera { * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isPrelaunchSupported(camera: CameraDevice): boolean; @@ -1505,7 +1583,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setPrelaunchConfig(prelaunchConfig: PrelaunchConfig): void; @@ -1524,7 +1603,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ prelaunch(): void; @@ -1549,7 +1629,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preSwitchCamera(cameraId: string): void; @@ -1574,7 +1655,8 @@ declare namespace camera { * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ createDeferredPreviewOutput(profile?: Profile): PreviewOutput; @@ -1591,7 +1673,8 @@ declare namespace camera { * @returns { boolean } this value that specifies whether the device has a torch. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ isTorchSupported(): boolean; @@ -1608,7 +1691,8 @@ declare namespace camera { * @returns { boolean } is torch mode supported. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ isTorchModeSupported(mode: TorchMode): boolean; @@ -1625,7 +1709,8 @@ declare namespace camera { * @returns { TorchMode } torch mode. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getTorchMode(): TorchMode; @@ -1664,7 +1749,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setTorchMode(mode: TorchMode): void; @@ -1687,7 +1773,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the torch status change * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'torchStatusChange', callback: AsyncCallback): void; @@ -1706,7 +1793,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the torch status change * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'torchStatusChange', callback?: AsyncCallback): void; } @@ -1724,7 +1812,8 @@ declare namespace camera { * @typedef TorchStatusInfo * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface TorchStatusInfo { /** @@ -1742,7 +1831,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly isTorchAvailable: boolean; @@ -1762,14 +1852,15 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly isTorchActive: boolean; /** * the current torch brightness level. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 @@ -1777,29 +1868,31 @@ declare namespace camera { /** * Flashlight brightness level, value range is [0,1], the closer to 1, the brighter it is. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly torchLevel: number; + readonly torchLevel: double; } /** * Enum for torch mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 */ /** * Enum for torch mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum TorchMode { /** @@ -1813,7 +1906,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ OFF = 0, @@ -1828,7 +1922,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ ON = 1, @@ -1843,7 +1938,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 2 } @@ -1861,7 +1957,8 @@ declare namespace camera { * @typedef CameraStatusInfo * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface CameraStatusInfo { /** @@ -1877,7 +1974,8 @@ declare namespace camera { * @type { CameraDevice } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ camera: CameraDevice; @@ -1894,7 +1992,8 @@ declare namespace camera { * @type { CameraStatus } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ status: CameraStatus; } @@ -1912,7 +2011,8 @@ declare namespace camera { * @typedef FoldStatusInfo * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface FoldStatusInfo { /** @@ -1930,7 +2030,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly supportedCameras: Array; @@ -1949,7 +2050,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly foldStatus: FoldStatus; } @@ -1957,17 +2059,18 @@ declare namespace camera { /** * Enum for camera position. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Enum for camera position. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum CameraPosition { /** @@ -1981,7 +2084,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_POSITION_UNSPECIFIED = 0, @@ -1996,7 +2100,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_POSITION_BACK = 1, @@ -2011,7 +2116,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_POSITION_FRONT = 2, @@ -2035,17 +2141,18 @@ declare namespace camera { /** * Enum for camera type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Enum for camera type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum CameraType { /** @@ -2059,7 +2166,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_TYPE_DEFAULT = 0, @@ -2074,7 +2182,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_TYPE_WIDE_ANGLE = 1, @@ -2089,7 +2198,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_TYPE_ULTRA_WIDE = 2, @@ -2104,7 +2214,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_TYPE_TELEPHOTO = 3, @@ -2119,7 +2230,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_TYPE_TRUE_DEPTH = 4 } @@ -2127,17 +2239,18 @@ declare namespace camera { /** * Enum for camera connection type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Enum for camera connection type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum ConnectionType { /** @@ -2151,7 +2264,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_CONNECTION_BUILT_IN = 0, @@ -2166,7 +2280,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_CONNECTION_USB_PLUGIN = 1, @@ -2181,7 +2296,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_CONNECTION_REMOTE = 2 } @@ -2189,7 +2305,7 @@ declare namespace camera { /** * Enum for remote camera device type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 10 @@ -2197,17 +2313,18 @@ declare namespace camera { /** * Enum for remote camera device type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 15 */ /** * Enum for remote camera device type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum HostDeviceType { /** @@ -2228,7 +2345,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN_TYPE = 0, @@ -2250,7 +2368,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ PHONE = 0x0E, @@ -2272,7 +2391,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ TABLET = 0x11 } @@ -2290,7 +2410,8 @@ declare namespace camera { * @typedef CameraDevice * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface CameraDevice { /** @@ -2308,7 +2429,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly cameraId: string; @@ -2327,7 +2449,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly cameraPosition: CameraPosition; @@ -2346,7 +2469,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly cameraType: CameraType; @@ -2365,7 +2489,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly connectionType: ConnectionType; @@ -2393,7 +2518,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly hostDeviceName: string; @@ -2421,14 +2547,15 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly hostDeviceType: HostDeviceType; /** * Camera sensor orientation attribute. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @since 12 @@ -2436,13 +2563,14 @@ declare namespace camera { /** * The camera mounting angle, which does not change with screen rotation, takes values from 0° to 360° in degrees. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly cameraOrientation: number; + readonly cameraOrientation: int; /** * Camera device retractable attribute @@ -2451,7 +2579,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ readonly isRetractable?: boolean; } @@ -2469,42 +2598,45 @@ declare namespace camera { * @typedef Size * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface Size { /** * Height. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Height. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - height: number; + height: int; /** * Width. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Width. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - width: number; + width: int; } /** @@ -2520,42 +2652,45 @@ declare namespace camera { * @typedef Point * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface Point { /** * x co-ordinate * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * x co-ordinate * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - x: number; + x: double; /** * y co-ordinate * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * y co-ordinate * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - y: number; + y: double; } /** @@ -2571,7 +2706,8 @@ declare namespace camera { * @interface CameraInput * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface CameraInput { /** @@ -2593,7 +2729,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ open(callback: AsyncCallback): void; @@ -2618,7 +2755,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ open(): Promise; @@ -2644,7 +2782,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ open(isSecureEnabled: boolean): Promise; @@ -2671,7 +2810,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ open(type: CameraConcurrentType): Promise; @@ -2690,7 +2830,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ close(callback: AsyncCallback): void; @@ -2709,23 +2850,25 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ close(): Promise; /** * Delay close camera. * - * @param { number } time - delay time for turning off camera. + * @param { int } time - delay time for turning off camera. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - closeDelayed(time: number): Promise; + closeDelayed(time: int): Promise; /** * Subscribes to error events. @@ -2748,7 +2891,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the camera input errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void; @@ -2769,7 +2913,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the camera input errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', camera: CameraDevice, callback?: ErrorCallback): void; @@ -2781,7 +2926,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'cameraOcclusionDetection', callback: AsyncCallback): void; @@ -2793,7 +2939,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'cameraOcclusionDetection', callback?: AsyncCallback): void; @@ -2806,7 +2953,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ usedAsPosition(position: CameraPosition): void; @@ -2821,7 +2969,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ controlAuxiliary(auxiliaryType: AuxiliaryType, auxiliaryStatus: AuxiliaryStatus): Promise; } @@ -2829,17 +2978,18 @@ declare namespace camera { /** * Enumerates the camera scene modes. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 */ /** * Enumerates the camera scene modes. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum SceneMode { /** @@ -2853,7 +3003,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL_PHOTO = 1, @@ -2868,7 +3019,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL_VIDEO = 2, @@ -2877,7 +3029,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PORTRAIT_PHOTO = 3, @@ -2886,7 +3039,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NIGHT_PHOTO = 4, @@ -2895,7 +3049,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PROFESSIONAL_PHOTO = 5, @@ -2904,7 +3059,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PROFESSIONAL_VIDEO = 6, @@ -2913,7 +3069,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SLOW_MOTION_VIDEO = 7, @@ -2922,7 +3079,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MACRO_PHOTO = 8, @@ -2931,7 +3089,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MACRO_VIDEO = 9, @@ -2940,7 +3099,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LIGHT_PAINTING_PHOTO = 10, @@ -2949,7 +3109,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HIGH_RESOLUTION_PHOTO = 11, @@ -2964,7 +3125,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ SECURE_PHOTO = 12, @@ -2973,7 +3135,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ QUICK_SHOT_PHOTO = 13, @@ -2982,7 +3145,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ APERTURE_VIDEO = 14, @@ -2991,7 +3155,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PANORAMA_PHOTO = 15, @@ -3000,7 +3165,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TIME_LAPSE_PHOTO = 16, @@ -3009,7 +3175,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ FLUORESCENCE_PHOTO = 17 } @@ -3017,17 +3184,18 @@ declare namespace camera { /** * Enum for camera format type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Enum for camera format type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum CameraFormat { /** @@ -3041,7 +3209,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_FORMAT_RGBA_8888 = 3, @@ -3050,7 +3219,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_FORMAT_DNG = 4, @@ -3059,7 +3229,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_FORMAT_DNG_XDRAW = 5, @@ -3074,7 +3245,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_FORMAT_YUV_420_SP = 1003, @@ -3089,7 +3261,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_FORMAT_JPEG = 2000, @@ -3104,7 +3277,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_FORMAT_YCBCR_P010, @@ -3119,7 +3293,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_FORMAT_YCRCB_P010, @@ -3134,7 +3309,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_FORMAT_HEIC = 2003, @@ -3143,7 +3319,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_FORMAT_DEPTH_16 = 3000, @@ -3152,7 +3329,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_FORMAT_DEPTH_32 = 3001 } @@ -3160,17 +3338,18 @@ declare namespace camera { /** * Enum for flash mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Enum for flash mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum FlashMode { /** @@ -3184,7 +3363,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ FLASH_MODE_CLOSE = 0, @@ -3199,7 +3379,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ FLASH_MODE_OPEN = 1, @@ -3214,7 +3395,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ FLASH_MODE_AUTO = 2, @@ -3229,7 +3411,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ FLASH_MODE_ALWAYS_OPEN = 3 } @@ -3240,7 +3423,8 @@ declare namespace camera { * @typedef LcdFlashStatus * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface LcdFlashStatus { /** @@ -3250,20 +3434,22 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly isLcdFlashNeeded: boolean; /** * Compensate value for lcd flash. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly lcdCompensation: number; + readonly lcdCompensation: int; } /** @@ -3279,7 +3465,8 @@ declare namespace camera { * @interface FlashQuery * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface FlashQuery { /** @@ -3307,7 +3494,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ hasFlash(): boolean; @@ -3339,7 +3527,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ isFlashModeSupported(flashMode: FlashMode): boolean; @@ -3351,7 +3540,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isLcdFlashSupported(): boolean; } @@ -3371,7 +3561,8 @@ declare namespace camera { * @interface Flash * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface Flash extends FlashQuery { /** @@ -3389,7 +3580,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getFlashMode(): FlashMode; @@ -3408,7 +3600,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setFlashMode(flashMode: FlashMode): void; @@ -3420,7 +3613,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableLcdFlash(enabled: boolean): void; } @@ -3428,17 +3622,18 @@ declare namespace camera { /** * Enum for exposure mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Enum for exposure mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum ExposureMode { /** @@ -3452,7 +3647,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ EXPOSURE_MODE_LOCKED = 0, @@ -3467,7 +3663,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ EXPOSURE_MODE_AUTO = 1, @@ -3482,7 +3679,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ EXPOSURE_MODE_CONTINUOUS_AUTO = 2, @@ -3491,7 +3689,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EXPOSURE_MODE_MANUAL = 3 } @@ -3499,10 +3698,11 @@ declare namespace camera { /** * Enum for exposure metering mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum ExposureMeteringMode { /** @@ -3510,7 +3710,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MATRIX = 0, @@ -3519,7 +3720,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CENTER = 1, @@ -3528,7 +3730,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPOT = 2 } @@ -3546,7 +3749,8 @@ declare namespace camera { * @interface AutoExposureQuery * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface AutoExposureQuery { /** @@ -3577,14 +3781,15 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ isExposureModeSupported(aeMode: ExposureMode): boolean; /** * Query the exposure compensation range. * - * @returns { Array } The array of compensation range. + * @returns { Array } The array of compensation range. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 @@ -3593,7 +3798,7 @@ declare namespace camera { * Query the exposure compensation range. * Move to AutoExposureQuery interface from AutoExposure interface since 12. * - * @returns { Array } The array of compensation range. + * @returns { Array } The array of compensation range. * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @since 12 @@ -3602,13 +3807,14 @@ declare namespace camera { * Query the exposure compensation range. * Move to AutoExposureQuery interface from AutoExposure interface since 12. * - * @returns { Array } The array of compensation range. + * @returns { Array } The array of compensation range. * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - getExposureBiasRange(): Array; + getExposureBiasRange(): Array; /** * Checks whether a specified exposure metering mode is supported. @@ -3620,7 +3826,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isExposureMeteringModeSupported(aeMeteringMode: ExposureMeteringMode): boolean; } @@ -3640,7 +3847,8 @@ declare namespace camera { * @interface AutoExposure * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface AutoExposure extends AutoExposureQuery { /** @@ -3658,7 +3866,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getExposureMode(): ExposureMode; @@ -3678,7 +3887,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setExposureMode(aeMode: ExposureMode): void; @@ -3697,7 +3907,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getMeteringPoint(): Point; @@ -3716,14 +3927,15 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setMeteringPoint(point: Point): void; /** * Set exposure compensation. * - * @param { number } exposureBias - Exposure compensation + * @param { double } exposureBias - Exposure compensation * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 @@ -3731,7 +3943,7 @@ declare namespace camera { /** * Set exposure compensation. * - * @param { number } exposureBias - Exposure compensation + * @param { double } exposureBias - Exposure compensation * @throws { BusinessError } 7400102 - Operation not allowed. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core @@ -3740,19 +3952,20 @@ declare namespace camera { /** * Set exposure compensation. * - * @param { number } exposureBias - Exposure compensation + * @param { double } exposureBias - Exposure compensation * @throws { BusinessError } 7400102 - Operation not allowed. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - setExposureBias(exposureBias: number): void; + setExposureBias(exposureBias: double): void; /** * Query the exposure value. * - * @returns { number } The exposure value. + * @returns { double } The exposure value. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 @@ -3760,13 +3973,14 @@ declare namespace camera { /** * Query the exposure value. * - * @returns { number } The exposure value. + * @returns { double } The exposure value. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - getExposureValue(): number; + getExposureValue(): double; /** * Gets current exposure metering mode. @@ -3776,7 +3990,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getExposureMeteringMode(): ExposureMeteringMode; @@ -3789,7 +4004,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setExposureMeteringMode(aeMeteringMode: ExposureMeteringMode): void; } @@ -3797,17 +4013,18 @@ declare namespace camera { /** * Enum for focus mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Enum for focus mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum FocusMode { /** @@ -3821,7 +4038,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ FOCUS_MODE_MANUAL = 0, @@ -3836,7 +4054,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ FOCUS_MODE_CONTINUOUS_AUTO = 1, @@ -3851,7 +4070,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ FOCUS_MODE_AUTO = 2, @@ -3866,7 +4086,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ FOCUS_MODE_LOCKED = 3 } @@ -3874,17 +4095,18 @@ declare namespace camera { /** * Enum for focus state. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Enum for focus state. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum FocusState { /** @@ -3898,7 +4120,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ FOCUS_STATE_SCAN = 0, @@ -3913,7 +4136,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ FOCUS_STATE_FOCUSED = 1, @@ -3928,7 +4152,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ FOCUS_STATE_UNFOCUSED = 2 } @@ -3936,10 +4161,11 @@ declare namespace camera { /** * Enum for focus range type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ enum FocusRangeType { /** @@ -3947,7 +4173,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -3956,7 +4183,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ NEAR = 1 } @@ -3964,10 +4192,11 @@ declare namespace camera { /** * Enum for focus driven type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ enum FocusDrivenType { /** @@ -3975,7 +4204,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -3984,7 +4214,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ FACE = 1 } @@ -3992,10 +4223,11 @@ declare namespace camera { /** * Enum for focus tracking mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ enum FocusTrackingMode { /** @@ -4003,7 +4235,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0 } @@ -4014,7 +4247,8 @@ declare namespace camera { * @typedef FocusTrackingInfo * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface FocusTrackingInfo { /** @@ -4023,7 +4257,8 @@ declare namespace camera { * @type { FocusTrackingMode } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ trackingMode: FocusTrackingMode; @@ -4033,7 +4268,8 @@ declare namespace camera { * @type { Rect } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ trackingRegion: Rect; } @@ -4051,7 +4287,8 @@ declare namespace camera { * @interface FocusQuery * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface FocusQuery { /** @@ -4082,7 +4319,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ isFocusModeSupported(afMode: FocusMode): boolean; @@ -4110,7 +4348,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ isFocusRangeTypeSupported(type: FocusRangeType): boolean; @@ -4126,7 +4365,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ isFocusDrivenTypeSupported(type: FocusDrivenType): boolean; } @@ -4146,7 +4386,8 @@ declare namespace camera { * @interface Focus * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface Focus extends FocusQuery { /** @@ -4164,7 +4405,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getFocusMode(): FocusMode; @@ -4183,7 +4425,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setFocusMode(afMode: FocusMode): void; @@ -4202,7 +4445,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setFocusPoint(point: Point): void; @@ -4222,14 +4466,15 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getFocusPoint(): Point; /** * Gets current focal length. * - * @returns { number } The current focal point. + * @returns { double } The current focal point. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 @@ -4237,13 +4482,14 @@ declare namespace camera { /** * Gets current focal length. * - * @returns { number } The current focal point. + * @returns { double } The current focal point. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - getFocalLength(): number; + getFocalLength(): double; /** * Gets current focus assist. @@ -4266,7 +4512,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setFocusAssist(enabled: boolean): void; @@ -4278,7 +4525,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ getFocusRange(): FocusRangeType; @@ -4295,7 +4543,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ setFocusRange(type: FocusRangeType): void; @@ -4307,7 +4556,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ getFocusDriven(): FocusDrivenType; @@ -4324,7 +4574,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ setFocusDriven(type: FocusDrivenType): void; } @@ -4335,39 +4586,42 @@ declare namespace camera { * @interface ManualFocus * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ManualFocus { /** * Gets current focus distance. * - * @returns { number } The current focus distance. + * @returns { double } The current focus distance. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getFocusDistance(): number; + getFocusDistance(): double; /** * Sets focus distance. * - * @param { number } distance - Focus distance + * @param { double } distance - Focus distance * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setFocusDistance(distance: number): void; + setFocusDistance(distance: double): void; } /** * Enumerates the camera white balance modes. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 12 @@ -4375,10 +4629,11 @@ declare namespace camera { /** * Enumerates the camera white balance modes. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ enum WhiteBalanceMode { /** @@ -4391,7 +4646,8 @@ declare namespace camera { * Automatic white balance mode. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -4407,7 +4663,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ CLOUDY = 1, @@ -4423,7 +4680,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ INCANDESCENT = 2, @@ -4439,7 +4697,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ FLUORESCENT = 3, @@ -4455,7 +4714,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ DAYLIGHT = 4, @@ -4471,7 +4731,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ MANUAL = 5, @@ -4487,7 +4748,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ LOCKED = 6 } @@ -4506,7 +4768,8 @@ declare namespace camera { * @interface WhiteBalanceQuery * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ interface WhiteBalanceQuery { /** @@ -4529,14 +4792,15 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ isWhiteBalanceModeSupported(mode: WhiteBalanceMode): boolean; /** * Query the white balance mode range. * - * @returns { Array } The array of white balance mode range. + * @returns { Array } The array of white balance mode range. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core @@ -4546,13 +4810,14 @@ declare namespace camera { /** * Query the white balance mode range. * - * @returns { Array } The array of white balance mode range. + * @returns { Array } The array of white balance mode range. * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ - getWhiteBalanceRange(): Array; + getWhiteBalanceRange(): Array; } /** @@ -4571,7 +4836,8 @@ declare namespace camera { * @interface WhiteBalance * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ interface WhiteBalance extends WhiteBalanceQuery { /** @@ -4590,7 +4856,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ getWhiteBalanceMode(): WhiteBalanceMode; @@ -4613,14 +4880,15 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ setWhiteBalanceMode(mode: WhiteBalanceMode): void; /** * Gets current white balance. * - * @returns { number } The current white balance. + * @returns { int } The current white balance. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core @@ -4630,18 +4898,19 @@ declare namespace camera { /** * Gets current white balance. * - * @returns { number } The current white balance. + * @returns { int } The current white balance. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ - getWhiteBalance(): number; + getWhiteBalance(): int; /** * Sets white balance. * - * @param { number } whiteBalance - White balance. + * @param { int } whiteBalance - White balance. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400103 - Session not config. @@ -4652,14 +4921,15 @@ declare namespace camera { /** * Sets white balance. * - * @param { number } whiteBalance - White balance. + * @param { int } whiteBalance - White balance. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ - setWhiteBalance(whiteBalance: number): void; + setWhiteBalance(whiteBalance: int): void; } /** @@ -4668,7 +4938,8 @@ declare namespace camera { * @interface ManualIsoQuery * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ManualIsoQuery { /** @@ -4679,21 +4950,23 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isManualIsoSupported(): boolean; /** * Get the ISO range. * - * @returns { Array } The array of ISO range. + * @returns { Array } The array of ISO range. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getIsoRange(): Array; + getIsoRange(): Array; } /** @@ -4703,49 +4976,53 @@ declare namespace camera { * @interface ManualIso * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ManualIso extends ManualIsoQuery { /** * Gets current ISO. * - * @returns { number } The current ISO. + * @returns { int } The current ISO. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getIso(): number; + getIso(): int; /** * Sets ISO. * - * @param { number } iso - ISO + * @param { int } iso - ISO * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setIso(iso: number): void; + setIso(iso: int): void; } /** * Enum for smooth zoom mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 */ /** * Enum for smooth zoom mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum SmoothZoomMode { /** @@ -4759,7 +5036,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0 } @@ -4777,25 +5055,27 @@ declare namespace camera { * @typedef SmoothZoomInfo * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface SmoothZoomInfo { /** * The duration of smooth zoom. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 */ /** * The duration of smooth zoom. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - duration: number; + duration: int; } /** @@ -4804,30 +5084,33 @@ declare namespace camera { * @typedef ZoomPointInfo * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ZoomPointInfo { /** * The zoom ratio value. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly zoomRatio: number; + readonly zoomRatio: double; /** * The equivalent focal Length. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly equivalentFocalLength: number; + readonly equivalentFocalLength: int; } /** @@ -4843,13 +5126,14 @@ declare namespace camera { * @interface ZoomQuery * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface ZoomQuery { /** * Gets all supported zoom ratio range. * - * @returns { Array } The zoom ratio range. + * @returns { Array } The zoom ratio range. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 @@ -4858,7 +5142,7 @@ declare namespace camera { * Gets all supported zoom ratio range. * Move to ZoomQuery interface from Zoom since 12. * - * @returns { Array } The zoom ratio range. + * @returns { Array } The zoom ratio range. * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @since 12 @@ -4867,13 +5151,14 @@ declare namespace camera { * Gets all supported zoom ratio range. * Move to ZoomQuery interface from Zoom since 12. * - * @returns { Array } The zoom ratio range. + * @returns { Array } The zoom ratio range. * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - getZoomRatioRange(): Array; + getZoomRatioRange(): Array; /** * Gets all important zoom ratio infos. @@ -4883,7 +5168,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getZoomPointInfos(): Array; } @@ -4903,13 +5189,14 @@ declare namespace camera { * @interface Zoom * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface Zoom extends ZoomQuery { /** * Gets zoom ratio. * - * @returns { number } The zoom ratio value. + * @returns { double } The zoom ratio value. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 @@ -4917,7 +5204,7 @@ declare namespace camera { /** * Gets zoom ratio. * - * @returns { number } The zoom ratio value. + * @returns { double } The zoom ratio value. * @throws { BusinessError } 7400103 - Session not config. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core @@ -4926,19 +5213,20 @@ declare namespace camera { /** * Gets zoom ratio. * - * @returns { number } The zoom ratio value. + * @returns { double } The zoom ratio value. * @throws { BusinessError } 7400103 - Session not config. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - getZoomRatio(): number; + getZoomRatio(): double; /** * Sets zoom ratio. * - * @param { number } zoomRatio - Target zoom ratio. + * @param { double } zoomRatio - Target zoom ratio. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 @@ -4946,18 +5234,19 @@ declare namespace camera { /** * Sets zoom ratio. * - * @param { number } zoomRatio - Target zoom ratio. + * @param { double } zoomRatio - Target zoom ratio. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - setZoomRatio(zoomRatio: number): void; + setZoomRatio(zoomRatio: double): void; /** * Sets target zoom ratio by smooth method. * - * @param { number } targetRatio - Target zoom ratio. + * @param { double } targetRatio - Target zoom ratio. * @param { SmoothZoomMode } mode - Smooth zoom mode. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core @@ -4966,7 +5255,7 @@ declare namespace camera { /** * Sets target zoom ratio by smooth method. * - * @param { number } targetRatio - Target zoom ratio. + * @param { double } targetRatio - Target zoom ratio. * @param { SmoothZoomMode } mode - Smooth zoom mode. * @syscap SystemCapability.Multimedia.Camera.Core * @since 18 @@ -4974,13 +5263,14 @@ declare namespace camera { /** * Sets target zoom ratio by smooth method. * - * @param { number } targetRatio - Target zoom ratio. + * @param { double } targetRatio - Target zoom ratio. * @param { SmoothZoomMode } mode - Smooth zoom mode. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - setSmoothZoom(targetRatio: number, mode?: SmoothZoomMode): void; + setSmoothZoom(targetRatio: double, mode?: SmoothZoomMode): void; /** * Notify device to prepare for zoom. @@ -4989,7 +5279,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ prepareZoom(): void; @@ -5000,7 +5291,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ unprepareZoom(): void; } @@ -5008,17 +5300,18 @@ declare namespace camera { /** * Enum for video stabilization mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Enum for video stabilization mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum VideoStabilizationMode { /** @@ -5032,7 +5325,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ OFF = 0, @@ -5047,7 +5341,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ LOW = 1, @@ -5062,7 +5357,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ MIDDLE = 2, @@ -5077,7 +5373,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ HIGH = 3, @@ -5092,7 +5389,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 4 } @@ -5110,7 +5408,8 @@ declare namespace camera { * @interface StabilizationQuery * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface StabilizationQuery { /** @@ -5141,7 +5440,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ isVideoStabilizationModeSupported(vsMode: VideoStabilizationMode): boolean; } @@ -5161,7 +5461,8 @@ declare namespace camera { * @interface Stabilization * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface Stabilization extends StabilizationQuery { /** @@ -5179,7 +5480,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getActiveVideoStabilizationMode(): VideoStabilizationMode; @@ -5198,7 +5500,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setVideoStabilizationMode(mode: VideoStabilizationMode): void; } @@ -5206,10 +5509,11 @@ declare namespace camera { /** * Enumerates the camera portrait theme types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enum PortraitThemeType { /** @@ -5217,7 +5521,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ NATURAL = 0, @@ -5226,7 +5531,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ DELICATE = 1, @@ -5235,7 +5541,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ STYLISH = 2 } @@ -5243,10 +5550,11 @@ declare namespace camera { /** * Enumerates the camera beauty effect types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ enum BeautyType { /** @@ -5254,7 +5562,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 0, @@ -5263,7 +5572,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ SKIN_SMOOTH = 1, @@ -5272,7 +5582,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ FACE_SLENDER = 2, @@ -5281,7 +5592,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ SKIN_TONE = 3 } @@ -5292,7 +5604,8 @@ declare namespace camera { * @interface BeautyQuery * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface BeautyQuery { /** @@ -5314,7 +5627,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedBeautyTypes(): Array; @@ -5322,7 +5636,7 @@ declare namespace camera { * Gets the specific beauty effect type range. * * @param { BeautyType } type - The type of beauty effect. - * @returns { Array } The array of the specific beauty effect range. + * @returns { Array } The array of the specific beauty effect range. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core @@ -5334,14 +5648,15 @@ declare namespace camera { * Move to BeautyQuery from Beauty since 12. * * @param { BeautyType } type - The type of beauty effect. - * @returns { Array } The array of the specific beauty effect range. + * @returns { Array } The array of the specific beauty effect range. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getSupportedBeautyRange(type: BeautyType): Array; + getSupportedBeautyRange(type: BeautyType): Array; /** * Gets supported portrait theme type. @@ -5351,7 +5666,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedPortraitThemeTypes(): Array; @@ -5363,7 +5679,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ isPortraitThemeSupported(): boolean; } @@ -5375,34 +5692,37 @@ declare namespace camera { * @interface Beauty * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface Beauty extends BeautyQuery { /** * Gets the beauty effect in use. * * @param { BeautyType } type - The type of beauty effect. - * @returns { number } the beauty effect in use. + * @returns { int } the beauty effect in use. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - getBeauty(type: BeautyType): number; + getBeauty(type: BeautyType): int; /** * Sets a beauty effect for a camera device. * * @param { BeautyType } type - The type of beauty effect. - * @param { number } value The number of beauty effect. + * @param { int } value The number of beauty effect. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - setBeauty(type: BeautyType, value: number): void; + setBeauty(type: BeautyType, value: int): void; /** * Sets a portrait theme type for a camera device. @@ -5413,7 +5733,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ setPortraitThemeType(type: PortraitThemeType): void; } @@ -5424,7 +5745,8 @@ declare namespace camera { * @typedef EffectSuggestion * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface EffectSuggestion { @@ -5436,7 +5758,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isEffectSuggestionSupported(): boolean; @@ -5449,7 +5772,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableEffectSuggestion(enabled: boolean): void; @@ -5461,7 +5785,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedEffectSuggestionTypes(): Array; @@ -5475,7 +5800,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setEffectSuggestionStatus(status: Array): void; @@ -5489,7 +5815,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ updateEffectSuggestion(type: EffectSuggestionType, enabled: boolean): void; } @@ -5497,10 +5824,11 @@ declare namespace camera { /** * Enumerates the camera color effect types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum ColorEffectType { /** @@ -5508,7 +5836,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, @@ -5517,7 +5846,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BRIGHT = 1, @@ -5526,7 +5856,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SOFT = 2, @@ -5535,7 +5866,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BLACK_WHITE = 3 } @@ -5543,10 +5875,11 @@ declare namespace camera { /** * Enum for policy type * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum PolicyType { /** @@ -5554,7 +5887,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRIVACY = 1 } @@ -5565,7 +5899,8 @@ declare namespace camera { * @interface ColorEffectQuery * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ColorEffectQuery { /** @@ -5587,7 +5922,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedColorEffects(): Array; } @@ -5599,7 +5935,8 @@ declare namespace camera { * @interface ColorEffect * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ColorEffect extends ColorEffectQuery { /** @@ -5610,7 +5947,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getColorEffect(): ColorEffectType; @@ -5622,7 +5960,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setColorEffect(type: ColorEffectType): void; } @@ -5640,7 +5979,8 @@ declare namespace camera { * @interface ColorManagementQuery * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface ColorManagementQuery { /** @@ -5664,7 +6004,8 @@ declare namespace camera { * @returns { Array } The array of the supported color space for the session. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedColorSpaces(): Array; } @@ -5684,7 +6025,8 @@ declare namespace camera { * @interface ColorManagement * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface ColorManagement extends ColorManagementQuery { /** @@ -5702,7 +6044,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getActiveColorSpace(): colorSpaceManager.ColorSpace; @@ -5727,7 +6070,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setColorSpace(colorSpace: colorSpaceManager.ColorSpace): void; } @@ -5745,7 +6089,8 @@ declare namespace camera { * @interface AutoDeviceSwitchQuery * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface AutoDeviceSwitchQuery { /** @@ -5769,7 +6114,8 @@ declare namespace camera { * @returns { boolean } Is auto device switch supported. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ isAutoDeviceSwitchSupported(): boolean; } @@ -5789,7 +6135,8 @@ declare namespace camera { * @interface AutoDeviceSwitch * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface AutoDeviceSwitch extends AutoDeviceSwitchQuery { /** @@ -5817,7 +6164,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enableAutoDeviceSwitch(enabled: boolean): void; } @@ -5835,7 +6183,8 @@ declare namespace camera { * @typedef AutoDeviceSwitchStatus * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface AutoDeviceSwitchStatus { /** @@ -5853,7 +6202,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly isDeviceSwitched: boolean; @@ -5872,7 +6222,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly isDeviceCapabilityChanged: boolean; } @@ -5891,7 +6242,8 @@ declare namespace camera { * @interface MacroQuery * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface MacroQuery { /** @@ -5919,7 +6271,8 @@ declare namespace camera { * @returns { boolean } Is camera macro supported. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ isMacroSupported(): boolean; } @@ -5940,7 +6293,8 @@ declare namespace camera { * @interface Macro * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface Macro extends MacroQuery { /** @@ -5972,7 +6326,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enableMacro(enabled: boolean): void; } @@ -5980,10 +6335,11 @@ declare namespace camera { /** * Enum for usage type used in capture session. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enum UsageType { /** @@ -5991,7 +6347,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ BOKEH = 0 } @@ -6009,7 +6366,8 @@ declare namespace camera { * @interface Session * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface Session { /** @@ -6034,7 +6392,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ beginConfig(): void; @@ -6055,7 +6414,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ commitConfig(callback: AsyncCallback): void; @@ -6076,7 +6436,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ commitConfig(): Promise; @@ -6097,7 +6458,8 @@ declare namespace camera { * @returns { boolean } You can add the input into the session. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ canAddInput(cameraInput: CameraInput): boolean; @@ -6145,7 +6507,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ addInput(cameraInput: CameraInput): void; @@ -6193,7 +6556,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ removeInput(cameraInput: CameraInput): void; @@ -6214,7 +6578,8 @@ declare namespace camera { * @returns { boolean } You can add the output into the session. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ canAddOutput(cameraOutput: CameraOutput): boolean; @@ -6262,7 +6627,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ addOutput(cameraOutput: CameraOutput): void; @@ -6310,7 +6676,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ removeOutput(cameraOutput: CameraOutput): void; @@ -6342,7 +6709,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ start(callback: AsyncCallback): void; @@ -6374,7 +6742,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ start(): Promise; @@ -6393,7 +6762,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ stop(callback: AsyncCallback): void; @@ -6412,7 +6782,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): Promise; @@ -6431,7 +6802,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; @@ -6450,7 +6822,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; @@ -6466,7 +6839,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ setUsage(usage: UsageType, enabled: boolean): void; @@ -6480,7 +6854,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ getCameraOutputCapabilities(camera: CameraDevice): Array; } @@ -7062,7 +7437,7 @@ declare namespace camera { * Types of preconfig, which used to configure session conveniently. * Preconfig type contains common use cases of camera output. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 12 */ @@ -7070,10 +7445,11 @@ declare namespace camera { * Types of preconfig, which used to configure session conveniently. * Preconfig type contains common use cases of camera output. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum PreconfigType { /** @@ -7087,7 +7463,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ PRECONFIG_720P = 0, @@ -7102,7 +7479,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ PRECONFIG_1080P = 1, @@ -7117,7 +7495,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ PRECONFIG_4K = 2, @@ -7132,7 +7511,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ PRECONFIG_HIGH_QUALITY = 3 } @@ -7140,17 +7520,18 @@ declare namespace camera { /** * The aspect ratios of preconfig, which used to configure session conveniently. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 12 */ /** * The aspect ratios of preconfig, which used to configure session conveniently. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum PreconfigRatio { /** @@ -7164,7 +7545,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ PRECONFIG_RATIO_1_1 = 0, @@ -7179,7 +7561,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ PRECONFIG_RATIO_4_3 = 1, @@ -7194,7 +7577,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ PRECONFIG_RATIO_16_9 = 2 } @@ -7202,10 +7586,11 @@ declare namespace camera { /** * Enum for feature type used in scene detection. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum SceneFeatureType { /** @@ -7213,7 +7598,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MOON_CAPTURE_BOOST = 0, @@ -7222,7 +7608,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ TRIPOD_DETECTION = 1, @@ -7231,7 +7618,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ LOW_LIGHT_BOOST = 2 } @@ -7242,7 +7630,8 @@ declare namespace camera { * @typedef SceneFeatureDetectionResult * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface SceneFeatureDetectionResult { /** @@ -7252,7 +7641,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly featureType: SceneFeatureType; @@ -7263,7 +7653,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly detected: boolean; } @@ -7271,10 +7662,11 @@ declare namespace camera { /** * Enum for tripod status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enum TripodStatus { /** @@ -7282,7 +7674,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ INVALID = 0, @@ -7291,7 +7684,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ACTIVE = 1, @@ -7300,7 +7694,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ ENTERING = 2, @@ -7309,7 +7704,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ EXITING = 3 } @@ -7321,7 +7717,8 @@ declare namespace camera { * @interface TripodDetectionResult * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface TripodDetectionResult extends SceneFeatureDetectionResult { /** @@ -7331,7 +7728,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly tripodStatus: TripodStatus; } @@ -7342,7 +7740,8 @@ declare namespace camera { * @interface SceneDetectionQuery * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface SceneDetectionQuery { /** @@ -7354,7 +7753,8 @@ declare namespace camera { * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isSceneFeatureSupported(type: SceneFeatureType): boolean; } @@ -7366,7 +7766,8 @@ declare namespace camera { * @interface SceneDetection * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface SceneDetection extends SceneDetectionQuery { /** @@ -7378,7 +7779,8 @@ declare namespace camera { * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableSceneFeature(type: SceneFeatureType, enabled: boolean): void; } @@ -7399,7 +7801,8 @@ declare namespace camera { * @interface PhotoSessionForSys * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface PhotoSessionForSys extends PhotoSession, Beauty, ColorEffect, ColorManagement, Macro, SceneDetection, EffectSuggestion, DepthFusion { } @@ -7433,7 +7836,8 @@ declare namespace camera { * @interface PhotoSession * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ interface PhotoSession extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, ColorManagement, AutoDeviceSwitch, Macro { /** @@ -7459,7 +7863,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ canPreconfig(preconfigType: PreconfigType, preconfigRatio?: PreconfigRatio): boolean; @@ -7484,7 +7889,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ preconfig(preconfigType: PreconfigType, preconfigRatio?: PreconfigRatio): void; @@ -7507,7 +7913,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -7526,7 +7933,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -7549,7 +7957,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -7568,7 +7977,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -7591,7 +8001,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -7610,7 +8021,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -7622,7 +8034,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'macroStatusChanged', callback: AsyncCallback): void; @@ -7634,7 +8047,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'macroStatusChanged', callback?: AsyncCallback): void; @@ -7647,7 +8061,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'featureDetection', featureType: SceneFeatureType, callback: AsyncCallback): void; @@ -7660,7 +8075,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'featureDetection', featureType: SceneFeatureType, callback?: AsyncCallback): void; @@ -7671,7 +8087,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'effectSuggestionChange', callback: AsyncCallback): void; @@ -7682,7 +8099,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'effectSuggestionChange', callback?: AsyncCallback): void; @@ -7705,7 +8123,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'autoDeviceSwitchStatusChange', callback: AsyncCallback): void; @@ -7724,7 +8143,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'autoDeviceSwitchStatusChange', callback?: AsyncCallback): void; @@ -7736,7 +8156,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'lcdFlashStatus', callback: AsyncCallback): void; @@ -7748,7 +8169,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'lcdFlashStatus', callback?: AsyncCallback): void; @@ -7761,7 +8183,8 @@ declare namespace camera { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ getSessionFunctions(outputCapability: CameraOutputCapability): Array; @@ -7772,7 +8195,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ getSessionConflictFunctions(): Array; } @@ -7802,7 +8226,8 @@ declare namespace camera { * @interface VideoSessionForSys * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface VideoSessionForSys extends VideoSession, Beauty, ColorEffect, ColorManagement, Macro, Aperture, ColorReservation, EffectSuggestion { } @@ -7810,17 +8235,18 @@ declare namespace camera { /** * Enum for quality prioritization. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 14 */ /** * Enum for quality prioritization. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum QualityPrioritization { /** @@ -7834,7 +8260,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ HIGH_QUALITY = 0, @@ -7849,7 +8276,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ POWER_BALANCE = 1 } @@ -7886,7 +8314,8 @@ declare namespace camera { * @interface VideoSession * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ interface VideoSession extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, Stabilization, ColorManagement, AutoDeviceSwitch, Macro { /** @@ -7912,7 +8341,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ canPreconfig(preconfigType: PreconfigType, preconfigRatio?: PreconfigRatio): boolean; @@ -7937,7 +8367,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ preconfig(preconfigType: PreconfigType, preconfigRatio?: PreconfigRatio): void; @@ -7960,7 +8391,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -7979,7 +8411,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -8002,7 +8435,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -8021,7 +8455,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -8044,7 +8479,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -8063,7 +8499,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -8075,7 +8512,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'macroStatusChanged', callback: AsyncCallback): void; @@ -8087,7 +8525,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'macroStatusChanged', callback?: AsyncCallback): void; @@ -8099,7 +8538,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'lcdFlashStatus', callback: AsyncCallback): void; @@ -8111,7 +8551,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'lcdFlashStatus', callback?: AsyncCallback): void; @@ -8135,7 +8576,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'autoDeviceSwitchStatusChange', callback: AsyncCallback): void; @@ -8154,7 +8596,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'autoDeviceSwitchStatusChange', callback?: AsyncCallback): void; @@ -8166,7 +8609,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusTrackingInfoAvailable', callback: Callback): void; @@ -8178,7 +8622,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusTrackingInfoAvailable', callback?: Callback): void; @@ -8189,7 +8634,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application.[object Object] * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'effectSuggestionChange', callback: AsyncCallback): void; @@ -8201,7 +8647,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application.[object Object] * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'effectSuggestionChange', callback?: AsyncCallback): void; @@ -8214,7 +8661,8 @@ declare namespace camera { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ getSessionFunctions(outputCapability: CameraOutputCapability): Array; @@ -8225,7 +8673,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ getSessionConflictFunctions(): Array; @@ -8254,7 +8703,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. The session has not been committed or configured. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setQualityPrioritization(quality : QualityPrioritization) : void; @@ -8266,7 +8716,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'lightStatusChange', callback: AsyncCallback): void; @@ -8278,7 +8729,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'lightStatusChange', callback?: AsyncCallback): void; } @@ -8286,10 +8738,11 @@ declare namespace camera { /** * Enum for the camera light status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enum LightStatus { /** @@ -8297,7 +8750,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ NORMAL = 0, @@ -8306,7 +8760,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ INSUFFICIENT = 1 } @@ -8314,10 +8769,11 @@ declare namespace camera { /** * Enumerates the camera portrait effects. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ enum PortraitEffect { /** @@ -8325,7 +8781,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ OFF = 0, @@ -8334,7 +8791,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ CIRCLES = 1, @@ -8343,7 +8801,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ HEART = 2, @@ -8352,7 +8811,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATED = 3, @@ -8361,7 +8821,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ STUDIO = 4, @@ -8370,7 +8831,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ THEATER = 5 } @@ -8381,7 +8843,8 @@ declare namespace camera { * @interface PortraitQuery * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface PortraitQuery { /** @@ -8413,7 +8876,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedPortraitEffects(): Array; } @@ -8425,7 +8889,8 @@ declare namespace camera { * @interface Portrait * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface Portrait extends PortraitQuery { /** @@ -8446,7 +8911,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getPortraitEffect(): PortraitEffect; @@ -8468,7 +8934,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setPortraitEffect(effect: PortraitEffect): void; } @@ -8479,30 +8946,33 @@ declare namespace camera { * @typedef ZoomRange * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ZoomRange { /** * Min zoom value. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly min: number; + readonly min: double; /** * Max zoom value. * - * @type { number } + * @type { double } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly max: number; + readonly max: double; } /** @@ -8511,7 +8981,8 @@ declare namespace camera { * @typedef PhysicalAperture * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface PhysicalAperture { /** @@ -8520,19 +8991,21 @@ declare namespace camera { * @type { ZoomRange } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ zoomRange: ZoomRange; /** * The supported physical apertures. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - apertures: Array; + apertures: Array; } /** @@ -8541,13 +9014,14 @@ declare namespace camera { * @interface ApertureQuery * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ApertureQuery { /** * Gets the supported virtual apertures. * - * @returns { Array } The array of supported virtual apertures. + * @returns { Array } The array of supported virtual apertures. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core @@ -8558,14 +9032,15 @@ declare namespace camera { * Gets the supported virtual apertures. * Move to ApertureQuery interface from Aperture since 12. * - * @returns { Array } The array of supported virtual apertures. + * @returns { Array } The array of supported virtual apertures. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getSupportedVirtualApertures(): Array; + getSupportedVirtualApertures(): Array; /** * Gets the supported physical apertures. @@ -8586,7 +9061,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedPhysicalApertures(): Array; } @@ -8598,56 +9074,61 @@ declare namespace camera { * @interface Aperture * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface Aperture extends ApertureQuery { /** * Gets current virtual aperture value. * - * @returns { number } The current virtual aperture value. + * @returns { double } The current virtual aperture value. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - getVirtualAperture(): number; + getVirtualAperture(): double; /** * Sets virtual aperture value. * - * @param { number } aperture - virtual aperture value + * @param { double } aperture - virtual aperture value * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - setVirtualAperture(aperture: number): void; + setVirtualAperture(aperture: double): void; /** * Gets current physical aperture value. * - * @returns { number } The current physical aperture value. + * @returns { double } The current physical aperture value. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - getPhysicalAperture(): number; + getPhysicalAperture(): double; /** * Sets physical aperture value. * - * @param { number } aperture - physical aperture value + * @param { double } aperture - physical aperture value * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - setPhysicalAperture(aperture: number): void; + setPhysicalAperture(aperture: double): void; } /** @@ -8657,7 +9138,8 @@ declare namespace camera { * @interface PortraitPhotoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface PortraitPhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, Beauty, ColorEffect, ColorManagement, Portrait, Aperture { /** @@ -8667,7 +9149,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -8678,7 +9161,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -8689,7 +9173,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -8700,7 +9185,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -8711,7 +9197,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -8722,7 +9209,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -8734,7 +9222,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'lcdFlashStatus', callback: AsyncCallback): void; @@ -8746,7 +9235,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'lcdFlashStatus', callback?: AsyncCallback): void; @@ -8759,7 +9249,8 @@ declare namespace camera { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ getSessionFunctions(outputCapability: CameraOutputCapability): Array; @@ -8770,7 +9261,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ getSessionConflictFunctions(): Array; } @@ -8782,7 +9274,8 @@ declare namespace camera { * @interface ApertureVideoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ApertureVideoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, Aperture { /** @@ -8793,7 +9286,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -8805,7 +9299,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -8817,7 +9312,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -8829,7 +9325,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -8841,7 +9338,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -8853,7 +9351,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; } @@ -8864,13 +9363,14 @@ declare namespace camera { * @interface ManualExposureQuery * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ManualExposureQuery { /** * Gets the supported manual exposure range. * - * @returns { Array } The array of manual exposure range. + * @returns { Array } The array of manual exposure range. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core @@ -8881,15 +9381,16 @@ declare namespace camera { * Gets the supported manual exposure range. * Move to ManualExposureQuery from ManualExposure since 12. * - * @returns { Array } The array of manual exposure range. + * @returns { Array } The array of manual exposure range. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getSupportedExposureRange(): Array; + getSupportedExposureRange(): Array; } /** @@ -8899,13 +9400,14 @@ declare namespace camera { * @interface ManualExposure * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface ManualExposure extends ManualExposureQuery { /** * Gets current exposure value. * - * @returns { number } The current exposure value. + * @returns { int } The current exposure value. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core @@ -8915,20 +9417,21 @@ declare namespace camera { /** * Gets current exposure value. * - * @returns { number } The current exposure value. + * @returns { int } The current exposure value. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getExposure(): number; + getExposure(): int; /** * Sets Exposure value. * - * @param { number } exposure - Exposure value + * @param { int } exposure - Exposure value * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core @@ -8938,15 +9441,16 @@ declare namespace camera { /** * Sets Exposure value. * - * @param { number } exposure - Exposure value + * @param { int } exposure - Exposure value * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400102 - Operation not allowed. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setExposure(exposure: number): void; + setExposure(exposure: int): void; } /** @@ -8956,7 +9460,8 @@ declare namespace camera { * @interface NightPhotoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface NightPhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, Beauty, ColorManagement, ManualExposure { /** @@ -8966,7 +9471,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -8977,7 +9483,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -8988,7 +9495,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -8999,7 +9507,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -9010,7 +9519,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -9021,7 +9531,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -9033,7 +9544,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'lcdFlashStatus', callback: AsyncCallback): void; @@ -9045,7 +9557,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'lcdFlashStatus', callback?: AsyncCallback): void; } @@ -9056,19 +9569,21 @@ declare namespace camera { * @typedef IsoInfo * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface IsoInfo { /** * ISO value. * - * @type { ?number } + * @type { ?int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly iso?: number; + readonly iso?: int; } /** @@ -9077,19 +9592,21 @@ declare namespace camera { * @typedef ExposureInfo * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ExposureInfo { /** * Exposure time value. * - * @type { ?number } + * @type { ?int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly exposureTime?: number; + readonly exposureTime?: int; } /** @@ -9098,19 +9615,21 @@ declare namespace camera { * @typedef ApertureInfo * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ApertureInfo { /** * Aperture value. * - * @type { ?number } + * @type { ?double } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly aperture?: number; + readonly aperture?: double; } /** @@ -9119,19 +9638,21 @@ declare namespace camera { * @typedef LuminationInfo * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface LuminationInfo { /** * Lumination value. * - * @type { ?number } + * @type { ?double } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly lumination?: number; + readonly lumination?: double; } /** @@ -9140,7 +9661,8 @@ declare namespace camera { * @interface ProfessionalPhotoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ProfessionalPhotoSession extends Session, AutoExposure, ManualExposure, Focus, ManualFocus, WhiteBalance, ManualIso, Flash, Zoom, ColorEffect, Aperture { /** @@ -9151,7 +9673,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -9163,7 +9686,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -9175,7 +9699,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -9187,7 +9712,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -9199,7 +9725,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -9211,7 +9738,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -9223,7 +9751,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'isoInfoChange', callback: AsyncCallback): void; @@ -9235,7 +9764,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'isoInfoChange', callback?: AsyncCallback): void; @@ -9247,7 +9777,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'exposureInfoChange', callback: AsyncCallback): void; @@ -9259,7 +9790,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'exposureInfoChange', callback?: AsyncCallback): void; @@ -9271,7 +9803,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'apertureInfoChange', callback: AsyncCallback): void; @@ -9283,7 +9816,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'apertureInfoChange', callback?: AsyncCallback): void; @@ -9295,7 +9829,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'luminationInfoChange', callback: AsyncCallback): void; @@ -9307,7 +9842,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'luminationInfoChange', callback?: AsyncCallback): void; } @@ -9319,7 +9855,8 @@ declare namespace camera { * @interface ProfessionalVideoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ProfessionalVideoSession extends Session, AutoExposure, ManualExposure, Focus, ManualFocus, WhiteBalance, ManualIso, Flash, Zoom, ColorEffect, Aperture { /** @@ -9330,7 +9867,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -9342,7 +9880,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -9354,7 +9893,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -9366,7 +9906,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -9378,7 +9919,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -9390,7 +9932,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -9402,7 +9945,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'isoInfoChange', callback: AsyncCallback): void; @@ -9414,7 +9958,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'isoInfoChange', callback?: AsyncCallback): void; @@ -9426,7 +9971,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'exposureInfoChange', callback: AsyncCallback): void; @@ -9438,7 +9984,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'exposureInfoChange', callback?: AsyncCallback): void; @@ -9450,7 +9997,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'apertureInfoChange', callback: AsyncCallback): void; @@ -9462,7 +10010,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'apertureInfoChange', callback?: AsyncCallback): void; @@ -9474,7 +10023,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'luminationInfoChange', callback: AsyncCallback): void; @@ -9486,7 +10036,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'luminationInfoChange', callback?: AsyncCallback): void; } @@ -9494,10 +10045,11 @@ declare namespace camera { /** * Enum for slow motion status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum SlowMotionStatus { /** @@ -9505,7 +10057,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DISABLED = 0, @@ -9514,7 +10067,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ READY = 1, @@ -9523,7 +10077,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_START = 2, @@ -9532,7 +10087,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_DONE = 3, @@ -9541,7 +10097,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FINISHED = 4 } @@ -9553,7 +10110,8 @@ declare namespace camera { * @interface SlowMotionVideoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface SlowMotionVideoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect { /** @@ -9564,7 +10122,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -9576,7 +10135,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -9588,7 +10148,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -9600,7 +10161,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -9612,7 +10174,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -9624,7 +10187,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -9645,7 +10209,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ isSlowMotionDetectionSupported(): boolean; @@ -9667,7 +10232,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setSlowMotionDetectionArea(area: Rect): void; @@ -9679,7 +10245,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'slowMotionStatus', callback: AsyncCallback): void; @@ -9691,7 +10258,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'slowMotionStatus', callback?: AsyncCallback): void; } @@ -9703,7 +10271,8 @@ declare namespace camera { * @interface HighResolutionPhotoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface HighResolutionPhotoSession extends Session, AutoExposure, Focus { /** @@ -9714,7 +10283,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -9726,7 +10296,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -9738,7 +10309,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -9750,7 +10322,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; } @@ -9780,7 +10353,8 @@ declare namespace camera { * @interface MacroPhotoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface MacroPhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, DepthFusion, ColorManagement { /** @@ -9791,7 +10365,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -9803,7 +10378,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -9815,7 +10391,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -9827,7 +10404,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -9839,7 +10417,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -9851,7 +10430,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; } @@ -9872,7 +10452,8 @@ declare namespace camera { * @interface MacroVideoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface MacroVideoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, ColorManagement { /** @@ -9883,7 +10464,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -9895,7 +10477,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -9907,7 +10490,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -9919,7 +10503,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -9931,7 +10516,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -9943,7 +10529,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; } @@ -9972,7 +10559,8 @@ declare namespace camera { * @interface SecureSession * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 20 + * @since arkts {'1.1':'20','1.2':'20'} + * @arkts 1.1&1.2 */ interface SecureSession extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom { /** @@ -10002,7 +10590,8 @@ declare namespace camera { * @throws { BusinessError } 7400102 - Operation not allowed. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ addSecureOutput(previewOutput: PreviewOutput): void; @@ -10025,7 +10614,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -10044,7 +10634,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -10067,7 +10658,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10086,7 +10678,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; } @@ -10098,7 +10691,8 @@ declare namespace camera { * @interface LightPaintingPhotoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface LightPaintingPhotoSession extends Session, Flash, Focus, Zoom, ColorEffect { /** @@ -10109,7 +10703,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -10121,7 +10716,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -10133,7 +10729,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10145,7 +10742,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -10157,7 +10755,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -10169,7 +10768,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -10181,7 +10781,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getLightPaintingType(): LightPaintingType; @@ -10194,7 +10795,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setLightPaintingType(type: LightPaintingType): void; @@ -10206,7 +10808,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedLightPaintingTypes(): Array; } @@ -10218,7 +10821,8 @@ declare namespace camera { * @interface QuickShotPhotoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface QuickShotPhotoSession extends Session, AutoExposure, ColorEffect, ColorManagement, EffectSuggestion, Flash, Focus, Zoom { /** @@ -10229,7 +10833,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -10241,7 +10846,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -10253,7 +10859,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'effectSuggestionChange', callback: AsyncCallback): void; @@ -10265,7 +10872,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'effectSuggestionChange', callback?: AsyncCallback): void; @@ -10277,7 +10885,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10289,7 +10898,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -10301,7 +10911,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -10313,7 +10924,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; } @@ -10325,7 +10937,8 @@ declare namespace camera { * @interface PanoramaPhotoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface PanoramaPhotoSession extends Session, Focus, AutoExposure, WhiteBalance, ColorEffect { /** @@ -10336,7 +10949,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -10348,7 +10962,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -10360,7 +10975,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10372,7 +10988,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; } @@ -10384,7 +11001,8 @@ declare namespace camera { * @interface FluorescencePhotoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface FluorescencePhotoSession extends Session, AutoExposure, Focus, Zoom { /** @@ -10395,7 +11013,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -10407,7 +11026,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -10419,7 +11039,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10431,7 +11052,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; } @@ -10443,7 +11065,8 @@ declare namespace camera { * @interface PhotoFunctions * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface PhotoFunctions extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery { } @@ -10455,7 +11078,8 @@ declare namespace camera { * @interface VideoFunctions * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface VideoFunctions extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, StabilizationQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery { } @@ -10467,7 +11091,8 @@ declare namespace camera { * @interface PortraitPhotoFunctions * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface PortraitPhotoFunctions extends FlashQuery, AutoExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, PortraitQuery, ApertureQuery, SceneDetectionQuery { } @@ -10479,7 +11104,8 @@ declare namespace camera { * @interface PhotoConflictFunctions * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface PhotoConflictFunctions extends ZoomQuery, MacroQuery { } @@ -10491,7 +11117,8 @@ declare namespace camera { * @interface VideoConflictFunctions * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface VideoConflictFunctions extends ZoomQuery, MacroQuery { } @@ -10503,7 +11130,8 @@ declare namespace camera { * @extends ZoomQuery, PortraitQuery, ApertureQuery * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface PortraitPhotoConflictFunctions extends ZoomQuery, PortraitQuery, ApertureQuery { } @@ -10521,7 +11149,8 @@ declare namespace camera { * @interface CameraOutput * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface CameraOutput { /** @@ -10539,7 +11168,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; @@ -10558,7 +11188,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; } @@ -10569,29 +11200,32 @@ declare namespace camera { * @typedef SketchStatusData * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface SketchStatusData { /** * Status of the sketch stream. * 0 is stop, and 1 is start. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - status: number; + status: int; /** * The zoom ratio of the sketch stream. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - sketchRatio: number; + sketchRatio: double; } /** @@ -10609,7 +11243,8 @@ declare namespace camera { * @interface PreviewOutput * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface PreviewOutput extends CameraOutput { /** @@ -10677,7 +11312,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'frameStart', callback: AsyncCallback): void; @@ -10696,7 +11332,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'frameStart', callback?: AsyncCallback): void; @@ -10719,7 +11356,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'frameEnd', callback: AsyncCallback): void; @@ -10738,7 +11376,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'frameEnd', callback?: AsyncCallback): void; @@ -10761,7 +11400,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the preview output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -10780,7 +11420,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the preview output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -10797,15 +11438,16 @@ declare namespace camera { * @returns { Array } The array of supported frame rate range. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedFrameRates(): Array; /** * Set a frame rate range. * - * @param { number } minFps - Minimum frame rate per second. - * @param { number } maxFps - Maximum frame rate per second. + * @param { int } minFps - Minimum frame rate per second. + * @param { int } maxFps - Maximum frame rate per second. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400110 - Unresolved conflicts with current configurations. * @syscap SystemCapability.Multimedia.Camera.Core @@ -10814,15 +11456,16 @@ declare namespace camera { /** * The supported frame rate range can be queried via the getSupportedFrameRates interface before setting. * - * @param { number } minFps - Minimum frame rate per second. - * @param { number } maxFps - Maximum frame rate per second. + * @param { int } minFps - Minimum frame rate per second. + * @param { int } maxFps - Maximum frame rate per second. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400110 - Unresolved conflicts with current configurations. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - setFrameRate(minFps: number, maxFps: number): void; + setFrameRate(minFps: int, maxFps: int): void; /** * Get active frame rate range which has been set before. @@ -10837,7 +11480,8 @@ declare namespace camera { * @returns { FrameRateRange } The active frame rate range. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getActiveFrameRate(): FrameRateRange; @@ -10856,14 +11500,15 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getActiveProfile(): Profile; /** * Gets the preview rotation angle. * - * @param { number } displayRotation - The current display rotation angle. + * @param { int } displayRotation - The current display rotation angle. * @returns { ImageRotation } The preview rotation angle. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400201 - Camera service fatal error. @@ -10873,15 +11518,16 @@ declare namespace camera { /** * Gets the preview rotation angle. * - * @param { number } displayRotation - The current display rotation angle. + * @param { int } displayRotation - The current display rotation angle. * @returns { ImageRotation } The preview rotation angle. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - getPreviewRotation(displayRotation: number): ImageRotation; + getPreviewRotation(displayRotation: int): ImageRotation; /** * Sets the preview rotation angle. @@ -10902,7 +11548,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setPreviewRotation(previewRotation: ImageRotation, isDisplayLocked?: boolean): void; @@ -10923,7 +11570,8 @@ declare namespace camera { * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ addDeferredSurface(surfaceId: string): void; @@ -10934,21 +11582,23 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isSketchSupported(): boolean; /** * Gets the specific zoom ratio when sketch stream open. * - * @returns { number } The specific zoom ratio of sketch. + * @returns { double } The specific zoom ratio of sketch. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - getSketchRatio(): number; + getSketchRatio(): double; /** * Enable sketch for camera. @@ -10970,7 +11620,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableSketch(enabled: boolean): void; @@ -10994,7 +11645,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ attachSketchSurface(surfaceId: string): void; @@ -11006,7 +11658,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'sketchStatusChanged', callback: AsyncCallback): void; @@ -11018,7 +11671,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'sketchStatusChanged', callback?: AsyncCallback): void; } @@ -11026,10 +11680,11 @@ declare namespace camera { /** * Enum for effect suggestion. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum EffectSuggestionType { /** @@ -11037,7 +11692,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EFFECT_SUGGESTION_NONE = 0, /** @@ -11045,7 +11701,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EFFECT_SUGGESTION_PORTRAIT = 1, /** @@ -11053,7 +11710,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EFFECT_SUGGESTION_FOOD = 2, @@ -11062,7 +11720,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EFFECT_SUGGESTION_SKY = 3, @@ -11071,7 +11730,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ EFFECT_SUGGESTION_SUNRISE_SUNSET = 4, @@ -11080,7 +11740,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ EFFECT_SUGGESTION_STAGE = 5 } @@ -11090,7 +11751,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ class EffectSuggestionStatus { /** @@ -11099,7 +11761,8 @@ declare namespace camera { * @type { EffectSuggestionType } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type: EffectSuggestionType; /** @@ -11108,7 +11771,8 @@ declare namespace camera { * @type { boolean } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ status: boolean; } @@ -11116,17 +11780,18 @@ declare namespace camera { /** * Enumerates the image rotation angles. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Enumerates the image rotation angles. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum ImageRotation { /** @@ -11140,7 +11805,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATION_0 = 0, @@ -11155,7 +11821,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATION_90 = 90, @@ -11170,7 +11837,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATION_180 = 180, @@ -11185,7 +11853,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ ROTATION_270 = 270 } @@ -11203,75 +11872,80 @@ declare namespace camera { * @typedef Location * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface Location { /** * Latitude. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Latitude. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - latitude: number; + latitude: double; /** * Longitude. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Longitude. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - longitude: number; + longitude: double; /** * Altitude. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Altitude. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - altitude: number; + altitude: double; } /** * Enumerates the image quality levels. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Enumerates the image quality levels. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum QualityLevel { /** @@ -11285,7 +11959,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ QUALITY_LEVEL_HIGH = 0, @@ -11300,7 +11975,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ QUALITY_LEVEL_MEDIUM = 1, @@ -11315,7 +11991,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ QUALITY_LEVEL_LOW = 2 } @@ -11333,7 +12010,8 @@ declare namespace camera { * @typedef PhotoCaptureSetting * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface PhotoCaptureSetting { /** @@ -11349,7 +12027,8 @@ declare namespace camera { * @type { ?QualityLevel } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ quality?: QualityLevel; @@ -11366,7 +12045,8 @@ declare namespace camera { * @type { ?ImageRotation } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ rotation?: ImageRotation; @@ -11383,7 +12063,8 @@ declare namespace camera { * @type { ?Location } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ location?: Location; @@ -11402,7 +12083,8 @@ declare namespace camera { * @type { ?boolean } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ mirror?: boolean; } @@ -11410,10 +12092,11 @@ declare namespace camera { /** * Enumerates the delivery image types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum DeferredDeliveryImageType { /** @@ -11421,7 +12104,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -11430,7 +12114,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PHOTO = 1, @@ -11439,7 +12124,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO = 2 } @@ -11457,7 +12143,8 @@ declare namespace camera { * @typedef Photo * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface Photo { /** @@ -11473,7 +12160,8 @@ declare namespace camera { * @type { image.Image } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ main: image.Image; @@ -11483,7 +12171,8 @@ declare namespace camera { * @type { ?image.Image } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ raw?: image.Image; @@ -11493,7 +12182,8 @@ declare namespace camera { * @type { DepthData } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ depthData?: DepthData; @@ -11510,7 +12200,8 @@ declare namespace camera { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; } @@ -11521,7 +12212,8 @@ declare namespace camera { * @typedef DeferredPhotoProxy * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface DeferredPhotoProxy { /** @@ -11531,7 +12223,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getThumbnail(): Promise; @@ -11542,7 +12235,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; } @@ -11550,17 +12244,18 @@ declare namespace camera { /** * Enumerates the camera video codec type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 13 */ /** * Enumerates the camera video codec type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum VideoCodecType { /** @@ -11574,7 +12269,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ AVC = 0, @@ -11589,7 +12285,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ HEVC = 1 } @@ -11609,7 +12306,8 @@ declare namespace camera { * @interface PhotoOutput * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface PhotoOutput extends CameraOutput { /** @@ -11629,7 +12327,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ capture(callback: AsyncCallback): void; @@ -11650,7 +12349,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ capture(): Promise; @@ -11675,7 +12375,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ capture(setting: PhotoCaptureSetting, callback: AsyncCallback): void; @@ -11713,7 +12414,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ capture(setting: PhotoCaptureSetting): Promise; @@ -11728,7 +12430,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ burstCapture(setting: PhotoCaptureSetting): Promise; @@ -11753,7 +12456,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ isRawDeliverySupported(): boolean; @@ -11767,7 +12471,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableRawDelivery(enabled: boolean): void; @@ -11782,7 +12487,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isDeferredImageDeliverySupported(type: DeferredDeliveryImageType): boolean; @@ -11797,7 +12503,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ isDeferredImageDeliveryEnabled(type: DeferredDeliveryImageType): boolean; @@ -11811,7 +12518,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ deferImageDelivery(type: DeferredDeliveryImageType): void; @@ -11824,7 +12532,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ isDepthDataDeliverySupported(): boolean; @@ -11838,7 +12547,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableDepthDataDelivery(enabled: boolean): void; @@ -11857,7 +12567,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedMovingPhotoVideoCodecTypes(): Array; @@ -11876,7 +12587,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ setMovingPhotoVideoCodecType(codecType: VideoCodecType): void; @@ -11899,7 +12611,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the Photo. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'photoAvailable', callback: AsyncCallback): void; @@ -11918,7 +12631,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the Photo. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'photoAvailable', callback?: AsyncCallback): void; @@ -11930,7 +12644,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'deferredPhotoProxyAvailable', callback: AsyncCallback): void; @@ -11942,7 +12657,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'deferredPhotoProxyAvailable', callback?: AsyncCallback): void; @@ -11973,7 +12689,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the asset. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'photoAssetAvailable', callback: AsyncCallback): void; @@ -11992,7 +12709,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the asset. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'photoAssetAvailable', callback?: AsyncCallback): void; @@ -12009,7 +12727,8 @@ declare namespace camera { * @returns { boolean } Is the mirror supported. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ isMirrorSupported(): boolean; @@ -12036,7 +12755,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enableMirror(enabled: boolean): void; @@ -12083,7 +12803,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the capture start info. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'captureStartWithInfo', callback: AsyncCallback): void; @@ -12102,7 +12823,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the capture start info. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'captureStartWithInfo', callback?: AsyncCallback): void; @@ -12121,7 +12843,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the frame shutter information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'frameShutter', callback: AsyncCallback): void; @@ -12140,7 +12863,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the frame shutter information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'frameShutter', callback?: AsyncCallback): void; @@ -12163,7 +12887,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the frame shutter end information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'frameShutterEnd', callback: AsyncCallback): void; @@ -12182,7 +12907,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the frame shutter end information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'frameShutterEnd', callback?: AsyncCallback): void; @@ -12206,7 +12932,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the capture end information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'captureEnd', callback: AsyncCallback): void; @@ -12225,7 +12952,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the capture end information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'captureEnd', callback?: AsyncCallback): void; @@ -12248,7 +12976,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to notice capture ready. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'captureReady', callback: AsyncCallback): void; @@ -12267,7 +12996,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to notice capture ready. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'captureReady', callback?: AsyncCallback): void; @@ -12275,7 +13005,7 @@ declare namespace camera { * Subscribes estimated capture duration event callback. * * @param { 'estimatedCaptureDuration' } type - Event type. - * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). + * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). * @syscap SystemCapability.Multimedia.Camera.Core * @since 12 */ @@ -12287,18 +13017,19 @@ declare namespace camera { * within the callback method of on(). * * @param { 'estimatedCaptureDuration' } type - Event type. - * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). + * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'estimatedCaptureDuration', callback: AsyncCallback): void; + on(type: 'estimatedCaptureDuration', callback: AsyncCallback): void; /** * Unsubscribes from estimated capture duration event callback. * * @param { 'estimatedCaptureDuration' } type - Event type. - * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). + * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). * @syscap SystemCapability.Multimedia.Camera.Core * @since 12 */ @@ -12306,12 +13037,13 @@ declare namespace camera { * Unsubscribes from estimated capture duration event callback. * * @param { 'estimatedCaptureDuration' } type - Event type. - * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). + * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'estimatedCaptureDuration', callback?: AsyncCallback): void; + off(type: 'estimatedCaptureDuration', callback?: AsyncCallback): void; /** * Subscribes to error events. @@ -12332,7 +13064,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the photo output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -12351,7 +13084,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the photo output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -12370,7 +13104,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getActiveProfile(): Profile; @@ -12393,7 +13128,8 @@ declare namespace camera { * @throws { BusinessError } 7400104 - session is not running. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isQuickThumbnailSupported(): boolean; @@ -12422,7 +13158,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableQuickThumbnail(enabled: boolean): void; @@ -12434,7 +13171,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the quick thumbnail. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'quickThumbnail', callback: AsyncCallback): void; @@ -12446,7 +13184,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the quick thumbnail. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'quickThumbnail', callback?: AsyncCallback): void; @@ -12459,7 +13198,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ isAutoHighQualityPhotoSupported(): boolean; @@ -12473,7 +13213,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableAutoHighQualityPhoto(enabled: boolean): void; @@ -12485,7 +13226,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ isAutoCloudImageEnhancementSupported(): boolean; @@ -12498,7 +13240,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableAutoCloudImageEnhancement(enabled: boolean): void; @@ -12517,7 +13260,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ isMovingPhotoSupported(): boolean; @@ -12542,14 +13286,15 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enableMovingPhoto(enabled: boolean): void; /** * Gets the photo rotation angle. * - * @param { number } deviceDegree - The current device rotation degree. + * @param { int } deviceDegree - The current device rotation degree. * @returns { ImageRotation } The photo rotation angle. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400201 - Camera service fatal error. @@ -12559,15 +13304,16 @@ declare namespace camera { /** * Gets the photo rotation angle. * - * @param { number } deviceDegree - The current device rotation degree. + * @param { int } deviceDegree - The current device rotation degree. * @returns { ImageRotation } The photo rotation angle. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - getPhotoRotation(deviceDegree: number): ImageRotation; + getPhotoRotation(deviceDegree: int): ImageRotation; /** * Confirm if offline processing is supported. @@ -12577,7 +13323,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ isOfflineSupported(): boolean; @@ -12589,7 +13336,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableOffline(): void; @@ -12602,7 +13350,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'offlineDeliveryFinished', callback: AsyncCallback): void; @@ -12615,7 +13364,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'offlineDeliveryFinished', callback?: AsyncCallback): void; } @@ -12633,41 +13383,44 @@ declare namespace camera { * @typedef FrameShutterInfo * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface FrameShutterInfo { /** * Capture id. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Capture id. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - captureId: number; + captureId: int; /** * Timestamp for frame. * - * @type { number } + * @type { long } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Timestamp for frame. * - * @type { number } + * @type { long } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - timestamp: number; + timestamp: long; } /** @@ -12683,25 +13436,27 @@ declare namespace camera { * @typedef FrameShutterEndInfo * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface FrameShutterEndInfo { /** * Capture id. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 12 */ /** * Capture id. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - captureId: number; + captureId: int; } /** @@ -12717,41 +13472,44 @@ declare namespace camera { * @typedef CaptureStartInfo * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface CaptureStartInfo { /** * Capture id. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 */ /** * Capture id. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - captureId: number; + captureId: int; /** * Time(in milliseconds) is the shutter time for the photo. * - * @type { number } + * @type { long } * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 */ /** * Time(in milliseconds) is the shutter time for the photo. * - * @type { number } + * @type { long } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - time: number; + time: long; } /** @@ -12767,41 +13525,44 @@ declare namespace camera { * @typedef CaptureEndInfo * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface CaptureEndInfo { /** * Capture id. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Capture id. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - captureId: number; + captureId: int; /** * Frame count. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Frame count. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - frameCount: number; + frameCount: int; } /** @@ -12810,7 +13571,8 @@ declare namespace camera { * @typedef DeferredVideoEnhancementInfo * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface DeferredVideoEnhancementInfo { /** @@ -12820,7 +13582,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly isDeferredVideoEnhancementAvailable: boolean; /** @@ -12830,7 +13593,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly videoId?: string; } @@ -12850,7 +13614,8 @@ declare namespace camera { * @interface VideoOutput * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface VideoOutput extends CameraOutput { /** @@ -12870,7 +13635,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ start(callback: AsyncCallback): void; @@ -12891,7 +13657,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ start(): Promise; @@ -12908,7 +13675,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ stop(callback: AsyncCallback): void; @@ -12925,7 +13693,8 @@ declare namespace camera { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): Promise; @@ -12951,7 +13720,8 @@ declare namespace camera { * @returns { boolean } Is video mirror supported. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ isMirrorSupported(): boolean; @@ -12990,7 +13760,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enableMirror(enabled: boolean): void; @@ -13007,15 +13778,16 @@ declare namespace camera { * @returns { Array } The array of supported frame rate range. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedFrameRates(): Array; /** * Set a frame rate range. * - * @param { number } minFps - Minimum frame rate per second. - * @param { number } maxFps - Maximum frame rate per second. + * @param { int } minFps - Minimum frame rate per second. + * @param { int } maxFps - Maximum frame rate per second. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400110 - Unresolved conflicts with current configurations. * @syscap SystemCapability.Multimedia.Camera.Core @@ -13024,15 +13796,16 @@ declare namespace camera { /** * Set a frame rate range. * - * @param { number } minFps - Minimum frame rate per second. - * @param { number } maxFps - Maximum frame rate per second. + * @param { int } minFps - Minimum frame rate per second. + * @param { int } maxFps - Maximum frame rate per second. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400110 - Unresolved conflicts with current configurations. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - setFrameRate(minFps: number, maxFps: number): void; + setFrameRate(minFps: int, maxFps: int): void; /** * Get active frame rate range which has been set before. @@ -13047,14 +13820,15 @@ declare namespace camera { * @returns { FrameRateRange } The active frame rate range. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getActiveFrameRate(): FrameRateRange; /** * Gets the video rotation angle. * - * @param { number } deviceDegree - The current device rotation degree. + * @param { int } deviceDegree - The current device rotation degree. * @returns { ImageRotation } The video rotation angle. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400201 - Camera service fatal error. @@ -13064,15 +13838,16 @@ declare namespace camera { /** * Gets the video rotation angle. * - * @param { number } deviceDegree - The current device rotation degree. + * @param { int } deviceDegree - The current device rotation degree. * @returns { ImageRotation } The video rotation angle. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - getVideoRotation(deviceDegree: number): ImageRotation; + getVideoRotation(deviceDegree: int): ImageRotation; /** * Confirm if auto deferred video enhancement is supported in the specific device. @@ -13082,7 +13857,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ isAutoDeferredVideoEnhancementSupported(): boolean; @@ -13094,7 +13870,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ isAutoDeferredVideoEnhancementEnabled(): boolean; @@ -13107,7 +13884,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enableAutoDeferredVideoEnhancement(enabled: boolean): void; @@ -13118,7 +13896,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedRotations(): Array; @@ -13129,7 +13908,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ isRotationSupported(): boolean; @@ -13141,7 +13921,8 @@ declare namespace camera { * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ setRotation(rotation: ImageRotation): void; @@ -13152,7 +13933,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ isAutoVideoFrameRateSupported(): boolean; @@ -13164,7 +13946,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableAutoVideoFrameRate(enabled: boolean): void; @@ -13176,7 +13959,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'deferredVideoEnhancementInfo', callback: AsyncCallback): void; @@ -13188,7 +13972,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'deferredVideoEnhancementInfo', callback?: AsyncCallback): void; @@ -13211,7 +13996,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'frameStart', callback: AsyncCallback): void; @@ -13230,7 +14016,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'frameStart', callback?: AsyncCallback): void; @@ -13249,7 +14036,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'frameEnd', callback: AsyncCallback): void; @@ -13268,7 +14056,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'frameEnd', callback?: AsyncCallback): void; @@ -13291,7 +14080,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the video output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -13310,7 +14100,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the video output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -13329,7 +14120,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ getActiveProfile(): VideoProfile; @@ -13340,7 +14132,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedVideoMetaTypes(): Array; @@ -13353,7 +14146,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ attachMetaSurface(surfaceId: string, type: VideoMetaType): void; } @@ -13361,17 +14155,19 @@ declare namespace camera { /** * Video meta type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum VideoMetaType { /** * Video meta type for storing maker info. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_META_MAKER_INFO = 0 } @@ -13379,17 +14175,18 @@ declare namespace camera { /** * Metadata object type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Metadata object type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum MetadataObjectType { /** @@ -13403,7 +14200,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ FACE_DETECTION = 0, @@ -13412,7 +14210,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ HUMAN_BODY = 1, @@ -13421,7 +14220,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ CAT_FACE = 2, @@ -13430,7 +14230,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ CAT_BODY = 3, @@ -13439,7 +14240,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ DOG_FACE = 4, @@ -13448,7 +14250,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ DOG_BODY = 5, @@ -13457,7 +14260,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ SALIENT_DETECTION = 6, @@ -13466,7 +14270,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ BAR_CODE_DETECTION = 7 } @@ -13474,10 +14279,11 @@ declare namespace camera { /** * Enum for light painting tabletype. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum LightPaintingType { /** @@ -13485,7 +14291,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ TRAFFIC_TRAILS = 0, @@ -13494,7 +14301,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STAR_TRAILS = 1, @@ -13503,7 +14311,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SILKY_WATER = 2, @@ -13512,7 +14321,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LIGHT_GRAFFITI = 3 } @@ -13530,82 +14340,88 @@ declare namespace camera { * @typedef Rect * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface Rect { /** * X coordinator of top left point. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * X coordinator of top left point. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - topLeftX: number; + topLeftX: double; /** * Y coordinator of top left point. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Y coordinator of top left point. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - topLeftY: number; + topLeftY: double; /** * Width of this rectangle. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Width of this rectangle. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - width: number; + width: double; /** * Height of this rectangle. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 */ /** * Height of this rectangle. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - height: number; + height: double; } /** * Enum for emotion type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enum Emotion { /** @@ -13613,7 +14429,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ NEUTRAL = 0, @@ -13622,7 +14439,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ SADNESS = 1, @@ -13631,7 +14449,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ SMILE = 2, @@ -13640,7 +14459,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ SURPRISE = 3 } @@ -13658,7 +14478,8 @@ declare namespace camera { * @typedef MetadataObject * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface MetadataObject { /** @@ -13676,13 +14497,14 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly type: MetadataObjectType; /** * Metadata object timestamp in milliseconds. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 @@ -13690,13 +14512,14 @@ declare namespace camera { /** * Metadata object timestamp in milliseconds. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly timestamp: number; + readonly timestamp: int; /** * The axis-aligned bounding box of detected metadata object. * @@ -13712,29 +14535,32 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly boundingBox: Rect; /** * Metadata object id. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly objectId: number; + readonly objectId: int; /** * Confidence for the detected type. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly confidence: number; + readonly confidence: int; } /** @@ -13744,7 +14570,8 @@ declare namespace camera { * @extends MetadataObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface MetadataFaceObject extends MetadataObject { /** @@ -13754,7 +14581,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly leftEyeBoundingBox: Rect; @@ -13765,7 +14593,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly rightEyeBoundingBox: Rect; @@ -13776,53 +14605,58 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly emotion: Emotion; /** * Emotion confidence. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly emotionConfidence: number; + readonly emotionConfidence: int; /** * Pitch angle for face. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly pitchAngle: number; + readonly pitchAngle: int; /** * Yaw angle for face. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly yawAngle: number; + readonly yawAngle: int; /** * Roll angle for face. * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly rollAngle: number; + readonly rollAngle: int; } /** @@ -13832,7 +14666,8 @@ declare namespace camera { * @extends MetadataObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface MetadataHumanBodyObject extends MetadataObject { } @@ -13844,7 +14679,8 @@ declare namespace camera { * @extends MetadataObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface MetadataCatFaceObject extends MetadataObject { /** @@ -13854,7 +14690,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly leftEyeBoundingBox: Rect; @@ -13865,7 +14702,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly rightEyeBoundingBox: Rect; } @@ -13877,7 +14715,8 @@ declare namespace camera { * @extends MetadataObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface MetadataCatBodyObject extends MetadataObject { } @@ -13889,7 +14728,8 @@ declare namespace camera { * @extends MetadataObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface MetadataDogFaceObject extends MetadataObject { /** @@ -13899,7 +14739,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly leftEyeBoundingBox: Rect; @@ -13910,7 +14751,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly rightEyeBoundingBox: Rect; } @@ -13922,7 +14764,8 @@ declare namespace camera { * @extends MetadataObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface MetadataDogBodyObject extends MetadataObject { } @@ -13934,7 +14777,8 @@ declare namespace camera { * @extends MetadataObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface MetadataSalientDetectionObject extends MetadataObject { } @@ -13946,7 +14790,8 @@ declare namespace camera { * @typedef MetadataBarcodeObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface MetadataBarcodeObject extends MetadataObject { } @@ -13957,7 +14802,8 @@ declare namespace camera { * @typedef CameraOcclusionDetectionResult * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface CameraOcclusionDetectionResult { /** @@ -13967,7 +14813,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly isCameraOccluded: boolean; @@ -13978,7 +14825,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly isCameraLensDirty: boolean; } @@ -13998,7 +14846,8 @@ declare namespace camera { * @interface MetadataOutput * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface MetadataOutput extends CameraOutput { /** @@ -14018,7 +14867,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ start(callback: AsyncCallback): void; @@ -14039,7 +14889,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ start(): Promise; @@ -14056,7 +14907,8 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ stop(callback: AsyncCallback): void; @@ -14073,7 +14925,8 @@ declare namespace camera { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): Promise; @@ -14087,7 +14940,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ addMetadataObjectTypes(types: Array): void; @@ -14101,7 +14955,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ removeMetadataObjectTypes(types: Array): void; @@ -14124,7 +14979,8 @@ declare namespace camera { * @param { AsyncCallback> } callback - Callback used to get the available metadata objects. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'metadataObjectsAvailable', callback: AsyncCallback>): void; @@ -14143,7 +14999,8 @@ declare namespace camera { * @param { AsyncCallback> } callback - Callback used to get the available metadata objects. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'metadataObjectsAvailable', callback?: AsyncCallback>): void; @@ -14166,7 +15023,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the video output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -14185,7 +15043,8 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the video output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; } @@ -14193,17 +15052,18 @@ declare namespace camera { /** * Enum for camera concurrent type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @since 18 */ /** * Enum for camera concurrent type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum CameraConcurrentType { /** @@ -14217,7 +15077,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_LIMITED_CAPABILITY = 0, @@ -14232,7 +15093,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ CAMERA_FULL_CAPABILITY = 1, } @@ -14250,7 +15112,8 @@ declare namespace camera { * @interface CameraConcurrentInfo * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface CameraConcurrentInfo { /** @@ -14268,7 +15131,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly device: CameraDevice; @@ -14287,7 +15151,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly type: CameraConcurrentType; @@ -14306,7 +15171,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly modes: Array; @@ -14325,7 +15191,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ readonly outputCapabilities: Array; } @@ -14333,10 +15200,11 @@ declare namespace camera { /** * Enumerates the timelapse recording state. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum TimeLapseRecordState { /** @@ -14344,7 +15212,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IDLE = 0, @@ -14353,7 +15222,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ RECORDING = 1 } @@ -14361,10 +15231,11 @@ declare namespace camera { /** * Enumerates the timelapse preview type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum TimeLapsePreviewType { /** @@ -14372,7 +15243,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DARK = 1, @@ -14381,7 +15253,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ LIGHT = 2 } @@ -14392,7 +15265,8 @@ declare namespace camera { * @typedef TryAEInfo * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface TryAEInfo { /** @@ -14402,7 +15276,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly isTryAEDone: boolean; @@ -14413,7 +15288,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly isTryAEHintNeeded?: boolean; @@ -14424,20 +15300,22 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly previewType?: TimeLapsePreviewType; /** * Timelapse capture interval. * - * @type { ?number } + * @type { ?int } * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly captureInterval?: number; + readonly captureInterval?: int; } /** @@ -14447,7 +15325,8 @@ declare namespace camera { * @interface TimeLapsePhotoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface TimeLapsePhotoSession extends Session, Focus, ManualFocus, AutoExposure, ManualExposure, ManualIso, WhiteBalance, Zoom, ColorEffect { /** @@ -14458,7 +15337,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -14470,7 +15350,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -14482,7 +15363,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -14494,7 +15376,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -14506,7 +15389,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'isoInfoChange', callback: AsyncCallback): void; @@ -14518,7 +15402,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'isoInfoChange', callback?: AsyncCallback): void; @@ -14530,7 +15415,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'exposureInfoChange', callback: AsyncCallback): void; @@ -14542,7 +15428,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'exposureInfoChange', callback?: AsyncCallback): void; @@ -14554,7 +15441,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'luminationInfoChange', callback: AsyncCallback): void; @@ -14566,7 +15454,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'luminationInfoChange', callback?: AsyncCallback): void; @@ -14578,7 +15467,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isTryAENeeded(): boolean; @@ -14590,7 +15480,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ startTryAE(): void; @@ -14602,7 +15493,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stopTryAE(): void; @@ -14614,7 +15506,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'tryAEInfoChange', callback: AsyncCallback): void; @@ -14626,46 +15519,50 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'tryAEInfoChange', callback?: AsyncCallback): void; /** * Gets supported timelapse interval range. * - * @returns { Array } Timelapse interval range. + * @returns { Array } Timelapse interval range. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getSupportedTimeLapseIntervalRange(): Array; + getSupportedTimeLapseIntervalRange(): Array; /** * Gets the timelapse interval in use. * - * @returns { number } the timelapse interval in use. + * @returns { int } the timelapse interval in use. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getTimeLapseInterval(): number; + getTimeLapseInterval(): int; /** * Sets a timelapse interval for a camera device. * - * @param { number } interval The timelapse interval. + * @param { int } interval The timelapse interval. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setTimeLapseInterval(interval: number): void; + setTimeLapseInterval(interval: int): void; /** * Gets the timelapse recording state in use. @@ -14688,7 +15585,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setTimeLapseRecordState(state: TimeLapseRecordState): void; @@ -14713,7 +15611,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setTimeLapsePreviewType(type: TimeLapsePreviewType): void; } @@ -14721,10 +15620,11 @@ declare namespace camera { /** * Enum for Depth Data Accuracy. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enum DepthDataAccuracy { /** @@ -14732,7 +15632,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ DEPTH_DATA_ACCURACY_RELATIVE = 0, @@ -14741,7 +15642,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ DEPTH_DATA_ACCURACY_ABSOLUTE = 1 } @@ -14749,10 +15651,11 @@ declare namespace camera { /** * Enum for Depth Data Quality Level. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enum DepthDataQualityLevel { /** @@ -14760,7 +15663,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ DEPTH_DATA_QUALITY_BAD = 0, @@ -14769,7 +15673,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ DEPTH_DATA_QUALITY_FAIR = 1, @@ -14778,7 +15683,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ DEPTH_DATA_QUALITY_GOOD = 2 } @@ -14789,7 +15695,8 @@ declare namespace camera { * @interface DepthProfile * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface DepthProfile { /** @@ -14799,7 +15706,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly format: CameraFormat; @@ -14810,7 +15718,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly dataAccuracy: DepthDataAccuracy; @@ -14821,7 +15730,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly size: Size; } @@ -14832,7 +15742,8 @@ declare namespace camera { * @interface DepthData. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface DepthData { /** @@ -14842,7 +15753,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly format: CameraFormat; @@ -14853,7 +15765,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly depthMap: image.PixelMap; @@ -14864,7 +15777,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly qualityLevel: DepthDataQualityLevel; @@ -14875,7 +15789,8 @@ declare namespace camera { * @readonly * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ readonly dataAccuracy: DepthDataAccuracy; @@ -14886,7 +15801,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; } @@ -14898,7 +15814,8 @@ declare namespace camera { * @interface DepthDataOutput * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface DepthDataOutput extends CameraOutput { /** @@ -14910,7 +15827,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ start(): Promise; @@ -14923,7 +15841,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): Promise; @@ -14935,7 +15854,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'depthDataAvailable', callback: AsyncCallback): void; @@ -14947,7 +15867,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'depthDataAvailable', callback?: AsyncCallback): void; @@ -14959,7 +15880,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -14971,7 +15893,8 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; } @@ -14982,7 +15905,8 @@ declare namespace camera { * @interface DepthFusionQuery * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface DepthFusionQuery { /** @@ -14993,21 +15917,23 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ isDepthFusionSupported(): boolean; /** * Query the depth fusion threshold. * - * @returns { Array } The depth fusion threshold. + * @returns { Array } The depth fusion threshold. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ - getDepthFusionThreshold(): Array; + getDepthFusionThreshold(): Array; } /** @@ -15017,7 +15943,8 @@ declare namespace camera { * @interface DepthFusion * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface DepthFusion extends DepthFusionQuery { /** @@ -15028,7 +15955,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ isDepthFusionEnabled(): boolean; @@ -15042,7 +15970,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enableDepthFusion(enabled: boolean): void; } @@ -15050,10 +15979,11 @@ declare namespace camera { /** * Enum for auxiliary type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enum AuxiliaryType { /** @@ -15061,7 +15991,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CONTRACT_LENS = 0 } @@ -15069,10 +16000,11 @@ declare namespace camera { /** * Enum for auxiliary status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enum AuxiliaryStatus { /** @@ -15080,7 +16012,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LOCKED = 0, @@ -15089,7 +16022,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ ON = 1, @@ -15098,7 +16032,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ OFF = 2 } @@ -15106,10 +16041,11 @@ declare namespace camera { /** * Enum for color reservation type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ enum ColorReservationType { /** @@ -15117,7 +16053,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -15126,7 +16063,8 @@ declare namespace camera { * * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ PORTRAIT = 1 } @@ -15137,7 +16075,8 @@ declare namespace camera { * @interface ColorReservationQuery * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface ColorReservationQuery { /** @@ -15148,7 +16087,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ getSupportedColorReservationTypes(): Array; } @@ -15160,7 +16100,8 @@ declare namespace camera { * @interface ColorReservation * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface ColorReservation extends ColorReservationQuery { /** @@ -15171,7 +16112,8 @@ declare namespace camera { * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ getColorReservation(): ColorReservationType; @@ -15188,7 +16130,8 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ setColorReservation(type: ColorReservationType): void; } diff --git a/api/@ohos.multimedia.cameraPicker.d.ts b/api/@ohos.multimedia.cameraPicker.d.ts index 9998900eda19b3ba50fb97af95a15b977c3e8bff..4ae4cc94249047d3556edbd73758d4cac6610a96 100644 --- a/api/@ohos.multimedia.cameraPicker.d.ts +++ b/api/@ohos.multimedia.cameraPicker.d.ts @@ -30,7 +30,8 @@ import type camera from './@ohos.multimedia.camera'; * @namespace cameraPicker * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace cameraPicker { @@ -45,7 +46,8 @@ declare namespace cameraPicker { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ class PickerProfile { /** @@ -61,7 +63,8 @@ declare namespace cameraPicker { * @type { camera.CameraPosition } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cameraPosition: camera.CameraPosition; @@ -78,7 +81,8 @@ declare namespace cameraPicker { * @type { ?string } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ saveUri?: string; @@ -92,12 +96,13 @@ declare namespace cameraPicker { /** * The max duration of the video. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - videoDuration?: number; + videoDuration?: int; } /** @@ -113,7 +118,8 @@ declare namespace cameraPicker { * @enum { string } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum PickerMediaType { /** @@ -127,7 +133,8 @@ declare namespace cameraPicker { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PHOTO = 'photo', @@ -142,7 +149,8 @@ declare namespace cameraPicker { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO = 'video' } @@ -158,7 +166,8 @@ declare namespace cameraPicker { * * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ class PickerResult { /** @@ -171,12 +180,13 @@ declare namespace cameraPicker { /** * The result code. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - resultCode: number; + resultCode: int; /** * The result saved uri. @@ -191,7 +201,8 @@ declare namespace cameraPicker { * @type { string } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ resultUri: string; @@ -208,7 +219,8 @@ declare namespace cameraPicker { * @type { PickerMediaType } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mediaType: PickerMediaType; } @@ -234,7 +246,8 @@ declare namespace cameraPicker { * method. The return value is PickerResult. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function pick(context: Context, mediaTypes: Array, pickerProfile: PickerProfile): Promise; } diff --git a/api/@ohos.multimedia.drm.d.ts b/api/@ohos.multimedia.drm.d.ts index e58565cb8dd7bd35e0d1ed7871ee160fa9fa523e..507346a43db527b5bdd744b2a7a6615ebf524c4c 100644 --- a/api/@ohos.multimedia.drm.d.ts +++ b/api/@ohos.multimedia.drm.d.ts @@ -29,7 +29,8 @@ * @namespace drm * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace drm { /** @@ -43,7 +44,8 @@ declare namespace drm { * @enum { number } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enum DrmErrorCode { /** @@ -55,7 +57,8 @@ declare namespace drm { * All unknown errors. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ ERROR_UNKNOWN = 24700101, /** @@ -67,7 +70,8 @@ declare namespace drm { * Meet max MediaKeySystem num limit. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ MAX_SYSTEM_NUM_REACHED = 24700103, /** @@ -79,7 +83,8 @@ declare namespace drm { * Meet max MediaKeySession num limit. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ MAX_SESSION_NUM_REACHED = 24700104, /** @@ -91,7 +96,8 @@ declare namespace drm { * Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ SERVICE_FATAL_ERROR = 24700201 } @@ -107,7 +113,8 @@ declare namespace drm { * @enum { string } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enum PreDefinedConfigName { /** @@ -119,7 +126,8 @@ declare namespace drm { * Config name vendor * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CONFIG_DEVICE_VENDOR = 'vendor', /** @@ -131,7 +139,8 @@ declare namespace drm { * Config name version * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CONFIG_DEVICE_VERSION = 'version', /** @@ -143,7 +152,8 @@ declare namespace drm { * Config name description * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CONFIG_DEVICE_DESCRIPTION = 'description', /** @@ -155,7 +165,8 @@ declare namespace drm { * Config name algorithms * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CONFIG_DEVICE_ALGORITHMS = 'algorithms', /** @@ -167,7 +178,8 @@ declare namespace drm { * Config name deviceUniqueId * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CONFIG_DEVICE_UNIQUE_ID = 'deviceUniqueId', /** @@ -179,7 +191,8 @@ declare namespace drm { * Config name maxSessionNum * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CONFIG_SESSION_MAX = 'maxSessionNum', /** @@ -191,7 +204,8 @@ declare namespace drm { * Config name currentSessionNum * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CONFIG_SESSION_CURRENT = 'currentSessionNum', } @@ -207,7 +221,8 @@ declare namespace drm { * @enum { number } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enum MediaKeyType { /** @@ -219,7 +234,8 @@ declare namespace drm { * Offline media key type. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA_KEY_TYPE_OFFLINE = 0, /** @@ -231,7 +247,8 @@ declare namespace drm { * Online media key type. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA_KEY_TYPE_ONLINE, } @@ -247,7 +264,8 @@ declare namespace drm { * @enum { number } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enum OfflineMediaKeyStatus { /** @@ -259,7 +277,8 @@ declare namespace drm { * Offline media key status unknown. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ OFFLINE_MEDIA_KEY_STATUS_UNKNOWN = 0, /** @@ -271,7 +290,8 @@ declare namespace drm { * Offline media key status usable. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ OFFLINE_MEDIA_KEY_STATUS_USABLE = 1, /** @@ -283,7 +303,8 @@ declare namespace drm { * Offline media key status inactive. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ OFFLINE_MEDIA_KEY_STATUS_INACTIVE = 2, } @@ -299,7 +320,8 @@ declare namespace drm { * @enum { number } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enum CertificateStatus { /** @@ -311,7 +333,8 @@ declare namespace drm { * Device already provisioned. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CERT_STATUS_PROVISIONED = 0, /** @@ -323,7 +346,8 @@ declare namespace drm { * Device not provisioned. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CERT_STATUS_NOT_PROVISIONED, /** @@ -335,7 +359,8 @@ declare namespace drm { * Cert already expired. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CERT_STATUS_EXPIRED, /** @@ -347,7 +372,8 @@ declare namespace drm { * Certs are invalid. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CERT_STATUS_INVALID, /** @@ -359,7 +385,8 @@ declare namespace drm { * Get certs status failed. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CERT_STATUS_UNAVAILABLE, } @@ -375,7 +402,8 @@ declare namespace drm { * @enum { number } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum MediaKeyRequestType { /** @@ -387,7 +415,8 @@ declare namespace drm { * Media key request type unknown. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA_KEY_REQUEST_TYPE_UNKNOWN = 0, /** @@ -399,7 +428,8 @@ declare namespace drm { * Media key request type initial. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA_KEY_REQUEST_TYPE_INITIAL = 1, /** @@ -411,7 +441,8 @@ declare namespace drm { * Media key request type renewal. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA_KEY_REQUEST_TYPE_RENEWAL = 2, /** @@ -423,7 +454,8 @@ declare namespace drm { * Media key request type release. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA_KEY_REQUEST_TYPE_RELEASE = 3, /** @@ -435,7 +467,8 @@ declare namespace drm { * Media key request type none. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA_KEY_REQUEST_TYPE_NONE = 4, /** @@ -447,7 +480,8 @@ declare namespace drm { * Media key request type update. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA_KEY_REQUEST_TYPE_UPDATE = 5, } @@ -463,7 +497,8 @@ declare namespace drm { * @enum { number } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum ContentProtectionLevel { /** @@ -475,7 +510,8 @@ declare namespace drm { * Device decrypt and decode type unknown. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_PROTECTION_LEVEL_UNKNOWN = 0, /** @@ -487,7 +523,8 @@ declare namespace drm { * Device using software level. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_PROTECTION_LEVEL_SW_CRYPTO, /** @@ -499,7 +536,8 @@ declare namespace drm { * Device using hardware level. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_PROTECTION_LEVEL_HW_CRYPTO, /** @@ -511,7 +549,8 @@ declare namespace drm { * Device using enhanced hardware level. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_PROTECTION_LEVEL_ENHANCED_HW, /** @@ -523,7 +562,8 @@ declare namespace drm { * Max mode. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CONTENT_PROTECTION_LEVEL_MAX, } @@ -539,7 +579,8 @@ declare namespace drm { * @interface ProvisionRequest * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface ProvisionRequest { /** @@ -553,7 +594,8 @@ declare namespace drm { * @type { Uint8Array } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ data: Uint8Array; /** @@ -567,7 +609,8 @@ declare namespace drm { * @type { string } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ defaultURL: string; } @@ -583,7 +626,8 @@ declare namespace drm { * @interface OptionsData * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface OptionsData { /** @@ -597,7 +641,8 @@ declare namespace drm { * @type { string } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; /** @@ -611,7 +656,8 @@ declare namespace drm { * @type { string } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ value: string; } @@ -627,7 +673,8 @@ declare namespace drm { * @interface MediaKeyRequest * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface MediaKeyRequest { /** @@ -641,7 +688,8 @@ declare namespace drm { * @type { MediaKeyRequestType } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mediaKeyRequestType: MediaKeyRequestType; /** @@ -655,7 +703,8 @@ declare namespace drm { * @type { Uint8Array } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ data: Uint8Array; /** @@ -669,7 +718,8 @@ declare namespace drm { * @type { string } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ defaultURL: string; } @@ -685,7 +735,8 @@ declare namespace drm { * @interface EventInfo * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface EventInfo { /** @@ -699,7 +750,8 @@ declare namespace drm { * @type { Uint8Array } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ info: Uint8Array; /** @@ -713,7 +765,8 @@ declare namespace drm { * @type { string } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ extraInfo: string; } @@ -729,7 +782,8 @@ declare namespace drm { * @interface StatisticKeyValue * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface StatisticKeyValue { /** @@ -743,7 +797,8 @@ declare namespace drm { * @type { string } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; /** @@ -757,7 +812,8 @@ declare namespace drm { * @type { string } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ value: string; } @@ -773,7 +829,8 @@ declare namespace drm { * @interface MediaKeyStatus * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface MediaKeyStatus { /** @@ -787,7 +844,8 @@ declare namespace drm { * @type { string } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; /** @@ -801,7 +859,8 @@ declare namespace drm { * @type { string } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ value: string; } @@ -817,7 +876,8 @@ declare namespace drm { * @interface KeysInfo * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface KeysInfo { /** @@ -831,7 +891,8 @@ declare namespace drm { * @type { Uint8Array } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ keyId: Uint8Array; /** @@ -845,7 +906,8 @@ declare namespace drm { * @type { string } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ value: string; } @@ -861,7 +923,8 @@ declare namespace drm { * @interface MediaKeySystemInfo * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface MediaKeySystemInfo { /** @@ -875,7 +938,8 @@ declare namespace drm { * @type { string } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ uuid: string; /** @@ -889,7 +953,8 @@ declare namespace drm { * @type { Uint8Array } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pssh: Uint8Array; } @@ -905,7 +970,8 @@ declare namespace drm { * @interface MediaKeySystemDescription * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface MediaKeySystemDescription { /** @@ -919,7 +985,8 @@ declare namespace drm { * @type { string } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; /** @@ -933,7 +1000,8 @@ declare namespace drm { * @type { string } * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ uuid: string; } @@ -959,7 +1027,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ function getMediaKeySystemUuid(name: string): string; @@ -978,7 +1047,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ function getMediaKeySystems(): MediaKeySystemDescription[]; @@ -1009,6 +1079,21 @@ declare namespace drm { */ function createMediaKeySystem(name: string): MediaKeySystem; + /** + * Creates a MediaKeySystem instance. + * @param { string } name - Used to point a Digital Right Management solution. + * @returns { MediaKeySystem | undefined } The MediaKeySystem instance or undefined. + * @throws { BusinessError } 401 - The parameter check failed. Possibly because: + * 1.Mandatory parameters are left unspecified. 2.Parameter verification failed. + * @throws { BusinessError } 24700101 - All unknown errors. + * @throws { BusinessError } 24700103 - Meet max MediaKeySystem num limit. + * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. + * @syscap SystemCapability.Multimedia.Drm.Core + * @since 20 + * @arkts 1.2 + */ + function createMediaKeySystem(name: string): MediaKeySystem | undefined; + /** * Judge whether a system that specifies name, mimetype and content protection level is supported. * @param { string } name - Used to point a Digital Right Management solution. @@ -1036,7 +1121,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ function isMediaKeySystemSupported(name: string, mimeType: string, level: ContentProtectionLevel): boolean; @@ -1065,7 +1151,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ function isMediaKeySystemSupported(name: string, mimeType: string): boolean; @@ -1092,7 +1179,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ function isMediaKeySystemSupported(name: string): boolean; @@ -1109,7 +1197,8 @@ declare namespace drm { * @interface MediaKeySystem * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface MediaKeySystem { /** @@ -1135,7 +1224,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getConfigurationString(configName: string): string; @@ -1162,7 +1252,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ setConfigurationString(configName: string, value: string): void; @@ -1187,7 +1278,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getConfigurationByteArray(configName: string): Uint8Array; @@ -1214,7 +1306,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ setConfigurationByteArray(configName: string, value: Uint8Array): void; @@ -1235,7 +1328,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getStatistics(): StatisticKeyValue[]; @@ -1254,7 +1348,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getMaxContentProtectionLevel(): ContentProtectionLevel; @@ -1273,7 +1368,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ generateKeySystemRequest(): Promise; @@ -1300,7 +1396,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ processKeySystemResponse(response: Uint8Array): Promise; @@ -1319,7 +1416,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getCertificateStatus(): CertificateStatus; @@ -1342,7 +1440,8 @@ declare namespace drm { * @throws { BusinessError } 24700101 - All unknown errors. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'keySystemRequired', callback: (eventInfo: EventInfo) => void): void; @@ -1365,7 +1464,8 @@ declare namespace drm { * @throws { BusinessError } 24700101 - All unknown errors. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'keySystemRequired', callback?: (eventInfo: EventInfo) => void): void; @@ -1398,6 +1498,22 @@ declare namespace drm { */ createMediaKeySession(level: ContentProtectionLevel): MediaKeySession; + /** + * Create a MediaKeySession instance with level. + * @param { ContentProtectionLevel} level - Used to specify the content protection level. + * @returns { MediaKeySession | undefined } A MediaKeySession instance or undefined. + * @throws { BusinessError } 401 - The parameter check failed. Possibly because: + * 1.Mandatory parameters are left unspecified. 2.The param level exceeds reasonable range, + * please use value in ContentProtectionLevel. + * @throws { BusinessError } 24700101 - All unknown errors. + * @throws { BusinessError } 24700104 - Meet max MediaKeySession num limit. + * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. + * @syscap SystemCapability.Multimedia.Drm.Core + * @since 20 + * @arkts 1.2 + */ + createMediaKeySession(level: ContentProtectionLevel): MediaKeySession | undefined; + /** * Create a MediaKeySession instance. * @returns { MediaKeySession } A MediaKeySession instance. @@ -1419,6 +1535,18 @@ declare namespace drm { */ createMediaKeySession(): MediaKeySession; + /** + * Create a MediaKeySession instance. + * @returns { MediaKeySession | undefined } A MediaKeySession instance or undefined + * @throws { BusinessError } 24700101 - All unknown errors. + * @throws { BusinessError } 24700104 - Meet max MediaKeySession num limit. + * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. + * @syscap SystemCapability.Multimedia.Drm.Core + * @since 20 + * @arkts 1.2 + */ + createMediaKeySession(): MediaKeySession | undefined; + /** * Get the list of offline MediaKeyIds. * @returns { Uint8Array[] } The list of offline MediaKeyIds. @@ -1434,7 +1562,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getOfflineMediaKeyIds(): Uint8Array[]; @@ -1461,7 +1590,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getOfflineMediaKeyStatus(mediaKeyId: Uint8Array): OfflineMediaKeyStatus; @@ -1484,7 +1614,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ clearOfflineMediaKeys(mediaKeyId: Uint8Array): void; /** @@ -1500,7 +1631,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ destroy(): void; } @@ -1518,7 +1650,8 @@ declare namespace drm { * @interface MediaKeySession * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface MediaKeySession { @@ -1541,7 +1674,7 @@ declare namespace drm { * Generate the media key request. * @param { string } mimeType - Media type. * @param { Uint8Array } initData - PSSH info. - * @param { number } mediaKeyType - Offline or online. + * @param { int } mediaKeyType - Offline or online. * @param { OptionsData[] } options - Optional data the application set to drm framework. * @returns { Promise } Promise with MediaKeyRequest used to return the result. * @throws { BusinessError } 401 -The parameter check failed. Possibly because: @@ -1551,9 +1684,10 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - generateMediaKeyRequest(mimeType: string, initData: Uint8Array, mediaKeyType: number, options?: OptionsData[]): Promise; + generateMediaKeyRequest(mimeType: string, initData: Uint8Array, mediaKeyType: int, options?: OptionsData[]): Promise; /** * Process the response corresponding to the media key request obtained by the application. @@ -1578,7 +1712,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ processMediaKeyResponse(response: Uint8Array): Promise; @@ -1597,7 +1732,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ checkMediaKeyStatus(): MediaKeyStatus[]; @@ -1614,7 +1750,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ clearMediaKeys(): void; @@ -1643,7 +1780,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ generateOfflineReleaseRequest(mediaKeyId: Uint8Array): Promise; @@ -1672,7 +1810,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ processOfflineReleaseResponse(mediaKeyId: Uint8Array, response: Uint8Array): Promise; @@ -1699,7 +1838,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ restoreOfflineMediaKeys(mediaKeyId: Uint8Array): Promise; @@ -1718,7 +1858,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getContentProtectionLevel(): ContentProtectionLevel; @@ -1745,7 +1886,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ requireSecureDecoderModule(mimeType: string): boolean; @@ -1770,7 +1912,8 @@ declare namespace drm { * @throws { BusinessError } 24700101 - All unknown errors. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'keyRequired', callback: (eventInfo: EventInfo) => void): void; @@ -1795,7 +1938,8 @@ declare namespace drm { * @throws { BusinessError } 24700101 - All unknown errors. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'keyRequired', callback?: (eventInfo: EventInfo) => void): void; @@ -1820,7 +1964,8 @@ declare namespace drm { * @throws { BusinessError } 24700101 - All unknown errors. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'keyExpired', callback: (eventInfo: EventInfo) => void): void; @@ -1845,7 +1990,8 @@ declare namespace drm { * @throws { BusinessError } 24700101 - All unknown errors. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'keyExpired', callback?: (eventInfo: EventInfo) => void): void; @@ -1870,7 +2016,8 @@ declare namespace drm { * @throws { BusinessError } 24700101 - All unknown errors. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'vendorDefined', callback: (eventInfo: EventInfo) => void): void; @@ -1895,7 +2042,8 @@ declare namespace drm { * @throws { BusinessError } 24700101 - All unknown errors. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'vendorDefined', callback?: (eventInfo: EventInfo) => void): void; @@ -1920,7 +2068,8 @@ declare namespace drm { * @throws { BusinessError } 24700101 - All unknown errors. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'expirationUpdate', callback: (eventInfo: EventInfo) => void): void; @@ -1945,7 +2094,8 @@ declare namespace drm { * @throws { BusinessError } 24700101 - All unknown errors. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'expirationUpdate', callback?: (eventInfo: EventInfo) => void): void; @@ -1970,7 +2120,8 @@ declare namespace drm { * @throws { BusinessError } 24700101 - All unknown errors. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'keysChange', callback: (keyInfo: KeysInfo[], newKeyAvailable: boolean) => void): void; @@ -1995,7 +2146,8 @@ declare namespace drm { * @throws { BusinessError } 24700101 - All unknown errors. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'keysChange', callback?: (keyInfo: KeysInfo[], newKeyAvailable: boolean) => void): void; @@ -2012,7 +2164,8 @@ declare namespace drm { * @throws { BusinessError } 24700201 - Fatal service error, for example, service died. * @syscap SystemCapability.Multimedia.Drm.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ destroy(): void; 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..010dcfa5982ea65b1d25e56a0985c2ed2528fb24 100644 --- a/api/@ohos.multimedia.image.d.ts +++ b/api/@ohos.multimedia.image.d.ts @@ -42,20 +42,21 @@ 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 { /** * Enumerates pixel map formats. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 7 */ /** * Enumerates pixel map formats. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @since 10 @@ -63,7 +64,7 @@ declare namespace image { /** * Enumerates pixel map formats. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @atomicservice @@ -72,12 +73,13 @@ declare namespace image { /** * Enumerates pixel map formats. * - * @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 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 } @@ -454,10 +470,11 @@ declare namespace image { /** * Enumerates image resolution quality. * - * @enum { number } + * @enum { int } * @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,20 +540,21 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface Size { /** * Height * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 6 */ /** * Height * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @since 10 @@ -541,7 +562,7 @@ declare namespace image { /** * Height * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @atomicservice @@ -550,26 +571,27 @@ 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 * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 6 */ /** * Width * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @since 10 @@ -577,7 +599,7 @@ declare namespace image { /** * Width * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @atomicservice @@ -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' } @@ -2335,16 +2539,18 @@ declare namespace image { /** * Enum for image formats. * - * @enum { number } + * @enum { int } * @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 } @@ -2360,14 +2567,14 @@ declare namespace image { /** * Enumerates alpha types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 9 */ /** * Enumerates alpha types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @since 10 @@ -2375,7 +2582,7 @@ declare namespace image { /** * Enumerates alpha types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @atomicservice @@ -2384,12 +2591,13 @@ declare namespace image { /** * Enumerates alpha types. * - * @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 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 } @@ -2524,9 +2736,10 @@ declare namespace image { /** * Enumerates decoding dynamic range. * - * @enum { number } + * @enum { int } * @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 } @@ -2559,9 +2775,10 @@ declare namespace image { /** * Enumerates packing dynamic range. * - * @enum { number } + * @enum { int } * @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 } @@ -2762,16 +2989,18 @@ declare namespace image { /** * The component type of image. * - * @enum { number } + * @enum { int } * @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 } @@ -2803,16 +3035,18 @@ declare namespace image { /** * Enumerates the HDR metadata types that need to be stored in Pixelmap. * - * @enum { number } + * @enum { int } * @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, } @@ -2844,16 +3081,18 @@ declare namespace image { /** * Value for HDR_METADATA_TYPE. * - * @enum { number } + * @enum { int } * @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, } @@ -2885,16 +3127,18 @@ declare namespace image { /** * Type of allocator used to allocate memory of a PixelMap. * - * @enum { number } + * @enum { int } * @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,21 +3229,22 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size: Size; /** * x-coordinate at the upper left corner of the image. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 7 */ /** * x-coordinate at the upper left corner of the image. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @since 10 @@ -3004,7 +3252,7 @@ declare namespace image { /** * x-coordinate at the upper left corner of the image. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @atomicservice @@ -3013,26 +3261,27 @@ 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. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 7 */ /** * y-coordinate at the upper left corner of the image. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @since 10 @@ -3040,7 +3289,7 @@ declare namespace image { /** * y-coordinate at the upper left corner of the image. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @atomicservice @@ -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,21 +3562,22 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ size: Size; /** * Indicates image default density. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 9 */ /** * Indicates image default density. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @since 10 @@ -3328,7 +3585,7 @@ declare namespace image { /** * Indicates image default density. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @atomicservice @@ -3337,19 +3594,20 @@ 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. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @atomicservice * @since 11 @@ -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; } @@ -3412,16 +3675,18 @@ declare namespace image { /** * Enumerates the strategies for executing the cropping and scaling operations when both desiredSize and desiredRegion are specified. * - * @enum { number } + * @enum { int } * @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,21 +3748,22 @@ 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; /** * 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 * @since 6 */ /** * 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 * @since 10 @@ -3503,19 +3771,20 @@ 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. * 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 * @since 9 */ @@ -3523,7 +3792,7 @@ 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 * @since 10 @@ -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; } @@ -3564,46 +3836,51 @@ declare namespace image { * * @typedef PackingOptionsForSequence * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ interface PackingOptionsForSequence { /** * Specify the number of frames. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - frameCount: number; + frameCount: int; /** * Specify the delay time for each frame of the dynamic image. * If the length is less than frameCount, the missing parts will be filling with the last value * - * @type { Array } + * @type { Array } * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - delayTimeList: Array; + delayTimeList: Array; /** * Specify the disposal types of each frame in the image sequence packing. * - * @type { ?Array } + * @type { ?Array } * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - disposalTypes?: Array; + disposalTypes?: Array; /** * Specify the number of times the loop should, the range is [0, 65535] * If this loop is equal to 0, it will be infinite loop. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - loopCount?: number; + loopCount?: int; } /** @@ -3675,18 +3952,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 +3973,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,20 +4011,21 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ interface DecodingOptions { /** * Number of image frames. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @since 7 */ /** * Number of image frames. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @since 10 @@ -3752,7 +4033,7 @@ declare namespace image { /** * Number of image frames. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @atomicservice @@ -3761,26 +4042,27 @@ 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. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @since 7 */ /** * Sampling ratio of the image pixel map. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @since 10 @@ -3788,7 +4070,7 @@ declare namespace image { /** * Sampling ratio of the image pixel map. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @atomicservice @@ -3797,26 +4079,27 @@ 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. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @since 7 */ /** * Rotation angle of the image pixel map. The value ranges from 0 to 360. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @since 10 @@ -3824,7 +4107,7 @@ 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 * @atomicservice @@ -3833,14 +4116,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 +4158,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 +4199,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 +4236,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,21 +4273,22 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ desiredPixelFormat?: PixelMapFormat; /** * The density for image pixel map. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @since 9 */ /** * The density for image pixel map. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @since 10 @@ -4008,7 +4296,7 @@ declare namespace image { /** * The density for image pixel map. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform * @atomicservice @@ -4017,14 +4305,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 +4321,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 +4331,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 +4342,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 +4352,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 +4363,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 +4373,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 +4406,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 +4444,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 +4480,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 +4490,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 +4527,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 +4564,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 +4601,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 +4638,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,20 +4676,21 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface SourceOptions { /** * The density for ImageSource. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 9 */ /** * The density for ImageSource. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @since 10 @@ -4392,7 +4698,7 @@ declare namespace image { /** * The density for ImageSource. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @atomicservice @@ -4401,14 +4707,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 +4749,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 +4786,8 @@ declare namespace image { * @crossplatform * @form * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sourceSize?: Size; } @@ -4488,90 +4797,99 @@ declare namespace image { * * @typedef HdrStaticMetadata * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface HdrStaticMetadata { /** * The X-coordinate of the primary colors. Specifies the normalized X-coordinates of the display device's three * primary colors. The values are stored in an array of length 3, in the order of red, green, and blue (r, g, b). * Each value is represented in units of 0.00002 and must fall within the range [0.0, 1.0]. - * - * @type { Array } + * + * @type { Array } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - displayPrimariesX: Array; + displayPrimariesX: Array; /** * The Y-coordinate of the primary colors. Specifies the normalized Y-coordinates of the display device's three * primary colors. The values are stored in an array of length 3, in the order of red, green, and blue (r, g, b). * Each value is represented in units of 0.00002 and must fall within the range [0.0, 1.0]. - * - * @type { Array } + * + * @type { Array } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - displayPrimariesY: Array; + displayPrimariesY: Array; /** * The X-coordinate of the white point value. Specifies the normalized X-coordinate of the white point. * The value is represented in units of 0.00002 and must fall within the range [0.0, 1.0]. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - whitePointX: number; + whitePointX: double; /** * The Y-coordinate of the white point value. Specifies the normalized Y-coordinate of the white point. * The value is represented in units of 0.00002 and must fall within the range [0.0, 1.0]. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - whitePointY: number; + whitePointY: double; /** * Maximum luminance of the image's primary display. * The value is measured in units of 1, with a maximum allowed value of 65,535. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - maxLuminance: number; + maxLuminance: double; /** * Minimum luminance of the image's primary display. * The value is measured in units of 0.0001, with a maximum allowed value of 6.55535. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - minLuminance: number; + minLuminance: double; /** * Maximum brightness of displayed content. * The value is measured in units of 1, with a maximum allowed value of 65,535. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - maxContentLightLevel: number; + maxContentLightLevel: double; /** * Maximum average brightness of displayed content. * The value is measured in units of 1, with a maximum allowed value of 65,535. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - maxFrameAverageLightLevel: number; + maxFrameAverageLightLevel: double; } /** @@ -4579,53 +4897,59 @@ declare namespace image { * * @typedef GainmapChannel * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface GainmapChannel { /** * The per-component max gain map values. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - gainmapMax: number; + gainmapMax: double; /** * The per-component min gain map values. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - gainmapMin: number; + gainmapMin: double; /** * The per-component gamma values. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - gamma: number; + gamma: double; /** * The per-component baseline offset. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - baseOffset: number; + baseOffset: double; /** * The per-component alternate offset. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - alternateOffset: number; + alternateOffset: double; } /** @@ -4633,69 +4957,77 @@ declare namespace image { * * @typedef HdrGainmapMetadata * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface HdrGainmapMetadata { /** * The version used by the writer. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - writerVersion: number; + writerVersion: int; /** * The minimum version a parser needs to understand. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - miniVersion: number; + miniVersion: int; /** * The number of gain map channels, with a value of 1 or 3. * - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - gainmapChannelCount: number; + gainmapChannelCount: int; /** * Indicate whether to use the color space of the base image. * * @type { boolean } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ useBaseColorFlag: boolean; /** * The baseline hdr headroom. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - baseHeadroom: number; + baseHeadroom: double; /** * The alternate hdr headroom. * - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - alternateHeadroom: number; + alternateHeadroom: double; /** * The per-channel metadata. * * @type { Array } * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ channels: Array; } @@ -4705,7 +5037,8 @@ declare namespace image { * * @typedef {HdrMetadataType | HdrStaticMetadata | ArrayBuffer | HdrGainmapMetadata} HdrMetadataValue * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type HdrMetadataValue = HdrMetadataType | HdrStaticMetadata | ArrayBuffer | HdrGainmapMetadata; @@ -4726,7 +5059,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 +5081,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 +5096,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 +5148,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; @@ -4922,7 +5259,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -5510,7 +5865,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -5525,7 +5881,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -5605,7 +5963,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -5619,7 +5978,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -5707,7 +6068,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -5722,7 +6084,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -5809,7 +6173,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -5823,7 +6188,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. * @throws { BusinessError } 62980137 - Invalid image operation. * @syscap SystemCapability.Multimedia.Image.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ toSdr(): Promise; @@ -5869,7 +6236,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -5909,7 +6277,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -5922,7 +6291,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 +6418,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 +6427,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 +6437,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 +6459,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 +6468,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 +6478,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 +6535,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -6195,7 +6572,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -6208,14 +6586,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 +6602,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 +6612,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 +6623,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 +6647,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 +6657,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 +6668,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 +6710,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,15 +6727,16 @@ 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. @@ -6361,13 +6745,13 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): 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. @@ -6376,13 +6760,13 @@ 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 @@ -6390,8 +6774,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 +6784,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,8 +6795,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 @@ -6420,13 +6804,13 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): 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 +6818,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 +6828,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,8 +6839,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 @@ -6464,13 +6848,13 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): 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. @@ -6479,12 +6863,12 @@ 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 @@ -6492,7 +6876,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 +6885,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 +6895,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 +6917,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 +6926,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 +6936,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 +7002,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -6659,7 +7047,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -6674,7 +7063,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -6754,7 +7145,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -6768,7 +7160,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -6861,7 +7257,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -6909,7 +7308,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -6924,7 +7324,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -6960,7 +7361,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -6996,7 +7398,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -7036,7 +7439,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -7121,7 +7528,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise @@ -7174,7 +7585,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise @@ -7187,14 +7599,16 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -7285,7 +7704,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 +7714,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise @@ -7323,7 +7745,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise @@ -7333,7 +7756,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): Promise> @@ -7480,7 +7917,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): Promise @@ -7490,7 +7928,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 +7938,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 } @@ -7509,14 +7949,16 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } * @syscap SystemCapability.Multimedia.Image.ImageSource - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ desiredAuxiliaryPictures: Array; } @@ -7592,7 +8039,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the image information. @@ -7724,9 +8178,10 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; + getImageInfo(index: int, callback: AsyncCallback): void; /** * Obtains information about this image and uses a callback to return the result. @@ -7760,7 +8215,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -7800,7 +8256,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the image information. @@ -7808,22 +8264,24 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): 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. + * @param { int } 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). * @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 +8323,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -7901,7 +8360,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -7945,7 +8405,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; @@ -7971,7 +8432,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -7982,7 +8444,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise>; @@ -8110,7 +8575,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise>): void; @@ -8162,14 +8628,15 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise>): void; /** * Obtains the array of delay time in an image. This method uses a promise to return the array. * - * @returns { 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. @@ -8186,7 +8653,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,14 +8665,15 @@ 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. * - * @param { AsyncCallback> } 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. @@ -8222,7 +8690,7 @@ 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. @@ -8235,14 +8703,15 @@ 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. * - * @returns { 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 } 62980101 - The image data is abnormal. @@ -8250,14 +8719,15 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise>; + getDisposalTypeList(): Promise>; /** * Obtains the count of frame in an image. This method uses a promise to return the number. * - * @returns { Promise } A Promise instance used to return the number. + * @returns { Promise } A Promise instance used to return the number. * @throws { BusinessError } 62980096 - The operation failed. Possible cause: 1.Image upload exception. * 2. Decoding process exception. 3. Insufficient memory. * @throws { BusinessError } 62980111 - The image source data is incomplete. @@ -8276,7 +8746,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the number. + * @returns { Promise } A Promise instance used to return the number. * @throws { BusinessError } 62980096 - The operation failed. Possible cause: 1.Image upload exception. * 2. Decoding process exception. 3. Insufficient memory. * @throws { BusinessError } 62980111 - The image source data is incomplete. @@ -8290,14 +8760,15 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; + getFrameCount(): Promise; /** * Obtains the count of frame in an image. This method uses a callback to return the number. * - * @param { AsyncCallback } callback Callback used to return the number. + * @param { AsyncCallback } callback Callback used to return the number. * @throws { BusinessError } 62980096 - The operation failed. Possible cause: 1.Image upload exception. * 2. Decoding process exception. 3. Insufficient memory. * @throws { BusinessError } 62980111 - The image source data is incomplete. @@ -8316,7 +8787,7 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the number. + * @param { AsyncCallback } callback Callback used to return the number. * @throws { BusinessError } 62980096 - The operation failed. Possible cause: 1.Image upload exception. * 2. Decoding process exception. 3. Insufficient memory. * @throws { BusinessError } 62980111 - The image source data is incomplete. @@ -8330,9 +8801,10 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): void; + getFrameCount(callback: AsyncCallback): void; /** * Obtains the value of a property in an image with the specified index. This method uses a @@ -8382,7 +8854,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -8481,7 +8954,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): Promise>; @@ -8529,7 +9003,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -8600,7 +9075,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise): Promise; @@ -8632,14 +9108,15 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the property value. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - updateData(buf: ArrayBuffer, isFinished: boolean, offset: number, length: number): Promise; + updateData(buf: ArrayBuffer, isFinished: boolean, offset: int, length: int): Promise; /** * Update the data in the incremental ImageSource. @@ -8669,18 +9146,19 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback to return the operation result. * @syscap SystemCapability.Multimedia.Image.ImageSource * @crossplatform - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ updateData( buf: ArrayBuffer, isFinished: boolean, - offset: number, - length: number, + offset: int, + length: int, callback: AsyncCallback ): void; @@ -8697,7 +9175,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 +9193,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; @@ -8728,7 +9208,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise @@ -8780,7 +9261,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; } @@ -8807,7 +9289,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -9006,7 +9490,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -9020,7 +9505,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise, options: PackingOptionsForSequence): Promise; @@ -9028,7 +9514,7 @@ 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 +9530,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 +9555,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 +9580,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,24 +9605,26 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; + packToFile(source: PixelMap, fd: int, options: PackingOption): Promise; /** * Compresses a Pixelmap sequence into gif. * * @param { Array } pixelmapSequence PixelMaps to be encoded. - * @param { number } fd File descriptor of the output encoded file. + * @param { int } fd File descriptor of the output encoded file. * @param { PackingOptionsForSequence } options Options for image packing. * @returns { Promise } void. * @throws { BusinessError } 401 - Parameter error.Possible causes: 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types;3.Parameter verification failed. * @throws { BusinessError } 7800301 - Failed to encode image. * @syscap SystemCapability.Multimedia.Image.ImagePacker - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - packToFileFromPixelmapSequence(pixelmapSequence: Array, fd: number, options: PackingOptionsForSequence): Promise; + packToFileFromPixelmapSequence(pixelmapSequence: Array, fd: int, options: PackingOptionsForSequence): Promise; /** * Releases an ImagePacker instance and uses a callback to return the result. @@ -9148,7 +9639,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 +9657,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 +9672,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; @@ -9187,16 +9681,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 +9708,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise; } @@ -9223,7 +9719,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 +9783,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 +9793,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 +9803,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 +9814,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 +9868,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 +9878,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 +9888,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; @@ -9385,7 +9898,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback used to return the next image. * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readNextImage(callback: AsyncCallback): void; @@ -9394,7 +9908,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } A Promise instance used to return the next image. * @syscap SystemCapability.Multimedia.Image.ImageReceiver - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readNextImage(): Promise; @@ -9404,7 +9919,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 +9930,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 +9940,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 +9950,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 +9961,20 @@ 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 */ dequeueImage(callback: AsyncCallback): void; @@ -9479,29 +10002,32 @@ 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 */ dequeueImage(): Promise; /** * Queue buffer to dirty queue and uses a callback to return the result. * - * @param { Image } interface + * @param { Image } image * @param { AsyncCallback } 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 */ - 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 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - queueImage(interface: Image): Promise; + queueImage(image: Image): Promise; /** * Subscribe callback when releasing buffer @@ -9509,7 +10035,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback 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 */ on(type: 'imageRelease', callback: AsyncCallback): void; @@ -9519,7 +10046,8 @@ function createUnpremultipliedPixelMap(src: PixelMap, dst: PixelMap): Promise } callback Callback to be removed. * @syscap SystemCapability.Multimedia.Image.ImageCreator - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'imageRelease', callback?: AsyncCallback): void; @@ -9528,7 +10056,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 +10066,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 old mode 100755 new mode 100644 index dbbc24af82ad0c86cecbbc4815a38ac491f21edd..a20f26902b78630761d6d32bdc4f7587912f77e3 --- a/api/@ohos.multimedia.media.d.ts +++ b/api/@ohos.multimedia.media.d.ts @@ -43,7 +43,8 @@ import type drm from './@ohos.multimedia.drm'; * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace media { /** @@ -81,6 +82,25 @@ declare namespace media { * @since 12 */ function createAVPlayer(callback: AsyncCallback): void; + /** + * Creates an **AVPlayer** instance. This API uses an asynchronous callback to return the result. + *
**NOTE:**
+ * You are advised to create a maximum of 16 **AVPlayer** instances for an application in both audio and video + * playback scenarios. + * + * The actual number of instances that can be created may be different. + * It depends on the specifications of the device chip in use. + * + * @param { AsyncCallback } callback - used to return the result. If the operation is successful, an + * **AVPlayer** instance is returned; otherwise, **null** is returned. The instance can be used to play + * audio and video. + * @throws { BusinessError } 5400101 - No memory. Return by callback. + * @syscap SystemCapability.Multimedia.Media.AVPlayer + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function createAVPlayer(callback: AsyncCallback): void; /** * Creates an AVPlayer instance. This API uses a promise to return the result. @@ -116,6 +136,25 @@ declare namespace media { * @since 12 */ function createAVPlayer(): Promise; + /** + * Creates an **AVPlayer** instance. This API uses a promise to return the result. + *
**NOTE:**
+ * You are advised to create a maximum of 16 **AVPlayer** instances for an application in both audio and video + * playback scenarios. + * + * The actual number of instances that can be created may be different. It depends on the specifications of + * the device chip in use. + * + * @returns { Promise } A Promise instance used to return the result. If the operation is successful, an + * **AVPlayer** instance is returned; **null** is returned otherwise. The instance can be used to play + * audio and video. + * @throws { BusinessError } 5400101 - No memory. Return by promise. + * @syscap SystemCapability.Multimedia.Media.AVPlayer + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function createAVPlayer(): Promise; /** * Creates an AVRecorder instance. @@ -135,6 +174,18 @@ declare namespace media { * @since 12 */ function createAVRecorder(callback: AsyncCallback): void; + /** + * Creates an **AVRecorder** instance. This API uses an asynchronous callback to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. + * If the operation is successful, an **AVRecorder** instance is returned; + * otherwise, **null** is returned. The instance can be used to record audio and video. + * @throws { BusinessError } 5400101 - No memory. Return by callback. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function createAVRecorder(callback: AsyncCallback): void; /** * Creates an AVRecorder instance. @@ -155,6 +206,18 @@ declare namespace media { * @since 12 */ function createAVRecorder(): Promise; + /** + * Creates an **AVRecorder** instance. This API uses a promise to return the result. + * @returns { Promise } Promise used to return the result. If the operation is successful, + * an **AVRecorder** instance is returned; otherwise, **null** is returned. + * The instance can be used to record audio and video. + * @throws { BusinessError } 5400101 - No memory. Return by promise. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function createAVRecorder(): Promise; /** * Creates an AudioPlayer instance. @@ -201,6 +264,20 @@ declare namespace media { * @since 13 */ function createMediaSourceWithUrl(url: string, headers?: Record): MediaSource; + /** + * Creates a media source for streaming media to be pre-downloaded. + * @param { string } url : Url of the media source. The following streaming media formats are supported: HLS, + * HTTP-FLV, DASH, and HTTPS. + * @param { Record } [headers] : Headers attached to network request while player request data. + * @returns { MediaSource | undefined } MediaSource instance if the operation is successful; returns null otherwise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + *
2. Incorrect parameter types. 3.Parameter verification failed. + * @throws { BusinessError } 5400101 - No memory. + * @syscap SystemCapability.Multimedia.Media.Core + * @since 20 + * @arkts 1.2 + */ + function createMediaSourceWithUrl(url: string, headers?: Record): MediaSource | undefined; /** * Creates a multi-bitrate media source for streaming media. Currently, only the HTTP-FLV multi-bitrate @@ -213,6 +290,17 @@ declare namespace media { * @since 19 */ function createMediaSourceWithStreamData(streams: Array): MediaSource; + /** + * Creates a multi-bitrate media source for streaming media. Currently, only the HTTP-FLV multi-bitrate + * media source is supported. + * @param { Array } streams - Array of MediaStream objects. + * The supported streaming media format is HTTP-FLV. + * @returns { MediaSource | undefined } MediaSource instance if the operation is successful; returns null otherwise. + * @syscap SystemCapability.Multimedia.Media.Core + * @since 20 + * @arkts 1.2 + */ + function createMediaSourceWithStreamData(streams: Array): MediaSource | undefined; /** * Creates an VideoPlayer instance. @@ -254,6 +342,18 @@ declare namespace media { * @since 12 */ function createVideoRecorder(callback: AsyncCallback): void; + /** + * The maintenance of this interface has been stopped since version api 9. Please use AVRecorder + * Creates an VideoRecorder instance. + * @param { AsyncCallback } callback - used to return AudioPlayer instance if the operation is successful; returns null otherwise. + * @throws { BusinessError } 202 - Not System App. + * @throws { BusinessError } 5400101 - No memory. Return by callback. + * @syscap SystemCapability.Multimedia.Media.VideoRecorder + * @systemapi + * @since 20 + * @arkts 1.2 + */ + function createVideoRecorder(callback: AsyncCallback): void; /** * The maintenance of this interface has been stopped since version api 9. Please use AVRecorder @@ -275,6 +375,18 @@ declare namespace media { * @since 12 */ function createVideoRecorder(): Promise; + /** + * The maintenance of this interface has been stopped since version api 9. Please use AVRecorder + * Creates an VideoRecorder instance. + * @returns { Promise } A Promise instance used to return VideoRecorder instance if the operation is successful; returns null otherwise. + * @throws { BusinessError } 202 - Not System App. + * @throws { BusinessError } 5400101 - No memory. Return by promise. + * @syscap SystemCapability.Multimedia.Media.VideoRecorder + * @systemapi + * @since 20 + * @arkts 1.2 + */ + function createVideoRecorder(): Promise; /** * Creates a **SoundPool** instance. This API uses an asynchronous callback to return the result. @@ -303,6 +415,34 @@ declare namespace media { audioRenderInfo: audio.AudioRendererInfo, callback: AsyncCallback ): void; + /** + * Creates a **SoundPool** instance. This API uses an asynchronous callback to return the result. + * + * **NOTE** + * - In versions earlier than API version 18, the bottom layer of the created **SoundPool** object is in singleton + * mode. Therefore, an application process can create only one **SoundPool** instance. + * - In API version 18 and later versions, the bottom layer of the created **SoundPool** object is in multiton mode. + * Therefore, an application process can create a maximum of 128 **SoundPool** instances. + * + * @param {int} maxStreams - Maximum number of streams that can be played by the **SoundPool** instance. + * The value is an integer ranging from 1 to 32. + * @param {audio.AudioRendererInfo} audioRenderInfo - Audio renderer parameters. When the **usage** parameter + * in **audioRenderInfo** is set to **STREAM_USAGE_UNKNOWN**, **STREAM_USAGE_MUSIC**, **STREAM_USAGE_MOVIE**, or + * **STREAM_USAGE_AUDIOBOOK**, the SoundPool uses the audio mixing mode when playing a short sound, without + * interrupting the playback of other audios. + * @param {AsyncCallback} callback - Callback used to return the result. If the operation is successful, a + * **SoundPool** instance is returned; otherwise, **null** is returned. + * The instance is used for loading and playback. + * @throws { BusinessError } 5400101 - No memory. Return by callback. + * @syscap SystemCapability.Multimedia.Media.SoundPool + * @since 20 + * @arkts 1.2 + */ + function createSoundPool( + maxStreams: int, + audioRenderInfo: audio.AudioRendererInfo, + callback: AsyncCallback + ): void; /** * Creates a **SoundPool** instance. This API uses a promise to return the result. @@ -324,6 +464,27 @@ declare namespace media { * @since 10 */ function createSoundPool(maxStreams: number, audioRenderInfo: audio.AudioRendererInfo): Promise; + /** + * Creates a **SoundPool** instance. This API uses a promise to return the result. + * + * **NOTE** + * - In versions earlier than API version 18, the bottom layer of the created **SoundPool** object is in singleton + * mode. Therefore, an application process can create only one **SoundPool** instance. + * - In API version 18 and later versions, the bottom layer of the created **SoundPool** object is in multiton mode. + * Therefore, an application process can create a maximum of 128 **SoundPool** instances. + * + * @param {int} maxStreams - Maximum number of streams that can be played by the **SoundPool** instance. + * The value is an integer ranging from 1 to 32. + * @param {audio.AudioRendererInfo} audioRenderInfo - Audio renderer parameters. + * @returns {Promise} Promise used to return the result. If the operation is successful, + * a **SoundPool** instance is returned; otherwise, **null** is returned. + * The instance is used for loading and playback. + * @throws { BusinessError } 5400101 - No memory. Return by promise. + * @syscap SystemCapability.Multimedia.Media.SoundPool + * @since 20 + * @arkts 1.2 + */ + function createSoundPool(maxStreams: int, audioRenderInfo: audio.AudioRendererInfo): Promise; /** * Creates a **SoundPool** instance. This API uses a promise to return the result. @@ -369,6 +530,31 @@ declare namespace media { * }); */ function createAVScreenCaptureRecorder(): Promise; + /** + * Creates an **AVScreenCaptureRecorder** instance. This API uses a promise to return the result. + * @returns { Promise } Promise used to return the result. If the operation is successful, + * an **AVScreenCaptureRecorder** instance is returned; otherwise, **null** is returned. + * The instance can be used for screen capture. + * @throws { BusinessError } 5400101 - No memory. Return by promise. + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * @since 20 + * @example + * import { BusinessError } from '@kit.BasicServicesKit'; + * + * let avScreenCaptureRecorder: media.AVScreenCaptureRecorder; + * media.createAVScreenCaptureRecorder().then((captureRecorder: media.AVScreenCaptureRecorder) => { + * if (captureRecorder != null) { + * avScreenCaptureRecorder = captureRecorder; + * console.info('Succeeded in createAVScreenCaptureRecorder'); + * } else { + * console.error('Failed to createAVScreenCaptureRecorder'); + * } + * }).catch((error: BusinessError) => { + * console.error(`createAVScreenCaptureRecorder catchCallback, error message:${error.message}`); + * }); + * @arkts 1.2 + */ + function createAVScreenCaptureRecorder(): Promise; /** * Reports the user selection result in the screen capture privacy dialog box to the AVScreenCapture server to @@ -376,7 +562,7 @@ declare namespace media { * continue the operation. * This API is called by the system application that creates the dialog box. * - * @param {number} sessionId Session ID of the AVScreenCapture service, which is sent to the application when + * @param {int} sessionId Session ID of the AVScreenCapture service, which is sent to the application when * the AVScreenCapture server starts the privacy dialog box. * @param {string} choice User choice, including whether screen capture is agreed, selected display ID, * and window ID. For details, see JsonData in the example below. @@ -386,7 +572,7 @@ declare namespace media { * @throws { BusinessError } 5400101 - No memory. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * import { media } from '@kit.MediaKit'; @@ -408,8 +594,9 @@ declare namespace media { * } catch (error: BusinessError) { * console.error(`reportAVScreenCaptureUserChoice error, error message: ${error.message}`); * } + * @arkts 1.1&1.2 */ - function reportAVScreenCaptureUserChoice(sessionId: number, choice: string): Promise; + function reportAVScreenCaptureUserChoice(sessionId: int, choice: string): Promise; /** * Creates an **AVTranscoder** instance. This API uses a promise to return the result. @@ -427,6 +614,23 @@ declare namespace media { */ function createAVTranscoder(): Promise; + /** + * Creates an **AVTranscoder** instance. This API uses a promise to return the result. + * + * **NOTE** + * + * A maximum of 2 **AVTranscoder** instances can be created. + * + * @returns {Promise} Promise used to return the result. If the operation is successful, an + * **AVTranscoder** instance is returned; otherwise, **null** is returned. The instance can be used for video + * transcoding. + * @throws { BusinessError } 5400101 - No memory. Return by promise. + * @syscap SystemCapability.Multimedia.Media.AVTranscoder + * @since 20 + * @arkts 1.2 + */ + function createAVTranscoder(): Promise; + /** * Obtains a **ScreenCaptureMonitor** instance. This API uses a promise to return the result. * @@ -447,6 +651,27 @@ declare namespace media { * } */ function getScreenCaptureMonitor(): Promise; + /** + * Obtains a **ScreenCaptureMonitor** instance. This API uses a promise to return the result. + * + * @returns { Promise } Promise used to return the result. The instance can be used to query + * and monitor the status of the system screen recorder.
If the operation is successful, + * a **ScreenCaptureMonitor** instance is returned; otherwise, **null** is returned. + * @throws { BusinessError } 202 - Not System App. + * @throws { BusinessError } 5400101 - No memory. Return by promise. + * @syscap SystemCapability.Multimedia.Media.AVScreenCapture + * @systemapi + * @since 20 + * @example + * let screenCaptureMonitor: media.ScreenCaptureMonitor; + * try { + * screenCaptureMonitor = await media.getScreenCaptureMonitor(); + * } catch (err) { + * console.error(`getScreenCaptureMonitor failed, error message:${err.message}`); + * } + * @arkts 1.2 + */ + function getScreenCaptureMonitor(): Promise; /** * Provides APIs for loading, unloading, playing, and stopping playing system sounds, setting the volume, @@ -454,7 +679,8 @@ declare namespace media { * * @typedef { _SoundPool } * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ type SoundPool = _SoundPool; @@ -463,7 +689,8 @@ declare namespace media { * * @typedef { _PlayParameters } * @syscap SystemCapability.Multimedia.Media.SoundPool - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ type PlayParameters = _PlayParameters; @@ -490,7 +717,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum StateChangeReason { /** @@ -509,7 +737,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ USER = 1, @@ -530,7 +759,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BACKGROUND = 2, } @@ -553,6 +783,17 @@ declare namespace media { * @since 12 */ function createAVMetadataExtractor(): Promise; + /** + * Creates an **AVMetadataExtractor** instance. This API uses a promise to return the result. + * @returns { Promise } A Promise instance used to return AVMetadataExtractor instance + * if the operation is successful; returns null otherwise. + * @throws { BusinessError } 5400101 - No memory. Returned by promise. + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function createAVMetadataExtractor(): Promise; /** * Creates an AVMetadataExtractor instance. @@ -573,6 +814,18 @@ declare namespace media { * @since 12 */ function createAVMetadataExtractor(callback: AsyncCallback): void; + /** + * Creates an **AVMetadataExtractor** instance. 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** and **data** is the **AVMetadataExtractor** instance created; + * otherwise, **err** is an error object. + * @throws { BusinessError } 5400101 - No memory. Returned by callback. + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function createAVMetadataExtractor(callback: AsyncCallback): void; /** * Creates an **AVImageGenerator** instance. This API uses a promise to return the result. @@ -584,6 +837,17 @@ declare namespace media { * @since 12 */ function createAVImageGenerator(): Promise; + /** + * Creates an **AVImageGenerator** instance. This API uses a promise to return the result. + * @returns { Promise } Promise used to return the result. If the operation is successful, + * an **AVImageGenerator** instance is returned; otherwise, **null** is returned. + * The API can be used to obtain a video thumbnail. + * @throws { BusinessError } 5400101 - No memory. Returned by promise. + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @since 20 + * @arkts 1.2 + */ + function createAVImageGenerator(): Promise; /** * Creates an **AVImageGenerator** instance. This API uses an asynchronous callback to return the result. @@ -595,6 +859,17 @@ declare namespace media { * @since 12 */ function createAVImageGenerator(callback: AsyncCallback): void; + /** + * Creates an **AVImageGenerator** instance. This API uses an asynchronous callback to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. + * If the operation is successful, an **AVImageGenerator** instance is returned; otherwise, **null** is returned. + * The API can be used to obtain a video thumbnail. + * @throws { BusinessError } 5400101 - No memory. Returned by callback. + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @since 20 + * @arkts 1.2 + */ + function createAVImageGenerator(callback: AsyncCallback): void; /** * Fetch media meta data or audio art picture from source. Before calling an AVMetadataExtractor method, @@ -611,7 +886,8 @@ declare namespace media { * @typedef AVMetadataExtractor * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVMetadataExtractor { /** @@ -638,7 +914,8 @@ declare namespace media { * @type { ?AVFileDescriptor } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fdSrc ?: AVFileDescriptor; @@ -657,7 +934,8 @@ declare namespace media { * @type { ?AVDataSrcDescriptor } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dataSrc ?: AVDataSrcDescriptor; @@ -680,6 +958,18 @@ declare namespace media { * @since 12 */ fetchMetadata(callback: AsyncCallback): void; + /** + * Obtains media metadata. This API uses an asynchronous callback to return the result. + * @param { AsyncCallback } callback - Callback used to return the result, + * which is an **AVMetadata** instance. + * @throws { BusinessError } 5400102 - Operation not allowed. Returned by callback. + * @throws { BusinessError } 5400106 - Unsupported format. Returned by callback. + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + fetchMetadata(callback: AsyncCallback): void; /** * It will extract the resource to fetch media meta data info. @@ -699,6 +989,17 @@ declare namespace media { * @since 12 */ fetchMetadata(): Promise; + /** + * Obtains media metadata. This API uses a promise to return the result. + * @returns { Promise } Promise used to return the result, which is an **AVMetadata** instance. + * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise. + * @throws { BusinessError } 5400106 - Unsupported format. Returned by promise. + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + fetchMetadata(): Promise; /** * It will extract the audio resource to fetch an album cover. @@ -720,6 +1021,18 @@ declare namespace media { * @since 12 */ fetchAlbumCover(callback: AsyncCallback): void; + /** + * Obtains the cover of the audio album. This API uses an asynchronous callback to return the result. + * @param { AsyncCallback } callback - Callback used to return the album cover. + * to return when fetchAlbumCover completed. + * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback. + * @throws { BusinessError } 5400106 - Unsupported format. Returned by callback. + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + fetchAlbumCover(callback: AsyncCallback): void; /** * It will extract the audio resource to fetch an album cover. @@ -739,6 +1052,17 @@ declare namespace media { * @since 12 */ fetchAlbumCover(): Promise; + /** + * Obtains the cover of the audio album. This API uses a promise to return the result. + * @returns { Promise } Promise used to return the album cover. + * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise. + * @throws { BusinessError } 5400106 - Unsupported format. Returned by promise. + * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + fetchAlbumCover(): Promise; /** * Sets the network media source URL and configures request headers. @@ -769,29 +1093,31 @@ declare namespace media { /** * Obtains the video timestamp corresponding to a video frame number. Only MP4 video files are supported. - * @param { number } index - Video frame number. - * @returns { Promise } Promise used to return the timestamp, in microseconds. + * @param { int } index - Video frame number. + * @returns { Promise } Promise used to return the timestamp, in microseconds. * @throws { BusinessError } 401 - The parameter check failed. Return by promise. * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise. * @throws { BusinessError } 5400106 - Unsupported format. Returned by promise. * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getTimeByFrameIndex(index: number): Promise; + getTimeByFrameIndex(index: int): Promise; /** * Obtains the video frame number corresponding to a video timestamp. Only MP4 video files are supported. - * @param { number } timeUs - Video timestamp, in microseconds. - * @returns { Promise } Promise used to return the video frame number. + * @param { long } timeUs - Video timestamp, in microseconds. + * @returns { Promise } Promise used to return the video frame number. * @throws { BusinessError } 401 - The parameter check failed. Return by promise. * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise. * @throws { BusinessError } 5400106 - Unsupported format. Returned by promise. * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getFrameIndexByTime(timeUs: number): Promise; + getFrameIndexByTime(timeUs: long): Promise; /** * Release resources used for AVMetadataExtractor. @@ -807,7 +1133,8 @@ declare namespace media { * @throws { BusinessError } 5400102 - Operation not allowed. Returned by callback. * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; @@ -824,7 +1151,8 @@ declare namespace media { * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise. * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; } @@ -842,7 +1170,8 @@ declare namespace media { * @typedef AVMetadata * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVMetadata { /** @@ -857,7 +1186,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ album?: string; @@ -873,7 +1203,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ albumArtist?: string; @@ -889,7 +1220,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ artist?: string; @@ -905,7 +1237,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ author?: string; @@ -921,7 +1254,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dateTime?: string; @@ -938,7 +1272,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dateTimeFormat?: string; @@ -954,7 +1289,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ composer?: string; @@ -969,7 +1305,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ duration?: string; @@ -985,7 +1322,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ genre?: string; @@ -1000,7 +1338,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ hasAudio?: string; @@ -1015,7 +1354,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ hasVideo?: string; @@ -1032,7 +1372,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mimeType?: string; @@ -1048,7 +1389,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ trackCount?: string; @@ -1063,7 +1405,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ sampleRate?: string; @@ -1079,7 +1422,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ title?: string; @@ -1094,7 +1438,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ videoHeight?: string; @@ -1109,7 +1454,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ videoWidth?: string; @@ -1125,7 +1471,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ videoOrientation?: string; @@ -1134,7 +1481,8 @@ declare namespace media { * @type { ?HdrType } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ hdrType?: HdrType; @@ -1142,7 +1490,8 @@ declare namespace media { * Geographical location of the media asset. * @type { ?Location } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ location?: Location; @@ -1150,7 +1499,8 @@ declare namespace media { * Custom key-value mappings obtained from **moov.meta.list**. * @type { ?Record } * @syscap SystemCapability.Multimedia.Media.AVMetadataExtractor - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ customInfo?: Record; } @@ -1189,14 +1539,16 @@ declare namespace media { * @enum { number } * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum HdrType { /** * This option is used to mark none HDR type. * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AV_HDR_TYPE_NONE = 0, @@ -1204,7 +1556,8 @@ declare namespace media { * This option is used to mark HDR Vivid type. * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AV_HDR_TYPE_VIVID = 1, } @@ -1215,7 +1568,8 @@ declare namespace media { * * @typedef AVImageGenerator * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVImageGenerator { /** @@ -1234,7 +1588,8 @@ declare namespace media { * use the same resource handle to read and write files at the same time, resulting in errors in obtaining data. * @type { ?AVFileDescriptor } * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fdSrc ?: AVFileDescriptor; @@ -1253,6 +1608,22 @@ declare namespace media { */ fetchFrameByTime(timeUs: number, options: AVImageQueryOptions, param: PixelMapParams, callback: AsyncCallback): void; + /** + * Obtains a video thumbnail. This API uses an asynchronous callback to return the result. + * @param { long } timeUs - Time of the video for which a thumbnail is to be obtained, in μs. + * @param { AVImageQueryOptions } options - Relationship between the time passed in and the video frame. + * @param { PixelMapParams } param - Format parameters of the thumbnail to be obtained. + * @param { AsyncCallback } callback - Callback used to return the result. + * If the operation is successful, **err** is **undefined** and **data** is the **PixelMap** instance obtained; + * otherwise, **err** is an error object. + * @throws { BusinessError } 5400102 - Operation not allowed. Returned by callback. + * @throws { BusinessError } 5400106 - Unsupported format. Returned by callback. + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @since 20 + * @arkts 1.2 + */ + fetchFrameByTime(timeUs: long, options: AVImageQueryOptions, param: PixelMapParams, + callback: AsyncCallback): void; /** * Obtains a video thumbnail. This API uses a promise to return the result. @@ -1266,6 +1637,19 @@ declare namespace media { * @since 12 */ fetchFrameByTime(timeUs: number, options: AVImageQueryOptions, param: PixelMapParams): Promise; + /** + * Obtains a video thumbnail. This API uses a promise to return the result. + * @param { long } timeUs - Time of the video for which a thumbnail is to be obtained, in μs. + * @param { AVImageQueryOptions } options - Relationship between the time passed in and the video frame. + * @param { PixelMapParams } param - Format parameters of the thumbnail to be obtained. + * @returns { Promise } Promise used to return the video thumbnail. + * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise. + * @throws { BusinessError } 5400106 - Unsupported format. Returned by promise. + * @syscap SystemCapability.Multimedia.Media.AVImageGenerator + * @since 20 + * @arkts 1.2 + */ + fetchFrameByTime(timeUs: long, options: AVImageQueryOptions, param: PixelMapParams): Promise; /** * Supports extracting video thumbnails by proportional scaling @@ -1288,7 +1672,8 @@ declare namespace media { * **err** is **undefined**; otherwise, **err** is an error object. * @throws { BusinessError } 5400102 - Operation not allowed. Returned by callback. * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; @@ -1297,7 +1682,8 @@ declare namespace media { * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 5400102 - Operation not allowed. Returned by promise. * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; } @@ -1309,34 +1695,39 @@ declare namespace media { * the thumbnail is actually obtained. Therefore, you need to specify their relationship. * @enum { number } * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AVImageQueryOptions { /** * The key frame at or next to the specified time is selected. * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AV_IMAGE_QUERY_NEXT_SYNC, /** * The key frame at or prior to the specified time is selected. * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AV_IMAGE_QUERY_PREVIOUS_SYNC, /** * The key frame closest to the specified time is selected. * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AV_IMAGE_QUERY_CLOSEST_SYNC, /** * The frame (not necessarily a key frame) closest to the specified time is selected. * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AV_IMAGE_QUERY_CLOSEST, } @@ -1345,26 +1736,29 @@ declare namespace media { * Defines the format parameters of the video thumbnail to be obtained. * @typedef PixelMapParams * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface PixelMapParams { /** * Width of the thumbnail. The value must be greater than 0 and less than or equal to the width of the original * video. Otherwise, the returned thumbnail will not be scaled. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - width?: number; + width?: int; /** * Height of the thumbnail. The value must be greater than 0 and less than or equal to the height of the original * video. Otherwise, the returned thumbnail will not be scaled. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVImageGenerator - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - height?: number; + height?: int; /** * Color format of the thumbnail. @@ -1373,7 +1767,8 @@ declare namespace media { * @type { ?PixelFormat } * @syscap SystemCapability.Multimedia.Media.AVImageGenerator * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ colorFormat?: PixelFormat; } @@ -1383,14 +1778,16 @@ declare namespace media { * @enum { number } * @syscap SystemCapability.Multimedia.Media.AVImageGenerator * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum PixelFormat { /** * RGB_565. * @syscap SystemCapability.Multimedia.Media.AVImageGenerator * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RGB_565 = 2, @@ -1398,7 +1795,8 @@ declare namespace media { * RGBA_8888. * @syscap SystemCapability.Multimedia.Media.AVImageGenerator * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RGBA_8888 = 3, @@ -1406,7 +1804,8 @@ declare namespace media { * RGB_888. * @syscap SystemCapability.Multimedia.Media.AVImageGenerator * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RGB_888 = 5, } @@ -1433,7 +1832,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AVErrorCode { /** @@ -1452,7 +1852,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_OK = 0, @@ -1472,7 +1873,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_NO_PERMISSION = 201, @@ -1492,7 +1894,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_INVALID_PARAMETER = 401, @@ -1512,7 +1915,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_UNSUPPORT_CAPABILITY = 801, @@ -1532,7 +1936,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_NO_MEMORY = 5400101, @@ -1552,7 +1957,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_OPERATE_NOT_PERMIT = 5400102, @@ -1572,7 +1978,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_IO = 5400103, @@ -1592,7 +1999,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_TIMEOUT = 5400104, @@ -1612,7 +2020,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_SERVICE_DIED = 5400105, @@ -1632,7 +2041,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_UNSUPPORT_FORMAT = 5400106, @@ -1647,7 +2057,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_AUDIO_INTERRUPTED = 5400107, /** @@ -1655,7 +2066,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_IO_HOST_NOT_FOUND = 5411001, /** @@ -1663,7 +2075,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_IO_CONNECTION_TIMEOUT = 5411002, /** @@ -1671,7 +2084,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_IO_NETWORK_ABNORMAL = 5411003, /** @@ -1679,7 +2093,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_IO_NETWORK_UNAVAILABLE = 5411004, /** @@ -1687,7 +2102,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_IO_NO_PERMISSION = 5411005, /** @@ -1695,7 +2111,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_IO_REQUEST_DENIED = 5411006, /** @@ -1703,7 +2120,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_IO_RESOURCE_NOT_FOUND = 5411007, /** @@ -1712,7 +2130,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_IO_SSL_CLIENT_CERT_NEEDED = 5411008, /** @@ -1721,7 +2140,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_IO_SSL_CONNECTION_FAILED = 5411009, /** @@ -1729,7 +2149,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_IO_SSL_SERVER_CERT_UNTRUSTED = 5411010, /** @@ -1737,14 +2158,16 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_IO_UNSUPPORTED_REQUEST = 5411011, /** * Seek continuous unsupported. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_SEEK_CONTINUOUS_UNSUPPORTED = 5410002, @@ -1752,7 +2175,8 @@ declare namespace media { * Super-resolution unsupported. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_SUPER_RESOLUTION_UNSUPPORTED = 5410003, @@ -1760,7 +2184,8 @@ declare namespace media { * No PlaybackStrategy set to enable super-resolution feature. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ AVERR_SUPER_RESOLUTION_NOT_ENABLED = 5410004, } @@ -1788,20 +2213,22 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type AVPlayerState = 'idle' | 'initialized' | 'prepared' | 'playing' | 'paused' | 'completed' | 'stopped' | 'released' | 'error'; /** * Describes the callback invoked for the track change event. * @typedef { function } OnTrackChangeHandler - * @param { number } index - index number for change Track. + * @param { int } index - index number for change Track. * @param { boolean } isSelected - Status of the track, that is, whether the track is selected. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - type OnTrackChangeHandler = (index: number, isSelected: boolean) => void; + type OnTrackChangeHandler = (index: int, isSelected: boolean) => void; /** * Describes the callback invoked for the AVPlayer state change event. @@ -1812,7 +2239,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type OnAVPlayerStateChangeHandle = (state: AVPlayerState, reason: StateChangeReason) => void; @@ -1821,26 +2249,28 @@ declare namespace media { * * @typedef { function } OnBufferingUpdateHandler * @param { BufferingInfoType } infoType - define the Buffering info Type. - * @param { number } value - define the value of buffering info type if exist. + * @param { int } value - define the value of buffering info type if exist. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - type OnBufferingUpdateHandler = (infoType: BufferingInfoType, value: number) => void; + type OnBufferingUpdateHandler = (infoType: BufferingInfoType, value: int) => void; /** * Describes the callback invoked for the video size change event. * * @typedef { function } OnVideoSizeChangeHandler - * @param { number } width - Value of video Width. - * @param { number } height - Value of video Height. + * @param { int } width - Value of video Width. + * @param { int } height - Value of video Height. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - type OnVideoSizeChangeHandler = (width: number, height: number) => void; + type OnVideoSizeChangeHandler = (width: int, height: int) => void; /** * Describes the callback used to listen for video super resolution status changes. If super resolution is enabled by @@ -1862,7 +2292,8 @@ declare namespace media { * and **false** means the opposite. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ type OnSuperResolutionChanged = (enabled: boolean) => void; @@ -1872,24 +2303,27 @@ declare namespace media { * @typedef SeiMessage * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface SeiMessage { /** * Payload type of SEI message. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - payloadType: number; + payloadType: int; /** * Payload data of SEI message. * @type { ArrayBuffer } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ payload: ArrayBuffer; } @@ -1900,12 +2334,13 @@ declare namespace media { * * @typedef { function } OnSeiMessageHandle * @param { Array } messages - SEI messages. - * @param { ?number } playbackPosition - playback position. + * @param { ?int } [playbackPosition] - playback position. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - type OnSeiMessageHandle = (messages: Array, playbackPosition?: number) => void; + type OnSeiMessageHandle = (messages: Array, playbackPosition?: int) => void; /** * Defines the OnPlaybackRateDone callback. @@ -1951,7 +2386,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVPlayer { /** @@ -1988,7 +2424,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ prepare(callback: AsyncCallback): void; @@ -2026,7 +2463,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ prepare(): Promise; @@ -2052,7 +2490,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ play(callback: AsyncCallback): void; @@ -2078,7 +2517,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ play(): Promise; @@ -2104,7 +2544,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pause(callback: AsyncCallback): void; @@ -2130,7 +2571,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pause(): Promise; @@ -2159,7 +2601,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(callback: AsyncCallback): void; @@ -2188,7 +2631,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): Promise; @@ -2217,7 +2661,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reset(callback: AsyncCallback): void; @@ -2246,7 +2691,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reset(): Promise; @@ -2272,7 +2718,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; @@ -2298,7 +2745,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; @@ -2324,16 +2772,17 @@ declare namespace media { * playing, paused, or completed state. * You can check whether the seek operation takes effect by subscribing to the [seekDone]{@link #seekDone} event. * This API is not supported in live mode. - * @param { number } timeMs - Playback position to jump, should be in [0, duration]. In SEEK_CONTINUOU mode, + * @param { int } timeMs - Playback position to jump, should be in [0, duration]. In SEEK_CONTINUOU mode, * the value -1 can be used to indicate the end of SEEK_CONTINUOUS mode. * @param { SeekMode } mode - See @SeekMode . The default value is **SEEK_PREV_SYNC**. * Set this parameter only for video playback. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - seek(timeMs: number, mode?: SeekMode): void; + seek(timeMs: int, mode?: SeekMode): void; /** * Sets the volume. @@ -2345,14 +2794,15 @@ declare namespace media { * Sets the volume. This API can be called only when the AVPlayer is in the prepared, playing, * paused, or completed state. * You can check whether the setting takes effect by subscribing to the volumeChange event. - * @param { number } volume - Relative volume. The value ranges from 0.00 to 1.00. + * @param { double } volume - Relative volume. The value ranges from 0.00 to 1.00. * The value **1.00** indicates the maximum volume (100%). * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setVolume(volume: number): void; + setVolume(volume: double): void; /** * Get all track infos in MediaDescription, should be called after data loaded callback. @@ -2380,7 +2830,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getTrackDescription(callback: AsyncCallback>): void; @@ -2407,25 +2858,27 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getTrackDescription(): Promise>; /** * Obtains the indexes of the selected audio or video tracks. This API can be called only when the AVPlayer * is in the prepared, playing, or paused state. This API uses a promise to return the result. - * @returns { Promise> } A Promise instance used to return selected track index. + * @returns { Promise> } A Promise instance used to return selected track index. * @throws { BusinessError } 5400102 - Operation not allowed. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getSelectedTracks(): Promise>; + getSelectedTracks(): Promise>; /** * Selects a track when the AVPlayer is used to play a resource with multiple audio and video tracks. * This API uses a promise to return the result. - * @param { number } index - Track index returned by getTrackDescription#MD_KEY_TRACK_INDEX + * @param { int } index - Track index returned by getTrackDescription#MD_KEY_TRACK_INDEX * @param { SwitchMode } mode - set switchmode for track select behavior. The default mode is SMOOTH. * This parameter takes effect only for the switch of a video track for DASH streams. * @returns { Promise } A Promise instance used to return when select track completed. @@ -2433,22 +2886,24 @@ declare namespace media { * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - selectTrack(index: number, mode?: SwitchMode): Promise; + selectTrack(index: int, mode?: SwitchMode): Promise; /** * Deselects a track when the AVPlayer is used to play a resource with multiple audio and video tracks. * This API uses a promise to return the result. - * @param { number } index : Track index returned by getTrackDescription#MD_KEY_TRACK_INDEX + * @param { int } index : Track index returned by getTrackDescription#MD_KEY_TRACK_INDEX * @returns { Promise } A Promise instance used to return when deselect track completed. * @throws { BusinessError } 401 - The parameter check failed. Return by promise. * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - deselectTrack(index: number): Promise; + deselectTrack(index: int): Promise; /** * Sets a source of streaming media that can be pre-downloaded, downloads the media data, and temporarily stores @@ -2462,28 +2917,30 @@ declare namespace media { * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setMediaSource(src: MediaSource, strategy?: PlaybackStrategy): Promise; /** * Add subtitle resource represented by FD to the player. Currently, the external subtitle must be set after * fdSrc of the video resource is set in an AVPlayer instance. This API uses a promise to return the result. - * @param { number } fd : The file descriptor of subtitle source from file system, which is obtained by + * @param { int } fd : The file descriptor of subtitle source from file system, which is obtained by * calling resourceManager.getRawFd. * The caller is responsible to close the file descriptor. - * @param { number } offset : The offset into the file where the data to be read, in bytes. + * @param { long } offset : The offset into the file where the data to be read, in bytes. * By default, the offset is zero. - * @param { number } length : The length in bytes of the data to be read. + * @param { long } length : The length in bytes of the data to be read. * By default, the length is the rest of bytes in the file from the offset. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 401 - The parameter check failed. Return by promise. * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - addSubtitleFromFd(fd: number, offset?: number, length?: number): Promise; + addSubtitleFromFd(fd: int, offset?: long, length?: long): Promise; /** * Add subtitle resource represented by url to the player. Currently, the external subtitle must be set @@ -2495,7 +2952,8 @@ declare namespace media { * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ addSubtitleFromUrl(url: string): Promise; @@ -2504,7 +2962,8 @@ declare namespace media { * playing, or paused state. * @returns { Promise } Statistic infos of current player. * @syscap SystemCapability.Multimedia.Media.AVPlayer - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getPlaybackInfo(): Promise; @@ -2516,7 +2975,8 @@ declare namespace media { * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setPlaybackStrategy(strategy: PlaybackStrategy): Promise; @@ -2530,7 +2990,8 @@ declare namespace media { * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setMediaMuted(mediaType: MediaType, muted: boolean): Promise; @@ -2538,10 +2999,10 @@ declare namespace media { * Set playback start position and end position. After the setting, only the content in the specified range of * the audio or video file is played. This API uses a promise to return the result. It can be used in the * initialized, prepared, paused, stopped, or completed state. - * @param { number } startTimeMs - Playback start position, should be in [0, duration), + * @param { int } startTimeMs - Playback start position, should be in [0, duration), * -1 means that the start position is not set, * and the playback will start from 0. - * @param { number } endTimeMs - Playback end position, which should usually be in (startTimeMs, duration], + * @param { int } endTimeMs - Playback end position, which should usually be in (startTimeMs, duration], * -1 means that the end position is not set, * and the playback will be ended at the end of the stream. * @param { SeekMode } [mode] - Use the specified seek mode to jump to the playback start position, @@ -2552,9 +3013,10 @@ declare namespace media { * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - setPlaybackRange(startTimeMs: number, endTimeMs: number, mode?: SeekMode) : Promise; + setPlaybackRange(startTimeMs: int, endTimeMs: int, mode?: SeekMode) : Promise; /** * Checks whether the media source supports seek in SEEK_CONTINUOUS mode ([SeekMode]{@link #SeekMode}). @@ -2566,19 +3028,21 @@ declare namespace media { * false: seek continuous is not supported or the support status is uncertain. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ isSeekContinuousSupported() : boolean; /** * Get current playback position. This API can be used in the prepared, playing, paused, or completed state. - * @returns { number } return the time of current playback position - millisecond(ms) + * @returns { int } return the time of current playback position - millisecond(ms) * @throws { BusinessError } 5400102 - Operation not allowed. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - getPlaybackPosition() : number; + getPlaybackPosition() : int; /** * Enable or disable super-resolution dynamically. This API can be called when the AVPlayer is in the @@ -2593,7 +3057,8 @@ declare namespace media { * Return by promise. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ setSuperResolution(enabled: boolean) : Promise; @@ -2604,8 +3069,8 @@ declare namespace media { * * Must enable super-resolution feature in {@link PlaybackStrategy} before calling {@link #prepare}. * See {@link #setPlaybackStrategy}, {@link #setMediaSource}. - * @param { number } width - width of the window. The value range is [320-1920], in px. - * @param { number } height - height of the window. The value range is [320-1080], in px. + * @param { int } width - width of the window. The value range is [320-1920], in px. + * @param { int } height - height of the window. The value range is [320-1080], in px. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 401 - Parameter error. Return by promise. * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise. @@ -2614,9 +3079,10 @@ declare namespace media { * Return by promise. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - setVideoWindowSize(width: number, height: number) : Promise; + setVideoWindowSize(width: int, height: int) : Promise; /** * Media URI. Mainstream media formats are supported. @@ -2653,7 +3119,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ url?: string; @@ -2681,7 +3148,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fdSrc?: AVFileDescriptor; @@ -2705,7 +3173,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ dataSrc?: AVDataSrcDescriptor; @@ -2722,7 +3191,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ loop: boolean; @@ -2741,7 +3211,8 @@ declare namespace media { * @type { ?audio.InterruptMode } * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ audioInterruptMode?: audio.InterruptMode; @@ -2761,7 +3232,8 @@ declare namespace media { * @type { ?audio.AudioRendererInfo } * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ audioRendererInfo?: audio.AudioRendererInfo; @@ -2777,7 +3249,8 @@ declare namespace media { * @type { ?audio.AudioEffectMode } * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ audioEffectMode ?: audio.AudioEffectMode; @@ -2790,14 +3263,15 @@ declare namespace media { * Current playback position, in ms. It can be used as a query parameter when the AVPlayer is in the prepared, * playing, paused, or completed state. The value -1 indicates an invalid value. * In live mode, -1 is returned by default. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly currentTime: number; + readonly currentTime: int; /** * Playback duration, When the data source does not support seek, it returns - 1, such as a live broadcast scenario. @@ -2814,14 +3288,15 @@ declare namespace media { * Playback duration, in ms. It can be used as a query parameter when the AVPlayer is in the prepared, * playing, paused, or completed state. * When the data source does not support seek, it returns - 1, such as a live broadcast scenario. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly duration: number; + readonly duration: int; /** * Playback state. @@ -2835,7 +3310,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly state: AVPlayerState; @@ -2860,7 +3336,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ surfaceId?: string; @@ -2872,14 +3349,15 @@ declare namespace media { /** * Video width, in px, valid after prepared. It can be used as a query parameter when the AVPlayer is in the * prepared, playing, paused, or completed state. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly width: number; + readonly width: int; /** * Video height, in px, valid after prepared. @@ -2889,14 +3367,15 @@ declare namespace media { /** * Video height, in px, valid after prepared. It can be used as a query parameter when the AVPlayer is in the * prepared, playing, paused, or completed state. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly height: number; + readonly height: int; /** * Video scale type. By default, the {@link #VIDEO_SCALE_TYPE_FIT} will be used, for more @@ -2911,7 +3390,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ videoScaleType?: VideoScaleType; @@ -2929,7 +3409,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setSpeed(speed: PlaybackSpeed): void; @@ -2962,7 +3443,7 @@ declare namespace media { * a specified bitrate. If the specified bitrate is not in the list of available bitrate, the player * will select the minimal and closest one from the available bitrate list.This API can be called * only when the AVPlayer is in the prepared, playing, paused, or completed state. - * @param { number } bitrate - Bit rate to set. Obtain the available bit rates of the current HLS/DASH + * @param { int } bitrate - Bit rate to set. Obtain the available bit rates of the current HLS/DASH * stream by subscribing to the {@link #on('availableBitrates')} event. If the bit rate to set is not in * the list of the available bit rates, the AVPlayer selects from the list the bit rate that is closed * to the bit rate to set. If the length of the available bit rate list obtained through the event is 0, @@ -2970,9 +3451,10 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setBitrate(bitrate: number): void; + setBitrate(bitrate: int): void; /** * Set decryption session to codec module. @@ -2994,7 +3476,8 @@ declare namespace media { *
2. Incorrect parameter types. 3.Parameter verification failed. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setDecryptionConfig(mediaKeySession: drm.MediaKeySession, secureVideoPath: boolean): void; @@ -3009,7 +3492,8 @@ declare namespace media { * @returns { Array } MediaKeySystemInfo with PSSH. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getMediaKeySystemInfos(): Array; @@ -3028,7 +3512,8 @@ declare namespace media { * It reports a **MediaKeySystemInfo** array. * @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; @@ -3045,7 +3530,8 @@ declare namespace media { * @param { Callback> } callback - Callback for event. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'mediaKeySystemInfoUpdate', callback?: Callback>): void; @@ -3072,7 +3558,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'stateChange', callback: OnAVPlayerStateChangeHandle): void; /** @@ -3095,7 +3582,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'stateChange', callback?: OnAVPlayerStateChangeHandle): void; /** @@ -3108,14 +3596,15 @@ declare namespace media { /** * Subscribes to the event to check whether the volume is successfully set. * @param { 'volumeChange' } type - This event is triggered each time **setVolume()** is called. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { Callback } callback - Callback invoked when the event is triggered. * It reports the effective volume. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'volumeChange', callback: Callback): void; + on(type: 'volumeChange', callback: Callback): void; /** * Unregister listens for media playback volumeChange event. * @param { 'volumeChange' } type - Type of the playback event to listen for. @@ -3134,14 +3623,15 @@ declare namespace media { /** * Unsubscribes from the event that checks whether the volume is successfully set. * @param { 'volumeChange' } type - Type of the playback event to listen for. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { Callback } callback - Callback invoked when the event is triggered. * It reports the effective volume. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'volumeChange', callback?: Callback): void; + off(type: 'volumeChange', callback?: Callback): void; /** * Register listens for media playback endOfStream event. * @param { 'endOfStream' } type - Type of the playback event to listen for. @@ -3159,7 +3649,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'endOfStream', callback: Callback): void; /** @@ -3183,7 +3674,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'endOfStream', callback?: Callback): void; /** @@ -3205,7 +3697,7 @@ declare namespace media { * Subscribes to the event to check whether the seek operation takes effect. * @param { 'seekDone' } type - Type of the playback event to listen for. This event is triggered each time * **seek()** is called, except in SEEK_CONTINUOUS mode. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { Callback } callback - Callback invoked when the event is triggered. * It reports the time position requested by the user. * * For video playback, {@link #SeekMode} may cause the actual position to be different from that requested by @@ -3214,9 +3706,10 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'seekDone', callback: Callback): void; + on(type: 'seekDone', callback: Callback): void; /** * Unregister listens for media playback seekDone event. * @param { 'seekDone' } type - Type of the playback event to listen for. @@ -3233,7 +3726,7 @@ declare namespace media { /** * Unsubscribes from the event that checks whether the seek operation takes effect. * @param { 'seekDone' } type - Type of the playback event to listen for. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { Callback } callback - Callback invoked when the event is triggered. * It reports the time position requested by the user. * * For video playback, SeekMode may cause the actual position to be different from that requested by the user. @@ -3242,9 +3735,10 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'seekDone', callback?: Callback): void; + off(type: 'seekDone', callback?: Callback): void; /** * Register listens for media playback speedDone event. * @param { 'speedDone' } type - Type of the playback event to listen for. @@ -3256,14 +3750,15 @@ declare namespace media { * Subscribes to the event to check whether the playback speed is successfully set. * @param { 'speedDone' } type - Type of the playback event to listen for. * This event is triggered each time **setSpeed()** is called. - * @param { Callback } callback - Callback used to return the result. When the call of + * @param { Callback } callback - Callback used to return the result. When the call of * setSpeed is successful, the effective speed mode is reported. For details, see {@link #PlaybackSpeed}. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'speedDone', callback: Callback): void; + on(type: 'speedDone', callback: Callback): void; /** * Unregister listens for media playback speedDone event. * @param { 'speedDone' } type - Type of the playback event to listen for. @@ -3282,14 +3777,15 @@ declare namespace media { /** * Unsubscribes from the event that checks whether the playback speed is successfully set. * @param { 'speedDone' } type - Type of the playback event to listen for. - * @param { Callback } callback - Callback used to return the result. When the call of + * @param { Callback } callback - Callback used to return the result. When the call of * setSpeed is successful, the effective speed mode is reported. For details, see {@link #PlaybackSpeed}. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'speedDone', callback?: Callback): void; + off(type: 'speedDone', callback?: Callback): void; /** * Register listens for media playbackRateDone event. * @param { 'playbackRateDone' } type - Type of the playback event to listen for. @@ -3320,13 +3816,14 @@ declare namespace media { * Subscribes to the event to check whether the bit rate is successfully set. * @param { 'bitrateDone' } type - Type of the playback event to listen for. * This event is triggered each time **setBitrate()** is called. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { Callback } callback - Callback invoked when the event is triggered. * It reports the effective bit rate. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'bitrateDone', callback: Callback): void; + on(type: 'bitrateDone', callback: Callback): void; /** * Unregister listens for media playback setBitrateDone event. * @param { 'bitrateDone' } type - Type of the playback event to listen for. @@ -3344,13 +3841,14 @@ declare namespace media { /** * Unsubscribes from the event that checks whether the bit rate is successfully set. * @param { 'bitrateDone' } type - Type of the playback event to listen for. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { Callback } callback - Callback invoked when the event is triggered. * It reports the effective bit rate. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'bitrateDone', callback?: Callback): void; + off(type: 'bitrateDone', callback?: Callback): void; /** * Register listens for media playback timeUpdate event. * @param { 'timeUpdate' } type - Type of the playback event to listen for. @@ -3371,13 +3869,14 @@ declare namespace media { * By default, this event is reported every 100 ms. However, it is reported immediately upon * a successful seek operation. * @param { 'timeUpdate' } type - Type of the playback event to listen for. - * @param { Callback } callback - Callback used to return the current time. + * @param { Callback } callback - Callback used to return the current time. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'timeUpdate', callback: Callback): void; + on(type: 'timeUpdate', callback: Callback): void; /** * Unregister listens for media playback timeUpdate event. * @param { 'timeUpdate' } type - Type of the playback event to listen for. @@ -3394,13 +3893,14 @@ declare namespace media { /** * Unsubscribes from playback position changes. * @param { 'timeUpdate' } type - Type of the playback event to listen for. - * @param { Callback } callback - Callback used to return the current time. + * @param { Callback } callback - Callback used to return the current time. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'timeUpdate', callback?: Callback): void; + off(type: 'timeUpdate', callback?: Callback): void; /** * Register listens for media playback durationUpdate event. * @param { 'durationUpdate' } type - Type of the playback event to listen for. @@ -3413,13 +3913,14 @@ declare namespace media { * default, this event is reported once in the prepared state. However, it can be repeatedly reported for * special streams that trigger duration changes. The **'durationUpdate'** event is not supported in live mode. * @param { 'durationUpdate' } type - Type of the playback event to listen for. - * @param { Callback } callback - Callback used to return the resource duration. + * @param { Callback } callback - Callback used to return the resource duration. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'durationUpdate', callback: Callback): void; + on(type: 'durationUpdate', callback: Callback): void; /** * Unregister listens for media playback durationUpdate event. * @param { 'durationUpdate' } type - Type of the playback event to listen for. @@ -3437,13 +3938,14 @@ declare namespace media { /** * Unsubscribes from media asset duration changes. * @param { 'durationUpdate' } type - Type of the playback event to listen for. - * @param { Callback } callback - Callback used to return the resource duration. + * @param { Callback } callback - Callback used to return the resource duration. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'durationUpdate', callback?: Callback): void; + off(type: 'durationUpdate', callback?: Callback): void; /** * Register listens for video playback buffering events. @@ -3462,7 +3964,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'bufferingUpdate', callback: OnBufferingUpdateHandler): void; @@ -3481,7 +3984,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'bufferingUpdate', callback?: OnBufferingUpdateHandler): void; /** @@ -3500,7 +4004,8 @@ declare namespace media { * @param { Callback } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'startRenderFrame', callback: Callback): void; /** @@ -3522,7 +4027,8 @@ declare namespace media { * @param { Callback } [callback] - Callback used to listen for the playback event return . * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'startRenderFrame', callback?: Callback): void; @@ -3542,7 +4048,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'videoSizeChange', callback: OnVideoSizeChangeHandler): void; /** @@ -3558,7 +4065,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'videoSizeChange', callback?: OnVideoSizeChangeHandler): void; /** @@ -3577,7 +4085,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioInterrupt', callback: Callback): void; /** @@ -3593,7 +4102,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'audioInterrupt', callback?: Callback): void; /** @@ -3609,14 +4119,15 @@ declare namespace media { * This event will be reported after the {@link #prepare} called. * @param { 'availableBitrates' } type - Type of the playback event to listen for. * This event is triggered once after the AVPlayer switches to the prepared state. - * @param { Callback> } callback - Callback used to listen for the playback event return available bitrate list. + * @param { Callback> } callback - Callback used to listen for the playback event return available bitrate list. * It returns an array that holds the available bit rates. If the array length is 0, no bit rate can be set. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'availableBitrates', callback: Callback>): void; + on(type: 'availableBitrates', callback: Callback>): void; /** * Unregister listens for available bitrate list collect completed events for HLS protocol stream playback. * This event will be reported after the {@link #prepare} called. @@ -3628,13 +4139,14 @@ declare namespace media { * Unregister listens for available bitrate list collect completed events for HLS protocol stream playback. * This event will be reported after the {@link #prepare} called. * @param { 'availableBitrates' } type - Type of the playback event to listen for. - * @param { Callback> } callback - Callback used to listen for the playback event return available bitrate list. + * @param { Callback> } callback - Callback used to listen for the playback event return available bitrate list. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'availableBitrates', callback?: Callback>): void; + off(type: 'availableBitrates', callback?: Callback>): void; /** * Register listens for playback error events. * @param { 'error' } type - Type of the playback error event to listen for. @@ -3716,7 +4228,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; /** @@ -3739,7 +4252,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -3767,7 +4281,8 @@ declare namespace media { *
2. Incorrect parameter types. 3.Parameter verification failed. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioOutputDeviceChangeWithInfo', callback: Callback): void; @@ -3790,7 +4305,8 @@ declare namespace media { *
2. Incorrect parameter types. 3.Parameter verification failed. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'audioOutputDeviceChangeWithInfo', callback?: Callback): void; @@ -3803,7 +4319,8 @@ declare namespace media { * @param { Callback } callback - Callback invoked when the subtitle is updated. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'subtitleUpdate', callback: Callback): void @@ -3814,7 +4331,8 @@ declare namespace media { * update events. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'subtitleUpdate', callback?: Callback): void @@ -3827,7 +4345,8 @@ declare namespace media { * @param { OnTrackChangeHandler } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'trackChange', callback: OnTrackChangeHandler): void @@ -3838,7 +4357,8 @@ declare namespace media { * @param { OnTrackChangeHandler } callback - Callback that has been registered to listen for track changes. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'trackChange', callback?: OnTrackChangeHandler): void @@ -3851,7 +4371,8 @@ declare namespace media { * @param { Callback> } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'trackInfoUpdate', callback: Callback>): void @@ -3863,7 +4384,8 @@ declare namespace media { * information updates. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'trackInfoUpdate', callback?: Callback>): void @@ -3872,21 +4394,23 @@ declare namespace media { * resources are played. * @param { 'amplitudeUpdate' } type - Type of the event to listen for. * The event is triggered when the amplitude changes. - * @param { Callback> } callback - Callback invoked when the event is triggered. + * @param { Callback> } callback - Callback invoked when the event is triggered. * @syscap SystemCapability.Multimedia.Media.AVPlayer - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'amplitudeUpdate', callback: Callback>): void + on(type: 'amplitudeUpdate', callback: Callback>): void /** * Unsubscribes from update events of the maximum amplitude. * @param { 'amplitudeUpdate' } type - Type of the event to listen for. * The event is triggered when the amplitude changes. - * @param { Callback> } callback - Callback that has been registered to listen for amplitude updates. + * @param { Callback> } callback - Callback that has been registered to listen for amplitude updates. * @syscap SystemCapability.Multimedia.Media.AVPlayer - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'amplitudeUpdate', callback?: Callback>): void + off(type: 'amplitudeUpdate', callback?: Callback>): void /** * Subscribes to events indicating that a Supplemental Enhancement Information (SEI) message is received. This @@ -3895,30 +4419,32 @@ declare namespace media { * to this event, the last subscription is applied. * @param { 'seiMessageReceived' } type - Type of the playback event to listen for. * The event is triggered when an SEI message is received. - * @param { Array } payloadTypes - Array of subscribed-to payload types of SEI messages. Currently, + * @param { Array } payloadTypes - Array of subscribed-to payload types of SEI messages. Currently, * only payloadType = 5 is supported. * @param { OnSeiMessageHandle } callback - Callback used to listen for SEI message events and receive the * subscribed-to payload types. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'seiMessageReceived', payloadTypes: Array, callback: OnSeiMessageHandle): void; + on(type: 'seiMessageReceived', payloadTypes: Array, callback: OnSeiMessageHandle): void; /** * Unsubscribes from the events indicating that an SEI message is received. * @param { 'seiMessageReceived' } type - Type of the playback event to listen for. * The event is triggered when an SEI message is received. - * @param { Array } payloadTypes - The payload types of the SEI message. + * @param { Array } [payloadTypes] - The payload types of the SEI message. * Null means unsubscribe all payload types. - * @param { OnSeiMessageHandle } callback - Callback used to listen for SEI message events and receive the + * @param { OnSeiMessageHandle } [callback] - Callback used to listen for SEI message events and receive the * subscribed-to payload types. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'seiMessageReceived', payloadTypes?: Array, callback?: OnSeiMessageHandle): void; + off(type: 'seiMessageReceived', payloadTypes?: Array, callback?: OnSeiMessageHandle): void; /** * Subscribes to the event indicating that super resolution is enabled or disabled. @@ -3927,7 +4453,8 @@ declare namespace media { * @param { OnSuperResolutionChanged } callback - Callback used to listen for the super-resolution changed event. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ on(type:'superResolutionChanged', callback: OnSuperResolutionChanged): void; @@ -3938,7 +4465,8 @@ declare namespace media { * @param { OnSuperResolutionChanged } callback - Callback used to listen for the super-resolution changed event. * @syscap SystemCapability.Multimedia.Media.AVPlayer * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ off(type:'superResolutionChanged', callback?: OnSuperResolutionChanged): void; } @@ -3959,46 +4487,62 @@ declare namespace media { [key:string]: Object; } + /** + * Provides the container definition for media description key-value pairs. + * + * @typedef { Record } + * @syscap SystemCapability.Multimedia.Media.Core + * @since 20 + * @arkts 1.2 + */ + type PlaybackInfo = Record; + /** * Enumerates statistics info keys for player. * * @enum { string } * @syscap SystemCapability.Multimedia.Media.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum PlaybackInfoKey { /** * IP address of current network stream. * @syscap SystemCapability.Multimedia.Media.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SERVER_IP_ADDRESS = 'server_ip_address', /** * Average download rate during playing except for suspend downloading. * @syscap SystemCapability.Multimedia.Media.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AVG_DOWNLOAD_RATE = 'average_download_rate', /** * Current download rate of the last second except for suspend downloading. * @syscap SystemCapability.Multimedia.Media.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DOWNLOAD_RATE = 'download_rate', /** * Boolean value, true for current is downloading, false for suspend downloading. * @syscap SystemCapability.Multimedia.Media.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ IS_DOWNLOADING = 'is_downloading', /** * Cached duration in milliseconds. * @syscap SystemCapability.Multimedia.Media.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BUFFER_DURATION = 'buffer_duration', } @@ -4118,7 +4662,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum BufferingInfoType { /** @@ -4131,7 +4676,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BUFFERING_START = 1, @@ -4145,7 +4691,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BUFFERING_END = 2, @@ -4159,7 +4706,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BUFFERING_PERCENT = 3, @@ -4173,7 +4721,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CACHED_DURATION = 4, } @@ -4187,16 +4736,17 @@ declare namespace media { * @typedef { function } SourceOpenCallback * @param { MediaSourceLoadingRequest } request - Parameters for the resource open request, including detailed * information about the requested resource and the data push method. - * @returns { number } - return the handle of current resource open request. + * @returns { long } - return the handle of current resource open request. * A value greater than 0 means the request is successful. * A value less than or equal to 0 means it fails. * - The handle for the request object is unique. * - client should return immediately. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - type SourceOpenCallback = (request: MediaSourceLoadingRequest) => number; + type SourceOpenCallback = (request: MediaSourceLoadingRequest) => long; /** * Defines the SourceReadCallback function which is called by the service. Client should record the read requests @@ -4204,37 +4754,40 @@ declare namespace media { *
**NOTE:**
* The client must return the handle immediately after processing the request. * @typedef { function } SourceReadCallback - * @param { number } uuid - ID for the resource handle. - * @param { number } requestedOffset - Offset of the current media data relative to the start of the resource. - * @param { number } requestedLength - Length of the current request. + * @param { long } uuid - ID for the resource handle. + * @param { long } requestedOffset - Offset of the current media data relative to the start of the resource. + * @param { long } requestedLength - Length of the current request. * - -1 means reaching the end of the source, need to inform the player * of the end of the push through the {@link #finishLoading} method. * @returns { void } - client should return immediately. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - type SourceReadCallback = (uuid: number, requestedOffset: number, requestedLength: number) => void; + type SourceReadCallback = (uuid: long, requestedOffset: long, requestedLength: long) => void; /** * Defines the SourceCloseCallback function which is called by the service. Client should release related resources. *
**NOTE:**
* The client must return the handle immediately after processing the request. * @typedef { function } SourceCloseCallback - * @param { number } uuid - ID for the resource handle. + * @param { long } uuid - ID for the resource handle. * @returns { void } - client should return immediately. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - type SourceCloseCallback = (uuid: number) => void; + type SourceCloseCallback = (uuid: long) => void; /** * Defines a media data loader, which needs to be implemented by applications. * @typedef MediaSourceLoader * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface MediaSourceLoader { /** @@ -4242,7 +4795,8 @@ declare namespace media { * @type { SourceOpenCallback } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ open: SourceOpenCallback; @@ -4251,7 +4805,8 @@ declare namespace media { * @type { SourceReadCallback } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ read: SourceReadCallback; @@ -4260,7 +4815,8 @@ declare namespace media { * @type { SourceCloseCallback } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ close: SourceCloseCallback; } @@ -4270,14 +4826,16 @@ declare namespace media { * @enum { number } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enum LoadingRequestError { /** * If reach the resource end, client should return. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LOADING_ERROR_SUCCESS = 0, @@ -4285,7 +4843,8 @@ declare namespace media { * If resource not ready for access, client should return. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LOADING_ERROR_NOT_READY = 1, @@ -4293,7 +4852,8 @@ declare namespace media { * If resource url not exist, client should return. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LOADING_ERROR_NO_RESOURCE = 2, @@ -4301,7 +4861,8 @@ declare namespace media { * If the uuid of resource handle is valid, client should return. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LOADING_ERROR_INVAID_HANDLE = 3, @@ -4309,7 +4870,8 @@ declare namespace media { * If client has no right to request the resource, client should return. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LOADING_ERROR_ACCESS_DENIED = 4, @@ -4317,7 +4879,8 @@ declare namespace media { * If access time out, client should return. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LOADING_ERROR_ACCESS_TIMEOUT = 5, @@ -4325,7 +4888,8 @@ declare namespace media { * If authorization failed, client should return. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ LOADING_ERROR_AUTHORIZE_FAILED = 6, } @@ -4336,7 +4900,8 @@ declare namespace media { * @typedef MediaSourceLoadingRequest * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface MediaSourceLoadingRequest { /** @@ -4344,7 +4909,8 @@ declare namespace media { * @type { string } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -4354,7 +4920,8 @@ declare namespace media { * @type { ?Record } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ header?: Record; @@ -4371,32 +4938,47 @@ declare namespace media { * @since 18 */ respondData(uuid: number, offset: number, buffer: ArrayBuffer): number; + /** + * The interface for application used to send requested data to AVPlayer. + * @param { long } uuid - ID for the resource handle. + * @param { long } offset - Offset of the current media data relative to the start of the resource. + * @param { ArrayBuffer } buffer - Media data sent to the player. + * @returns { int | undefined } - accept bytes for current read. The value less than zero means failed. + * -2, means player need current data any more, the client should stop current read process. + * -3, means player buffer is full, the client should wait for next read. + * @syscap SystemCapability.Multimedia.Media.Core + * @since 20 + * @arkts 1.2 + */ + respondData(uuid: long, offset: long, buffer: ArrayBuffer): int | undefined; /** * The interface for application used to send respond header to AVPlayer * should be called before calling the {@link #respondData()} for the first time. - * @param { number } uuid - ID for the resource handle. - * @param { ?Record } [header] - header info in the http response. + * @param { long } uuid - ID for the resource handle. + * @param { Record } [header] - header info in the http response. * The application can intersect the header fields with the fields supported by the underlying layer for * parsing or directly pass in all corresponding header information. - * @param { ?string } [redirectUrl] - redirect url from the http response if exist. + * @param { string } [redirectUrl] - redirect url from the http response if exist. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - respondHeader(uuid: number, header?: Record, redirectUrl?: string): void; + respondHeader(uuid: long, header?: Record, redirectUrl?: string): void; /** * Notifies the player of the current request status. After pushing all the data for a single resource, the * application should send the **LOADING_ERROR_SUCCESS** state to notify the player that the resource push is * complete. - * @param { number } uuid - ID for the resource handle. + * @param { long } uuid - ID for the resource handle. * @param { LoadingRequestError } state - Request status. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - finishLoading(uuid: number, state: LoadingRequestError): void; + finishLoading(uuid: long, state: LoadingRequestError): void; } /** @@ -4404,7 +4986,8 @@ declare namespace media { * @typedef MediaStream * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ interface MediaStream { /** @@ -4412,36 +4995,40 @@ declare namespace media { * @type { string } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ url: string; /** * video width. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - width: number; + width: int; /** * video height. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - height: number; + height: int; /** * biterate of this mediaStream. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ - bitrate: number; + bitrate: int; } /** @@ -4450,7 +5037,8 @@ declare namespace media { * @typedef MediaSource * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface MediaSource { /** @@ -4458,7 +5046,8 @@ declare namespace media { * @param { AVMimeTypes } mimeType - for MediaSource define. see @ AVMimeTypes. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setMimeType(mimeType: AVMimeTypes): void; @@ -4467,7 +5056,8 @@ declare namespace media { * @param { MediaSourceLoader } resourceLoader - callback function interface set for player use. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ setMediaResourceLoaderDelegate(resourceLoader: MediaSourceLoader): void; } @@ -4477,14 +5067,16 @@ declare namespace media { * @enum { string } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AVMimeTypes { /** * Indicate current file is index file for hls Media. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ APPLICATION_M3U8 = 'application/m3u8', } @@ -4494,25 +5086,28 @@ declare namespace media { * @typedef PlaybackStrategy * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface PlaybackStrategy { /** * Choose a stream with width close to it. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - preferredWidth?: number; + preferredWidth?: int; /** * Choose a stream with height close to it. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - preferredHeight?: number; + preferredHeight?: int; /** * Chooses a preferred buffer duration. * @@ -4520,19 +5115,21 @@ declare namespace media { * see [Online Video Frame Freezing Optimization Practice]{@link * https://developer.huawei.com/consumer/cn/doc/best-practices/bpta-online-video-playback-lags-practice}.

* - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - preferredBufferDuration?: number; + preferredBufferDuration?: int; /** * If true, the player should choose HDR stream if exist. * @type { ?boolean } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preferredHdr?: boolean; @@ -4540,7 +5137,8 @@ declare namespace media { * mute the specified media stream when playing. * @type { ?MediaType } * @syscap SystemCapability.Multimedia.Media.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ mutedMediaType?: MediaType; @@ -4549,7 +5147,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ preferredAudioLanguage?: string; @@ -4558,7 +5157,8 @@ declare namespace media { * @type { ?string } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ preferredSubtitleLanguage?: string; @@ -4567,18 +5167,20 @@ declare namespace media { * @type { ?boolean } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 17 + * @since arkts {'1.1':'17','1.2':'20'} + * @arkts 1.1&1.2 */ showFirstFrameOnPrepare?: boolean; /** * Customize the buffering threshold for start or restart playing. The unit is second. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - preferredBufferDurationForPlaying?: number; + preferredBufferDurationForPlaying?: double; /** * Enable super-resolution feature. default is false. @@ -4586,19 +5188,21 @@ declare namespace media { * @type { ?boolean } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableSuperResolution?: boolean; /** * set max buffering threshold for liveStreaming or avplayer while change the speed. * It is recommended that the value be 2 seconds greater than the starting waterline. - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - thresholdForAutoQuickPlay?: number + thresholdForAutoQuickPlay?: double /** * Indicates whether to keep the decoder working when closing the media, @@ -4637,7 +5241,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVFileDescriptor { /** @@ -4656,13 +5261,14 @@ declare namespace media { /** * The file descriptor of audio or video source from file system. The caller * is responsible to close the file descriptor. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - fd: number + fd: int /** * The offset into the file where the data to be read, in bytes. By default, @@ -4680,13 +5286,14 @@ declare namespace media { /** * The offset into the file where the data to be read, in bytes. By default, * the offset is zero. - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - offset?: number + offset?: long /** * The length in bytes of the data to be read. By default, the length is the @@ -4704,13 +5311,14 @@ declare namespace media { /** * The length in bytes of the data to be read. By default, the length is the * rest of bytes in the file from the offset. - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - length?: number + length?: long } /** @@ -4739,7 +5347,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVDataSrcDescriptor { /** @@ -4758,13 +5367,14 @@ declare namespace media { /** * Size of the file, -1 means the file size is unknown, in this case, * seek and setSpeed can't be executed, loop can't be set, and can't replay. - * @type { number } + * @type { long } * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - fileSize: number; + fileSize: long; /** * Callback function implemented by users, which is used to fill data. * buffer - The buffer need to fill. @@ -4798,9 +5408,10 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - callback: (buffer: ArrayBuffer, length: number, pos?: number) => number; + callback: (buffer: ArrayBuffer, length: long, pos?: long) => int; } /** @@ -4811,31 +5422,35 @@ declare namespace media { * @typedef SubtitleInfo * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface SubtitleInfo { /** * Duration of the text to be displayed, as milliseconds. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - duration?: number; + duration?: int; /** * Display start time of the text, as milliseconds. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - startTime?: number; + startTime?: int; /** * Text information of current update event. * @type { ?string } * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ text?: string; } @@ -5089,7 +5704,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type AVRecorderState = 'idle' | 'prepared' | 'started' | 'paused' | 'stopped' | 'released' | 'error'; @@ -5102,7 +5718,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type OnAVRecorderStateChangeHandler = (state: AVRecorderState, reason: StateChangeReason) => void; @@ -5122,7 +5739,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVRecorder { /** @@ -5152,7 +5770,7 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5185,6 +5803,7 @@ declare namespace media { * console.info('Succeeded in preparing'); * } * }) + * @arkts 1.1&1.2 */ prepare(config: AVRecorderConfig, callback: AsyncCallback): void; @@ -5214,7 +5833,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5245,6 +5864,7 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.error('Failed to prepare and catch error is ' + err.message); * }); + * @arkts 1.1&1.2 */ prepare(config: AVRecorderConfig): Promise; @@ -5275,6 +5895,34 @@ declare namespace media { * }); */ getAVRecorderConfig(callback: AsyncCallback): void; + /** + * Obtains the real-time configuration of this AVRecorder. + * This API uses an asynchronous callback to return the result. + * This API can be called only after prepare() is called. + * @param { AsyncCallback } callback - Callback used to return the result. + * If the operation is successful, **err** is **undefined** and **data** is the real-time configuration obtained; + * otherwise, **err** is an error object. + * @throws { BusinessError } 5400102 - Operate not permit. Return by callback. + * @throws { BusinessError } 5400103 - IO error. Return by callback. + * @throws { BusinessError } 5400105 - Service died. Return by callback. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @since 20 + * @example + * import { BusinessError } from '@kit.BasicServicesKit'; + * + * let avConfig: media.AVRecorderConfig; + * + * avRecorder.getAVRecorderConfig((err: BusinessError, config: media.AVRecorderConfig) => { + * if (err) { + * console.error('Failed to get avConfig and error is ' + err.message); + * } else { + * console.info('Succeeded in getting AVRecorderConfig'); + * avConfig = config; + * } + * }); + * @arkts 1.2 + */ + getAVRecorderConfig(callback: AsyncCallback): void; /** * Obtains the real-time configuration of this AVRecorder. This API uses a promise to return the result. @@ -5298,6 +5946,29 @@ declare namespace media { * }); */ getAVRecorderConfig(): Promise; + /** + * Obtains the real-time configuration of this AVRecorder. This API uses a promise to return the result. + * This API can be called only after prepare() is called. + * @returns { Promise } Promise used to return the real-time configuration. + * @throws { BusinessError } 5400102 - Operate not permit. Return by promise. + * @throws { BusinessError } 5400103 - IO error. Return by promise. + * @throws { BusinessError } 5400105 - Service died. Return by promise. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @since 20 + * @example + * import { BusinessError } from '@kit.BasicServicesKit'; + * + * let avConfig: media.AVRecorderConfig; + * + * avRecorder.getAVRecorderConfig().then((config: media.AVRecorderConfig) => { + * console.info('Succeeded in getting AVRecorderConfig'); + * avConfig = config; + * }).catch((err: BusinessError) => { + * console.error('Failed to get AVRecorderConfig and catch error is ' + err.message); + * }); + * @arkts 1.2 + */ + getAVRecorderConfig(): Promise; /** * Obtains the surface required for recording. This API uses an asynchronous callback to return the result. @@ -5328,6 +5999,37 @@ declare namespace media { * }); */ getInputSurface(callback: AsyncCallback): void; + /** + * Obtains the surface required for recording. This API uses an asynchronous callback to return the result. + * The caller obtains the **surfaceBuffer** from this surface and fills in the corresponding video data. + * + * Note that the video data must carry the timestamp (in ns) and buffer size, and the start time of the timestamp + * must be based on the system startup time. + * + * This API can be called only after the prepare() API is called. + * @param { AsyncCallback } callback - Callback used to return the result. + * If the operation is successful, **err** is **undefined** and **data** is the surface ID obtained; + * otherwise, **err** is an error object. + * @throws { BusinessError } 5400102 - Operate not permit. Return by callback. + * @throws { BusinessError } 5400103 - IO error. Return by callback. + * @throws { BusinessError } 5400105 - Service died. Return by callback. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @since 20 + * @example + * import { BusinessError } from '@kit.BasicServicesKit'; + * let surfaceID: string; // The surfaceID is transferred to the camera API to create a videoOutput instance. + * + * avRecorder.getInputSurface((err: BusinessError, surfaceId: string) => { + * if (err) { + * console.error('Failed to do getInputSurface and error is ' + err.message); + * } else { + * console.info('Succeeded in doing getInputSurface'); + * surfaceID = surfaceId; + * } + * }); + * @arkts 1.2 + */ + getInputSurface(callback: AsyncCallback): void; /** * Obtains the surface required for recording. This API uses a promise to return the result. @@ -5354,6 +6056,31 @@ declare namespace media { * }); */ getInputSurface(): Promise; + /** + * Obtains the surface required for recording. This API uses a promise to return the result. The caller obtains the **surfaceBuffer** from this surface and fills in the corresponding video data. + * + * Note that the video data must carry the timestamp (in ns) and buffer size, and the start time of the timestamp must be based on the system startup time. + * + * This API can be called only after the prepare() API is called. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 5400102 - Operate not permit. Return by promise. + * @throws { BusinessError } 5400103 - IO error. Return by promise. + * @throws { BusinessError } 5400105 - Service died. Return by promise. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @since 20 + * @example + * import { BusinessError } from '@kit.BasicServicesKit'; + * let surfaceID: string; // The surfaceID is transferred to the camera API to create a videoOutput instance. + * + * avRecorder.getInputSurface().then((surfaceId: string) => { + * console.info('Succeeded in getting InputSurface'); + * surfaceID = surfaceId; + * }).catch((err: BusinessError) => { + * console.error('Failed to get InputSurface and catch error is ' + err.message); + * }); + * @arkts 1.2 + */ + getInputSurface(): Promise; /** * Get input meta surface for specified meta source type. it must be called between prepare completed and start. @@ -5370,6 +6097,22 @@ declare namespace media { * @since 12 */ getInputMetaSurface(type: MetaSourceType): Promise; + /** + * Get input meta surface for specified meta source type. it must be called between prepare completed and start. + * @param { MetaSourceType } type - Meta source type. + * @returns { Promise } A Promise instance used to return the input surface id in string. + * @throws { BusinessError } 202 - Called from Non-System applications. Return by promise. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + *
2. Incorrect parameter types. 3.Parameter verification failed. + * @throws { BusinessError } 5400102 - Operate not permit. Return by promise. + * @throws { BusinessError } 5400103 - IO error. Return by promise. + * @throws { BusinessError } 5400105 - Service died. Return by promise. + * @syscap SystemCapability.Multimedia.Media.AVRecorder + * @systemapi + * @since 20 + * @arkts 1.2 + */ + getInputMetaSurface(type: MetaSourceType): Promise; /** * Checks whether the device supports the hardware digital watermark. This API uses a promise to return the result. @@ -5402,7 +6145,7 @@ declare namespace media { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * import { image } from '@kit.ImageKit'; @@ -5415,6 +6158,7 @@ declare namespace media { * }).catch((error: BusinessError) => { * console.error(`Failed to setWatermark and catch error is ${error.message}`); * }); + * @arkts 1.1&1.2 */ setWatermark(watermark: image.PixelMap, config: WatermarkConfig): Promise @@ -5446,7 +6190,7 @@ declare namespace media { * Updates the video rotation angle. This API uses a promise to return the result. * * This API can be called only after the prepare() event is triggered and before the start() API is called. - * @param { number } rotation - Rotation angle, which can only be 0, 90, 180, or 270 degrees. + * @param { int } rotation - Rotation angle, which can only be 0, 90, 180, or 270 degrees. * @returns { Promise } A Promise instance used to return when the function is finished. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. @@ -5454,7 +6198,7 @@ declare namespace media { * @throws { BusinessError } 5400103 - IO error. Return by promise. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5465,8 +6209,9 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.error('Failed to updateRotation and catch error is ' + err.message); * }); + * @arkts 1.1&1.2 */ - updateRotation(rotation: number): Promise; + updateRotation(rotation: int): Promise; /** * Set if recorder want to be muted instead of interrupted. only available before prepare state @@ -5501,7 +6246,7 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5512,6 +6257,7 @@ declare namespace media { * console.info('Succeeded in starting AVRecorder'); * } * }); + * @arkts 1.1&1.2 */ start(callback: AsyncCallback): void; @@ -5536,7 +6282,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5545,6 +6291,7 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.error('Failed to start AVRecorder and catch error is ' + err.message); * }); + * @arkts 1.1&1.2 */ start(): Promise; @@ -5568,7 +6315,7 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5579,6 +6326,7 @@ declare namespace media { * console.info('Succeeded in pausing'); * } * }); + * @arkts 1.1&1.2 */ pause(callback: AsyncCallback): void; @@ -5602,7 +6350,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5611,6 +6359,7 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.error('Failed to pause AVRecorder and catch error is ' + err.message); * }); + * @arkts 1.1&1.2 */ pause(): Promise; @@ -5634,7 +6383,7 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5645,6 +6394,7 @@ declare namespace media { * console.info('Succeeded in resuming AVRecorder'); * } * }); + * @arkts 1.1&1.2 */ resume(callback: AsyncCallback): void; @@ -5668,7 +6418,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5677,6 +6427,7 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.error('Failed to resume AVRecorder failed and catch error is ' + err.message); * }); + * @arkts 1.1&1.2 */ resume(): Promise; @@ -5703,7 +6454,7 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5714,6 +6465,7 @@ declare namespace media { * console.info('Succeeded in stopping AVRecorder'); * } * }); + * @arkts 1.1&1.2 */ stop(callback: AsyncCallback): void; @@ -5741,7 +6493,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5750,6 +6502,7 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.error('Failed to stop AVRecorder and catch error is ' + err.message); * }); + * @arkts 1.1&1.2 */ stop(): Promise; @@ -5773,7 +6526,7 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5784,6 +6537,7 @@ declare namespace media { * console.info('Succeeded in resetting AVRecorder'); * } * }); + * @arkts 1.1&1.2 */ reset(callback: AsyncCallback): void; @@ -5806,7 +6560,7 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5815,6 +6569,7 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.error('Failed to reset and catch error is ' + err.message); * }); + * @arkts 1.1&1.2 */ reset(): Promise; @@ -5834,7 +6589,7 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5845,6 +6600,7 @@ declare namespace media { * console.info('Succeeded in releasing AVRecorder'); * } * }); + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; @@ -5864,7 +6620,7 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -5873,6 +6629,7 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.error('Failed to release AVRecorder and catch error is ' + err.message); * }); + * @arkts 1.1&1.2 */ release(): Promise; @@ -5889,7 +6646,7 @@ declare namespace media { * @throws { BusinessError } 5400103 - I/O error. * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} * @example * import { audio } from '@kit.AudioKit'; * @@ -5903,6 +6660,7 @@ declare namespace media { * currentCapturerInfo = capturerInfo; * } * }); + * @arkts 1.1&1.2 */ getCurrentAudioCapturerInfo(callback: AsyncCallback): void; @@ -5916,7 +6674,7 @@ declare namespace media { * @throws { BusinessError } 5400103 - I/O error. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} * @example * import { audio } from '@kit.AudioKit'; * @@ -5928,6 +6686,7 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.error('Failed to get CurrentAudioCapturerInfo and catch error is ' + err.message); * }); + * @arkts 1.1&1.2 */ getCurrentAudioCapturerInfo(): Promise; @@ -5942,12 +6701,12 @@ declare namespace media { * is obtained last time to the current time. For example, if you have obtained the maximum amplitude at 1s * and you call this API again at 2s, then the return value is the maximum amplitude * within the duration from 1s to 2s. - * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, + * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, * **err** is **undefined** and **data** is the maximum amplitude obtained; otherwise, **err** is an error object. * @throws { BusinessError } 5400102 - Operation not allowed. * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} * @example * let maxAmplitude: number; * @@ -5959,8 +6718,9 @@ declare namespace media { * maxAmplitude = amplitude; * } * }); + * @arkts 1.1&1.2 */ - getAudioCapturerMaxAmplitude(callback: AsyncCallback): void; + getAudioCapturerMaxAmplitude(callback: AsyncCallback): void; /** * Obtains the maximum amplitude of the current audio capturer. This API uses a promise to return the result. @@ -5972,11 +6732,11 @@ declare namespace media { * is obtained last time to the current time. For example, if you have obtained the maximum amplitude * at 1s and you call this API again at 2s, then the return value is the maximum amplitude * within the duration from 1s to 2s. - * @returns { Promise } Promise used to return the maximum amplitude obtained. + * @returns { Promise } Promise used to return the maximum amplitude obtained. * @throws { BusinessError } 5400102 - Operation not allowed. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} * @example * let maxAmplitude: number; * @@ -5986,8 +6746,9 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.error('Failed to get AudioCapturerMaxAmplitude and catch error is ' + err.message); * }); + * @arkts 1.1&1.2 */ - getAudioCapturerMaxAmplitude(): Promise; + getAudioCapturerMaxAmplitude(): Promise; /** * Obtains available encoders. This API uses an asynchronous callback to return the result. @@ -5996,7 +6757,7 @@ declare namespace media { * @throws { BusinessError } 5400102 - Operation not allowed. * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} * @example * let encoderInfo: media.EncoderInfo; * @@ -6008,6 +6769,7 @@ declare namespace media { * encoderInfo = info[0]; * } * }); + * @arkts 1.1&1.2 */ getAvailableEncoder(callback: AsyncCallback>): void; @@ -6017,7 +6779,7 @@ declare namespace media { * @throws { BusinessError } 5400102 - Operation not allowed. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} * @example * let encoderInfo: media.EncoderInfo; * @@ -6027,6 +6789,7 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.error('Failed to get AvailableEncoder and catch error is ' + err.message); * }); + * @arkts 1.1&1.2 */ getAvailableEncoder(): Promise>; @@ -6042,7 +6805,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ readonly state: AVRecorderState; @@ -6057,7 +6821,8 @@ declare namespace media { * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. * 2. Incorrect parameter types. 3.Parameter verification failed. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'audioCapturerChange', callback: Callback): void; @@ -6073,7 +6838,8 @@ declare namespace media { * @throws { BusinessError } 5400103 - IO error. Return by callback. * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'photoAssetAvailable', callback: Callback): void; /** @@ -6096,7 +6862,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'stateChange', callback: OnAVRecorderStateChangeHandler): void; @@ -6157,7 +6924,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -6176,7 +6944,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'stateChange', callback?: OnAVRecorderStateChangeHandler): void; @@ -6196,7 +6965,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; @@ -6213,7 +6983,8 @@ declare namespace media { * information about the audio capturer. * This parameter is supported since API version 12. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'audioCapturerChange', callback?: Callback): void; @@ -6223,7 +6994,8 @@ declare namespace media { * @param { Callback } callback - Callback used to return the **PhotoAsset** object * corresponding to the resource file created by the system. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'photoAssetAvailable', callback?: Callback): void; } @@ -6343,7 +7115,8 @@ declare namespace media { * @typedef Location * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface Location { /** @@ -6353,12 +7126,13 @@ declare namespace media { */ /** * Latitude. - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - latitude: number; + latitude: double; /** * Longitude. @@ -6367,12 +7141,13 @@ declare namespace media { */ /** * Longitude. - * @type { number } + * @type { double } * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - longitude: number; + longitude: double; } /** * Set configures of a watermark to AVRecorder. The position starts at top left corner. @@ -6380,25 +7155,28 @@ declare namespace media { * @typedef WatermarkConfig * @syscap SystemCapability.Multimedia.Media.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ interface WatermarkConfig { /** * Offset of the watermark to the top line of pixel. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Media.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - top: number; + top: int; /** * Offset of the watermark to the left line of pixel. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Media.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ - left: number; + left: int; } /** @@ -6617,7 +7395,8 @@ declare namespace media { * @typedef { 'idle' | 'prepared' | 'playing' | 'paused' | 'stopped' | 'error' } * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ type VideoRecordState = 'idle' | 'prepared' | 'playing' | 'paused' | 'stopped' | 'error'; @@ -6629,7 +7408,8 @@ declare namespace media { * @typedef VideoRecorder * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface VideoRecorder { /** @@ -6659,7 +7439,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ prepare(config: VideoRecorderConfig, callback: AsyncCallback): void; /** @@ -6689,7 +7470,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ prepare(config: VideoRecorderConfig): Promise; /** @@ -6714,6 +7496,19 @@ declare namespace media { * @since 12 */ getInputSurface(callback: AsyncCallback): void; + /** + * get input surface.it must be called between prepare completed and start. + * @param { AsyncCallback } callback - Callback used to return the input surface id in string. + * @throws { BusinessError } 202 - Not System App. + * @throws { BusinessError } 5400102 - Operation not allowed. Return by callback. + * @throws { BusinessError } 5400103 - I/O error. Return by callback. + * @throws { BusinessError } 5400105 - Service died. Return by callback. + * @syscap SystemCapability.Multimedia.Media.VideoRecorder + * @systemapi + * @since 20 + * @arkts 1.2 + */ + getInputSurface(callback: AsyncCallback): void; /** * get input surface. it must be called between prepare completed and start. * @returns { Promise } A Promise instance used to return the input surface id in string. @@ -6736,6 +7531,19 @@ declare namespace media { * @since 12 */ getInputSurface(): Promise; + /** + * get input surface. it must be called between prepare completed and start. + * @returns { Promise } A Promise instance used to return the input surface id in string. + * @throws { BusinessError } 202 - Not System App. + * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise. + * @throws { BusinessError } 5400103 - I/O error. Return by promise. + * @throws { BusinessError } 5400105 - Service died. Return by promise. + * @syscap SystemCapability.Multimedia.Media.VideoRecorder + * @systemapi + * @since 20 + * @arkts 1.2 + */ + getInputSurface(): Promise; /** * Starts video recording. * @param { AsyncCallback } callback - A callback instance used to return when start completed. @@ -6755,7 +7563,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(callback: AsyncCallback): void; /** @@ -6777,7 +7586,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(): Promise; /** @@ -6799,7 +7609,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pause(callback: AsyncCallback): void; /** @@ -6821,7 +7632,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pause(): Promise; /** @@ -6843,7 +7655,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ resume(callback: AsyncCallback): void; /** @@ -6865,7 +7678,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ resume(): Promise; /** @@ -6887,7 +7701,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(callback: AsyncCallback): void; /** @@ -6909,7 +7724,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(): Promise; /** @@ -6927,7 +7743,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(callback: AsyncCallback): void; /** @@ -6945,7 +7762,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; /** @@ -6969,7 +7787,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reset(callback: AsyncCallback): void; /** @@ -6993,7 +7812,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ reset(): Promise; /** @@ -7016,7 +7836,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by callback. * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -7026,7 +7847,8 @@ declare namespace media { * @readonly * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly state: VideoRecordState; } @@ -7055,7 +7877,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.VideoPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum PlaybackSpeed { /** @@ -7068,7 +7891,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.VideoPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPEED_FORWARD_0_75_X = 0, /** @@ -7081,7 +7905,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.VideoPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPEED_FORWARD_1_00_X = 1, /** @@ -7094,7 +7919,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.VideoPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPEED_FORWARD_1_25_X = 2, /** @@ -7107,7 +7933,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.VideoPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPEED_FORWARD_1_75_X = 3, /** @@ -7120,42 +7947,48 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.VideoPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPEED_FORWARD_2_00_X = 4, /** * playback at 0.5x normal speed * @syscap SystemCapability.Multimedia.Media.VideoPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPEED_FORWARD_0_50_X = 5, /** * playback at 1.5x normal speed * @syscap SystemCapability.Multimedia.Media.VideoPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPEED_FORWARD_1_50_X = 6, /** * playback at 3.0x normal speed * @syscap SystemCapability.Multimedia.Media.VideoPlayer * @atomicservice - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ SPEED_FORWARD_3_00_X = 7, /** * playback at 0.25x normal speed * @syscap SystemCapability.Multimedia.Media.VideoPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPEED_FORWARD_0_25_X = 8, /** * playback at 0.125x normal speed * @syscap SystemCapability.Multimedia.Media.VideoPlayer * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SPEED_FORWARD_0_125_X = 9, } @@ -7582,7 +8415,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.VideoPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum VideoScaleType { /** @@ -7599,7 +8433,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.VideoPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_SCALE_TYPE_FIT = 0, @@ -7617,7 +8452,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.VideoPlayer * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_SCALE_TYPE_FIT_CROP = 1, @@ -7647,7 +8483,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum ContainerFormatType { /** @@ -7659,7 +8496,8 @@ declare namespace media { * A video container format type mp4. * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CFT_MPEG_4 = 'mp4', @@ -7673,26 +8511,30 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CFT_MPEG_4A = 'm4a', /** * A audio container format type mp3. * @syscap SystemCapability.Multimedia.Media.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CFT_MP3 = 'mp3', /** * A audio container format type wav. * @syscap SystemCapability.Multimedia.Media.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CFT_WAV = 'wav', /** * A audio container format type amr. * @syscap SystemCapability.Multimedia.Media.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ CFT_AMR = 'amr', /** @@ -7725,7 +8567,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum MediaType { /** @@ -7744,7 +8587,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA_TYPE_AUD = 0, /** @@ -7763,14 +8607,16 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA_TYPE_VID = 1, /** * Track is subtitle. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MEDIA_TYPE_SUBTITLE = 2, } @@ -7797,7 +8643,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum MediaDescriptionKey { /** @@ -7816,7 +8663,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MD_KEY_TRACK_INDEX = 'track_index', @@ -7836,7 +8684,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MD_KEY_TRACK_TYPE = 'track_type', @@ -7856,7 +8705,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MD_KEY_CODEC_MIME = 'codec_mime', @@ -7876,7 +8726,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MD_KEY_DURATION = 'duration', @@ -7896,7 +8747,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MD_KEY_BITRATE = 'bitrate', @@ -7916,7 +8768,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MD_KEY_WIDTH = 'width', @@ -7936,7 +8789,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MD_KEY_HEIGHT = 'height', @@ -7956,7 +8810,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MD_KEY_FRAME_RATE = 'frame_rate', @@ -7976,7 +8831,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MD_KEY_AUD_CHANNEL_COUNT = 'channel_count', @@ -7996,7 +8852,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MD_KEY_AUD_SAMPLE_RATE = 'sample_rate', @@ -8004,7 +8861,8 @@ declare namespace media { * key for audio bit depth, value type is number * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MD_KEY_AUD_SAMPLE_DEPTH = 'sample_depth', @@ -8012,7 +8870,8 @@ declare namespace media { * Key for language. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MD_KEY_LANGUAGE = 'language', @@ -8020,7 +8879,8 @@ declare namespace media { * Key for track name, value is string. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MD_KEY_TRACK_NAME = 'track_name', @@ -8028,7 +8888,8 @@ declare namespace media { * Key for video hdr type, value type is number. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MD_KEY_HDR_TYPE = 'hdr_type', } @@ -8039,28 +8900,31 @@ declare namespace media { * @typedef VideoRecorderProfile * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface VideoRecorderProfile { /** * Indicates the audio bit rate. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly audioBitrate: number; + readonly audioBitrate: int; /** * Indicates the number of audio channels. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly audioChannels: number; + readonly audioChannels: int; /** * Indicates the audio encoding format. @@ -8068,19 +8932,21 @@ declare namespace media { * @readonly * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly audioCodec: CodecMimeType; /** * Indicates the audio sampling rate. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly audioSampleRate: number; + readonly audioSampleRate: int; /** * Indicates the output file format. @@ -8088,19 +8954,21 @@ declare namespace media { * @readonly * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly fileFormat: ContainerFormatType; /** * Indicates the video bit rate. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly videoBitrate: number; + readonly videoBitrate: int; /** * Indicates the video encoding format. @@ -8108,39 +8976,43 @@ declare namespace media { * @readonly * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ readonly videoCodec: CodecMimeType; /** * Indicates the video width. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly videoFrameWidth: number; + readonly videoFrameWidth: int; /** * Indicates the video height. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly videoFrameHeight: number; + readonly videoFrameHeight: int; /** * Indicates the video frame rate. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - readonly videoFrameRate: number; + readonly videoFrameRate: int; } /** @@ -8157,7 +9029,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AudioSourceType { /** @@ -8169,7 +9042,8 @@ declare namespace media { * Default audio input source. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_SOURCE_TYPE_DEFAULT = 0, /** @@ -8183,32 +9057,37 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_SOURCE_TYPE_MIC = 1, /** * Audio source in speech recognition scenarios. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_SOURCE_TYPE_VOICE_RECOGNITION = 2, /** * Voice communication source. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_SOURCE_TYPE_VOICE_COMMUNICATION = 7, /** * Voice message source. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_SOURCE_TYPE_VOICE_MESSAGE = 10, /** * Audio source in camera recording scenarios. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_SOURCE_TYPE_CAMCORDER = 13, } @@ -8226,7 +9105,8 @@ declare namespace media { * @enum { number } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum VideoSourceType { /** @@ -8238,7 +9118,8 @@ declare namespace media { * The input surface carries raw data. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_SOURCE_TYPE_SURFACE_YUV = 0, /** @@ -8250,7 +9131,8 @@ declare namespace media { * The input surface carries ES data. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_SOURCE_TYPE_SURFACE_ES = 1, } @@ -8261,14 +9143,16 @@ declare namespace media { * @enum { number } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum MetaSourceType { /** * Maker info for video. * @syscap SystemCapability.Multimedia.Media.AVRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_MAKER_INFO = 0, } @@ -8278,20 +9162,23 @@ declare namespace media { * * @enum { number } * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum FileGenerationMode { /** * The application creates a media file in the sandbox. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ APP_CREATE = 0, /** * The system creates a media file. Currently, this mode takes effect only in camera recording scenarios. * The URL set by the application is ignored. * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUTO_CREATE_CAMERA_SCENE = 1, } @@ -8302,7 +9189,8 @@ declare namespace media { * @typedef VideoRecorderConfig * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface VideoRecorderConfig { /** @@ -8310,7 +9198,8 @@ declare namespace media { * @type { ?AudioSourceType } * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ audioSourceType?: AudioSourceType; /** @@ -8318,7 +9207,8 @@ declare namespace media { * @type { VideoSourceType } * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ videoSourceType: VideoSourceType; /** @@ -8326,7 +9216,8 @@ declare namespace media { * @type { VideoRecorderProfile } * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ profile: VideoRecorderProfile; /** @@ -8336,24 +9227,27 @@ declare namespace media { * @type { string } * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ url: string; /** * Sets the video rotation angle in output file, and for the file to playback. mp4 support. * the range of rotation angle should be {0, 90, 180, 270}, default is 0. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - rotation?: number; + rotation?: int; /** * geographical location information. * @type { ?Location } * @syscap SystemCapability.Multimedia.Media.VideoRecorder * @systemapi - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ location?: Location; } @@ -8363,14 +9257,16 @@ declare namespace media { * * @typedef EncoderInfo * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface EncoderInfo { /** * MIME type of the encoder. * @type { CodecMimeType } * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ mimeType: CodecMimeType; @@ -8378,7 +9274,8 @@ declare namespace media { * Encoder type. The value **audio** means an audio encoder, and **video** means a video encoder. * @type { string } * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type: string; @@ -8386,7 +9283,8 @@ declare namespace media { * Bit rate range of the encoder, with the minimum and maximum bit rates specified. * @type { ?Range } * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bitRate?: Range; @@ -8395,7 +9293,8 @@ declare namespace media { * This parameter is available only for video encoders. * @type { ?Range } * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ frameRate?: Range; @@ -8404,7 +9303,8 @@ declare namespace media { * This parameter is available only for video encoders. * @type { ?Range } * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ width?: Range; @@ -8413,7 +9313,8 @@ declare namespace media { * This parameter is available only for video encoders. * @type { ?Range } * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ height?: Range; @@ -8422,18 +9323,20 @@ declare namespace media { * This parameter is available only for audio encoders. * @type { ?Range } * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ channels?: Range; /** * Audio sampling rate, including all available audio sampling rates. The value depends on the encoder type, * and this parameter is available only for audio encoders. - * @type { ?Array } + * @type { ?Array } * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - sampleRate?: Array; + sampleRate?: Array; } /** @@ -8441,24 +9344,27 @@ declare namespace media { * * @typedef Range * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ interface Range { /** * Minimum value. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - min: number; + min: int; /** * Maximum value. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - max: number; + max: int; } /** @@ -8475,7 +9381,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVRecorderProfile { /** @@ -8494,13 +9401,14 @@ declare namespace media { * is [32000 - 320000].
- Range [4750, 5150, 5900, 6700, 7400, 7950, 10200, 12200] for * the AMR-NB encoding format.
- Range [6600, 8850, 12650, 14250, 15850, 18250, 19850, 23050, 23850] for the * AMR-WB encoding format.
**Atomic service API**: This API can be used in atomic services since API version 12. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - audioBitrate?: number; + audioBitrate?: int; /** * Indicates the number of audio channels. @@ -8512,13 +9420,14 @@ declare namespace media { * AAC encoding format.
- Range [1] for the G.711 μ-law encoding format.
- Range [1 - 2] for the MP3 encoding * format.
- Range [1] for the AMR-NB and AMR-WB encoding formats.
**Atomic service API**: This API can be * used in atomic services since API version 12. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - audioChannels?: number; + audioChannels?: int; /** * Indicates the audio encoding format. @@ -8533,7 +9442,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ audioCodec?: CodecMimeType; @@ -8549,13 +9459,14 @@ declare namespace media { * 22050, 24000, 32000, 44100, 48000] for the MP3 encoding format.
- Range [8000] for the AMR-NB encoding format. *
- Range [16000] for the AMR-WB encoding format.
Variable bit rate. The bit rate is for reference only. *
**Atomic service API**: This API can be used in atomic services since API version 12. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - audioSampleRate?: number; + audioSampleRate?: int; /** * Indicates the output file format. @@ -8570,7 +9481,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fileFormat: ContainerFormatType; @@ -8581,12 +9493,13 @@ declare namespace media { */ /** * Video encoding bit rate. This parameter is mandatory for video recording. The value range is [10000 - 100000000]. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - videoBitrate?: number; + videoBitrate?: int; /** * Indicates the video encoding format. @@ -8598,7 +9511,8 @@ declare namespace media { * @type { ?CodecMimeType } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ videoCodec?: CodecMimeType; @@ -8609,12 +9523,13 @@ declare namespace media { */ /** * Width of a video frame. This parameter is mandatory for video recording. The value range is [176 - 4096]. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - videoFrameWidth?: number; + videoFrameWidth?: int; /** * Indicates the video height. @@ -8623,12 +9538,13 @@ declare namespace media { */ /** * Height of a video frame. This parameter is mandatory for video recording. The value range is [144 - 4096]. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - videoFrameHeight?: number; + videoFrameHeight?: int; /** * Indicates the video frame rate. @@ -8637,12 +9553,13 @@ declare namespace media { */ /** * Video frame rate. This parameter is mandatory for video recording. The value range is [1 - 60]. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - videoFrameRate?: number; + videoFrameRate?: int; /** * Whether to record HDR video. @@ -8656,7 +9573,8 @@ declare namespace media { * @type { ?boolean } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ isHdr?: boolean; @@ -8667,7 +9585,8 @@ declare namespace media { * @type { ?boolean } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enableTemporalScale?: boolean; @@ -8676,7 +9595,8 @@ declare namespace media { * @type { ?boolean } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enableStableQualityMode?: boolean @@ -8708,7 +9628,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVRecorderConfig { /** @@ -8723,7 +9644,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ audioSourceType?: AudioSourceType; /** @@ -8736,7 +9658,8 @@ declare namespace media { * @type { ?VideoSourceType } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ videoSourceType?: VideoSourceType; /** @@ -8744,7 +9667,8 @@ declare namespace media { * @type { ?Array } * @syscap SystemCapability.Multimedia.Media.AVRecorder * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ metaSourceTypes?: Array; /** @@ -8759,7 +9683,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ profile: AVRecorderProfile; /** @@ -8775,7 +9700,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.AVRecorder * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ url: string; @@ -8783,7 +9709,8 @@ declare namespace media { * Mode for creating the file, which is used together with on('photoAssetAvailable'). * @type { ?FileGenerationMode } * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fileGenerationMode?: FileGenerationMode; /** @@ -8812,7 +9739,8 @@ declare namespace media { * Metadata. For details, see @AVMetadata. * @type { ?AVMetadata } * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ metadata?: AVMetadata; /** @@ -8820,11 +9748,12 @@ declare namespace media { * it is reset to the maximum allowed duration. Once the recording reaches the specified duration, * it stops automatically and notifies via the **stateChange** callback that the recording has stopped: * AVRecorderState = 'stopped', StateChangeReason = BACKGROUND. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVRecorder - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - maxDuration?: number; + maxDuration?: int; } /** @@ -8873,6 +9802,18 @@ declare namespace media { [key: string]: Object; } + /** + * Provides the container definition for media description key-value pairs. + * + * The media description consists of key-value pairs where keys reference @MediaDescriptionKey. + * @typedef { Record } + * @syscap SystemCapability.Multimedia.Media.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + type MediaDescription = Record; + /** * Enumerates seek mode. * @@ -8895,7 +9836,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum SeekMode { /** @@ -8914,7 +9856,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SEEK_NEXT_SYNC = 0, /** @@ -8933,14 +9876,16 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SEEK_PREV_SYNC = 1, /** * Seek to the closest frame of the given timestamp. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SEEK_CLOSEST = 2, /** @@ -8952,7 +9897,8 @@ declare namespace media { * through the on error callback. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SEEK_CONTINUOUS = 3, } @@ -8964,7 +9910,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum SwitchMode { /** @@ -8972,7 +9919,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SMOOTH = 0, /** @@ -8980,14 +9928,16 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SEGMENT = 1, /** * switch to the closest frame of the given timestamp. * @syscap SystemCapability.Multimedia.Media.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CLOSEST = 2, } @@ -9006,7 +9956,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum CodecMimeType { /** @@ -9018,7 +9969,8 @@ declare namespace media { * H.263 codec MIME type. * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_H263 = 'video/h263', /** @@ -9030,7 +9982,8 @@ declare namespace media { * H.264 codec MIME type. * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_AVC = 'video/avc', /** @@ -9042,7 +9995,8 @@ declare namespace media { * MPEG2 codec MIME type. * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_MPEG2 = 'video/mpeg2', /** @@ -9054,7 +10008,8 @@ declare namespace media { * MPEG4 codec MIME type * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_MPEG4 = 'video/mp4v-es', @@ -9067,7 +10022,8 @@ declare namespace media { * VP8 codec MIME type * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_VP8 = 'video/x-vnd.on2.vp8', @@ -9081,7 +10037,8 @@ declare namespace media { * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_AAC = 'audio/mp4a-latm', @@ -9094,7 +10051,8 @@ declare namespace media { * vorbis codec MIME type. * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_VORBIS = 'audio/vorbis', @@ -9107,7 +10065,8 @@ declare namespace media { * flac codec MIME type. * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_FLAC = 'audio/flac', @@ -9120,31 +10079,36 @@ declare namespace media { * H.265 codec MIME type. * @syscap SystemCapability.Multimedia.Media.Core * @crossplatform - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ VIDEO_HEVC = 'video/hevc', /** * mp3 codec MIME type. * @syscap SystemCapability.Multimedia.Media.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_MP3 = 'audio/mpeg', /** * G711-mulaw codec MIME type. * @syscap SystemCapability.Multimedia.Media.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_G711MU = 'audio/g711mu', /** * AMR_NB codec MIME type. * @syscap SystemCapability.Multimedia.Media.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_AMR_NB = 'audio/3gpp', /** * AMR_WB codec MIME type. * @syscap SystemCapability.Multimedia.Media.Core - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ AUDIO_AMR_WB = 'audio/amr-wb', } @@ -9154,19 +10118,22 @@ declare namespace media { * * @enum { number } * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AVScreenCaptureRecordPreset { /** * The H.264 video encoding format, AAC audio encoding format, and MP4 container format are used. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREEN_RECORD_PRESET_H264_AAC_MP4 = 0, /** * The H.265 video encoding format, AAC audio encoding format, and MP4 container format are used. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREEN_RECORD_PRESET_H265_AAC_MP4 = 1, } @@ -9176,19 +10143,22 @@ declare namespace media { * * @enum { number } * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enum AVScreenCaptureFillMode { /** * Keeps the original aspect ratio, matching the aspect ratio of the physical screen. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ PRESERVE_ASPECT_RATIO = 0, /** * Stretches the image to fit the specified dimensions. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SCALE_TO_FILL = 1, } @@ -9198,73 +10168,85 @@ declare namespace media { * * @enum { number } * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum AVScreenCaptureStateCode { /** * Screen capture is started. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREENCAPTURE_STATE_STARTED = 0, /** * Screen capture is canceled. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREENCAPTURE_STATE_CANCELED = 1, /** * Screen capture is manually stopped by the user. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREENCAPTURE_STATE_STOPPED_BY_USER = 2, /** * Screen capture is interrupted by another screen capture. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREENCAPTURE_STATE_INTERRUPTED_BY_OTHER = 3, /** * Screen capture is interrupted by an incoming call. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREENCAPTURE_STATE_STOPPED_BY_CALL = 4, /** * The microphone is unavailable during screen capture. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREENCAPTURE_STATE_MIC_UNAVAILABLE = 5, /** * The microphone is muted by the user. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREENCAPTURE_STATE_MIC_MUTED_BY_USER = 6, /** * The microphone is unmuted by the user. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREENCAPTURE_STATE_MIC_UNMUTED_BY_USER = 7, /** * The system enters a privacy page during screen capture. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREENCAPTURE_STATE_ENTER_PRIVATE_SCENE = 8, /** * The system exits a privacy page during screen capture. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREENCAPTURE_STATE_EXIT_PRIVATE_SCENE = 9, /** * Screen capture is interrupted by system user switchover. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ SCREENCAPTURE_STATE_STOPPED_BY_USER_SWITCHES = 10, } @@ -9311,80 +10293,91 @@ declare namespace media { * * @typedef AVScreenCaptureRecordConfig * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVScreenCaptureRecordConfig { /** * FD of the file output. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - fd: number; + fd: int; /** * Video width, in px. The default value varies according to the display in use. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - frameWidth?: number; + frameWidth?: int; /** * Video height, in px. The default value varies according to the display in use. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - frameHeight?: number; + frameHeight?: int; /** * Video bit rate. The default value is **10000000**. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - videoBitrate?: number; + videoBitrate?: int; /** * Audio sampling rate. This value is used for both internal capture and external capture (using microphones). * Only **48000** (default value) and **16000** are supported. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - audioSampleRate?: number; + audioSampleRate?: int; /** * Number of audio channels. This value is used for both internal capture and external capture (using microphones). * Only **1** and **2** (default) are supported. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - audioChannelCount?: number; + audioChannelCount?: int; /** * Audio bit rate. This value is used for both internal capture and external capture (using microphones). * The default value is **96000**. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - audioBitrate?: number; + audioBitrate?: int; /** * Encoding and container format used. The default value is **SCREEN_RECORD_PRESET_H264_AAC_MP4**. * @type { ?AVScreenCaptureRecordPreset } * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ preset?: AVScreenCaptureRecordPreset; /** * ID of the display used for screen capture. By default, the main screen is captured. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - displayId?: number; + displayId?: int; /** * Video fill mode during screen capture. * @type { ?AVScreenCaptureFillMode } * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ fillMode?: AVScreenCaptureFillMode; /** @@ -9403,7 +10396,8 @@ declare namespace media { * * @typedef AVScreenCaptureRecorder * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVScreenCaptureRecorder { /** @@ -9415,7 +10409,7 @@ declare namespace media { * @throws { BusinessError } 5400103 - IO error. Return by promise. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -9431,6 +10425,7 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.info('Failed to init avScreenCaptureRecorder, error: ' + err.message); * }) + * @arkts 1.1&1.2 */ init(config: AVScreenCaptureRecordConfig): Promise; @@ -9440,7 +10435,7 @@ declare namespace media { * @throws { BusinessError } 5400103 - IO error. Return by promise. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -9449,6 +10444,7 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.info('Failed to start avScreenCaptureRecorder, error: ' + err.message); * }) + * @arkts 1.1&1.2 */ startRecording(): Promise; @@ -9458,7 +10454,7 @@ declare namespace media { * @throws { BusinessError } 5400103 - IO error. Return by promise. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -9467,6 +10463,7 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.info('Failed to stop avScreenCaptureRecorder, error: ' + err.message); * }) + * @arkts 1.1&1.2 */ stopRecording(): Promise; @@ -9475,13 +10472,13 @@ declare namespace media { * This API uses a promise to return the result. * For example, if a user enters a password in this application during screen capture, * the application will not display a black screen. - * @param { Array } windowIDs - IDs of windows that require privacy exemption, including the main window + * @param { Array } windowIDs - IDs of windows that require privacy exemption, including the main window * IDs and subwindow IDs. For details about how to obtain window properties. * @returns { Promise } Promise used to return the window IDs. * @throws { BusinessError } 5400103 - IO error. Return by promise. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -9491,8 +10488,9 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.info('Failed to skip privacy mode, error: ' + err.message); * }) + * @arkts 1.1&1.2 */ - skipPrivacyMode(windowIDs: Array): Promise; + skipPrivacyMode(windowIDs: Array): Promise; /** * Enables or disables the microphone. This API uses a promise to return the result. @@ -9502,7 +10500,7 @@ declare namespace media { * @throws { BusinessError } 5400103 - IO error. Return by promise. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -9511,6 +10509,7 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.info('Failed to setMicEnabled avScreenCaptureRecorder, error: ' + err.message); * }) + * @arkts 1.1&1.2 */ setMicEnabled(enable: boolean): Promise; @@ -9520,7 +10519,7 @@ declare namespace media { * @throws { BusinessError } 5400103 - IO error. Return by promise. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * import { BusinessError } from '@kit.BasicServicesKit'; * @@ -9529,6 +10528,7 @@ declare namespace media { * }).catch((err: BusinessError) => { * console.info('Faile to release avScreenCaptureRecorder, error: ' + err.message); * }) + * @arkts 1.1&1.2 */ release(): Promise; @@ -9540,11 +10540,12 @@ declare namespace media { * @param { Callback } callback - Callback invoked when the event is triggered. * AVScreenCaptureStateCode indicates the new state. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * avScreenCaptureRecorder.on('stateChange', (state: media.AVScreenCaptureStateCode) => { * console.info('avScreenCaptureRecorder stateChange to ' + state); * }) + * @arkts 1.1&1.2 */ on(type: 'stateChange', callback: Callback): void; @@ -9558,11 +10559,12 @@ declare namespace media { * @throws { BusinessError } 5400103 - IO error. Return by ErrorCallback. * @throws { BusinessError } 5400105 - Service died. Return by ErrorCallback. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * avScreenCaptureRecorder.on('error', (err: BusinessError) => { * console.error('avScreenCaptureRecorder error:' + err.message); * }) + * @arkts 1.1&1.2 */ on(type: 'error', callback: ErrorCallback): void; @@ -9573,9 +10575,10 @@ declare namespace media { * AVScreenCaptureStateCode indicates the new state. If this parameter is not specified, * the last subscription is canceled. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * avScreenCaptureRecorder.off('stateChange'); + * @arkts 1.1&1.2 */ off(type: 'stateChange', callback?: Callback): void; @@ -9586,9 +10589,10 @@ declare namespace media { * @param { ErrorCallback } callback - Callback used for unsubscription. If this parameter is not specified, * the last subscription is canceled. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} * @example * avScreenCaptureRecorder.off('error'); + * @arkts 1.1&1.2 */ off(type: 'error', callback?: ErrorCallback): void; } @@ -9598,22 +10602,25 @@ declare namespace media { * * @typedef AVTranscoderConfig * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVTranscoderConfig { /** * Bitrate of the output audio, in bit/s. The value range is [1-500000]. The default value is 48 kbit/s. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - audioBitrate?: number; + audioBitrate?: int; /** * Encoding format of the output audio. Currently, only AAC is supported. The default value is **AAC**. * @type { ?CodecMimeType } * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ audioCodec?: CodecMimeType; @@ -9621,7 +10628,8 @@ declare namespace media { * Container format of the output video file. Currently, only MP4 is supported. * @type { ContainerFormatType } * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fileFormat: ContainerFormatType; @@ -9629,38 +10637,42 @@ declare namespace media { * Bitrate of the output video, in bit/s. The default bitrate depends on the resolution of the output video. * The default bitrate is 1 Mbit/s for the resolution in the range [240p, 480P], * 2 Mbit/s for the range (480P,720P], 4 Mbit/s for the range (720P,1080P], and 8 Mbit/s for 1080p or higher. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - videoBitrate?: number; + videoBitrate?: int; /** * Encoding format of the output video. Currently, only AVC and HEVC are supported. * If the source video is in HEVC format, the default value is **HEVC**. Otherwise, the default value is **AVC**. * @type { ?CodecMimeType } * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ videoCodec?: CodecMimeType; /** * Width of the output video frame, in px. The value range is [240 - 3840]. * The default value is the width of the source video frame. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - videoFrameWidth?: number; + videoFrameWidth?: int; /** * Height of the output video frame, in px. The value range is [240 - 2160]. * The default value is the height of the source video frame. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - videoFrameHeight?: number; + videoFrameHeight?: int; } /** @@ -9669,7 +10681,8 @@ declare namespace media { * * @typedef AVTranscoder * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface AVTranscoder { /** @@ -9688,7 +10701,8 @@ declare namespace media { * at the same time, resulting in errors in obtaining data. * @type { AVFileDescriptor } * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ fdSrc: AVFileDescriptor; @@ -9702,11 +10716,12 @@ declare namespace media { * **AVPlayer**, **AVMetadataExtractor**, **AVImageGenerator**, or **AVTranscoder** instance. * Competition occurs when multiple AVTranscoders use the same resource handle to read and write files * at the same time, resulting in errors in obtaining data. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - fdDst: number; + fdDst: int; /** * Sets video transcoding parameters. This API uses a promise to return the result. @@ -9718,7 +10733,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. Return by promise. * @throws { BusinessError } 5400106 - Unsupported format. Returned by promise. * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ prepare(config: AVTranscoderConfig): Promise; @@ -9731,7 +10747,8 @@ declare namespace media { * @throws { BusinessError } 5400103 - IO error. Return by promise. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(): Promise; @@ -9745,7 +10762,8 @@ declare namespace media { * @throws { BusinessError } 5400103 - IO error. Return by promise. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ pause(): Promise; @@ -9758,7 +10776,8 @@ declare namespace media { * @throws { BusinessError } 5400103 - IO error. Return by promise. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ resume(): Promise; @@ -9771,7 +10790,8 @@ declare namespace media { * @throws { BusinessError } 5400103 - IO error. Return by promise. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ cancel(): Promise; @@ -9783,7 +10803,8 @@ declare namespace media { * @throws { BusinessError } 5400102 - Operation not allowed. Return by promise. * @throws { BusinessError } 5400105 - Service died. Return by promise. * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ release(): Promise; @@ -9799,7 +10820,8 @@ declare namespace media { * @param { Callback } callback - Callback that has been registered to listen for * transcoding completion events. * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type:'complete', callback: Callback):void; @@ -9822,7 +10844,8 @@ declare namespace media { * @throws { BusinessError } 5400105 - Service died. * @throws { BusinessError } 5400106 - Unsupported format. * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ on(type:'error', callback: ErrorCallback):void; @@ -9831,12 +10854,13 @@ declare namespace media { * event. When the application initiates multiple subscriptions to this event, the last subscription is applied. * @param { 'progressUpdate' } type - Event type, which is **'progressUpdate'** in this case. * This event is triggered by the system during transcoding. - * @param { Callback } callback - Callback invoked when the event is triggered. + * @param { Callback } callback - Callback invoked when the event is triggered. * **progress** is a number that indicates the current transcoding progress. * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type:'progressUpdate', callback: Callback):void; + on(type:'progressUpdate', callback: Callback):void; /** * Unsubscribes from the event indicating that transcoding is complete. @@ -9845,7 +10869,8 @@ declare namespace media { * @param { Callback } callback - Callback that has been registered to listen for * transcoding completion events. * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type:'complete', callback?: Callback):void; @@ -9857,7 +10882,8 @@ declare namespace media { * This event is triggered when an error occurs during transcoding. * @param { ErrorCallback } callback - Callback that has been registered to listen for AVTranscoder errors. * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ off(type:'error', callback?: ErrorCallback):void; @@ -9865,13 +10891,14 @@ declare namespace media { * Unsubscribes from transcoding progress updates. * @param { 'progressUpdate' } type - Event type, which is **'progressUpdate'** in this case. * This event can be triggered by both user operations and the system. - * @param { Callback } callback - Called that has been registered to listen for progress updates. + * @param { Callback } callback - Called that has been registered to listen for progress updates. * You are advised to use the default value because only the last registered callback is retained in the current * callback mechanism. * @syscap SystemCapability.Multimedia.Media.AVTranscoder - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type:'progressUpdate', callback?: Callback):void; + off(type:'progressUpdate', callback?: Callback):void; } /** @@ -9880,21 +10907,24 @@ declare namespace media { * @enum { number } * @syscap SystemCapability.Multimedia.Media.AVScreenCapture * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ enum ScreenCaptureEvent { /** * The system screen recorder starts screen capture. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SCREENCAPTURE_STARTED = 0, /** * The system screen recorder stops screen capture. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ SCREENCAPTURE_STOPPED = 1 } @@ -9906,7 +10936,8 @@ declare namespace media { * @typedef ScreenCaptureMonitor * @syscap SystemCapability.Multimedia.Media.AVScreenCapture * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ interface ScreenCaptureMonitor { /** @@ -9919,13 +10950,14 @@ declare namespace media { * @throws { BusinessError } 202 - Not System App. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} * @example * // This event is reported when the state of the system screen recorder changes. * screenCaptureMonitor.on('systemScreenRecorder', (event: media.ScreenCaptureEvent) => { * // Set the 'systemScreenRecorder' event callback. * console.info(`system ScreenRecorder event: ${event}`); * }) + * @arkts 1.1&1.2 */ on(type: 'systemScreenRecorder', callback: Callback): void; @@ -9938,9 +10970,10 @@ declare namespace media { * @throws { BusinessError } 202 - Not System App. * @syscap SystemCapability.Multimedia.Media.AVScreenCapture * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} * @example * screenCaptureMonitor.off('systemScreenRecorder'); + * @arkts 1.1&1.2 */ off(type: 'systemScreenRecorder', callback?: Callback): void; @@ -9950,7 +10983,8 @@ declare namespace media { * @readonly * @syscap SystemCapability.Multimedia.Media.AVScreenCapture * @systemapi - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ readonly isSystemScreenRecorderWorking: boolean; } diff --git a/api/@ohos.multimedia.systemSoundManager.d.ts b/api/@ohos.multimedia.systemSoundManager.d.ts index 41c9160030792bde124392f3f1716bf7ddbfa18b..0400948d77c34a95137bf77263c8a26efaa96ce1 100644 --- a/api/@ohos.multimedia.systemSoundManager.d.ts +++ b/api/@ohos.multimedia.systemSoundManager.d.ts @@ -32,7 +32,8 @@ import type { SystemToneOptions as _SystemToneOptions } from './multimedia/syste * @namespace systemSoundManager * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace systemSoundManager { @@ -111,10 +112,11 @@ declare namespace systemSoundManager { /** * Enum for ringtone type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ enum RingtoneType { /** @@ -131,7 +133,8 @@ declare namespace systemSoundManager { * Ringtone type for sim card 0. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RINGTONE_TYPE_SIM_CARD_0 = 0, @@ -149,24 +152,27 @@ declare namespace systemSoundManager { * Ringtone type for sim card 1. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RINGTONE_TYPE_SIM_CARD_1 = 1, } /** * Enum for system tone type. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ enum SystemToneType { /** * System tone type for sim card 0. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SYSTEM_TONE_TYPE_SIM_CARD_0 = 0, @@ -174,7 +180,8 @@ declare namespace systemSoundManager { * System tone type for sim card 1. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SYSTEM_TONE_TYPE_SIM_CARD_1 = 1, @@ -182,31 +189,35 @@ declare namespace systemSoundManager { * System tone type notification. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SYSTEM_TONE_TYPE_NOTIFICATION = 32, } /** * Enum for tone customized type. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum ToneCustomizedType { /** * Pre-installed tone type. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PRE_INSTALLED = 0, /** * Customized tone type. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ CUSTOMIZED = 1, } @@ -240,33 +251,37 @@ declare namespace systemSoundManager { * Define the ringtone category. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - const TONE_CATEGORY_RINGTONE: number; + const TONE_CATEGORY_RINGTONE: long; /** * Define the text message tone category. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - const TONE_CATEGORY_TEXT_MESSAGE:number; + const TONE_CATEGORY_TEXT_MESSAGE: long; /** * Define the notification tone category. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - const TONE_CATEGORY_NOTIFICATION:number; + const TONE_CATEGORY_NOTIFICATION: long; /** * Define the alarm tone category. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - const TONE_CATEGORY_ALARM:number; + const TONE_CATEGORY_ALARM: long; /** * Define the contact tone category. @@ -282,7 +297,8 @@ declare namespace systemSoundManager { * @typedef ToneAttrs * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ interface ToneAttrs { /** @@ -291,7 +307,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 202 - Caller is not a system application. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getTitle(): string; @@ -304,7 +321,8 @@ declare namespace systemSoundManager { * 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setTitle(title: string): void; @@ -314,7 +332,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 202 - Caller is not a system application. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getFileName(): string; @@ -327,7 +346,8 @@ declare namespace systemSoundManager { * 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setFileName(name: string): void; @@ -337,7 +357,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 202 - Caller is not a system application. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getUri(): string; @@ -347,13 +368,14 @@ declare namespace systemSoundManager { * @throws { BusinessError } 202 - Caller is not a system application. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getCustomizedType(): ToneCustomizedType; /** * Sets tone category. - * @param { number } category - tone category. This parameter can be one of {@link TONE_CATEGORY_RINGTONE}, + * @param { long } category - tone category. This parameter can be one of {@link TONE_CATEGORY_RINGTONE}, * {@link TONE_CATEGORY_TEXT_MESSAGE}, {@link TONE_CATEGORY_NOTIFICATION}, {@link TONE_CATEGORY_ALARM}. * In addition, this parameter can be result of OR logical operator of these constants. * @throws { BusinessError } 202 - Caller is not a system application. @@ -362,21 +384,23 @@ declare namespace systemSoundManager { * 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - setCategory(category: number): void; + setCategory(category: long): void; /** * Gets tone category. - * @returns { number } Tone category. This value can be one of {@link TONE_CATEGORY_RINGTONE}, + * @returns { long } Tone category. This value can be one of {@link TONE_CATEGORY_RINGTONE}, * {@link TONE_CATEGORY_TEXT_MESSAGE}, {@link TONE_CATEGORY_NOTIFICATION}, {@link TONE_CATEGORY_ALARM}. * In addition, this value can be result of OR logical operator of these constants. * @throws { BusinessError } 202 - Caller is not a system application. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - getCategory(): number; + getCategory(): long; /** * Sets media type. @@ -406,7 +430,8 @@ declare namespace systemSoundManager { * @typedef {Array} ToneAttrsArray * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type ToneAttrsArray = Array; @@ -416,47 +441,53 @@ declare namespace systemSoundManager { * @throws { BusinessError } 202 - Caller is not a system application. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createCustomizedToneAttrs(): ToneAttrs; /** * Definition of haptics feature in tone scenario. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enum ToneHapticsFeature { /** * Standard haptics feature. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ STANDARD = 0, /** * Gentle haptics feature. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ GENTLE = 1, } /** * Enum for haptics in tone scenario. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enum ToneHapticsType { /** * Haptics in incoming call scenario for sim card 0. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CALL_SIM_CARD_0 = 0, @@ -464,7 +495,8 @@ declare namespace systemSoundManager { * Haptics in incoming call scenario for sim card 1. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ CALL_SIM_CARD_1 = 1, @@ -472,7 +504,8 @@ declare namespace systemSoundManager { * Haptics in text message scenario for sim card 0. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_MESSAGE_SIM_CARD_0 = 20, @@ -480,7 +513,8 @@ declare namespace systemSoundManager { * Haptics in text message scenario for sim card 1. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ TEXT_MESSAGE_SIM_CARD_1 = 21, @@ -488,31 +522,35 @@ declare namespace systemSoundManager { * Haptics in notification scenario. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ NOTIFICATION = 40, } /** * Enum for haptics mode in tone scenario. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ enum ToneHapticsMode { /** * None haptics mode. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, /** * Haptics is synchronized with tone. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ SYNC = 1, @@ -520,7 +558,8 @@ declare namespace systemSoundManager { * Haptics is out of synchronize with tone. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ NON_SYNC = 2, } @@ -529,7 +568,8 @@ declare namespace systemSoundManager { * @typedef ToneHapticsSettings * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface ToneHapticsSettings { /** @@ -537,7 +577,8 @@ declare namespace systemSoundManager { * @type { ToneHapticsMode } * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ mode: ToneHapticsMode; /** @@ -546,7 +587,8 @@ declare namespace systemSoundManager { * @type { ?string } * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ hapticsUri?: string; } @@ -556,7 +598,8 @@ declare namespace systemSoundManager { * @typedef ToneHapticsAttrs * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ interface ToneHapticsAttrs { /** @@ -565,7 +608,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 202 - Caller is not a system application. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getUri(): string; @@ -575,7 +619,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 202 - Caller is not a system application. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getTitle(): string; @@ -585,7 +630,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 202 - Caller is not a system application. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getFileName(): string; } @@ -596,7 +642,8 @@ declare namespace systemSoundManager { * @typedef { Array } ToneHapticsAttrsArray * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ type ToneHapticsAttrsArray = Array; @@ -606,7 +653,8 @@ declare namespace systemSoundManager { * @returns { SystemSoundManager } SystemSoundManager instance. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function getSystemSoundManager(): SystemSoundManager; @@ -615,7 +663,8 @@ declare namespace systemSoundManager { * @typedef SystemSoundManager * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface SystemSoundManager { /** @@ -659,7 +708,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 5400103 - I/O error. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setRingtoneUri(context: BaseContext, uri: string, type: RingtoneType): Promise; @@ -701,7 +751,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 5400103 - I/O error. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getRingtoneUri(context: BaseContext, type: RingtoneType): Promise; @@ -729,7 +780,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 5400103 - I/O error. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getDefaultRingtoneAttrs(context: BaseContext, type: RingtoneType): Promise; @@ -745,7 +797,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 5400103 - I/O error. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getRingtoneAttrList(context: BaseContext, type: RingtoneType): Promise; @@ -786,7 +839,8 @@ declare namespace systemSoundManager { * 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getRingtonePlayer(context: BaseContext, type: RingtoneType): Promise; @@ -803,7 +857,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 5400103 - I/O error. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ setSystemToneUri(context: BaseContext, uri: string, type: SystemToneType): Promise; @@ -819,7 +874,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 5400103 - I/O error. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getSystemToneUri(context: BaseContext, type: SystemToneType): Promise; @@ -836,7 +892,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 5400103 - I/O error. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getDefaultSystemToneAttrs(context: BaseContext, type: SystemToneType): Promise; @@ -852,7 +909,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 5400103 - I/O error. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getSystemToneAttrList(context: BaseContext, type: SystemToneType): Promise; @@ -867,7 +925,8 @@ declare namespace systemSoundManager { * 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getSystemTonePlayer(context: BaseContext, type: SystemToneType): Promise; @@ -883,7 +942,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 5400103 - I/O error. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getDefaultAlarmToneAttrs(context: BaseContext): Promise; @@ -901,7 +961,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 20700001 - Tone type mismatch, e.g. tone of input uri is not an alarm tone. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ setAlarmToneUri(context: BaseContext, uri: string): Promise; @@ -917,7 +978,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 5400103 - I/O error. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAlarmToneUri(context: BaseContext): Promise; @@ -932,7 +994,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 5400103 - I/O error. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getAlarmToneAttrList(context: BaseContext): Promise; @@ -940,7 +1003,7 @@ declare namespace systemSoundManager { * Open alarm tone file. * @param { BaseContext } context - Current application context. * @param { string } uri - Uri of alarm tone to open. - * @returns { Promise } Promise used to return fd. + * @returns { Promise } Promise used to return fd. * @throws { BusinessError } 202 - Caller is not a system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; @@ -949,9 +1012,10 @@ declare namespace systemSoundManager { * @throws { BusinessError } 20700001 - Tone type mismatch, e.g. tone of uri is notification instead of alarm. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - openAlarmTone(context: BaseContext, uri: string): Promise; + openAlarmTone(context: BaseContext, uri: string): Promise; /** * Open tone list in batch. @@ -969,7 +1033,7 @@ declare namespace systemSoundManager { /** * Close fd. - * @param { number } fd - File descriptor to close. + * @param { int } fd - File descriptor to close. * @returns { Promise } Promise used to return the result of close fd. * @throws { BusinessError } 202 - Caller is not a system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: @@ -978,9 +1042,10 @@ declare namespace systemSoundManager { * @throws { BusinessError } 5400103 - I/O error. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - close(fd: number): Promise; + close(fd: int): Promise; /** * Add customized tone into ringtone library. @@ -1020,6 +1085,7 @@ declare namespace systemSoundManager { * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ addCustomizedTone(context: BaseContext, toneAttr: ToneAttrs, externalUri: string): Promise; @@ -1028,10 +1094,10 @@ declare namespace systemSoundManager { * @permission ohos.permission.WRITE_RINGTONE * @param { BaseContext } context - Current application context. * @param { ToneAttrs } toneAttr - Tone attributes created by {@link createCustomizedToneAttrs}. - * @param { number } fd - File descriptor. - * @param { number } [offset] - The offset in the file where the data to be read, in bytes. By default, the offset + * @param { int } fd - File descriptor. + * @param { long } [offset] - The offset in the file where the data to be read, in bytes. By default, the offset * is zero. - * @param { number } [length] - The length in bytes of the data to be read. By default, the length is the rest of + * @param { long } [length] - The length in bytes of the data to be read. By default, the length is the rest of * bytes in the file from the offset. * @returns { Promise } Tone uri after adding into ringtone library. * @throws { BusinessError } 201 - Permission denied. @@ -1050,10 +1116,10 @@ declare namespace systemSoundManager { * @permission ohos.permission.WRITE_RINGTONE * @param { BaseContext } context - Current application context. * @param { ToneAttrs } toneAttr - Tone attributes created by {@link createCustomizedToneAttrs}. - * @param { number } fd - File descriptor. - * @param { number } [offset] - The offset in the file where the data to be read, in bytes. By default, the offset + * @param { int } fd - File descriptor. + * @param { long } [offset] - The offset in the file where the data to be read, in bytes. By default, the offset * is zero. - * @param { number } [length] - The length in bytes of the data to be read. By default, the length is the rest of + * @param { long } [length] - The length in bytes of the data to be read. By default, the length is the rest of * bytes in the file from the offset. * @returns { Promise } Tone uri after adding into ringtone library. * @throws { BusinessError } 201 - Permission denied. @@ -1069,8 +1135,9 @@ declare namespace systemSoundManager { * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - addCustomizedTone(context: BaseContext, toneAttr: ToneAttrs, fd: number, offset?: number, length?: number) + addCustomizedTone(context: BaseContext, toneAttr: ToneAttrs, fd: int, offset?: long, length?: long) : Promise; /** @@ -1088,7 +1155,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 5400103 - I/O error. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ removeCustomizedTone(context: BaseContext, uri:string): Promise; @@ -1120,7 +1188,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 20700003 - Unsupported operation. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getToneHapticsSettings(context: BaseContext, type: ToneHapticsType): Promise; @@ -1139,7 +1208,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 20700003 - Unsupported operation. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ setToneHapticsSettings(context: BaseContext, type: ToneHapticsType, settings: ToneHapticsSettings): Promise; @@ -1156,7 +1226,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 20700003 - Unsupported operation. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getToneHapticsList(context: BaseContext, isSynced: boolean): Promise; @@ -1175,7 +1246,8 @@ declare namespace systemSoundManager { * @throws { BusinessError } 20700003 - Unsupported operation. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getHapticsAttrsSyncedWithTone(context: BaseContext, toneUri: string): Promise; @@ -1183,7 +1255,7 @@ declare namespace systemSoundManager { * Open haptics. * @param { BaseContext } context - Current application context. * @param { string } hapticsUri - Uri of haptics to open. - * @returns { Promise } Promise used to return fd. + * @returns { Promise } Promise used to return fd. * @throws { BusinessError } 202 - Caller is not a system application. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1.Mandatory parameters are left unspecified; @@ -1193,9 +1265,10 @@ declare namespace systemSoundManager { * @throws { BusinessError } 20700003 - Unsupported operation. * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ - openToneHaptics(context: BaseContext, hapticsUri: string): Promise; + openToneHaptics(context: BaseContext, hapticsUri: string): Promise; } /** @@ -1203,7 +1276,8 @@ declare namespace systemSoundManager { * @typedef { _RingtonePlayer } RingtonePlayer * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ type RingtonePlayer = _RingtonePlayer; @@ -1212,7 +1286,8 @@ declare namespace systemSoundManager { * @typedef { _SystemTonePlayer } SystemTonePlayer * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type SystemTonePlayer = _SystemTonePlayer; @@ -1221,7 +1296,8 @@ declare namespace systemSoundManager { * @typedef { _RingtoneOptions } RingtoneOptions * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ type RingtoneOptions = _RingtoneOptions; @@ -1230,7 +1306,8 @@ declare namespace systemSoundManager { * @typedef { _SystemToneOptions } SystemToneOptions * @syscap SystemCapability.Multimedia.SystemSound.Core * @systemapi - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type SystemToneOptions = _SystemToneOptions; } diff --git a/api/@ohos.multimodalInput.gestureEvent.d.ts b/api/@ohos.multimodalInput.gestureEvent.d.ts index 211ba308a611eb2c17d684c7d62d3771f5203872..0a808974643497364568581cf5902d8ee8f86379 100644 --- a/api/@ohos.multimodalInput.gestureEvent.d.ts +++ b/api/@ohos.multimodalInput.gestureEvent.d.ts @@ -18,29 +18,34 @@ * @kit InputKit */ +import { Touch } from './@ohos.multimodalInput.touchEvent'; + /** * Pinch event on touchPad * * @interface Pinch * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface Pinch { /** * Action type * @type { ActionType } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ type: ActionType; /** * scale - * @type { number } + * @type { double } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - scale: number; + scale: double; } /** @@ -48,7 +53,8 @@ export declare interface Pinch { * * @interface Rotate * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface Rotate { /** @@ -56,18 +62,20 @@ export declare interface Rotate { * * @type { ActionType } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ type: ActionType; /** * Rotate angle * - * @type { number } + * @type { double } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - angle: number; + angle: double; } /** @@ -75,32 +83,36 @@ export declare interface Rotate { * * @interface ThreeFingersSwipe * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface ThreeFingersSwipe { /** * Action type * @type { ActionType } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ type: ActionType; /** * Coordinate x - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - x: number; + x: int; /** * Coordinate y - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - y: number; + y: int; } /** @@ -108,32 +120,36 @@ export declare interface ThreeFingersSwipe { * * @interface FourFingersSwipe * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface FourFingersSwipe { /** * Action type * @type { ActionType } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ type: ActionType; /** * Coordinate x - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - x: number; + x: int; /** * Coordinate y - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - y: number; + y: int; } /** @@ -142,7 +158,8 @@ export declare interface FourFingersSwipe { * @interface SwipeInward * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface SwipeInward { /** @@ -150,27 +167,30 @@ export declare interface SwipeInward { * @type { ActionType } * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ type: ActionType; /** * Coordinate x - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - x: number; + x: int; /** * Coordinate y - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - y: number; + y: int; } /** @@ -178,7 +198,8 @@ export declare interface SwipeInward { * * @interface ThreeFingersTap * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface ThreeFingersTap { /** @@ -186,7 +207,8 @@ export declare interface ThreeFingersTap { * * @type { ActionType } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ type: ActionType; } @@ -197,7 +219,8 @@ export declare interface ThreeFingersTap { * @interface TouchGestureEvent * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface TouchGestureEvent { /** @@ -206,7 +229,8 @@ export declare interface TouchGestureEvent { * @type { TouchGestureAction } * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ action: TouchGestureAction; /** @@ -215,7 +239,8 @@ export declare interface TouchGestureEvent { * @type { Touch[] } * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ touches: Touch[]; } @@ -226,7 +251,8 @@ export declare interface TouchGestureEvent { * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum TouchGestureAction { /** @@ -234,7 +260,8 @@ export declare enum TouchGestureAction { * * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ SWIPE_DOWN = 0, /** @@ -242,7 +269,8 @@ export declare enum TouchGestureAction { * * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ SWIPE_UP, /** @@ -250,7 +278,8 @@ export declare enum TouchGestureAction { * * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ SWIPE_LEFT, /** @@ -258,7 +287,8 @@ export declare enum TouchGestureAction { * * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ SWIPE_RIGHT, /** @@ -266,7 +296,8 @@ export declare enum TouchGestureAction { * * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ PINCH_CLOSED, /** @@ -274,7 +305,8 @@ export declare enum TouchGestureAction { * * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ PINCH_OPENED, /** @@ -282,7 +314,8 @@ export declare enum TouchGestureAction { * * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi hide for inner use - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ GESTURE_END } @@ -292,14 +325,16 @@ export declare enum TouchGestureAction { * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum ActionType { /** * Cancel of the gesture * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ CANCEL = 0, @@ -307,7 +342,8 @@ export declare enum ActionType { * Begin of the gesture * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ BEGIN = 1, @@ -315,7 +351,8 @@ export declare enum ActionType { * Update of the gesture * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ UPDATE = 2, @@ -323,7 +360,8 @@ export declare enum ActionType { * End of the gesture * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ END = 3 } \ No newline at end of file diff --git a/api/@ohos.multimodalInput.inputConsumer.d.ts b/api/@ohos.multimodalInput.inputConsumer.d.ts index 7e0056bf4ef4a8345ab064f74e6fd7f65804062a..9b23e5c4fc2e7588a8f575c7494dea5ef2f2cc16 100644 --- a/api/@ohos.multimodalInput.inputConsumer.d.ts +++ b/api/@ohos.multimodalInput.inputConsumer.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,13 +18,8 @@ * @kit InputKit */ -/*** if arkts 1.1 */ import { Callback } from './@ohos.base'; import { KeyEvent } from './@ohos.multimodalInput.keyEvent'; -/*** endif */ -/*** if arkts 1.2 */ -import { Callback } from './@ohos.base'; -/*** endif */ /** * The inputConsumer module provides APIs for subscribing to and unsubscribing from global shortcut keys. @@ -50,25 +45,25 @@ declare namespace inputConsumer { * There is no requirement on the sequence of the keys. * For example, in the combination keys Ctrl+Alt+A, Ctrl+Alt are called preceding keys. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @systemapi hide for inner use * @since arkts {'1.1':'8', '1.2':'20'} * @arkts 1.1&1.2 */ - preKeys: Array; + preKeys: Array; /** * Final key. This parameter is mandatory. A callback is triggered by the final key. * For example, in the combination keys Ctrl+Alt+A, A is called the final key. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @systemapi hide for inner use * @since arkts {'1.1':'8', '1.2':'20'} * @arkts 1.1&1.2 */ - finalKey: number; + finalKey: int; /** * Whether the final key is pressed. @@ -89,13 +84,13 @@ declare namespace inputConsumer { * a callback is triggered when the key keeps being pressed after the specified duration expires. * If isFinalKeyDown is false, a callback is triggered when the key is released before the specified duration expires. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputConsumer * @systemapi hide for inner use * @since arkts {'1.1':'8', '1.2':'20'} * @arkts 1.1&1.2 */ - finalKeyDownDuration: number; + finalKeyDownDuration: int; /** * Whether to report repeated key events. The value true means to report repeated key events, and the value false means the opposite. @@ -115,7 +110,8 @@ declare namespace inputConsumer { * * @typedef HotkeyOptions * @syscap SystemCapability.MultimodalInput.Input.InputConsumer - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ interface HotkeyOptions { /** @@ -123,21 +119,23 @@ declare namespace inputConsumer { * There is no requirement on the sequence of modifier keys. * For example, in Ctrl+Shift+Esc, Ctrl and Shift are modifier keys. * - * @type { Array } + * @type { Array } * @syscap SystemCapability.MultimodalInput.Input.InputConsumer - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - preKeys: Array; + preKeys: Array; /** * Modified key, which can be any key except the modifier keys and Meta key. For details about the keys, see Keycode. * For example, in Ctrl+Shift+Esc, Esc is the modified key. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputConsumer - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ - finalKey: number; + finalKey: int; /** * Whether to report repeated key events. The value true means to report repeated key events, and the value false means the opposite. @@ -145,7 +143,8 @@ declare namespace inputConsumer { * * @type { ?boolean } * @syscap SystemCapability.MultimodalInput.Input.InputConsumer - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ isRepeat?: boolean; } @@ -155,33 +154,37 @@ declare namespace inputConsumer { * * @typedef KeyPressedConfig * @syscap SystemCapability.MultimodalInput.Input.InputConsumer - * @since 16 + * @since arkts {'1.1':'16', '1.2':'20'} + * @arkts 1.1&1.2 */ interface KeyPressedConfig { /** * Key value. Currently, only the KEYCODE_VOLUME_UP and KEYCODE_VOLUME_DOWN keys are supported. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputConsumer - * @since 16 + * @since arkts {'1.1':'16', '1.2':'20'} + * @arkts 1.1&1.2 */ - key: number; + key: int; /** * Key event type. Currently, this parameter can only be set to 1, indicating key press. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputConsumer - * @since 16 + * @since arkts {'1.1':'16', '1.2':'20'} + * @arkts 1.1&1.2 */ - action: number; + action: int; /** * The value true means to report repeated key events, and the value false means the opposite. The default value is true. * * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.InputConsumer - * @since 16 + * @since arkts {'1.1':'16', '1.2':'20'} + * @arkts 1.1&1.2 */ isRepeat: boolean; } @@ -323,7 +326,8 @@ declare namespace inputConsumer { * @throws { BusinessError } 4200002 - The hotkey has been used by the system. * @throws { BusinessError } 4200003 - The hotkey has been subscribed to by another. * @syscap SystemCapability.MultimodalInput.Input.InputConsumer - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'hotkeyChange', hotkeyOptions: HotkeyOptions, callback: Callback): void; @@ -338,7 +342,8 @@ declare namespace inputConsumer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.MultimodalInput.Input.InputConsumer - * @since 14 + * @since arkts {'1.1':'14', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'hotkeyChange', hotkeyOptions: HotkeyOptions, callback?: Callback): void; @@ -353,7 +358,8 @@ declare namespace inputConsumer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.MultimodalInput.Input.InputConsumer - * @since 16 + * @since arkts {'1.1':'16', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'keyPressed', options: KeyPressedConfig, callback: Callback): void; @@ -368,7 +374,8 @@ declare namespace inputConsumer { *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.MultimodalInput.Input.InputConsumer - * @since 16 + * @since arkts {'1.1':'16', '1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'keyPressed', callback?: Callback): void; } diff --git a/api/@ohos.multimodalInput.inputDevice.d.ts b/api/@ohos.multimodalInput.inputDevice.d.ts index 1bec2bddfbe3c075471e6a93a418eec468c4076d..c93165c80edf91f152cc0edc001424034191a5a5 100644 --- a/api/@ohos.multimodalInput.inputDevice.d.ts +++ b/api/@ohos.multimodalInput.inputDevice.d.ts @@ -80,14 +80,16 @@ declare namespace inputDevice { * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ enum KeyboardType { /** * Keyboard without keys. * * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -95,7 +97,8 @@ declare namespace inputDevice { * Keyboard with unknown keys. * * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = 1, @@ -103,7 +106,8 @@ declare namespace inputDevice { * Full keyboard. * * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ALPHABETIC_KEYBOARD = 2, @@ -111,7 +115,8 @@ declare namespace inputDevice { * Keypad. * * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DIGITAL_KEYBOARD = 3, @@ -119,7 +124,8 @@ declare namespace inputDevice { * Stylus. * * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ HANDWRITING_PEN = 4, @@ -127,7 +133,8 @@ declare namespace inputDevice { * Remote control. * * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ REMOTE_CONTROL = 5 } @@ -137,14 +144,16 @@ declare namespace inputDevice { * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ enum FunctionKey { /** * CapsLock key. This key can be enabled or disabled only for the input keyboard extension. * * @syscap SystemCapability.MultimodalInput.Input.InputDevice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ CAPS_LOCK = 1 } @@ -172,12 +181,12 @@ declare namespace inputDevice { * Unique ID of the input device. * If a physical device is repeatedly reinstalled or restarted, its ID may change. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - deviceId: number; + deviceId: int; } /** @@ -240,52 +249,52 @@ declare namespace inputDevice { /** * Maximum value of the axis. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since arkts {'1.1':'8', '1.2':'20'} * @arkts 1.1&1.2 */ - max: number; + max: int; /** * Minimum value of the axis. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since arkts {'1.1':'8', '1.2':'20'} * @arkts 1.1&1.2 */ - min: number; + min: int; /** * Fuzzy value of the axis. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - fuzz: number; + fuzz: int; /** * Benchmark value of the axis. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - flat: number; + flat: int; /** * Resolution of the axis. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - resolution: number; + resolution: int; } /** @@ -301,12 +310,12 @@ declare namespace inputDevice { * Unique ID of the input device. * If the same physical device is repeatedly reinstalled or restarted, its ID may change. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since arkts {'1.1':'8', '1.2':'20'} * @arkts 1.1&1.2 */ - id: number; + id: int; /** * Name of the input device. @@ -343,42 +352,42 @@ declare namespace inputDevice { /** * Bus type of the input device. By default, the bus type reported by the input device prevails. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - bus: number; + bus: int; /** * Product information of the input device. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - product: number; + product: int; /** * Vendor information of the input device. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - vendor: number; + vendor: int; /** * Version information of the input device. * - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.InputDevice * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - version: number; + version: int; /** * Physical address of the input device. diff --git a/api/@ohos.multimodalInput.inputEvent.d.ts b/api/@ohos.multimodalInput.inputEvent.d.ts index 65053adb01d293c363d78942fc6601f6b5d864cb..784ef1f92036cdcc044dcee6ed1893ad04c171db 100644 --- a/api/@ohos.multimodalInput.inputEvent.d.ts +++ b/api/@ohos.multimodalInput.inputEvent.d.ts @@ -31,7 +31,8 @@ * @typedef InputEvent * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface InputEvent { /** @@ -42,12 +43,13 @@ export declare interface InputEvent { */ /** * Unique event ID generated by the server - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - id: number; + id: int; /** * ID of the device that reports the input event @@ -57,12 +59,13 @@ export declare interface InputEvent { */ /** * ID of the device that reports the input event - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - deviceId: number; + deviceId: int; /** * Occurrence time of the input event @@ -72,12 +75,13 @@ export declare interface InputEvent { */ /** * Occurrence time of the input event - * @type { number } + * @type { long } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - actionTime: number; + actionTime: long; /** * ID of the target screen @@ -87,12 +91,13 @@ export declare interface InputEvent { */ /** * ID of the target screen - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - screenId: number; + screenId: int; /** * ID of the target window @@ -102,10 +107,11 @@ export declare interface InputEvent { */ /** * ID of the target window - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - windowId: number; + windowId: int; } \ No newline at end of file diff --git a/api/@ohos.multimodalInput.inputEventClient.d.ts b/api/@ohos.multimodalInput.inputEventClient.d.ts index 150b64d5026bf97d90fb31517052a95515462f8f..4de04bf730e93f10af8123b9083913be3053f80b 100644 --- a/api/@ohos.multimodalInput.inputEventClient.d.ts +++ b/api/@ohos.multimodalInput.inputEventClient.d.ts @@ -103,7 +103,8 @@ declare namespace inputEventClient { * @interface TouchEventData * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ interface TouchEventData { /** @@ -112,7 +113,8 @@ declare namespace inputEventClient { * @type { TouchEvent } * @syscap SystemCapability.MultimodalInput.Input.InputSimulator * @systemapi hide for inner use - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ touchEvent: TouchEvent; } diff --git a/api/@ohos.multimodalInput.inputMonitor.d.ts b/api/@ohos.multimodalInput.inputMonitor.d.ts index d60713c3dc9e7fcb2bf859b5111745c5d53207b1..fd289b6f5fc55d16a7ab0ed38e6f0dbd73524c57 100644 --- a/api/@ohos.multimodalInput.inputMonitor.d.ts +++ b/api/@ohos.multimodalInput.inputMonitor.d.ts @@ -44,7 +44,8 @@ declare namespace inputMonitor { * @interface TouchEventReceiver * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ interface TouchEventReceiver { /** @@ -55,7 +56,8 @@ declare namespace inputMonitor { * The value true indicates that the touch event will be dispatched to the window, and the value false indicates the opposite. * @syscap SystemCapability.MultimodalInput.Input.InputMonitor * @systemapi hide for inner use - * @since 7 + * @since arkts {'1.1':'7', '1.2':'20'} + * @arkts 1.1&1.2 */ (touchEvent: TouchEvent): Boolean; } 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..633f1fa9f730cde63366df7bf93be4f5744e07cd 100644 --- a/api/@ohos.multimodalInput.keyCode.d.ts +++ b/api/@ohos.multimodalInput.keyCode.d.ts @@ -31,14 +31,16 @@ * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum KeyCode { /** * KEYCODE_FN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_FN = 0, @@ -46,7 +48,8 @@ export declare enum KeyCode { * KEYCODE_UNKNOWN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_UNKNOWN = -1, @@ -54,7 +57,8 @@ export declare enum KeyCode { * KEYCODE_HOME * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_HOME = 1, @@ -62,7 +66,8 @@ export declare enum KeyCode { * KEYCODE_BACK * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BACK = 2, @@ -78,7 +83,8 @@ export declare enum KeyCode { * KEYCODE_SEARCH * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 13 + * @since arkts {'1.1':'13', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SEARCH = 9, @@ -93,7 +99,8 @@ export declare enum KeyCode { * * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MEDIA_PLAY_PAUSE = 10, @@ -108,7 +115,8 @@ export declare enum KeyCode { * * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MEDIA_STOP = 11, @@ -123,7 +131,8 @@ export declare enum KeyCode { * * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MEDIA_NEXT = 12, @@ -138,7 +147,8 @@ export declare enum KeyCode { * * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MEDIA_PREVIOUS = 13, @@ -153,7 +163,8 @@ export declare enum KeyCode { * * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MEDIA_REWIND = 14, @@ -168,7 +179,8 @@ export declare enum KeyCode { * * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MEDIA_FAST_FORWARD = 15, @@ -176,7 +188,8 @@ export declare enum KeyCode { * KEYCODE_VOLUME_UP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_VOLUME_UP = 16, @@ -184,7 +197,8 @@ export declare enum KeyCode { * KEYCODE_VOLUME_DOWN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_VOLUME_DOWN = 17, @@ -192,7 +206,8 @@ export declare enum KeyCode { * KEYCODE_POWER * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_POWER = 18, @@ -200,7 +215,8 @@ export declare enum KeyCode { * KEYCODE_CAMERA * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CAMERA = 19, @@ -208,7 +224,8 @@ export declare enum KeyCode { * KEYCODE_VOLUME_MUTE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_VOLUME_MUTE = 22, @@ -216,7 +233,8 @@ export declare enum KeyCode { * KEYCODE_MUTE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MUTE = 23, @@ -224,7 +242,8 @@ export declare enum KeyCode { * KEYCODE_BRIGHTNESS_UP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BRIGHTNESS_UP = 40, @@ -232,7 +251,8 @@ export declare enum KeyCode { * KEYCODE_BRIGHTNESS_DOWN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BRIGHTNESS_DOWN = 41, @@ -240,7 +260,8 @@ export declare enum KeyCode { * KEYCODE_0 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_0 = 2000, @@ -248,7 +269,8 @@ export declare enum KeyCode { * KEYCODE_1 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_1 = 2001, @@ -256,7 +278,8 @@ export declare enum KeyCode { * KEYCODE_2 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_2 = 2002, @@ -264,7 +287,8 @@ export declare enum KeyCode { * KEYCODE_3 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_3 = 2003, @@ -272,7 +296,8 @@ export declare enum KeyCode { * KEYCODE_4 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_4 = 2004, @@ -280,7 +305,8 @@ export declare enum KeyCode { * KEYCODE_5 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_5 = 2005, @@ -288,7 +314,8 @@ export declare enum KeyCode { * KEYCODE_6 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_6 = 2006, @@ -296,7 +323,8 @@ export declare enum KeyCode { * KEYCODE_7 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_7 = 2007, @@ -304,7 +332,8 @@ export declare enum KeyCode { * KEYCODE_8 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_8 = 2008, @@ -312,7 +341,8 @@ export declare enum KeyCode { * KEYCODE_9 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_9 = 2009, @@ -320,7 +350,8 @@ export declare enum KeyCode { * KEYCODE_STAR * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_STAR = 2010, @@ -328,7 +359,8 @@ export declare enum KeyCode { * KEYCODE_POUND * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_POUND = 2011, @@ -336,7 +368,8 @@ export declare enum KeyCode { * KEYCODE_DPAD_UP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DPAD_UP = 2012, @@ -344,7 +377,8 @@ export declare enum KeyCode { * KEYCODE_DPAD_DOWN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DPAD_DOWN = 2013, @@ -352,7 +386,8 @@ export declare enum KeyCode { * KEYCODE_DPAD_LEFT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DPAD_LEFT = 2014, @@ -360,7 +395,8 @@ export declare enum KeyCode { * KEYCODE_DPAD_RIGHT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DPAD_RIGHT = 2015, @@ -368,7 +404,8 @@ export declare enum KeyCode { * KEYCODE_DPAD_CENTER * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DPAD_CENTER = 2016, @@ -376,7 +413,8 @@ export declare enum KeyCode { * KEYCODE_A * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_A = 2017, @@ -384,7 +422,8 @@ export declare enum KeyCode { * KEYCODE_B * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_B = 2018, @@ -392,7 +431,8 @@ export declare enum KeyCode { * KEYCODE_C * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_C = 2019, @@ -400,7 +440,8 @@ export declare enum KeyCode { * KEYCODE_D * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_D = 2020, @@ -408,7 +449,8 @@ export declare enum KeyCode { * KEYCODE_E * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_E = 2021, @@ -416,7 +458,8 @@ export declare enum KeyCode { * KEYCODE_F * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F = 2022, @@ -424,7 +467,8 @@ export declare enum KeyCode { * KEYCODE_G * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_G = 2023, @@ -432,7 +476,8 @@ export declare enum KeyCode { * KEYCODE_H * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_H = 2024, @@ -440,7 +485,8 @@ export declare enum KeyCode { * KEYCODE_I * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_I = 2025, @@ -448,7 +494,8 @@ export declare enum KeyCode { * KEYCODE_J * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_J = 2026, @@ -456,7 +503,8 @@ export declare enum KeyCode { * KEYCODE_K * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_K = 2027, @@ -464,7 +512,8 @@ export declare enum KeyCode { * KEYCODE_L * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_L = 2028, @@ -472,7 +521,8 @@ export declare enum KeyCode { * KEYCODE_M * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_M = 2029, @@ -480,7 +530,8 @@ export declare enum KeyCode { * KEYCODE_N * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_N = 2030, @@ -488,7 +539,8 @@ export declare enum KeyCode { * KEYCODE_O * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_O = 2031, @@ -496,7 +548,8 @@ export declare enum KeyCode { * KEYCODE_P * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_P = 2032, @@ -504,7 +557,8 @@ export declare enum KeyCode { * KEYCODE_Q * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_Q = 2033, @@ -512,7 +566,8 @@ export declare enum KeyCode { * KEYCODE_R * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_R = 2034, @@ -520,7 +575,8 @@ export declare enum KeyCode { * KEYCODE_S * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_S = 2035, @@ -528,7 +584,8 @@ export declare enum KeyCode { * KEYCODE_T * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_T = 2036, @@ -536,7 +593,8 @@ export declare enum KeyCode { * KEYCODE_U * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_U = 2037, @@ -544,7 +602,8 @@ export declare enum KeyCode { * KEYCODE_V * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_V = 2038, @@ -552,7 +611,8 @@ export declare enum KeyCode { * KEYCODE_W * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_W = 2039, @@ -560,7 +620,8 @@ export declare enum KeyCode { * KEYCODE_X * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_X = 2040, @@ -568,7 +629,8 @@ export declare enum KeyCode { * KEYCODE_Y * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_Y = 2041, @@ -576,7 +638,8 @@ export declare enum KeyCode { * KEYCODE_Z * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_Z = 2042, @@ -584,7 +647,8 @@ export declare enum KeyCode { * KEYCODE_COMMA * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_COMMA = 2043, @@ -592,7 +656,8 @@ export declare enum KeyCode { * KEYCODE_PERIOD * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PERIOD = 2044, @@ -600,7 +665,8 @@ export declare enum KeyCode { * KEYCODE_ALT_LEFT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_ALT_LEFT = 2045, @@ -608,7 +674,8 @@ export declare enum KeyCode { * KEYCODE_ALT_RIGHT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_ALT_RIGHT = 2046, @@ -616,7 +683,8 @@ export declare enum KeyCode { * KEYCODE_SHIFT_LEFT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SHIFT_LEFT = 2047, @@ -624,7 +692,8 @@ export declare enum KeyCode { * KEYCODE_SHIFT_RIGHT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SHIFT_RIGHT = 2048, @@ -632,7 +701,8 @@ export declare enum KeyCode { * KEYCODE_TAB * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_TAB = 2049, @@ -640,7 +710,8 @@ export declare enum KeyCode { * KEYCODE_SPACE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SPACE = 2050, @@ -648,7 +719,8 @@ export declare enum KeyCode { * KEYCODE_SYM * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SYM = 2051, @@ -656,7 +728,8 @@ export declare enum KeyCode { * Explorer key, which is used to start the explorer application * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_EXPLORER = 2052, @@ -664,7 +737,8 @@ export declare enum KeyCode { * Email key, which is used to start the email application * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_ENVELOPE = 2053, @@ -672,7 +746,8 @@ export declare enum KeyCode { * KEYCODE_ENTER * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_ENTER = 2054, @@ -680,7 +755,8 @@ export declare enum KeyCode { * KEYCODE_DEL * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DEL = 2055, @@ -688,7 +764,8 @@ export declare enum KeyCode { * Key / * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_GRAVE = 2056, @@ -696,7 +773,8 @@ export declare enum KeyCode { * Key - * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MINUS = 2057, @@ -704,7 +782,8 @@ export declare enum KeyCode { * Key = * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_EQUALS = 2058, @@ -712,7 +791,8 @@ export declare enum KeyCode { * Key [ * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_LEFT_BRACKET = 2059, @@ -720,7 +800,8 @@ export declare enum KeyCode { * Key ] * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_RIGHT_BRACKET = 2060, @@ -728,7 +809,8 @@ export declare enum KeyCode { * Key \ * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BACKSLASH = 2061, @@ -736,7 +818,8 @@ export declare enum KeyCode { * Key ; * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SEMICOLON = 2062, @@ -744,7 +827,8 @@ export declare enum KeyCode { * Key ' * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_APOSTROPHE = 2063, @@ -752,7 +836,8 @@ export declare enum KeyCode { * Key / * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SLASH = 2064, @@ -760,7 +845,8 @@ export declare enum KeyCode { * Key @ * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_AT = 2065, @@ -768,7 +854,8 @@ export declare enum KeyCode { * Key + * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PLUS = 2066, @@ -776,7 +863,8 @@ export declare enum KeyCode { * KEYCODE_MENU * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MENU = 2067, @@ -784,7 +872,8 @@ export declare enum KeyCode { * KEYCODE_PAGE_UP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PAGE_UP = 2068, @@ -792,7 +881,8 @@ export declare enum KeyCode { * KEYCODE_PAGE_DOWN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PAGE_DOWN = 2069, @@ -800,7 +890,8 @@ export declare enum KeyCode { * KEYCODE_ESCAPE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_ESCAPE = 2070, @@ -808,7 +899,8 @@ export declare enum KeyCode { * KEYCODE_FORWARD_DEL * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_FORWARD_DEL = 2071, @@ -816,7 +908,8 @@ export declare enum KeyCode { * KEYCODE_CTRL_LEFT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CTRL_LEFT = 2072, @@ -824,7 +917,8 @@ export declare enum KeyCode { * KEYCODE_CTRL_RIGHT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CTRL_RIGHT = 2073, @@ -832,7 +926,8 @@ export declare enum KeyCode { * KEYCODE_CAPS_LOCK * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CAPS_LOCK = 2074, @@ -840,7 +935,8 @@ export declare enum KeyCode { * KEYCODE_SCROLL_LOCK * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SCROLL_LOCK = 2075, @@ -848,7 +944,8 @@ export declare enum KeyCode { * KEYCODE_META_LEFT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_META_LEFT = 2076, @@ -856,7 +953,8 @@ export declare enum KeyCode { * KEYCODE_META_RIGHT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_META_RIGHT = 2077, @@ -864,7 +962,8 @@ export declare enum KeyCode { * KEYCODE_FUNCTION * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_FUNCTION = 2078, @@ -872,7 +971,8 @@ export declare enum KeyCode { * KEYCODE_SYSRQ * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SYSRQ = 2079, @@ -880,7 +980,8 @@ export declare enum KeyCode { * KEYCODE_BREAK * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BREAK = 2080, @@ -888,7 +989,8 @@ export declare enum KeyCode { * KEYCODE_MOVE_HOME * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MOVE_HOME = 2081, @@ -896,7 +998,8 @@ export declare enum KeyCode { * KEYCODE_MOVE_END * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MOVE_END = 2082, @@ -904,7 +1007,8 @@ export declare enum KeyCode { * KEYCODE_INSERT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_INSERT = 2083, @@ -912,7 +1016,8 @@ export declare enum KeyCode { * KEYCODE_FORWARD * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_FORWARD = 2084, @@ -920,14 +1025,16 @@ export declare enum KeyCode { * KEYCODE_MEDIA_PLAY * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ /** * KEYCODE_MEDIA_PLAY * * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MEDIA_PLAY = 2085, @@ -942,7 +1049,8 @@ export declare enum KeyCode { * * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MEDIA_PAUSE = 2086, @@ -950,7 +1058,8 @@ export declare enum KeyCode { * KEYCODE_MEDIA_CLOSE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MEDIA_CLOSE = 2087, @@ -958,7 +1067,8 @@ export declare enum KeyCode { * KEYCODE_MEDIA_EJECT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MEDIA_EJECT = 2088, @@ -966,7 +1076,8 @@ export declare enum KeyCode { * KEYCODE_MEDIA_RECORD * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MEDIA_RECORD = 2089, @@ -974,7 +1085,8 @@ export declare enum KeyCode { * KEYCODE_F1 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F1 = 2090, @@ -982,7 +1094,8 @@ export declare enum KeyCode { * KEYCODE_F2 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F2 = 2091, @@ -990,7 +1103,8 @@ export declare enum KeyCode { * KEYCODE_F3 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F3 = 2092, @@ -998,7 +1112,8 @@ export declare enum KeyCode { * KEYCODE_F4 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F4 = 2093, @@ -1006,7 +1121,8 @@ export declare enum KeyCode { * KEYCODE_F5 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F5 = 2094, @@ -1014,7 +1130,8 @@ export declare enum KeyCode { * KEYCODE_F6 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F6 = 2095, @@ -1022,7 +1139,8 @@ export declare enum KeyCode { * KEYCODE_F7 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F7 = 2096, @@ -1030,7 +1148,8 @@ export declare enum KeyCode { * KEYCODE_F8 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F8 = 2097, @@ -1038,7 +1157,8 @@ export declare enum KeyCode { * KEYCODE_F9 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F9 = 2098, @@ -1046,7 +1166,8 @@ export declare enum KeyCode { * KEYCODE_F10 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F10 = 2099, @@ -1054,7 +1175,8 @@ export declare enum KeyCode { * KEYCODE_F11 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F11 = 2100, @@ -1062,7 +1184,8 @@ export declare enum KeyCode { * KEYCODE_F12 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F12 = 2101, @@ -1070,7 +1193,8 @@ export declare enum KeyCode { * Number Lock key on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUM_LOCK = 2102, @@ -1078,7 +1202,8 @@ export declare enum KeyCode { * Key 0 on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_0 = 2103, @@ -1086,7 +1211,8 @@ export declare enum KeyCode { * Key 1 on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_1 = 2104, @@ -1094,7 +1220,8 @@ export declare enum KeyCode { * Key 2 on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_2 = 2105, @@ -1102,7 +1229,8 @@ export declare enum KeyCode { * Key 3 on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_3 = 2106, @@ -1110,7 +1238,8 @@ export declare enum KeyCode { * Key 4 on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_4 = 2107, @@ -1118,7 +1247,8 @@ export declare enum KeyCode { * Key 5 on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_5 = 2108, @@ -1126,7 +1256,8 @@ export declare enum KeyCode { * Key 6 on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_6 = 2109, @@ -1134,7 +1265,8 @@ export declare enum KeyCode { * Key 7 on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_7 = 2110, @@ -1142,7 +1274,8 @@ export declare enum KeyCode { * Key 8 on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_8 = 2111, @@ -1150,7 +1283,8 @@ export declare enum KeyCode { * Key 9 on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_9 = 2112, @@ -1158,7 +1292,8 @@ export declare enum KeyCode { * Key / on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_DIVIDE = 2113, @@ -1166,7 +1301,8 @@ export declare enum KeyCode { * Key ) on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_MULTIPLY = 2114, @@ -1174,7 +1310,8 @@ export declare enum KeyCode { * Key - on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_SUBTRACT = 2115, @@ -1182,7 +1319,8 @@ export declare enum KeyCode { * Key + on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_ADD = 2116, @@ -1190,7 +1328,8 @@ export declare enum KeyCode { * Key . on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_DOT = 2117, @@ -1198,7 +1337,8 @@ export declare enum KeyCode { * Key , on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_COMMA = 2118, @@ -1206,7 +1346,8 @@ export declare enum KeyCode { * Enter key on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_ENTER = 2119, @@ -1214,7 +1355,8 @@ export declare enum KeyCode { * Key = on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_EQUALS = 2120, @@ -1222,7 +1364,8 @@ export declare enum KeyCode { * Key ( on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_LEFT_PAREN = 2121, @@ -1230,7 +1373,8 @@ export declare enum KeyCode { * Key ) on numeric keypad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_RIGHT_PAREN = 2122, @@ -1238,7 +1382,8 @@ export declare enum KeyCode { * KEYCODE_VIRTUAL_MULTITASK * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_VIRTUAL_MULTITASK = 2210, @@ -1246,7 +1391,8 @@ export declare enum KeyCode { * Joystick key A * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BUTTON_A = 2301, @@ -1254,7 +1400,8 @@ export declare enum KeyCode { * Joystick key B * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BUTTON_B = 2302, @@ -1262,7 +1409,8 @@ export declare enum KeyCode { * Joystick key X * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BUTTON_X = 2304, @@ -1270,7 +1418,8 @@ export declare enum KeyCode { * Joystick key Y * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BUTTON_Y = 2305, @@ -1278,7 +1427,8 @@ export declare enum KeyCode { * Joystick key L1 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BUTTON_L1 = 2307, @@ -1286,7 +1436,8 @@ export declare enum KeyCode { * Joystick key R1 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BUTTON_R1 = 2308, @@ -1294,7 +1445,8 @@ export declare enum KeyCode { * Joystick key L2 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BUTTON_L2 = 2309, @@ -1302,7 +1454,8 @@ export declare enum KeyCode { * Joystick key R2 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BUTTON_R2 = 2310, @@ -1310,7 +1463,8 @@ export declare enum KeyCode { * Joystick key Select * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BUTTON_SELECT = 2311, @@ -1318,7 +1472,8 @@ export declare enum KeyCode { * Joystick key Start * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BUTTON_START = 2312, @@ -1326,7 +1481,8 @@ export declare enum KeyCode { * Joystick key Mode * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BUTTON_MODE = 2313, @@ -1334,7 +1490,8 @@ export declare enum KeyCode { *Joystick key THUMBL * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BUTTON_THUMBL = 2314, @@ -1342,7 +1499,8 @@ export declare enum KeyCode { * Joystick key THUMBR * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BUTTON_THUMBR = 2315, @@ -1350,7 +1508,8 @@ export declare enum KeyCode { * KEYCODE_SLEEP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SLEEP = 2600, @@ -1358,7 +1517,8 @@ export declare enum KeyCode { * KEYCODE_ZENKAKU_HANKAKU * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_ZENKAKU_HANKAKU = 2601, @@ -1366,7 +1526,8 @@ export declare enum KeyCode { * KEYCODE_102ND * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_102ND = 2602, @@ -1374,7 +1535,8 @@ export declare enum KeyCode { * KEYCODE_RO * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_RO = 2603, @@ -1382,7 +1544,8 @@ export declare enum KeyCode { * KEYCODE_KATAKANA * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_KATAKANA = 2604, @@ -1390,7 +1553,8 @@ export declare enum KeyCode { * KEYCODE_HIRAGANA * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_HIRAGANA = 2605, @@ -1398,7 +1562,8 @@ export declare enum KeyCode { * KEYCODE_HENKAN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_HENKAN = 2606, @@ -1406,7 +1571,8 @@ export declare enum KeyCode { * KEYCODE_KATAKANA_HIRAGANA * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_KATAKANA_HIRAGANA = 2607, @@ -1414,7 +1580,8 @@ export declare enum KeyCode { * KEYCODE_MUHENKAN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MUHENKAN = 2608, @@ -1422,7 +1589,8 @@ export declare enum KeyCode { * KEYCODE_LINEFEED * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_LINEFEED = 2609, @@ -1430,7 +1598,8 @@ export declare enum KeyCode { * KEYCODE_MACRO * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MACRO = 2610, @@ -1438,7 +1607,8 @@ export declare enum KeyCode { * KEYCODE_NUMPAD_PLUSMINUS * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NUMPAD_PLUSMINUS = 2611, @@ -1446,7 +1616,8 @@ export declare enum KeyCode { * KEYCODE_SCALE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SCALE = 2612, @@ -1454,7 +1625,8 @@ export declare enum KeyCode { * KEYCODE_HANGUEL * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_HANGUEL = 2613, @@ -1462,7 +1634,8 @@ export declare enum KeyCode { * KEYCODE_HANJA * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_HANJA = 2614, @@ -1470,7 +1643,8 @@ export declare enum KeyCode { * KEYCODE_YEN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_YEN = 2615, @@ -1478,7 +1652,8 @@ export declare enum KeyCode { * KEYCODE_STOP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_STOP = 2616, @@ -1486,7 +1661,8 @@ export declare enum KeyCode { * KEYCODE_AGAIN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_AGAIN = 2617, @@ -1494,7 +1670,8 @@ export declare enum KeyCode { * KEYCODE_PROPS * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PROPS = 2618, @@ -1502,7 +1679,8 @@ export declare enum KeyCode { * KEYCODE_UNDO * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_UNDO = 2619, @@ -1510,7 +1688,8 @@ export declare enum KeyCode { * KEYCODE_COPY * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_COPY = 2620, @@ -1518,7 +1697,8 @@ export declare enum KeyCode { * KEYCODE_OPEN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_OPEN = 2621, @@ -1526,7 +1706,8 @@ export declare enum KeyCode { * KEYCODE_PASTE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PASTE = 2622, @@ -1534,7 +1715,8 @@ export declare enum KeyCode { * KEYCODE_FIND * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_FIND = 2623, @@ -1542,7 +1724,8 @@ export declare enum KeyCode { * KEYCODE_CUT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CUT = 2624, @@ -1550,7 +1733,8 @@ export declare enum KeyCode { * KEYCODE_HELP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_HELP = 2625, @@ -1558,7 +1742,8 @@ export declare enum KeyCode { * Calc key, which is used to start the calculator application * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CALC = 2626, @@ -1566,7 +1751,8 @@ export declare enum KeyCode { * KEYCODE_FILE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_FILE = 2627, @@ -1574,7 +1760,8 @@ export declare enum KeyCode { * KEYCODE_BOOKMARKS * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BOOKMARKS = 2628, @@ -1582,7 +1769,8 @@ export declare enum KeyCode { * KEYCODE_NEXT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NEXT = 2629, @@ -1590,7 +1778,8 @@ export declare enum KeyCode { * KEYCODE_PLAYPAUSE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PLAYPAUSE = 2630, @@ -1598,7 +1787,8 @@ export declare enum KeyCode { * KEYCODE_PREVIOUS * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PREVIOUS = 2631, @@ -1606,7 +1796,8 @@ export declare enum KeyCode { * KEYCODE_STOPCD * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_STOPCD = 2632, @@ -1614,7 +1805,8 @@ export declare enum KeyCode { * KEYCODE_CONFIG * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CONFIG = 2634, @@ -1622,7 +1814,8 @@ export declare enum KeyCode { * KEYCODE_REFRESH * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_REFRESH = 2635, @@ -1630,7 +1823,8 @@ export declare enum KeyCode { * KEYCODE_EXIT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_EXIT = 2636, @@ -1638,7 +1832,8 @@ export declare enum KeyCode { * KEYCODE_EDIT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_EDIT = 2637, @@ -1646,7 +1841,8 @@ export declare enum KeyCode { * KEYCODE_SCROLLUP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SCROLLUP = 2638, @@ -1654,7 +1850,8 @@ export declare enum KeyCode { * KEYCODE_SCROLLDOWN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SCROLLDOWN = 2639, @@ -1662,7 +1859,8 @@ export declare enum KeyCode { * KEYCODE_NEW * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NEW = 2640, @@ -1670,7 +1868,8 @@ export declare enum KeyCode { * KEYCODE_REDO * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_REDO = 2641, @@ -1678,7 +1877,8 @@ export declare enum KeyCode { * KEYCODE_CLOSE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CLOSE = 2642, @@ -1686,7 +1886,8 @@ export declare enum KeyCode { * KEYCODE_PLAY * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PLAY = 2643, @@ -1694,7 +1895,8 @@ export declare enum KeyCode { * KEYCODE_BASSBOOST * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BASSBOOST = 2644, @@ -1702,7 +1904,8 @@ export declare enum KeyCode { * KEYCODE_PRINT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PRINT = 2645, @@ -1710,7 +1913,8 @@ export declare enum KeyCode { * KEYCODE_CHAT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CHAT = 2646, @@ -1718,7 +1922,8 @@ export declare enum KeyCode { * KEYCODE_FINANCE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_FINANCE = 2647, @@ -1726,7 +1931,8 @@ export declare enum KeyCode { * KEYCODE_CANCEL * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CANCEL = 2648, @@ -1734,7 +1940,8 @@ export declare enum KeyCode { * KEYCODE_KBDILLUM_TOGGLE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_KBDILLUM_TOGGLE = 2649, @@ -1742,7 +1949,8 @@ export declare enum KeyCode { * KEYCODE_KBDILLUM_DOWN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_KBDILLUM_DOWN = 2650, @@ -1750,7 +1958,8 @@ export declare enum KeyCode { * KEYCODE_KBDILLUM_UP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_KBDILLUM_UP = 2651, @@ -1758,7 +1967,8 @@ export declare enum KeyCode { * KEYCODE_SEND * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SEND = 2652, @@ -1766,7 +1976,8 @@ export declare enum KeyCode { * KEYCODE_REPLY * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_REPLY = 2653, @@ -1774,7 +1985,8 @@ export declare enum KeyCode { * KEYCODE_FORWARDMAIL * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_FORWARDMAIL = 2654, @@ -1782,7 +1994,8 @@ export declare enum KeyCode { * KEYCODE_SAVE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SAVE = 2655, @@ -1790,7 +2003,8 @@ export declare enum KeyCode { * KEYCODE_DOCUMENTS * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DOCUMENTS = 2656, @@ -1798,7 +2012,8 @@ export declare enum KeyCode { * KEYCODE_VIDEO_NEXT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_VIDEO_NEXT = 2657, @@ -1806,7 +2021,8 @@ export declare enum KeyCode { * KEYCODE_VIDEO_PREV * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_VIDEO_PREV = 2658, @@ -1814,7 +2030,8 @@ export declare enum KeyCode { * KEYCODE_BRIGHTNESS_CYCLE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BRIGHTNESS_CYCLE = 2659, @@ -1822,7 +2039,8 @@ export declare enum KeyCode { * KEYCODE_BRIGHTNESS_ZERO * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BRIGHTNESS_ZERO = 2660, @@ -1830,7 +2048,8 @@ export declare enum KeyCode { * KEYCODE_DISPLAY_OFF * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DISPLAY_OFF = 2661, @@ -1838,7 +2057,8 @@ export declare enum KeyCode { * KEYCODE_BTN_MISC * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BTN_MISC = 2662, @@ -1846,7 +2066,8 @@ export declare enum KeyCode { * KEYCODE_GOTO * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_GOTO = 2663, @@ -1854,7 +2075,8 @@ export declare enum KeyCode { * KEYCODE_INFO * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_INFO = 2664, @@ -1862,7 +2084,8 @@ export declare enum KeyCode { * KEYCODE_PROGRAM * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PROGRAM = 2665, @@ -1870,7 +2093,8 @@ export declare enum KeyCode { * KEYCODE_PVR * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PVR = 2666, @@ -1878,7 +2102,8 @@ export declare enum KeyCode { * KEYCODE_SUBTITLE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SUBTITLE = 2667, @@ -1886,7 +2111,8 @@ export declare enum KeyCode { * KEYCODE_FULL_SCREEN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_FULL_SCREEN = 2668, @@ -1894,7 +2120,8 @@ export declare enum KeyCode { * KEYCODE_KEYBOARD * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_KEYBOARD = 2669, @@ -1902,7 +2129,8 @@ export declare enum KeyCode { * KEYCODE_ASPECT_RATIO * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_ASPECT_RATIO = 2670, @@ -1910,7 +2138,8 @@ export declare enum KeyCode { * KEYCODE_PC * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PC = 2671, @@ -1918,7 +2147,8 @@ export declare enum KeyCode { * KEYCODE_TV * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_TV = 2672, @@ -1926,7 +2156,8 @@ export declare enum KeyCode { * KEYCODE_TV2 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_TV2 = 2673, @@ -1934,7 +2165,8 @@ export declare enum KeyCode { * KEYCODE_VCR * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_VCR = 2674, @@ -1942,7 +2174,8 @@ export declare enum KeyCode { * KEYCODE_VCR2 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_VCR2 = 2675, @@ -1950,7 +2183,8 @@ export declare enum KeyCode { * KEYCODE_SAT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SAT = 2676, @@ -1958,7 +2192,8 @@ export declare enum KeyCode { * KEYCODE_CD * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CD = 2677, @@ -1966,7 +2201,8 @@ export declare enum KeyCode { * KEYCODE_TAPE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_TAPE = 2678, @@ -1974,7 +2210,8 @@ export declare enum KeyCode { * KEYCODE_TUNER * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_TUNER = 2679, @@ -1982,7 +2219,8 @@ export declare enum KeyCode { * KEYCODE_PLAYER * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PLAYER = 2680, @@ -1990,7 +2228,8 @@ export declare enum KeyCode { * KEYCODE_DVD * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DVD = 2681, @@ -1998,7 +2237,8 @@ export declare enum KeyCode { * KEYCODE_AUDIO * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_AUDIO = 2682, @@ -2006,7 +2246,8 @@ export declare enum KeyCode { * KEYCODE_VIDEO * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_VIDEO = 2683, @@ -2014,7 +2255,8 @@ export declare enum KeyCode { * KEYCODE_MEMO * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MEMO = 2684, @@ -2022,7 +2264,8 @@ export declare enum KeyCode { * KEYCODE_CALENDAR * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CALENDAR = 2685, @@ -2030,7 +2273,8 @@ export declare enum KeyCode { * KEYCODE_RED * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_RED = 2686, @@ -2038,7 +2282,8 @@ export declare enum KeyCode { * KEYCODE_GREEN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_GREEN = 2687, @@ -2046,7 +2291,8 @@ export declare enum KeyCode { * KEYCODE_YELLOW * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_YELLOW = 2688, @@ -2054,7 +2300,8 @@ export declare enum KeyCode { * KEYCODE_BLUE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BLUE = 2689, @@ -2062,7 +2309,8 @@ export declare enum KeyCode { * KEYCODE_CHANNELUP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CHANNELUP = 2690, @@ -2070,7 +2318,8 @@ export declare enum KeyCode { * KEYCODE_CHANNELDOWN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CHANNELDOWN = 2691, @@ -2078,7 +2327,8 @@ export declare enum KeyCode { * KEYCODE_LAST * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_LAST = 2692, @@ -2086,7 +2336,8 @@ export declare enum KeyCode { * KEYCODE_RESTART * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_RESTART = 2693, @@ -2094,7 +2345,8 @@ export declare enum KeyCode { * KEYCODE_SLOW * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SLOW = 2694, @@ -2102,7 +2354,8 @@ export declare enum KeyCode { * KEYCODE_SHUFFLE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SHUFFLE = 2695, @@ -2110,7 +2363,8 @@ export declare enum KeyCode { * KEYCODE_VIDEOPHONE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_VIDEOPHONE = 2696, @@ -2118,7 +2372,8 @@ export declare enum KeyCode { * KEYCODE_GAMES * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_GAMES = 2697, @@ -2126,7 +2381,8 @@ export declare enum KeyCode { * KEYCODE_ZOOMIN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_ZOOMIN = 2698, @@ -2134,7 +2390,8 @@ export declare enum KeyCode { * KEYCODE_ZOOMOUT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_ZOOMOUT = 2699, @@ -2142,7 +2399,8 @@ export declare enum KeyCode { * KEYCODE_ZOOMRESET * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_ZOOMRESET = 2700, @@ -2150,7 +2408,8 @@ export declare enum KeyCode { * KEYCODE_WORDPROCESSOR * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_WORDPROCESSOR = 2701, @@ -2158,7 +2417,8 @@ export declare enum KeyCode { * KEYCODE_EDITOR * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_EDITOR = 2702, @@ -2166,7 +2426,8 @@ export declare enum KeyCode { * KEYCODE_SPREADSHEET * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SPREADSHEET = 2703, @@ -2174,7 +2435,8 @@ export declare enum KeyCode { * KEYCODE_GRAPHICSEDITOR * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_GRAPHICSEDITOR = 2704, @@ -2182,7 +2444,8 @@ export declare enum KeyCode { * KEYCODE_PRESENTATION * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PRESENTATION = 2705, @@ -2190,7 +2453,8 @@ export declare enum KeyCode { * KEYCODE_DATABASE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DATABASE = 2706, @@ -2198,7 +2462,8 @@ export declare enum KeyCode { * KEYCODE_NEWS * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_NEWS = 2707, @@ -2206,7 +2471,8 @@ export declare enum KeyCode { * KEYCODE_VOICEMAIL * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_VOICEMAIL = 2708, @@ -2214,7 +2480,8 @@ export declare enum KeyCode { * KEYCODE_ADDRESSBOOK * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_ADDRESSBOOK = 2709, @@ -2222,7 +2489,8 @@ export declare enum KeyCode { * KEYCODE_MESSENGER * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MESSENGER = 2710, @@ -2230,7 +2498,8 @@ export declare enum KeyCode { * KEYCODE_BRIGHTNESS_TOGGLE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BRIGHTNESS_TOGGLE = 2711, @@ -2238,7 +2507,8 @@ export declare enum KeyCode { * KEYCODE_SPELLCHECK * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SPELLCHECK = 2712, @@ -2246,7 +2516,8 @@ export declare enum KeyCode { * KEYCODE_COFFEE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_COFFEE = 2713, @@ -2254,7 +2525,8 @@ export declare enum KeyCode { * KEYCODE_MEDIA_REPEAT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MEDIA_REPEAT = 2714, @@ -2262,7 +2534,8 @@ export declare enum KeyCode { * KEYCODE_IMAGES * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_IMAGES = 2715, @@ -2270,7 +2543,8 @@ export declare enum KeyCode { * KEYCODE_BUTTONCONFIG * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BUTTONCONFIG = 2716, @@ -2278,7 +2552,8 @@ export declare enum KeyCode { * KEYCODE_TASKMANAGER * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_TASKMANAGER = 2717, @@ -2286,7 +2561,8 @@ export declare enum KeyCode { * KEYCODE_JOURNAL * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_JOURNAL = 2718, @@ -2294,7 +2570,8 @@ export declare enum KeyCode { * KEYCODE_CONTROLPANEL * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CONTROLPANEL = 2719, @@ -2302,7 +2579,8 @@ export declare enum KeyCode { * KEYCODE_APPSELECT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_APPSELECT = 2720, @@ -2310,7 +2588,8 @@ export declare enum KeyCode { * KEYCODE_SCREENSAVER * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SCREENSAVER = 2721, @@ -2318,7 +2597,8 @@ export declare enum KeyCode { * KEYCODE_ASSISTANT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_ASSISTANT = 2722, @@ -2326,7 +2606,8 @@ export declare enum KeyCode { * KEYCODE_KBD_LAYOUT_NEXT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_KBD_LAYOUT_NEXT = 2723, @@ -2334,7 +2615,8 @@ export declare enum KeyCode { * KEYCODE_BRIGHTNESS_MIN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BRIGHTNESS_MIN = 2724, @@ -2342,7 +2624,8 @@ export declare enum KeyCode { * KEYCODE_BRIGHTNESS_MAX * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BRIGHTNESS_MAX = 2725, @@ -2350,7 +2633,8 @@ export declare enum KeyCode { * Assist_Previous key, used to view historical inputs * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_KBDINPUTASSIST_PREV = 2726, @@ -2358,7 +2642,8 @@ export declare enum KeyCode { * Assist_Next key, used to view predictive inputs * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_KBDINPUTASSIST_NEXT = 2727, @@ -2366,7 +2651,8 @@ export declare enum KeyCode { * Assist_Previous_Group key, used to switch to the previous input method in the input group * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_KBDINPUTASSIST_PREVGROUP = 2728, @@ -2374,7 +2660,8 @@ export declare enum KeyCode { * Assist_Next_Group key, used to switch to the next input method in the input group * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_KBDINPUTASSIST_NEXTGROUP = 2729, @@ -2382,7 +2669,8 @@ export declare enum KeyCode { * KEYCODE_KBDINPUTASSIST_ACCEPT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_KBDINPUTASSIST_ACCEPT = 2730, @@ -2390,7 +2678,8 @@ export declare enum KeyCode { * KEYCODE_KBDINPUTASSIST_CANCEL * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_KBDINPUTASSIST_CANCEL = 2731, @@ -2398,7 +2687,8 @@ export declare enum KeyCode { * KEYCODE_FRONT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_FRONT = 2800, @@ -2406,7 +2696,8 @@ export declare enum KeyCode { * KEYCODE_SETUP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SETUP = 2801, @@ -2414,7 +2705,8 @@ export declare enum KeyCode { * KEYCODE_WAKEUP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_WAKEUP = 2802, @@ -2422,7 +2714,8 @@ export declare enum KeyCode { * KEYCODE_SENDFILE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SENDFILE = 2803, @@ -2430,7 +2723,8 @@ export declare enum KeyCode { * KEYCODE_DELETEFILE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DELETEFILE = 2804, @@ -2438,7 +2732,8 @@ export declare enum KeyCode { * KEYCODE_XFER * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_XFER = 2805, @@ -2446,7 +2741,8 @@ export declare enum KeyCode { * KEYCODE_PROG1 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PROG1 = 2806, @@ -2454,7 +2750,8 @@ export declare enum KeyCode { * KEYCODE_PROG2 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PROG2 = 2807, @@ -2462,7 +2759,8 @@ export declare enum KeyCode { * KEYCODE_MSDOS * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MSDOS = 2808, @@ -2470,7 +2768,8 @@ export declare enum KeyCode { * KEYCODE_SCREENLOCK * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SCREENLOCK = 2809, @@ -2478,7 +2777,8 @@ export declare enum KeyCode { * KEYCODE_DIRECTION_ROTATE_DISPLAY * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DIRECTION_ROTATE_DISPLAY = 2810, @@ -2486,7 +2786,8 @@ export declare enum KeyCode { * KEYCODE_CYCLEWINDOWS * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CYCLEWINDOWS = 2811, @@ -2494,7 +2795,8 @@ export declare enum KeyCode { * KEYCODE_COMPUTER * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_COMPUTER = 2812, @@ -2502,7 +2804,8 @@ export declare enum KeyCode { * KEYCODE_EJECTCLOSECD * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_EJECTCLOSECD = 2813, @@ -2510,7 +2813,8 @@ export declare enum KeyCode { * KEYCODE_ISO * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_ISO = 2814, @@ -2518,7 +2822,8 @@ export declare enum KeyCode { * KEYCODE_MOVE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_MOVE = 2815, @@ -2526,7 +2831,8 @@ export declare enum KeyCode { * KEYCODE_F13 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F13 = 2816, @@ -2534,7 +2840,8 @@ export declare enum KeyCode { * KEYCODE_F14 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F14 = 2817, @@ -2542,7 +2849,8 @@ export declare enum KeyCode { * KEYCODE_F15 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F15 = 2818, @@ -2550,7 +2858,8 @@ export declare enum KeyCode { * KEYCODE_F16 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F16 = 2819, @@ -2558,7 +2867,8 @@ export declare enum KeyCode { * KEYCODE_F17 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F17 = 2820, @@ -2566,7 +2876,8 @@ export declare enum KeyCode { * KEYCODE_F18 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F18 = 2821, @@ -2574,7 +2885,8 @@ export declare enum KeyCode { * KEYCODE_F19 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F19 = 2822, @@ -2582,7 +2894,8 @@ export declare enum KeyCode { * KEYCODE_F20 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F20 = 2823, @@ -2590,7 +2903,8 @@ export declare enum KeyCode { * KEYCODE_F21 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F21 = 2824, @@ -2598,7 +2912,8 @@ export declare enum KeyCode { * KEYCODE_F22 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F22 = 2825, @@ -2606,7 +2921,8 @@ export declare enum KeyCode { * KEYCODE_F23 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F23 = 2826, @@ -2614,7 +2930,8 @@ export declare enum KeyCode { * KEYCODE_F24 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_F24 = 2827, @@ -2622,7 +2939,8 @@ export declare enum KeyCode { * KEYCODE_PROG3 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PROG3 = 2828, @@ -2630,7 +2948,8 @@ export declare enum KeyCode { * KEYCODE_PROG4 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_PROG4 = 2829, @@ -2638,7 +2957,8 @@ export declare enum KeyCode { * KEYCODE_DASHBOARD * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DASHBOARD = 2830, @@ -2646,7 +2966,8 @@ export declare enum KeyCode { * KEYCODE_SUSPEND * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SUSPEND = 2831, @@ -2654,7 +2975,8 @@ export declare enum KeyCode { * KEYCODE_HP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_HP = 2832, @@ -2662,7 +2984,8 @@ export declare enum KeyCode { * KEYCODE_SOUND * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SOUND = 2833, @@ -2670,7 +2993,8 @@ export declare enum KeyCode { * KEYCODE_QUESTION * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_QUESTION = 2834, @@ -2678,7 +3002,8 @@ export declare enum KeyCode { * KEYCODE_CONNECT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CONNECT = 2836, @@ -2686,7 +3011,8 @@ export declare enum KeyCode { * KEYCODE_SPORT * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SPORT = 2837, @@ -2694,7 +3020,8 @@ export declare enum KeyCode { * KEYCODE_SHOP * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SHOP = 2838, @@ -2702,7 +3029,8 @@ export declare enum KeyCode { * KEYCODE_ALTERASE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_ALTERASE = 2839, @@ -2710,7 +3038,8 @@ export declare enum KeyCode { * KEYCODE_SWITCHVIDEOMODE * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_SWITCHVIDEOMODE = 2841, @@ -2718,7 +3047,8 @@ export declare enum KeyCode { * KEYCODE_BATTERY * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BATTERY = 2842, @@ -2726,7 +3056,8 @@ export declare enum KeyCode { * KEYCODE_BLUETOOTH * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BLUETOOTH = 2843, @@ -2734,7 +3065,8 @@ export declare enum KeyCode { * KEYCODE_WLAN * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_WLAN = 2844, @@ -2742,7 +3074,8 @@ export declare enum KeyCode { * KEYCODE_UWB * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_UWB = 2845, @@ -2750,7 +3083,8 @@ export declare enum KeyCode { * KEYCODE_WWAN_WIMAX * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_WWAN_WIMAX = 2846, @@ -2758,7 +3092,8 @@ export declare enum KeyCode { * KEYCODE_RFKILL * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_RFKILL = 2847, @@ -2766,7 +3101,8 @@ export declare enum KeyCode { * KEYCODE_CHANNEL * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_CHANNEL = 3001, @@ -2774,7 +3110,8 @@ export declare enum KeyCode { * KEYCODE_BTN_0 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BTN_0 = 3100, @@ -2782,7 +3119,8 @@ export declare enum KeyCode { * KEYCODE_BTN_1 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BTN_1 = 3101, @@ -2790,7 +3128,8 @@ export declare enum KeyCode { * KEYCODE_BTN_2 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BTN_2 = 3102, @@ -2798,7 +3137,8 @@ export declare enum KeyCode { * KEYCODE_BTN_3 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BTN_3 = 3103, @@ -2806,7 +3146,8 @@ export declare enum KeyCode { * KEYCODE_BTN_4 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BTN_4 = 3104, @@ -2814,7 +3155,8 @@ export declare enum KeyCode { * KEYCODE_BTN_5 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BTN_5 = 3105, @@ -2822,7 +3164,8 @@ export declare enum KeyCode { * KEYCODE_BTN_6 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BTN_6 = 3106, @@ -2830,7 +3173,8 @@ export declare enum KeyCode { * KEYCODE_BTN_7 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BTN_7 = 3107, @@ -2838,7 +3182,8 @@ export declare enum KeyCode { * KEYCODE_BTN_8 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BTN_8 = 3108, @@ -2846,7 +3191,8 @@ export declare enum KeyCode { * KEYCODE_BTN_9 * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_BTN_9 = 3109, @@ -2854,7 +3200,8 @@ export declare enum KeyCode { * KEYCODE_DAGGER_CLICK * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DAGGER_CLICK = 3211, @@ -2862,7 +3209,8 @@ export declare enum KeyCode { * KEYCODE_DAGGER_DOUBLE_CLICK * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DAGGER_DOUBLE_CLICK = 3212, @@ -2870,7 +3218,8 @@ export declare enum KeyCode { * KEYCODE_DAGGER_LONG_PRESS * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ KEYCODE_DAGGER_LONG_PRESS = 3213, diff --git a/api/@ohos.multimodalInput.keyEvent.d.ts b/api/@ohos.multimodalInput.keyEvent.d.ts index da04f64ae460f9d794b0d1e18c970f16b89829ba..d6d19a4400bbb8a36d4c124b3ec76f33a925d77a 100644 --- a/api/@ohos.multimodalInput.keyEvent.d.ts +++ b/api/@ohos.multimodalInput.keyEvent.d.ts @@ -20,6 +20,7 @@ import type { InputEvent } from './@ohos.multimodalInput.inputEvent'; import type { KeyCode } from './@ohos.multimodalInput.keyCode'; + /** * Action * @@ -33,7 +34,8 @@ import type { KeyCode } from './@ohos.multimodalInput.keyCode'; * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum Action { /** @@ -47,7 +49,8 @@ export declare enum Action { * * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CANCEL = 0, @@ -62,7 +65,8 @@ export declare enum Action { * * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DOWN = 1, @@ -77,7 +81,8 @@ export declare enum Action { * * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ UP = 2 } @@ -95,7 +100,8 @@ export declare enum Action { * @typedef Key * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface Key { /** @@ -109,7 +115,8 @@ export declare interface Key { * @type { KeyCode } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ code: KeyCode; @@ -121,12 +128,13 @@ export declare interface Key { */ /** * Time when the key is pressed - * @type { number } + * @type { long } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - pressedTime: number; + pressedTime: long; /** * Device to which the key belongs @@ -136,12 +144,13 @@ export declare interface Key { */ /** * Device to which the key belongs - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - deviceId: number; + deviceId: int; } /** @@ -158,7 +167,8 @@ export declare interface Key { * @extends InputEvent * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface KeyEvent extends InputEvent { /** @@ -172,7 +182,8 @@ export declare interface KeyEvent extends InputEvent { * @type { Action } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ action: Action; @@ -187,7 +198,8 @@ export declare interface KeyEvent extends InputEvent { * @type { Key } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ key: Key; @@ -199,12 +211,13 @@ export declare interface KeyEvent extends InputEvent { */ /** * Unicode character corresponding to the key - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - unicodeChar: number; + unicodeChar: int; /** * List of pressed keys @@ -217,7 +230,8 @@ export declare interface KeyEvent extends InputEvent { * @type { Key[] } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ keys: Key[]; @@ -232,7 +246,8 @@ export declare interface KeyEvent extends InputEvent { * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ctrlKey: boolean; @@ -247,7 +262,8 @@ export declare interface KeyEvent extends InputEvent { * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ altKey: boolean; @@ -262,7 +278,8 @@ export declare interface KeyEvent extends InputEvent { * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ shiftKey: boolean; @@ -277,7 +294,8 @@ export declare interface KeyEvent extends InputEvent { * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ logoKey: boolean; @@ -292,7 +310,8 @@ export declare interface KeyEvent extends InputEvent { * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ fnKey: boolean; @@ -307,7 +326,8 @@ export declare interface KeyEvent extends InputEvent { * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ capsLock: boolean; @@ -322,7 +342,8 @@ export declare interface KeyEvent extends InputEvent { * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ numLock: boolean; @@ -337,7 +358,8 @@ export declare interface KeyEvent extends InputEvent { * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ scrollLock: boolean; } \ No newline at end of file diff --git a/api/@ohos.multimodalInput.mouseEvent.d.ts b/api/@ohos.multimodalInput.mouseEvent.d.ts index 29c7d1936b505ea2a22aa3ee714a09856013d292..2ba7b937d5d805220572db3a484feca795de9067 100644 --- a/api/@ohos.multimodalInput.mouseEvent.d.ts +++ b/api/@ohos.multimodalInput.mouseEvent.d.ts @@ -26,14 +26,16 @@ import type { KeyCode } from './@ohos.multimodalInput.keyCode'; * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum Action { /** * Cancel * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ CANCEL = 0, @@ -41,7 +43,8 @@ export declare enum Action { * Moving of the mouse pointer * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ MOVE = 1, @@ -49,7 +52,8 @@ export declare enum Action { * Pressing down of the mouse * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ BUTTON_DOWN = 2, @@ -57,7 +61,8 @@ export declare enum Action { * Lifting of the mouse button * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ BUTTON_UP = 3, @@ -65,7 +70,8 @@ export declare enum Action { * Beginning of the axis event associated with the mouse * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ AXIS_BEGIN = 4, @@ -73,7 +79,8 @@ export declare enum Action { * Updating of the axis event associated with the mouse * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ AXIS_UPDATE = 5, @@ -81,7 +88,8 @@ export declare enum Action { * Ending of the axis event associated with the mouse * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ AXIS_END = 6, @@ -89,7 +97,8 @@ export declare enum Action { * Indicates a pointer action representing that a finger is pressed on touchpad. * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_DOWN = 7, @@ -97,7 +106,8 @@ export declare enum Action { * Indicates a pointer action representing that a finger leaves touchpad. * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ ACTION_UP = 8, } @@ -107,14 +117,16 @@ export declare enum Action { * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum Button { /** * Left button on the mouse * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ LEFT = 0, @@ -122,7 +134,8 @@ export declare enum Button { * Middle button on the mouse * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ MIDDLE = 1, @@ -130,7 +143,8 @@ export declare enum Button { * Right button on the mouse * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT = 2, @@ -138,7 +152,8 @@ export declare enum Button { * Side button on the mouse * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ SIDE = 3, @@ -146,7 +161,8 @@ export declare enum Button { * Extended button on the mouse * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ EXTRA = 4, @@ -154,7 +170,8 @@ export declare enum Button { * Forward button on the mouse * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ FORWARD = 5, @@ -162,7 +179,8 @@ export declare enum Button { * Back button on the mouse * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ BACK = 6, @@ -170,7 +188,8 @@ export declare enum Button { * Task key on the mouse * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ TASK = 7 } @@ -180,14 +199,16 @@ export declare enum Button { * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum Axis { /** * Vertical scroll axis * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ SCROLL_VERTICAL = 0, @@ -195,7 +216,8 @@ export declare enum Axis { * Horizontal scroll axis * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ SCROLL_HORIZONTAL = 1, @@ -203,7 +225,8 @@ export declare enum Axis { * Pinch axis * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ PINCH = 2 } @@ -213,24 +236,27 @@ export declare enum Axis { * * @interface AxisValue * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface AxisValue { /** * Axis type * @type { Axis } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ axis: Axis; /** * Axis value - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - value: number; + value: int; } /** @@ -238,14 +264,16 @@ export declare interface AxisValue { * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum ToolType { /** * Unknown type * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = 0, @@ -253,7 +281,8 @@ export declare enum ToolType { * Mouse * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ MOUSE = 1, @@ -261,7 +290,8 @@ export declare enum ToolType { * Joystick * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ JOYSTICK = 2, @@ -269,7 +299,8 @@ export declare enum ToolType { * Touch pad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ TOUCHPAD = 3, } @@ -280,71 +311,80 @@ export declare enum ToolType { * @extends InputEvent * @interface MouseEvent * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface MouseEvent extends InputEvent { /** * Mouse event action * @type { Action } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ action: Action; /** * X coordinate of the mouse pointer on the screen - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - screenX: number; + screenX: int; /** * Y coordinate of the mouse pointer on the screen - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - screenY: number; + screenY: int; /** * X coordinate of the mouse pointer in the window - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - windowX: number; + windowX: int; /** * Y coordinate of the mouse pointer in the window - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - windowY: number; + windowY: int; /** * X axis offset relative to the previous reported mouse pointer position. When the mouse pointer is at * the edge of the screen, the value may be less than the difference of the X coordinate reported twice. - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - rawDeltaX: number; + rawDeltaX: int; /** * Y axis offset relative to the previous reported mouse pointer position - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - rawDeltaY: number; + rawDeltaY: int; /** * Button that is currently pressed or released * @type { Button } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ button: Button; @@ -352,7 +392,8 @@ export declare interface MouseEvent extends InputEvent { * Button that is being pressed * @type { Button[] } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ pressedButtons: Button[]; @@ -360,7 +401,8 @@ export declare interface MouseEvent extends InputEvent { * All axis data contained in the event * @type { AxisValue[] } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ axes: AxisValue[]; @@ -368,7 +410,8 @@ export declare interface MouseEvent extends InputEvent { * List of pressed keys * @type { KeyCode[] } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ pressedKeys: KeyCode[]; @@ -376,7 +419,8 @@ export declare interface MouseEvent extends InputEvent { * Whether ctrlKey is being pressed * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ ctrlKey: boolean; @@ -384,7 +428,8 @@ export declare interface MouseEvent extends InputEvent { * Whether altKey is being pressed * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ altKey: boolean; @@ -392,7 +437,8 @@ export declare interface MouseEvent extends InputEvent { * Whether shiftKey is being pressed * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ shiftKey: boolean; @@ -400,7 +446,8 @@ export declare interface MouseEvent extends InputEvent { * Whether logoKey is being pressed * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ logoKey: boolean; @@ -408,7 +455,8 @@ export declare interface MouseEvent extends InputEvent { * Whether fnKey is being pressed * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ fnKey: boolean; @@ -416,7 +464,8 @@ export declare interface MouseEvent extends InputEvent { * Whether capsLock is active * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ capsLock: boolean; @@ -424,7 +473,8 @@ export declare interface MouseEvent extends InputEvent { * Whether numLock is active * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ numLock: boolean; @@ -432,7 +482,8 @@ export declare interface MouseEvent extends InputEvent { * Whether scrollLock is active * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ scrollLock: boolean; @@ -441,7 +492,8 @@ export declare interface MouseEvent extends InputEvent { * * @type { ToolType } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ toolType: ToolType; } \ No newline at end of file diff --git a/api/@ohos.multimodalInput.pointer.d.ts b/api/@ohos.multimodalInput.pointer.d.ts index 0491653da2e40fb95007ea90c2c4c448acb5600d..09ff8ae4681c72f79c3fce9d1238046798ef1559 100644 --- a/api/@ohos.multimodalInput.pointer.d.ts +++ b/api/@ohos.multimodalInput.pointer.d.ts @@ -489,21 +489,24 @@ declare namespace pointer { * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enum PrimaryButton { /** * Left mouse button * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ LEFT = 0, /** * Right mouse button * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ RIGHT = 1 } @@ -513,28 +516,32 @@ declare namespace pointer { * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enum RightClickType { /** * Tapping the right-button area of the touchpad. * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ TOUCHPAD_RIGHT_BUTTON = 1, /** * Tapping the left-button area of the touchpad. * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ TOUCHPAD_LEFT_BUTTON = 2, /** * Tapping or pressing the touchpad with two fingers. * * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ TOUCHPAD_TWO_FINGER_TAP = 3, /** @@ -595,7 +602,8 @@ declare namespace pointer { * * @interface CursorConfig * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ interface CursorConfig { /** @@ -605,7 +613,8 @@ declare namespace pointer { * * @type { boolean } * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ followSystem : boolean; } @@ -731,7 +740,7 @@ declare namespace pointer { /** * Sets the mouse pointer style. This API uses an asynchronous callback to return the result. * - * @param { number } windowId - Window ID. + * @param { int } windowId - Window ID. * @param { PointerStyle } pointerStyle - Pointer style. * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -740,12 +749,12 @@ declare namespace pointer { * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - function setPointerStyle(windowId: number, pointerStyle: PointerStyle, callback: AsyncCallback): void; + function setPointerStyle(windowId: int, pointerStyle: PointerStyle, callback: AsyncCallback): void; /** * Sets the mouse pointer style. This API uses a promise to return the result. * - * @param { number } windowId - Window ID. + * @param { int } windowId - Window ID. * @param { PointerStyle } pointerStyle - Pointer style. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; @@ -754,19 +763,20 @@ declare namespace pointer { * @since arkts {'1.1':'9', '1.2':'20'} * @arkts 1.1&1.2 */ - function setPointerStyle(windowId: number, pointerStyle: PointerStyle): Promise; + function setPointerStyle(windowId: int, pointerStyle: PointerStyle): Promise; /** * Sets the mouse pointer style. This API returns the result synchronously. * - * @param { number } windowId - Window ID. + * @param { int } windowId - Window ID. * @param { PointerStyle } pointerStyle - Pointer style. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; *
2. Incorrect parameter types; 3. Parameter verification failed. * @syscap SystemCapability.MultimodalInput.Input.Pointer - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setPointerStyleSync(windowId: number, pointerStyle: PointerStyle): void; + function setPointerStyleSync(windowId: int, pointerStyle: PointerStyle): void; /** * Obtains the mouse pointer style. This API uses an asynchronous callback to return the result. diff --git a/api/@ohos.multimodalInput.shortKey.d.ts b/api/@ohos.multimodalInput.shortKey.d.ts index d9436672cf2c72bab193bb906773ed73be5dafea..e906e19254e74b7848d7c375e0dfd5ff8d48f39c 100644 --- a/api/@ohos.multimodalInput.shortKey.d.ts +++ b/api/@ohos.multimodalInput.shortKey.d.ts @@ -74,7 +74,8 @@ export default shortKey; * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum FingerprintAction { /** @@ -82,7 +83,8 @@ export declare enum FingerprintAction { * * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DOWN = 0, @@ -91,7 +93,8 @@ export declare enum FingerprintAction { * * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ UP = 1, @@ -100,7 +103,8 @@ export declare enum FingerprintAction { * * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SLIDE = 2, @@ -109,7 +113,8 @@ export declare enum FingerprintAction { * * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ RETOUCH = 3, @@ -118,7 +123,8 @@ export declare enum FingerprintAction { * * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ CLICK = 4, } @@ -129,7 +135,8 @@ export declare enum FingerprintAction { * @interface FingerprintEvent * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface FingerprintEvent { /** @@ -138,7 +145,8 @@ export declare interface FingerprintEvent { * @type { FingerprintAction } * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ action: FingerprintAction; @@ -152,12 +160,13 @@ export declare interface FingerprintEvent { * and the horizontal rightward direction stands for the positive direction of the X axis. * This way, a rectangular coordinate system is constructed. * - * @type { number } + * @type { double } * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - distanceX: number; + distanceX: double; /** * This value indicates the sliding percentage of the fingerprint key on the Y axis, @@ -169,10 +178,11 @@ export declare interface FingerprintEvent { * and the horizontal rightward direction stands for the positive direction of the X axis. * This way, a rectangular coordinate system is constructed. * - * @type { number } + * @type { double } * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - distanceY: number; + distanceY: double; } \ No newline at end of file diff --git a/api/@ohos.multimodalInput.touchEvent.d.ts b/api/@ohos.multimodalInput.touchEvent.d.ts index a7a66aeccb0b67f7c714e75706082f9e0d3ef8b1..3f2e9e8bf8202dc9fff3fd43a37e4f8caad773e8 100644 --- a/api/@ohos.multimodalInput.touchEvent.d.ts +++ b/api/@ohos.multimodalInput.touchEvent.d.ts @@ -25,14 +25,16 @@ import type { InputEvent } from './@ohos.multimodalInput.inputEvent'; * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum Action { /** * Touch cancelled * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ CANCEL = 0, @@ -40,7 +42,8 @@ export declare enum Action { * Touch pressed * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ DOWN = 1, @@ -48,7 +51,8 @@ export declare enum Action { * Touch moved * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ MOVE = 2, @@ -56,7 +60,8 @@ export declare enum Action { * Touch lifted * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ UP = 3 } @@ -66,14 +71,16 @@ export declare enum Action { * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum ToolType { /** * Finger * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ FINGER = 0, @@ -81,7 +88,8 @@ export declare enum ToolType { * Stylus * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ PEN = 1, @@ -89,7 +97,8 @@ export declare enum ToolType { * Rubber * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ RUBBER = 2, @@ -97,7 +106,8 @@ export declare enum ToolType { * Brush * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ BRUSH = 3, @@ -105,7 +115,8 @@ export declare enum ToolType { * Pencil * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ PENCIL = 4, @@ -113,7 +124,8 @@ export declare enum ToolType { * Air brush * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ AIRBRUSH = 5, @@ -121,7 +133,8 @@ export declare enum ToolType { * Mouse * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ MOUSE = 6, @@ -129,7 +142,8 @@ export declare enum ToolType { * lens * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ LENS = 7 } @@ -139,14 +153,16 @@ export declare enum ToolType { * * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum SourceType { /** * Touchscreen * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ TOUCH_SCREEN = 0, @@ -154,7 +170,8 @@ export declare enum SourceType { * Stylus * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ PEN = 1, @@ -162,7 +179,8 @@ export declare enum SourceType { * Touchpad * * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ TOUCH_PAD = 2 } @@ -173,7 +191,8 @@ export declare enum SourceType { * @enum { number } * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare enum FixedMode { /** @@ -181,7 +200,8 @@ export declare enum FixedMode { * * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ NONE = 0, @@ -190,7 +210,8 @@ export declare enum FixedMode { * * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ AUTO = 1 } @@ -200,170 +221,191 @@ export declare enum FixedMode { * * @interface Touch * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface Touch { /** * Pointer identifier - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - id: number; + id: int; /** * Time stamp when touch is pressed - * @type { number } + * @type { long } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - pressedTime: number; + pressedTime: long; /** * X coordinate of the touch position on the screen - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - screenX: number; + screenX: int; /** * Y coordinate of the touch position on the screen - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - screenY: number; + screenY: int; /** * X coordinate of the touch position in the window - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - windowX: number; + windowX: int; /** * Y coordinate of the touch position in the window - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - windowY: number; + windowY: int; /** * Pressure value. The value range is [0.0, 1.0]. The value 0.0 indicates that the pressure is not supported. - * @type { number } + * @type { double } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - pressure: number; + pressure: double; /** * Width of the contact area when touch is pressed - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - width: number; + width: int; /** * Height of the contact area when touch is pressed - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - height: number; + height: int; /** * Angle relative to the YZ plane. The value range is [-90, 90]. A positive value indicates a rightward tilt. - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - tiltX: number; + tiltX: int; /** * Angle relative to the XZ plane. The value range is [-90, 90]. A positive value indicates a downward tilt. - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - tiltY: number; + tiltY: int; /** * Center point X of the tool area - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - toolX: number; + toolX: int; /** * Center point Y of the tool area - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - toolY: number; + toolY: int; /** * Width of the tool area - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - toolWidth: number; + toolWidth: int; /** * Height of the tool area - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - toolHeight: number; + toolHeight: int; /** * X coordinate of the input device - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - rawX: number; + rawX: int; /** * Y coordinate of the input device - * @type { number } + * @type { int } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - rawY: number; + rawY: int; /** * Tool type * @type { ToolType } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ toolType: ToolType; /** * fixedDisplayX - Corrected value of the screen x coordinate. - * @type { number } + * @type { ?int } * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ - fixedDisplayX?: number; + fixedDisplayX?: int; /** * fixedDisplayY - Corrected value of the screen y coordinate. - * @type { number } + * @type { ?int } * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ - fixedDisplayY?: number; + fixedDisplayY?: int; } /** @@ -372,14 +414,16 @@ export declare interface Touch { * @extends InputEvent * @interface TouchEvent * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export declare interface TouchEvent extends InputEvent { /** * Touch action * @type { Action } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ action: Action; @@ -387,7 +431,8 @@ export declare interface TouchEvent extends InputEvent { * Current touch point * @type { Touch } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ touch: Touch; @@ -395,7 +440,8 @@ export declare interface TouchEvent extends InputEvent { * All touch points * @type { Touch[] } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ touches: Touch[]; @@ -403,7 +449,8 @@ export declare interface TouchEvent extends InputEvent { * Device type of the touch source * @type { SourceType } * @syscap SystemCapability.MultimodalInput.Input.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ sourceType: SourceType; @@ -413,7 +460,8 @@ export declare interface TouchEvent extends InputEvent { * @type { FixedMode } * @syscap SystemCapability.MultimodalInput.Input.Core * @systemapi Hide this for inner system use. - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ fixedMode?: FixedMode; diff --git a/api/@ohos.net.connection.d.ts b/api/@ohos.net.connection.d.ts index 283b93bbd900f3c374b2261b2443aade1de792ce..b62e262a3ce7cc58f48f146dba78a2fe1a8f3ba7 100644 --- a/api/@ohos.net.connection.d.ts +++ b/api/@ohos.net.connection.d.ts @@ -44,7 +44,7 @@ import type socket from './@ohos.net.socket'; * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since arkts{'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ declare namespace connection { @@ -102,7 +102,7 @@ declare namespace connection { /** * Create a network connection with optional netSpecifier and timeout. * @param { NetSpecifier } [netSpecifier] - Indicates the network specifier. See {@link NetSpecifier}. - * @param { number } [timeout] - The time in milliseconds to attempt looking for a suitable network before + * @param { int } [timeout] - The time in milliseconds to attempt looking for a suitable network before * {@link NetConnection#netUnavailable} is called. * @returns { NetConnection } the NetConnection of the NetSpecifier. * @syscap SystemCapability.Communication.NetManager.Core @@ -111,7 +111,7 @@ declare namespace connection { /** * Create a network connection with optional netSpecifier and timeout. * @param { NetSpecifier } [netSpecifier] - Indicates the network specifier. See {@link NetSpecifier}. - * @param { number } [timeout] - The time in milliseconds to attempt looking for a suitable network before + * @param { int } [timeout] - The time in milliseconds to attempt looking for a suitable network before * {@link NetConnection#netUnavailable} is called. * @returns { NetConnection } the NetConnection of the NetSpecifier. * @syscap SystemCapability.Communication.NetManager.Core @@ -121,15 +121,16 @@ declare namespace connection { /** * Create a network connection with optional netSpecifier and timeout. * @param { NetSpecifier } [netSpecifier] - Indicates the network specifier. See {@link NetSpecifier}. - * @param { number } [timeout] - The time in milliseconds to attempt looking for a suitable network before + * @param { int } [timeout] - The time in milliseconds to attempt looking for a suitable network before * {@link NetConnection#netUnavailable} is called. * @returns { NetConnection } the NetConnection of the NetSpecifier. * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - function createNetConnection(netSpecifier?: NetSpecifier, timeout?: number): NetConnection; + function createNetConnection(netSpecifier?: NetSpecifier, timeout?: int): NetConnection; /** * Obtains the data network that is activated by default. @@ -154,7 +155,7 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since arkts{'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ function getDefaultNet(callback: AsyncCallback): void; @@ -181,7 +182,7 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since arkts{'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ function getDefaultNet(): Promise; @@ -208,7 +209,7 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since arkts{'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ function getDefaultNetSync(): NetHandle; @@ -223,7 +224,8 @@ declare namespace connection { * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function getAllNets(callback: AsyncCallback>): void; @@ -236,7 +238,8 @@ declare namespace connection { * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function getAllNets(): Promise>; @@ -249,7 +252,8 @@ declare namespace connection { * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function getAllNetsSync(): Array; @@ -265,7 +269,8 @@ declare namespace connection { * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function getConnectionProperties(netHandle: NetHandle, callback: AsyncCallback): void; @@ -281,7 +286,8 @@ declare namespace connection { * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function getConnectionProperties(netHandle: NetHandle): Promise; @@ -297,7 +303,8 @@ declare namespace connection { * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function getConnectionPropertiesSync(netHandle: NetHandle): ConnectionProperties; @@ -328,7 +335,8 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function getNetCapabilities(netHandle: NetHandle, callback: AsyncCallback): void; @@ -359,7 +367,8 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function getNetCapabilities(netHandle: NetHandle): Promise; @@ -390,7 +399,8 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function getNetCapabilitiesSync(netHandle: NetHandle): NetCapabilities; @@ -516,7 +526,8 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function hasDefaultNet(callback: AsyncCallback): void; @@ -540,7 +551,8 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function hasDefaultNet(): Promise; @@ -552,7 +564,8 @@ declare namespace connection { * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function hasDefaultNetSync(): boolean; @@ -568,7 +581,8 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. Only used for system app. - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function enableAirplaneMode(callback: AsyncCallback): void; @@ -583,7 +597,8 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. Only used for system app. - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function enableAirplaneMode(): Promise; @@ -599,7 +614,8 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. Only used for system app. - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function disableAirplaneMode(callback: AsyncCallback): void; @@ -614,7 +630,8 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. Only used for system app. - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ function disableAirplaneMode(): Promise; @@ -753,7 +770,8 @@ declare namespace connection { * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function setAppNet(netHandle: NetHandle, callback: AsyncCallback): void; @@ -786,7 +804,8 @@ declare namespace connection { * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function getDefaultHttpProxy(callback: AsyncCallback): void; @@ -802,7 +821,8 @@ declare namespace connection { * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function getDefaultHttpProxy(): Promise; @@ -815,7 +835,8 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function getGlobalHttpProxy(callback: AsyncCallback): void; @@ -827,7 +848,8 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function getGlobalHttpProxy(): Promise; @@ -837,7 +859,8 @@ declare namespace connection { * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2100001 - Invalid http proxy. * @syscap SystemCapability.Communication.NetManager.Core - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function setAppHttpProxy(httpProxy: HttpProxy): void; @@ -854,7 +877,8 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function setGlobalHttpProxy(httpProxy: HttpProxy, callback: AsyncCallback): void; @@ -871,7 +895,8 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function setGlobalHttpProxy(httpProxy: HttpProxy): Promise; @@ -1058,7 +1083,8 @@ declare namespace connection { * @throws { BusinessError } 2100003 - System internal error. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. Only used for system app. - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function factoryReset(): Promise; @@ -1081,7 +1107,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NetConnection { /** @@ -1106,7 +1133,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'netAvailable', callback: Callback): void; @@ -1148,7 +1176,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'netCapabilitiesChange', callback: Callback): void; @@ -1164,7 +1193,8 @@ declare namespace connection { * @param { 'netConnectionPropertiesChange' } type - Indicates Event name. * @param { Callback } callback - the callback used to return the result. * @syscap SystemCapability.Communication.NetManager.Core - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'netConnectionPropertiesChange', callback: Callback): void; @@ -1260,7 +1290,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ register(callback: AsyncCallback): void; @@ -1310,7 +1341,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ unregister(callback: AsyncCallback): void; } @@ -1326,7 +1358,8 @@ declare namespace connection { * @interface NetSpecifier * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NetSpecifier { /** @@ -1340,7 +1373,8 @@ declare namespace connection { * @type {NetCapabilities} * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ netCapabilities: NetCapabilities; @@ -1355,7 +1389,8 @@ declare namespace connection { * @type {?string} * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bearerPrivateIdentifier?: string; } @@ -1373,7 +1408,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NetCapabilityInfo { /** @@ -1389,7 +1425,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ netHandle: NetHandle; @@ -1406,7 +1443,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ netCap: NetCapabilities; } @@ -1430,33 +1468,33 @@ declare namespace connection { * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since arkts{'1.1': '11', '1.2': '20'} * @arkts 1.1&1.2 */ export interface NetHandle { /** * Network ID, a value of 0 means that there is no default network, and the other values must be greater than or equal to 100. - * @type {number} + * @type {int} * @syscap SystemCapability.Communication.NetManager.Core * @since 8 */ /** * Network ID, a value of 0 means that there is no default network, and the other values must be greater than or equal to 100. - * @type {number} + * @type {int} * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @since 10 */ /** * Network ID, a value of 0 means that there is no default network, and the other values must be greater than or equal to 100. - * @type {number} + * @type {int} * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} + * @since arkts{'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - netId: number; + netId: int; /** *

Binds a TCPSocket or UDPSocket to the current network. All data flows from @@ -1596,24 +1634,27 @@ declare namespace connection { * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NetCapabilities { /** * Uplink (device-to-network) bandwidth. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ - linkUpBandwidthKbps?: number; + linkUpBandwidthKbps?: int; /** * Downstream (network-to-device) bandwidth. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ - linkDownBandwidthKbps?: number; + linkDownBandwidthKbps?: int; /** * Network-specific capabilities. @@ -1626,7 +1667,8 @@ declare namespace connection { * @type {?Array} * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ networkCap?: Array; @@ -1649,7 +1691,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ bearerTypes: Array; } @@ -1658,21 +1701,24 @@ declare namespace connection { * Get information about network connections. * @interface NetConnectionPropertyInfo * @syscap SystemCapability.Communication.NetManager.Core - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NetConnectionPropertyInfo { /** * Defines the handle of the data network. * @type { NetHandle } * @syscap SystemCapability.Communication.NetManager.Core - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ netHandle: NetHandle; /** * Defines the network connection properties. * @type { ConnectionProperties } * @syscap SystemCapability.Communication.NetManager.Core - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ connectionProperties: ConnectionProperties; } @@ -1681,37 +1727,41 @@ declare namespace connection { * Get network status information. * @interface NetBlockStatusInfo * @syscap SystemCapability.Communication.NetManager.Core - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NetBlockStatusInfo { /** * Defines the handle of the data network. * @type { NetHandle } * @syscap SystemCapability.Communication.NetManager.Core - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ netHandle: NetHandle; /** * Check whether the current state is blocked. * @type { boolean } * @syscap SystemCapability.Communication.NetManager.Core - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ blocked: boolean; } /** * Defines the network capability. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetManager.Core * @since 8 */ /** * Defines the network capability. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export enum NetCap { /** @@ -1723,7 +1773,8 @@ declare namespace connection { * Indicates that the network can access the carrier's MMSC to send and receive multimedia messages. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NET_CAPABILITY_MMS = 0, @@ -1736,7 +1787,8 @@ declare namespace connection { * Indicates that the network traffic is not metered. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NET_CAPABILITY_NOT_METERED = 11, @@ -1749,7 +1801,8 @@ declare namespace connection { * Indicates that the network can access the Internet. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NET_CAPABILITY_INTERNET = 12, @@ -1762,7 +1815,8 @@ declare namespace connection { * Indicates that the network does not use a VPN. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NET_CAPABILITY_NOT_VPN = 15, @@ -1775,14 +1829,16 @@ declare namespace connection { * Indicates that the network is available. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NET_CAPABILITY_VALIDATED = 16, /** * Indicates that the network is portal. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NET_CAPABILITY_PORTAL = 17, @@ -1790,31 +1846,33 @@ declare namespace connection { * Indicates that the network is checking connectivity. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ NET_CAPABILITY_CHECKING_CONNECTIVITY = 31 } /** * Enumerates network types. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetManager.Core * @since 8 */ /** * Enumerates network types. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @since 10 */ /** * Enumerates network types. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export enum NetBearType { /** @@ -1833,7 +1891,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BEARER_CELLULAR = 0, @@ -1853,7 +1912,8 @@ declare namespace connection { * @syscap SystemCapability.Communication.NetManager.Core * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BEARER_WIFI = 1, @@ -1875,14 +1935,16 @@ declare namespace connection { * Indicates that the network is an Ethernet network. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BEARER_ETHERNET = 3, /** * Indicates that the network is based on a VPN network. * @syscap SystemCapability.Communication.NetManager.Core - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ BEARER_VPN = 4, } @@ -1891,28 +1953,32 @@ declare namespace connection { * Defines the network connection properties. * @interface ConnectionProperties * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ export interface ConnectionProperties { /** * Network card name. * @type {string} * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ interfaceName: string; /** * Domain. The default value is "". * @type {string} * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ domains: string; /** * Link information. * @type {Array} * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ linkAddresses: Array; @@ -1920,7 +1986,8 @@ declare namespace connection { * Network address, refer to [NetAddress]. * @type {Array} * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ dnses: Array; @@ -1928,24 +1995,27 @@ declare namespace connection { * Routing information. * @type {Array} * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ routes: Array; /** * Maximum transmission unit. - * @type {number} + * @type {int} * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ - mtu: number; + mtu: int; } /** * Defines network route information. * @interface RouteInfo * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ export interface RouteInfo { /** @@ -1960,7 +2030,8 @@ declare namespace connection { * Destination Address * @type {LinkAddress} * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ destination: LinkAddress; @@ -1968,7 +2039,8 @@ declare namespace connection { * Gateway address. * @type {NetAddress} * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ gateway: NetAddress; @@ -1976,7 +2048,8 @@ declare namespace connection { * Whether a gateway is present. * @type {boolean} * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ hasGateway: boolean; @@ -1984,7 +2057,8 @@ declare namespace connection { * Whether the route is the default route. * @type {boolean} * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ isDefaultRoute: boolean; } @@ -1993,23 +2067,26 @@ declare namespace connection { * Defines network link information. * @interface LinkAddress * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ export interface LinkAddress { /** * Link address. * @type {NetAddress} * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ address: NetAddress; /** * The length of the link address prefix. - * @type {number} + * @type {int} * @syscap SystemCapability.Communication.NetManager.Core - * @since 8 + * @since arkts{'1.1':'8','1.2':'20'} + * @arkts 1.1&1.2 */ - prefixLength: number; + prefixLength: int; } /** @@ -2023,7 +2100,8 @@ declare namespace connection { * @interface NetAddress * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NetAddress { /** @@ -2037,39 +2115,42 @@ declare namespace connection { * @type {string} * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ address: string; /** * Address family identifier. The value is 1 for IPv4 and 2 for IPv6. The default value is 1. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetManager.Core * @since 8 */ /** * Address family identifier. The value is 1 for IPv4 and 2 for IPv6. The default value is 1. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - family?: number; + family?: int; /** * Port number. The value ranges from 0 to 65535. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetManager.Core * @since 8 */ /** * Port number. The value ranges from 0 to 65535. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - port?: number; + port?: int; } /** @@ -2083,7 +2164,8 @@ declare namespace connection { * @interface HttpProxy * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface HttpProxy { /** @@ -2097,30 +2179,33 @@ declare namespace connection { * @type {string} * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ host: string; /** * Host port. - * @type {number} + * @type {int} * @syscap SystemCapability.Communication.NetManager.Core * @since 10 */ /** * Host port. - * @type {number} + * @type {int} * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - port: number; + port: int; /** * Http proxy username. * @type {?string} * @syscap SystemCapability.Communication.NetManager.Core - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ username?: string; @@ -2128,7 +2213,8 @@ declare namespace connection { * Http proxy password. * @type {?string} * @syscap SystemCapability.Communication.NetManager.Core - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ password?: string; @@ -2143,7 +2229,8 @@ declare namespace connection { * @type {Array} * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ exclusionList: Array; } diff --git a/api/@ohos.net.http.d.ts b/api/@ohos.net.http.d.ts index c6f57786217bf276d0c31eddb5667e440cd3e325..f4537f343a7f06059ce8e6653c8aefcd4df6b0e9 100644 --- a/api/@ohos.net.http.d.ts +++ b/api/@ohos.net.http.d.ts @@ -40,7 +40,8 @@ import type connection from './@ohos.net.connection'; * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace http { /** @@ -60,7 +61,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type HttpProxy = connection.HttpProxy; @@ -83,7 +85,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function createHttp(): HttpRequest; @@ -135,7 +138,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface HttpRequestOptions { /** @@ -157,7 +161,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ method?: RequestMethod; @@ -183,7 +188,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ extraData?: string | Object | ArrayBuffer; @@ -206,7 +212,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ expectDataType?: HttpDataType; @@ -229,32 +236,34 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ usingCache?: boolean; /** * [1, 1000], default is 1. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @since 9 */ /** * [1, 1000], default is 1. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 10 */ /** * [1, 1000], default is 1. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - priority?: number; + priority?: int; /** * HTTP request header. default is 'content-type': 'application/json' @@ -275,55 +284,58 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ header?: Object; /** * Read timeout period. The default value is 60,000, in ms. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @since 6 */ /** * Read timeout period. The default value is 60,000, in ms. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 10 */ /** * Read timeout period. The default value is 60,000, in ms. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - readTimeout?: number; + readTimeout?: int; /** * Connection timeout interval. The default value is 60,000, in ms. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @since 6 */ /** * Connection timeout interval. The default value is 60,000, in ms. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 10 */ /** * Connection timeout interval. The default value is 60,000, in ms. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - connectTimeout?: number; + connectTimeout?: int; /** * default is automatically specified by the system. @@ -344,7 +356,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ usingProtocol?: HttpProtocol; @@ -370,12 +383,13 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ usingProxy?: boolean | HttpProxy; /** - * If this parameter is set, the system will use ca path specified by user, or else use preset ca by the system. + * If this parameter is set, the system will use ca path specified by user, or else use preset ca by the system. * @type {?string} * @syscap SystemCapability.Communication.NetStack * @since 10 @@ -401,7 +415,7 @@ declare namespace http { * 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. * For HTTP PUT uploads this option should not be used, since it may conflict with other options. - * @type {?number} + * @type {?long} * @syscap SystemCapability.Communication.NetStack * @since 11 */ @@ -409,18 +423,18 @@ declare namespace http { * 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. * For HTTP PUT uploads this option should not be used, since it may conflict with other options. - * @type {?number} + * @type {?long} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 12 */ - resumeFrom?: number; + resumeFrom?: long; /** * Used to set to uploading or downloading the end bytes. Translate to the end if not set. * HTTP standard (RFC 7233 section 3.1) allows servers to ignore range requests. * For HTTP PUT uploads this option should not be used, since it may conflict with other options. - * @type {?number} + * @type {?long} * @syscap SystemCapability.Communication.NetStack * @since 11 */ @@ -428,12 +442,12 @@ declare namespace http { * Used to set to uploading or downloading the end bytes. Translate to the end if not set. * HTTP standard (RFC 7233 section 3.1) allows servers to ignore range requests. * For HTTP PUT uploads this option should not be used, since it may conflict with other options. - * @type {?number} + * @type {?long} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 12 */ - resumeTo?: number; + resumeTo?: long; /** * Support the application to pass in client certificates, allowing the server to verify the client's identity. @@ -446,7 +460,8 @@ declare namespace http { * @type {?ClientCert} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ clientCert?: ClientCert; @@ -491,19 +506,19 @@ declare namespace http { /** * The maximum limit of the response body. The default value is 5 * 1024 * 1024, in Byte. * The maximum value is 100 * 1024 *1024, in Byte. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * The maximum limit of the response body. The default value is 5 * 1024 * 1024, in Byte. * The maximum value is 100 * 1024 *1024, in Byte. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 12 */ - maxLimit?: number; + maxLimit?: int; /** * The data fields which is supported by the HTTP protocol to post @@ -520,7 +535,8 @@ declare namespace http { * @type {?Array} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ multiFormDataList?: Array; @@ -574,7 +590,8 @@ declare namespace http { * @typedef ServerAuthentication * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export interface ServerAuthentication { /** @@ -582,7 +599,8 @@ declare namespace http { * @type {Credential} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ credential: Credential; /** @@ -590,7 +608,8 @@ declare namespace http { * @type {?AuthenticationType} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ authenticationType?: AuthenticationType; } @@ -602,7 +621,8 @@ declare namespace http { * @typedef {'system' | TlsConfig} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export type TlsOptions = 'system' | TlsConfig; @@ -611,7 +631,8 @@ declare namespace http { * @typedef {'system' | 'skip'} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export type RemoteValidation = 'system' | 'skip'; @@ -620,7 +641,8 @@ declare namespace http { * @typedef {'basic' | 'ntlm' | 'digest'} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export type AuthenticationType = 'basic' | 'ntlm' | 'digest'; @@ -629,7 +651,8 @@ declare namespace http { * @typedef Credential * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export interface Credential { /** @@ -637,7 +660,8 @@ declare namespace http { * @type {string} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ username: string; /** @@ -645,7 +669,8 @@ declare namespace http { * @type {string} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ password: string; } @@ -655,7 +680,8 @@ declare namespace http { * @typedef TlsConfig * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export interface TlsConfig { /** @@ -663,7 +689,8 @@ declare namespace http { * @type {TlsVersion} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ tlsVersionMin: TlsVersion; /** @@ -671,7 +698,8 @@ declare namespace http { * @type {TlsVersion} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ tlsVersionMax: TlsVersion; /** @@ -679,7 +707,8 @@ declare namespace http { * @type {?CipherSuite[]} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ cipherSuites?: CipherSuite[]; } @@ -690,7 +719,8 @@ declare namespace http { * @typedef {'TLS_AES_128_GCM_SHA256' | 'TLS_AES_256_GCM_SHA384' | 'TLS_CHACHA20_POLY1305_SHA256'} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export type TlsV13SpecificCipherSuite = 'TLS_AES_128_GCM_SHA256' | 'TLS_AES_256_GCM_SHA384' | 'TLS_CHACHA20_POLY1305_SHA256'; @@ -699,7 +729,8 @@ declare namespace http { * @typedef {'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256' | 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256' | 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384' | 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384' | 'TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256' | 'TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256' | 'TLS_RSA_WITH_AES_128_GCM_SHA256' | 'TLS_RSA_WITH_AES_256_GCM_SHA384'} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export type TlsV12SpecificCipherSuite = 'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256' | 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256' | 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384' | 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384' | 'TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256' | 'TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256' | 'TLS_RSA_WITH_AES_128_GCM_SHA256' | 'TLS_RSA_WITH_AES_256_GCM_SHA384'; @@ -708,7 +739,8 @@ declare namespace http { * @typedef {'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA' | 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA' | 'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA' | 'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA' | 'TLS_RSA_WITH_AES_128_CBC_SHA' | 'TLS_RSA_WITH_AES_256_CBC_SHA' | 'TLS_RSA_WITH_3DES_EDE_CBC_SHA'} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export type TlsV10SpecificCipherSuite = 'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA' | 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA' | 'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA' | 'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA' | 'TLS_RSA_WITH_AES_128_CBC_SHA' | 'TLS_RSA_WITH_AES_256_CBC_SHA' | 'TLS_RSA_WITH_3DES_EDE_CBC_SHA'; @@ -717,7 +749,8 @@ declare namespace http { * @typedef {TlsV13CipherSuite} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export type CipherSuite = TlsV13CipherSuite; @@ -726,7 +759,8 @@ declare namespace http { * @typedef {TlsV12CipherSuite | TlsV13SpecificCipherSuite} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export type TlsV13CipherSuite = TlsV12CipherSuite | TlsV13SpecificCipherSuite; @@ -735,7 +769,8 @@ declare namespace http { * @typedef {TlsV11CipherSuite | TlsV12SpecificCipherSuite} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export type TlsV12CipherSuite = TlsV11CipherSuite | TlsV12SpecificCipherSuite; @@ -744,7 +779,8 @@ declare namespace http { * @typedef {TlsV10CipherSuite} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export type TlsV11CipherSuite = TlsV10CipherSuite; @@ -753,23 +789,26 @@ declare namespace http { * @typedef {TlsV10SpecificCipherSuite} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export type TlsV10CipherSuite = TlsV10SpecificCipherSuite; /** * Enum for Tls version - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export enum TlsVersion { /** * Tls version 1.0 * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TLS_V_1_0 = 4, @@ -777,7 +816,8 @@ declare namespace http { * Tls version 1.1 * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TLS_V_1_1 = 5, @@ -785,7 +825,8 @@ declare namespace http { * Tls version 1.2 * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TLS_V_1_2 = 6, @@ -793,7 +834,8 @@ declare namespace http { * Tls version 1.3 * @syscap SystemCapability.Communication.NetStack * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ TLS_V_1_3 = 7 } @@ -809,7 +851,8 @@ declare namespace http { * @interface MultiFormData * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface MultiFormData { /** @@ -823,7 +866,8 @@ declare namespace http { * @type {string} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ name: string; @@ -838,7 +882,8 @@ declare namespace http { * @type {string} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ contentType: string; @@ -853,7 +898,8 @@ declare namespace http { * @type {?string} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ remoteFileName?: string; @@ -868,7 +914,8 @@ declare namespace http { * @type {?(string | Object | ArrayBuffer)} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ data?: string | Object | ArrayBuffer; @@ -889,7 +936,8 @@ declare namespace http { * @type {?string} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ filePath?: string; } @@ -905,7 +953,8 @@ declare namespace http { * @enum {string} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export enum CertType { /** @@ -917,7 +966,8 @@ declare namespace http { * PEM format certificate * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PEM = 'PEM', @@ -930,7 +980,8 @@ declare namespace http { * DER format certificate * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ DER = 'DER', @@ -943,7 +994,8 @@ declare namespace http { * P12 format certificate * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ P12 = 'P12' } @@ -961,7 +1013,8 @@ declare namespace http { * @interface ClientCert * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface ClientCert { /** @@ -975,7 +1028,8 @@ declare namespace http { * @type {string} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ certPath: string; @@ -990,7 +1044,8 @@ declare namespace http { * @type {?CertType} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ certType?: CertType; @@ -1005,7 +1060,8 @@ declare namespace http { * @type {string} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ keyPath: string; @@ -1020,7 +1076,8 @@ declare namespace http { * @type {?string} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ keyPassword?: string; } @@ -1070,14 +1127,15 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface HttpRequest { /** * Initiates an HTTP request to a given URL. * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. - * @param { AsyncCallback } callback - the callback of request. + * @param { AsyncCallback } callback - the callback of request. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -1276,7 +1334,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ request(url: string, callback: AsyncCallback): void; @@ -1488,7 +1547,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ request(url: string, options: HttpRequestOptions, callback: AsyncCallback): void; @@ -1497,7 +1557,7 @@ declare namespace http { * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. * @param { HttpRequestOptions } [options] - Optional parameters {@link HttpRequestOptions}. - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -1537,7 +1597,7 @@ declare namespace http { * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. * @param { HttpRequestOptions } [options] - Optional parameters {@link HttpRequestOptions}. - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -1700,7 +1760,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 18 + * @since arkts{'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ request(url: string, options?: HttpRequestOptions): Promise; @@ -1708,8 +1769,8 @@ declare namespace http { * Initiates an HTTP request to a given URL, applicable to scenarios where http response supports streaming. * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. - * @param { AsyncCallback } callback - Returns the callback of requestInStream {@link ResponseCode}, - * should use on_headersReceive and on_dataReceive to get http response. + * @param { AsyncCallback } callback - Returns the callback of requestInStream {@link ResponseCode}, + * should use on_headersReceive and on_dataReceive to get http response. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -1748,8 +1809,8 @@ declare namespace http { * Initiates an HTTP request to a given URL, applicable to scenarios where http response supports streaming. * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. - * @param { AsyncCallback } callback - Returns the callback of requestInStream {@link ResponseCode}, - * should use on_headersReceive and on_dataReceive to get http response. + * @param { AsyncCallback } callback - Returns the callback of requestInStream {@link ResponseCode}, + * should use on_headersReceive and on_dataReceive to get http response. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -1789,8 +1850,8 @@ declare namespace http { * Initiates an HTTP request to a given URL, applicable to scenarios where http response supports streaming. * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. - * @param { AsyncCallback } callback - Returns the callback of requestInStream {@link ResponseCode}, - * should use on_headersReceive and on_dataReceive to get http response. + * @param { AsyncCallback } callback - Returns the callback of requestInStream {@link ResponseCode}, + * should use on_headersReceive and on_dataReceive to get http response. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -1831,8 +1892,8 @@ declare namespace http { * Initiates an HTTP request to a given URL, applicable to scenarios where http response supports streaming. * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. - * @param { AsyncCallback } callback - Returns the callback of requestInStream {@link ResponseCode}, - * should use on_headersReceive and on_dataReceive to get http response. + * @param { AsyncCallback } callback - Returns the callback of requestInStream {@link ResponseCode}, + * should use on_headersReceive and on_dataReceive to get http response. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -1871,14 +1932,14 @@ declare namespace http { * @atomicservice * @since 18 */ - requestInStream(url: string, callback: AsyncCallback): void; + requestInStream(url: string, callback: AsyncCallback): void; /** * Initiates an HTTP request to a given URL, applicable to scenarios where http response supports streaming. * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. * @param { HttpRequestOptions } options - Optional parameters {@link HttpRequestOptions}. - * @param { AsyncCallback } callback - the callback of requestInStream. + * @param { AsyncCallback } callback - the callback of requestInStream. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -1918,7 +1979,7 @@ declare namespace http { * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. * @param { HttpRequestOptions } options - Optional parameters {@link HttpRequestOptions}. - * @param { AsyncCallback } callback - the callback of requestInStream. + * @param { AsyncCallback } callback - the callback of requestInStream. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -1959,7 +2020,7 @@ declare namespace http { * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. * @param { HttpRequestOptions } options - Optional parameters {@link HttpRequestOptions}. - * @param { AsyncCallback } callback - the callback of requestInStream. + * @param { AsyncCallback } callback - the callback of requestInStream. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -2001,7 +2062,7 @@ declare namespace http { * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. * @param { HttpRequestOptions } options - Optional parameters {@link HttpRequestOptions}. - * @param { AsyncCallback } callback - the callback of requestInStream. + * @param { AsyncCallback } callback - the callback of requestInStream. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -2040,14 +2101,14 @@ declare namespace http { * @atomicservice * @since 18 */ - requestInStream(url: string, options: HttpRequestOptions, callback: AsyncCallback): void; + requestInStream(url: string, options: HttpRequestOptions, callback: AsyncCallback): void; /** * Initiates an HTTP request to a given URL, applicable to scenarios where http response supports streaming. * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. * @param { HttpRequestOptions } [options] - Optional parameters {@link HttpRequestOptions}. - * @returns { Promise } the promise returned by the function. + * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -2087,7 +2148,7 @@ declare namespace http { * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. * @param { HttpRequestOptions } [options] - Optional parameters {@link HttpRequestOptions}. - * @returns { Promise } the promise returned by the function. + * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -2128,7 +2189,7 @@ declare namespace http { * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. * @param { HttpRequestOptions } [options] - Optional parameters {@link HttpRequestOptions}. - * @returns { Promise } the promise returned by the function. + * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -2170,7 +2231,7 @@ declare namespace http { * @permission ohos.permission.INTERNET * @param { string } url - URL for initiating an HTTP request. * @param { HttpRequestOptions } [options] - Optional parameters {@link HttpRequestOptions}. - * @returns { Promise } the promise returned by the function. + * @returns { Promise } the promise returned by the function. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 2300001 - Unsupported protocol. @@ -2209,7 +2270,7 @@ declare namespace http { * @atomicservice * @since 18 */ - requestInStream(url: string, options?: HttpRequestOptions): Promise; + requestInStream(url: string, options?: HttpRequestOptions): Promise; /** * Destroys an HTTP request. @@ -2227,7 +2288,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ destroy(): void; @@ -2573,7 +2635,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export enum RequestMethod { /** @@ -2592,7 +2655,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OPTIONS = "OPTIONS", @@ -2612,7 +2676,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ GET = "GET", @@ -2632,7 +2697,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ HEAD = "HEAD", @@ -2652,7 +2718,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ POST = "POST", @@ -2672,7 +2739,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PUT = "PUT", @@ -2692,7 +2760,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ DELETE = "DELETE", @@ -2712,7 +2781,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ TRACE = "TRACE", @@ -2732,31 +2802,33 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CONNECT = "CONNECT" } /** * Enumerates the response codes for an HTTP request. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetStack * @since 6 */ /** * Enumerates the response codes for an HTTP request. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 10 */ /** * Enumerates the response codes for an HTTP request. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export enum ResponseCode { /** @@ -2775,7 +2847,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OK = 200, @@ -2795,7 +2868,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CREATED, @@ -2815,7 +2889,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ACCEPTED, @@ -2835,7 +2910,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NOT_AUTHORITATIVE, @@ -2855,7 +2931,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NO_CONTENT, @@ -2875,7 +2952,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ RESET, @@ -2895,7 +2973,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PARTIAL, @@ -2915,7 +2994,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MULT_CHOICE = 300, @@ -2938,7 +3018,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MOVED_PERM, @@ -2958,7 +3039,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ MOVED_TEMP, @@ -2978,7 +3060,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ SEE_OTHER, @@ -2998,7 +3081,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NOT_MODIFIED, @@ -3018,7 +3102,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ USE_PROXY, @@ -3038,7 +3123,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BAD_REQUEST = 400, @@ -3058,7 +3144,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ UNAUTHORIZED, @@ -3078,7 +3165,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PAYMENT_REQUIRED, @@ -3098,7 +3186,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ FORBIDDEN, @@ -3118,7 +3207,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NOT_FOUND, @@ -3138,7 +3228,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BAD_METHOD, @@ -3158,7 +3249,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NOT_ACCEPTABLE, @@ -3178,7 +3270,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PROXY_AUTH, @@ -3198,7 +3291,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CLIENT_TIMEOUT, @@ -3221,7 +3315,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CONFLICT, @@ -3241,7 +3336,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ GONE, @@ -3261,7 +3357,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ LENGTH_REQUIRED, @@ -3281,7 +3378,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ PRECON_FAILED, @@ -3301,7 +3399,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ENTITY_TOO_LARGE, @@ -3321,7 +3420,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ REQ_TOO_LONG, @@ -3341,7 +3441,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ UNSUPPORTED_TYPE, @@ -3370,7 +3471,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ INTERNAL_ERROR = 500, @@ -3390,7 +3492,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ NOT_IMPLEMENTED, @@ -3410,7 +3513,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ BAD_GATEWAY, @@ -3430,7 +3534,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ UNAVAILABLE, @@ -3450,7 +3555,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ GATEWAY_TIMEOUT, @@ -3470,7 +3576,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ VERSION } @@ -3494,7 +3601,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export enum HttpProtocol { @@ -3514,7 +3622,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ HTTP1_1, @@ -3534,7 +3643,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ HTTP2, @@ -3551,31 +3661,33 @@ declare namespace http { * Fallback to http2 or http1.1 if needed. * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ HTTP3 } /** * Indicates the type of the returned data. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetStack * @since 9 */ /** * Indicates the type of the returned data. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 10 */ /** * Indicates the type of the returned data. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export enum HttpDataType { /** @@ -3594,7 +3706,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ STRING, @@ -3614,7 +3727,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ OBJECT = 1, @@ -3634,7 +3748,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ ARRAY_BUFFER = 2 } @@ -3658,7 +3773,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface HttpResponse { /** @@ -3683,7 +3799,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ result: string | Object | ArrayBuffer; @@ -3712,32 +3829,34 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ resultType: HttpDataType; /** * Server status code. - * @type {ResponseCode | number} + * @type {ResponseCode | int} * @syscap SystemCapability.Communication.NetStack * @since 6 */ /** * Server status code. - * @type {ResponseCode | number} + * @type {ResponseCode | int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 10 */ /** * Server status code. - * @type {ResponseCode | number} + * @type {ResponseCode | int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - responseCode: ResponseCode | number; + responseCode: ResponseCode | int; /** * All headers in the response from the server. @@ -3758,7 +3877,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ header: Object; @@ -3781,7 +3901,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ cookies: string; @@ -3796,7 +3917,8 @@ declare namespace http { * @type {PerformanceTiming} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ performanceTiming: PerformanceTiming; } @@ -3812,158 +3934,169 @@ declare namespace http { * @interface PerformanceTiming * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface PerformanceTiming { /** * Time taken from startup to DNS resolution completion, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from startup to DNS resolution completion, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - dnsTiming: number; + dnsTiming: double; /** * Time taken from startup to TCP connection completion, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from startup to TCP connection completion, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - tcpTiming: number; + tcpTiming: double; /** * Time taken from startup to TLS connection completion, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from startup to TLS connection completion, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - tlsTiming: number; + tlsTiming: double; /** * Time taken from startup to start sending the first byte, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from startup to start sending the first byte, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - firstSendTiming: number; + firstSendTiming: double; /** * Time taken from startup to receiving the first byte, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from startup to receiving the first byte, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - firstReceiveTiming: number; + firstReceiveTiming: double; /** * Time taken from startup to the completion of the request, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from startup to the completion of the request, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - totalFinishTiming: number; + totalFinishTiming: double; /** * Time taken from startup to completion of all redirection steps, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from startup to completion of all redirection steps, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - redirectTiming: number; + redirectTiming: double; /** * Time taken from HTTP request to header completion, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from HTTP request to header completion, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - responseHeaderTiming: number; + responseHeaderTiming: double; /** * Time taken from HTTP Request to body completion, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from HTTP Request to body completion, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - responseBodyTiming: number; + responseBodyTiming: double; /** * Time taken from HTTP Request to callback to the application, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from HTTP Request to callback to the application, in milliseconds. - * @type {number} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - totalTiming: number; + totalTiming: double; } /** @@ -3990,48 +4123,48 @@ declare namespace http { export interface DataReceiveProgressInfo { /** * Number of data bytes received. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Number of data bytes received. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 12 */ /** * Number of data bytes received. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice * @since 15 */ - receiveSize: number; + receiveSize: int; /** * Total number of bytes to receive. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Total number of bytes to receive. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 12 */ /** * Total number of bytes to receive. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice * @since 15 */ - totalSize: number; + totalSize: int; } /** @@ -4058,60 +4191,62 @@ declare namespace http { export interface DataSendProgressInfo { /** * Used to specify the data size to be sent. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Used to specify the data size to be sent. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 12 */ /** * Used to specify the data size to be sent. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 15 + * @since arkts{'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - sendSize: number; + sendSize: int; /** * Total number of bytes to receive. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Total number of bytes to receive. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 12 */ /** * Total number of bytes to receive. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 15 + * @since arkts{'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - totalSize: number; + totalSize: int; } /** * Creates a default {@code HttpResponseCache} object to store the responses of HTTP access requests. - * @param { number } cacheSize - the size of cache(max value is 10MB), default is 10*1024*1024(10MB). + * @param { int } cacheSize - the size of cache(max value is 10MB), default is 10*1024*1024(10MB). * @returns { HttpResponseCache } the HttpResponseCache of the createHttpResponseCache. * @syscap SystemCapability.Communication.NetStack * @since 9 */ /** * Creates a default {@code HttpResponseCache} object to store the responses of HTTP access requests. - * @param { number } cacheSize - the size of cache(max value is 10MB), default is 10*1024*1024(10MB). + * @param { int } cacheSize - the size of cache(max value is 10MB), default is 10*1024*1024(10MB). * @returns { HttpResponseCache } the HttpResponseCache of the createHttpResponseCache. * @syscap SystemCapability.Communication.NetStack * @crossplatform @@ -4119,14 +4254,15 @@ declare namespace http { */ /** * Creates a default {@code HttpResponseCache} object to store the responses of HTTP access requests. - * @param { number } cacheSize - the size of cache(max value is 10MB), default is 10*1024*1024(10MB). + * @param { int } cacheSize - the size of cache(max value is 10MB), default is 10*1024*1024(10MB). * @returns { HttpResponseCache } the HttpResponseCache of the createHttpResponseCache. * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - function createHttpResponseCache(cacheSize?: number): HttpResponseCache; + function createHttpResponseCache(cacheSize?: int): HttpResponseCache; /** * Defines an object that stores the response to an HTTP request. @@ -4147,7 +4283,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface HttpResponseCache { /** @@ -4169,7 +4306,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ flush(callback: AsyncCallback): void; @@ -4215,7 +4353,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ delete(callback: AsyncCallback): void; @@ -4238,7 +4377,8 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ delete(): Promise; } diff --git a/api/@ohos.net.networkSecurity.d.ts b/api/@ohos.net.networkSecurity.d.ts index c5eae54dfe7e37d6cddf421af207390745a0e442..b91598e6df76689e549cbd7410389dbaec66cdd1 100644 --- a/api/@ohos.net.networkSecurity.d.ts +++ b/api/@ohos.net.networkSecurity.d.ts @@ -24,27 +24,31 @@ import type { AsyncCallback } from './@ohos.base'; * Provides networkSecurity related APIs. * @namespace networkSecurity * @syscap SystemCapability.Communication.NetStack - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace networkSecurity { /** * Defines the certificate type. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetStack - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export enum CertType { /** * PEM type certificate. * @syscap SystemCapability.Communication.NetStack - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CERT_TYPE_PEM = 0, /** * DER type certificate. * @syscap SystemCapability.Communication.NetStack - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ CERT_TYPE_DER = 1 } @@ -53,14 +57,16 @@ declare namespace networkSecurity { * Define the certificate content. * @interface CertBlob * @syscap SystemCapability.Communication.NetStack - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface CertBlob { /** * Certificate type. * @type { CertType } * @syscap SystemCapability.Communication.NetStack - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type: CertType; @@ -68,7 +74,8 @@ declare namespace networkSecurity { * Certificate data. * @type {string | ArrayBuffer} * @syscap SystemCapability.Communication.NetStack - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ data: string | ArrayBuffer; } @@ -77,7 +84,7 @@ declare namespace networkSecurity { * Certificate verification to the server. * @param { CertBlob } cert - Certificates to be verified. * @param { CertBlob } [caCert] - Incoming custom CA cert. - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * Number equals 0 if verify of certification from server succeed, else verify failed. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2305001 - Unspecified error. @@ -102,7 +109,7 @@ declare namespace networkSecurity { * Certificate verification to the server. * @param { CertBlob } cert - Certificates to be verified. * @param { CertBlob } [caCert] - Incoming custom CA cert. - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * Number equals 0 if verify of certification from server succeed, else verify failed. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2305001 - Unspecified error. @@ -123,15 +130,16 @@ declare namespace networkSecurity { * @throws { BusinessError } 2305027 - Certificate is untrusted. * @throws { BusinessError } 2305069 - Invalid certificate verification context. * @syscap SystemCapability.Communication.NetStack - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - export function certVerification(cert: CertBlob, caCert?: CertBlob): Promise; + export function certVerification(cert: CertBlob, caCert?: CertBlob): Promise; /** * Certificate verification to the server. * @param { CertBlob } cert - Certificates to be verified. * @param { CertBlob } [caCert] - Incoming custom CA cert. - * @returns { number } Returns 0 if verify of certification from server succeed, else verify failed. + * @returns { int } Returns 0 if verify of certification from server succeed, else verify failed. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2305001 - Unspecified error. * @throws { BusinessError } 2305002 - Unable to get issuer certificate. @@ -155,7 +163,7 @@ declare namespace networkSecurity { * Certificate verification to the server. * @param { CertBlob } cert - Certificates to be verified. * @param { CertBlob } [caCert] - Incoming custom CA cert. - * @returns { number } Returns 0 if verify of certification from server succeed, else verify failed. + * @returns { int } Returns 0 if verify of certification from server succeed, else verify failed. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2305001 - Unspecified error. * @throws { BusinessError } 2305002 - Unable to get issuer certificate. @@ -175,9 +183,10 @@ declare namespace networkSecurity { * @throws { BusinessError } 2305027 - Certificate is untrusted. * @throws { BusinessError } 2305069 - Invalid certificate verification context. * @syscap SystemCapability.Communication.NetStack - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - export function certVerificationSync(cert: CertBlob, caCert?: CertBlob): number; + export function certVerificationSync(cert: CertBlob, caCert?: CertBlob): int; /** * Checks whether the Cleartext traffic is permitted. diff --git a/api/@ohos.net.sharing.d.ts b/api/@ohos.net.sharing.d.ts index 74d63c28ce5aa652266de6869ce61cc250b35e19..bb3f87353e089aa48aea2b82296a46fd7aa749be 100644 --- a/api/@ohos.net.sharing.d.ts +++ b/api/@ohos.net.sharing.d.ts @@ -25,14 +25,16 @@ import type connection from './@ohos.net.connection'; * Provides network sharing related interfaces. * @namespace sharing * @syscap SystemCapability.Communication.NetManager.NetSharing - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace sharing { /** * Get the handle of the data network. * @typedef { connection.NetHandle } * @syscap SystemCapability.Communication.NetManager.Core - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ type NetHandle = connection.NetHandle; @@ -48,7 +50,8 @@ declare namespace sharing { * @throws { BusinessError } 2202011 - Cannot get network sharing configuration. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function isSharingSupported(callback: AsyncCallback): void; @@ -63,7 +66,8 @@ declare namespace sharing { * @throws { BusinessError } 2202011 - Cannot get network sharing configuration. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function isSharingSupported(): Promise; @@ -79,7 +83,8 @@ declare namespace sharing { * @throws { BusinessError } 2202011 - Cannot get network sharing configuration. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function isSharing(callback: AsyncCallback): void; @@ -94,7 +99,8 @@ declare namespace sharing { * @throws { BusinessError } 2202011 - Cannot get network sharing configuration. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function isSharing(): Promise; @@ -116,7 +122,8 @@ declare namespace sharing { * @throws { BusinessError } 2202011 - Cannot get network sharing configuration. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function startSharing(type: SharingIfaceType, callback: AsyncCallback): void; @@ -138,7 +145,8 @@ declare namespace sharing { * @throws { BusinessError } 2202011 - Cannot get network sharing configuration. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function startSharing(type: SharingIfaceType): Promise; @@ -159,7 +167,8 @@ declare namespace sharing { * @throws { BusinessError } 2202011 - Cannot get network sharing configuration. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function stopSharing(type: SharingIfaceType, callback: AsyncCallback): void; @@ -180,14 +189,15 @@ declare namespace sharing { * @throws { BusinessError } 2202011 - Cannot get network sharing configuration. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function stopSharing(type: SharingIfaceType): Promise; /** * Obtains the number of downlink data bytes of the sharing network interfaces. * @permission ohos.permission.CONNECTIVITY_INTERNAL - * @param { AsyncCallback } callback - Returns the number of downlink data bytes of the sharing network interfaces. + * @param { AsyncCallback } callback - Returns the number of downlink data bytes of the sharing network interfaces. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Non-system applications use system APIs. * @throws { BusinessError } 401 - Parameter error. @@ -195,29 +205,30 @@ declare namespace sharing { * @throws { BusinessError } 2200003 - System internal error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - function getStatsRxBytes(callback: AsyncCallback): void; + function getStatsRxBytes(callback: AsyncCallback): void; /** * Obtains the number of downlink data bytes of the sharing network interfaces. * @permission ohos.permission.CONNECTIVITY_INTERNAL - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Non-system applications use system APIs. - * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2200002 - Failed to connect to the service. * @throws { BusinessError } 2200003 - System internal error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - function getStatsRxBytes(): Promise; + function getStatsRxBytes(): Promise; /** * Obtains the number of uplink data bytes of the sharing network interfaces. * @permission ohos.permission.CONNECTIVITY_INTERNAL - * @param { AsyncCallback } callback - Returns the number of uplink data bytes of the sharing network interfaces. + * @param { AsyncCallback } callback - Returns the number of uplink data bytes of the sharing network interfaces. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Non-system applications use system APIs. * @throws { BusinessError } 401 - Parameter error. @@ -225,29 +236,30 @@ declare namespace sharing { * @throws { BusinessError } 2200003 - System internal error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - function getStatsTxBytes(callback: AsyncCallback): void; + function getStatsTxBytes(callback: AsyncCallback): void; /** * Obtains the number of uplink data bytes of the sharing network interfaces. * @permission ohos.permission.CONNECTIVITY_INTERNAL - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Non-system applications use system APIs. - * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2200002 - Failed to connect to the service. * @throws { BusinessError } 2200003 - System internal error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - function getStatsTxBytes(): Promise; + function getStatsTxBytes(): Promise; /** * Obtains the number of total data bytes of the sharing network interfaces. * @permission ohos.permission.CONNECTIVITY_INTERNAL - * @param { AsyncCallback } callback - Returns the number of total data bytes of the sharing network interfaces. + * @param { AsyncCallback } callback - Returns the number of total data bytes of the sharing network interfaces. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Non-system applications use system APIs. * @throws { BusinessError } 401 - Parameter error. @@ -255,24 +267,25 @@ declare namespace sharing { * @throws { BusinessError } 2200003 - System internal error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - function getStatsTotalBytes(callback: AsyncCallback): void; + function getStatsTotalBytes(callback: AsyncCallback): void; /** * Obtains the number of total data bytes of the sharing network interfaces. * @permission ohos.permission.CONNECTIVITY_INTERNAL - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Non-system applications use system APIs. - * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2200002 - Failed to connect to the service. * @throws { BusinessError } 2200003 - System internal error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - function getStatsTotalBytes(): Promise; + function getStatsTotalBytes(): Promise; /** * Obtains the names of interfaces in each sharing state. @@ -287,7 +300,8 @@ declare namespace sharing { * @throws { BusinessError } 2200003 - System internal error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function getSharingIfaces(state: SharingIfaceState, callback: AsyncCallback>): void; @@ -304,7 +318,8 @@ declare namespace sharing { * @throws { BusinessError } 2200003 - System internal error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function getSharingIfaces(state: SharingIfaceState): Promise>; @@ -321,7 +336,8 @@ declare namespace sharing { * @throws { BusinessError } 2200003 - System internal error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function getSharingState(type: SharingIfaceType, callback: AsyncCallback): void; @@ -338,7 +354,8 @@ declare namespace sharing { * @throws { BusinessError } 2200003 - System internal error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function getSharingState(type: SharingIfaceType): Promise; @@ -355,7 +372,8 @@ declare namespace sharing { * @throws { BusinessError } 2200003 - System internal error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function getSharableRegexes(type: SharingIfaceType, callback: AsyncCallback>): void; @@ -372,7 +390,8 @@ declare namespace sharing { * @throws { BusinessError } 2200003 - System internal error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function getSharableRegexes(type: SharingIfaceType): Promise>; @@ -386,7 +405,8 @@ declare namespace sharing { * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'sharingStateChange', callback: Callback): void; @@ -400,7 +420,8 @@ declare namespace sharing { * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'sharingStateChange', callback?: Callback): void; @@ -426,7 +447,8 @@ declare namespace sharing { * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'interfaceSharingStateChange', callback: Callback): void; @@ -452,7 +474,8 @@ declare namespace sharing { * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'interfaceSharingStateChange', callback?: Callback): void; @@ -466,7 +489,8 @@ declare namespace sharing { * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'sharingUpstreamChange', callback: Callback): void; @@ -480,23 +504,26 @@ declare namespace sharing { * @throws { BusinessError } 401 - Parameter error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'sharingUpstreamChange', callback?: Callback): void; /** * Enumerates the network sharing states of an NIC. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ export enum SharingIfaceState { /** * Indicates the names of the NICs that are serving as network sharing. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ SHARING_NIC_SERVING = 1, @@ -504,7 +531,8 @@ declare namespace sharing { * Indicates the names of the NICs that can serve as network sharing. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ SHARING_NIC_CAN_SERVER = 2, @@ -512,7 +540,8 @@ declare namespace sharing { * Indicates the names of the NICs that serving error. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ SHARING_NIC_ERROR = 3 } @@ -522,7 +551,8 @@ declare namespace sharing { * @interface InterfaceSharingStateInfo * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface InterfaceSharingStateInfo { /** @@ -530,7 +560,8 @@ declare namespace sharing { * @type { SharingIfaceType } * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ type: SharingIfaceType; /** @@ -538,7 +569,8 @@ declare namespace sharing { * @type { string } * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ iface: string; /** @@ -546,24 +578,27 @@ declare namespace sharing { * @type { SharingIfaceState } * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ state: SharingIfaceState; } /** * Enumerates the network sharing types of an NIC. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ export enum SharingIfaceType { /** * Network sharing type for Wi-Fi. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ SHARING_WIFI = 0, @@ -571,7 +606,8 @@ declare namespace sharing { * Network sharing type for USB. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ SHARING_USB = 1, @@ -579,7 +615,8 @@ declare namespace sharing { * Network sharing type for BLUETOOTH. * @syscap SystemCapability.Communication.NetManager.NetSharing * @systemapi Hide this for inner system use. - * @since 9 + * @since arkts{'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ SHARING_BLUETOOTH = 2 } diff --git a/api/@ohos.net.statistics.d.ts b/api/@ohos.net.statistics.d.ts index 1d0e9ec3862e4384641bf750e2e7598c9aca0cfd..6a7a355e151f7b7baa130ae718db4019e05def19 100644 --- a/api/@ohos.net.statistics.d.ts +++ b/api/@ohos.net.statistics.d.ts @@ -32,20 +32,22 @@ import type connection from './@ohos.net.connection'; * @namespace statistics * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 15 + * @since arkts{'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace statistics { /** * @typedef {connection.NetBearType} * @syscap SystemCapability.Communication.NetManager.Core - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type NetBearType = connection.NetBearType; /** * Queries the data traffic (including all TCP and UDP data packets) received through a specified NIC. * @param { string } nic - Network interface card. - * @param { AsyncCallback } callback - Returns the data traffic received through the specified NIC. + * @param { AsyncCallback } callback - Returns the data traffic received through the specified NIC. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. @@ -53,14 +55,15 @@ declare namespace statistics { * @throws { BusinessError } 2103011 - Failed to create a system map. * @throws { BusinessError } 2103012 - Failed to obtain the NIC name. * @syscap SystemCapability.Communication.NetManager.Core - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - function getIfaceRxBytes(nic: string, callback: AsyncCallback): void; + function getIfaceRxBytes(nic: string, callback: AsyncCallback): void; /** * Queries the data traffic (including all TCP and UDP data packets) received through a specified NIC. * @param { string } nic - Network interface card. - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. @@ -68,14 +71,15 @@ declare namespace statistics { * @throws { BusinessError } 2103011 - Failed to create a system map. * @throws { BusinessError } 2103012 - Failed to obtain the NIC name. * @syscap SystemCapability.Communication.NetManager.Core - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - function getIfaceRxBytes(nic: string): Promise; + function getIfaceRxBytes(nic: string): Promise; /** * Queries the data traffic (including all TCP and UDP data packets) sent through a specified NIC. * @param { string } nic - Network interface card. - * @param { AsyncCallback } callback - Returns the data traffic sent through the specified NIC. + * @param { AsyncCallback } callback - Returns the data traffic sent through the specified NIC. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. @@ -83,14 +87,15 @@ declare namespace statistics { * @throws { BusinessError } 2103011 - Failed to create a system map. * @throws { BusinessError } 2103012 - Failed to obtain the NIC name. * @syscap SystemCapability.Communication.NetManager.Core - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - function getIfaceTxBytes(nic: string, callback: AsyncCallback): void; + function getIfaceTxBytes(nic: string, callback: AsyncCallback): void; /** * Queries the data traffic (including all TCP and UDP data packets) sent through a specified NIC. * @param { string } nic - Network interface card. - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. @@ -98,13 +103,14 @@ declare namespace statistics { * @throws { BusinessError } 2103011 - Failed to create a system map. * @throws { BusinessError } 2103012 - Failed to obtain the NIC name. * @syscap SystemCapability.Communication.NetManager.Core - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - function getIfaceTxBytes(nic: string): Promise; + function getIfaceTxBytes(nic: string): Promise; /** * Queries the data traffic (including all TCP and UDP data packets) received through the cellular network. - * @param { AsyncCallback } callback - Returns the data traffic received through the cellular network. + * @param { AsyncCallback } callback - Returns the data traffic received through the cellular network. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @throws { BusinessError } 2103005 - Failed to read the system map. @@ -113,11 +119,11 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @since 10 */ - function getCellularRxBytes(callback: AsyncCallback): void; + function getCellularRxBytes(callback: AsyncCallback): void; /** * Queries the data traffic (including all TCP and UDP data packets) received through the cellular network. - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @throws { BusinessError } 2103005 - Failed to read the system map. @@ -126,11 +132,11 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @since 10 */ - function getCellularRxBytes(): Promise; + function getCellularRxBytes(): Promise; /** * Queries the data traffic (including all TCP and UDP data packets) sent through the cellular network. - * @param { AsyncCallback } callback - Returns the data traffic sent through the cellular network. + * @param { AsyncCallback } callback - Returns the data traffic sent through the cellular network. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @throws { BusinessError } 2103005 - Failed to read the system map. @@ -139,11 +145,11 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @since 10 */ - function getCellularTxBytes(callback: AsyncCallback): void; + function getCellularTxBytes(callback: AsyncCallback): void; /** * Queries the data traffic (including all TCP and UDP data packets) sent through the cellular network. - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @throws { BusinessError } 2103005 - Failed to read the system map. @@ -152,11 +158,11 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @since 10 */ - function getCellularTxBytes(): Promise; + function getCellularTxBytes(): Promise; /** * Queries the data traffic (including all TCP and UDP data packets) received through all NICs. - * @param { AsyncCallback } callback - Returns the data traffic received through all NICs. + * @param { AsyncCallback } callback - Returns the data traffic received through all NICs. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @throws { BusinessError } 2103005 - Failed to read the system map. @@ -166,20 +172,21 @@ declare namespace statistics { */ /** * Queries the data traffic (including all TCP and UDP data packets) received through all NICs. - * @param { AsyncCallback } callback - Returns the data traffic received through all NICs. + * @param { AsyncCallback } callback - Returns the data traffic received through all NICs. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @throws { BusinessError } 2103005 - Failed to read the system map. * @throws { BusinessError } 2103011 - Failed to create a system map. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 15 + * @since arkts{'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - function getAllRxBytes(callback: AsyncCallback): void; + function getAllRxBytes(callback: AsyncCallback): void; /** * Queries the data traffic (including all TCP and UDP data packets) received through all NICs. - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @throws { BusinessError } 2103005 - Failed to read the system map. @@ -189,20 +196,21 @@ declare namespace statistics { */ /** * Queries the data traffic (including all TCP and UDP data packets) received through all NICs. - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @throws { BusinessError } 2103005 - Failed to read the system map. * @throws { BusinessError } 2103011 - Failed to create a system map. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 15 + * @since arkts{'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - function getAllRxBytes(): Promise; + function getAllRxBytes(): Promise; /** * Queries the data traffic (including all TCP and UDP data packets) sent through all NICs. - * @param { AsyncCallback } callback - Returns the data traffic sent through all NICs. + * @param { AsyncCallback } callback - Returns the data traffic sent through all NICs. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @throws { BusinessError } 2103005 - Failed to read the system map. @@ -212,20 +220,21 @@ declare namespace statistics { */ /** * Queries the data traffic (including all TCP and UDP data packets) sent through all NICs. - * @param { AsyncCallback } callback - Returns the data traffic sent through all NICs. + * @param { AsyncCallback } callback - Returns the data traffic sent through all NICs. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @throws { BusinessError } 2103005 - Failed to read the system map. * @throws { BusinessError } 2103011 - Failed to create a system map. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 15 + * @since arkts{'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - function getAllTxBytes(callback: AsyncCallback): void; + function getAllTxBytes(callback: AsyncCallback): void; /** * Queries the data traffic (including all TCP and UDP data packets) sent through all NICs. - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @throws { BusinessError } 2103005 - Failed to read the system map. @@ -235,21 +244,22 @@ declare namespace statistics { */ /** * Queries the data traffic (including all TCP and UDP data packets) sent through all NICs. - * @returns { Promise } The promise returned by the function. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. * @throws { BusinessError } 2103005 - Failed to read the system map. * @throws { BusinessError } 2103011 - Failed to create a system map. * @syscap SystemCapability.Communication.NetManager.Core * @atomicservice - * @since 15 + * @since arkts{'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ - function getAllTxBytes(): Promise; + function getAllTxBytes(): Promise; /** * Queries the data traffic (including all TCP and UDP data packets) received by a specified application. - * @param { number } uid - Indicates the process ID of the application. - * @param { AsyncCallback } callback - Returns the data traffic received by the specified application. + * @param { int } uid - Indicates the process ID of the application. + * @param { AsyncCallback } callback - Returns the data traffic received by the specified application. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. @@ -258,12 +268,12 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @since 10 */ - function getUidRxBytes(uid: number, callback: AsyncCallback): void; + function getUidRxBytes(uid: int, callback: AsyncCallback): void; /** * Queries the data traffic (including all TCP and UDP data packets) received by a specified application. - * @param { number } uid - Indicates the process ID of the application. - * @returns { Promise } The promise returned by the function. + * @param { int } uid - Indicates the process ID of the application. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. @@ -272,12 +282,12 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @since 10 */ - function getUidRxBytes(uid: number): Promise; + function getUidRxBytes(uid: int): Promise; /** * Queries the data traffic (including all TCP and UDP data packets) sent by a specified application. - * @param { number } uid - Indicates the process ID of the application. - * @param { AsyncCallback } callback - Returns the data traffic sent by the specified application. + * @param { int } uid - Indicates the process ID of the application. + * @param { AsyncCallback } callback - Returns the data traffic sent by the specified application. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. @@ -286,12 +296,12 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @since 10 */ - function getUidTxBytes(uid: number, callback: AsyncCallback): void; + function getUidTxBytes(uid: int, callback: AsyncCallback): void; /** * Queries the data traffic (including all TCP and UDP data packets) sent by a specified application. - * @param { number } uid - Indicates the process ID of the application. - * @returns { Promise } The promise returned by the function. + * @param { int } uid - Indicates the process ID of the application. + * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2100002 - Failed to connect to the service. * @throws { BusinessError } 2100003 - System internal error. @@ -300,13 +310,13 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @since 10 */ - function getUidTxBytes(uid: number): Promise; + function getUidTxBytes(uid: int): Promise; /** * Register notifications of network traffic updates. * @permission ohos.permission.GET_NETWORK_STATS * @param { 'netStatsChange' } type - Indicates Event name. - * @param { Callback<{ iface: string, uid?: number }> } callback - The callback of on. + * @param { Callback<{ iface: string, uid?: int }> } callback - The callback of on. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Non-system applications use system APIs. * @throws { BusinessError } 401 - Parameter error. @@ -336,7 +346,7 @@ declare namespace statistics { * Unregister notifications of network traffic updates. * @permission ohos.permission.GET_NETWORK_STATS * @param { 'netStatsChange' } type - Indicates Event name. - * @param { Callback<{ iface: string, uid?: number }> } callback - The callback of off. + * @param { Callback<{ iface: string, uid?: int }> } callback - The callback of off. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Non-system applications use system APIs. * @throws { BusinessError } 401 - Parameter error. @@ -376,7 +386,8 @@ declare namespace statistics { * @throws { BusinessError } 2103017 - Failed to read the database. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function getTrafficStatsByIface(ifaceInfo: IfaceInfo, callback: AsyncCallback): void; @@ -394,7 +405,8 @@ declare namespace statistics { * @throws { BusinessError } 2103017 - Failed to read the database. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function getTrafficStatsByIface(ifaceInfo: IfaceInfo): Promise; @@ -412,7 +424,8 @@ declare namespace statistics { * @throws { BusinessError } 2103017 - Failed to read the database. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function getTrafficStatsByUid(uidInfo: UidInfo, callback: AsyncCallback): void; @@ -430,14 +443,15 @@ declare namespace statistics { * @throws { BusinessError } 2103017 - Failed to read the database. * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function getTrafficStatsByUid(uidInfo: UidInfo): Promise; /** * Queries the data traffic (including all TCP and UDP data packets) received through a specified sockfd. - * @param { number } sockfd - Indicates the file descriptor of the given socket. - * @param { AsyncCallback } callback - Returns the data traffic bytes received by the specified sockfd. + * @param { int } sockfd - Indicates the file descriptor of the given socket. + * @param { AsyncCallback } callback - Returns the data traffic bytes received by the specified sockfd. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2100001 - Invalid parameter value. * @throws { BusinessError } 2100002 - Failed to connect to the service. @@ -445,12 +459,12 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @since 11 */ - function getSockfdRxBytes(sockfd: number, callback: AsyncCallback): void; + function getSockfdRxBytes(sockfd: int, callback: AsyncCallback): void; /** * Queries the data traffic (including all TCP and UDP data packets) received through a specified sockfd. - * @param { number } sockfd - Indicates the file descriptor of the given socket. - * @returns { Promise } Returns the data traffic bytes received by the specified sockfd. + * @param { int } sockfd - Indicates the file descriptor of the given socket. + * @returns { Promise } Returns the data traffic bytes received by the specified sockfd. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2100001 - Invalid parameter value. * @throws { BusinessError } 2100002 - Failed to connect to the service. @@ -458,12 +472,12 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @since 11 */ - function getSockfdRxBytes(sockfd: number): Promise; + function getSockfdRxBytes(sockfd: int): Promise; /** * Queries the data traffic (including all TCP and UDP data packets) sent through a specified sockfd. - * @param { number } sockfd - Indicates the file descriptor of the given socket. - * @param { AsyncCallback } callback - Returns the data traffic bytes sent by the specified sockfd. + * @param { int } sockfd - Indicates the file descriptor of the given socket. + * @param { AsyncCallback } callback - Returns the data traffic bytes sent by the specified sockfd. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2100001 - Invalid parameter value * @throws { BusinessError } 2100002 - Failed to connect to the service. @@ -471,12 +485,12 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @since 11 */ - function getSockfdTxBytes(sockfd: number, callback: AsyncCallback): void; + function getSockfdTxBytes(sockfd: int, callback: AsyncCallback): void; /** * Queries the data traffic (including all TCP and UDP data packets) sent through a specified sockfd. - * @param { number } sockfd - Indicates the file descriptor of the given socket. - * @returns { Promise } Returns the data traffic bytes sent by the specified sockfd. + * @param { int } sockfd - Indicates the file descriptor of the given socket. + * @returns { Promise } Returns the data traffic bytes sent by the specified sockfd. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 2100001 - Invalid parameter value * @throws { BusinessError } 2100002 - Failed to connect to the service. @@ -484,14 +498,15 @@ declare namespace statistics { * @syscap SystemCapability.Communication.NetManager.Core * @since 11 */ - function getSockfdTxBytes(sockfd: number): Promise; + function getSockfdTxBytes(sockfd: int): Promise; /** * Parameters for obtaining detailed information on network interface traffic usage. * @interface IfaceInfo * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export interface IfaceInfo { /** @@ -499,27 +514,30 @@ declare namespace statistics { * @type {string} * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ iface: string; /** * Start time for querying traffic. - * @type {number} + * @type {int} * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - startTime: number; + startTime: int; /** * End time for querying traffic. - * @type {number} + * @type {int} * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - endTime: number; + endTime: int; } /** @@ -527,7 +545,8 @@ declare namespace statistics { * @interface UidInfo * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export interface UidInfo { /** @@ -535,18 +554,20 @@ declare namespace statistics { * @type {IfaceInfo} * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ ifaceInfo: IfaceInfo; /** * Uid of app for querying traffic. - * @type {number} + * @type {int} * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - uid: number; + uid: int; } /** @@ -554,44 +575,49 @@ declare namespace statistics { * @interface NetStatsInfo * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NetStatsInfo { /** * Bytes of received. - * @type {number} + * @type {long} * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - rxBytes: number; + rxBytes: long; /** * Bytes of send. - * @type {number} + * @type {long} * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - txBytes: number; + txBytes: long; /** * Packets of received. - * @type {number} + * @type {long} * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - rxPackets: number; + rxPackets: long; /** * Packets of send. - * @type {number} + * @type {long} * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 10 + * @since arkts{'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - txPackets: number; + txPackets: long; } /** @@ -599,7 +625,8 @@ declare namespace statistics { * @interface NetStatsChangeInfo * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NetStatsChangeInfo { /** @@ -607,17 +634,19 @@ declare namespace statistics { * @type { string } * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ iface: string; /** * Network interface for querying traffic. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts{'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - uid?: number; + uid?: int; } /** @@ -629,26 +658,29 @@ declare namespace statistics { export type NetStatsInfoSequence = { /** * Start time for querying traffic. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - startTime: number; + startTime: int; /** * End time for querying traffic. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - endTime: number; + endTime: int; /** * Detailed information of statistics. * @type { NetStatsInfo } * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ info: NetStatsInfo; }[]; @@ -660,7 +692,7 @@ declare namespace statistics { * @since 12 */ export type UidNetStatsInfo = { - [uid: number]: NetStatsInfo; + [uid: int]: NetStatsInfo; }; /** @@ -668,7 +700,8 @@ declare namespace statistics { * @interface NetworkInfo * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NetworkInfo { /** @@ -676,33 +709,37 @@ declare namespace statistics { * @type { NetBearType } * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type: NetBearType; /** * Start time for querying traffic. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - startTime: number; + startTime: int; /** * End time for querying traffic. - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - endTime: number; + endTime: int; /** * SIM card id for querying traffic. - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Communication.NetManager.Core * @systemapi Hide this for inner system use. - * @since 12 + * @since arkts{'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - simId?: number; + simId?: int; } /** @@ -725,7 +762,7 @@ declare namespace statistics { /** * Get the traffic usage sequence of the specified network of the application in the specified time period. * @permission ohos.permission.GET_NETWORK_STATS - * @param { number } uid - UID with this parameter, get stats info of this UID. + * @param { int } uid - UID with this parameter, get stats info of this UID. * @param { NetworkInfo } networkInfo - Information about the network to be queried. * @returns { Promise } The statistics history of the sim card. * @throws { BusinessError } 201 - Permission denied. @@ -739,7 +776,7 @@ declare namespace statistics { * @systemapi Hide this for inner system use. * @since 12 */ - function getTrafficStatsByUidNetwork(uid: number, networkInfo: NetworkInfo): Promise; + function getTrafficStatsByUidNetwork(uid: int, networkInfo: NetworkInfo): Promise; } export default statistics; \ No newline at end of file diff --git a/api/@ohos.net.webSocket.d.ts b/api/@ohos.net.webSocket.d.ts index 27a9c8f7e9cb44ce6a734fd318638a5a2d09896a..27998aa472fbc9100e29e5ef20103d42fc355b93 100644 --- a/api/@ohos.net.webSocket.d.ts +++ b/api/@ohos.net.webSocket.d.ts @@ -40,13 +40,15 @@ import type connection from './@ohos.net.connection'; * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace webSocket { /** * @typedef { connection.HttpProxy } * @syscap SystemCapability.Communication.NetManager.Core - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ type HttpProxy = connection.HttpProxy; @@ -69,7 +71,8 @@ declare namespace webSocket { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function createWebSocket(): WebSocket; @@ -92,7 +95,8 @@ declare namespace webSocket { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface WebSocketRequestOptions { /** @@ -172,7 +176,8 @@ declare namespace webSocket { * object of @type {connection.HttpProxy} means providing custom proxy settings * @typedef { 'system' | 'no-proxy' | HttpProxy } * @syscap SystemCapability.Communication.NetStack - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type ProxyConfiguration = 'system' | 'no-proxy' | HttpProxy; @@ -259,31 +264,33 @@ declare namespace webSocket { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface WebSocketCloseOptions { /** * Error code. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @since 6 */ /** * Error code. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 10 */ /** * Error code. - * @type {?number} + * @type {?int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - code?: number; + code?: int; /** * Error cause. * @type {?string} @@ -303,7 +310,8 @@ declare namespace webSocket { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ reason?: string; } @@ -321,25 +329,27 @@ declare namespace webSocket { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface CloseResult { /** * Error code. - * @type {number} + * @type {int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since 10 */ /** * Error code. - * @type {number} + * @type {int} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ - code: number; + code: int; /** * Error cause. * @type {string} @@ -353,7 +363,8 @@ declare namespace webSocket { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ reason: string; } @@ -390,7 +401,8 @@ declare namespace webSocket { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ export interface WebSocket { /** @@ -443,7 +455,8 @@ declare namespace webSocket { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ connect(url: string, callback: AsyncCallback): void; @@ -501,7 +514,8 @@ declare namespace webSocket { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ connect(url: string, options: WebSocketRequestOptions, callback: AsyncCallback): void; @@ -559,7 +573,8 @@ declare namespace webSocket { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ connect(url: string, options?: WebSocketRequestOptions): Promise; @@ -661,7 +676,8 @@ declare namespace webSocket { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ close(callback: AsyncCallback): void; @@ -731,7 +747,8 @@ declare namespace webSocket { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ close(options?: WebSocketCloseOptions): Promise; diff --git a/api/@ohos.nfc.controller.d.ts b/api/@ohos.nfc.controller.d.ts index 63aa9d95448cf681bc66adb63f4ea29072d2fb01..f0a866e129a5d53c5d84c96a44c7c1db2a0e1040 100644 --- a/api/@ohos.nfc.controller.d.ts +++ b/api/@ohos.nfc.controller.d.ts @@ -33,7 +33,8 @@ import { Callback } from './@ohos.base'; * @namespace nfcController * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace nfcController { /** @@ -49,7 +50,8 @@ declare namespace nfcController { * @enum { number } * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum NfcState { /** @@ -63,7 +65,8 @@ declare namespace nfcController { * * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_OFF = 1, @@ -78,7 +81,8 @@ declare namespace nfcController { * * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_TURNING_ON = 2, @@ -93,7 +97,8 @@ declare namespace nfcController { * * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_ON = 3, @@ -108,7 +113,8 @@ declare namespace nfcController { * * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ STATE_TURNING_OFF = 4 } @@ -139,7 +145,8 @@ declare namespace nfcController { * @param { Callback } callback Callback used to listen to the nfc state changed event. * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'nfcStateChange', callback: Callback): void; @@ -158,7 +165,8 @@ declare namespace nfcController { * @param { Callback } callback Callback used to listen to the nfc state changed event. * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'nfcStateChange', callback?: Callback): void; @@ -183,7 +191,8 @@ declare namespace nfcController { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 3100101 - The NFC state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function enableNfc(): void; @@ -208,7 +217,8 @@ declare namespace nfcController { * @throws { BusinessError } 801 - Capability not supported. * @throws { BusinessError } 3100101 - The NFC state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function disableNfc(): void; @@ -225,7 +235,8 @@ declare namespace nfcController { * @returns { boolean } Returns {@code true} if NFC is enabled; returns {@code false} otherwise. * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function isNfcOpen(): boolean; @@ -250,7 +261,8 @@ declare namespace nfcController { * @returns { NfcState } Returns the NFC status. * @syscap SystemCapability.Communication.NFC.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getNfcState(): NfcState; } diff --git a/api/@ohos.nfc.tag.d.ts b/api/@ohos.nfc.tag.d.ts index da104445a27553fd597146f35835b930d0358d21..382d3891df1c5e0122e042e48ad1fddbbc0b1837 100644 --- a/api/@ohos.nfc.tag.d.ts +++ b/api/@ohos.nfc.tag.d.ts @@ -48,7 +48,8 @@ import type { ElementName } from './bundleManager/ElementName'; * @namespace tag * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace tag { /** @@ -64,7 +65,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const NFC_A = 1; @@ -81,7 +83,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const NFC_B = 2; @@ -98,7 +101,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const ISO_DEP = 3; @@ -115,7 +119,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const NFC_F = 4; @@ -132,7 +137,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const NFC_V = 5; @@ -149,7 +155,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const NDEF = 6; @@ -183,7 +190,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const MIFARE_CLASSIC = 8; @@ -200,7 +208,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ const MIFARE_ULTRALIGHT = 9; @@ -423,7 +432,8 @@ declare namespace tag { * * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ MIFARE_CLASSIC = 101 } @@ -1265,7 +1275,8 @@ declare namespace tag { * @typedef TagInfo * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface TagInfo { /** @@ -1282,7 +1293,8 @@ declare namespace tag { * @type { number[] } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ uid: number[]; @@ -1300,7 +1312,8 @@ declare namespace tag { * @type { number[] } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ technology: number[]; @@ -1444,7 +1457,8 @@ declare namespace tag { * @namespace ndef * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ namespace ndef { /** @@ -1668,7 +1682,8 @@ declare namespace tag { * @typedef { _NfcATag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type NfcATag = _NfcATag; @@ -1684,7 +1699,8 @@ declare namespace tag { * @typedef { _NfcBTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type NfcBTag = _NfcBTag; @@ -1700,7 +1716,8 @@ declare namespace tag { * @typedef { _NfcFTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type NfcFTag = _NfcFTag; @@ -1716,7 +1733,8 @@ declare namespace tag { * @typedef { _NfcVTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type NfcVTag = _NfcVTag; @@ -1732,7 +1750,8 @@ declare namespace tag { * @typedef { _IsoDepTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type IsoDepTag = _IsoDepTag; @@ -1748,7 +1767,8 @@ declare namespace tag { * @typedef { _NdefTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type NdefTag = _NdefTag; @@ -1764,7 +1784,8 @@ declare namespace tag { * @typedef { _MifareClassicTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type MifareClassicTag = _MifareClassicTag; @@ -1780,7 +1801,8 @@ declare namespace tag { * @typedef { _MifareUltralightTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type MifareUltralightTag = _MifareUltralightTag; @@ -1796,7 +1818,8 @@ declare namespace tag { * @typedef { _NdefFormatableTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type NdefFormatableTag = _NdefFormatableTag; diff --git a/api/@ohos.notificationManager.d.ts b/api/@ohos.notificationManager.d.ts index 0e42bac07501eed08bdd2cd481ef23be689c0444..63e7626411d2f44e22564f16436fd2eb60f5d53d 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,29 @@ 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 { NotificationLiveViewContent as _NotificationLiveViewContent } from './notification/notificationContent'; +import { LiveViewStatus as _LiveViewStatus } from './notification/notificationContent'; +import { LiveViewTypes as _LiveViewTypes } from './notification/notificationContent'; +import { NotificationFilter as _NotificationFilter } from './notification/notificationRequest'; +import { NotificationCheckRequest as _NotificationCheckRequest } from './notification/notificationRequest'; +import type UIAbilityContext from './application/UIAbilityContext'; +/*** endif */ /** * The NotificationManager module provides notification management capabilities, covering notifications, @@ -63,7 +75,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 +84,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 +103,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 +127,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,7 +146,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, callback: AsyncCallback): void; @@ -198,7 +215,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; @@ -258,7 +276,7 @@ declare namespace notificationManager { * * @permission ohos.permission.NOTIFICATION_CONTROLLER or ohos.permission.SEND_NOTIFICATION_CROSS_USER * @param { NotificationRequest } request - a notification. - * @param { number } userId - of subscriber receiving the notification. + * @param { int } userId - of subscriber receiving the notification. * @param { AsyncCallback } callback - The callback of publish. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -280,9 +298,10 @@ 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; + function publish(request: NotificationRequest, userId: int, callback: AsyncCallback): void; /** * Publishes a notification to the specified user. @@ -340,7 +359,7 @@ declare namespace notificationManager { * * @permission ohos.permission.NOTIFICATION_CONTROLLER or ohos.permission.SEND_NOTIFICATION_CROSS_USER * @param { NotificationRequest } request - a notification. - * @param { number } userId - of subscriber receiving the notification. + * @param { int } userId - of subscriber receiving the notification. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -362,9 +381,10 @@ 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; + function publish(request: NotificationRequest, userId: int): Promise; /** * Publishes a representative notification. @@ -372,7 +392,7 @@ declare namespace notificationManager { * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER * @param { NotificationRequest } request - a notification. * @param { string } representativeBundle - bundle name of the representative - * @param { number } userId - userid of the representative + * @param { int } userId - userid of the representative * @param { AsyncCallback } callback - The callback of publishAsBundle. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -393,12 +413,13 @@ declare namespace notificationManager { * @throws { BusinessError } 2300007 - Network unreachable. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function publishAsBundle( request: NotificationRequest, representativeBundle: string, - userId: number, + userId: int, callback: AsyncCallback ): void; @@ -408,7 +429,7 @@ declare namespace notificationManager { * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER * @param { NotificationRequest } request - a notification. * @param { string } representativeBundle - bundle name of the representative - * @param { number } userId - userid of the representative + * @param { int } userId - userid of the representative * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -429,9 +450,10 @@ declare namespace notificationManager { * @throws { BusinessError } 2300007 - Network unreachable. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function publishAsBundle(request: NotificationRequest, representativeBundle: string, userId: number): Promise; + function publishAsBundle(request: NotificationRequest, representativeBundle: string, userId: int): Promise; /** * Publishes a representative notification. @@ -459,7 +481,8 @@ declare namespace notificationManager { * @throws { BusinessError } 2300007 - Network unreachable. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function publishAsBundle(representativeBundle: BundleOption, request: NotificationRequest): Promise; @@ -467,7 +490,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. @@ -480,8 +504,9 @@ 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 { int } 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. * @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,16 +515,18 @@ 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; + function cancel(id: int, callback: AsyncCallback): void; /** * Cancels a notification with the specified ID and label. This API uses an asynchronous callback to return the result. * - * @param { number } id - Notification ID. + * @param { int } 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,14 +534,15 @@ 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; + function cancel(id: int, label: string, callback: AsyncCallback): void; /** * Cancels a notification with the specified ID and optional label. This API uses a promise to return the result. * - * @param { number } id - Notification ID. + * @param { int } id - Notification ID. * @param { string } [label] - Notification label. This parameter is left empty by default. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. @@ -524,15 +552,16 @@ 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; + function cancel(id: int, label?: string): Promise; /** * Cancel a notification with the representative and ID. * * @param { BundleOption } representativeBundle - bundle option of the representative. - * @param { number } id - ID of the notification to cancel, which must be unique in the application. + * @param { int } id - ID of the notification to cancel, which must be unique in the application. * @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. @@ -545,17 +574,18 @@ 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; + function cancel(representativeBundle: BundleOption, id: int): Promise; /** * Cancel a representative notification. * * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER - * @param { number } id - ID of the notification to cancel, which must be unique in the application. + * @param { int } id - ID of the notification to cancel, which must be unique in the application. * @param { string } representativeBundle - bundle name of the representative. - * @param { number } userId - userid of the representative. + * @param { int } userId - userid of the representative. * @param { AsyncCallback } callback - The callback of cancelAsBundle. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -569,12 +599,13 @@ 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 cancelAsBundle( - id: number, + id: int, representativeBundle: string, - userId: number, + userId: int, callback: AsyncCallback ): void; @@ -582,9 +613,9 @@ declare namespace notificationManager { * Cancel a representative notification. * * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER - * @param { number } id - ID of the notification to cancel, which must be unique in the application. + * @param { int } id - ID of the notification to cancel, which must be unique in the application. * @param { string } representativeBundle - bundle name of the representative. - * @param { number } userId - userid of the representative. + * @param { int } userId - userid of the representative. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -598,16 +629,17 @@ 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 cancelAsBundle(id: number, representativeBundle: string, userId: number): Promise; + function cancelAsBundle(id: int, representativeBundle: string, userId: int): Promise; /** * Cancel a representative notification. * * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER * @param { BundleOption } representativeBundle - bundle option of the representative. - * @param { number } id - ID of the notification to cancel, which must be unique in the application. + * @param { int } id - ID of the notification to cancel, which must be unique in the application. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -622,14 +654,16 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - function cancelAsBundle(representativeBundle: BundleOption, id: number): Promise; + function cancelAsBundle(representativeBundle: BundleOption, id: int): Promise; /** * 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 +675,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 +684,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 +708,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; @@ -692,7 +729,8 @@ declare namespace notificationManager { * @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 addSlot(slot: NotificationSlot, callback: AsyncCallback): void; @@ -712,7 +750,8 @@ declare namespace notificationManager { * @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 addSlot(slot: NotificationSlot): Promise; @@ -720,7 +759,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. @@ -728,7 +768,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @throws { BusinessError } 1600012 - No memory space. * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function addSlot(type: SlotType, callback: AsyncCallback): void; @@ -744,7 +785,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @throws { BusinessError } 1600012 - No memory space. * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function addSlot(type: SlotType): Promise; @@ -764,7 +806,8 @@ declare namespace notificationManager { * @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 addSlots(slots: Array, callback: AsyncCallback): void; @@ -784,7 +827,8 @@ declare namespace notificationManager { * @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 addSlots(slots: Array): Promise; @@ -800,7 +844,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 getSlot(slotType: SlotType, callback: AsyncCallback): void; @@ -815,7 +860,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 getSlot(slotType: SlotType): Promise; @@ -830,7 +876,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 getSlots(callback: AsyncCallback>): void; @@ -842,7 +889,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 getSlots(): Promise>; @@ -858,7 +906,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllNotificationEnabledBundles(): Promise>; @@ -866,14 +915,16 @@ 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 { 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. * @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 removeSlot(slotType: SlotType, callback: AsyncCallback): void; @@ -888,7 +939,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 removeSlot(slotType: SlotType): Promise; @@ -903,7 +955,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 removeAllSlots(callback: AsyncCallback): void; @@ -915,7 +968,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 removeAllSlots(): Promise; @@ -936,7 +990,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 +1012,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 +1033,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 +1054,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 +1063,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 +1079,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 +1094,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 +1105,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 +1149,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; @@ -1100,7 +1163,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 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ function isNotificationEnabledSync(): boolean; @@ -1108,7 +1172,7 @@ declare namespace notificationManager { * Checks whether this application allows to publish notifications under the user. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { number } userId - The userid of the representative. + * @param { int } userId - The userid of the representative. * @param { AsyncCallback } callback - The callback of isNotificationEnabled. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -1120,15 +1184,16 @@ 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; + function isNotificationEnabled(userId: int, callback: AsyncCallback): void; /** * Checks whether this application allows to publish notifications under the user. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { number } userId - The userid of the representative. + * @param { int } userId - The userid of the representative. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -1140,9 +1205,10 @@ 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; + function isNotificationEnabled(userId: int): Promise; /** * Sets whether to allow the specified application to show badge. @@ -1181,7 +1247,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 +1289,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 +1329,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 +1369,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; @@ -1341,7 +1411,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 setSlotByBundle(bundle: BundleOption, slot: NotificationSlot, callback: AsyncCallback): void; @@ -1382,7 +1453,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 setSlotByBundle(bundle: BundleOption, slot: NotificationSlot): Promise; @@ -1421,7 +1493,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 +1537,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 +1577,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>; @@ -1530,7 +1605,7 @@ declare namespace notificationManager { * * @permission ohos.permission.NOTIFICATION_CONTROLLER * @param { BundleOption } bundle - The bundle option. - * @param { AsyncCallback } callback - The callback of getSlotNumByBundle. + * @param { AsyncCallback } callback - The callback of getSlotNumByBundle. * @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. @@ -1542,9 +1617,10 @@ 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 getSlotNumByBundle(bundle: BundleOption, callback: AsyncCallback): void; + function getSlotNumByBundle(bundle: BundleOption, callback: AsyncCallback): void; /** * Obtains number of slot. @@ -1569,7 +1645,7 @@ declare namespace notificationManager { * * @permission ohos.permission.NOTIFICATION_CONTROLLER * @param { BundleOption } bundle - The bundle option. - * @returns { Promise } The promise returned by the function. + * @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. @@ -1581,9 +1657,10 @@ 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 getSlotNumByBundle(bundle: BundleOption): Promise; + function getSlotNumByBundle(bundle: BundleOption): Promise; /** * Obtains all active notifications in the current system. The caller must have system permissions to @@ -1600,7 +1677,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,14 +1695,15 @@ 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>; /** * Obtains the number of active 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 and data is the + * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, err is undefined and data is the * obtained number of active notifications; 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. @@ -1632,21 +1711,23 @@ 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; + function getActiveNotificationCount(callback: AsyncCallback): void; /** * Obtains the number of active notifications of this application. This API uses a promise to return the result. * - * @returns { Promise } Promise used to return the result. + * @returns { Promise } Promise used to return the result. * @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 - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getActiveNotificationCount(): Promise; + function getActiveNotificationCount(): Promise; /** * Obtains the active notifications of this application. This API uses an asynchronous callback to return the result. @@ -1660,7 +1741,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 +1754,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>; @@ -1689,7 +1772,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getActiveNotificationByFilter(filter: NotificationFilter, callback: AsyncCallback): void; @@ -1706,7 +1790,8 @@ declare namespace notificationManager { * @throws { BusinessError } 17700001 - The specified bundle name was not found. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getActiveNotificationByFilter(filter: NotificationFilter): Promise; @@ -1722,7 +1807,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 cancelGroup(groupName: string, callback: AsyncCallback): void; @@ -1737,7 +1823,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 cancelGroup(groupName: string): Promise; @@ -1758,7 +1845,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 removeGroupByBundle(bundle: BundleOption, groupName: string, callback: AsyncCallback): void; @@ -1779,7 +1867,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 removeGroupByBundle(bundle: BundleOption, groupName: string): Promise; @@ -1818,7 +1907,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 setDoNotDisturbDate(date: DoNotDisturbDate, callback: AsyncCallback): void; @@ -1857,7 +1947,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 setDoNotDisturbDate(date: DoNotDisturbDate): Promise; @@ -1886,7 +1977,7 @@ declare namespace notificationManager { * * @permission ohos.permission.NOTIFICATION_CONTROLLER * @param { DoNotDisturbDate } date - The Do Not Disturb date. - * @param { number } userId - The userId. + * @param { int } userId - The userId. * @param { AsyncCallback } callback - The callback of setDoNotDisturbDate. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -1900,9 +1991,10 @@ 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 setDoNotDisturbDate(date: DoNotDisturbDate, userId: number, callback: AsyncCallback): void; + function setDoNotDisturbDate(date: DoNotDisturbDate, userId: int, callback: AsyncCallback): void; /** * Set the Do Not Disturb date under the specified user. @@ -1929,7 +2021,7 @@ declare namespace notificationManager { * * @permission ohos.permission.NOTIFICATION_CONTROLLER * @param { DoNotDisturbDate } date - The Do Not Disturb date. - * @param { number } userId - The userId. + * @param { int } userId - The userId. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -1943,9 +2035,10 @@ 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 setDoNotDisturbDate(date: DoNotDisturbDate, userId: number): Promise; + function setDoNotDisturbDate(date: DoNotDisturbDate, userId: int): Promise; /** * Obtains the Do Not Disturb date. @@ -1980,7 +2073,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 getDoNotDisturbDate(callback: AsyncCallback): void; @@ -2013,7 +2107,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 getDoNotDisturbDate(): Promise; @@ -2040,7 +2135,7 @@ declare namespace notificationManager { * Obtains the Do Not Disturb date. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { number } userId - The userId. + * @param { int } userId - The userId. * @param { AsyncCallback } callback - The callback is used to return the Do Not Disturb date. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -2054,9 +2149,10 @@ 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 getDoNotDisturbDate(userId: number, callback: AsyncCallback): void; + function getDoNotDisturbDate(userId: int, callback: AsyncCallback): void; /** * Obtains the Do Not Disturb date. @@ -2081,7 +2177,7 @@ declare namespace notificationManager { * Obtains the Do Not Disturb date. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { number } userId - The userId. + * @param { int } userId - The userId. * @returns { Promise } Returns the Do Not Disturb date. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -2095,9 +2191,10 @@ 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 getDoNotDisturbDate(userId: number): Promise; + function getDoNotDisturbDate(userId: int): Promise; /** * Obtains whether to support the Do Not Disturb mode. @@ -2115,7 +2212,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 isSupportDoNotDisturbMode(callback: AsyncCallback): void; @@ -2132,12 +2230,14 @@ 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 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, @@ -2148,7 +2248,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 isSupportTemplate(templateName: string, callback: AsyncCallback): void; @@ -2156,14 +2257,16 @@ 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. * @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 isSupportTemplate(templateName: string): Promise; @@ -2266,7 +2369,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 +2461,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; @@ -2396,7 +2501,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600010 - Distributed operation failed. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function setDistributedEnable(enable: boolean, callback: AsyncCallback): void; @@ -2435,14 +2541,16 @@ declare namespace notificationManager { * @throws { BusinessError } 1600010 - Distributed operation failed. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function setDistributedEnable(enable: boolean): Promise; /** * Checks whether distributed notification is enabled on this device. 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. @@ -2450,20 +2558,23 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @throws { BusinessError } 1600010 - Distributed operation failed. * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isDistributedEnabled(callback: AsyncCallback): void; /** * Checks whether distributed notification is enabled on this device. 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. * @throws { BusinessError } 1600010 - Distributed operation failed. * @syscap SystemCapability.Notification.Notification - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function isDistributedEnabled(): Promise; @@ -2506,7 +2617,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 setDistributedEnableByBundle(bundle: BundleOption, enable: boolean, callback: AsyncCallback): void; @@ -2549,7 +2661,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 setDistributedEnableByBundle(bundle: BundleOption, enable: boolean): Promise; @@ -2596,7 +2709,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 setDistributedEnabledByBundle(bundle: BundleOption, deviceType: string, enable: boolean): Promise; @@ -2639,7 +2753,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 isDistributedEnabledByBundle(bundle: BundleOption, callback: AsyncCallback): void; @@ -2680,7 +2795,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 isDistributedEnabledByBundle(bundle: BundleOption): Promise; @@ -2725,7 +2841,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 isDistributedEnabledByBundle(bundle: BundleOption, deviceType: string): Promise; @@ -2770,7 +2887,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 setSmartReminderEnabled(deviceType: string, enable: boolean): Promise; @@ -2813,7 +2931,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 isSmartReminderEnabled(deviceType: string): Promise; @@ -2848,7 +2967,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDeviceRemindType(callback: AsyncCallback): void; @@ -2879,7 +2999,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDeviceRemindType(): Promise; @@ -2944,7 +3065,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 +3120,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 +3196,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 +3238,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 +3280,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; @@ -3182,7 +3308,7 @@ declare namespace notificationManager { * Set whether to sync notifications to devices that do not have the app installed. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { number } userId - The userId. + * @param { int } userId - The userId. * @param { boolean } enable - Set enable or not. * @param { AsyncCallback } callback - The callback of setSyncNotificationEnabledWithoutApp. * @throws { BusinessError } 201 - Permission denied. @@ -3196,9 +3322,10 @@ declare namespace notificationManager { * @throws { BusinessError } 1600008 - The user does not exist. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setSyncNotificationEnabledWithoutApp(userId: number, enable: boolean, callback: AsyncCallback): void; + function setSyncNotificationEnabledWithoutApp(userId: int, enable: boolean, callback: AsyncCallback): void; /** * Set whether to sync notifications to devices that do not have the app installed. @@ -3223,7 +3350,7 @@ declare namespace notificationManager { * Set whether to sync notifications to devices that do not have the app installed. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { number } userId - The userId. + * @param { int } userId - The userId. * @param { boolean } enable - Set enable or not. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. @@ -3237,15 +3364,16 @@ declare namespace notificationManager { * @throws { BusinessError } 1600008 - The user does not exist. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setSyncNotificationEnabledWithoutApp(userId: number, enable: boolean): Promise; + function setSyncNotificationEnabledWithoutApp(userId: int, enable: boolean): Promise; /** * Obtains whether to sync notifications to devices that do not have the app installed. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { number } userId - The userId. + * @param { int } userId - The userId. * @param { AsyncCallback } callback - The callback is used to return whether to sync notifications to devices. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -3257,15 +3385,16 @@ 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 getSyncNotificationEnabledWithoutApp(userId: number, callback: AsyncCallback): void; + function getSyncNotificationEnabledWithoutApp(userId: int, callback: AsyncCallback): void; /** * Obtains whether to sync notifications to devices that do not have the app installed. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { number } userId - The userId. + * @param { int } userId - The userId. * @returns { Promise } Returns whether to sync notifications to devices. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -3277,9 +3406,10 @@ 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 getSyncNotificationEnabledWithoutApp(userId: number): Promise; + function getSyncNotificationEnabledWithoutApp(userId: int): Promise; /** * Sets the notification badge number. This API uses an asynchronous callback to return the result. @@ -3317,7 +3447,7 @@ declare namespace notificationManager { /** * Sets the notification badge number. This API uses an asynchronous callback to return the result. * - * @param { number } badgeNumber - Notification badge number to set. If badgeNumber is set to 0, badges are cleared; + * @param { int } badgeNumber - Notification badge number to set. If badgeNumber is set to 0, badges are cleared; * if the value is greater than 99, 99+ is displayed on the badge. * @param { AsyncCallback } callback - Callback used to return the result. If the operation is successful, * err is undefined; otherwise, err is an error object. @@ -3330,9 +3460,10 @@ declare namespace notificationManager { * @throws { BusinessError } 1600012 - No memory space. * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setBadgeNumber(badgeNumber: number, callback: AsyncCallback): void; + function setBadgeNumber(badgeNumber: int, callback: AsyncCallback): void; /** * Sets the notification badge number. This API uses a promise to return the result. @@ -3368,7 +3499,7 @@ declare namespace notificationManager { /** * Sets the notification badge number. This API uses a promise to return the result. * - * @param { number } badgeNumber - Notification badge number to set. If badgeNumber is set to 0, badges are cleared; + * @param { int } badgeNumber - Notification badge number to set. If badgeNumber is set to 0, badges are cleared; * if the value is greater than 99, 99+ is displayed on the badge. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. @@ -3380,9 +3511,10 @@ declare namespace notificationManager { * @throws { BusinessError } 1600012 - No memory space. * @syscap SystemCapability.Notification.Notification * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setBadgeNumber(badgeNumber: number): Promise; + function setBadgeNumber(badgeNumber: int): Promise; /** * Set badge number by bundle. @@ -3407,7 +3539,7 @@ declare namespace notificationManager { * Set badge number by bundle. * * @param { BundleOption } bundle - Use the bundleOption to carry bundleName and uid of the application. - * @param { number } badgeNumber - Badge number. + * @param { int } badgeNumber - Badge number. * @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. @@ -3421,9 +3553,10 @@ 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 setBadgeNumberByBundle(bundle: BundleOption, badgeNumber: number): Promise; + function setBadgeNumberByBundle(bundle: BundleOption, badgeNumber: int): Promise; /** * Subscribe the callback for check notifications. @@ -3451,7 +3584,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600001 - Internal error. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'checkNotification', callback: (checkInfo: NotificationCheckInfo) => NotificationCheckResult): void; @@ -3489,7 +3623,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function on(type: 'checkNotification', checkRequest: NotificationCheckRequest, callback: (checkInfo: NotificationCheckInfo) => Promise): void; @@ -3520,7 +3655,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600001 - Internal error. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function off( type: 'checkNotification', @@ -3553,7 +3689,7 @@ declare namespace notificationManager { * * @permission ohos.permission.NOTIFICATION_CONTROLLER * @param { BundleOption } bundle - The bundle option. - * @param { number } notificationId - The notification id. + * @param { int } notificationId - The notification id. * @param { ButtonOptions } buttonOptions - The button option. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. @@ -3568,9 +3704,10 @@ 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; + function triggerSystemLiveView(bundle: BundleOption, notificationId: int, buttonOptions: ButtonOptions): Promise; /** * Subscribe to system live view notifications @@ -3603,7 +3740,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; @@ -3631,7 +3769,7 @@ declare namespace notificationManager { * * @permission ohos.permission.NOTIFICATION_CONTROLLER * @param { BundleOption } bundle - The bundle option. - * @param { number } slotFlags - Indicates the slotFlags. + * @param { long } slotFlags - Indicates the slotFlags. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -3644,9 +3782,10 @@ 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; + function setSlotFlagsByBundle(bundle: BundleOption, slotFlags: long): Promise; /** * Obtains basic configurations of application-level notification channels. @@ -3671,7 +3810,7 @@ declare namespace notificationManager { * * @permission ohos.permission.NOTIFICATION_CONTROLLER * @param { BundleOption } bundle - The bundle option. - * @returns { Promise } The promise returned by the function. + * @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. @@ -3683,9 +3822,10 @@ 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; + function getSlotFlagsByBundle(bundle: BundleOption): Promise; /** * Obtains a notification setting of the calling application. @@ -3696,6 +3836,7 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification * @since 20 + * @arkts 1.1&1.2 */ function getNotificationSetting(): Promise; @@ -3734,7 +3875,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 +3915,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; @@ -3801,7 +3944,7 @@ declare namespace notificationManager { * @permission ohos.permission.NOTIFICATION_AGENT_CONTROLLER * @param { string } key - addition config key. * @param { string } value - addition config value. - * @returns { Promise } The promise returned by the function. + * @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. @@ -3812,9 +3955,10 @@ declare namespace notificationManager { * @throws { BusinessError } 1600003 - Failed to connect to the service. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setAdditionalConfig(key: string, value: string): Promise; + function setAdditionalConfig(key: string, value: string): Promise; /** * Opens the notification settings page of the application, which is displayed in semi-modal mode and can be used to set @@ -3841,7 +3985,8 @@ declare namespace notificationManager { * @throws { BusinessError } 1600018 - the notification settings window is already displayed. * @syscap SystemCapability.Notification.NotificationSettings * @stagemodelonly - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ function openNotificationSettings(context: UIAbilityContext): Promise; @@ -3867,7 +4012,7 @@ declare namespace notificationManager { * Get do not disturb profile by id. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { number } id - The id of profile. + * @param { long } id - The id of profile. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -3880,16 +4025,17 @@ declare namespace notificationManager { * @throws { BusinessError } 1600019 - The do-not-disturb profile does not exist. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getDoNotDisturbProfile(id: number): Promise; + function getDoNotDisturbProfile(id: long): Promise; /** * Set target device status. * * @permission ohos.permission.NOTIFICATION_CONTROLLER * @param { string } deviceType - The device. - * @param { number } status - The device status. + * @param { long } 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. @@ -3897,9 +4043,10 @@ declare namespace notificationManager { *
2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - function setTargetDeviceStatus(deviceType: string, status: number): Promise; + function setTargetDeviceStatus(deviceType: string, status: long): Promise; /** * Disabling notifications based on the application list. @@ -3916,7 +4063,8 @@ declare namespace notificationManager { * @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; @@ -3934,8 +4082,9 @@ declare namespace notificationManager { *
2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 - */ + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ function setDistributedEnabledBySlot(slot: SlotType, deviceType: string, enabled: boolean): Promise; /** @@ -3951,8 +4100,9 @@ declare namespace notificationManager { *
2. Incorrect parameter types. 3. Parameter verification failed. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 18 - */ + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 + */ function isDistributedEnabledBySlot(slot: SlotType, deviceType: string): Promise; /** @@ -3961,7 +4111,8 @@ declare namespace notificationManager { * @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 +4122,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 +4134,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,9 +4144,10 @@ 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; + onResponse?: (notificationId: int, buttonOptions: ButtonOptions) => void; } /** @@ -4002,7 +4156,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 +4167,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; @@ -4020,12 +4176,13 @@ declare namespace notificationManager { * The notification id. * * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER - * @type { number } + * @type { int } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - notificationId: number; + notificationId: int; /** * Label of the notification. @@ -4034,7 +4191,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 +4203,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; @@ -4053,12 +4212,13 @@ declare namespace notificationManager { * UserId of the notification creator. * * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER - * @type { number } + * @type { int } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ - creatorUserId: number; + creatorUserId: int; /** * Type of the notification slot. @@ -4067,7 +4227,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 +4239,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,19 +4251,21 @@ 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 { /** * The result code. 0-display, 1-no display * * @permission ohos.permission.NOTIFICATION_CONTROLLER and ohos.permission.NOTIFICATION_AGENT_CONTROLLER - * @type { number } + * @type { int } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - code: number; + code: int; /** * The result message. @@ -4110,7 +4274,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 +4286,7 @@ declare namespace notificationManager { * @typedef NotificationSetting * @syscap SystemCapability.Notification.Notification * @since 20 + * @arkts 1.1&1.2 */ export interface NotificationSetting { /** @@ -4129,6 +4295,7 @@ declare namespace notificationManager { * @type { boolean } * @syscap SystemCapability.Notification.Notification * @since 20 + * @arkts 1.1&1.2 */ vibrationEnabled: boolean; @@ -4138,6 +4305,7 @@ declare namespace notificationManager { * @type { boolean } * @syscap SystemCapability.Notification.Notification * @since 20 + * @arkts 1.1&1.2 */ soundEnabled: boolean; } @@ -4152,10 +4320,11 @@ declare namespace notificationManager { /** * Enumerates the notification slot types. * - * @enum { number } + * @enum { int } * @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 +4338,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 +4354,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 +4370,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 +4386,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 +4424,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 +4434,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 +4450,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 } @@ -4287,11 +4466,12 @@ declare namespace notificationManager { /** * Enumerates the notification content types. * - * @enum { number } + * @enum { int } * @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 +4486,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 +4503,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 +4519,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 +4535,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 +4552,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 +4570,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 +4586,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, } @@ -4408,16 +4595,18 @@ declare namespace notificationManager { /** * Enumerates the notification level. * - * @enum { number } + * @enum { int } * @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 +4614,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 +4623,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 +4632,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 +4641,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 } @@ -4457,10 +4650,11 @@ declare namespace notificationManager { /** * The type of the Do Not Disturb. * - * @enum { number } + * @enum { int } * @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 +4662,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 +4672,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 +4682,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 +4692,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 +4704,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 +4714,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 +4725,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,7 +4736,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 */ end: Date; } @@ -4546,18 +4748,20 @@ 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 { /** * The profile id of the Do Not disturb. * - * @type { number } + * @type { long } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - id: number; + id: long; /** * The profile name of the Do Not disturb. @@ -4565,7 +4769,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 +4780,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; } @@ -4583,10 +4789,11 @@ declare namespace notificationManager { /** * The remind type of the notification. * - * @enum { number } + * @enum { int } * @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 +4801,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 +4811,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 +4821,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 +4831,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 } @@ -4629,10 +4840,11 @@ declare namespace notificationManager { /** * Notification source type * - * @enum { number } + * @enum { int } * @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 +4852,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 +4862,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 +4872,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 } @@ -4666,17 +4881,19 @@ declare namespace notificationManager { /** * Enum for notification control flag status. * - * @enum { number } + * @enum { int } * @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 +4901,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 +4910,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 +4919,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 +4928,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 +4937,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 +4948,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 +4958,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 +4975,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 +4992,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 +5009,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 +5020,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 +5037,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 +5047,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 +5057,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 +5068,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 +5079,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 +5096,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 +5107,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 +5118,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 +5129,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 +5139,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 +5149,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 +5160,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 +5171,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 +5182,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 +5192,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 +5202,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 +5212,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 +5222,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 +5232,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 +5242,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..bc3713020a9bcec26f6d3c9c042cb161adc4a12e 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 { 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,18 +45,20 @@ 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 { /** * Notify ID. * - * @type { number } + * @type { int } * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - id: number; + id: int; /** * Notification label. @@ -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; } @@ -66,10 +75,11 @@ declare namespace notificationSubscribe { /** * Reason for remove a notification * - * @enum { number } + * @enum { int } * @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,8 @@ declare namespace notificationSubscribe { * @throws { BusinessError } 1600012 - No memory space. * @syscap SystemCapability.Notification.Notification * @systemapi - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function subscribeSelf(subscriber: NotificationSubscriber): Promise; @@ -146,7 +160,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 +186,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; @@ -190,7 +206,8 @@ declare namespace notificationSubscribe { * @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 unsubscribe(subscriber: NotificationSubscriber, callback: AsyncCallback): void; @@ -209,7 +226,8 @@ declare namespace notificationSubscribe { * @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 unsubscribe(subscriber: NotificationSubscriber): Promise; @@ -232,7 +250,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 +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, notificationKey: NotificationKey, reason: RemoveReason): Promise; @@ -281,7 +301,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 +323,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 +345,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 +366,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; @@ -363,7 +387,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 removeAll(bundle: BundleOption, callback: AsyncCallback): void; @@ -381,7 +406,8 @@ declare namespace notificationSubscribe { * @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 removeAll(callback: AsyncCallback): void; @@ -389,7 +415,7 @@ declare namespace notificationSubscribe { * Remove all notifications under the specified user. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { number } userId - The userId. + * @param { int } userId - The userId. * @param { AsyncCallback } callback - The callback of removeAll. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -401,15 +427,16 @@ declare namespace notificationSubscribe { * @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 removeAll(userId: number, callback: AsyncCallback): void; + function removeAll(userId: int, callback: AsyncCallback): void; /** * Remove all notifications under the specified user. * * @permission ohos.permission.NOTIFICATION_CONTROLLER - * @param { number } userId - The userId. + * @param { int } userId - The userId. * @returns { Promise } The promise returned by the function. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 202 - Not system application to call the interface. @@ -421,9 +448,10 @@ declare namespace notificationSubscribe { * @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 removeAll(userId: number): Promise; + function removeAll(userId: int): Promise; /** * RemoveAll all notifications. @@ -441,7 +469,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 removeAll(bundle?: BundleOption): Promise; @@ -460,7 +489,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 +500,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 +510,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 +521,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 +533,7 @@ declare namespace notificationSubscribe { * @syscap SystemCapability.Notification.Notification * @systemapi * @since 20 + * @arkts 1.1&1.2 */ operationType?: number; @@ -510,6 +544,7 @@ declare namespace notificationSubscribe { * @syscap SystemCapability.Notification.Notification * @systemapi * @since 20 + * @arkts 1.1&1.2 */ buttonIndex?: number; } @@ -520,7 +555,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 +566,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 +578,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 +590,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 +601,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 +612,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..ddd320d4b1747da8db66d7be5780d330f8d17309 100644 --- a/api/@ohos.pasteboard.d.ts +++ b/api/@ohos.pasteboard.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 @@ -21,9 +21,7 @@ import { AsyncCallback } from './@ohos.base'; import Want from './@ohos.app.ability.Want'; import image from './@ohos.multimedia.image'; -/*** if arkts 1.1 */ import unifiedDataChannel from './@ohos.data.unifiedDataChannel'; -/*** endif */ /** * systemPasteboard @@ -36,7 +34,7 @@ import unifiedDataChannel from './@ohos.data.unifiedDataChannel'; * @namespace pasteboard * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ declare namespace pasteboard { @@ -65,7 +63,7 @@ declare namespace pasteboard { * @constant * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ const MIMETYPE_TEXT_HTML = 'text/html'; @@ -80,8 +78,7 @@ declare namespace pasteboard { * @constant * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ const MIMETYPE_TEXT_WANT = 'text/want'; /** @@ -95,7 +92,7 @@ declare namespace pasteboard { * @constant * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ const MIMETYPE_TEXT_PLAIN = 'text/plain'; @@ -110,7 +107,7 @@ declare namespace pasteboard { * @constant * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ const MIMETYPE_TEXT_URI = 'text/uri'; @@ -125,8 +122,7 @@ declare namespace pasteboard { * @constant * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ const MIMETYPE_PIXELMAP = 'pixelMap'; @@ -141,7 +137,7 @@ declare namespace pasteboard { * @typedef { string | image.PixelMap | Want | ArrayBuffer } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ type ValueType = string | image.PixelMap | Want | ArrayBuffer; @@ -211,7 +207,7 @@ declare namespace pasteboard { * 3. Parameter verification failed. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ function createData(mimeType: string, value: ValueType): PasteData; @@ -224,7 +220,7 @@ declare namespace pasteboard { * 2. Incorrect parameters types; * 3. Parameter verification failed. * @syscap SystemCapability.MiscServices.Pasteboard - * @since arkts {'1.1':'14', '1.2':'20'} + * @since arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 */ function createData(data: Record): PasteData; @@ -309,7 +305,7 @@ declare namespace pasteboard { * @returns { SystemPasteboard } The system clipboard object * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ function getSystemPasteboard(): SystemPasteboard; @@ -325,7 +321,7 @@ declare namespace pasteboard { * @enum { number } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ enum ShareOption { @@ -338,7 +334,7 @@ declare namespace pasteboard { * INAPP indicates that only intra-application pasting is allowed. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ INAPP, @@ -351,7 +347,7 @@ declare namespace pasteboard { * LOCALDEVICE indicates that paste is allowed in any application. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ LOCALDEVICE, @@ -364,8 +360,7 @@ declare namespace pasteboard { * CROSSDEVICE indicates that paste is allowed in any application across devices. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 * @deprecated since 12 */ CROSSDEVICE @@ -375,19 +370,22 @@ declare namespace pasteboard { * Enumerates the patterns allowed in the system pasteboard. * @enum { number } * @syscap SystemCapability.MiscServices.Pasteboard - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ enum Pattern { /** * URL pattern. * @syscap SystemCapability.MiscServices.Pasteboard - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ URL = 0, /** * Number pattern. * @syscap SystemCapability.MiscServices.Pasteboard - * @since 13 + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ NUMBER = 1, /** @@ -411,7 +409,7 @@ declare namespace pasteboard { * @interface PasteDataProperty * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ interface PasteDataProperty { @@ -458,7 +456,7 @@ declare namespace pasteboard { * @type { string } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ tag: string; @@ -471,14 +469,14 @@ declare namespace pasteboard { */ /** * a timestamp, which indicates when data is written to the system pasteboard. - * @type { number } + * @type { long } * @readonly * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - readonly timestamp: number; + readonly timestamp: long; /** * Checks whether PasteData is set for local access only. * @type { boolean } @@ -506,7 +504,7 @@ declare namespace pasteboard { * @type { ShareOption } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ shareOption: ShareOption; @@ -523,7 +521,7 @@ declare namespace pasteboard { * @interface PasteDataRecord * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ interface PasteDataRecord { @@ -566,7 +564,7 @@ declare namespace pasteboard { * @type { string } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ mimeType: string; @@ -581,7 +579,7 @@ declare namespace pasteboard { * @type { string } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ plainText: string; @@ -596,7 +594,7 @@ declare namespace pasteboard { * @type { string } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ uri: string; @@ -611,7 +609,8 @@ declare namespace pasteboard { * @type { image.PixelMap } * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ pixelMap: image.PixelMap; /** @@ -663,7 +662,8 @@ declare namespace pasteboard { * @returns { string } the string returned by the function. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ toPlainText(): string; @@ -699,7 +699,8 @@ declare namespace pasteboard { * 2. Incorrect parameters types; * 3. Parameter verification failed. * @syscap SystemCapability.MiscServices.Pasteboard - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getData(type: string): Promise; } @@ -715,7 +716,7 @@ declare namespace pasteboard { * @interface PasteData * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ interface PasteData { @@ -750,7 +751,7 @@ declare namespace pasteboard { * @param { PasteDataRecord } record - The content of a new record. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ addRecord(record: PasteDataRecord): void; @@ -805,7 +806,7 @@ declare namespace pasteboard { * 3. Parameter verification failed. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ addRecord(mimeType: string, value: ValueType): void; @@ -821,7 +822,8 @@ declare namespace pasteboard { * @returns { Array } type of array * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getMimeTypes(): Array; @@ -836,7 +838,8 @@ declare namespace pasteboard { * @returns { string } type of htmltext * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getPrimaryHtml(): string; @@ -851,7 +854,8 @@ declare namespace pasteboard { * @returns { Want } type of want * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getPrimaryWant(): Want; @@ -866,7 +870,8 @@ declare namespace pasteboard { * @returns { string } type of mimetype * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getPrimaryMimeType(): string; @@ -881,7 +886,8 @@ declare namespace pasteboard { * @returns { string } type of text * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getPrimaryText(): string; @@ -896,7 +902,8 @@ declare namespace pasteboard { * @returns { string } type of uri * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getPrimaryUri(): string; @@ -926,7 +933,7 @@ declare namespace pasteboard { * @returns { PasteDataProperty } PasteDataProperty type of PasteDataProperty * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ getProperty(): PasteDataProperty; @@ -946,7 +953,7 @@ declare namespace pasteboard { * 2. Incorrect parameters types. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ setProperty(property: PasteDataProperty): void; @@ -976,17 +983,17 @@ declare namespace pasteboard { */ /** * Gets record by index in PasteData. - * @param { number } index - indicates the record index in PasteData. + * @param { int } index - indicates the record index in PasteData. * @returns { PasteDataRecord } the record in PasteData with index. * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. * @throws { BusinessError } 12900001 - The index is out of the record. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - getRecord(index: number): PasteDataRecord; + getRecord(index: int): PasteDataRecord; /** * the number of records in a PasteData object. @@ -996,13 +1003,13 @@ declare namespace pasteboard { */ /** * the number of records in a PasteData object. - * @returns { number } The number of the clipboard contents + * @returns { int } The number of the clipboard contents * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - getRecordCount(): number; + getRecordCount(): int; /** * the user-defined tag of a PasteData object. @@ -1015,7 +1022,8 @@ declare namespace pasteboard { * @returns { string } type of tag * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ getTag(): string; @@ -1300,7 +1308,7 @@ declare namespace pasteboard { * @interface SystemPasteboard * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ interface SystemPasteboard { @@ -1311,7 +1319,8 @@ declare namespace pasteboard { * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. * @syscap SystemCapability.MiscServices.Pasteboard - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ on(type: 'update', callback: () => void): void; @@ -1323,7 +1332,8 @@ declare namespace pasteboard { * @throws { BusinessError } 401 - Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameters types. * @syscap SystemCapability.MiscServices.Pasteboard - * @since 7 + * @since arkts {'1.1':'7','1.2':'20'} + * @arkts 1.1&1.2 */ off(type: 'update', callback?: () => void): void; @@ -1343,7 +1353,7 @@ declare namespace pasteboard { * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ getDataSource(): string; @@ -1357,7 +1367,7 @@ declare namespace pasteboard { * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ hasDataType(mimeType: string): boolean; @@ -1399,7 +1409,7 @@ declare namespace pasteboard { * 2. Incorrect parameters types. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ clearData(callback: AsyncCallback): void; @@ -1415,7 +1425,7 @@ declare namespace pasteboard { * @returns { Promise } the promise returned by the clearData. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ clearData(): Promise; @@ -1425,7 +1435,8 @@ declare namespace pasteboard { * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ clearDataSync(): void; @@ -1481,7 +1492,8 @@ declare namespace pasteboard { * @throws { BusinessError } 27787277 - Another copy or paste operation is in progress. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getData(callback: AsyncCallback): void; @@ -1509,7 +1521,8 @@ declare namespace pasteboard { * @throws { BusinessError } 27787277 - Another copy or paste operation is in progress. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ getData(): Promise; @@ -1530,7 +1543,7 @@ declare namespace pasteboard { * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ getDataSync(): PasteData; @@ -1572,7 +1585,8 @@ declare namespace pasteboard { * 2. Incorrect parameters types. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hasData(callback: AsyncCallback): void; @@ -1587,7 +1601,8 @@ declare namespace pasteboard { * @returns { Promise } the promise returned by the function. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hasData(): Promise; @@ -1597,7 +1612,8 @@ declare namespace pasteboard { * @throws { BusinessError } 12900005 - Excessive processing time for internal data. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ hasDataSync(): boolean; @@ -1646,7 +1662,7 @@ declare namespace pasteboard { * @throws { BusinessError } 27787278 - Replication is prohibited. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ setData(data: PasteData, callback: AsyncCallback): void; @@ -1672,7 +1688,7 @@ declare namespace pasteboard { * @throws { BusinessError } 27787278 - Replication is prohibited. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} + * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ setData(data: PasteData): Promise; @@ -1808,7 +1824,8 @@ declare namespace pasteboard { * @returns { Promise> } Promise used to return the MIME types. * @syscap SystemCapability.MiscServices.Pasteboard * @atomicservice - * @since 14 + * @since arkts {'1.1':'14','1.2':'20'} + * @arkts 1.1&1.2 */ getMimeTypes(): Promise>; diff --git a/api/@ohos.pluginComponent.d.ts b/api/@ohos.pluginComponent.d.ts index b0666d852ad2fd587758bbfdd71c7dfc34d22a20..aacb631200c52f908c5319b226918937379495fc 100644 --- a/api/@ohos.pluginComponent.d.ts +++ b/api/@ohos.pluginComponent.d.ts @@ -103,7 +103,7 @@ declare namespace pluginComponentManager { * @atomicservice * @since 12 */ - type KVObject = { [key: string]: number | string | boolean | [] | KVObject } + type KVObject = { [key: string]: number | string | boolean | [] | KVObject }; /** * Plugin component push parameters. diff --git a/api/@ohos.pluginComponent.d.ets b/api/@ohos.pluginComponent.static.d.ets similarity index 58% rename from api/@ohos.pluginComponent.d.ets rename to api/@ohos.pluginComponent.static.d.ets index 5f79e3d5e1f839e9f833ff1489d5993f2f0c87c2..d61c495c85f668a0ed88ab0edb80a0fca376a63f 100644 --- a/api/@ohos.pluginComponent.d.ets +++ b/api/@ohos.pluginComponent.static.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 @@ -16,6 +16,7 @@ /** * @file * @kit ArkUI + * @arkts 1.2 */ import { AsyncCallback } from './@ohos.base'; @@ -26,15 +27,7 @@ import Want from './@ohos.app.ability.Want'; * * @interface PluginComponentTemplate * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Plugin component template property. - * - * @interface PluginComponentTemplate - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ export interface PluginComponentTemplate { /** @@ -42,15 +35,7 @@ export interface PluginComponentTemplate { * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines the source - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ source: string; @@ -59,15 +44,7 @@ export interface PluginComponentTemplate { * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines the ability - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ ability: string; } @@ -77,15 +54,7 @@ export interface PluginComponentTemplate { * * @namespace pluginComponentManager * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Plugin component manager interface. - * - * @namespace pluginComponentManager - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ declare namespace pluginComponentManager { /** @@ -93,32 +62,22 @@ declare namespace pluginComponentManager { * * @typedef { object } KVObject * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 20 */ /** * Defines KVObject * - * @typedef { object } KVObject + * @typedef { Record | KVObject> } KVObject * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ - export type KVObject = Record> - + export type KVObject = Record | KVObject> /** * 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 + * @since 20 */ export interface PushParameters { /** @@ -126,15 +85,7 @@ declare namespace pluginComponentManager { * * @type { Want } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines want. - * - * @type { Want } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ want: Want; @@ -143,15 +94,7 @@ declare namespace pluginComponentManager { * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ name: string; @@ -160,15 +103,7 @@ declare namespace pluginComponentManager { * * @type { KVObject } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines data. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ data: KVObject; @@ -177,15 +112,7 @@ declare namespace pluginComponentManager { * * @type { KVObject } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines extraData. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ extraData: KVObject; @@ -194,15 +121,7 @@ declare namespace pluginComponentManager { * * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines jsonPath. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ jsonPath?: string; } @@ -213,7 +132,7 @@ declare namespace pluginComponentManager { * @interface PushParameterForStage * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since 20 */ export interface PushParameterForStage { /** @@ -222,7 +141,7 @@ declare namespace pluginComponentManager { * @type { Want } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since 20 */ owner: Want; @@ -232,7 +151,7 @@ declare namespace pluginComponentManager { * @type { Want } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since 20 */ target: Want; @@ -242,7 +161,7 @@ declare namespace pluginComponentManager { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since 20 */ name: string; @@ -252,7 +171,7 @@ declare namespace pluginComponentManager { * @type { KVObject } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since 20 */ data: KVObject; @@ -262,7 +181,7 @@ declare namespace pluginComponentManager { * @type { KVObject } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since 20 */ extraData: KVObject; @@ -272,7 +191,7 @@ declare namespace pluginComponentManager { * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since 20 */ jsonPath?: string; } @@ -282,15 +201,7 @@ declare namespace pluginComponentManager { * * @interface RequestParameters * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Plugin component request parameters. - * - * @interface RequestParameters - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ export interface RequestParameters { /** @@ -298,15 +209,7 @@ declare namespace pluginComponentManager { * * @type { Want } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines want. - * - * @type { Want } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ want: Want; @@ -315,32 +218,16 @@ declare namespace pluginComponentManager { * * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ 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 + * @since 20 */ data: KVObject; @@ -349,15 +236,7 @@ declare namespace pluginComponentManager { * * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines jsonPath. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ jsonPath?: string; } @@ -368,7 +247,7 @@ declare namespace pluginComponentManager { * @interface RequestParameterForStage * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since 20 */ export interface RequestParameterForStage { /** @@ -377,7 +256,7 @@ declare namespace pluginComponentManager { * @type { Want } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since 20 */ owner: Want; @@ -387,7 +266,7 @@ declare namespace pluginComponentManager { * @type { Want } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since 20 */ target: Want; /** @@ -396,7 +275,7 @@ declare namespace pluginComponentManager { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since 20 */ name: string; @@ -406,7 +285,7 @@ declare namespace pluginComponentManager { * @type { KVObject } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since 20 */ data: KVObject; @@ -416,7 +295,7 @@ declare namespace pluginComponentManager { * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since 9 + * @since 20 */ jsonPath?: string; } @@ -426,15 +305,7 @@ declare namespace pluginComponentManager { * * @interface RequestCallbackParameters * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Plugin component request callback parameters. - * - * @interface RequestCallbackParameters - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ export interface RequestCallbackParameters { @@ -443,32 +314,16 @@ declare namespace pluginComponentManager { * * @type { PluginComponentTemplate } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines componentTemplate. - * - * @type { PluginComponentTemplate } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ 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 + * @since 20 */ data: KVObject; @@ -477,15 +332,7 @@ declare namespace pluginComponentManager { * * @type { KVObject } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines extraData. - * - * @type { KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ extraData: KVObject; } @@ -495,15 +342,7 @@ declare namespace pluginComponentManager { * * @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 + * @since 20 */ export interface RequestEventResult { /** @@ -511,15 +350,7 @@ declare namespace pluginComponentManager { * * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines template. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ template?: string; @@ -528,15 +359,7 @@ declare namespace pluginComponentManager { * * @type { ?KVObject } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines data. - * - * @type { ?KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ data?: KVObject; @@ -545,15 +368,7 @@ declare namespace pluginComponentManager { * * @type { ?KVObject } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines extraData. - * - * @type { ?KVObject } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ extraData?: KVObject; } @@ -562,16 +377,12 @@ declare namespace pluginComponentManager { * Plugin component push event callback. * * @typedef { function } OnPushEventCallback + * @param { Want } source - Push request sender's relevant information. + * @param { PluginComponentTemplate } template - Request component template name. + * @param { KVObject } data - data info. + * @param { KVObject } extraData - extra data info. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Plugin component push event callback. - * - * @typedef { function } OnPushEventCallback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ export type OnPushEventCallback = (source: Want, template: PluginComponentTemplate, data: KVObject, extraData: KVObject) => void; @@ -580,18 +391,13 @@ declare namespace pluginComponentManager { * Plugin component request event callback. * * @typedef { function } OnRequestEventCallback + * @param { Want } source - Request the sender to provide relevant information. + * @param { string } name - Template name. + * @param { KVObject } data - data info. + * @returns { RequestEventResult } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Plugin component request event callback. - * - * @typedef { function } OnRequestEventCallback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 + * @since 20 */ - export type OnRequestEventCallback = (source: Want, name: string, data: KVObject) => RequestEventResult; /** @@ -600,16 +406,7 @@ declare namespace pluginComponentManager { * @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 + * @since 20 */ export function push(param: PushParameters, callback: AsyncCallback): void; @@ -619,16 +416,7 @@ declare namespace pluginComponentManager { * @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 + * @since 20 */ export function request(param: RequestParameters, callback: AsyncCallback): void; @@ -639,8 +427,7 @@ declare namespace pluginComponentManager { * @param { AsyncCallback } callback - Plugin component push event callback. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @StageModelOnly - * @since 9 + * @since 20 */ export function push(param: PushParameterForStage, callback: AsyncCallback): void; @@ -651,8 +438,7 @@ declare namespace pluginComponentManager { * @param { AsyncCallback } callback - Plugin component request event callback. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @StageModelOnly - * @since 9 + * @since 20 */ export function request(param: RequestParameterForStage, callback: AsyncCallback): void; @@ -662,16 +448,7 @@ declare namespace pluginComponentManager { * @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 + * @since 20 */ export function on(eventType: string, callback: OnPushEventCallback | OnRequestEventCallback): void; } diff --git a/api/@ohos.power.d.ts b/api/@ohos.power.d.ts index 0bdb72dc4fa982c01aa1098894afdb170ae9ecb5..4968898ca1a54410e6d39b920148fc1c1cf28d5e 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,51 +277,57 @@ 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; /** * 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 } 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..fbba0091ac7dff1a14aca321360a86f6a9b27614 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,10 +53,10 @@ 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 { 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. @@ -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; @@ -155,7 +158,7 @@ declare namespace privacyManager { * Start using 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 started. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -173,16 +176,16 @@ declare namespace privacyManager { * @systemapi * @since 9 */ - function startUsingPermission(tokenID: number, permissionName: Permissions): Promise; + function startUsingPermission(tokenID: int, permissionName: Permissions): Promise; /** * Start using 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 started. - * @param { number } pid - Pid of the application, default -1. - * @param { PermissionUsedType } usedType - Used type of the permission accessed, default NORMAL_TYPE. + * @param { int } [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". @@ -200,9 +203,9 @@ declare namespace privacyManager { * @since 18 */ function startUsingPermission( - tokenID: number, + tokenID: int, permissionName: Permissions, - pid?: number, + pid?: int, usedType?: PermissionUsedType ): Promise; @@ -210,7 +213,7 @@ declare namespace privacyManager { * Start using 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 started. * @param { AsyncCallback } callback - Asynchronous callback interface. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -228,13 +231,13 @@ declare namespace privacyManager { * @systemapi * @since 9 */ - function startUsingPermission(tokenID: number, permissionName: Permissions, callback: AsyncCallback): void; + function startUsingPermission(tokenID: int, permissionName: Permissions, callback: AsyncCallback): void; /** * Stop using 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 stopped. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -251,15 +254,15 @@ declare namespace privacyManager { * @systemapi * @since 9 */ - function stopUsingPermission(tokenID: number, permissionName: Permissions): Promise; + function stopUsingPermission(tokenID: int, permissionName: Permissions): Promise; /** * Stop using 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 stopped. - * @param { number } pid - Pid of the application, default -1. + * @param { int } [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". @@ -276,16 +279,16 @@ declare namespace privacyManager { * @since 18 */ function stopUsingPermission( - tokenID: number, + tokenID: int, permissionName: Permissions, - pid?: number + pid?: int ): Promise; /** * Stop using 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 stopped. * @param { AsyncCallback } callback - Asynchronous callback interface. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2.Incorrect parameter types. @@ -302,7 +305,7 @@ declare namespace privacyManager { * @systemapi * @since 9 */ - function stopUsingPermission(tokenID: number, permissionName: Permissions, callback: AsyncCallback): void; + function stopUsingPermission(tokenID: int, permissionName: Permissions, callback: AsyncCallback): void; /** * Subscribes to the change of active state of the specified permission. @@ -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,17 +339,18 @@ 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. - * @throws { BusinessError } 12100001 - Invalid parameter. The permissionList is not in the listening list. + * @throws { BusinessError } 12100001 - Invalid parameter. The permissionNames in the list are all invalid, or the list size exceeds 1024 bytes. * @throws { BusinessError } 12100004 - The API is not used in pair with 'on'. * @throws { BusinessError } 12100007 - The service is abnormal. * @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; } @@ -513,7 +549,7 @@ declare namespace privacyManager { /** * PermissionUsageFlag. * - * @enum { number } PermissionUsageFlag + * @enum { int } PermissionUsageFlag * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 @@ -549,12 +585,12 @@ declare namespace privacyManager { /** * AccessTokenID * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - tokenId?: number; + tokenId?: int; /** * Distribute flag @@ -600,24 +636,24 @@ declare namespace privacyManager { /** * The begin time, in milliseconds * - * @type { ?number } + * @type { ?long } * @default 0 * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - beginTime?: number; + beginTime?: long; /** * The end time, in milliseconds * - * @type { ?number } + * @type { ?long } * @default 0 * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - endTime?: number; + endTime?: long; /** * The permission usage flag @@ -642,22 +678,22 @@ declare namespace privacyManager { /** * The begin time, in milliseconds * - * @type { number } + * @type { long } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - beginTime: number; + beginTime: long; /** * The end time, in milliseconds * - * @type { number } + * @type { long } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - endTime: number; + endTime: long; /** * The list of permission used records of bundle @@ -682,12 +718,12 @@ declare namespace privacyManager { /** * AccessTokenID * - * @type { number } + * @type { int } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - tokenId: number; + tokenId: int; /** * Distribute flag @@ -752,52 +788,52 @@ declare namespace privacyManager { /** * The access counts * - * @type { number } + * @type { int } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - accessCount: number; + accessCount: int; /** * The reject counts * - * @type { number } + * @type { int } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - rejectCount: number; + rejectCount: int; /** * The last access time, in milliseconds * - * @type { number } + * @type { long } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - lastAccessTime: number; + lastAccessTime: long; /** * The last reject time, in milliseconds * - * @type { number } + * @type { long } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - lastRejectTime: number; + lastRejectTime: long; /** * The last access duration, in milliseconds * - * @type { number } + * @type { long } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - lastAccessDuration: number; + lastAccessDuration: long; /** * The list of access records of details @@ -832,52 +868,52 @@ declare namespace privacyManager { /** * The status * - * @type { number } + * @type { int } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - status: number; + status: int; /** * Indicates the status of lockscreen. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 11 */ - lockScreenStatus?: number; + lockScreenStatus?: int; /** * Timestamp, in milliseconds * - * @type { number } + * @type { long } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - timestamp: number; + timestamp: long; /** * The value of successCount or failCount passed in to addPermissionUsedRecord. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 11 */ - count?: number; + count?: int; /** * Access duration, in milliseconds * - * @type { number } + * @type { long } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 9 */ - accessDuration: number; + accessDuration: long; /** * Used type of the permission accessed. @@ -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 } @@ -939,12 +979,12 @@ declare namespace privacyManager { /** * Token ID of the application. * - * @type { number } + * @type { int } * @syscap SystemCapability.Security.AccessToken * @systemapi * @since 12 */ - tokenId: number; + tokenId: int; /** * Name of the permission accessed. @@ -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,11 +1023,12 @@ 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; } } export default privacyManager; -export { Permissions }; \ No newline at end of file +export { Permissions }; 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