diff --git a/BUILD.gn b/BUILD.gn index 1478de7e9fc3f6bf0a1f61baa65ecbc64a8bbdd1..c06527ca05a889c743e7ad423d258b752d856de8 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -130,6 +130,85 @@ 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" @@ -261,58 +340,6 @@ ohos_copy("syscap_check") { module_install_name = "" } -# ets1.1的执行脚本 -ohos_copy("ohos_build_ets_sdk") { - deps = [ ":handle_ets1.1_arkui_label" ] - sources = [ "$root_build_dir/ohos_dynamic_arkui" ] - outputs=[ target_out_dir+"/${target_name}" ] - module_source_dir = target_out_dir + "/${target_name}" - module_install_name = "" -} - -# ets1.2的执行脚本 -ohos_copy("ohos_build_ets2_sdk") { - deps = [ ":handle_ets1.2_arkui_label" ] - sources = [ "$root_build_dir/ohos_static_arkui" ] - outputs=[ target_out_dir+"/${target_name}" ] - module_source_dir = target_out_dir + "/${target_name}" - module_install_name = "" -} - -# 处理ets1.1的@noninterop标签 -action("handle_ets1.1_arkui_label") { - deps = [ ":ohos_ets_dynamic" ] - script = "delete_arkui_label.py" - args = [ - "--root-build-dir", - rebase_path("//", root_build_dir), - "--input-interface-sdk", - rebase_path(ohos_ets_dynamic_path), - "--output-arkui-interface-sdk", - rebase_path("$root_build_dir/ohos_dynamic_arkui"), - "--node-js", - rebase_path(nodejs, root_build_dir) - ] - outputs=[ "$root_build_dir/ohos_dynamic_arkui" ] -} - -# 处理ets1.2的@noninterop标签 -action("handle_ets1.2_arkui_label") { - deps = [ ":ohos_ets_static" ] - script = "delete_arkui_label.py" - args = [ - "--root-build-dir", - rebase_path("//", root_build_dir), - "--input-interface-sdk", - rebase_path(ohos_ets_static_path), - "--output-arkui-interface-sdk", - rebase_path("$root_build_dir/ohos_static_arkui"), - "--node-js", - rebase_path(nodejs, root_build_dir) - ] - outputs=[ "$root_build_dir/ohos_static_arkui" ] -} - # 处理ets1.1的interop ohos_copy("build_dynamic_sdk_interop") { deps = [ ":build_sdk_interop1", ":ohos_ets_process_interop" ] @@ -401,6 +428,7 @@ group("build_ohos_ets") { # 将ets1.1文件处理成ets1.1interop action("build_sdk_interop1") { deps = [ + ":build_sdk_interop1_arkui", ":ohos_base_split", ":ohos_ets_dynamic" ] @@ -485,19 +513,23 @@ action("ohos_ets_static_component") { ":ets_component2", ":ohos_ets_static_api_declaration" ] - script = "//interface/sdk-js/arkui_transformer.py" + script = "//interface/sdk-js/process_internal.py" args = [ "--input", 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_static_api_path + "/arkui/component", root_build_dir), - "--source_root_dir", - rebase_path("//", root_build_dir), - "--npm-path", - rebase_path(npm, root_build_dir), - "--node-js", - rebase_path(nodejs, root_build_dir), - ] + rebase_path(ohos_ets_static_api_path + "/arkui/component",root_build_dir) + ] outputs = [ ohos_ets_static_api_path + "/arkui/component" ] } @@ -546,6 +578,34 @@ group("ohos_ets_dynamic") { ] } +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 = "" +} # ets1.2 interop工具的SDK输入 group("ohos_ets_static") { deps = [ @@ -569,8 +629,30 @@ action("ohos_ets_process_interop") { "--source-root-dir", rebase_path("//", root_build_dir), "--node-js", - rebase_path(nodejs, root_build_dir) + rebase_path(nodejs, root_build_dir), + "--is-pre", + "false" ] outputs = ["${interface_sdk_path}/arkui_dummy_interop"] -} \ No newline at end of file +} + +action("build_sdk_interop1_arkui") { + deps = [ + ":ohos_base_split", + ":ohos_ets_dynamic" ] + + script = "process_label_noninterop.py" + args = [ + "--intermediates-output", + rebase_path("${interface_sdk_path}", root_build_dir), + "--source-root-dir", + rebase_path("//", root_build_dir), + "--node-js", + rebase_path(nodejs, root_build_dir), + "--is-pre", + "true" + ] + + outputs = ["${interface_sdk_path}/arkui_dummy_interop_pre"] +} diff --git a/api/@internal/component/ets/ability_component.d.ts b/api/@internal/component/ets/ability_component.d.ts index f4c10c747aec30ba08a5019cb5d87aa36747f434..5258b0c6d2cb163f05e2a0c3270c18a7defee29c 100644 --- a/api/@internal/component/ets/ability_component.d.ts +++ b/api/@internal/component/ets/ability_component.d.ts @@ -27,6 +27,7 @@ * @since 9 * @deprecated since 10 * @useinstead UIExtensionComponentInterface + * @noninterop */ interface AbilityComponentInterface { /** @@ -53,6 +54,7 @@ interface AbilityComponentInterface { * @since 9 * @deprecated since 10 * @useinstead UIExtensionComponentAttribute + * @noninterop */ declare class AbilityComponentAttribute extends CommonMethod { /** @@ -88,6 +90,7 @@ declare class AbilityComponentAttribute extends CommonMethod; - - /** - * Defines dialog dismiss function. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - dismiss(): void; /** * Reason why the dialog box cannot be dismissed. You must specify whether to close the dialog box for each of the @@ -190,8 +161,7 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ reason: DismissReason; } @@ -203,8 +173,7 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface ActionSheetButtonOptions { /** @@ -234,8 +203,7 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ enabled?: boolean; @@ -266,8 +234,7 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ defaultFocus?: boolean; @@ -297,8 +264,7 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ style?: DialogButtonStyle; @@ -334,8 +300,7 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ value: string | Resource; @@ -371,8 +336,7 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ action: VoidCallback; } @@ -384,8 +348,7 @@ interface ActionSheetButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface ActionSheetOffset { /** @@ -396,8 +359,7 @@ interface ActionSheetOffset { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ dx: number | string | Resource; /** @@ -408,8 +370,7 @@ interface ActionSheetOffset { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ dy: number | string | Resource; } @@ -458,8 +419,7 @@ declare type ImmersiveMode = import('../api/@ohos.promptAction').ImmersiveMode; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface ActionSheetOptions { @@ -485,8 +445,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ title: string | Resource; @@ -503,8 +462,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ subtitle?: ResourceStr; @@ -530,8 +488,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ message: string | Resource; @@ -568,8 +525,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ confirm?: ActionSheetButtonOptions; @@ -605,8 +561,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ cancel?: VoidCallback; @@ -632,8 +587,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ sheets: Array; @@ -661,8 +615,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ autoCancel?: boolean; @@ -693,8 +646,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ alignment?: DialogAlignment; @@ -731,8 +683,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ offset?: ActionSheetOffset; @@ -756,8 +707,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maskRect?: Rectangle; @@ -782,8 +732,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ showInSubWindow?: boolean; @@ -802,8 +751,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isModal?: boolean; @@ -828,8 +776,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundColor?: ResourceColor; @@ -855,8 +802,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundBlurStyle?: BlurStyle; @@ -867,8 +813,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -879,8 +824,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundEffect?: BackgroundEffectOptions; @@ -898,8 +842,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillDismiss?: Callback; @@ -917,8 +860,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ transition?: TransitionEffect; @@ -933,8 +875,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ cornerRadius?: Dimension | BorderRadiuses | LocalizedBorderRadiuses; @@ -948,8 +889,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ width?: Dimension; @@ -963,8 +903,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ height?: Dimension; @@ -979,8 +918,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ borderWidth?: Dimension | EdgeWidths | LocalizedEdgeWidths; @@ -996,8 +934,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ borderColor?: ResourceColor | EdgeColors | LocalizedEdgeColors; @@ -1009,8 +946,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ borderStyle?: BorderStyle | EdgeStyles; @@ -1023,8 +959,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ shadow?: ShadowOptions | ShadowStyle; @@ -1036,8 +971,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ enableHoverMode?: boolean; @@ -1049,8 +983,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ hoverModeArea?: HoverModeAreaType; @@ -1061,8 +994,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ onDidAppear?: Callback; @@ -1073,8 +1005,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ onDidDisappear?: Callback; @@ -1085,8 +1016,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ onWillAppear?: Callback; @@ -1097,8 +1027,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ onWillDisappear?: Callback; @@ -1110,8 +1039,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ levelMode?: LevelMode; @@ -1125,8 +1053,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ levelUniqueId?: number; @@ -1138,8 +1065,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ immersiveMode?: ImmersiveMode; @@ -1151,8 +1077,7 @@ interface ActionSheetOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ levelOrder?: LevelOrder; } diff --git a/api/@internal/component/ets/alert_dialog.d.ts b/api/@internal/component/ets/alert_dialog.d.ts index caaf8160a3b90017cbefb0b01808f83e1862a353..8bf3cfe0bd0c0275d11514311e0d2c4718814910 100644 --- a/api/@internal/component/ets/alert_dialog.d.ts +++ b/api/@internal/component/ets/alert_dialog.d.ts @@ -18,18 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { - ResourceStr, ResourceColor, VoidCallback, Offset, Dimension, BorderRadiuses, LocalizedBorderRadiuses, EdgeWidths, - LocalizedEdgeWidths, EdgeColors, LocalizedEdgeColors, EdgeStyles -} from './units'; -import { WordBreak, DialogButtonStyle, BorderStyle } from './enums'; -import { Rectangle, BlurStyle, Callback, TransitionEffect, ShadowOptions, ShadowStyle, HoverModeAreaType, DismissReason, - BackgroundBlurStyleOptions, BackgroundEffectOptions } from './common'; -import { LevelOrder, ImmersiveMode, LevelMode } from '../../@ohos.promptAction'; -import { DismissDialogAction } from './actionSheet'; -/*** endif */ - /** * The alignment of dialog, * @@ -52,8 +40,7 @@ import { DismissDialogAction } from './actionSheet'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum DialogAlignment { /** @@ -75,8 +62,7 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Top, @@ -99,8 +85,7 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Center, @@ -123,8 +108,7 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Bottom, @@ -147,8 +131,7 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Default, @@ -171,8 +154,7 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ TopStart, @@ -195,8 +177,7 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ TopEnd, @@ -219,8 +200,7 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ CenterStart, @@ -243,8 +223,7 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ CenterEnd, @@ -267,8 +246,7 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ BottomStart, @@ -291,8 +269,7 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ BottomEnd, } @@ -312,8 +289,7 @@ declare enum DialogAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice -* @since arkts {'1.1':'11','1.2':'20'} -* @arkts 1.1&1.2 +* @since 11 */ declare enum DialogButtonDirection { /** @@ -329,8 +305,7 @@ declare enum DialogButtonDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ AUTO = 0, @@ -347,8 +322,7 @@ declare enum DialogButtonDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ HORIZONTAL = 1, @@ -365,8 +339,7 @@ declare enum DialogButtonDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ VERTICAL = 2, } @@ -378,8 +351,7 @@ declare enum DialogButtonDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface AlertDialogButtonBaseOptions { /** @@ -410,8 +382,7 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ enabled?: boolean; @@ -443,8 +414,7 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ defaultFocus?: boolean; @@ -476,8 +446,7 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ style?: DialogButtonStyle; @@ -506,8 +475,7 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ value: ResourceStr; @@ -536,8 +504,7 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ fontColor?: ResourceColor; @@ -566,8 +533,7 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ backgroundColor?: ResourceColor; @@ -596,8 +562,7 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ action: VoidCallback; } @@ -629,8 +594,7 @@ declare interface AlertDialogButtonBaseOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface AlertDialogButtonOptions extends AlertDialogButtonBaseOptions { /** @@ -650,8 +614,7 @@ declare interface AlertDialogButtonOptions extends AlertDialogButtonBaseOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ primary?: boolean; } @@ -678,30 +641,6 @@ declare interface TextStyle { wordBreak?: WordBreak; } -/** - * Defines TextStyle in the AlertDialog. - * - * @interface AlertDialogTextStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare interface AlertDialogTextStyleOptions { - /** - * Set the word break type. - * - * @type { ?WordBreak } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - wordBreak?: WordBreak; -} - /** * Import the LevelOrder type from promptAction. * @@ -735,8 +674,7 @@ declare type LevelOrder = import('../api/@ohos.promptAction').LevelOrder; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface AlertDialogParam { /** @@ -761,8 +699,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ title?: ResourceStr; @@ -779,8 +716,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ subtitle?: ResourceStr; @@ -806,8 +742,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ message: ResourceStr; @@ -833,8 +768,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ autoCancel?: boolean; @@ -870,8 +804,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ cancel?: VoidCallback; @@ -897,8 +830,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ alignment?: DialogAlignment; @@ -924,8 +856,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offset?: Offset; @@ -951,8 +882,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ gridCount?: number; @@ -971,8 +901,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maskRect?: Rectangle; @@ -993,8 +922,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ showInSubWindow?: boolean; @@ -1013,8 +941,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isModal?: boolean; @@ -1035,8 +962,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundColor?: ResourceColor; @@ -1057,8 +983,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundBlurStyle?: BlurStyle; @@ -1069,8 +994,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -1081,8 +1005,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundEffect?: BackgroundEffectOptions; @@ -1093,8 +1016,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillDismiss?: Callback; @@ -1105,8 +1027,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ transition?: TransitionEffect; @@ -1117,8 +1038,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ cornerRadius?: Dimension | BorderRadiuses | LocalizedBorderRadiuses; @@ -1129,8 +1049,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ width?: Dimension; @@ -1141,8 +1060,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ height?: Dimension; @@ -1153,8 +1071,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ borderWidth?: Dimension | EdgeWidths | LocalizedEdgeWidths; @@ -1165,8 +1082,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ borderColor?: ResourceColor | EdgeColors | LocalizedEdgeColors; @@ -1177,8 +1093,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ borderStyle?: BorderStyle | EdgeStyles; @@ -1189,8 +1104,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ shadow?: ShadowOptions | ShadowStyle; @@ -1205,18 +1119,6 @@ declare interface AlertDialogParam { */ textStyle?: TextStyle; - /** - * Set the alertDialog's textStyle. - * - * @type { ?AlertDialogTextStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - textStyle?: AlertDialogTextStyleOptions; - /** * Defines whether to respond to the hover mode. * @@ -1225,8 +1127,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ enableHoverMode?: boolean; @@ -1238,8 +1139,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ hoverModeArea?: HoverModeAreaType; @@ -1250,8 +1150,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ onDidAppear?: Callback; @@ -1262,8 +1161,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ onDidDisappear?: Callback; @@ -1274,8 +1172,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ onWillAppear?: Callback; @@ -1286,8 +1183,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ onWillDisappear?: Callback; @@ -1299,8 +1195,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ levelMode?: LevelMode; @@ -1311,8 +1206,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ levelUniqueId?: number; @@ -1324,8 +1218,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ immersiveMode?: ImmersiveMode; @@ -1337,8 +1230,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ levelOrder?: LevelOrder; } @@ -1368,8 +1260,7 @@ declare interface AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface AlertDialogParamWithConfirm extends AlertDialogParam { /** @@ -1404,8 +1295,7 @@ declare interface AlertDialogParamWithConfirm extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ confirm?: AlertDialogButtonBaseOptions; } @@ -1418,6 +1308,7 @@ declare interface AlertDialogParamWithConfirm extends AlertDialogParam { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare interface DismissDialogAction { /** @@ -1468,8 +1359,7 @@ declare interface DismissDialogAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface AlertDialogParamWithButtons extends AlertDialogParam { /** @@ -1504,8 +1394,7 @@ declare interface AlertDialogParamWithButtons extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ primaryButton: AlertDialogButtonBaseOptions; @@ -1541,8 +1430,7 @@ declare interface AlertDialogParamWithButtons extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ secondaryButton: AlertDialogButtonBaseOptions; } @@ -1564,8 +1452,7 @@ declare interface AlertDialogParamWithButtons extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface AlertDialogParamWithOptions extends AlertDialogParam { /** @@ -1581,8 +1468,7 @@ declare interface AlertDialogParamWithOptions extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ buttons: Array; @@ -1601,8 +1487,7 @@ declare interface AlertDialogParamWithOptions extends AlertDialogParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ buttonDirection?: DialogButtonDirection; } diff --git a/api/@internal/component/ets/alphabet_indexer.d.ts b/api/@internal/component/ets/alphabet_indexer.d.ts index 8f6c408bf6a5a410c8a0ad4647d6b5dcea7154a3..f937ef5afbbc62f9a27be132f997984c675eca90 100644 --- a/api/@internal/component/ets/alphabet_indexer.d.ts +++ b/api/@internal/component/ets/alphabet_indexer.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod, BlurStyle, Bindable } from './common' -import { ResourceColor, Length, Position } from './units' -import { Font } from './units' -/*** endif */ - /** * indexer align property. * @@ -46,8 +40,7 @@ import { Font } from './units' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum IndexerAlign { /** @@ -69,8 +62,7 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Left, @@ -93,8 +85,7 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Right, @@ -104,8 +95,7 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ START, @@ -115,8 +105,7 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ END, } @@ -128,8 +117,7 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface AlphabetIndexerOptions { /** @@ -164,8 +152,7 @@ interface AlphabetIndexerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ arrayValue: Array; /** @@ -203,17 +190,6 @@ interface AlphabetIndexerOptions { * @since 18 */ selected: number; - /** - * ID of the selected item. - * - * @type { number | Bindable } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - selected: number | Bindable; } /** @@ -238,8 +214,8 @@ interface AlphabetIndexerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface AlphabetIndexerInterface { /** @@ -282,8 +258,7 @@ interface AlphabetIndexerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options: AlphabetIndexerOptions): AlphabetIndexerAttribute; } @@ -296,8 +271,7 @@ interface AlphabetIndexerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnAlphabetIndexerSelectCallback = (index: number) => void; @@ -309,11 +283,9 @@ declare type OnAlphabetIndexerSelectCallback = (index: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnAlphabetIndexerPopupSelectCallback = (index: number) => void; - /** * Defines an AlphabetIndexer callback when onRequestPopupData. * @@ -323,8 +295,7 @@ declare type OnAlphabetIndexerPopupSelectCallback = (index: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnAlphabetIndexerRequestPopupDataCallback = (index: number) => Array; @@ -350,8 +321,7 @@ declare type OnAlphabetIndexerRequestPopupDataCallback = (index: number) => Arra * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class AlphabetIndexerAttribute extends CommonMethod { /** @@ -391,8 +361,7 @@ declare class AlphabetIndexerAttribute extends CommonMethod } index - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - selected(index: number | Bindable): AlphabetIndexerAttribute; /** * Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar. @@ -980,8 +920,7 @@ declare class AlphabetIndexerAttribute extends CommonMethod { /** @@ -324,6 +326,7 @@ declare class AnimatorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 7 + * @noninterop */ declare const Animator: AnimatorInterface; @@ -333,5 +336,6 @@ declare const Animator: AnimatorInterface; * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 + * @noninterop */ declare const AnimatorInstance: AnimatorAttribute; diff --git a/api/@internal/component/ets/badge.d.ts b/api/@internal/component/ets/badge.d.ts index 38c5838bcd099010af53d88482afb5eb40f47bb1..729160f93e50905c48746a2c5c2b3e889b77b258 100644 --- a/api/@internal/component/ets/badge.d.ts +++ b/api/@internal/component/ets/badge.d.ts @@ -18,12 +18,6 @@ * @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. * @@ -56,992 +50,969 @@ import { CommonMethod } from './common'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum BadgePosition { - /** - * The dot is displayed vertically centered on the right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The dot is displayed vertically centered on the right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * The dot is displayed vertically centered on the right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * The badge is displayed in the upper right corner of the parent component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - RightTop, - - /** - * Dots are displayed in the upper right corner. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Dots are displayed in the upper right corner. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Dots are displayed in the upper right corner. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * The badge is vertically centered on the right of the parent component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Right, - - /** - * The dot is displayed in the left vertical center. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The dot is displayed in the left vertical center. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * The dot is displayed in the left vertical center. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * The badge is vertically centered on the left of the parent component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Left, -} - -/** - * BadgeStyle object - * - * @interface BadgeStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * BadgeStyle object - * - * @interface BadgeStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * BadgeStyle object - * - * @interface BadgeStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * BadgeStyle object - * - * @interface BadgeStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ -declare interface BadgeStyle { - /** - * Text Color - * - * @type { ?ResourceColor } + declare enum BadgePosition { + /** + * The dot is displayed vertically centered on the right. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The dot is displayed vertically centered on the right. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * The dot is displayed vertically centered on the right. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * The badge is displayed in the upper right corner of the parent component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + RightTop, + + /** + * Dots are displayed in the upper right corner. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Dots are displayed in the upper right corner. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Dots are displayed in the upper right corner. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * The badge is vertically centered on the right of the parent component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Right, + + /** + * The dot is displayed in the left vertical center. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The dot is displayed in the left vertical center. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * The dot is displayed in the left vertical center. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * The badge is vertically centered on the left of the parent component. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Left, + } + + /** + * BadgeStyle object + * + * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Text Color + * BadgeStyle object * - * @type { ?ResourceColor } + * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Text Color + * BadgeStyle object * - * @type { ?ResourceColor } + * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Font color. + * BadgeStyle object * - * @type { ?ResourceColor } - * @default Color.White - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - color?: ResourceColor; - - /** - * Text size. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Text size. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Text size. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Text size. - * - * @type { ?(number | string) } + * @interface BadgeStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - /** - * Font size. - * For the string type, only numeric string values with optional units. - * The value must be greater than or equal to 0. If the value is less than 0, the default value is used. - * Unit: fp - * - *

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

- * - * @type { ?(number | ResourceStr) } - * @default 10 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - fontSize?: number | ResourceStr; - - /** - * Size of a badge. - * - * @type { ?(number | string) } + declare interface BadgeStyle { + /** + * Text Color + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Text Color + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Text Color + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Font color. + * + * @type { ?ResourceColor } + * @default Color.White + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + color?: ResourceColor; + + /** + * Text size. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Text size. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Text size. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Text size. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Font size. + * For the string type, only numeric string values with optional units. + * The value must be greater than or equal to 0. If the value is less than 0, the default value is used. + * Unit: fp + * + *

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

+ * + * @type { ?(number | ResourceStr) } + * @default 10 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + fontSize?: number | ResourceStr; + + /** + * Size of a badge. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Size of a badge. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Size of a badge. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Size of a badge. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Badge size. + * For the string type, numeric string values with optional units. + * The value must be greater than or equal to 0. If the value is less than 0, the default value is used. + * Unit: vp + * + *

NOTE: + *
This parameter cannot be set in percentage. + *
If it is set to an invalid value, the default value is used. + *

+ * + * @type { ?(number | ResourceStr) } + * @default 16 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + badgeSize?: number | ResourceStr; + + /** + * Color of the badge. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Color of the badge. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Color of the badge. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Badge color. + * + * @type { ?ResourceColor } + * @default Color.Red + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + badgeColor?: ResourceColor; + + /** + * Define the border color of the badge. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Border color of the background. + * + * @type { ?ResourceColor } + * @default Color.Red + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + borderColor?: ResourceColor; + + /** + * Define the border width of the badge. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Border width of the background. + * This parameter cannot be set in percentage. + * Unit: vp + * + * @type { ?Length } + * @default 1 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + borderWidth?: Length; + + /** + * Define the font weight of the badge. + * + * @type { ?(number | FontWeight | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Define the font weight of the badge. + * + * @type { ?(number | FontWeight | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Font weight of the text. + * For the number type, the value ranges from 100 to 900, at an interval of 100. Default value: 400 + * A larger value indicates a heavier font weight. + * For the string type, only strings that represent a number. Default value: FontWeight.Normal + * + *

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

+ * + * @type { ?(number | FontWeight | ResourceStr) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + fontWeight?: number | FontWeight | ResourceStr; + } + + /** + * Defines the base param of badge. + * + * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Size of a badge. + * Defines the base param of badge. * - * @type { ?(number | string) } + * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Size of a badge. + * Defines the base param of badge. * - * @type { ?(number | string) } + * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Size of a badge. + * Provides basic parameters for creating a badge. * - * @type { ?(number | string) } + * @interface BadgeParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - /** - * Badge size. - * For the string type, numeric string values with optional units. - * The value must be greater than or equal to 0. If the value is less than 0, the default value is used. - * Unit: vp - * - *

NOTE: - *
This parameter cannot be set in percentage. - *
If it is set to an invalid value, the default value is used. - *

- * - * @type { ?(number | ResourceStr) } - * @default 16 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - badgeSize?: number | ResourceStr; - - /** - * Color of the badge. - * - * @type { ?ResourceColor } + declare interface BadgeParam { + /** + * Set the display position of the prompt point. + * + * @type { ?(BadgePosition) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Set the display position of the prompt point. + * + * @type { ?(BadgePosition) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Set the display position of the prompt point. + * + * @type { ?(BadgePosition | Position) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Position to display the badge relative to the parent component. + * + *

NOTE: + *
With the Position type, percentage values are not supported. + *
If an invalid value is set, the default value (0,0), + * which indicates the upper left corner of the component, will be used. + *
With the BadgePosition type, the position is mirrored based on the Direction property. + *

+ * + * @type { ?(BadgePosition | Position) } + * @default BadgePosition.RightTop + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + position?: BadgePosition | Position; + + /** + * Defines the style of the Badge component, including the text color, size, dot color, and size. + * + * @type { BadgeStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Defines the style of the Badge component, including the text color, size, dot color, and size. + * + * @type { BadgeStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Defines the style of the Badge component, including the text color, size, dot color, and size. + * + * @type { BadgeStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Style of the badge, including the font color, font size, badge color, and badge size. + * + * @type { BadgeStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + style: BadgeStyle; + } + + /** + * Defines the badge param with count and maxCount. + * + * @extends BadgeParam + * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Color of the badge. + * Defines the badge param with count and maxCount. * - * @type { ?ResourceColor } + * @extends BadgeParam + * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Color of the badge. + * Defines the badge param with count and maxCount. * - * @type { ?ResourceColor } + * @extends BadgeParam + * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Badge color. + * Inherits from BadgeParam and has all attributes of BadgeParam. * - * @type { ?ResourceColor } - * @default Color.Red + * @extends BadgeParam + * @interface BadgeParamWithNumber * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - badgeColor?: ResourceColor; - - /** - * Define the border color of the badge. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Border color of the background. - * - * @type { ?ResourceColor } - * @default Color.Red - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - borderColor?: ResourceColor; - - /** - * Define the border width of the badge. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Border width of the background. - * This parameter cannot be set in percentage. - * Unit: vp - * - * @type { ?Length } - * @default 1 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - borderWidth?: Length; - - /** - * Define the font weight of the badge. - * - * @type { ?(number | FontWeight | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Define the font weight of the badge. - * - * @type { ?(number | FontWeight | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice * @since 11 */ - /** - * Font weight of the text. - * For the number type, the value ranges from 100 to 900, at an interval of 100. Default value: 400 - * A larger value indicates a heavier font weight. - * For the string type, only strings that represent a number. Default value: FontWeight.Normal - * - *

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

- * - * @type { ?(number | FontWeight | ResourceStr) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - fontWeight?: number | FontWeight | ResourceStr; -} - -/** - * Defines the base param of badge. - * - * @interface BadgeParam - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines the base param of badge. - * - * @interface BadgeParam - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines the base param of badge. - * - * @interface BadgeParam - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Provides basic parameters for creating a badge. - * - * @interface BadgeParam - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface BadgeParam { - /** - * Set the display position of the prompt point. - * - * @type { ?(BadgePosition) } + declare interface BadgeParamWithNumber extends BadgeParam { + /** + * Set the number of reminder messages. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Set the number of reminder messages. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Set the number of reminder messages. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Number of notifications. + * + *

NOTE: + *
If the value is less than or equal to 0 and less than the value of maxCount, no badge is displayed. + *
Value range: [-2147483648, 2147483647] + *
If the value is out of the range, + * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. + *
If the value is not an integer, it is rounded off to the nearest integer. + *

+ * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + count: number; + + /** + * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Maximum number of notifications. When the maximum number is reached, only maxCount+ is displayed. + * + *

NOTE: + *
Value range: [-2147483648, 2147483647] + *
If the value is out of the range, + * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. + *
If the value is not an integer, it is rounded off to the nearest integer. + *

+ * + * @type { ?number } + * @default 99 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + maxCount?: number; + } + + /** + * Defines the badge param with string value. + * + * @extends BadgeParam + * @interface BadgeParamWithString * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Set the display position of the prompt point. + * Defines the badge param with string value. * - * @type { ?(BadgePosition) } + * @extends BadgeParam + * @interface BadgeParamWithString * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Set the display position of the prompt point. + * Defines the badge param with string value. * - * @type { ?(BadgePosition | Position) } + * @extends BadgeParam + * @interface BadgeParamWithString * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Position to display the badge relative to the parent component. - * - *

NOTE: - *
With the Position type, percentage values are not supported. - *
If an invalid value is set, the default value (0,0), - * which indicates the upper left corner of the component, will be used. - *
With the BadgePosition type, the position is mirrored based on the Direction property. - *

+ * Inherits from BadgeParam and has all attributes of BadgeParam. * - * @type { ?(BadgePosition | Position) } - * @default BadgePosition.RightTop + * @extends BadgeParam + * @interface BadgeParamWithString * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - position?: BadgePosition | Position; - - /** - * Defines the style of the Badge component, including the text color, size, dot color, and size. - * - * @type { BadgeStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Defines the style of the Badge component, including the text color, size, dot color, and size. - * - * @type { BadgeStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Defines the style of the Badge component, including the text color, size, dot color, and size. - * - * @type { BadgeStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Style of the badge, including the font color, font size, badge color, and badge size. - * - * @type { BadgeStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - style: BadgeStyle; -} - -/** - * Defines the badge param with count and maxCount. - * - * @extends BadgeParam - * @interface BadgeParamWithNumber - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines the badge param with count and maxCount. - * - * @extends BadgeParam - * @interface BadgeParamWithNumber - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines the badge param with count and maxCount. - * - * @extends BadgeParam - * @interface BadgeParamWithNumber - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Inherits from BadgeParam and has all attributes of BadgeParam. - * - * @extends BadgeParam - * @interface BadgeParamWithNumber - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface BadgeParamWithNumber extends BadgeParam { - /** - * Set the number of reminder messages. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the number of reminder messages. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Set the number of reminder messages. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Number of notifications. - * - *

NOTE: - *
If the value is less than or equal to 0 and less than the value of maxCount, no badge is displayed. - *
Value range: [-2147483648, 2147483647] - *
If the value is out of the range, - * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. - *
If the value is not an integer, it is rounded off to the nearest integer. - *

- * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - count: number; - - /** - * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * - * @type { ?number } + declare interface BadgeParamWithString extends BadgeParam { + /** + * Text string of the prompt content. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Text string of the prompt content. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Text string of the prompt content. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Text string of the prompt content. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Prompt content. + * + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + value: ResourceStr; + } + + /** + * Defines Badge Component. + * + * @interface BadgeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * Defines Badge Component. * - * @type { ?number } + * @interface BadgeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * Defines Badge Component. * - * @type { ?number } + * @interface BadgeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Maximum number of notifications. When the maximum number is reached, only maxCount+ is displayed. - * - *

NOTE: - *
Value range: [-2147483648, 2147483647] - *
If the value is out of the range, - * it will be adjusted by adding or subtracting 4294967296 to bring it back within the range. - *
If the value is not an integer, it is rounded off to the nearest integer. - *

+ * Defines Badge Component. * - * @type { ?number } - * @default 99 + * @interface BadgeInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - maxCount?: number; -} - -/** - * Defines the badge param with string value. - * - * @extends BadgeParam - * @interface BadgeParamWithString - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines the badge param with string value. - * - * @extends BadgeParam - * @interface BadgeParamWithString - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines the badge param with string value. - * - * @extends BadgeParam - * @interface BadgeParamWithString - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Inherits from BadgeParam and has all attributes of BadgeParam. - * - * @extends BadgeParam - * @interface BadgeParamWithString - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface BadgeParamWithString extends BadgeParam { - /** - * Text string of the prompt content. - * - * @type { string } + interface BadgeInterface { + /** + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * count: Set the number of reminder messages. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithNumber } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * count: Set the number of reminder messages. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithNumber } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * count: Set the number of reminder messages. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithNumber } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * count: Set the number of reminder messages. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithNumber } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + (value: BadgeParamWithNumber): BadgeAttribute; + + /** + * value: Text string of the prompt content. + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * value: Text string of the prompt content. + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * value: Text string of the prompt content. + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * value: Text string of the prompt content. + * position: Set the display position of the prompt point. + * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. + * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * + * @param { BadgeParamWithString } value + * @returns { BadgeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + (value: BadgeParamWithString): BadgeAttribute; + } + + /** + * Defines Badge Component attribute. + * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Text string of the prompt content. + * Defines Badge Component attribute. * - * @type { string } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Text string of the prompt content. + * Defines Badge Component attribute. * - * @type { string } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Text string of the prompt content. + * Defines Badge Component attribute. * - * @type { string } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ + declare class BadgeAttribute extends CommonMethod {} + /** - * Prompt content. - * - * @type { ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - value: ResourceStr; -} - -/** - * Defines Badge Component. - * - * @interface BadgeInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines Badge Component. - * - * @interface BadgeInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines Badge Component. - * - * @interface BadgeInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines Badge Component. - * - * @interface BadgeInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface BadgeInterface { - /** - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * count: Set the number of reminder messages. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component. * - * @param { BadgeParamWithNumber } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * count: Set the number of reminder messages. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component. * - * @param { BadgeParamWithNumber } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * count: Set the number of reminder messages. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component. * - * @param { BadgeParamWithNumber } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * count: Set the number of reminder messages. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component. * - * @param { BadgeParamWithNumber } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - (value: BadgeParamWithNumber): BadgeAttribute; - + declare const Badge: BadgeInterface; + /** - * value: Text string of the prompt content. - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component instance. * - * @param { BadgeParamWithString } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * value: Text string of the prompt content. - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component instance. * - * @param { BadgeParamWithString } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * value: Text string of the prompt content. - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component instance. * - * @param { BadgeParamWithString } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * value: Text string of the prompt content. - * position: Set the display position of the prompt point. - * maxCount: Maximum number of messages. If the number of messages exceeds the maximum, only maxCount+ is displayed. - * style: You can set the style of the Badge component, including the text color, size, dot color, and size. + * Defines Badge Component instance. * - * @param { BadgeParamWithString } value - * @returns { BadgeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - (value: BadgeParamWithString): BadgeAttribute; -} - -/** - * Defines Badge Component attribute. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines Badge Component attribute. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines Badge Component attribute. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines Badge Component attribute. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class BadgeAttribute extends CommonMethod {} - -/** - * Defines Badge Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines Badge Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines Badge Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines Badge Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare const Badge: BadgeInterface; - -/** - * Defines Badge Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines Badge Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines Badge Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines Badge Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare const BadgeInstance: BadgeAttribute; + declare const BadgeInstance: BadgeAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/blank.d.ts b/api/@internal/component/ets/blank.d.ts index 09487680b7d0fac3f8f2654d49c9929c65a12ed6..76c16298f7968cffbd3d7d43e460890f4c56b3d6 100644 --- a/api/@internal/component/ets/blank.d.ts +++ b/api/@internal/component/ets/blank.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod } from './common'; -import { ResourceColor } from './units'; -/*** endif */ - /** * Create Blank. * @@ -55,8 +50,8 @@ import { ResourceColor } from './units'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface BlankInterface { /** @@ -96,8 +91,7 @@ interface BlankInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (min?: number | string): BlankAttribute; } @@ -134,8 +128,8 @@ interface BlankInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class BlankAttribute extends CommonMethod { /** @@ -175,8 +169,7 @@ declare class BlankAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ color(value: ResourceColor): BlankAttribute; } @@ -210,6 +203,7 @@ declare class BlankAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Blank: BlankInterface; @@ -242,5 +236,6 @@ declare const Blank: BlankInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const BlankInstance: BlankAttribute; diff --git a/api/@internal/component/ets/button.d.ts b/api/@internal/component/ets/button.d.ts index 5980170db6393cf77796b81bfe690e5c81a08b5d..d8e262710617987e740bb2eb7e162de2ee6cafa4 100644 --- a/api/@internal/component/ets/button.d.ts +++ b/api/@internal/component/ets/button.d.ts @@ -568,6 +568,7 @@ declare interface ButtonOptions { * @form * @atomicservice * @since 11 + * @noninterop */ interface ButtonInterface { /** @@ -704,6 +705,7 @@ interface ButtonInterface { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare interface LabelStyle { /** @@ -848,6 +850,7 @@ declare interface LabelStyle { * @form * @atomicservice * @since 11 + * @noninterop */ declare class ButtonAttribute extends CommonMethod { /** @@ -1294,6 +1297,7 @@ declare class ButtonAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Button: ButtonInterface; /** @@ -1325,5 +1329,6 @@ declare const Button: ButtonInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const ButtonInstance: ButtonAttribute; diff --git a/api/@internal/component/ets/calendar.d.ts b/api/@internal/component/ets/calendar.d.ts index bf5216137e23a896816ae5a42843d442d194cf13..6a6c2c84016071a080c7c39cf291c5ae6b1075a5 100644 --- a/api/@internal/component/ets/calendar.d.ts +++ b/api/@internal/component/ets/calendar.d.ts @@ -1635,6 +1635,7 @@ declare class CalendarController { * @form * @since 10 * @deprecated since 20 + * @noninterop */ interface CalendarInterface { /** @@ -1677,6 +1678,7 @@ interface CalendarInterface { * @form * @since 10 * @deprecated since 20 + * @noninterop */ declare class CalendarAttribute { /** @@ -1983,6 +1985,7 @@ declare class CalendarAttribute { * @form * @since 10 * @deprecated since 20 + * @noninterop */ declare const Calendar: CalendarInterface; @@ -2001,5 +2004,6 @@ declare const Calendar: CalendarInterface; * @form * @since 10 * @deprecated since 20 + * @noninterop */ 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 a86fbe7dc893ecf0dd88cd402caf88ad2d179a7c..2ae7c8c787cde6ac58eb41bc6fa7850ffb1c0d2e 100644 --- a/api/@internal/component/ets/calendar_picker.d.ts +++ b/api/@internal/component/ets/calendar_picker.d.ts @@ -18,13 +18,6 @@ * @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} @@ -38,8 +31,7 @@ import { Offset, VoidCallback, ResourceColor } from './units' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum CalendarAlign { /** @@ -53,8 +45,7 @@ declare enum CalendarAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ START = 0, /** @@ -68,8 +59,7 @@ declare enum CalendarAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ CENTER = 1, /** @@ -83,8 +73,7 @@ declare enum CalendarAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ END = 2 } @@ -102,8 +91,7 @@ declare enum CalendarAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface CalendarOptions { /** @@ -119,8 +107,7 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ hintRadius?: number | Resource; @@ -137,8 +124,7 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selected?: Date; @@ -149,8 +135,7 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ start?: Date; @@ -161,8 +146,7 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ end?: Date; @@ -173,8 +157,7 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ disabledDateRange?: DateRange[]; } @@ -192,8 +175,7 @@ declare interface CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface CalendarPickerInterface { /** @@ -211,8 +193,7 @@ interface CalendarPickerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (options?: CalendarOptions): CalendarPickerAttribute; } @@ -230,8 +211,7 @@ interface CalendarPickerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class CalendarPickerAttribute extends CommonMethod { /** @@ -251,8 +231,7 @@ declare class CalendarPickerAttribute extends CommonMethod, offset?: Offset): CalendarPickerAttribute; @@ -284,8 +262,7 @@ declare class CalendarPickerAttribute extends CommonMethod): CalendarPickerAttribute; @@ -326,8 +302,7 @@ declare class CalendarPickerAttribute extends CommonMethod): CalendarPickerAttribute; @@ -338,8 +313,7 @@ declare class CalendarPickerAttribute extends CommonMethod>): CalendarPickerAttribute; @@ -351,8 +325,7 @@ declare class CalendarPickerAttribute extends CommonMethod; @@ -425,8 +396,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onCancel?: VoidCallback; @@ -452,8 +422,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onChange?: Callback; @@ -474,8 +443,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundColor?: ResourceColor; @@ -496,8 +464,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundBlurStyle?: BlurStyle; @@ -508,8 +475,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -520,8 +486,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundEffect?: BackgroundEffectOptions; @@ -532,8 +497,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ acceptButtonStyle?: PickerDialogButtonStyle; @@ -544,8 +508,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ cancelButtonStyle?: PickerDialogButtonStyle; @@ -566,8 +529,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onDidAppear?: VoidCallback; @@ -588,8 +550,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onDidDisappear?: VoidCallback; @@ -610,8 +571,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onWillAppear?: VoidCallback; @@ -632,8 +592,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onWillDisappear?: VoidCallback; @@ -644,8 +603,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ shadow?: ShadowOptions | ShadowStyle; @@ -657,8 +615,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ enableHoverMode?: boolean; @@ -670,8 +627,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ hoverModeArea?: HoverModeAreaType; @@ -683,8 +639,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ markToday?: boolean; } @@ -700,8 +655,7 @@ declare interface CalendarDialogOptions extends CalendarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class CalendarPickerDialog { /** @@ -717,8 +671,7 @@ declare class CalendarPickerDialog { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ static show(options?: CalendarDialogOptions): void; } diff --git a/api/@internal/component/ets/canvas.d.ts b/api/@internal/component/ets/canvas.d.ts index 8ac90328238d56767c2a9a482b80edbdc0b62c8f..8e9306300124ba5f1db5fd6a9affc37250f8f265 100644 --- a/api/@internal/component/ets/canvas.d.ts +++ b/api/@internal/component/ets/canvas.d.ts @@ -18,15 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod, Callback, PixelMap } from './common'; -import { FrameNode } from '../FrameNode'; -import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon'; -import { Matrix2D } from './matrix2d'; -import { VoidCallback, LengthMetricsUnit, LengthMetrics } from './units'; -import { Size } from '../Graphics' -/*** endif */ - /** * Import the drawing canvas type object for Canvas. * @@ -82,8 +73,7 @@ declare type DrawingCanvas = import('../api/@ohos.graphics.drawing').default.Can * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare type CanvasFillRule = "evenodd" | "nonzero"; @@ -135,8 +125,7 @@ declare type CanvasFillRule = "evenodd" | "nonzero"; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare type CanvasLineCap = "butt" | "round" | "square"; @@ -200,8 +189,7 @@ declare type CanvasLineCap = "butt" | "round" | "square"; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare type CanvasLineJoin = "bevel" | "miter" | "round"; @@ -249,8 +237,7 @@ declare type CanvasLineJoin = "bevel" | "miter" | "round"; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare type CanvasDirection = "inherit" | "ltr" | "rtl"; @@ -314,8 +301,7 @@ declare type CanvasDirection = "inherit" | "ltr" | "rtl"; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare type CanvasTextAlign = "center" | "end" | "left" | "right" | "start"; @@ -383,8 +369,7 @@ declare type CanvasTextAlign = "center" | "end" | "left" | "right" | "start"; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideographic" | "middle" | "top"; @@ -432,8 +417,7 @@ declare type CanvasTextBaseline = "alphabetic" | "bottom" | "hanging" | "ideogra * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare type ImageSmoothingQuality = "high" | "low" | "medium"; @@ -476,8 +460,7 @@ declare type FrameNode = import('../api/arkui/FrameNode').FrameNode; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class CanvasGradient { /** @@ -520,8 +503,7 @@ declare class CanvasGradient { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ addColorStop(offset: number, color: string): void; @@ -568,8 +550,7 @@ declare class CanvasGradient { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class CanvasPath { /** @@ -580,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 @@ -593,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 @@ -607,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 @@ -622,14 +603,13 @@ 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 * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; @@ -681,8 +661,7 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; @@ -738,8 +717,7 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; @@ -771,8 +749,7 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ closePath(): void; @@ -844,8 +821,7 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ ellipse( x: number, @@ -894,8 +870,7 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ lineTo(x: number, y: number): void; @@ -935,8 +910,7 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ moveTo(x: number, y: number): void; @@ -984,8 +958,7 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; @@ -1033,8 +1006,7 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ rect(x: number, y: number, w: number, h: number): void; @@ -1045,7 +1017,7 @@ 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. @@ -1090,8 +1062,7 @@ declare class CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class Path2D extends CanvasPath { /** @@ -1130,8 +1101,7 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ addPath(path: Path2D, transform?: Matrix2D): void; @@ -1163,8 +1133,7 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -1176,8 +1145,7 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(unit: LengthMetricsUnit); @@ -1213,8 +1181,7 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(path: Path2D); @@ -1227,8 +1194,7 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(path: Path2D, unit: LengthMetricsUnit); @@ -1264,8 +1230,7 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(d: string); @@ -1278,8 +1243,7 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(description: string, unit: LengthMetricsUnit); } @@ -1316,8 +1280,7 @@ declare class Path2D extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface CanvasPattern { /** @@ -1352,8 +1315,7 @@ declare interface CanvasPattern { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ setTransform(transform?: Matrix2D): void; } @@ -1390,8 +1352,7 @@ declare interface CanvasPattern { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface TextMetrics { /** @@ -1434,8 +1395,7 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ readonly actualBoundingBoxAscent: number; @@ -1479,8 +1439,7 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ readonly actualBoundingBoxDescent: number; @@ -1524,8 +1483,7 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ readonly actualBoundingBoxLeft: number; @@ -1569,8 +1527,7 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ readonly actualBoundingBoxRight: number; @@ -1614,8 +1571,7 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ readonly alphabeticBaseline: number; @@ -1659,8 +1615,7 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ readonly emHeightAscent: number; @@ -1704,8 +1659,7 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ readonly emHeightDescent: number; @@ -1749,8 +1703,7 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ readonly fontBoundingBoxAscent: number; @@ -1794,8 +1747,7 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ readonly fontBoundingBoxDescent: number; @@ -1839,8 +1791,7 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ readonly hangingBaseline: number; @@ -1884,8 +1835,7 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ readonly ideographicBaseline: number; @@ -1925,8 +1875,7 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ readonly width: number; @@ -1966,8 +1915,7 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ readonly height: number; } @@ -2000,8 +1948,7 @@ declare interface TextMetrics { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class ImageBitmap { /** @@ -2044,19 +1991,6 @@ declare class ImageBitmap { */ readonly height: number; - /** - * Indicates the height of the CSS pixel unit of ImageData. - * - * @return { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get height(): number; - /** * Indicates the width of the CSS pixel unit of ImageData. * @@ -2097,19 +2031,6 @@ declare class ImageBitmap { */ readonly width: number; - /** - * Indicates the width of the CSS pixel unit of ImageData. - * - * @return { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get width(): number; - /** * Releases all graphics resources associated with an ImageBitmap. * @@ -2138,8 +2059,7 @@ declare class ImageBitmap { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ close(): void; @@ -2229,19 +2149,6 @@ declare class ImageBitmap { * @since 12 */ constructor(data: PixelMap, unit: LengthMetricsUnit); - - /** - * Create an ImageBitmap object based on the transferred image path or PixelMap object. - * - * @param { PixelMap | string } src - image path or PixelMap object - * @param { LengthMetricsUnit } [unit] - the unit mode - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - constructor(src: PixelMap | string, unit?: LengthMetricsUnit); } /** @@ -2272,8 +2179,7 @@ declare class ImageBitmap { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class ImageData { /** @@ -2316,19 +2222,6 @@ declare class ImageData { */ readonly data: Uint8ClampedArray; - /** - * Array containing image pixel data - * - * @return { Uint8ClampedArray } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get data(): Uint8ClampedArray; - /** * Width of the image. * @@ -2369,19 +2262,6 @@ declare class ImageData { */ readonly height: number; - /** - * Height of the image. - * - * @return { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get height(): number; - /** * Height of the image. * @@ -2422,19 +2302,6 @@ declare class ImageData { */ readonly width: number; - /** - * Width of the image. - * - * @return { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get width(): number; - /** * Create an ImageData object based on the input parameters. * @@ -2490,8 +2357,7 @@ declare class ImageData { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(width: number, height: number, data?: Uint8ClampedArray, unit?: LengthMetricsUnit); } @@ -2524,8 +2390,7 @@ declare class ImageData { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class RenderingContextSettings { /** @@ -2564,32 +2429,6 @@ declare class RenderingContextSettings { */ antialias?: boolean; - /** - * Get the status whether anti-aliasing is enabled for canvas. The default value is false. - * - * @return { boolean | undefined } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get antialias(): boolean | undefined; - - /** - * Set the status whether anti-aliasing is enabled for canvas. The default value is false. - * - * @param { boolean | undefined } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set antialias(antialias: boolean | undefined); - /** * Create an RenderingContextSettings object based on the antialias and alpha. * @@ -2622,8 +2461,7 @@ declare class RenderingContextSettings { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(antialias?: boolean); } @@ -2660,8 +2498,7 @@ declare class RenderingContextSettings { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class CanvasRenderer extends CanvasPath { /** @@ -2676,30 +2513,6 @@ declare class CanvasRenderer extends CanvasPath { */ letterSpacing: LengthMetrics | string; - /** - * Get spacing for letter. - * - * @return { LengthMetrics | string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get letterSpacing(): LengthMetrics | string; - - /** - * Set spacing for letter. - * - * @param { LengthMetrics | string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set letterSpacing(letterSpacing: LengthMetrics | string); - /** * Transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). * If the value is out of range, the assignment is invalid. @@ -2744,34 +2557,6 @@ declare class CanvasRenderer extends CanvasPath { */ globalAlpha: number; - /** - * Get transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). - * If the value is out of range, the assignment is invalid. - * - * @return { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get globalAlpha(): number; - - /** - * Set transparency. The value ranges from 0.0 (completely transparent) to 1.0 (completely opaque). - * If the value is out of range, the assignment is invalid. - * - * @param { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set globalAlpha(globalAlpha: number); - /** * Type of composition operation applied when drawing a new shape. The following types are supported: * source-over: (Default) Draws a new drawing on top of an existing canvas context. @@ -2868,60 +2653,6 @@ declare class CanvasRenderer extends CanvasPath { */ globalCompositeOperation: string; - /** - * Get the type of composition operation applied when drawing a new shape. The following types are supported: - * source-over: (Default) Draws a new drawing on top of an existing canvas context. - * source-in: The new drawing is drawn only where the new drawing overlaps the target canvas. - * Everything else is transparent. - * source-out: Draws a new drawing where it does not overlap with the existing canvas content. - * source-atop: The new drawing is drawn only where it overlaps the content of the existing canvas. - * destination-over: Draws a new graphic behind the existing canvas content. - * destination-in: Existing canvas content remains where the new drawing overlaps the existing canvas content. - * Everything else is transparent. - * destination-out: Existing content remains where the new drawing does not overlap. - * destination-atop: The existing canvas retains only the part that overlaps with the new drawing, - * which is drawn behind the canvas content. - * lighter: The color of two overlapping shapes is determined by adding the color values. - * copy: Only new graphics are displayed. - * xor: In the image, those overlaps and other places outside of the normal drawing are transparent. - * - * @return { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get globalCompositeOperation(): string; - - /** - * Set the type of composition operation applied when drawing a new shape. The following types are supported: - * source-over: (Default) Draws a new drawing on top of an existing canvas context. - * source-in: The new drawing is drawn only where the new drawing overlaps the target canvas. - * Everything else is transparent. - * source-out: Draws a new drawing where it does not overlap with the existing canvas content. - * source-atop: The new drawing is drawn only where it overlaps the content of the existing canvas. - * destination-over: Draws a new graphic behind the existing canvas content. - * destination-in: Existing canvas content remains where the new drawing overlaps the existing canvas content. - * Everything else is transparent. - * destination-out: Existing content remains where the new drawing does not overlap. - * destination-atop: The existing canvas retains only the part that overlaps with the new drawing, - * which is drawn behind the canvas content. - * lighter: The color of two overlapping shapes is determined by adding the color values. - * copy: Only new graphics are displayed. - * xor: In the image, those overlaps and other places outside of the normal drawing are transparent. - * - * @param { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set globalCompositeOperation(globalCompositeOperation: string); - /** * Draw an image on a canvas * @@ -2962,8 +2693,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ drawImage(image: ImageBitmap | PixelMap, dx: number, dy: number): void; @@ -3015,8 +2745,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ drawImage(image: ImageBitmap | PixelMap, dx: number, dy: number, dw: number, dh: number): void; @@ -3084,8 +2813,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ drawImage( image: ImageBitmap | PixelMap, @@ -3127,8 +2855,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ beginPath(): void; @@ -3164,8 +2891,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ clip(fillRule?: CanvasFillRule): void; @@ -3205,8 +2931,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ clip(path: Path2D, fillRule?: CanvasFillRule): void; @@ -3242,8 +2967,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fill(fillRule?: CanvasFillRule): void; @@ -3283,8 +3007,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fill(path: Path2D, fillRule?: CanvasFillRule): void; @@ -3356,19 +3079,6 @@ declare class CanvasRenderer extends CanvasPath { */ stroke(path: Path2D): void; - /** - * Draws the specified path according to the current stroke style - * - * @param { Path2D } [path] - Specified stroke path object - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - stroke(path?: Path2D): void; - /** * Attributes that describe the fill color and style. The options are as follows: * color: Color String @@ -3423,40 +3133,6 @@ declare class CanvasRenderer extends CanvasPath { */ fillStyle: string | number | CanvasGradient | CanvasPattern; - /** - * Get the attributes specifie the color, gradient, or pattern to use inside shapes. The options are as follows: - * - * @return { string | number | CanvasGradient | CanvasPattern } - * string: Color String. - * number: Indicates the color with number. - * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. - * CanvasPattern: Template object. For details, see {@link CanvasPattern}. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get fillStyle(): string | number | CanvasGradient | CanvasPattern; - - /** - * Set the attributes specifie the color, gradient, or pattern to use inside shapes. The options are as follows: - * - * @param { string | number | CanvasGradient | CanvasPattern } - * string: Color String. - * number: Indicates the color with number. - * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. - * CanvasPattern: Template object. For details, see {@link CanvasPattern}. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set fillStyle(fillStyle: string | number | CanvasGradient | CanvasPattern); - /** * Attributes of the stroke color and style. The options are as follows: * color: Color String @@ -3512,43 +3188,7 @@ declare class CanvasRenderer extends CanvasPath { strokeStyle: string | number | CanvasGradient | CanvasPattern; /** - * Get the attributes specifie the color, gradient, or pattern to use for the strokes (outlines) around shapes. - * The options are as follows: - * - * @return { string | number | CanvasGradient | CanvasPattern } - * string: Color String. - * number: Indicates the color with number. - * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. - * CanvasPattern: Template object. For details, see {@link CanvasPattern}. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get strokeStyle(): string | number | CanvasGradient | CanvasPattern; - - /** - * Set the attributes specifie the color, gradient, or pattern to use for the strokes (outlines) around shapes. - * The options are as follows: - * - * @param { string | number | CanvasGradient | CanvasPattern } - * string: Color String. - * number: Indicates the color with number. - * CanvasGradient: Color gradient object. For details, see {@link CanvasGradient}. - * CanvasPattern: Template object. For details, see {@link CanvasPattern}. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set strokeStyle(strokeStyle: string | number | CanvasGradient | CanvasPattern); - - /** - * Creates a linear gradient object that is specified along the parameter coordinates + * Creates a linear gradient object that is specified along the parameter coordinates * * @param { number } x0 - The x-axis coordinate of the start point. * @param { number } y0 - The y-axis coordinate of the start point. @@ -3595,8 +3235,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; @@ -3660,8 +3299,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ createPattern(image: ImageBitmap, repetition: string | null): CanvasPattern | null; @@ -3721,8 +3359,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; @@ -3749,8 +3386,7 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ createConicGradient( startAngle: number, @@ -3862,64 +3498,6 @@ declare class CanvasRenderer extends CanvasPath { */ filter: string; - /** - * Provides filter effects such as blur and grayscale. You can get the following filter effects: - * blur(): Adds a Gaussian blur effect to the drawing - * brightness(): Provides a linear multiplication for the drawing and adjusts the brightness level. - * contrast(): Adjusts the contrast of the image. When the value is 0%, the image is completely black. - * When the value is 100%, there is no change in the image. - * grayscale(): Converts the image to a gray image. When the value is 100%, the image is completely gray. - * When the value is 0%, there is no change in the image. - * hue-rotate(): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image. - * invert(): Inverted image (representing the effect of a photographic negative). When the value is 100%, - * the image is completely inverted. When the value is 0%, there is no change in the image. - * opacity(): Transparency of the image. At 0%, the image is completely transparent. - * When the value is 100%, there is no change in the image. - * saturate(): Perform saturation processing on the image. At 0%, the image is completely un-saturated. - * When the value is 100%, there is no change in the image. - * sepia(): The image is sepia (nostalgic style). At 100%, the image turns completely sepia. - * When the value is 0%, there is no change in the image. - * none: Turn off filter effects - * - * @return { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get filter(): string; - - /** - * Provides filter effects such as blur and grayscale. You can set the following filter effects: - * blur(): Adds a Gaussian blur effect to the drawing - * brightness(): Provides a linear multiplication for the drawing and adjusts the brightness level. - * contrast(): Adjusts the contrast of the image. When the value is 0%, the image is completely black. - * When the value is 100%, there is no change in the image. - * grayscale(): Converts the image to a gray image. When the value is 100%, the image is completely gray. - * When the value is 0%, there is no change in the image. - * hue-rotate(): Perform color rotation on an image. When the value is 0 degrees, there is no change in the image. - * invert(): Inverted image (representing the effect of a photographic negative). When the value is 100%, - * the image is completely inverted. When the value is 0%, there is no change in the image. - * opacity(): Transparency of the image. At 0%, the image is completely transparent. - * When the value is 100%, there is no change in the image. - * saturate(): Perform saturation processing on the image. At 0%, the image is completely un-saturated. - * When the value is 100%, there is no change in the image. - * sepia(): The image is sepia (nostalgic style). At 100%, the image turns completely sepia. - * When the value is 0%, there is no change in the image. - * none: Turn off filter effects - * - * @param { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set filter(filter: string); - /** * Creates a new, empty ImageData object of the specified size * @@ -3960,8 +3538,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ createImageData(sw: number, sh: number): ImageData; @@ -4005,8 +3582,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ createImageData(imagedata: ImageData): ImageData; @@ -4058,8 +3634,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; @@ -4097,8 +3672,7 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap; @@ -4142,8 +3716,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ putImageData(imagedata: ImageData, dx: number | string, dy: number | string): void; @@ -4219,8 +3792,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ putImageData( imagedata: ImageData, @@ -4276,34 +3848,6 @@ declare class CanvasRenderer extends CanvasPath { */ imageSmoothingEnabled: boolean; - /** - * Get the status whether to smooth the image. The value true indicates that the image is smooth. - * The value false indicates that the image is not smooth. - * - * @return { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get imageSmoothingEnabled(): boolean; - - /** - * Set the status whether to smooth the image. The value true indicates that the image is smooth. - * The value false indicates that the image is not smooth. - * - * @param { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set imageSmoothingEnabled(imageSmoothingEnabled: boolean); - /** * Smoothness level of the current image. For details, see {@link ImageSmoothingQuality}. * @@ -4344,32 +3888,6 @@ declare class CanvasRenderer extends CanvasPath { */ imageSmoothingQuality: ImageSmoothingQuality; - /** - * Get the smoothness level of the current image. For details, see {@link ImageSmoothingQuality}. - * - * @return { ImageSmoothingQuality } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get imageSmoothingQuality(): ImageSmoothingQuality; - - /** - * Set the smoothness level of the current image. For details, see {@link ImageSmoothingQuality}. - * - * @param { ImageSmoothingQuality } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set imageSmoothingQuality(imageSmoothingQuality: ImageSmoothingQuality); - /** * Line segment endpoint attribute. For details, see {@link CanvasLineCap}. * @@ -4409,32 +3927,6 @@ declare class CanvasRenderer extends CanvasPath { * @since 11 */ lineCap: CanvasLineCap; - - /** - * Get the line segment endpoint attribute. For details, see {@link CanvasLineCap}. - * - * @return { CanvasLineCap } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get lineCap(): CanvasLineCap; - - /** - * Set the line segment endpoint attribute. For details, see {@link CanvasLineCap}. - * - * @param { CanvasLineCap } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set lineCap(lineCap: CanvasLineCap); /** * Dotted line offset attribute. @@ -4476,32 +3968,6 @@ declare class CanvasRenderer extends CanvasPath { */ lineDashOffset: number; - /** - * Get the dotted line offset attribute. - * - * @return { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get lineDashOffset(): number; - - /** - * Set the dotted line offset attribute. - * - * @param { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set lineDashOffset(lineDashOffset: number); - /** * Line segment connection point attribute. For details, see {@link CanvasLineJoin}. * @@ -4542,32 +4008,6 @@ declare class CanvasRenderer extends CanvasPath { */ lineJoin: CanvasLineJoin; - /** - * Get the line segment connection point attribute. For details, see {@link CanvasLineJoin}. - * - * @return { CanvasLineJoin } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get lineJoin(): CanvasLineJoin; - - /** - * Set the line segment connection point attribute. For details, see {@link CanvasLineJoin}. - * - * @param { CanvasLineJoin } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set lineJoin(lineJoin: CanvasLineJoin); - /** * Line thickness attribute. The value cannot be 0 or a negative number. * @@ -4608,32 +4048,6 @@ declare class CanvasRenderer extends CanvasPath { */ lineWidth: number; - /** - * Get the line thickness attribute. The value cannot be 0 or a negative number. - * - * @return { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get lineWidth(): number; - - /** - * Set the line thickness attribute. The value cannot be 0 or a negative number. - * - * @param { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set lineWidth(lineWidth: number); - /** * The value of this parameter cannot be 0 or a negative number. * @@ -4674,32 +4088,6 @@ declare class CanvasRenderer extends CanvasPath { */ miterLimit: number; - /** - * Get the value of this parameter cannot be 0 or a negative number. - * - * @return { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get miterLimit(): number; - - /** - * Set the value of this parameter cannot be 0 or a negative number. - * - * @param { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set miterLimit(miterLimit: number); - /** * Gets the current segment style. * @@ -4732,8 +4120,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ getLineDash(): number[]; @@ -4773,8 +4160,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ setLineDash(segments: number[]): void; @@ -4822,8 +4208,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ clearRect(x: number, y: number, w: number, h: number): void; @@ -4871,8 +4256,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fillRect(x: number, y: number, w: number, h: number): void; @@ -4920,8 +4304,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeRect(x: number, y: number, w: number, h: number): void; @@ -4965,32 +4348,6 @@ declare class CanvasRenderer extends CanvasPath { */ shadowBlur: number; - /** - * Get the shadow blur radius. The value cannot be a negative number. - * - * @return { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get shadowBlur(): number; - - /** - * Set the shadow blur radius. The value cannot be a negative number. - * - * @param { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set shadowBlur(shadowBlur: number); - /** * Shadow color. * @@ -5031,32 +4388,6 @@ declare class CanvasRenderer extends CanvasPath { */ shadowColor: string; - /** - * Get the shadow color. - * - * @return { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get shadowColor(): string; - - /** - * Set the shadow color. - * - * @param { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set shadowColor(shadowColor: string); - /** * Horizontal offset distance of the shadow. * @@ -5097,32 +4428,6 @@ declare class CanvasRenderer extends CanvasPath { */ shadowOffsetX: number; - /** - * Get the horizontal offset distance of the shadow. - * - * @return { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get shadowOffsetX(): number; - - /** - * Set the horizontal offset distance of the shadow. - * - * @param { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set shadowOffsetX(shadowOffsetX: number); - /** * Vertical offset distance of the shadow. * @@ -5163,32 +4468,6 @@ declare class CanvasRenderer extends CanvasPath { */ shadowOffsetY: number; - /** - * Get the vertical offset distance of the shadow. - * - * @return { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get shadowOffsetY(): number; - - /** - * Set the vertical offset distance of the shadow. - * - * @param { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set shadowOffsetY(shadowOffsetY: number); - /** * Top of the stack pop-up state in the drawing state stack * @@ -5217,8 +4496,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ restore(): void; @@ -5250,8 +4528,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ save(): void; @@ -5299,8 +4576,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fillText(text: string, x: number, y: number, maxWidth?: number): void; @@ -5340,8 +4616,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ measureText(text: string): TextMetrics; @@ -5389,8 +4664,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeText(text: string, x: number, y: number, maxWidth?: number): void; @@ -5434,32 +4708,6 @@ declare class CanvasRenderer extends CanvasPath { */ direction: CanvasDirection; - /** - * Get the text drawing direction. For details, see {@link CanvasDirection}. - * - * @return { CanvasDirection } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get direction(): CanvasDirection; - - /** - * Set the text drawing direction. For details, see {@link CanvasDirection}. - * - * @param { CanvasDirection } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set direction(direction: CanvasDirection); - /** * Font style. * @@ -5500,32 +4748,6 @@ declare class CanvasRenderer extends CanvasPath { */ font: string; - /** - * Get the font style. - * - * @return { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get font(): string; - - /** - * Set the font style. - * - * @param { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set font(font: string); - /** * Text alignment mode. For details, see {@link CanvasTextAlign}. * @@ -5566,32 +4788,6 @@ declare class CanvasRenderer extends CanvasPath { */ textAlign: CanvasTextAlign; - /** - * Get the text alignment mode. For details, see {@link CanvasTextAlign}. - * - * @return { CanvasTextAlign } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get textAlign(): CanvasTextAlign; - - /** - * Set the text alignment mode. For details, see {@link CanvasTextAlign}. - * - * @param { CanvasTextAlign } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set textAlign(textAlign: CanvasTextAlign); - /** * Text baseline. For details, see {@link CanvasTextBaseline}. * @@ -5632,32 +4828,6 @@ declare class CanvasRenderer extends CanvasPath { */ textBaseline: CanvasTextBaseline; - /** - * Get the text baseline. For details, see {@link CanvasTextBaseline}. - * - * @return { CanvasTextBaseline } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get textBaseline(): CanvasTextBaseline; - - /** - * Set the text baseline. For details, see {@link CanvasTextBaseline}. - * - * @param { CanvasTextBaseline } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set textBaseline(textBaseline: CanvasTextBaseline); - /** * Obtains the currently applied transformation matrix. * @@ -5690,8 +4860,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ getTransform(): Matrix2D; @@ -5723,8 +4892,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ resetTransform(): void; @@ -5764,8 +4932,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ rotate(angle: number): void; @@ -5805,8 +4972,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scale(x: number, y: number): void; @@ -5866,8 +5032,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void; @@ -5907,8 +5072,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ setTransform(transform?: Matrix2D): void; @@ -5968,8 +5132,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ transform(a: number, b: number, c: number, d: number, e: number, f: number): void; @@ -6009,8 +5172,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ translate(x: number, y: number): void; @@ -6036,8 +5198,7 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ setPixelMap(value?: PixelMap): void; @@ -6073,8 +5234,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ transferFromImageBitmap(bitmap: ImageBitmap): void; @@ -6084,8 +5244,7 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ saveLayer(): void; @@ -6095,8 +5254,7 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ restoreLayer(): void; @@ -6106,8 +5264,7 @@ declare class CanvasRenderer extends CanvasPath { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ reset(): void; } @@ -6144,8 +5301,7 @@ declare class CanvasRenderer extends CanvasPath { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class CanvasRenderingContext2D extends CanvasRenderer { /** @@ -6188,20 +5344,6 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { */ readonly height: number; - /** - * The default value is 0, which is bound to the height of the specified canvas. The value is read-only. - * - * @return { number } - * @readonly - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get height(): number; - /** * The default value is 0, which is bound to the width of the specified canvas. The value is read-only. * @@ -6242,20 +5384,6 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { */ readonly width: number; - /** - * The default value is 0, which is bound to the width of the specified canvas. The value is read-only. - * - * @return { number } - * @readonly - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get width(): number; - /** * Frame node of the canvas. The default value is null. * @@ -6268,18 +5396,6 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { */ readonly canvas: FrameNode; - /** - * Frame node of the canvas. The default value is null. - * - * @return { FrameNode } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get canvas(): FrameNode; - /** * Generate a character string in the data url format. * @@ -6328,22 +5444,6 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { */ toDataURL(type?: string, quality?: any): string; - /** - * Generate a character string in the data url format. - * - * @param { string } [type] - Image format. The default value is image/png. - * @param { number } [quality] - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1. - * If the value is out of the range, the default value 0.92 is used. - * @returns { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - toDataURL(type?: string, quality?: number): string; - /** * Start image analyzer. * @@ -6354,8 +5454,7 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @throws { BusinessError } 110003 - Image analysis is stopped. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ startImageAnalyzer(config: ImageAnalyzerConfig): Promise; @@ -6363,8 +5462,7 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * Stop image analyzer. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ stopImageAnalyzer(): void; @@ -6413,8 +5511,7 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(settings?: RenderingContextSettings, unit?: LengthMetricsUnit); @@ -6430,8 +5527,7 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'onAttach', callback: Callback): void; @@ -6439,7 +5535,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; @@ -6447,8 +5543,7 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'onAttach', callback?: Callback): void; @@ -6464,8 +5559,7 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'onDetach', callback: Callback): void; @@ -6473,7 +5567,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; @@ -6481,8 +5575,7 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'onDetach', callback?: Callback): void; } @@ -6519,8 +5612,7 @@ declare class CanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { /** @@ -6571,22 +5663,6 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { */ toDataURL(type?: string, quality?: any): string; - /** - * Generate a character string in the data url format. - * - * @param { string } [type] - Image format. The default value is image/png. - * @param { number } [quality] - If the image format is image/jpeg or image/webp, you can select the image quality from 0 to 1. - * If the value is out of the range, the default value 0.92 is used. - * @returns { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - toDataURL(type?: string, quality?: number): string; - /** * transfer the content to ImageBitmap * @@ -6619,8 +5695,7 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ transferToImageBitmap(): ImageBitmap; @@ -6679,8 +5754,7 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(width: number, height: number, settings?: RenderingContextSettings, unit?: LengthMetricsUnit); } @@ -6716,8 +5790,7 @@ declare class OffscreenCanvasRenderingContext2D extends CanvasRenderer { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class OffscreenCanvas { /** @@ -6756,32 +5829,6 @@ declare class OffscreenCanvas { */ height: number; - /** - * Get the height of the off-screen canvas. - * - * @return { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get height(): number; - - /** - * Set the height of the off-screen canvas. - * - * @param { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set height(height: number); - /** * Width of the off-screen canvas. * @@ -6818,32 +5865,6 @@ declare class OffscreenCanvas { */ width: number; - /** - * Get the width of the off-screen canvas. - * - * @return { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - get width(): number; - - /** - * Set the width of the off-screen canvas. - * - * @param { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - set width(width: number); - /** * Exports rendered content as an ImageBitmap object * @@ -6876,8 +5897,7 @@ declare class OffscreenCanvas { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ transferToImageBitmap(): ImageBitmap; @@ -6902,8 +5922,7 @@ declare class OffscreenCanvas { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ getContext(contextType: "2d", options?: RenderingContextSettings): OffscreenCanvasRenderingContext2D; @@ -6960,21 +5979,6 @@ declare class OffscreenCanvas { * @since 12 */ constructor(width: number, height: number, unit: LengthMetricsUnit); - - /** - * Constructor of the off-screen canvas, which is used to create an off-screen canvas object. - * - * @param { number } width - Width of the off-screen canvas. - * @param { number } height - Height of the off-screen canvas. - * @param { LengthMetricsUnit } [unit] - the unit mode - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - constructor(width: number, height: number, unit?: LengthMetricsUnit); } /** @@ -7016,8 +6020,7 @@ declare interface Size { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class DrawingRenderingContext { @@ -7028,8 +6031,7 @@ declare class DrawingRenderingContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ get size(): Size; @@ -7050,8 +6052,7 @@ declare class DrawingRenderingContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ invalidate(): void; @@ -7062,8 +6063,7 @@ declare class DrawingRenderingContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(unit?: LengthMetricsUnit); } @@ -7100,8 +6100,8 @@ declare class DrawingRenderingContext { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface CanvasInterface { /** @@ -7151,8 +6151,7 @@ interface CanvasInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ (context?: CanvasRenderingContext2D | DrawingRenderingContext): CanvasAttribute; @@ -7164,8 +6163,7 @@ interface CanvasInterface { * @returns { CanvasAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ (context: CanvasRenderingContext2D | DrawingRenderingContext, imageAIOptions: ImageAIOptions): CanvasAttribute; } @@ -7202,8 +6200,8 @@ interface CanvasInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class CanvasAttribute extends CommonMethod { /** @@ -7253,8 +6251,7 @@ declare class CanvasAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onReady(event: VoidCallback): CanvasAttribute; @@ -7265,8 +6262,7 @@ declare class CanvasAttribute extends CommonMethod { * @returns { CanvasAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableAnalyzer(enable: boolean): CanvasAttribute; } @@ -7300,6 +6296,7 @@ declare class CanvasAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Canvas: CanvasInterface; @@ -7332,5 +6329,6 @@ declare const Canvas: CanvasInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const CanvasInstance: CanvasAttribute; diff --git a/api/@internal/component/ets/checkbox.d.ts b/api/@internal/component/ets/checkbox.d.ts index eabf504d46ee1ca6bd632810f2bda67e090c8e1e..dc25af7a59fd3aabb0234e0423626973075fa8bd 100644 --- a/api/@internal/component/ets/checkbox.d.ts +++ b/api/@internal/component/ets/checkbox.d.ts @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonConfiguration, Callback, CommonMethod, ContentModifier, Optional, Bindable } from './common'; -import { CustomBuilder } from './builder'; -import { ResourceColor, MarkStyle } from './units'; -import { CheckBoxShape } from './enums'; -/*** endif */ - /** * Defines the options of Checkbox. * @@ -57,8 +50,7 @@ import { CheckBoxShape } from './enums'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface CheckboxOptions { /** @@ -93,8 +85,7 @@ declare interface CheckboxOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ name?: string; @@ -130,8 +121,7 @@ declare interface CheckboxOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ group?: string; @@ -142,8 +132,7 @@ declare interface CheckboxOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ indicatorBuilder?: CustomBuilder; } @@ -156,8 +145,7 @@ declare interface CheckboxOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface CheckBoxConfiguration extends CommonConfiguration { /** @@ -167,8 +155,7 @@ declare interface CheckBoxConfiguration extends CommonConfiguration; } @@ -229,8 +214,8 @@ declare interface CheckBoxConfiguration extends CommonConfiguration void; @@ -326,8 +309,8 @@ declare type OnCheckboxChangeCallback = (value: boolean) => void; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class CheckboxAttribute extends CommonMethod { /** @@ -383,20 +366,6 @@ declare class CheckboxAttribute extends CommonMethod { */ select(isSelected: Optional): CheckboxAttribute; - /** - * setting whether checkbox is selected. - * - * @param { boolean | undefined | Bindable } isSelected - * @returns { CheckboxAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - select(isSelected: boolean | undefined | Bindable): CheckboxAttribute; - /** * setting the display color of checkbox. * @@ -433,8 +402,7 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectedColor(value: ResourceColor): CheckboxAttribute; @@ -447,8 +415,7 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ selectedColor(resColor: Optional): CheckboxAttribute; @@ -471,8 +438,7 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ shape(value: CheckBoxShape): CheckboxAttribute; @@ -485,8 +451,7 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ shape(shape: Optional): CheckboxAttribute; @@ -507,8 +472,7 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ unselectedColor(value: ResourceColor): CheckboxAttribute; @@ -520,8 +484,7 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ unselectedColor(resColor: Optional): CheckboxAttribute; @@ -542,8 +505,7 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ mark(value: MarkStyle): CheckboxAttribute; @@ -555,8 +517,7 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ mark(style: Optional): CheckboxAttribute; @@ -608,8 +569,7 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onChange(callback: OnCheckboxChangeCallback): CheckboxAttribute; @@ -622,8 +582,7 @@ declare class CheckboxAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onChange(callback: Optional): CheckboxAttribute; @@ -635,8 +594,7 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentModifier(modifier: ContentModifier): CheckboxAttribute; @@ -648,8 +606,7 @@ declare class CheckboxAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ contentModifier(modifier: Optional>): CheckboxAttribute; } @@ -683,6 +640,7 @@ declare class CheckboxAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Checkbox: CheckboxInterface; @@ -715,5 +673,6 @@ declare const Checkbox: CheckboxInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const CheckboxInstance: CheckboxAttribute; diff --git a/api/@internal/component/ets/checkboxgroup.d.ts b/api/@internal/component/ets/checkboxgroup.d.ts index 60f4eb3d941e73bfcaa6301746350afb6e12d807..8464364250c9f77de520e70e91786a47bf0a0ab2 100644 --- a/api/@internal/component/ets/checkboxgroup.d.ts +++ b/api/@internal/component/ets/checkboxgroup.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod, Optional, Bindable } from './common'; -import { ResourceColor, MarkStyle } from './units'; -import { CheckBoxShape } from './enums'; -/*** endif */ - /** * CheckboxGroup SelectStatus * @@ -56,8 +50,7 @@ import { CheckBoxShape } from './enums'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum SelectStatus { /** @@ -88,8 +81,7 @@ declare enum SelectStatus { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ All, /** @@ -120,8 +112,7 @@ declare enum SelectStatus { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Part, /** @@ -152,8 +143,7 @@ declare enum SelectStatus { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ None, } @@ -190,8 +180,7 @@ declare enum SelectStatus { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface CheckboxGroupOptions { /** @@ -226,8 +215,7 @@ declare interface CheckboxGroupOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ group?: string; } @@ -264,8 +252,7 @@ declare interface CheckboxGroupOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface CheckboxGroupResult { /** @@ -300,8 +287,7 @@ declare interface CheckboxGroupResult { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ name: Array; /** @@ -336,8 +322,7 @@ declare interface CheckboxGroupResult { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ status: SelectStatus; } @@ -374,8 +359,8 @@ declare interface CheckboxGroupResult { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface CheckboxGroupInterface { /** @@ -414,8 +399,7 @@ interface CheckboxGroupInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (options?: CheckboxGroupOptions): CheckboxGroupAttribute; } @@ -430,8 +414,7 @@ interface CheckboxGroupInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnCheckboxGroupChangeCallback = (value: CheckboxGroupResult) => void; @@ -467,8 +450,8 @@ declare type OnCheckboxGroupChangeCallback = (value: CheckboxGroupResult) => voi * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class CheckboxGroupAttribute extends CommonMethod { /** @@ -524,20 +507,6 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; - /** - * setting whether all checkbox is selected. - * - * @param { boolean| undefined|Bindable } isAllSelected - * @returns { CheckboxGroupAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - selectAll(isAllSelected: boolean | undefined | Bindable): CheckboxGroupAttribute; - /** * setting the display color of checkbox. * @@ -574,8 +543,7 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; @@ -610,8 +577,7 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; @@ -645,8 +610,7 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; @@ -711,8 +674,7 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; @@ -739,8 +700,7 @@ declare class CheckboxGroupAttribute extends CommonMethod): CheckboxGroupAttribute; } @@ -788,6 +747,7 @@ declare class CheckboxGroupAttribute extends CommonMethod {} @@ -333,6 +329,7 @@ declare class CircleAttribute extends CommonShapeMethod {} * @form * @atomicservice * @since 11 + * @noninterop */ declare const Circle: CircleInterface; @@ -365,32 +362,6 @@ declare const Circle: CircleInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const CircleInstance: CircleAttribute; - -/** - * Defines circle component. - * - * @interface CircleInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface CircleInterface { - /** - * Set the options for circle component. - * - * @param { CircleOptions } [value] - options to create circle component. - * @returns { CircleAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (value?: CircleOptions): CircleAttribute; -} diff --git a/api/@internal/component/ets/column.d.ts b/api/@internal/component/ets/column.d.ts index 96457a9ee06baefc0134795dfdcc5fd43ff59c03..8adfd1e27e58a4964ab0128b7d0fb56f276857e3 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,17 @@ interface ColumnOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + */ + /** + * Vertical layout element spacing. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 */ space?: string | number; } @@ -95,8 +96,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 +107,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 +144,8 @@ interface ColumnOptionsV2 { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface ColumnInterface { /** @@ -204,8 +203,7 @@ interface ColumnInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options?: ColumnOptions): ColumnAttribute; /** @@ -217,8 +215,7 @@ interface ColumnInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options?: ColumnOptions | ColumnOptionsV2): ColumnAttribute; } @@ -255,8 +252,8 @@ interface ColumnInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class ColumnAttribute extends CommonMethod { /** @@ -295,8 +292,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 +332,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 +342,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 +354,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; } @@ -395,6 +388,7 @@ declare class ColumnAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Column: ColumnInterface; @@ -427,5 +421,6 @@ declare const Column: ColumnInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const ColumnInstance: ColumnAttribute; diff --git a/api/@internal/component/ets/column_split.d.ts b/api/@internal/component/ets/column_split.d.ts index 4ad3617ad8ed6b196c97a1b150fcbea635c855ec..77a83becbf8e4cd80dec5a0694069f852291c619 100644 --- a/api/@internal/component/ets/column_split.d.ts +++ b/api/@internal/component/ets/column_split.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Dimension } from './units'; -import { CommonMethod } from './common'; -/*** endif */ - /** * Defines the ColumnSplit component. * @@ -45,8 +40,8 @@ import { CommonMethod } from './common'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface ColumnSplitInterface { /** @@ -71,8 +66,7 @@ interface ColumnSplitInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (): ColumnSplitAttribute; } @@ -92,8 +86,7 @@ interface ColumnSplitInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface ColumnSplitDividerStyle { /** @@ -113,8 +106,7 @@ interface ColumnSplitDividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ startMargin?: Dimension; @@ -135,8 +127,7 @@ interface ColumnSplitDividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ endMargin?: Dimension; } @@ -163,8 +154,8 @@ interface ColumnSplitDividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class ColumnSplitAttribute extends CommonMethod { /** @@ -192,8 +183,7 @@ declare class ColumnSplitAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ resizeable(value: boolean): ColumnSplitAttribute; @@ -214,8 +204,7 @@ declare class ColumnSplitAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ divider(value: ColumnSplitDividerStyle | null): ColumnSplitAttribute; } @@ -240,6 +229,7 @@ declare class ColumnSplitAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const ColumnSplitInstance: ColumnSplitAttribute; @@ -263,5 +253,6 @@ declare const ColumnSplitInstance: ColumnSplitAttribute; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const ColumnSplit: ColumnSplitInterface; diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index f11410e0529eab7543019bc85ced42cd3e631f63..b9ed60bb49283a89b05e4c9bccbbf6295194ff5d 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -218,6 +218,7 @@ declare interface TextDecorationOptions { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Component: ClassDecorator & ((options: ComponentOptions) => ClassDecorator); @@ -229,6 +230,7 @@ declare const Component: ClassDecorator & ((options: ComponentOptions) => ClassD * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const ComponentV2: ClassDecorator & ((options: ComponentOptions) => ClassDecorator); @@ -333,6 +335,7 @@ declare interface EntryOptions { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Entry: ClassDecorator & ((options?: LocalStorage | EntryOptions) => ClassDecorator); @@ -365,6 +368,7 @@ declare const Entry: ClassDecorator & ((options?: LocalStorage | EntryOptions) = * @form * @atomicservice * @since 11 + * @noninterop */ declare const Observed: ClassDecorator; @@ -376,6 +380,7 @@ declare const Observed: ClassDecorator; * @form * @atomicservice * @since 12 + * @noninterop */ declare const ObservedV2: ClassDecorator; @@ -408,6 +413,7 @@ declare const ObservedV2: ClassDecorator; * @form * @atomicservice * @since 11 + * @noninterop */ declare const Preview: ClassDecorator & ((value: PreviewParams) => ClassDecorator); @@ -419,6 +425,7 @@ declare const Preview: ClassDecorator & ((value: PreviewParams) => ClassDecorato * @form * @atomicservice * @since 11 + * @noninterop */ declare const Require: PropertyDecorator; @@ -451,6 +458,7 @@ declare const Require: PropertyDecorator; * @form * @atomicservice * @since 11 + * @noninterop */ declare const BuilderParam: PropertyDecorator; @@ -461,6 +469,7 @@ declare const BuilderParam: PropertyDecorator; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const Local: PropertyDecorator; @@ -471,6 +480,7 @@ declare const Local: PropertyDecorator; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const Param: PropertyDecorator; @@ -481,6 +491,7 @@ declare const Param: PropertyDecorator; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const Once: PropertyDecorator; @@ -491,6 +502,7 @@ declare const Once: PropertyDecorator; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const Event: PropertyDecorator; @@ -523,6 +535,7 @@ declare const Event: PropertyDecorator; * @form * @atomicservice * @since 11 + * @noninterop */ declare const State: PropertyDecorator; @@ -542,6 +555,7 @@ declare const State: PropertyDecorator; * @form * @atomicservice * @since 12 + * @noninterop */ declare const Track: PropertyDecorator; @@ -553,6 +567,7 @@ declare const Track: PropertyDecorator; * @form * @atomicservice * @since 12 + * @noninterop */ declare const Trace: PropertyDecorator; @@ -585,6 +600,7 @@ declare const Trace: PropertyDecorator; * @form * @atomicservice * @since 11 + * @noninterop */ declare const Prop: PropertyDecorator; @@ -617,6 +633,7 @@ declare const Prop: PropertyDecorator; * @form * @atomicservice * @since 11 + * @noninterop */ declare const Link: PropertyDecorator; @@ -649,6 +666,7 @@ declare const Link: PropertyDecorator; * @form * @atomicservice * @since 11 + * @noninterop */ declare const ObjectLink: PropertyDecorator; @@ -706,6 +724,7 @@ declare interface ProvideOptions { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Provide: PropertyDecorator & ((value: string | ProvideOptions) => PropertyDecorator); @@ -715,6 +734,7 @@ declare const Provide: PropertyDecorator & ((value: string | ProvideOptions) => * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const Provider: (aliasName?: string) => PropertyDecorator; @@ -747,6 +767,7 @@ declare const Provider: (aliasName?: string) => PropertyDecorator; * @form * @atomicservice * @since 11 + * @noninterop */ declare const Consume: PropertyDecorator & ((value: string) => PropertyDecorator); @@ -757,6 +778,7 @@ declare const Consume: PropertyDecorator & ((value: string) => PropertyDecorator * @crossplatform * @atomicservice * @since 12 +* @noninterop */ declare const Consumer: (aliasName?: string) => PropertyDecorator; @@ -767,6 +789,7 @@ declare const Consumer: (aliasName?: string) => PropertyDecorator; * @crossplatform * @atomicservice * @since 12 +* @noninterop */ declare const Computed: MethodDecorator; @@ -790,6 +813,7 @@ declare const Computed: MethodDecorator; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const StorageProp: (value: string) => PropertyDecorator; @@ -813,6 +837,7 @@ declare const StorageProp: (value: string) => PropertyDecorator; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const StorageLink: (value: string) => PropertyDecorator; @@ -845,6 +870,7 @@ declare const StorageLink: (value: string) => PropertyDecorator; * @form * @atomicservice * @since 11 + * @noninterop */ declare const Watch: (value: string) => PropertyDecorator; @@ -877,6 +903,7 @@ declare const Watch: (value: string) => PropertyDecorator; * @form * @atomicservice * @since 11 + * @noninterop */ declare const Builder: MethodDecorator; @@ -888,6 +915,7 @@ declare const Builder: MethodDecorator; * @form * @atomicservice * @since 12 + * @noninterop */ declare const LocalBuilder: MethodDecorator; @@ -920,6 +948,7 @@ declare const LocalBuilder: MethodDecorator; * @form * @atomicservice * @since 11 + * @noninterop */ declare const Styles: MethodDecorator; @@ -952,6 +981,7 @@ declare const Styles: MethodDecorator; * @form * @atomicservice * @since 11 + * @noninterop */ declare const Extend: MethodDecorator & ((value: any) => MethodDecorator); @@ -969,6 +999,7 @@ declare const Extend: MethodDecorator & ((value: any) => MethodDecorator); * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const AnimatableExtend: MethodDecorator & ((value: Object) => MethodDecorator); @@ -979,6 +1010,7 @@ declare const Extend: MethodDecorator & ((value: any) => MethodDecorator); * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const Monitor: MonitorDecorator; @@ -993,6 +1025,7 @@ declare const Monitor: MonitorDecorator; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare type MonitorDecorator = (value: string, ...args: string[]) => MethodDecorator; @@ -1210,6 +1243,7 @@ declare interface IMonitorValue { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Concurrent: MethodDecorator; @@ -1225,6 +1259,7 @@ declare const Concurrent: MethodDecorator; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Sendable: ClassDecorator; @@ -1248,6 +1283,7 @@ declare const Sendable: ClassDecorator; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const CustomDialog: ClassDecorator; @@ -1271,6 +1307,7 @@ declare const CustomDialog: ClassDecorator; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const LocalStorageLink: (value: string) => PropertyDecorator; @@ -1297,6 +1334,7 @@ declare const LocalStorageLink: (value: string) => PropertyDecorator; * @form * @atomicservice * @since 11 + * @noninterop */ declare const LocalStorageProp: (value: string) => PropertyDecorator; @@ -1369,6 +1407,7 @@ declare function getContext(component?: Object): Context; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Reusable: ClassDecorator; @@ -1379,6 +1418,7 @@ declare const Reusable: ClassDecorator; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ declare const ReusableV2: ClassDecorator; @@ -19566,6 +19606,7 @@ declare interface NestedScrollOptions { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare interface MenuElement { /** @@ -20149,6 +20190,7 @@ declare enum MenuPolicy { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare type ImageModifier = import('../api/arkui/ImageModifier').ImageModifier; @@ -20168,6 +20210,7 @@ declare type ImageModifier = import('../api/arkui/ImageModifier').ImageModifier; * @crossplatform * @atomicservice * @since 20 + * @noninterop */ declare type SymbolGlyphModifier = import('../api/arkui/SymbolGlyphModifier').SymbolGlyphModifier; @@ -20239,6 +20282,7 @@ declare interface DragPreviewOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ modifier?: ImageModifier; @@ -20664,6 +20708,7 @@ declare interface BackgroundOptions { * @form * @atomicservice * @since 11 + * @noninterop */ declare class CommonMethod { /** @@ -28110,6 +28155,7 @@ declare class CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare class CommonAttribute extends CommonMethod {} @@ -28146,6 +28192,7 @@ declare class CommonAttribute extends CommonMethod {} * @form * @atomicservice * @since 11 + * @noninterop */ interface CommonInterface { /** @@ -28214,6 +28261,7 @@ interface CommonInterface { * @form * @atomicservice * @since 11 + * @noninterop */ declare const CommonInstance: CommonAttribute; @@ -28246,6 +28294,7 @@ declare const CommonInstance: CommonAttribute; * @form * @atomicservice * @since 11 + * @noninterop */ declare const Common: CommonInterface; @@ -28505,6 +28554,7 @@ declare type FractionStop = [ number, number ]; * @form * @atomicservice * @since 11 + * @noninterop */ declare class CommonShapeMethod extends CommonMethod { /** @@ -30039,6 +30089,7 @@ declare type PromptActionDialogController = import('../api/@ohos.promptAction'). * @form * @atomicservice * @since 18 + * @noninterop */ declare class CustomComponent extends BaseCustomComponent { /** @@ -30108,6 +30159,7 @@ declare class CustomComponent extends BaseCustomComponent { * @form * @atomicservice * @since 18 + * @noninterop */ declare class CustomComponentV2 extends BaseCustomComponent { /** @@ -30131,6 +30183,7 @@ declare class CustomComponentV2 extends BaseCustomComponent { * @form * @atomicservice * @since 18 + * @noninterop */ declare class BaseCustomComponent extends CommonAttribute { /** @@ -31236,6 +31289,7 @@ declare enum ContentClipMode { * @form * @atomicservice * @since 12 + * @noninterop */ declare class ScrollableCommonMethod extends CommonMethod { /** diff --git a/api/@internal/component/ets/component3d.d.ts b/api/@internal/component/ets/component3d.d.ts index fce5aa306ebcf6eb1566359fa891b5dc63f6bae4..400a9e36032ff1d3866fd01fc4499c97a9743731 100644 --- a/api/@internal/component/ets/component3d.d.ts +++ b/api/@internal/component/ets/component3d.d.ts @@ -106,6 +106,7 @@ declare interface SceneOptions { * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ interface Component3DInterface { /** @@ -127,6 +128,7 @@ interface Component3DInterface { * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ declare class Component3DAttribute extends CommonMethod { /** @@ -221,6 +223,7 @@ declare class Component3DAttribute extends CommonMethod { * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice * @since 12 + * @noninterop */ declare const Component3D: Component3DInterface; @@ -230,5 +233,6 @@ declare const Component3D: Component3DInterface; * @syscap SystemCapability.ArkUi.Graphics3D * @atomicservice * @since 12 + * @noninterop */ declare const Component3DInstance: Component3DAttribute; diff --git a/api/@internal/component/ets/container_span.d.ts b/api/@internal/component/ets/container_span.d.ts index 93349f5594110fdd20fb8b40db8e0634d890e2ac..ee95e55152472306943c3dcf21f56a2dcf8d96cb 100644 --- a/api/@internal/component/ets/container_span.d.ts +++ b/api/@internal/component/ets/container_span.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { TextBackgroundStyle } from './span'; -import { AttributeModifier } from './common'; -/*** endif */ - /** * Span container interface. * @@ -38,8 +33,8 @@ import { AttributeModifier } from './common'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @noninterop */ interface ContainerSpanInterface { /** @@ -57,8 +52,7 @@ interface ContainerSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ (): ContainerSpanAttribute; } @@ -76,8 +70,8 @@ interface ContainerSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @noninterop */ declare class ContainerSpanAttribute { /** @@ -97,8 +91,7 @@ declare class ContainerSpanAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textBackgroundStyle(style: TextBackgroundStyle): ContainerSpanAttribute; @@ -110,8 +103,7 @@ declare class ContainerSpanAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ attributeModifier(modifier: AttributeModifier): ContainerSpanAttribute; } @@ -130,6 +122,7 @@ declare class ContainerSpanAttribute { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const ContainerSpan: ContainerSpanInterface; @@ -147,5 +140,6 @@ declare const ContainerSpan: ContainerSpanInterface; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const ContainerSpanInstance: ContainerSpanAttribute; diff --git a/api/@internal/component/ets/content_slot.d.ts b/api/@internal/component/ets/content_slot.d.ts index 79d291376e5b609e3da7154bdc6f034118edba0f..1f14cbda6912ba29168f9cb27453daf6c2a31b53 100644 --- a/api/@internal/component/ets/content_slot.d.ts +++ b/api/@internal/component/ets/content_slot.d.ts @@ -18,10 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Content } from '../../@ohos.arkui.node'; -/*** endif */ - /** * Define Content type * @@ -39,8 +35,8 @@ declare type Content = import('../api/@ohos.arkui.node').Content; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @noninterop */ declare class ContentSlotAttribute { } @@ -52,8 +48,8 @@ declare class ContentSlotAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @noninterop */ interface ContentSlotInterface { /** @@ -64,8 +60,7 @@ interface ContentSlotInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ (content: Content): ContentSlotAttribute; } @@ -77,5 +72,6 @@ interface ContentSlotInterface { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ -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 c71cb953d8895791c1addc4b88d4980afbae03a4..9fb6cf9cc9fa2759b59f405ff41a7123d2f7594c 100644 --- a/api/@internal/component/ets/counter.d.ts +++ b/api/@internal/component/ets/counter.d.ts @@ -18,11 +18,6 @@ * @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. * @@ -55,8 +50,7 @@ import { VoidCallback } from './units' * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface CounterInterface { /** @@ -91,8 +85,7 @@ interface CounterInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (): CounterAttribute; } @@ -129,8 +122,7 @@ interface CounterInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class CounterAttribute extends CommonMethod { /** @@ -181,8 +173,7 @@ declare class CounterAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onInc(event: VoidCallback): CounterAttribute; @@ -234,8 +225,7 @@ declare class CounterAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onDec(event: VoidCallback): CounterAttribute; @@ -256,8 +246,7 @@ declare class CounterAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enableDec(value: boolean): CounterAttribute; @@ -278,8 +267,7 @@ declare class CounterAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enableInc(value: boolean): CounterAttribute; } diff --git a/api/@internal/component/ets/custom_dialog_controller.d.ts b/api/@internal/component/ets/custom_dialog_controller.d.ts index ad2578e930b22abb42f4dc5d90d15f7524a19da9..f5a8eb213757eaca6bbb0f0189e9697bbb9a0cd8 100644 --- a/api/@internal/component/ets/custom_dialog_controller.d.ts +++ b/api/@internal/component/ets/custom_dialog_controller.d.ts @@ -18,22 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { - Rectangle, AnimateParam, Callback, ShadowOptions, ShadowStyle, KeyboardAvoidMode, BlurStyle, HoverModeAreaType, - DismissReason, BackgroundBlurStyleOptions, BackgroundEffectOptions -} from './common'; -import { CustomBuilder } from './builder'; -import { ExtendableComponent } from './extendableComponent'; -import { DialogAlignment } from './alertDialog'; -import { Offset, ResourceColor, Dimension, BorderRadiuses, EdgeWidths, EdgeColors, EdgeStyles } from './units'; -import { BorderStyle } from './enums'; -import { LengthMetrics } from '../Graphics'; -import { LevelMode, LevelOrder, ImmersiveMode } from '../../@ohos.promptAction'; -import { CustomBuilder } from './builder'; -import { DismissDialogAction } from './actionSheet'; -/*** endif */ - /** * Defines the options of CustomDialogController. * @@ -56,8 +40,7 @@ import { DismissDialogAction } from './actionSheet'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface CustomDialogControllerOptions { /** @@ -86,18 +69,6 @@ declare interface CustomDialogControllerOptions { */ builder: any; - /** - * Custom builder function. - * - * @type { CustomBuilder | ExtendableComponent } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - builder: CustomBuilder | ExtendableComponent; - /** * Defines the cancel function. * @@ -120,8 +91,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ cancel?: () => void; @@ -147,8 +117,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ autoCancel?: boolean; @@ -174,8 +143,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ alignment?: DialogAlignment; @@ -201,8 +169,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offset?: Offset; @@ -228,8 +195,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ customStyle?: boolean; @@ -255,8 +221,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ gridCount?: number; @@ -275,8 +240,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maskColor?: ResourceColor; @@ -295,8 +259,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maskRect?: Rectangle; @@ -315,8 +278,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ openAnimation?: AnimateParam; @@ -335,8 +297,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ closeAnimation?: AnimateParam; @@ -356,8 +317,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ showInSubWindow?: boolean; @@ -376,8 +336,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ backgroundColor?: ResourceColor; @@ -396,8 +355,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ cornerRadius?: Dimension | BorderRadiuses; @@ -416,8 +374,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isModal?: boolean; @@ -428,8 +385,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillDismiss?: Callback; @@ -440,8 +396,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ width?: Dimension; @@ -452,8 +407,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ height?: Dimension; @@ -464,8 +418,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ borderWidth?: Dimension | EdgeWidths; @@ -476,8 +429,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ borderColor?: ResourceColor | EdgeColors; @@ -488,8 +440,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ borderStyle?: BorderStyle | EdgeStyles; @@ -500,8 +451,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ shadow?: ShadowOptions | ShadowStyle; @@ -513,8 +463,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundBlurStyle?: BlurStyle; @@ -525,8 +474,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -537,8 +485,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundEffect?: BackgroundEffectOptions; @@ -550,8 +497,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ keyboardAvoidMode?: KeyboardAvoidMode; @@ -563,8 +509,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ enableHoverMode?: boolean; @@ -576,8 +521,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ hoverModeArea?: HoverModeAreaType; @@ -588,8 +532,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ onDidAppear?: Callback; @@ -600,8 +543,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ onDidDisappear?: Callback; @@ -612,8 +554,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ onWillAppear?: Callback; @@ -624,8 +565,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ onWillDisappear?: Callback; @@ -636,8 +576,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ keyboardAvoidDistance?: LengthMetrics; @@ -649,8 +588,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ levelMode?: LevelMode; @@ -661,8 +599,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ levelUniqueId?: number; @@ -674,8 +611,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ immersiveMode?: ImmersiveMode; @@ -687,8 +623,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ levelOrder?: LevelOrder; @@ -700,8 +635,7 @@ declare interface CustomDialogControllerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ focusable?: boolean; } @@ -714,6 +648,7 @@ declare interface CustomDialogControllerOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare interface DismissDialogAction { /** @@ -768,8 +703,7 @@ declare type PromptActionCommonState = import('../api/@ohos.promptAction').promp * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class CustomDialogController { /** @@ -794,8 +728,7 @@ declare class CustomDialogController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(value: CustomDialogControllerOptions); @@ -822,17 +755,6 @@ declare class CustomDialogController { */ open(); - /** - * Display the content of the customized pop-up window. If the content has been displayed, it does not take effect. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - open(): void; - /** * Closes the custom pop-up window. If the window is closed, the window does not take effect. * @@ -855,17 +777,6 @@ declare class CustomDialogController { * @since 11 */ close(); - - /** - * Closes the custom pop-up window. If the window is closed, the window does not take effect. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - close(): void; /** * Get the state of the custom pop-up window. diff --git a/api/@internal/component/ets/data_panel.d.ts b/api/@internal/component/ets/data_panel.d.ts index a68c0a2617af7956befb55d0df0f1db64a0fb264..02fa057c4e305c64e3a0987eadca2622188b0030 100644 --- a/api/@internal/component/ets/data_panel.d.ts +++ b/api/@internal/component/ets/data_panel.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ResourceColor, Length } from './units' -import { CommonMethod, ContentModifier, CommonConfiguration, MultiShadowOptions } from './common' -/*** endif */ - /** * DataPanelType enum * @@ -55,8 +50,7 @@ import { CommonMethod, ContentModifier, CommonConfiguration, MultiShadowOptions * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum DataPanelType { /** @@ -87,8 +81,7 @@ declare enum DataPanelType { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Line, @@ -120,8 +113,7 @@ declare enum DataPanelType { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Circle, } @@ -138,8 +130,7 @@ declare enum DataPanelType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface ColorStop { /** @@ -155,8 +146,7 @@ declare interface ColorStop { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ color: ResourceColor; @@ -173,8 +163,7 @@ declare interface ColorStop { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offset: Length; } @@ -192,8 +181,7 @@ declare interface ColorStop { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class LinearGradient { /** @@ -211,8 +199,7 @@ declare class LinearGradient { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(colorStops: ColorStop[]); } @@ -234,8 +221,7 @@ declare class LinearGradient { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface DataPanelShadowOptions extends MultiShadowOptions { /** @@ -255,8 +241,7 @@ declare interface DataPanelShadowOptions extends MultiShadowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ colors?: Array; } @@ -293,8 +278,7 @@ declare interface DataPanelShadowOptions extends MultiShadowOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface DataPanelOptions { /** @@ -329,8 +313,7 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ values: number[]; @@ -366,8 +349,7 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ max?: number; @@ -403,8 +385,7 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ type?: DataPanelType; } @@ -441,8 +422,7 @@ declare interface DataPanelOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface DataPanelInterface { /** @@ -481,8 +461,7 @@ interface DataPanelInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (options: DataPanelOptions): DataPanelAttribute; } @@ -495,8 +474,7 @@ interface DataPanelInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface DataPanelConfiguration extends CommonConfiguration { /** @@ -506,8 +484,7 @@ declare interface DataPanelConfiguration extends CommonConfiguration { /** @@ -596,8 +571,7 @@ declare class DataPanelAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ closeEffect(value: boolean): DataPanelAttribute; @@ -618,8 +592,7 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ valueColors(value: Array): DataPanelAttribute; @@ -640,8 +613,7 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ trackBackgroundColor(value: ResourceColor): DataPanelAttribute; @@ -662,8 +634,7 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeWidth(value: Length): DataPanelAttribute; @@ -684,8 +655,7 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ trackShadow(value: DataPanelShadowOptions): DataPanelAttribute; @@ -697,8 +667,7 @@ declare class DataPanelAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ 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 606505938242c1f8347f043ba066a6e7aeba9916..73f6661439639451f4f065091b67f445458155f2 100644 --- a/api/@internal/component/ets/date_picker.d.ts +++ b/api/@internal/component/ets/date_picker.d.ts @@ -18,13 +18,6 @@ * @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. * @@ -47,1498 +40,1415 @@ import { CrownSensitivity } from './enums' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ -declare interface DatePickerResult { - /** - * Application year - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Application year - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ + declare interface DatePickerResult { + /** + * Application year + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Application year + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Year of the selected date. + * + *

NOTE: + *
Value range: depends on start and end. + * If start and end are not set, the default range is [1970, 2100]. + *

+ * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + year?: number; + + /** + * Application month + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Application month + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Month index of the selected date. + * The index is zero-based. 0 indicates January, and 11 indicates December. + * + *

NOTE: + *
Value range: depends on start and end. If start and end are not set, the default range is [0, 11]. + *

+ * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + month?: number; + + /** + * Application day + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Application day + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Day of the selected date. + * + *

NOTE: + *
Value range: depends on start and end. If start and end are not set, the default range is [1, 31]. + *

+ * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + day?: number; + } + /** - * Year of the selected date. + * Defines the mode of the date picker. * - *

NOTE: - *
Value range: depends on start and end. - * If start and end are not set, the default range is [1970, 2100]. - *

- * - * @type { ?number } + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ - year?: number; - + declare enum DatePickerMode { + /** + * The date displays three columns: year, month, and day. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + DATE = 0, + + /** + * The date displays two columns: year and month. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + YEAR_AND_MONTH = 1, + + /** + * Defines a mode that displays the date in months and days of the month. + * In this mode, if the month changes from December to January, + * the year does not increment by one; if the month changes from January to December, + * the year does not decrement by one. The year remains fixed at the currently set value. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + MONTH_AND_DAY = 2, + } + /** - * Application month + * Defines the options of DatePicker. * - * @type { ?number } + * @interface DatePickerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Application month + * Defines the options of DatePicker. * - * @type { ?number } + * @interface DatePickerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Month index of the selected date. - * The index is zero-based. 0 indicates January, and 11 indicates December. - * - *

NOTE: - *
Value range: depends on start and end. If start and end are not set, the default range is [0, 11]. - *

+ * Parameters of the date picker. * - * @type { ?number } + * @interface DatePickerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - month?: number; - + declare interface DatePickerOptions { + /** + * Specifies the start date of the date selector. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Specifies the start date of the date selector. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Start date of the picker. + * + * @type { ?Date } + * @default Date('1970-1-1') + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + start?: Date; + + /** + * Specifies the end date for the date selector. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Specifies the end date for the date selector. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * End date of the picker. + * + * @type { ?Date } + * @default Date('2100-12-31') + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + end?: Date; + + /** + * Specifies the date selector check date or time selector check time. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Specifies the date selector check date or time selector check time. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Date of the selected item. + * + * @type { ?Date } + * @default current system date + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + selected?: Date; + + /** + * Date columns to be displayed. + * + *

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

+ * + * @type { ?DatePickerMode } + * @default DatePickerMode.DATE - which means to display three columns: year, month, and day. + *
Decimal values are rounded off. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + mode?: DatePickerMode; + } + /** - * Application day + * Defines the DatePicker Component. * - * @type { ?number } + * @interface DatePickerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Application day + * Defines the DatePicker Component. * - * @type { ?number } + * @interface DatePickerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Day of the selected date. - * - *

NOTE: - *
Value range: depends on start and end. If start and end are not set, the default range is [1, 31]. - *

- * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - day?: number; -} - -/** - * Defines the mode of the date picker. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum DatePickerMode { - /** - * The date displays three columns: year, month, and day. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - DATE = 0, - - /** - * The date displays two columns: year and month. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - YEAR_AND_MONTH = 1, - - /** - * Defines a mode that displays the date in months and days of the month. - * In this mode, if the month changes from December to January, - * the year does not increment by one; if the month changes from January to December, - * the year does not decrement by one. The year remains fixed at the currently set value. + * Creates a date picker in the given date range. * + * @interface DatePickerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - MONTH_AND_DAY = 2, -} - -/** - * Defines the options of DatePicker. - * - * @interface DatePickerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the options of DatePicker. - * - * @interface DatePickerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Parameters of the date picker. - * - * @interface DatePickerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface DatePickerOptions { + interface DatePickerInterface { + /** + * Defines the DatePicker constructor. + * + * @param { DatePickerOptions } options + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Defines the DatePicker constructor. + * + * @param { DatePickerOptions } options + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Parameters of the date picker. + * + * @param { DatePickerOptions } options - Parameters of the date picker. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + (options?: DatePickerOptions): DatePickerAttribute; + } + /** - * Specifies the start date of the date selector. + * Defines the DatePicker attribute functions. * - * @type { ?Date } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Specifies the start date of the date selector. + * Defines the DatePicker attribute functions. * - * @type { ?Date } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Start date of the picker. + * Defines the DatePicker attribute functions. * - * @type { ?Date } - * @default Date('1970-1-1') + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - start?: Date; - - /** - * Specifies the end date for the date selector. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Specifies the end date for the date selector. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 + * @since 11 */ + declare class DatePickerAttribute extends CommonMethod { + /** + * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. + * + * @param { boolean } value + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. + * + * @param { boolean } value + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Specifies whether to display the lunar calendar. + * + * @param { boolean } value - Whether to display the lunar calendar. + *
- true: Display the lunar calendar. + *
- false: Do not display the lunar. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + lunar(value: boolean): DatePickerAttribute; + + /** + * Specifies whether to display the lunar calendar. + * This API supports the undefined type for the isLunar parameter. + * + * @param { Optional } isLunar - Whether to display the lunar calendar. + *
- true: Display the lunar calendar. + *
- false: Do not display the lunar. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + lunar(isLunar: Optional): DatePickerAttribute; + + /** + * Sets the text style of disappearing items + * + * @param { PickerTextStyle } value - indicates the text style of disappearing items. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the text style for the top and bottom items. + * + * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + disappearTextStyle(value: PickerTextStyle): DatePickerAttribute; + + /** + * Sets the text style for the top and bottom items. + * This API supports the undefined type for the style parameter. + * + * @param { Optional } style - Font color, font size, and font weight of the top and bottom items. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + disappearTextStyle(style: Optional): DatePickerAttribute; + + /** + * Sets the text style of normal items + * + * @param { PickerTextStyle } value - indicates the text style of normal items. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the text style for all items except the top, bottom, and selected items. + * + * @param { PickerTextStyle } value - Font color, font size, and font weight of all items except the top, + *
bottom, and selected items. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + textStyle(value: PickerTextStyle): DatePickerAttribute; + + /** + * Sets the text style for all items except the top, bottom, and selected items. + * This API supports the undefined type for the style parameter. + * + * @param { Optional } style - Font color, font size, and font weight of all items except the top, + *
bottom, and selected items. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + textStyle(style: Optional): DatePickerAttribute; + + /** + * Sets the text style of selected items + * + * @param { PickerTextStyle } value - indicates the text style of selected items. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the text style for the selected item. + * + * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + selectedTextStyle(value: PickerTextStyle): DatePickerAttribute; + + /** + * Sets the text style for the selected item. + * this API supports the undefined type for the style parameter. + * + * @param { Optional } style - Font color, font size, and font weight of the selected item. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + selectedTextStyle(style: Optional): DatePickerAttribute; + + /** + * Triggered when a date is selected. + * + * @param { function } callback + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + * @deprecated since 10 + * @useinstead datePicker/DatePickerAttribute#onDateChange + */ + onChange(callback: (value: DatePickerResult) => void): DatePickerAttribute; + + /** + * This event is triggered when a DatePicker date or time is selected. + * + * @param { function } callback + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * This event is triggered when a DatePicker date or time is selected. + * + * @param { function } callback + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Triggered when a date is selected. + * Anonymous Object Rectification. + * + * @param { Callback } callback + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onDateChange(callback: Callback): DatePickerAttribute; + + /** + * Triggered when a date is selected. + * + * @param { Optional> } callback + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onDateChange(callback: Optional>): DatePickerAttribute; + + /** + * Sets the sensitivity to the digital crown rotation. + * + * @param { Optional } sensitivity - Sensitivity to the digital crown rotation. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + digitalCrownSensitivity(sensitivity: Optional): DatePickerAttribute; + + /** + * Sets whether to enable haptic feedback. + * + * @param { Optional } enable - Whether to enable haptic feedback. + *
true (default): Haptic feedback is enabled. + *
false: Haptic feedback is disabled. + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 18 + */ + enableHapticFeedback(enable: Optional): DatePickerAttribute; + + /** + * Can scroll loop if true is set, on the contrary it can not. + * + * @param { Optional } isLoop + * @returns { DatePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + canLoop(isLoop: Optional): DatePickerAttribute; + } + /** - * End date of the picker. - * - * @type { ?Date } - * @default Date('2100-12-31') + * Defines the style of the lunar calendar switch in the DatePickerDialog component. + * + * @interface LunarSwitchStyle * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ - end?: Date; - + declare interface LunarSwitchStyle { + /** + * Background color of the switch when it is on. + * + * @type { ?ResourceColor } + * @default $r('sys.color.ohos_id_color_text_primary_actived') + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + selectedColor?: ResourceColor; + + /** + * Border color of the switch when it is off. + * + * @type { ?ResourceColor } + * @default $r('sys.color.ohos_id_color_switch_outline_off') + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + unselectedColor?: ResourceColor; + + /** + * Color of the icon inside the switch. + * + * @type { ?ResourceColor } + * @default Color.White + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + strokeColor?: ResourceColor; + } + /** - * Specifies the date selector check date or time selector check time. + * Defines the DatePickerDialogOptions for Data Picker Dialog. * - * @type { ?Date } + * @extends DatePickerOptions + * @interface DatePickerDialogOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Specifies the date selector check date or time selector check time. + * Defines the DatePickerDialogOptions for Data Picker Dialog. * - * @type { ?Date } + * @extends DatePickerOptions + * @interface DatePickerDialogOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Date of the selected item. + * Parameters of the date picker dialog box. * - * @type { ?Date } - * @default current system date + * @extends DatePickerOptions + * @interface DatePickerDialogOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - selected?: Date; + declare interface DatePickerDialogOptions extends DatePickerOptions { + /** + * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Whether to display the lunar calendar. + * The value true means to display the lunar calendar, and false means the opposite. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + lunar?: boolean; + + /** + * Whether to show the switch to display the lunar. + * + * @type { ?boolean } value - indicates whether to show the switch to display the lunar. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Whether to display the lunar calendar switch. + * The value true means to display the lunar calendar switch, and false means the opposite. + * + * @type { ?boolean } value - indicates whether to show the switch to display the lunar. + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + lunarSwitch?: boolean; + + /** + * Style of the lunar calendar switch. + * + * @type { ?LunarSwitchStyle } + * @default { selectedColor: $r('sys.color.ohos_id_color_text_primary_actived'), + *
unselectedColor: $r('sys.color.ohos_id_color_switch_outline_off'), strokeColor: Color.White }. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + lunarSwitchStyle?: LunarSwitchStyle; + + /** + * Indicates whether to show the time selector. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Whether to display the time item. + * The value true means to display the time item, and false means the opposite. + * + *

NOTE: + *
With showTime=true, the mode parameter has no effect and the default three columns for year, + *
month, and day are displayed. + *

+ * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + showTime?: boolean; + + /** + * Indicates whether to display the 24-hour clock. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Whether to display time in 24-hour format. + * The value true means to display time in 24-hour format, and false means the opposite. + * + *

NOTE: + *
When the display time is in 12-hour format, the AM/PM zone does not change depending on the hour portion. + *

+ * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + useMilitaryTime?: boolean; + + /** + * Text style of disappearing items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Font color, font size, and font width for the top and bottom items. + * + * @type { ?PickerTextStyle } + * @default {
color: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + disappearTextStyle?: PickerTextStyle; + + /** + * Text style of normal items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Font color, font size, and font width of all items except the top, bottom, and selected items. + * + * @type { ?PickerTextStyle } + * @default {
color: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + textStyle?: PickerTextStyle; + + /** + * Style of accept button. + * + *

NOTE: + *
In the acceptButtonStyle and cancelButtonStyle configurations, + *
only one primary field can be set to true at most. + *
If both the primary fields are set to true, neither will take effect. + *

+ * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + acceptButtonStyle?: PickerDialogButtonStyle; + + /** + * Style of cancel button. + * + *

NOTE: + *
In the acceptButtonStyle and cancelButtonStyle configurations, + *
only one primary field can be set to true at most. + *
If both the primary fields are set to true, neither will take effect. + *

+ * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + cancelButtonStyle?: PickerDialogButtonStyle; + + /** + * Font color, font size, and font width of the selected item. + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Font color, font size, and font width of the selected item. + * + * @type { ?PickerTextStyle } + * @default {
color: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + selectedTextStyle?: PickerTextStyle; + + /** + * Mask Region of dialog. The size cannot exceed the main window. + * + * @type { ?Rectangle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Mask area of the dialog box. + * Events outside the mask area are transparently transmitted, and events within the mask area are not. + * + * @type { ?Rectangle } + * @default { x: 0, y: 0, width: '100%', height: '100%' } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + maskRect?: Rectangle; + + /** + * Defines the dialog alignment of the screen. + * + * @type { ?DialogAlignment } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Alignment mode of the dialog box in the vertical direction. + * + * @type { ?DialogAlignment } + * @default DialogAlignment.Default + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + alignment?: DialogAlignment; + + /** + * Defines the dialog offset. + * + * @type { ?Offset } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Offset of the dialog box based on the alignment settings. + * + * @type { ?Offset } + * @default { dx: 0 , dy: 0 } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + offset?: Offset; + + /** + * Callback invoked when the OK button in the dialog box is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + * @deprecated since 10 + * @useinstead datePicker/DatePickerDialogOptions#onDateAccept + */ + onAccept?: (value: DatePickerResult) => void; + + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Callback invoked when the Cancel button in the dialog box is clicked. + * Anonymous Object Rectification. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onCancel?: VoidCallback; + + /** + * Callback invoked when the selected item in the picker changes. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + * @deprecated since 10 + * @useinstead datePicker/DatePickerDialogOptions#onDateChange + */ + onChange?: (value: DatePickerResult) => void; + + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Callback invoked when the OK button in the dialog box is clicked. + * + *

NOTE: + *
When showTime is set to true, the hour and minute in the value returned by + *
the callback are the hour and minute selected in the picker. Otherwise, + *
the hour and minute are the hour and minute of the system time. + *

+ * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onDateAccept?: Callback; + + /** + * This event is triggered when a DatePicker date or time is selected in dialog. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Callback invoked when the selected item in the picker changes. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Callback invoked when the selected item in the picker changes. + * Anonymous Object Rectification. + * + *

NOTE: + *
When showTime is set to true, the hour and minute in the value returned by + *
the callback are the hour and minute selected in the picker. Otherwise, + *
the hour and minute are the hour and minute of the system time. + *

+ * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onDateChange?: Callback; + + /** + * Defines the datePickerDialog's background color + * + * @type { ?ResourceColor } + * @default Color.Transparent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Backplane color of the dialog box. + * + * @type { ?ResourceColor } + * @default Color.Transparent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + backgroundColor?: ResourceColor; + + /** + * Defines the datePickerDialog's background blur Style + * + * @type { ?BlurStyle } + * @default BlurStyle.COMPONENT_ULTRA_THICK + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Background blur style of the dialog box. + * + * @type { ?BlurStyle } + * @default BlurStyle.COMPONENT_ULTRA_THICK + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + backgroundBlurStyle?: BlurStyle; + + /** + * Options for customizing the background blur style. + * + * @type { ?BackgroundBlurStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 19 + */ + backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; + + /** + * Options for customizing the background effect. + * + * @type { ?BackgroundEffectOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 19 + */ + backgroundEffect?: BackgroundEffectOptions; + + /** + * Event callback when the dialog box appears. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + /** + * Event callback when the dialog box appears. + * + *

NOTE: + *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > + * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. + *
2. You can set the callback event for changing the dialog box display effect in onDidAppear. + * The settings take effect next time the dialog box appears. + *
3. If the user closes the dialog box immediately after it appears, + * onWillDisappear is invoked before onDidAppear. + *
4. If the dialog box is closed before its entrance animation is finished, + * this callback is not invoked. + *

+ * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onDidAppear?: VoidCallback; + + /** + * Callback function when the dialog disappears. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + /** + * Event callback when the dialog box disappears. + * + *

NOTE: + *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > + *
(onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. + *

+ * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onDidDisappear?: VoidCallback; + + /** + * Callback function before the dialog openAnimation starts. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + /** + * Event callback when the dialog box is about to appear. + * + *

NOTE: + *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > + * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. + *
2. You can set the callback event for changing the dialog box display effect in onWillAppear. + * The settings take effect next time the dialog box appears. + *

+ * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onWillAppear?: VoidCallback; + + /** + * Callback function before the dialog closeAnimation starts. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + /** + * Event callback when the dialog box is about to disappear. + * + *

NOTE: + *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > + * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. + *
2. If the user closes the dialog box immediately after it appears, + * onWillDisappear is invoked before onDidAppear. + *

+ * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onWillDisappear?: VoidCallback; + + /** + * Shadow of the dialog box. + * Default value on 2-in-1 devices: ShadowStyle.OUTER_FLOATING_MD + * when the dialog box is focused and ShadowStyle.OUTER_FLOATING_SM + * + * @type { ?(ShadowOptions | ShadowStyle) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + shadow?: ShadowOptions | ShadowStyle; + + /** + * Whether to display a leading zero for the hours and minutes. + * + *

NOTE: + *
Currently only the configuration of the hour and minute parameters is supported. + *

+ * + * @type { ?DateTimeOptions } + * @default hour: In the 24-hour format, it defaults to 2-digit, which means a leading zero is used; + *
In the 12-hour format, it defaults to numeric, which means no leading zero is used. + *
minute: defaults to 2-digit, which means a leading zero is used. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + dateTimeOptions?: DateTimeOptions; + + /** + * Whether to enable the hover mode. + * + * @type { ?boolean } + * @default false - meaning not to enable the hover mode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + enableHoverMode?: boolean; + + /** + * Display area of the dialog box in hover mode. + * + * @type { ?HoverModeAreaType } + * @default HoverModeAreaType.BOTTOM_SCREEN + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + hoverModeArea?: HoverModeAreaType; + + /** + * Whether to enable haptic feedback. + * The value true means to enable haptic feedback, and false means the opposite + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 18 + */ + enableHapticFeedback?: boolean; + + /** + * Can scroll loop if true is set, on the contrary it can not. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + canLoop?: boolean; + } /** - * 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. - * - *

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

- * - * @type { ?DatePickerMode } - * @default DatePickerMode.DATE - which means to display three columns: year, month, and day. - *
Decimal values are rounded off. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - mode?: DatePickerMode; -} - -/** - * Defines the DatePicker Component. - * - * @interface DatePickerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the DatePicker Component. - * - * @interface DatePickerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Creates a date picker in the given date range. - * - * @interface DatePickerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface DatePickerInterface { - /** - * Defines the DatePicker constructor. + * Defines DatePickerDialog which uses show method to show DatePicker dialog. * - * @param { DatePickerOptions } options - * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines the DatePicker constructor. + * Defines DatePickerDialog which uses show method to show DatePicker dialog. * - * @param { DatePickerOptions } options - * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Parameters of the date picker. + * Defines DatePickerDialog which uses show method to show DatePicker dialog. * - * @param { DatePickerOptions } options - Parameters of the date picker. - * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - (options?: DatePickerOptions): DatePickerAttribute; -} - -/** - * Defines the DatePicker attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the DatePicker attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the DatePicker attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class DatePickerAttribute extends CommonMethod { + declare class DatePickerDialog { + /** + * Invoking method display. + * + * @param { DatePickerDialogOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Invoking method display. + * + * @param { DatePickerDialogOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Shows a date picker dialog box. + * + * @param { DatePickerDialogOptions } options - Parameters of the date picker dialog box. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.UIContext#showDatePickerDialog + */ + static show(options?: DatePickerDialogOptions); + } + /** - * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. + * Defines DatePicker Component. * - * @param { boolean } value - * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. - * - * @param { boolean } value - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Specifies whether to display the lunar calendar. - * - * @param { boolean } value - Whether to display the lunar calendar. - *
- true: Display the lunar calendar. - *
- false: Do not display the lunar. - * @default false - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - lunar(value: boolean): DatePickerAttribute; - - /** - * Specifies whether to display the lunar calendar. - * This API supports the undefined type for the isLunar parameter. - * - * @param { Optional } isLunar - Whether to display the lunar calendar. - *
- true: Display the lunar calendar. - *
- false: Do not display the lunar. - * @default false - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - lunar(isLunar: Optional): DatePickerAttribute; - - /** - * Sets the text style of disappearing items + * Defines DatePicker Component. * - * @param { PickerTextStyle } value - indicates the text style of disappearing items. - * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the text style for the top and bottom items. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. - * @default {
color: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - disappearTextStyle(value: PickerTextStyle): DatePickerAttribute; - - /** - * Sets the text style for the top and bottom items. - * This API supports the undefined type for the style parameter. + * Defines DatePicker Component. * - * @param { Optional } style - Font color, font size, and font weight of the top and bottom items. - * @default {
color: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} - * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - disappearTextStyle(style: Optional): DatePickerAttribute; - - /** - * Sets the text style of normal items - * - * @param { PickerTextStyle } value - indicates the text style of normal items. - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 + * @since 11 */ + declare const DatePicker: DatePickerInterface; + /** - * Sets the text style for all items except the top, bottom, and selected items. + * Defines DatePicker Component instance. * - * @param { PickerTextStyle } value - Font color, font size, and font weight of all items except the top, - *
bottom, and selected items. - * @default {
color: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} - * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 8 */ - textStyle(value: PickerTextStyle): DatePickerAttribute; - - /** - * Sets the text style for all items except the top, bottom, and selected items. - * This API supports the undefined type for the style parameter. - * - * @param { Optional } style - Font color, font size, and font weight of all items except the top, - *
bottom, and selected items. - * @default {
color: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - textStyle(style: Optional): DatePickerAttribute; - /** - * Sets the text style of selected items + * Defines DatePicker Component instance. * - * @param { PickerTextStyle } value - indicates the text style of selected items. - * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the text style for the selected item. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item. - * @default {
color: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedTextStyle(value: PickerTextStyle): DatePickerAttribute; - - /** - * Sets the text style for the selected item. - * this API supports the undefined type for the style parameter. + * Defines DatePicker Component instance. * - * @param { Optional } style - Font color, font size, and font weight of the selected item. - * @default {
color: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
}
} - * @returns { DatePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedTextStyle(style: Optional): DatePickerAttribute; - - /** - * Triggered when a date is selected. - * - * @param { function } callback - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - * @deprecated since 10 - * @useinstead datePicker/DatePickerAttribute#onDateChange + * @since 11 */ - onChange(callback: (value: DatePickerResult) => void): DatePickerAttribute; + declare const DatePickerInstance: DatePickerAttribute; - /** - * This event is triggered when a DatePicker date or time is selected. - * - * @param { function } callback - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * This event is triggered when a DatePicker date or time is selected. - * - * @param { function } callback - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Triggered when a date is selected. - * Anonymous Object Rectification. - * - * @param { Callback } callback - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onDateChange(callback: Callback): DatePickerAttribute; - - /** - * Triggered when a date is selected. - * - * @param { Optional> } callback - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onDateChange(callback: Optional>): DatePickerAttribute; - - /** - * Sets the sensitivity to the digital crown rotation. - * - * @param { Optional } sensitivity - Sensitivity to the digital crown rotation. - * @default CrownSensitivity.MEDIUM - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - digitalCrownSensitivity(sensitivity: Optional): DatePickerAttribute; - - /** - * Sets whether to enable haptic feedback. - * - * @param { Optional } enable - Whether to enable haptic feedback. - *
true (default): Haptic feedback is enabled. - *
false: Haptic feedback is disabled. - * @default true - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableHapticFeedback(enable: Optional): DatePickerAttribute; - - /** - * Can scroll loop if true is set, on the contrary it can not. - * - * @param { Optional } isLoop - * @returns { DatePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - canLoop(isLoop: Optional): DatePickerAttribute; -} - -/** - * Defines the style of the lunar calendar switch in the DatePickerDialog component. - * - * @interface LunarSwitchStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface LunarSwitchStyle { - /** - * Background color of the switch when it is on. - * - * @type { ?ResourceColor } - * @default $r('sys.color.ohos_id_color_text_primary_actived') - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedColor?: ResourceColor; - - /** - * Border color of the switch when it is off. - * - * @type { ?ResourceColor } - * @default $r('sys.color.ohos_id_color_switch_outline_off') - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 - */ - unselectedColor?: ResourceColor; - - /** - * Color of the icon inside the switch. - * - * @type { ?ResourceColor } - * @default Color.White - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 - */ - strokeColor?: ResourceColor; -} - -/** - * Defines the DatePickerDialogOptions for Data Picker Dialog. - * - * @extends DatePickerOptions - * @interface DatePickerDialogOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the DatePickerDialogOptions for Data Picker Dialog. - * - * @extends DatePickerOptions - * @interface DatePickerDialogOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Parameters of the date picker dialog box. - * - * @extends DatePickerOptions - * @interface DatePickerDialogOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface DatePickerDialogOptions extends DatePickerOptions { - /** - * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Date selector: true: displays the lunar calendar. false: The lunar calendar is not displayed. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether to display the lunar calendar. - * The value true means to display the lunar calendar, and false means the opposite. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - lunar?: boolean; - - /** - * Whether to show the switch to display the lunar. - * - * @type { ?boolean } value - indicates whether to show the switch to display the lunar. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether to display the lunar calendar switch. - * The value true means to display the lunar calendar switch, and false means the opposite. - * - * @type { ?boolean } value - indicates whether to show the switch to display the lunar. - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - lunarSwitch?: boolean; - - /** - * Style of the lunar calendar switch. - * - * @type { ?LunarSwitchStyle } - * @default { selectedColor: $r('sys.color.ohos_id_color_text_primary_actived'), - *
unselectedColor: $r('sys.color.ohos_id_color_switch_outline_off'), strokeColor: Color.White }. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 - */ - lunarSwitchStyle?: LunarSwitchStyle; - - /** - * Indicates whether to show the time selector. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether to display the time item. - * The value true means to display the time item, and false means the opposite. - * - *

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

- * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - showTime?: boolean; - - /** - * Indicates whether to display the 24-hour clock. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether to display time in 24-hour format. - * The value true means to display time in 24-hour format, and false means the opposite. - * - *

NOTE: - *
When the display time is in 12-hour format, the AM/PM zone does not change depending on the hour portion. - *

- * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - useMilitaryTime?: boolean; - - /** - * Text style of disappearing items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Font color, font size, and font width for the top and bottom items. - * - * @type { ?PickerTextStyle } - * @default {
color: '#ff182431',
font: {
size: '14fp',
weight: FontWeight.Regular
}
} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - disappearTextStyle?: PickerTextStyle; - - /** - * Text style of normal items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Font color, font size, and font width of all items except the top, bottom, and selected items. - * - * @type { ?PickerTextStyle } - * @default {
color: '#ff182431',
font: {
size: '16fp',
weight: FontWeight.Regular
}
} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - textStyle?: PickerTextStyle; - - /** - * Style of accept button. - * - *

NOTE: - *
In the acceptButtonStyle and cancelButtonStyle configurations, - *
only one primary field can be set to true at most. - *
If both the primary fields are set to true, neither will take effect. - *

- * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - acceptButtonStyle?: PickerDialogButtonStyle; - - /** - * Style of cancel button. - * - *

NOTE: - *
In the acceptButtonStyle and cancelButtonStyle configurations, - *
only one primary field can be set to true at most. - *
If both the primary fields are set to true, neither will take effect. - *

- * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - cancelButtonStyle?: PickerDialogButtonStyle; - - /** - * Font color, font size, and font width of the selected item. - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Font color, font size, and font width of the selected item. - * - * @type { ?PickerTextStyle } - * @default {
color: '#ff007dff',
font: {
size: '20vp',
weight: FontWeight.Medium
} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedTextStyle?: PickerTextStyle; - - /** - * Mask Region of dialog. The size cannot exceed the main window. - * - * @type { ?Rectangle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Mask area of the dialog box. - * Events outside the mask area are transparently transmitted, and events within the mask area are not. - * - * @type { ?Rectangle } - * @default { x: 0, y: 0, width: '100%', height: '100%' } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - maskRect?: Rectangle; - - /** - * Defines the dialog alignment of the screen. - * - * @type { ?DialogAlignment } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Alignment mode of the dialog box in the vertical direction. - * - * @type { ?DialogAlignment } - * @default DialogAlignment.Default - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - alignment?: DialogAlignment; - - /** - * Defines the dialog offset. - * - * @type { ?Offset } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Offset of the dialog box based on the alignment settings. - * - * @type { ?Offset } - * @default { dx: 0 , dy: 0 } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - offset?: Offset; - - /** - * Callback invoked when the OK button in the dialog box is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - * @deprecated since 10 - * @useinstead datePicker/DatePickerDialogOptions#onDateAccept - */ - onAccept?: (value: DatePickerResult) => void; - - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Callback invoked when the Cancel button in the dialog box is clicked. - * Anonymous Object Rectification. - * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onCancel?: VoidCallback; - - /** - * Callback invoked when the selected item in the picker changes. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - * @deprecated since 10 - * @useinstead datePicker/DatePickerDialogOptions#onDateChange - */ - onChange?: (value: DatePickerResult) => void; - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Callback invoked when the OK button in the dialog box is clicked. - * - *

NOTE: - *
When showTime is set to true, the hour and minute in the value returned by - *
the callback are the hour and minute selected in the picker. Otherwise, - *
the hour and minute are the hour and minute of the system time. - *

- * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onDateAccept?: Callback; - - /** - * This event is triggered when a DatePicker date or time is selected in dialog. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Callback invoked when the selected item in the picker changes. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Callback invoked when the selected item in the picker changes. - * Anonymous Object Rectification. - * - *

NOTE: - *
When showTime is set to true, the hour and minute in the value returned by - *
the callback are the hour and minute selected in the picker. Otherwise, - *
the hour and minute are the hour and minute of the system time. - *

- * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onDateChange?: Callback; - - /** - * Defines the datePickerDialog's background color - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Backplane color of the dialog box. - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - backgroundColor?: ResourceColor; - - /** - * Defines the datePickerDialog's background blur Style - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Background blur style of the dialog box. - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - backgroundBlurStyle?: BlurStyle; - - /** - * Options for customizing the background blur style. - * - * @type { ?BackgroundBlurStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 - */ - backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; - - /** - * Options for customizing the background effect. - * - * @type { ?BackgroundEffectOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 - */ - backgroundEffect?: BackgroundEffectOptions; - - /** - * Event callback when the dialog box appears. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - /** - * Event callback when the dialog box appears. - * - *

NOTE: - *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > - * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. - *
2. You can set the callback event for changing the dialog box display effect in onDidAppear. - * The settings take effect next time the dialog box appears. - *
3. If the user closes the dialog box immediately after it appears, - * onWillDisappear is invoked before onDidAppear. - *
4. If the dialog box is closed before its entrance animation is finished, - * this callback is not invoked. - *

- * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onDidAppear?: VoidCallback; - - /** - * Callback function when the dialog disappears. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - /** - * Event callback when the dialog box disappears. - * - *

NOTE: - *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > - *
(onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. - *

- * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onDidDisappear?: VoidCallback; - - /** - * Callback function before the dialog openAnimation starts. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - /** - * Event callback when the dialog box is about to appear. - * - *

NOTE: - *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > - * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. - *
2. You can set the callback event for changing the dialog box display effect in onWillAppear. - * The settings take effect next time the dialog box appears. - *

- * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onWillAppear?: VoidCallback; - - /** - * Callback function before the dialog closeAnimation starts. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - /** - * Event callback when the dialog box is about to disappear. - * - *

NOTE: - *
1. The normal timing sequence is as follows: onWillAppear > onDidAppear > - * (onDateAccept/onCancel/onDateChange) > onWillDisappear > onDidDisappear. - *
2. If the user closes the dialog box immediately after it appears, - * onWillDisappear is invoked before onDidAppear. - *

- * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onWillDisappear?: VoidCallback; - - /** - * Shadow of the dialog box. - * Default value on 2-in-1 devices: ShadowStyle.OUTER_FLOATING_MD - * when the dialog box is focused and ShadowStyle.OUTER_FLOATING_SM - * - * @type { ?(ShadowOptions | ShadowStyle) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - shadow?: ShadowOptions | ShadowStyle; - - /** - * Whether to display a leading zero for the hours and minutes. - * - *

NOTE: - *
Currently only the configuration of the hour and minute parameters is supported. - *

- * - * @type { ?DateTimeOptions } - * @default hour: In the 24-hour format, it defaults to 2-digit, which means a leading zero is used; - *
In the 12-hour format, it defaults to numeric, which means no leading zero is used. - *
minute: defaults to 2-digit, which means a leading zero is used. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - dateTimeOptions?: DateTimeOptions; - - /** - * Whether to enable the hover mode. - * - * @type { ?boolean } - * @default false - meaning not to enable the hover mode. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableHoverMode?: boolean; - - /** - * Display area of the dialog box in hover mode. - * - * @type { ?HoverModeAreaType } - * @default HoverModeAreaType.BOTTOM_SCREEN - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 - */ - hoverModeArea?: HoverModeAreaType; - - /** - * Whether to enable haptic feedback. - * The value true means to enable haptic feedback, and false means the opposite - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableHapticFeedback?: boolean; - - /** - * Can scroll loop if true is set, on the contrary it can not. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - canLoop?: boolean; -} - -/** - * Defines DatePickerDialog which uses show method to show DatePicker dialog. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines DatePickerDialog which uses show method to show DatePicker dialog. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines DatePickerDialog which uses show method to show DatePicker dialog. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class DatePickerDialog { - /** - * Invoking method display. - * - * @param { DatePickerDialogOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Invoking method display. - * - * @param { DatePickerDialogOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Shows a date picker dialog box. - * - * @param { DatePickerDialogOptions } options - Parameters of the date picker dialog box. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.UIContext#showDatePickerDialog - */ - static show(options?: DatePickerDialogOptions); -} - -/** - * Defines DatePicker Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines DatePicker Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines DatePicker Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare const DatePicker: DatePickerInterface; - -/** - * Defines DatePicker Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines DatePicker Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines DatePicker Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare const DatePickerInstance: DatePickerAttribute; - - + \ No newline at end of file diff --git a/api/@internal/component/ets/divider.d.ts b/api/@internal/component/ets/divider.d.ts index 8bb25614340f5bb5c60584051d70b11885e1e0da..a9f83273e5959ce0b51769af2e1f60e498000f04 100644 --- a/api/@internal/component/ets/divider.d.ts +++ b/api/@internal/component/ets/divider.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ResourceColor } from './units'; -import { CommonMethod} from './common'; -import { LineCapStyle } from './enums'; -/*** endif */ - /** * Provides a divider component to separate different content blocks/content elements. * @@ -56,8 +50,8 @@ import { LineCapStyle } from './enums'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface DividerInterface { /** @@ -92,8 +86,7 @@ interface DividerInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (): DividerAttribute; } @@ -130,8 +123,8 @@ interface DividerInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class DividerAttribute extends CommonMethod { /** @@ -174,8 +167,7 @@ declare class DividerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ vertical(value: boolean): DividerAttribute; @@ -215,8 +207,7 @@ declare class DividerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ color(value: ResourceColor): DividerAttribute; @@ -256,8 +247,7 @@ declare class DividerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeWidth(value: number | string): DividerAttribute; @@ -297,8 +287,7 @@ declare class DividerAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ lineCap(value: LineCapStyle): DividerAttribute; } @@ -332,6 +321,7 @@ declare class DividerAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Divider: DividerInterface; @@ -364,5 +354,6 @@ declare const Divider: DividerInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const DividerInstance: DividerAttribute; diff --git a/api/@internal/component/ets/effect_component.d.ts b/api/@internal/component/ets/effect_component.d.ts index 98d39ed6473b2f2a706e1e6512025f030a78db3a..c04f293827d8cc4cd888037534b6ca4db7be50c0 100644 --- a/api/@internal/component/ets/effect_component.d.ts +++ b/api/@internal/component/ets/effect_component.d.ts @@ -30,6 +30,7 @@ import { CommonMethod} from './common'; * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ interface EffectComponentInterface { /** @@ -120,6 +121,7 @@ declare interface EffectComponentOptions { * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ declare class EffectComponentAttribute extends CommonMethod { /** @@ -141,6 +143,7 @@ declare class EffectComponentAttribute extends CommonMethod {} @@ -347,6 +343,7 @@ declare class EllipseAttribute extends CommonShapeMethod {} * @form * @atomicservice * @since 11 + * @noninterop */ declare const Ellipse: EllipseInterface; @@ -379,32 +376,6 @@ declare const Ellipse: EllipseInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const EllipseInstance: EllipseAttribute; - -/** - * Ellipse drawing. - * - * @interface EllipseInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface EllipseInterface { - /** - * Set the value. - * - * @param { EllipseOptions } [options] - ellipse options - * @returns { EllipseAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (options?: EllipseOptions): EllipseAttribute; -} diff --git a/api/@internal/component/ets/embedded_component.d.ts b/api/@internal/component/ets/embedded_component.d.ts index 1dca4bf8ee5164ec85f53afb032ba35fc9cf8250..810607e06aa36008608b238568df792ec714331e 100644 --- a/api/@internal/component/ets/embedded_component.d.ts +++ b/api/@internal/component/ets/embedded_component.d.ts @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import Want from '../../@ohos.app.ability.Want' -import { Callback, ErrorCallback ,BusinessError} from '../../@ohos.base' -import { CommonMethod, TerminationInfo } from './common' -import { EmbeddedType } from './enums' -/*** endif */ - /** * Provide an interface for the EmbeddedComponent, which is used *
to render UI asynchronously @@ -32,8 +25,8 @@ import { EmbeddedType } from './enums' * @interface EmbeddedComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @noninterop */ interface EmbeddedComponentInterface { /** @@ -51,23 +44,6 @@ interface EmbeddedComponentInterface { loader: import('../api/@ohos.app.ability.Want').default, type: EmbeddedType ): EmbeddedComponentAttribute; - - /** - * Construct the EmbeddedComponent.
- * Called when the EmbeddedComponent is used. - * - * @param { Want } loader - indicates initialization parameter - * @param { EmbeddedType } type - indicates type of the EmbeddedComponent - * @returns { EmbeddedComponentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - ( - loader: Want, - type: EmbeddedType - ): EmbeddedComponentAttribute; } /** @@ -87,7 +63,7 @@ declare interface TerminationInfo { * @atomicservice * @since 12 */ - code: number; + code: number; /** * Defines the additional termination information. @@ -97,7 +73,7 @@ declare interface TerminationInfo { * @atomicservice * @since 12 */ - want?: import('../api/@ohos.app.ability.Want').default; + want?: import('../api/@ohos.app.ability.Want').default; } /** @@ -106,8 +82,8 @@ declare interface TerminationInfo { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @noninterop */ declare class EmbeddedComponentAttribute extends CommonMethod { /** @@ -120,18 +96,6 @@ declare class EmbeddedComponentAttribute extends CommonMethod): EmbeddedComponentAttribute; - - /** - * Called when the provider of the embedded UI is terminated. - * - * @param { Callback } callback - * @returns { EmbeddedComponentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onTerminated(callback: Callback): EmbeddedComponentAttribute; /** * Called when some error occurred. @@ -143,18 +107,6 @@ declare class EmbeddedComponentAttribute extends CommonMethod } callback - * @returns { EmbeddedComponentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onError(callback: ErrorCallback): EmbeddedComponentAttribute; } /** @@ -163,6 +115,7 @@ declare class EmbeddedComponentAttribute extends CommonMethod { /** @@ -423,8 +406,7 @@ declare class FlexAttribute extends CommonMethod { * @returns { FlexAttribute } The attribute of the flex. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ pointLight(value: PointLightStyle): FlexAttribute; } @@ -458,6 +440,7 @@ declare class FlexAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Flex: FlexInterface; @@ -490,5 +473,6 @@ declare const Flex: FlexInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const FlexInstance: FlexAttribute; diff --git a/api/@internal/component/ets/flow_item.d.ts b/api/@internal/component/ets/flow_item.d.ts index 70cf009cce4621798a1bdf6ed9125db999f3e241..25edd0394ef5a674182ccb1f01a5ab9f8dbc6fe1 100644 --- a/api/@internal/component/ets/flow_item.d.ts +++ b/api/@internal/component/ets/flow_item.d.ts @@ -18,9 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod } from './common' -/*** endif */ /** * Mesh container for static fixed-size layout scenarios. @@ -44,8 +41,8 @@ import { CommonMethod } from './common' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface FlowItemInterface { /** @@ -70,8 +67,7 @@ interface FlowItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (): FlowItemAttribute; } @@ -98,8 +94,8 @@ interface FlowItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class FlowItemAttribute extends CommonMethod {} @@ -123,6 +119,7 @@ declare class FlowItemAttribute extends CommonMethod {} * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const FlowItem: FlowItemInterface @@ -146,5 +143,6 @@ declare const FlowItem: FlowItemInterface * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const FlowItemInstance: FlowItemAttribute; diff --git a/api/@internal/component/ets/focus.d.ts b/api/@internal/component/ets/focus.d.ts index 74bdff450b6a9735dd7d6475a2efb14f5f0e4970..495e4f6bbd24387a2f2cc8e0ce18ba47da37a708 100644 --- a/api/@internal/component/ets/focus.d.ts +++ b/api/@internal/component/ets/focus.d.ts @@ -18,10 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { LengthMetrics , ColorMetrics } from '../Graphics'; -/*** endif */ - /** * Focus box style. * @@ -29,8 +25,7 @@ import { LengthMetrics , ColorMetrics } from '../Graphics'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface FocusBoxStyle { /** @@ -40,8 +35,7 @@ declare interface FocusBoxStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ margin?: LengthMetrics; /** @@ -51,8 +45,7 @@ declare interface FocusBoxStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ strokeColor?: ColorMetrics; /** @@ -62,8 +55,7 @@ declare interface FocusBoxStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ strokeWidth?: LengthMetrics; } @@ -75,8 +67,7 @@ declare interface FocusBoxStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum FocusPriority { /** @@ -85,8 +76,7 @@ declare enum FocusPriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ AUTO = 0, @@ -96,8 +86,7 @@ declare enum FocusPriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PRIOR = 2000, @@ -107,8 +96,7 @@ declare enum FocusPriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PREVIOUS = 3000, } @@ -121,8 +109,7 @@ declare enum FocusPriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ declare enum KeyProcessingMode { /** @@ -131,8 +118,7 @@ declare enum KeyProcessingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ FOCUS_NAVIGATION = 0, @@ -142,8 +128,7 @@ declare enum KeyProcessingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ ANCESTOR_EVENT = 1, } \ No newline at end of file diff --git a/api/@internal/component/ets/folder_stack.d.ts b/api/@internal/component/ets/folder_stack.d.ts index 6a2747be6a4b70a37f3289d7a2849fa960d49354..89c3e60fbea23887732a0794c761c2d8357c4037 100644 --- a/api/@internal/component/ets/folder_stack.d.ts +++ b/api/@internal/component/ets/folder_stack.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import window from '../../@ohos.window'; -import { FoldStatus, Alignment, AppRotation } from './enums'; -import { CommonMethod } from './common'; -/*** endif */ - /** * Import the WindowStatusType type object for onHoverStatusChange. * @@ -34,17 +28,6 @@ import { CommonMethod } from './common'; */ declare type WindowStatusType = import('../api/@ohos.window').default.WindowStatusType; -/** - * Import the WindowStatusType type object for onHoverStatusChange. - * - * @typedef { window.WindowStatusType } WindowStatusType - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare type WindowStatusType = window.WindowStatusType - /** * FolderStack constructor options. * @@ -52,8 +35,7 @@ declare type WindowStatusType = window.WindowStatusType * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface FolderStackOptions { /** @@ -81,8 +63,7 @@ interface FolderStackOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ upperItems?: Array; } @@ -102,8 +83,8 @@ interface FolderStackOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @noninterop */ interface FolderStackInterface { @@ -135,8 +116,7 @@ interface FolderStackInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options?: FolderStackOptions): FolderStackAttribute; } @@ -148,8 +128,7 @@ interface FolderStackInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface OnFoldStatusChangeInfo { /** @@ -177,8 +156,7 @@ interface OnFoldStatusChangeInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ foldStatus: FoldStatus } @@ -192,8 +170,7 @@ interface OnFoldStatusChangeInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnFoldStatusChangeCallback = (event: OnFoldStatusChangeInfo) => void; @@ -205,8 +182,7 @@ declare type OnFoldStatusChangeCallback = (event: OnFoldStatusChangeInfo) => voi * @param { HoverEventParam } param - hover event param * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnHoverStatusChangeCallback = (param: HoverEventParam) => void; @@ -221,8 +197,8 @@ declare type OnHoverStatusChangeCallback = (param: HoverEventParam) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @noninterop */ declare class FolderStackAttribute extends CommonMethod { /** @@ -242,8 +218,7 @@ declare class FolderStackAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ alignContent(value: Alignment): FolderStackAttribute; @@ -275,8 +250,7 @@ declare class FolderStackAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onFolderStateChange(callback: OnFoldStatusChangeCallback): FolderStackAttribute; @@ -298,8 +272,7 @@ declare class FolderStackAttribute extends CommonMethod { * @returns { FolderStackAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onHoverStatusChange(handler: OnHoverStatusChangeCallback): FolderStackAttribute; @@ -320,8 +293,7 @@ declare class FolderStackAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableAnimation(value: boolean): FolderStackAttribute; @@ -342,8 +314,7 @@ declare class FolderStackAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ autoHalfFold(value: boolean): FolderStackAttribute; } @@ -354,8 +325,7 @@ declare class FolderStackAttribute extends CommonMethod { * @interface HoverEventParam * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface HoverEventParam { /** @@ -364,8 +334,7 @@ declare interface HoverEventParam { * @type { FoldStatus } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ foldStatus: FoldStatus @@ -375,8 +344,7 @@ declare interface HoverEventParam { * @type { boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isHoverMode: boolean @@ -386,8 +354,7 @@ declare interface HoverEventParam { * @type { AppRotation } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ appRotation: AppRotation @@ -397,8 +364,7 @@ declare interface HoverEventParam { * @type { WindowStatusType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ windowStatusType: WindowStatusType } @@ -416,6 +382,7 @@ declare interface HoverEventParam { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const FolderStack: FolderStackInterface; @@ -433,5 +400,6 @@ declare const FolderStack: FolderStackInterface; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const FolderStackInstance: FolderStackAttribute; diff --git a/api/@internal/component/ets/for_each.d.ts b/api/@internal/component/ets/for_each.d.ts index d5644b111ae6634cfd69292a7e9347781d7831fd..e0f711c1f3ec5813d9d8417721f41c8fe8fe840f 100644 --- a/api/@internal/component/ets/for_each.d.ts +++ b/api/@internal/component/ets/for_each.d.ts @@ -27,6 +27,7 @@ * @form * @atomicservice * @since 12 + * @noninterop */ declare class ForEachAttribute extends DynamicNode { } @@ -64,6 +65,7 @@ declare class ForEachAttribute extends DynamicNode { * @form * @atomicservice * @since 11 + * @noninterop */ interface ForEachInterface { /** @@ -161,5 +163,6 @@ interface ForEachInterface { * @form * @atomicservice * @since 11 + * @noninterop */ declare const ForEach: ForEachInterface; diff --git a/api/@internal/component/ets/form_link.d.ts b/api/@internal/component/ets/form_link.d.ts index 700211a7b821455ff4ea0cb067e6e741d61ad59c..95baa36c5c5eafffed6d0e4085f58e6102b1eef1 100644 --- a/api/@internal/component/ets/form_link.d.ts +++ b/api/@internal/component/ets/form_link.d.ts @@ -169,6 +169,7 @@ declare interface FormLinkOptions { * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ interface FormLinkInterface { /** @@ -211,6 +212,7 @@ interface FormLinkInterface { * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ declare class FormLinkAttribute extends CommonMethod {} @@ -228,6 +230,7 @@ declare class FormLinkAttribute extends CommonMethod {} * @form * @atomicservice * @since 11 + * @noninterop */ declare const FormLink: FormLinkInterface; @@ -245,5 +248,6 @@ declare const FormLink: FormLinkInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const FormLinkInstance: FormLinkAttribute; diff --git a/api/@internal/component/ets/gauge.d.ts b/api/@internal/component/ets/gauge.d.ts index 0d3ebe2d139d1a8d8a32a3f135911025f412f34c..9b39da9c99f24917745844fb511e953d9b0e56c7 100644 --- a/api/@internal/component/ets/gauge.d.ts +++ b/api/@internal/component/ets/gauge.d.ts @@ -18,13 +18,6 @@ * @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. * @@ -33,8 +26,7 @@ import { LinearGradient } from './dataPanel' * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface GaugeOptions { /** @@ -80,8 +72,7 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ value: number; @@ -128,8 +119,7 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ min?: number; @@ -176,8 +166,7 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ max?: number; } @@ -214,8 +203,7 @@ interface GaugeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface GaugeInterface { /** @@ -274,8 +262,7 @@ interface GaugeInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options: GaugeOptions): GaugeAttribute; } @@ -297,8 +284,7 @@ interface GaugeInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface GaugeShadowOptions extends MultiShadowOptions {} @@ -317,8 +303,7 @@ declare interface GaugeShadowOptions extends MultiShadowOptions {} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface GaugeIndicatorOptions { @@ -339,8 +324,7 @@ declare interface GaugeIndicatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ icon?: ResourceStr; @@ -361,8 +345,7 @@ declare interface GaugeIndicatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ space?: Dimension; } @@ -375,8 +358,7 @@ declare interface GaugeIndicatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface GaugeConfiguration extends CommonConfiguration { /** @@ -386,8 +368,7 @@ declare interface GaugeConfiguration extends CommonConfiguration { /** @@ -480,8 +458,7 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ value(value: number): GaugeAttribute; @@ -521,8 +498,7 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ startAngle(angle: number): GaugeAttribute; @@ -562,8 +538,7 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ endAngle(angle: number): GaugeAttribute; @@ -603,8 +578,7 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ colors(colors: ResourceColor | LinearGradient | Array<[ResourceColor | LinearGradient, number]>): GaugeAttribute; @@ -644,8 +618,7 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeWidth(length: Length): GaugeAttribute; @@ -666,8 +639,7 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ description(value: CustomBuilder): GaugeAttribute; @@ -688,8 +660,7 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ trackShadow(value: GaugeShadowOptions): GaugeAttribute; @@ -710,8 +681,7 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ indicator(value: GaugeIndicatorOptions): GaugeAttribute; @@ -724,8 +694,7 @@ declare class GaugeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ privacySensitive(isPrivacySensitiveMode: Optional): GaugeAttribute; @@ -737,8 +706,7 @@ declare class GaugeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentModifier(modifier: ContentModifier): GaugeAttribute; } diff --git a/api/@internal/component/ets/gesture.d.ts b/api/@internal/component/ets/gesture.d.ts index ed6977605a32b3c7bac5070ba735606e6a8ecb28..464be9eddb6335b1ceb7b5d579eca77e1f18d81c 100644 --- a/api/@internal/component/ets/gesture.d.ts +++ b/api/@internal/component/ets/gesture.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { BaseEvent, SourceTool, Callback } from './common' -import { InteractionHand } from './enums' -/*** endif */ - /** * Creating an Object * @@ -45,8 +40,7 @@ import { InteractionHand } from './enums' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum PanDirection { /** @@ -68,8 +62,7 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ None, @@ -92,8 +85,7 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Horizontal, @@ -116,8 +108,7 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Left, @@ -140,8 +131,7 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Right, @@ -164,8 +154,7 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Vertical, @@ -188,8 +177,7 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Up, @@ -212,8 +200,7 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Down, @@ -236,8 +223,7 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ All, } @@ -264,8 +250,7 @@ declare enum PanDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum SwipeDirection { /** @@ -287,8 +272,7 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ None, @@ -311,8 +295,7 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Horizontal, @@ -335,8 +318,7 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Vertical, @@ -359,8 +341,7 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ All, } @@ -387,8 +368,7 @@ declare enum SwipeDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum GestureMode { /** @@ -410,8 +390,7 @@ declare enum GestureMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Sequence, @@ -434,8 +413,7 @@ declare enum GestureMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Parallel, @@ -458,8 +436,7 @@ declare enum GestureMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Exclusive, } @@ -486,8 +463,7 @@ declare enum GestureMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum GestureMask { /** @@ -509,8 +485,7 @@ declare enum GestureMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Normal, @@ -533,8 +508,7 @@ declare enum GestureMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ IgnoreInternal, } @@ -554,8 +528,7 @@ declare enum GestureMask { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum GestureJudgeResult { /** @@ -571,8 +544,7 @@ declare enum GestureJudgeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ CONTINUE = 0, @@ -589,8 +561,7 @@ declare enum GestureJudgeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ REJECT = 1, } @@ -610,8 +581,7 @@ declare enum GestureJudgeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare namespace GestureControl { /** @@ -629,8 +599,7 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enum GestureType { /** @@ -646,8 +615,7 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ TAP_GESTURE = 0, @@ -664,8 +632,7 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ LONG_PRESS_GESTURE = 1, @@ -682,8 +649,7 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PAN_GESTURE = 2, @@ -700,8 +666,7 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PINCH_GESTURE = 3, @@ -718,8 +683,7 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ SWIPE_GESTURE = 4, @@ -736,8 +700,7 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ROTATION_GESTURE = 5, @@ -754,8 +717,7 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ DRAG = 6, @@ -772,8 +734,7 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ CLICK = 7, } @@ -794,8 +755,7 @@ declare namespace GestureControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface GestureInfo { /** @@ -813,8 +773,7 @@ declare interface GestureInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ tag?: string; @@ -833,8 +792,7 @@ declare interface GestureInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ type: GestureControl.GestureType; @@ -853,8 +811,7 @@ declare interface GestureInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isSystemGesture: boolean; } @@ -958,8 +915,7 @@ declare interface EventLocationInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface FingerInfo { /** @@ -984,8 +940,7 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ id: number; @@ -1033,8 +988,7 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ globalX: number; @@ -1060,8 +1014,7 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ globalY: number; @@ -1087,8 +1040,7 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ localX: number; @@ -1114,8 +1066,7 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ localY: number; @@ -1126,8 +1077,7 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ displayX: number; @@ -1138,8 +1088,7 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ displayY: number; @@ -1150,8 +1099,7 @@ interface FingerInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ hand?: InteractionHand; } @@ -1189,18 +1137,6 @@ declare type GestureType = | RotationGestureInterface | GestureGroupInterface; -/** - * Defines the Gesture Type. - * - * @typedef { Gesture | GestureGroup } GestureType - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -export type GestureType = Gesture | GestureGroup; - /** * Defines the gesture base event. * @@ -1218,8 +1154,7 @@ export type GestureType = Gesture | GestureGroup; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface BaseGestureEvent extends BaseEvent { /** @@ -1237,8 +1172,7 @@ interface BaseGestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fingerList: FingerInfo[]; @@ -1272,8 +1206,7 @@ interface BaseGestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface TapGestureEvent extends BaseGestureEvent { /** @@ -1305,8 +1238,7 @@ interface TapGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface LongPressGestureEvent extends BaseGestureEvent { /** @@ -1324,8 +1256,7 @@ interface LongPressGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ repeat: boolean; } @@ -1347,8 +1278,7 @@ interface LongPressGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface PanGestureEvent extends BaseGestureEvent { /** @@ -1368,8 +1298,7 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ offsetX: number; @@ -1390,8 +1319,7 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ offsetY: number; @@ -1408,8 +1336,7 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ velocityX: number; @@ -1426,8 +1353,7 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ velocityY: number; @@ -1444,8 +1370,7 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ velocity: number; } @@ -1467,8 +1392,7 @@ interface PanGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface PinchGestureEvent extends BaseGestureEvent { /** @@ -1486,8 +1410,7 @@ interface PinchGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ scale: number; @@ -1508,8 +1431,7 @@ interface PinchGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pinchCenterX: number; @@ -1530,8 +1452,7 @@ interface PinchGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pinchCenterY: number; } @@ -1553,8 +1474,7 @@ interface PinchGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface RotationGestureEvent extends BaseGestureEvent { /** @@ -1574,8 +1494,7 @@ interface RotationGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ angle: number; } @@ -1597,8 +1516,7 @@ interface RotationGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'112','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface SwipeGestureEvent extends BaseGestureEvent { /** @@ -1618,8 +1536,7 @@ interface SwipeGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ angle: number; @@ -1640,8 +1557,7 @@ interface SwipeGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ speed: number; } @@ -1671,8 +1587,7 @@ interface SwipeGestureEvent extends BaseGestureEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface GestureEvent extends BaseEvent { /** @@ -1700,8 +1615,7 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ repeat: boolean; @@ -1730,8 +1644,7 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fingerList: FingerInfo[]; @@ -1775,8 +1688,7 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offsetX: number; @@ -1808,8 +1720,7 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offsetY: number; @@ -1841,8 +1752,7 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ angle: number; @@ -1874,8 +1784,7 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ speed: number; @@ -1904,8 +1813,7 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scale: number; @@ -1937,8 +1845,7 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ pinchCenterX: number; @@ -1970,8 +1877,7 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ pinchCenterY: number; @@ -1988,8 +1894,7 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ velocityX: number; @@ -2006,8 +1911,7 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ velocityY: number; @@ -2024,8 +1928,7 @@ interface GestureEvent extends BaseEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ velocity: number; @@ -2082,8 +1985,7 @@ interface GestureInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface BaseHandlerOptions { /** @@ -2094,49 +1996,11 @@ interface GestureInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ isFingerCountLimited?: boolean; } -/** - * Defines Gesture interface. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -export declare class Gesture { - /** - * Set gesture's tag. - * - * @param { string } tag - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - tag(tag: string): this; - - /** - * Input source type for gesture response. - * - * @param { Array } types - indicate the allowed input source for gesture to response - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - allowedTypes(types: Array): this; -} - /** * Defines TapGesture parameters. * @@ -2154,8 +2018,7 @@ export declare class Gesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ declare interface TapGestureParameters extends BaseHandlerOptions { /** @@ -2165,8 +2028,7 @@ declare interface TapGestureParameters extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ count?: number; /** @@ -2176,8 +2038,7 @@ declare interface TapGestureParameters extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fingers?: number; /** @@ -2187,8 +2048,7 @@ declare interface TapGestureParameters extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ distanceThreshold?: number; } @@ -2297,46 +2157,6 @@ interface TapGestureInterface extends GestureInterface { onAction(event: (event: GestureEvent) => void): TapGestureInterface; } -/*** if arkts 1.2 */ -/** - * Defines TapGesture. - * - * @extends Gesture - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class TapGesture extends Gesture { - /** - * Set the value. - * TapGestureParameters: The parameters of the tapGesture. - * - * @param { function } factory - * @param { TapGestureParameters } value - * @returns { TapGesture } - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - static $_instantiate(factory: () => TapGesture, value?: TapGestureParameters): TapGesture - - /** - * Tap gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onAction(event: Callback): this; -} -/*** endif */ - /** * Defines LongPressGesture interface. * @@ -2514,72 +2334,6 @@ interface LongPressGestureInterface extends GestureInterface): LongPressGestureInterface; } -/*** if arkts 1.2 */ -/** - * Defines LongPressGesture. - * - * @extends Gesture - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class LongPressGesture extends Gesture { - /** - * Set the value. - * fingers: Indicates the hand index that triggers the long press. - * repeat: Indicates whether to trigger event callback continuously. - * duration: Minimum press and hold time, in milliseconds. - * - * @param { function } factory - * @param { LongPressGestureHandlerOptions } value - * @returns { LongPressGesture } - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - static $_instantiate(factory: () => LongPressGesture, value?: LongPressGestureHandlerOptions): LongPressGesture - - /** - * LongPress gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onAction(event: Callback): this; - - /** - * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - - /** - * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; -} -/*** endif */ - /** * Defines the PanGesture options. * @@ -2599,8 +2353,7 @@ export declare class LongPressGesture extends Gesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class PanGestureOptions { /** @@ -2629,18 +2382,6 @@ declare class PanGestureOptions { */ constructor(value?: { fingers?: number; direction?: PanDirection; distance?: number }); - /** - * Constructor parameters. - * - * @param { PanGestureHandlerOptions } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - constructor(value?: PanGestureHandlerOptions); - /** * Sets the direction attribute. * @@ -2667,18 +2408,6 @@ declare class PanGestureOptions { */ setDirection(value: PanDirection); - /** - * Sets the direction attribute. - * - * @param { PanDirection } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - setDirection(value: PanDirection): void; - /** * Sets the setDistance attribute. * @@ -2705,18 +2434,6 @@ declare class PanGestureOptions { */ setDistance(value: number); - /** - * Sets the setDistance attribute. - * - * @param { number } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - setDistance(value: number): void; - /** * Sets the setFingers attribute. * @@ -2743,18 +2460,6 @@ declare class PanGestureOptions { */ setFingers(value: number); - /** - * Sets the setFingers attribute. - * - * @param { number } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - setFingers(value: number): void; - /** * Get the pan direction attribute. * @@ -2762,8 +2467,7 @@ declare class PanGestureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getDirection(): PanDirection; /** @@ -2774,8 +2478,7 @@ declare class PanGestureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ getDistance(): number; } @@ -2978,97 +2681,22 @@ interface PanGestureInterface extends GestureInterface { } -/*** if arkts 1.2 */ /** - * Defines PanGesture. + * Defines the SwipeGesture interface. + * + * @extends GestureInterface + * @interface SwipeGestureInterface + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ +/** + * Defines the SwipeGesture interface. * - * @extends Gesture + * @extends GestureInterface + * @interface SwipeGestureInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class PanGesture extends Gesture { - /** - * Set the value. - * - * @param { function } factory - * @param { PanGestureHandlerOptions | PanGestureOptions } value - * @returns { PanGesture } - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - static $_instantiate(factory: () => PanGesture, value?: PanGestureHandlerOptions | PanGestureOptions): PanGesture - - /** - * Pan gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionStart(event: Callback): this; - - /** - * Callback when the Pan gesture is moving. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionUpdate(event: Callback): this; - - /** - * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; -} -/*** endif */ - -/** - * Defines the SwipeGesture interface. - * - * @extends GestureInterface - * @interface SwipeGestureInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the SwipeGesture interface. - * - * @extends GestureInterface - * @interface SwipeGestureInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 + * @since 10 */ /** * Defines SwipeGesture interface extends GestureInterface. @@ -3153,45 +2781,6 @@ interface SwipeGestureInterface extends GestureInterface onAction(event: (event: GestureEvent) => void): SwipeGestureInterface; } -/*** if arkts 1.2 */ -/** - * Defines SwipeGesture. - * - * @extends Gesture - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class SwipeGesture extends Gesture { - /** - * Set the value. - * - * @param { function } factory - * @param { SwipeGestureHandlerOptions } value - * @returns { SwipeGesture } - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - static $_instantiate(factory: () => SwipeGesture, value?: SwipeGestureHandlerOptions): SwipeGesture - - /** - * Slide gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onAction(event: Callback): this; -} -/*** endif */ - /** * Defines the PinchGesture interface. * @@ -3390,81 +2979,6 @@ interface PinchGestureInterface extends GestureInterface onActionCancel(event: Callback): PinchGestureInterface; } -/*** if arkts 1.2 */ -/** - * Defines PinchGesture. - * - * @extends Gesture - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class PinchGesture extends Gesture { - /** - * Set the value. - * - * @param { function } factory - * @param { PinchGestureHandlerOptions } value - * @returns { PinchGesture } - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - static $_instantiate(factory: () => PinchGesture, value?: PinchGestureHandlerOptions): PinchGesture - - /** - * Pinch gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionStart(event: Callback): this; - - /** - * Callback when the Pinch gesture is moving. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionUpdate(event: Callback): this; - - /** - * The Pinch gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - - /** - * The Pinch gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; -} -/*** endif */ - /** * Defines the RotationGesture interface. * @@ -3663,81 +3177,6 @@ interface RotationGestureInterface extends GestureInterface): RotationGestureInterface; } -/*** if arkts 1.2 */ -/** - * Defines RotationGesture. - * - * @extends Gesture - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class RotationGesture extends Gesture { - /** - * Set the value. - * - * @param { function } factory - * @param { RotationGestureHandlerOptions } value - * @returns { RotationGesture } - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - static $_instantiate(factory: () => RotationGesture, value?: RotationGestureHandlerOptions): RotationGesture - - /** - * Rotation gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionStart(event: Callback): this; - - /** - * Callback when the Rotation gesture is moving. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionUpdate(event: Callback): this; - - /** - * The Rotation gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - - /** - * The Rotation gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; -} -/*** endif */ - /** * Defines the GestureGroup interface. * @@ -3825,45 +3264,6 @@ interface GestureGroupInterface { onCancel(event: () => void): GestureGroupInterface; } -/*** if arkts 1.2 */ -/** - * Defines the GestureGroup. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class GestureGroup { - /** - * Return to Obtain GestureGroup. - * - * @param { function } factory - * @param { GestureMode } mode - * @param { GestureType[] } gesture - * @returns { GestureGroup } - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - static $_instantiate(factory: () => GestureGroup, mode: GestureMode, ...gesture: GestureType[]): GestureGroup; - - /** - * The Gesture group is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { GestureGroup } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onCancel(event: Callback): GestureGroup; -} -/*** endif */ - /** * Defines TapGesture Component. * @@ -4060,42 +3460,6 @@ declare class GestureHandler implements GestureInterface { allowedTypes(types: Array): T; } -/*** if arkts 1.2 */ -/** - * Defines the gesture handler. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class GestureHandler { - /** - * Set the GestureHandler's tag. - * - * @param { string } tag - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - tag(tag: string): this; - - /** - * Input source type for gesture response. - * - * @param { Array } types - indicate the allowed input source for gesture to response - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - allowedTypes(types: Array): this; -} -/*** endif */ - /** * Defines the TapGestureHandler options. * @@ -4113,8 +3477,7 @@ export declare class GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface TapGestureHandlerOptions extends BaseHandlerOptions { /** @@ -4125,8 +3488,7 @@ interface TapGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ count?: number; /** @@ -4137,8 +3499,7 @@ interface TapGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fingers?: number; } @@ -4176,41 +3537,6 @@ declare class TapGestureHandler extends GestureHandler { onAction(event: Callback): TapGestureHandler; } -/*** if arkts 1.2 */ -/** - * Defines the TapGesture handler. - * - * @extends GestureHandler - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class TapGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { TapGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options?: TapGestureHandlerOptions); - /** - * Tap gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onAction(event: Callback): this; -} -/*** endif */ - /** * Defines the LongPressGestureHandler options. * @@ -4228,8 +3554,7 @@ export declare class TapGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { /** @@ -4240,8 +3565,7 @@ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fingers?: number; /** @@ -4252,8 +3576,7 @@ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ repeat?: boolean; /** @@ -4264,8 +3587,7 @@ interface LongPressGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ duration?: number; } @@ -4337,63 +3659,6 @@ declare class LongPressGestureHandler extends GestureHandler): LongPressGestureHandler; } -/*** if arkts 1.2 */ -/** - * Defines the LongPressGesture handler. - * - * @extends GestureHandler - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class LongPressGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { LongPressGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options?: LongPressGestureHandlerOptions); - /** - * LongPress gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onAction(event: Callback): this; - /** - * The LongPress gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - /** - * The LongPress gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; -} -/*** endif */ - /** * Defines the PanGestureHandler options. * @@ -4411,8 +3676,7 @@ export declare class LongPressGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface PanGestureHandlerOptions extends BaseHandlerOptions { /** @@ -4423,8 +3687,7 @@ interface PanGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fingers?: number; /** @@ -4435,8 +3698,7 @@ interface PanGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ direction?: PanDirection; /** @@ -4447,8 +3709,7 @@ interface PanGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ distance?: number; /** @@ -4466,92 +3727,13 @@ interface PanGestureHandlerOptions extends BaseHandlerOptions { /** * Defines the PanGesture handler. * - * @extends GestureHandler - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -declare class PanGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { PanGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - constructor(options?: PanGestureHandlerOptions); - /** - * Pan gesture recognition success callback. - * - * @param { Callback } event - * @returns { PanGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionStart(event: Callback): PanGestureHandler; - /** - * Callback when the Pan gesture is moving. - * - * @param { Callback } event - * @returns { PanGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionUpdate(event: Callback): PanGestureHandler; - /** - * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { PanGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionEnd(event: Callback): PanGestureHandler; - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { PanGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - onActionCancel(event: Callback): PanGestureHandler; - /** - * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * Add GestureEvent in cancel callback. - * - * @param { Callback } event - * @returns { PanGestureHandler } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onActionCancel(event: Callback): PanGestureHandler; -} - -/*** if arkts 1.2 */ -/** - * Defines the PanGesture handler. - * - * @extends GestureHandler + * @extends GestureHandler * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since 12 */ -export declare class PanGestureHandler extends GestureHandler { +declare class PanGestureHandler extends GestureHandler { /** * Constructor parameters. * @@ -4559,55 +3741,66 @@ export declare class PanGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since 12 */ constructor(options?: PanGestureHandlerOptions); /** * Pan gesture recognition success callback. * * @param { Callback } event - * @returns { this } + * @returns { PanGestureHandler } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since 12 */ - onActionStart(event: Callback): this; + onActionStart(event: Callback): PanGestureHandler; /** * Callback when the Pan gesture is moving. * * @param { Callback } event - * @returns { this } + * @returns { PanGestureHandler } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since 12 */ - onActionUpdate(event: Callback): this; + onActionUpdate(event: Callback): PanGestureHandler; /** * The Pan gesture is successfully recognized. When the finger is lifted, the callback is triggered. * * @param { Callback } event - * @returns { this } + * @returns { PanGestureHandler } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since 12 + */ + onActionEnd(event: Callback): PanGestureHandler; + /** + * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * + * @param { Callback } event + * @returns { PanGestureHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 */ - onActionEnd(event: Callback): this; + onActionCancel(event: Callback): PanGestureHandler; /** * The Pan gesture is successfully recognized and a callback is triggered when the touch cancel event is received. + * Add GestureEvent in cancel callback. * * @param { Callback } event - * @returns { this } + * @returns { PanGestureHandler } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since 18 */ - onActionCancel(event: Callback): this; + onActionCancel(event: Callback): PanGestureHandler; } -/*** endif */ /** * Defines the SwipeGestureHandler options. @@ -4626,8 +3819,7 @@ export declare class PanGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface SwipeGestureHandlerOptions extends BaseHandlerOptions { /** @@ -4638,8 +3830,7 @@ interface SwipeGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fingers?: number; /** @@ -4650,8 +3841,7 @@ interface SwipeGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ direction?: SwipeDirection; /** @@ -4662,8 +3852,7 @@ interface SwipeGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ speed?: number; } @@ -4701,41 +3890,6 @@ declare class SwipeGestureHandler extends GestureHandler { onAction(event: Callback): SwipeGestureHandler; } -/*** if arkts 1.2 */ -/** - * Defines the SwipeGesture handler. - * - * @extends GestureHandler - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class SwipeGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { SwipeGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options?: SwipeGestureHandlerOptions); - /** - * Swipe gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onAction(event: Callback): this; -} -/*** endif */ - /** * Defines the PinchGestureHandler options. * @@ -4753,8 +3907,7 @@ export declare class SwipeGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface PinchGestureHandlerOptions extends BaseHandlerOptions { /** @@ -4765,8 +3918,7 @@ interface PinchGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fingers?: number; /** @@ -4777,8 +3929,7 @@ interface PinchGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ distance?: number; } @@ -4861,74 +4012,6 @@ declare class PinchGestureHandler extends GestureHandler { onActionCancel(event: Callback): PinchGestureHandler; } -/*** if arkts 1.2 */ -/** - * Defines the PinchGesture handler. - * - * @extends GestureHandler - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class PinchGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { PinchGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options?: PinchGestureHandlerOptions); - /** - * Pinch gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionStart(event: Callback): this; - /** - * Callback when the Pinch gesture is moving. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionUpdate(event: Callback): this; - /** - * The Pinch gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - /** - * The Pinch gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; -} -/*** endif */ - /** * Defines the RotationGestureHandler options. * @@ -4946,8 +4029,7 @@ export declare class PinchGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ interface RotationGestureHandlerOptions extends BaseHandlerOptions { /** @@ -4958,8 +4040,7 @@ interface RotationGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fingers?: number; /** @@ -4970,8 +4051,7 @@ interface RotationGestureHandlerOptions extends BaseHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ angle?: number; } @@ -5054,74 +4134,6 @@ declare class RotationGestureHandler extends GestureHandler): RotationGestureHandler; } -/*** if arkts 1.2 */ -/** - * Defines the RotationGesture handler. - * - * @extends GestureHandler - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class RotationGestureHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { RotationGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options?: RotationGestureHandlerOptions); - /** - * Rotation gesture recognition success callback. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionStart(event: Callback): this; - /** - * Callback when the Rotation gesture is moving. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionUpdate(event: Callback): this; - /** - * The Rotation gesture is successfully recognized. When the finger is lifted, the callback is triggered. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionEnd(event: Callback): this; - /** - * The Rotation gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onActionCancel(event: Callback): this; -} -/*** endif */ - /** * Defines the GestureGroupGestureHandler options. * @@ -5129,8 +4141,7 @@ export declare class RotationGestureHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface GestureGroupGestureHandlerOptions { /** @@ -5140,8 +4151,7 @@ interface GestureGroupGestureHandlerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ mode: GestureMode; /** @@ -5154,17 +4164,6 @@ interface GestureGroupGestureHandlerOptions { * @since 12 */ gestures: GestureHandler[]; - /** - * Indicates the gestures included in the gesture group. - * - * @type { GestureHandler[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - gestures: GestureHandler[]; } /** @@ -5200,41 +4199,6 @@ declare class GestureGroupHandler extends GestureHandler { onCancel(event: Callback): GestureGroupHandler; } -/*** if arkts 1.2 */ -/** - * Defines the GestureGroup handler. - * - * @extends GestureHandler - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -export declare class GestureGroupHandler extends GestureHandler { - /** - * Constructor parameters. - * - * @param { GestureGroupGestureHandlerOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options?: GestureGroupGestureHandlerOptions); - /** - * The GestureGroup gesture is successfully recognized and a callback is triggered when the touch cancel event is received. - * - * @param { Callback } event - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - onCancel(event: Callback): this; -} -/*** endif */ - /** * Creating an Object * @@ -5242,8 +4206,7 @@ export declare class GestureGroupHandler extends GestureHandler { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum GesturePriority { /** @@ -5252,8 +4215,7 @@ declare enum GesturePriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NORMAL = 0, /** @@ -5262,8 +4224,7 @@ declare enum GesturePriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PRIORITY = 1, } @@ -5275,8 +4236,7 @@ declare enum GesturePriority { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum GestureRecognizerState { /** @@ -5285,8 +4245,7 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ READY = 0, /** @@ -5295,8 +4254,7 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ DETECTING = 1, /** @@ -5305,8 +4263,7 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PENDING = 2, /** @@ -5315,8 +4272,7 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ BLOCKED = 3, /** @@ -5325,8 +4281,7 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ SUCCESSFUL = 4, /** @@ -5335,8 +4290,7 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ FAILED = 5, } @@ -5348,8 +4302,7 @@ declare enum GestureRecognizerState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class ScrollableTargetInfo extends EventTargetInfo { /** @@ -5359,8 +4312,7 @@ declare class ScrollableTargetInfo extends EventTargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isBegin(): boolean; /** @@ -5370,8 +4322,7 @@ declare class ScrollableTargetInfo extends EventTargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isEnd(): boolean; } @@ -5382,8 +4333,7 @@ declare class ScrollableTargetInfo extends EventTargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class EventTargetInfo { /** @@ -5393,8 +4343,7 @@ declare class EventTargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getId(): string; } @@ -5435,8 +4384,7 @@ declare class TouchRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class GestureRecognizer { /** @@ -5446,8 +4394,7 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getTag(): string; /** @@ -5457,8 +4404,7 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getType(): GestureControl.GestureType; /** @@ -5468,8 +4414,7 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isBuiltIn(): boolean; /** @@ -5479,8 +4424,7 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setEnabled(isEnabled: boolean): void; /** @@ -5490,8 +4434,7 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isEnabled(): boolean; /** @@ -5501,8 +4444,7 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getState(): GestureRecognizerState; /** @@ -5512,8 +4454,7 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getEventTargetInfo(): EventTargetInfo; /** @@ -5522,8 +4463,7 @@ declare class GestureRecognizer { * @returns { boolean } - true is valid, false is invalid * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isValid(): boolean; /** @@ -5533,8 +4473,7 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ getFingerCount(): number; /** @@ -5544,8 +4483,7 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ isFingerCountLimit(): boolean; /** @@ -5572,8 +4510,7 @@ declare class GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare class TapRecognizer extends GestureRecognizer { /** @@ -5583,8 +4520,7 @@ declare class TapRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ getTapCount(): number; } @@ -5596,8 +4532,7 @@ declare class TapRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare class LongPressRecognizer extends GestureRecognizer { /** @@ -5607,8 +4542,7 @@ declare class LongPressRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ isRepeat(): boolean; /** @@ -5619,8 +4553,7 @@ declare class LongPressRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ getDuration(): number; } @@ -5632,8 +4565,7 @@ declare class LongPressRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare class SwipeRecognizer extends GestureRecognizer { /** @@ -5644,8 +4576,7 @@ declare class SwipeRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ getVelocityThreshold(): number; /** @@ -5655,8 +4586,7 @@ declare class SwipeRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ getDirection(): SwipeDirection; } @@ -5668,8 +4598,7 @@ declare class SwipeRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare class PinchRecognizer extends GestureRecognizer { /** @@ -5680,8 +4609,7 @@ declare class PinchRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ getDistance(): number; } @@ -5693,8 +4621,7 @@ declare class PinchRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare class RotationRecognizer extends GestureRecognizer { /** @@ -5704,8 +4631,7 @@ declare class RotationRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ getAngle(): number; } @@ -5717,8 +4643,7 @@ declare class RotationRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class PanRecognizer extends GestureRecognizer { /** @@ -5728,8 +4653,7 @@ declare class PanRecognizer extends GestureRecognizer { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getPanGestureOptions(): PanGestureOptions; /** diff --git a/api/@internal/component/ets/grid.d.ts b/api/@internal/component/ets/grid.d.ts index 32de925e32d970cceb7e497455fcbcb914ae4b4c..f1db72e35e550cb1aea4a5109c4710f18b5dac21 100644 --- a/api/@internal/component/ets/grid.d.ts +++ b/api/@internal/component/ets/grid.d.ts @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { EdgeEffectOptions, NestedScrollOptions, ItemDragInfo, ScrollableCommonMethod, Optional, CommonMethod, OnWillScrollCallback, OnScrollCallback, OnItemDragStartCallback } from './common'; -import { Length, Resource } from './units'; -import { Scroller, OnScrollFrameBeginCallback } from './scroll'; -import { ScrollState } from './list'; -import { BarState, Color, EdgeEffect } from './enums'; -/*** endif */ /** * The options to help grid layout @@ -41,8 +34,7 @@ import { BarState, Color, EdgeEffect } from './enums'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface GridLayoutOptions { /** @@ -60,8 +52,7 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ regularSize: [number, number]; @@ -82,8 +73,7 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ irregularIndexes?: number[]; @@ -104,8 +94,7 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onGetIrregularSizeByIndex?: (index: number) => [number, number] @@ -126,8 +115,7 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onGetRectByIndex?: (index: number) => [number, number, number, number] } @@ -154,8 +142,8 @@ declare interface GridLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface GridInterface { /** @@ -185,8 +173,7 @@ interface GridInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (scroller?: Scroller, layoutOptions?: GridLayoutOptions): GridAttribute; } @@ -213,8 +200,7 @@ interface GridInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum GridDirection { /** @@ -236,8 +222,7 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Row, @@ -260,8 +245,7 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Column, @@ -284,8 +268,7 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ RowReverse, @@ -308,8 +291,7 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ ColumnReverse, } @@ -321,8 +303,7 @@ declare enum GridDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum GridItemAlignment { @@ -332,8 +313,7 @@ declare enum GridItemAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ DEFAULT = 0, @@ -344,8 +324,7 @@ declare enum GridItemAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ STRETCH = 1, } @@ -365,8 +344,7 @@ declare enum GridItemAlignment { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface ComputedBarAttribute { /** @@ -384,8 +362,7 @@ declare interface ComputedBarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ totalOffset: number; @@ -404,8 +381,7 @@ declare interface ComputedBarAttribute { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ totalLength: number; } @@ -491,8 +467,8 @@ declare type OnGridScrollIndexCallback = (first: number, last: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class GridAttribute extends ScrollableCommonMethod { /** @@ -520,8 +496,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ columnsTemplate(value: string): GridAttribute; @@ -550,8 +525,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ rowsTemplate(value: string): GridAttribute; @@ -580,8 +554,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ columnsGap(value: Length): GridAttribute; @@ -610,8 +583,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ rowsGap(value: Length): GridAttribute; @@ -723,8 +695,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onScrollBarUpdate(event: (index: number, offset: number) => ComputedBarAttribute): GridAttribute; @@ -758,8 +729,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onScrollIndex(event: (first: number, last: number) => void): GridAttribute; @@ -788,8 +758,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ cachedCount(value: number): GridAttribute; @@ -801,8 +770,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ cachedCount(count: number, show: boolean): GridAttribute; @@ -831,8 +799,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ editMode(value: boolean): GridAttribute; @@ -861,8 +828,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ multiSelectable(value: boolean): GridAttribute; @@ -891,8 +857,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maxCount(value: number): GridAttribute; @@ -921,8 +886,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ minCount(value: number): GridAttribute; @@ -951,8 +915,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ cellLength(value: number): GridAttribute; @@ -981,8 +944,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ layoutDirection(value: GridDirection): GridAttribute; @@ -1011,8 +973,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ supportAnimation(value: boolean): GridAttribute; @@ -1048,19 +1009,6 @@ declare class GridAttribute extends ScrollableCommonMethod { */ onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => (() => any) | void): GridAttribute; - /** - * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. - * (To be triggered, press and hold for 170 milliseconds (ms)) - * - * @param { OnItemDragStartCallback } event - * @returns { GridAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onItemDragStart(event: OnItemDragStartCallback): GridAttribute; - /** * After binding, a callback is triggered when the component is dragged to the range of the component. * @@ -1086,8 +1034,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onItemDragEnter(event: (event: ItemDragInfo) => void): GridAttribute; @@ -1116,8 +1063,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): GridAttribute; @@ -1146,8 +1092,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): GridAttribute; @@ -1179,8 +1124,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onItemDrop( event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void, @@ -1278,8 +1222,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ alignItems(alignment: Optional): GridAttribute; @@ -1449,34 +1392,8 @@ declare class GridAttribute extends ScrollableCommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ onScrollFrameBegin(event: OnScrollFrameBeginCallback): GridAttribute; - - /** - * Called when the scrollable will scroll. - * - * @param { Optional } handler - callback of scrollable. - * @returns { GridAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onWillScroll(handler: Optional): GridAttribute; - - /** - * Called when the scrollable did scroll. - * - * @param { OnScrollCallback } handler - callback of scrollable, - * scrollOffset is offset this frame did scroll, scrollState is current scroll state. - * @returns { GridAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onDidScroll(handler: OnScrollCallback): GridAttribute; } /** @@ -1508,6 +1425,7 @@ declare class GridAttribute extends ScrollableCommonMethod { * @crossplatform * @atomicservice * @since 20 + * @noninterop */ declare const Grid: GridInterface; @@ -1531,5 +1449,6 @@ declare const Grid: GridInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const GridInstance: GridAttribute; diff --git a/api/@internal/component/ets/gridItem.d.ts b/api/@internal/component/ets/gridItem.d.ts index bfb75483273e5d351dd0ad6c171063c4dbac34e1..d3e7e1afa9a16d59f00439c73357704a39f921db 100644 --- a/api/@internal/component/ets/gridItem.d.ts +++ b/api/@internal/component/ets/gridItem.d.ts @@ -18,9 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod, Bindable } from './common' -/*** endif */ /** * Defines the grid item style. @@ -37,8 +34,7 @@ import { CommonMethod, Bindable } from './common' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum GridItemStyle { /** @@ -54,8 +50,7 @@ declare enum GridItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NONE = 0, @@ -72,8 +67,7 @@ declare enum GridItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PLAIN = 1, } @@ -93,8 +87,7 @@ declare enum GridItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface GridItemOptions { /** @@ -112,8 +105,7 @@ declare interface GridItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ style?: GridItemStyle; } @@ -140,8 +132,8 @@ declare interface GridItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface GridItemInterface { /** @@ -167,8 +159,7 @@ interface GridItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value?: GridItemOptions): GridItemAttribute; } @@ -189,8 +180,8 @@ interface GridItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class GridItemAttribute extends CommonMethod { /** @@ -218,8 +209,7 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ rowStart(value: number): GridItemAttribute; @@ -248,8 +238,7 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ rowEnd(value: number): GridItemAttribute; @@ -278,8 +267,7 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ columnStart(value: number): GridItemAttribute; @@ -308,8 +296,7 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ columnEnd(value: number): GridItemAttribute; @@ -349,8 +336,7 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectable(value: boolean): GridItemAttribute; @@ -377,20 +363,6 @@ declare class GridItemAttribute extends CommonMethod { */ selected(value: boolean): GridItemAttribute; - /** - * Called when judging whether it is selected. - * This parameter supports $$ for two-way binding of variables. - * - * @param { boolean | Bindable } value - * @returns { GridItemAttribute } the attribute of the gridItem. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - selected(value: boolean | Bindable): GridItemAttribute; - /** * Called when the gridItem is selected. * @@ -416,8 +388,7 @@ declare class GridItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onSelect(event: (isSelected: boolean) => void): GridItemAttribute; } @@ -442,6 +413,7 @@ declare class GridItemAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const GridItem: GridItemInterface @@ -465,5 +437,6 @@ declare const GridItem: GridItemInterface * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const GridItemInstance: GridItemAttribute; diff --git a/api/@internal/component/ets/grid_col.d.ts b/api/@internal/component/ets/grid_col.d.ts index 5889c45d0dd67c30636031d705265532ac774f33..1b8eecf3e3b18905dbcfa6de39fb3d5d4552051b 100644 --- a/api/@internal/component/ets/grid_col.d.ts +++ b/api/@internal/component/ets/grid_col.d.ts @@ -18,10 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod } from './common'; -/*** endif */ - /** * Defines the option in number unit of grid-container child component. * @@ -47,8 +43,7 @@ import { CommonMethod } from './common'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface GridColColumnOption { /** @@ -76,8 +71,7 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ xs?: number, @@ -106,8 +100,7 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ sm?: number, @@ -136,8 +129,7 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ md?: number, @@ -166,8 +158,7 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ lg?: number, @@ -196,8 +187,7 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ xl?: number, @@ -226,8 +216,7 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ xxl?: number, } @@ -257,8 +246,7 @@ declare interface GridColColumnOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface GridColOptions { /** @@ -286,8 +274,7 @@ declare interface GridColOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ span?: number | GridColColumnOption; @@ -316,8 +303,7 @@ declare interface GridColOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offset?: number | GridColColumnOption; @@ -346,8 +332,7 @@ declare interface GridColOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ order?: number | GridColColumnOption; } @@ -377,8 +362,8 @@ declare interface GridColOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface GridColInterface { /** @@ -409,8 +394,7 @@ interface GridColInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (option?: GridColOptions): GridColAttribute; } @@ -440,8 +424,8 @@ interface GridColInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class GridColAttribute extends CommonMethod { /** @@ -472,8 +456,7 @@ declare class GridColAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ span(value: number | GridColColumnOption): GridColAttribute; @@ -505,8 +488,7 @@ declare class GridColAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ gridColOffset(value: number | GridColColumnOption): GridColAttribute; @@ -538,8 +520,7 @@ declare class GridColAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ order(value: number | GridColColumnOption): GridColAttribute; } @@ -567,6 +548,7 @@ declare class GridColAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const GridCol: GridColInterface @@ -593,5 +575,6 @@ declare const GridCol: GridColInterface * @form * @atomicservice * @since 11 + * @noninterop */ declare const GridColInstance: GridColAttribute; diff --git a/api/@internal/component/ets/grid_container.d.ts b/api/@internal/component/ets/grid_container.d.ts index 8ad219f26beb7b6d566d6b2fc7678eea2a4ec40d..bb937453f81f2d78ac2c60fb00767a0b1e923049 100644 --- a/api/@internal/component/ets/grid_container.d.ts +++ b/api/@internal/component/ets/grid_container.d.ts @@ -133,6 +133,7 @@ declare interface GridContainerOptions { * @since 7 * @deprecated since 9 * @useinstead grid_col/GridColInterface and grid_row/GridRowInterface + * @noninterop */ interface GridContainerInterface { /** @@ -155,6 +156,7 @@ interface GridContainerInterface { * @since 7 * @deprecated since 9 * @useinstead grid_col/GridColAttribute and grid_row/GridRowAttribute + * @noninterop */ declare class GridContainerAttribute extends ColumnAttribute {} @@ -165,6 +167,7 @@ declare class GridContainerAttribute extends ColumnAttribute {} * @since 7 * @deprecated since 9 * @useinstead grid_col/GridColColumnOption and grid_row/GridRowColumnOption + * @noninterop */ declare const GridContainer: GridContainerInterface @@ -175,5 +178,6 @@ declare const GridContainer: GridContainerInterface * @since 7 * @deprecated since 9 * @useinstead grid_col/GridColAttribute and grid_row/GridRowAttribute + * @noninterop */ declare const GridContainerInstance: GridContainerAttribute; diff --git a/api/@internal/component/ets/grid_row.d.ts b/api/@internal/component/ets/grid_row.d.ts index a5ea02dc1072a3a5f2bb8f488f3e56806f6e395b..11cc3b3655240d42fc96fd152bf3b58505c78dbe 100644 --- a/api/@internal/component/ets/grid_row.d.ts +++ b/api/@internal/component/ets/grid_row.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ItemAlign } from './enums'; -import { CommonMethod } from './common'; -import { Length } from './units'; -/*** endif */ - /** * Defines the option in length unit of grid-row component. * @@ -49,8 +43,7 @@ import { Length } from './units'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface GridRowSizeOption { /** @@ -78,8 +71,7 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ xs?: Length, @@ -108,8 +100,7 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ sm?: Length, @@ -138,8 +129,7 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ md?: Length, @@ -168,8 +158,7 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ lg?: Length, @@ -198,8 +187,7 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ xl?: Length, @@ -228,8 +216,7 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ xxl?: Length, } @@ -259,8 +246,7 @@ declare interface GridRowSizeOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface GridRowColumnOption { /** @@ -288,8 +274,7 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ xs?: number, @@ -318,8 +303,7 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ sm?: number, @@ -348,8 +332,7 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ md?: number, @@ -378,8 +361,7 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ lg?: number, @@ -408,8 +390,7 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ xl?: number, @@ -438,8 +419,7 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ xxl?: number, } @@ -469,8 +449,7 @@ declare interface GridRowColumnOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface GutterOption { /** @@ -498,8 +477,7 @@ declare interface GutterOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ x?: Length | GridRowSizeOption, @@ -528,8 +506,7 @@ declare interface GutterOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ y?: Length | GridRowSizeOption } @@ -559,8 +536,7 @@ declare interface GutterOption { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum BreakpointsReference { /** @@ -585,8 +561,7 @@ declare enum BreakpointsReference { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ WindowSize, @@ -612,8 +587,7 @@ declare enum BreakpointsReference { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ ComponentSize, } @@ -643,8 +617,7 @@ declare enum BreakpointsReference { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum GridRowDirection { /** @@ -669,8 +642,7 @@ declare enum GridRowDirection { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Row, @@ -696,8 +668,7 @@ declare enum GridRowDirection { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ RowReverse, } @@ -727,8 +698,7 @@ declare enum GridRowDirection { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface BreakPoints { /** @@ -756,8 +726,7 @@ declare interface BreakPoints { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ value?: Array, @@ -786,8 +755,7 @@ declare interface BreakPoints { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ reference?: BreakpointsReference, } @@ -817,8 +785,7 @@ declare interface BreakPoints { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface GridRowOptions { /** @@ -846,8 +813,7 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ gutter?: Length | GutterOption; @@ -876,8 +842,7 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ columns?: number | GridRowColumnOption; @@ -906,8 +871,7 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ breakpoints?: BreakPoints; @@ -936,8 +900,7 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ direction?: GridRowDirection; } @@ -967,8 +930,8 @@ declare interface GridRowOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface GridRowInterface { /** @@ -999,8 +962,7 @@ interface GridRowInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (option?: GridRowOptions): GridRowAttribute; } @@ -1030,8 +992,8 @@ interface GridRowInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class GridRowAttribute extends CommonMethod { /** @@ -1062,8 +1024,7 @@ declare class GridRowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onBreakpointChange(callback: (breakpoints: string) => void): GridRowAttribute; @@ -1086,8 +1047,7 @@ declare class GridRowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ alignItems(value: ItemAlign): GridRowAttribute; } @@ -1115,6 +1075,7 @@ declare class GridRowAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const GridRow: GridRowInterface; @@ -1141,5 +1102,6 @@ declare const GridRow: GridRowInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const GridRowInstance: GridRowAttribute; diff --git a/api/@internal/component/ets/hyperlink.d.ts b/api/@internal/component/ets/hyperlink.d.ts index 19098e14e34b84d5f131d9cdf991a9a1e3f1d79d..0d68cbe6819d3392e95a895385654f57306bc149 100755 --- a/api/@internal/component/ets/hyperlink.d.ts +++ b/api/@internal/component/ets/hyperlink.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Resource } from './../../../api/global/resource' -import { CommonMethod } from './common' -import { Color } from './enums' -/*** endif */ - /** * Defines the hyperlink interface. * @@ -47,7 +41,7 @@ import { Color } from './enums' * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 + * @noninterop */ interface HyperlinkInterface { /** @@ -85,7 +79,6 @@ interface HyperlinkInterface { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ (address: string | Resource, content?: string | Resource): HyperlinkAttribute; } @@ -113,7 +106,7 @@ interface HyperlinkInterface { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 + * @noninterop */ declare class HyperlinkAttribute extends CommonMethod { /** @@ -142,7 +135,6 @@ declare class HyperlinkAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ color(value: Color | number | string | Resource): HyperlinkAttribute; } @@ -167,6 +159,7 @@ declare class HyperlinkAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 + * @noninterop */ declare const Hyperlink: HyperlinkInterface; @@ -190,5 +183,6 @@ declare const Hyperlink: HyperlinkInterface; * @crossplatform * @atomicservice * @since 20 + * @noninterop */ declare const HyperlinkInterface: HyperlinkAttribute; diff --git a/api/@internal/component/ets/image.d.ts b/api/@internal/component/ets/image.d.ts index 9a930bd96e3702f2fbb3a4c8f0a9749fa00260ca..24d63a95eb98710398ce2f383cef75bb86a28225 100644 --- a/api/@internal/component/ets/image.d.ts +++ b/api/@internal/component/ets/image.d.ts @@ -728,6 +728,7 @@ export interface ImageCompleteEvent { * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ interface ImageInterface { /** @@ -959,6 +960,7 @@ declare class ColorContent { * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ declare class ImageAttribute extends CommonMethod { /** @@ -2302,6 +2304,7 @@ declare class ImageAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Image: ImageInterface; @@ -2334,6 +2337,7 @@ declare const Image: ImageInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const ImageInstance: ImageAttribute; diff --git a/api/@internal/component/ets/image_animator.d.ts b/api/@internal/component/ets/image_animator.d.ts index 32f8826119dc8227a7be868565bc32aaf8f0d615..85829650f83a8f38dd76547f563ea1c325bb5649 100644 --- a/api/@internal/component/ets/image_animator.d.ts +++ b/api/@internal/component/ets/image_animator.d.ts @@ -18,13 +18,6 @@ * @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. * @@ -49,746 +42,723 @@ import { AnimationStatus,FillMode } from './enums' * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface ImageAnimatorInterface { - /** - * ImageAnimator is returned. - * - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * ImageAnimator is returned. - * - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * ImageAnimator is returned. - * - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - (): ImageAnimatorAttribute; -} - -/** - * Defines the ImageFrameInfo Interface. - * - * @interface ImageFrameInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines the ImageFrameInfo Interface. - * - * @interface ImageFrameInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines the ImageFrameInfo Interface. - * - * @interface ImageFrameInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ -interface ImageFrameInfo { - /** - * Image path - * - * @type { string } + interface ImageAnimatorInterface { + /** + * ImageAnimator is returned. + * + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * ImageAnimator is returned. + * + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * ImageAnimator is returned. + * + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + (): ImageAnimatorAttribute; + } + + /** + * Defines the ImageFrameInfo Interface. + * + * @interface ImageFrameInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Image path - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Image path + * Defines the ImageFrameInfo Interface. * - * @type { string | Resource } + * @interface ImageFrameInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Image path + * Defines the ImageFrameInfo Interface. * - * @type { string | Resource } + * @interface ImageFrameInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - /** - * Image path - * - * @type { string | Resource | PixelMap } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - src: string | Resource | PixelMap; - /** - * Image width - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Image width - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Image width - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - width?: number | string; - /** - * Image height - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Image height - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Image height - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - height?: number | string; - /** - * Vertical coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Vertical coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Vertical coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - top?: number | string; - /** - * Horizontal coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Horizontal coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Horizontal coordinate of the image relative to the upper left corner of the component - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - left?: number | string; - /** - * Playback duration of this image frame, in milliseconds. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Playback duration of this image frame, in milliseconds. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Playback duration of this image frame, in milliseconds. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - duration?: number; -} - -/** - * inheritance CommonMethod - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * inheritance CommonMethod - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * inheritance CommonMethod - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class ImageAnimatorAttribute extends CommonMethod { - /** - * list images - * - * @param { Array } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * list images - * - * @param { Array } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the image frame information. - * - *

NOTE: - *
Dynamic update is not supported. - *

- * - * @param { Array } value - Image frame informatio, Default value is []. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - images(value: Array): ImageAnimatorAttribute; - - /** - * The default value is the initial state, which is used to control the playback status. - * - * @param { AnimationStatus } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The default value is the initial state, which is used to control the playback status. - * - * @param { AnimationStatus } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the playback state of the animation. - * - * @param { AnimationStatus } value - Playback state of the animation, Default value is AnimationStatus.Initial. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - state(value: AnimationStatus): ImageAnimatorAttribute; - - /** - * The unit is millisecond. - * - * @param { number } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The unit is millisecond. - * - * @param { number } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the playback duration. - * The unit is millisecond. - * - *

NOTE: - *
This attribute does not take effect when a separate duration is set for any of the image frames. - *

- * - * @param { number } value - Playback duration, Default value is 1000. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - duration(value: number): ImageAnimatorAttribute; - - /** - * Set the playback sequence. - * - * @param { boolean } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the playback sequence. - * - * @param { boolean } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the playback direction. - * - * @param { boolean } value - Playback direction, Default value is false. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - reverse(value: boolean): ImageAnimatorAttribute; - - /** - * Sets whether the image size is fixed to the component size. - * - * @param { boolean } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets whether the image size is fixed to the component size. - * - * @param { boolean } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets whether the image size is fixed at the component size. - * - * @param { boolean } value - Whether the image size is fixed at the component size, Default value is true. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fixedSize(value: boolean): ImageAnimatorAttribute; - - /** - * Sets the number of images to be pre-decoded. - * - * @param { number } value - Number of images to be pre-decoded, Default value is 0. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 9 - */ - preDecode(value: number): ImageAnimatorAttribute; - - /** - * Sets the state before and after the animation starts - * - * @param { FillMode } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the state before and after the animation starts - * - * @param { FillMode } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the status before and after execution of the animation in the current playback direction. - * - * @param { FillMode } value - Status before and after execution of the animation in the current playback direction, - * Default value is FillMode.Forwards. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fillMode(value: FillMode): ImageAnimatorAttribute; - - /** - * Played once by default - * - * @param { number } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Played once by default - * - * @param { number } value - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the number of times that the animation is played. - * Played once by default - * - * @param { number } value - Number of times that the animation is played, Default value is 1. - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - iterations(value: number): ImageAnimatorAttribute; - - /** - * Sets whether the component should automatically pause or resume based on its visibility, using the system's - * onVisibleAreaChange event. - * - * @param { boolean } monitorInvisibleArea - Whether the component should automatically pause or resume based on - * its visibility, using the system's onVisibleAreaChange event, Default value is false. - * @returns { ImageAnimatorAttribute } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'17','1.2':'20'} - * @arkts 1.1&1.2 - */ - monitorInvisibleArea(monitorInvisibleArea: boolean) : ImageAnimatorAttribute; - - /** - * Status callback, which is triggered when the animation starts to play. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } + interface ImageFrameInfo { + /** + * Image path + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Image path + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 9 + */ + /** + * Image path + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Image path + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Image path + * + * @type { string | Resource | PixelMap } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + src: string | Resource | PixelMap; + /** + * Image width + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Image width + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Image width + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + width?: number | string; + /** + * Image height + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Image height + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Image height + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + height?: number | string; + /** + * Vertical coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Vertical coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Vertical coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + top?: number | string; + /** + * Horizontal coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Horizontal coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Horizontal coordinate of the image relative to the upper left corner of the component + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + left?: number | string; + /** + * Playback duration of this image frame, in milliseconds. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Playback duration of this image frame, in milliseconds. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Playback duration of this image frame, in milliseconds. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + duration?: number; + } + + /** + * inheritance CommonMethod + * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Status callback, which is triggered when the animation starts to play. + * inheritance CommonMethod * - * @param { function } event - * @returns { ImageAnimatorAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Status callback, which is triggered when the animation starts to play. + * inheritance CommonMethod * - * @param { function } event - * @returns { ImageAnimatorAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - onStart(event: () => void): ImageAnimatorAttribute; - - /** - * Status callback, which is triggered when the animation pauses. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Status callback, which is triggered when the animation pauses. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Status callback, which is triggered when the animation pauses. - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - onPause(event: () => void): ImageAnimatorAttribute; - - /** - * Status callback, triggered when the animation is replayed - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Status callback, triggered when the animation is replayed - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Status callback, triggered when the animation is replayed - * - * @param { function } event - * @returns { ImageAnimatorAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - onRepeat(event: () => void): ImageAnimatorAttribute; - - /** - * Status callback, which is triggered when the animation is canceled. + declare class ImageAnimatorAttribute extends CommonMethod { + /** + * list images + * + * @param { Array } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * list images + * + * @param { Array } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the image frame information. + * + *

NOTE: + *
Dynamic update is not supported. + *

+ * + * @param { Array } value - Image frame informatio, Default value is []. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + images(value: Array): ImageAnimatorAttribute; + + /** + * The default value is the initial state, which is used to control the playback status. + * + * @param { AnimationStatus } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The default value is the initial state, which is used to control the playback status. + * + * @param { AnimationStatus } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the playback state of the animation. + * + * @param { AnimationStatus } value - Playback state of the animation, Default value is AnimationStatus.Initial. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + state(value: AnimationStatus): ImageAnimatorAttribute; + + /** + * The unit is millisecond. + * + * @param { number } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * The unit is millisecond. + * + * @param { number } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the playback duration. + * The unit is millisecond. + * + *

NOTE: + *
This attribute does not take effect when a separate duration is set for any of the image frames. + *

+ * + * @param { number } value - Playback duration, Default value is 1000. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + duration(value: number): ImageAnimatorAttribute; + + /** + * Set the playback sequence. + * + * @param { boolean } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Set the playback sequence. + * + * @param { boolean } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the playback direction. + * + * @param { boolean } value - Playback direction, Default value is false. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + reverse(value: boolean): ImageAnimatorAttribute; + + /** + * Sets whether the image size is fixed to the component size. + * + * @param { boolean } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets whether the image size is fixed to the component size. + * + * @param { boolean } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets whether the image size is fixed at the component size. + * + * @param { boolean } value - Whether the image size is fixed at the component size, Default value is true. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fixedSize(value: boolean): ImageAnimatorAttribute; + + /** + * Sets the number of images to be pre-decoded. + * + * @param { number } value - Number of images to be pre-decoded, Default value is 0. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + * @deprecated since 9 + */ + preDecode(value: number): ImageAnimatorAttribute; + + /** + * Sets the state before and after the animation starts + * + * @param { FillMode } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the state before and after the animation starts + * + * @param { FillMode } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the status before and after execution of the animation in the current playback direction. + * + * @param { FillMode } value - Status before and after execution of the animation in the current playback direction, + * Default value is FillMode.Forwards. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fillMode(value: FillMode): ImageAnimatorAttribute; + + /** + * Played once by default + * + * @param { number } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Played once by default + * + * @param { number } value + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the number of times that the animation is played. + * Played once by default + * + * @param { number } value - Number of times that the animation is played, Default value is 1. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + iterations(value: number): ImageAnimatorAttribute; + + /** + * Sets whether the component should automatically pause or resume based on its visibility, using the system's + * onVisibleAreaChange event. + * + * @param { boolean } monitorInvisibleArea - Whether the component should automatically pause or resume based on + * its visibility, using the system's onVisibleAreaChange event, Default value is false. + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 17 + */ + monitorInvisibleArea(monitorInvisibleArea: boolean) : ImageAnimatorAttribute; + + /** + * Status callback, which is triggered when the animation starts to play. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, which is triggered when the animation starts to play. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Status callback, which is triggered when the animation starts to play. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + onStart(event: () => void): ImageAnimatorAttribute; + + /** + * Status callback, which is triggered when the animation pauses. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, which is triggered when the animation pauses. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Status callback, which is triggered when the animation pauses. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + onPause(event: () => void): ImageAnimatorAttribute; + + /** + * Status callback, triggered when the animation is replayed + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, triggered when the animation is replayed + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Status callback, triggered when the animation is replayed + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onRepeat(event: () => void): ImageAnimatorAttribute; + + /** + * Status callback, which is triggered when the animation is canceled. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, which is triggered when the animation is canceled. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Status callback, which is triggered when the animation playback returns to the initial state. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + onCancel(event: () => void): ImageAnimatorAttribute; + + /** + * Status callback, which is triggered when the animation playback is complete. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Status callback, which is triggered when the animation playback is complete. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Status callback, which is triggered when the animation playback is complete or stopped. + * + * @param { function } event + * @returns { ImageAnimatorAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + onFinish(event: () => void): ImageAnimatorAttribute; + } + + /** + * Defines ImageAnimator Component. * - * @param { function } event - * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Status callback, which is triggered when the animation is canceled. + * Defines ImageAnimator Component. * - * @param { function } event - * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Status callback, which is triggered when the animation playback returns to the initial state. + * Defines ImageAnimator Component. * - * @param { function } event - * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - onCancel(event: () => void): ImageAnimatorAttribute; - + declare const ImageAnimator: ImageAnimatorInterface; + /** - * Status callback, which is triggered when the animation playback is complete. + * Defines ImageAnimator Component instance. * - * @param { function } event - * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Status callback, which is triggered when the animation playback is complete. + * Defines ImageAnimator Component instance. * - * @param { function } event - * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Status callback, which is triggered when the animation playback is complete or stopped. + * Defines ImageAnimator Component instance. * - * @param { function } event - * @returns { ImageAnimatorAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - onFinish(event: () => void): ImageAnimatorAttribute; -} - -/** - * Defines ImageAnimator Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines ImageAnimator Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines ImageAnimator Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare const ImageAnimator: ImageAnimatorInterface; - -/** - * Defines ImageAnimator Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines ImageAnimator Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines ImageAnimator Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare const ImageAnimatorInstance: ImageAnimatorAttribute; + declare const ImageAnimatorInstance: ImageAnimatorAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/image_common.d.ts b/api/@internal/component/ets/image_common.d.ts index 7415991b1a970aabdba46f343a33f201a59f309c..24962e1329561a009cb806c3940915d4890ad86c 100644 --- a/api/@internal/component/ets/image_common.d.ts +++ b/api/@internal/component/ets/image_common.d.ts @@ -24,8 +24,7 @@ * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum ImageAnalyzerType { /** @@ -33,8 +32,7 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ SUBJECT = 0, @@ -43,8 +41,7 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ TEXT, @@ -53,8 +50,7 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ OBJECT_LOOKUP, } @@ -64,8 +60,7 @@ declare enum ImageAnalyzerType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class ImageAnalyzerController { /** @@ -73,19 +68,17 @@ declare class ImageAnalyzerController { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(); - + /** * Get image analyzer support types. * * @returns { ImageAnalyzerType[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getImageAnalyzerSupportTypes(): ImageAnalyzerType[]; } @@ -96,8 +89,7 @@ declare class ImageAnalyzerController { * @interface ImageAnalyzerConfig * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface ImageAnalyzerConfig { /** @@ -106,8 +98,7 @@ declare interface ImageAnalyzerConfig { * @type { ImageAnalyzerType[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ types: ImageAnalyzerType[]; } @@ -118,8 +109,7 @@ declare interface ImageAnalyzerConfig { * @interface ImageAIOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface ImageAIOptions { /** @@ -128,8 +118,7 @@ declare interface ImageAIOptions { * @type { ?ImageAnalyzerType[] } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ types?: ImageAnalyzerType[]; @@ -139,8 +128,7 @@ declare interface ImageAIOptions { * @type { ?ImageAnalyzerController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ aiController?: ImageAnalyzerController; -} \ No newline at end of file +} diff --git a/api/@internal/component/ets/image_span.d.ts b/api/@internal/component/ets/image_span.d.ts index 5c5ec30316e1ae505ccd0d9d429b289666f6c77c..79b0af53945c0f1caa1c6ab183a031fa646c016b 100644 --- a/api/@internal/component/ets/image_span.d.ts +++ b/api/@internal/component/ets/image_span.d.ts @@ -18,15 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ResourceStr, ColorFilter} from './units'; -import { BaseSpan } from './span'; -import { ImageSpanAlignment, ImageFit } from './enums'; -import { ImageErrorCallback, DrawingColorFilter } from './image'; -import { PixelMap } from './common'; -import image from '../../@ohos.multimedia.image'; -/*** endif */ - /** * Provide image decoration in the text component. * @@ -42,8 +33,8 @@ import image from '../../@ohos.multimedia.image'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface ImageSpanInterface { /** @@ -63,8 +54,7 @@ interface ImageSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value: ResourceStr | PixelMap): ImageSpanAttribute; } @@ -84,8 +74,8 @@ interface ImageSpanInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class ImageSpanAttribute extends BaseSpan { /** @@ -105,8 +95,7 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ verticalAlign(value: ImageSpanAlignment): ImageSpanAttribute; @@ -118,8 +107,7 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ colorFilter(filter: ColorFilter | DrawingColorFilter): ImageSpanAttribute; @@ -140,8 +128,7 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ objectFit(value: ImageFit): ImageSpanAttribute; @@ -154,8 +141,7 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onComplete(callback: ImageCompleteCallback): ImageSpanAttribute; @@ -168,8 +154,7 @@ declare class ImageSpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onError(callback: ImageErrorCallback): ImageSpanAttribute; @@ -180,8 +165,7 @@ declare class ImageSpanAttribute extends BaseSpan { * @returns { ImageSpanAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ alt(value: PixelMap): ImageSpanAttribute; } @@ -200,6 +184,7 @@ declare class ImageSpanAttribute extends BaseSpan { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const ImageSpan: ImageSpanInterface; @@ -217,6 +202,7 @@ declare const ImageSpan: ImageSpanInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const ImageSpanInstance: ImageSpanAttribute; @@ -228,8 +214,7 @@ declare const ImageSpanInstance: ImageSpanAttribute; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ type ImageCompleteCallback = (result: ImageLoadResult) => void; @@ -240,8 +225,7 @@ type ImageCompleteCallback = (result: ImageLoadResult) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface ImageLoadResult { /** @@ -251,8 +235,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ width: number; /** @@ -262,8 +245,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ height: number; /** @@ -273,8 +255,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ componentWidth: number; /** @@ -284,8 +265,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ componentHeight: number; /** @@ -297,8 +277,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ loadingStatus: number; /** @@ -308,8 +287,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentWidth: number; /** @@ -319,8 +297,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentHeight: number; /** @@ -330,8 +307,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentOffsetX: number; /** @@ -341,8 +317,7 @@ declare interface ImageLoadResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentOffsetY: number; } diff --git a/api/@internal/component/ets/indicatorcomponent.d.ts b/api/@internal/component/ets/indicatorcomponent.d.ts index fea813bcc067cc81fec075831ffdb0b7a5f51430..c8bce3374b74a44c11962df144bce2434be37e66 100644 --- a/api/@internal/component/ets/indicatorcomponent.d.ts +++ b/api/@internal/component/ets/indicatorcomponent.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod, Callback } from './common'; -import { DotIndicator, DigitIndicator } from './swiper'; -/*** endif */ - /** * Provides methods for switching components. * @@ -30,8 +25,7 @@ import { DotIndicator, DigitIndicator } from './swiper'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ declare class IndicatorComponentController { /** @@ -41,8 +35,7 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ constructor(); @@ -53,8 +46,7 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ showNext():void; @@ -65,8 +57,7 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ showPrevious():void; @@ -80,8 +71,7 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ changeIndex(index: number, useAnimation?: boolean):void; } @@ -94,8 +84,8 @@ declare class IndicatorComponentController { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 + * @noninterop */ interface IndicatorComponentInterface { @@ -108,8 +98,7 @@ interface IndicatorComponentInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ (controller?: IndicatorComponentController): IndicatorComponentAttribute; } @@ -122,8 +111,8 @@ interface IndicatorComponentInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 + * @noninterop */ declare class IndicatorComponentAttribute extends CommonMethod { /** @@ -135,8 +124,7 @@ declare class IndicatorComponentAttribute extends CommonMethod): IndicatorComponentAttribute; } @@ -219,6 +202,7 @@ declare class IndicatorComponentAttribute extends CommonMethod void): void; @@ -71,9 +69,8 @@ declare namespace Profiler { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'8','1.2':'20'} + * @since 8 * @test - * @arkts 1.1&1.2 */ function unregisterVsyncCallback(): void; } @@ -84,8 +81,7 @@ declare namespace Profiler { * @param { string } value * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'8','1.2':'20'} + * @since 8 * @test - * @arkts 1.1&1.2 */ declare function setAppBgColor(value: string): void; diff --git a/api/@internal/component/ets/isolated_component.d.ts b/api/@internal/component/ets/isolated_component.d.ts index b32ad143ddfeba0ed3f12a18c08b9e47d7ca1898..730bf5b0ea87688a2dc84bcba2970e5cfdebf17f 100644 --- a/api/@internal/component/ets/isolated_component.d.ts +++ b/api/@internal/component/ets/isolated_component.d.ts @@ -84,6 +84,7 @@ declare interface IsolatedOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 12 + * @noninterop */ declare type IsolatedComponentInterface = (options: IsolatedOptions) => IsolatedComponentAttribute; @@ -94,6 +95,7 @@ declare type IsolatedComponentInterface = (options: IsolatedOptions) => Isolated * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 12 + * @noninterop */ declare class IsolatedComponentAttribute extends CommonMethod { /** @@ -115,6 +117,7 @@ declare class IsolatedComponentAttribute extends CommonMethod { } @@ -841,6 +842,7 @@ declare class LazyForEachAttribute extends DynamicNode { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ interface LazyForEachInterface { /** @@ -915,5 +917,6 @@ interface LazyForEachInterface { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const LazyForEach: LazyForEachInterface; diff --git a/api/@internal/component/ets/lazy_grid_layout.d.ts b/api/@internal/component/ets/lazy_grid_layout.d.ts index cd82bcfe985e82672e10aa8c64b7620ed11b7009..fbd3c22c74e993501a02852f1e066de57f395f22 100644 --- a/api/@internal/component/ets/lazy_grid_layout.d.ts +++ b/api/@internal/component/ets/lazy_grid_layout.d.ts @@ -19,10 +19,6 @@ */ -/*** if arkts 1.2 */ -import { CommonMethod } from './common'; -import { LengthMetrics } from '../Graphics'; -/*** endif */ /** * Defines the lazy vertical grid layout component. @@ -31,8 +27,8 @@ import { LengthMetrics } from '../Graphics'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 + * @noninterop */ interface LazyVGridLayoutInterface { /** @@ -42,8 +38,7 @@ interface LazyVGridLayoutInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ (): LazyVGridLayoutAttribute; } @@ -55,8 +50,8 @@ interface LazyVGridLayoutInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 + * @noninterop */ declare class LazyGridLayoutAttribute extends CommonMethod { /** @@ -67,8 +62,7 @@ declare class LazyGridLayoutAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ rowsGap(value: LengthMetrics): T; @@ -80,8 +74,7 @@ declare class LazyGridLayoutAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ columnsGap(value: LengthMetrics): T; } @@ -93,8 +86,8 @@ declare class LazyGridLayoutAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 + * @noninterop */ declare class LazyVGridLayoutAttribute extends LazyGridLayoutAttribute { /** @@ -105,8 +98,7 @@ declare class LazyVGridLayoutAttribute extends LazyGridLayoutAttribute { /** @@ -395,20 +377,6 @@ declare class LineAttribute extends CommonShapeMethod { */ startPoint(value: Array): LineAttribute; - /** - * Coordinate of the start point of the line (relative coordinate). - * - * @param { ShapePoint } value - * @returns { LineAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - startPoint(value: ShapePoint): LineAttribute; - /** * Line end coordinates (relative coordinates). * @@ -448,20 +416,6 @@ declare class LineAttribute extends CommonShapeMethod { * @since 11 */ endPoint(value: Array): LineAttribute; - - /** - * Line end coordinates (relative coordinates). - * - * @param { ShapePoint } value - * @returns { LineAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - endPoint(value: ShapePoint): LineAttribute; } /** @@ -493,6 +447,7 @@ declare class LineAttribute extends CommonShapeMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Line: LineInterface; @@ -525,32 +480,6 @@ declare const Line: LineInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const LineInstance: LineAttribute; - -/** - * Line drawing component. - * - * @interface LineInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface LineInterface { - /** - * The return value of the parameter is Line. - * - * @param { LineOptions } [options] - Line options - * @returns { LineAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (options?: LineOptions): LineAttribute; -} diff --git a/api/@internal/component/ets/linearindicator.d.ts b/api/@internal/component/ets/linearindicator.d.ts index 3b548b466ad7aebae21832188fbfcc8f5b5b2360..2c479303d7fa5d81f87e154a515b66e5683ccf97 100644 --- a/api/@internal/component/ets/linearindicator.d.ts +++ b/api/@internal/component/ets/linearindicator.d.ts @@ -221,6 +221,7 @@ declare interface LinearIndicatorStyle { * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ interface LinearIndicatorInterface { /** @@ -248,6 +249,7 @@ interface LinearIndicatorInterface { * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ declare class LinearIndicatorAttribute extends CommonMethod { /** @@ -311,6 +313,7 @@ declare type OnLinearIndicatorChangeCallback = (index: number, progress: number) * @crossplatform * @atomicservice * @since 18 + * @noninterop */ declare const LinearIndicator: LinearIndicatorInterface; @@ -321,5 +324,6 @@ declare const LinearIndicator: LinearIndicatorInterface; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ declare const LinearIndicatorInstance: LinearIndicatorAttribute diff --git a/api/@internal/component/ets/list.d.ts b/api/@internal/component/ets/list.d.ts index caf96d1ff6ff1ab7f88cd867e4e461f26d4e27c3..978153f4103d8234f8ea094c44aed01f0b5b6193 100644 --- a/api/@internal/component/ets/list.d.ts +++ b/api/@internal/component/ets/list.d.ts @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ChildrenMainSize, ItemDragInfo, RectResult, ScrollableCommonMethod, Optional, - OnWillScrollCallback, OnScrollCallback, OnItemDragStartCallback } from './common'; -import { Axis } from './enums'; -import { OnScrollFrameBeginCallback, ScrollAlign, Scroller } from './scroll'; -import { Dimension, Length, LengthConstrain, ResourceColor } from './units'; -/*** endif */ /** * Declare scroll status @@ -58,8 +51,7 @@ import { Dimension, Length, LengthConstrain, ResourceColor } from './units'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ScrollState { /** @@ -91,8 +83,7 @@ declare enum ScrollState { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Idle, @@ -125,8 +116,7 @@ declare enum ScrollState { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Scroll, @@ -158,8 +148,7 @@ declare enum ScrollState { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Fling, } @@ -189,8 +178,7 @@ declare enum ScrollState { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ListItemAlign { /** @@ -215,8 +203,7 @@ declare enum ListItemAlign { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Start, @@ -242,8 +229,7 @@ declare enum ListItemAlign { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Center, @@ -269,8 +255,7 @@ declare enum ListItemAlign { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ End, } @@ -282,8 +267,7 @@ declare enum ListItemAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum ListItemGroupArea { /** @@ -292,8 +276,7 @@ declare enum ListItemGroupArea { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NONE = 0, @@ -303,8 +286,7 @@ declare enum ListItemGroupArea { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ IN_LIST_ITEM_AREA = 1, @@ -314,8 +296,7 @@ declare enum ListItemGroupArea { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ IN_HEADER_AREA = 2, @@ -325,8 +306,7 @@ declare enum ListItemGroupArea { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ IN_FOOTER_AREA = 3, } @@ -356,8 +336,7 @@ declare enum ListItemGroupArea { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum StickyStyle { /** @@ -383,8 +362,7 @@ declare enum StickyStyle { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ None = 0, @@ -411,8 +389,7 @@ declare enum StickyStyle { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Header = 1, @@ -439,8 +416,7 @@ declare enum StickyStyle { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Footer = 2, } @@ -451,8 +427,7 @@ declare enum StickyStyle { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ declare enum ChainEdgeEffect { /** @@ -461,8 +436,7 @@ declare enum ChainEdgeEffect { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ DEFAULT, @@ -471,8 +445,7 @@ declare enum ChainEdgeEffect { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ STRETCH, } @@ -491,8 +464,7 @@ declare enum ChainEdgeEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ScrollSnapAlign { /** @@ -508,8 +480,7 @@ declare enum ScrollSnapAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ NONE = 0, @@ -530,8 +501,7 @@ declare enum ScrollSnapAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ START = 1, @@ -552,8 +522,7 @@ declare enum ScrollSnapAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ CENTER = 2, @@ -574,8 +543,7 @@ declare enum ScrollSnapAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ END = 3, } @@ -586,8 +554,7 @@ declare enum ScrollSnapAlign { * @interface ChainAnimationOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ declare interface ChainAnimationOptions { /** @@ -596,8 +563,7 @@ declare interface ChainAnimationOptions { * @type { Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ minSpace: Length; @@ -607,8 +573,7 @@ declare interface ChainAnimationOptions { * @type { Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ maxSpace: Length; @@ -619,8 +584,7 @@ declare interface ChainAnimationOptions { * @default 0.7 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ conductivity?: number; @@ -631,8 +595,7 @@ declare interface ChainAnimationOptions { * @default 0.3 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ intensity?: number; @@ -643,8 +606,7 @@ declare interface ChainAnimationOptions { * @default ChainEdgeEffect.DEFAULT * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ edgeEffect?: ChainEdgeEffect; @@ -655,8 +617,7 @@ declare interface ChainAnimationOptions { * @default 228 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ stiffness?: number; @@ -667,8 +628,7 @@ declare interface ChainAnimationOptions { * @default 30 * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ damping?: number; } @@ -746,8 +706,7 @@ declare interface UIListEvent extends UIScrollableCommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface CloseSwipeActionOptions { /** @@ -765,8 +724,7 @@ declare interface CloseSwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onFinish?: ()=>void } @@ -778,8 +736,7 @@ declare interface CloseSwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface VisibleListContentInfo { /** @@ -789,8 +746,7 @@ declare interface VisibleListContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ index: number @@ -802,8 +758,7 @@ declare interface VisibleListContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ itemGroupArea?: ListItemGroupArea @@ -815,8 +770,7 @@ declare interface VisibleListContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ itemIndexInGroup?: number } @@ -830,8 +784,7 @@ declare interface VisibleListContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type OnScrollVisibleContentChangeCallback = (start: VisibleListContentInfo, end: VisibleListContentInfo) => void; @@ -861,8 +814,7 @@ declare type OnListScrollIndexCallback = (start: number, end: number, center: nu * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class ListScroller extends Scroller { /** @@ -904,8 +856,7 @@ declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getItemRectInGroup(index: number, indexInGroup: number): RectResult; @@ -947,8 +898,7 @@ declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ scrollToItemInGroup(index: number, indexInGroup:number, smooth?: boolean, align?: ScrollAlign): void; @@ -981,8 +931,7 @@ declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ closeAllSwipeActions(options?: CloseSwipeActionOptions): void; @@ -1006,8 +955,7 @@ declare class ListScroller extends Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ getVisibleListContentInfo(x: number, y: number): VisibleListContentInfo; } @@ -1024,8 +972,7 @@ declare class ListScroller extends Scroller { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface ListOptions { /** @@ -1077,8 +1024,7 @@ interface ListOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ initialIndex?: number; /** @@ -1131,8 +1077,7 @@ interface ListOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ space?: number | string; /** @@ -1182,8 +1127,7 @@ interface ListOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ scroller?: Scroller; } @@ -1220,8 +1164,8 @@ interface ListOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface ListInterface { /** @@ -1272,8 +1216,7 @@ interface ListInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options?: ListOptions): ListAttribute; } @@ -1286,8 +1229,7 @@ interface ListInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface ListDividerOptions { /** @@ -1333,8 +1275,7 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ strokeWidth: Length; /** @@ -1381,8 +1322,7 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ color?: ResourceColor; /** @@ -1429,8 +1369,7 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ startMargin?: Length; /** @@ -1477,8 +1416,7 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ endMargin?: Length; } @@ -1507,8 +1445,8 @@ declare interface ListDividerOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class ListAttribute extends ScrollableCommonMethod { /** @@ -1542,8 +1480,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ lanes(value: number | LengthConstrain, gutter?: Dimension): ListAttribute; @@ -1576,8 +1513,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ alignListItem(value: ListItemAlign): ListAttribute; @@ -1617,8 +1553,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ listDirection(value: Axis): ListAttribute; @@ -1730,8 +1665,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentStartOffset(value: number): ListAttribute; @@ -1752,8 +1686,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentEndOffset(value: number): ListAttribute; @@ -1805,8 +1738,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ divider( value: ListDividerOptions | null, @@ -1861,8 +1793,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ multiSelectable(value: boolean): ListAttribute; @@ -1904,8 +1835,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ cachedCount(value: number): ListAttribute; @@ -1921,8 +1851,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ cachedCount(count: number, show: boolean): ListAttribute; @@ -1965,8 +1894,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ chainAnimation(value: boolean): ListAttribute; @@ -1977,8 +1905,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @returns { ListAttribute } the attribute of the list. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ chainAnimationOptions(value: ChainAnimationOptions): ListAttribute; @@ -2016,8 +1943,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ sticky(value: StickyStyle): ListAttribute; @@ -2038,8 +1964,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scrollSnapAlign(value: ScrollSnapAlign): ListAttribute; @@ -2120,8 +2045,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ childrenMainSize(value: ChildrenMainSize): ListAttribute; @@ -2145,8 +2069,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ maintainVisibleContentPosition(enabled: boolean): ListAttribute; @@ -2168,8 +2091,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ stackFromEnd(enabled: boolean): ListAttribute; @@ -2275,8 +2197,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onScrollIndex(event: (start: number, end: number, center: number) => void): ListAttribute; @@ -2288,8 +2209,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onScrollVisibleContentChange(handler: OnScrollVisibleContentChangeCallback): ListAttribute; @@ -2483,8 +2403,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onItemMove(event: (from: number, to: number) => boolean): ListAttribute; @@ -2519,19 +2438,6 @@ declare class ListAttribute extends ScrollableCommonMethod { */ onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => ((() => any) | void)): ListAttribute; - /** - * After a listener is bound, the component can be dragged. After the drag occurs, a callback is triggered. - * (To be triggered, press and hold for 170 milliseconds (ms)) - * - * @param { OnItemDragStartCallback } event - callback function, triggered when the item drag start. - * @returns { ListAttribute } Returns the instance of the ListAttribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onItemDragStart(event: OnItemDragStartCallback): ListAttribute; - /** * After binding, a callback is triggered when the component is dragged to the range of the component. * @@ -2557,8 +2463,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onItemDragEnter(event: (event: ItemDragInfo) => void): ListAttribute; @@ -2587,8 +2492,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): ListAttribute; @@ -2617,8 +2521,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): ListAttribute; @@ -2649,8 +2552,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute; @@ -2696,35 +2598,8 @@ declare class ListAttribute extends ScrollableCommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ onScrollFrameBegin(event: OnScrollFrameBeginCallback): ListAttribute; - - /** - * Called when the scrollable will scroll. - * - * @param { Optional } handler - callback of scrollable. - * @returns { ListAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onWillScroll(handler: Optional): ListAttribute; - - /** - * Called when the scrollable did scroll. - * - * @param { OnScrollCallback } handler - callback of scrollable, - * scrollOffset is offset this frame did scroll, scrollState is current scroll state. - * @returns { ListAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onDidScroll(handler: OnScrollCallback): ListAttribute; } /** @@ -2766,6 +2641,7 @@ declare class ListAttribute extends ScrollableCommonMethod { * @form * @atomicservice * @since 20 + * @noninterop */ declare const List: ListInterface; @@ -2798,5 +2674,6 @@ declare const List: ListInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const ListInstance: ListAttribute; diff --git a/api/@internal/component/ets/list_item.d.ts b/api/@internal/component/ets/list_item.d.ts index 914f1fd993696cd8acf72f8115b0161625ab4c7f..33ee8279d60063d7529f6fb3f863f495ebad2b46 100644 --- a/api/@internal/component/ets/list_item.d.ts +++ b/api/@internal/component/ets/list_item.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod, Bindable } from './common'; -import { CustomBuilder } from './builder' -import { Length } from './units'; -import { ComponentContent } from '../ComponentContent' -/*** endif */ /** * Declare item ceiling attribute. @@ -122,8 +116,7 @@ declare enum EditMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum SwipeEdgeEffect { /** @@ -145,8 +138,7 @@ declare enum SwipeEdgeEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Spring, @@ -169,8 +161,7 @@ declare enum SwipeEdgeEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ None, } @@ -190,8 +181,7 @@ declare enum SwipeEdgeEffect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum SwipeActionState { /** @@ -205,8 +195,7 @@ declare enum SwipeActionState { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ COLLAPSED, @@ -221,8 +210,7 @@ declare enum SwipeActionState { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ EXPANDED, @@ -237,8 +225,7 @@ declare enum SwipeActionState { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ACTIONING, } @@ -257,8 +244,7 @@ declare enum SwipeActionState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface SwipeActionItem { /** @@ -277,8 +263,7 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ builder?: CustomBuilder; @@ -290,8 +275,7 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ builderComponent?: ComponentContent; @@ -311,8 +295,7 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ actionAreaDistance?: Length; @@ -330,8 +313,7 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onAction?: () => void; @@ -349,8 +331,7 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onEnterActionArea?: () => void; @@ -368,8 +349,7 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onExitActionArea?: () => void; @@ -388,8 +368,7 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onStateChange?: (state: SwipeActionState) => void; } @@ -416,8 +395,7 @@ declare interface SwipeActionItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface SwipeActionOptions { /** @@ -445,8 +423,7 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ start?: CustomBuilder | SwipeActionItem; @@ -475,8 +452,7 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ end?: CustomBuilder | SwipeActionItem; @@ -502,8 +478,7 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ edgeEffect?: SwipeEdgeEffect; @@ -522,8 +497,7 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onOffsetChange?: (offset: number) => void; } @@ -542,8 +516,7 @@ declare interface SwipeActionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ListItemStyle { /** @@ -558,8 +531,7 @@ declare enum ListItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ NONE = 0, @@ -575,8 +547,7 @@ declare enum ListItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ CARD = 1, } @@ -595,8 +566,7 @@ declare enum ListItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface ListItemOptions { /** @@ -613,8 +583,7 @@ declare interface ListItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ style?: ListItemStyle; } @@ -651,8 +620,8 @@ declare interface ListItemOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface ListItemInterface { /** @@ -674,8 +643,7 @@ interface ListItemInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value?: ListItemOptions): ListItemAttribute; @@ -725,8 +693,8 @@ interface ListItemInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class ListItemAttribute extends CommonMethod { /** @@ -788,8 +756,7 @@ declare class ListItemAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectable(value: boolean): ListItemAttribute; @@ -818,21 +785,6 @@ declare class ListItemAttribute extends CommonMethod { */ selected(value: boolean): ListItemAttribute; - /** - * Called when judging whether it is selected. - * This parameter supports $$ for two-way binding of variables. - * - * @param { boolean | Bindable } value - if the listItem is selected. - * @returns { ListItemAttribute } the attribute of the listItem. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - selected(value: boolean | Bindable): ListItemAttribute; - /** * Sets the action item that appears when the list item slides in the cross axis direction of the list. * @@ -858,8 +810,7 @@ declare class ListItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ swipeAction(value: SwipeActionOptions): ListItemAttribute; @@ -899,8 +850,7 @@ declare class ListItemAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onSelect(event: (isSelected: boolean) => void): ListItemAttribute; } @@ -934,6 +884,7 @@ declare class ListItemAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const ListItemInstance: ListItemAttribute; @@ -966,6 +917,7 @@ declare const ListItemInstance: ListItemAttribute; * @form * @atomicservice * @since 11 + * @noninterop */ declare const ListItem: ListItemInterface; diff --git a/api/@internal/component/ets/list_item_group.d.ts b/api/@internal/component/ets/list_item_group.d.ts index 44000be5c58f8c36e06573ee8f8d808ff96917d1..26a8f00615fadede9e4815d2e0737ef1e252a080 100644 --- a/api/@internal/component/ets/list_item_group.d.ts +++ b/api/@internal/component/ets/list_item_group.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ChildrenMainSize, CommonMethod } from './common'; -import { CustomBuilder } from './builder' -import { ComponentContent } from '../ComponentContent' -import { ListDividerOptions } from './list'; -/*** endif */ /** * Defines the list item group style. @@ -39,8 +33,7 @@ import { ListDividerOptions } from './list'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ListItemGroupStyle { /** @@ -55,8 +48,7 @@ declare enum ListItemGroupStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ NONE = 0, @@ -72,8 +64,7 @@ declare enum ListItemGroupStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ CARD = 1, } @@ -100,8 +91,7 @@ declare enum ListItemGroupStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface ListItemGroupOptions { /** @@ -126,8 +116,7 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ header?: CustomBuilder; @@ -138,8 +127,7 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ headerComponent?: ComponentContent; @@ -165,8 +153,7 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ footer?: CustomBuilder; @@ -177,8 +164,7 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ footerComponent?: ComponentContent; @@ -204,8 +190,7 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ space?: number | string; @@ -223,8 +208,7 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ style?: ListItemGroupStyle; } @@ -251,8 +235,8 @@ declare interface ListItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface ListItemGroupInterface { /** @@ -280,8 +264,7 @@ interface ListItemGroupInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (options?: ListItemGroupOptions): ListItemGroupAttribute; } @@ -308,8 +291,8 @@ interface ListItemGroupInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class ListItemGroupAttribute extends CommonMethod { /** @@ -363,8 +346,7 @@ declare class ListItemGroupAttribute extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Announcement style. + * Declare the progress bar being loaded * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Announcement style. + * Declare the progress bar being loaded * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Announcement style. + * Declare the progress bar being loaded * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Circular, - - /** - * The style of the track. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * The style of the track. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * The style of the track. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 + * @since 11 */ + declare class LoadingProgressAttribute extends CommonMethod { + /** + * Load the color of the progress bar. + * + * @param { ResourceColor } value + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Load the color of the progress bar. + * + * @param { ResourceColor } value + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Load the color of the progress bar. + * + * @param { ResourceColor } value + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Load the color of the progress bar. + * + * @param { ResourceColor } value + * @returns { LoadingProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + color(value: ResourceColor): LoadingProgressAttribute; + + /** + * Whether to display the LoadingProgress content. + * + * @param { boolean } value - indicates the state of LoadingProgress content + * @returns { LoadingProgressAttribute } the attribute of the LoadingProgress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Whether to display the LoadingProgress content. + * + * @param { boolean } value - indicates the state of LoadingProgress content + * @returns { LoadingProgressAttribute } the attribute of the LoadingProgress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + enableLoading(value: boolean): LoadingProgressAttribute; + + /** + * Set the content modifier of loadingProgress. + * + * @param { ContentModifier } modifier - The contentModifier of LoadingProgress. + * @returns { LoadingProgressAttribute} the attribute of the loading progress + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + contentModifier(modifier: ContentModifier): LoadingProgressAttribute; + } + /** - * The style of the track. + * LoadingProgressConfiguration used by LoadingProgress contentModifier * + * @extends CommonConfiguration + * @interface LoadingProgressConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - Orbital, -} - -/** - * Provides an interface for extending the loading progress. - * - * @interface LoadingProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Provides an interface for extending the loading progress. - * - * @interface LoadingProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Provides an interface for extending the loading progress. - * - * @interface LoadingProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Provides an interface for extending the loading progress. - * - * @interface LoadingProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface LoadingProgressInterface { + declare interface LoadingProgressConfiguration extends CommonConfiguration { + /** + * Whether to enable the LoadingProgress content. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + enableLoading: boolean; + } + /** - * Called when the progress bar progress is viewed. + * Defines LoadingProgress Component. * - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Called when the progress bar progress is viewed. + * Defines LoadingProgress Component. * - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Called when the progress bar progress is viewed. + * Defines LoadingProgress Component. * - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Called when the progress bar progress is viewed. + * Defines LoadingProgress Component. * - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - (): LoadingProgressAttribute; -} - -/** - * Declare the progress bar being loaded - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Declare the progress bar being loaded - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Declare the progress bar being loaded - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Declare the progress bar being loaded - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class LoadingProgressAttribute extends CommonMethod { + declare const LoadingProgress: LoadingProgressInterface; + /** - * Load the color of the progress bar. + * Loading Progress Extensions on Declarative Classes * - * @param { ResourceColor } value - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Load the color of the progress bar. + * Loading Progress Extensions on Declarative Classes * - * @param { ResourceColor } value - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Load the color of the progress bar. + * Loading Progress Extensions on Declarative Classes * - * @param { ResourceColor } value - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Load the color of the progress bar. + * Loading Progress Extensions on Declarative Classes * - * @param { ResourceColor } value - * @returns { LoadingProgressAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - color(value: ResourceColor): LoadingProgressAttribute; - - /** - * Whether to display the LoadingProgress content. - * - * @param { boolean } value - indicates the state of LoadingProgress content - * @returns { LoadingProgressAttribute } the attribute of the LoadingProgress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether to display the LoadingProgress content. - * - * @param { boolean } value - indicates the state of LoadingProgress content - * @returns { LoadingProgressAttribute } the attribute of the LoadingProgress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableLoading(value: boolean): LoadingProgressAttribute; - - /** - * Set the content modifier of loadingProgress. - * - * @param { ContentModifier } modifier - The contentModifier of LoadingProgress. - * @returns { LoadingProgressAttribute} the attribute of the loading progress - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - contentModifier(modifier: ContentModifier): LoadingProgressAttribute; -} - -/** - * LoadingProgressConfiguration used by LoadingProgress contentModifier - * - * @extends CommonConfiguration - * @interface LoadingProgressConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface LoadingProgressConfiguration extends CommonConfiguration { - /** - * Whether to enable the LoadingProgress content. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableLoading: boolean; -} - -/** - * Defines LoadingProgress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines LoadingProgress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines LoadingProgress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines LoadingProgress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare const LoadingProgress: LoadingProgressInterface; - -/** - * Loading Progress Extensions on Declarative Classes - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Loading Progress Extensions on Declarative Classes - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Loading Progress Extensions on Declarative Classes - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Loading Progress Extensions on Declarative Classes - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare const LoadingProgressInstance: LoadingProgressAttribute; + declare const LoadingProgressInstance: LoadingProgressAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/location_button.d.ts b/api/@internal/component/ets/location_button.d.ts deleted file mode 100644 index b6c3c31d04e0a79e00d4e1a24cf44e4dabbbaf46..0000000000000000000000000000000000000000 --- a/api/@internal/component/ets/location_button.d.ts +++ /dev/null @@ -1,537 +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 - */ - -/** - * Enumerates the icon styles. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Enumerates the icon styles. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ -declare enum LocationIconStyle { - /** - * Icon filled with the specified color. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Icon filled with the specified color. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - FULL_FILLED = 0, - - /** - * Icon rendered as lines. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Icon rendered as lines. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - LINES = 1 -} - -/** - * Enumerates the text that can be displayed on the location button. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Enumerates the text that can be displayed on the location button. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ -declare enum LocationDescription { - /** - * Current Location - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Current Location - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - CURRENT_LOCATION = 0, - - /** - * Add Location - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Add Location - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - ADD_LOCATION = 1, - - /** - * Select Location - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Select Location - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - SELECT_LOCATION = 2, - - /** - * Share Location - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Share Location - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - SHARE_LOCATION = 3, - - /** - * Send Location - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Send Location - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - SEND_LOCATION = 4, - - /** - * Locating - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Locating - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - LOCATING = 5, - - /** - * Location - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Location - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - LOCATION = 6, - - /** - * Send Current Location - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Send Current Location - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - SEND_CURRENT_LOCATION = 7, - - /** - * Relocation - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Relocation - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - RELOCATION = 8, - - /** - * Punch In - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Punch In - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - PUNCH_IN = 9, - - /** - * Current Position - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Current Position - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - CURRENT_POSITION = 10 -} - -/** - * Declares the interface for setting the location button options. - * - * @interface LocationButtonOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Declares the interface for setting the location button options. - * - * @interface LocationButtonOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ -declare interface LocationButtonOptions { - /** - * Style of the icon to be drawn. - * - * @type { ?LocationIconStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Style of the icon to be drawn. - * - * @type { ?LocationIconStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - icon?: LocationIconStyle; - - /** - * Text to be displayed on the button. - * - * @type { ?LocationDescription } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Text to be displayed on the button. - * - * @type { ?LocationDescription } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - text?: LocationDescription; - - /** - * Type of the button. - * - * @type { ?ButtonType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Type of the button. - * - * @type { ?ButtonType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - buttonType?: ButtonType; -} - -/** - * Enumerates the click event results of the location button. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Enumerates the click event results of the location button. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ -declare enum LocationButtonOnClickResult { - /** - * Success. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Success. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - SUCCESS = 0, - - /** - * Failure because the application is not temporarily authorized for accessing location data. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Failure because the application is not temporarily authorized for accessing location data. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - TEMPORARY_AUTHORIZATION_FAILED = 1 -} - -/** - * Defines the interface for setting a location button. - * - * @interface LocationButtonInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the interface for setting a location button. - * - * @interface LocationButtonInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ -interface LocationButtonInterface { - /** - * Creates a location button. - * - * @returns { LocationButtonAttribute } TReturns the attribute of the location button. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Creates a location button. - * - * @returns { LocationButtonAttribute } TReturns the attribute of the location button. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - (): LocationButtonAttribute; - - /** - * Creates a location button with the specified composition. - * If an attribute is not set, the corresponding element will not be drawn. - * - * @param { LocationButtonOptions } options - Indicates the options of the location button. - * @returns { LocationButtonAttribute } Returns the attribute of the location button. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Creates a location button with the specified composition. - * If an attribute is not set, the corresponding element will not be drawn. - * - * @param { LocationButtonOptions } options - Indicates the options of the location button. - * @returns { LocationButtonAttribute } Returns the attribute of the location button. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ - (options: LocationButtonOptions): LocationButtonAttribute; -} - -/** - * Callback function when the location button is clicked. - * - * @typedef { function } LocationButtonCallback - * @param { ClickEvent } event - The click event. - * @param { LocationButtonOnClickResult } result - The result of click event. - * @param { BusinessError } [error] - The error code and message of click event. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ -type LocationButtonCallback = (event: ClickEvent, result: LocationButtonOnClickResult, error?: BusinessError) => void; - -/** - * Defines the attributes of the location button. - * - * @extends SecurityComponentMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the attributes of the location button. - * - * @extends SecurityComponentMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ -declare class LocationButtonAttribute extends SecurityComponentMethod { - /** - * Called when the location button is clicked. - * - * @param { function } event - * @returns { LocationButtonAttribute } Returns the attribute of the location button. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Called when the location button is clicked. - * - * @param { function } event - * @returns { LocationButtonAttribute } Returns the attribute of the location button. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Called when the location button is clicked. - * - * @param { LocationButtonCallback } event - * @returns { LocationButtonAttribute } Returns the attribute of the location button. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 18 - */ - onClick(event: LocationButtonCallback): LocationButtonAttribute; -} - -/** - * Defines a button that interacts with the security component service to - * request the authorization for accessing location data. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines a button that interacts with the security component service to - * request the authorization for accessing location data. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - * @useinstead ohos.abilityAccessCtrl#requestPermissionsFromUser - */ -declare const LocationButton: LocationButtonInterface; - -/** - * Defines a location button instance for secure access. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines a location button instance for secure access. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - * @deprecated since 15 - */ -declare const LocationButtonInstance: LocationButtonAttribute; diff --git a/api/@internal/component/ets/marquee.d.ts b/api/@internal/component/ets/marquee.d.ts index 12e53cdcfd4fc5615c3aa723093c1997e7cf88cb..1e4def9c6495eada12c2f7ef5969cbf350bbfb81 100644 --- a/api/@internal/component/ets/marquee.d.ts +++ b/api/@internal/component/ets/marquee.d.ts @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ResourceColor, Length } from './units'; -import { CommonMethod } from './common'; -import { FontWeight, MarqueeUpdateStrategy } from './enums'; -import { Resource } from './../../../api/global/resource'; -/*** endif */ - /** * Defines Marquee constructor options. * @@ -34,8 +27,7 @@ import { Resource } from './../../../api/global/resource'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface MarqueeOptions { /** @@ -88,8 +80,7 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ start: boolean; @@ -142,8 +133,7 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ step?: number; @@ -197,8 +187,7 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ loop?: number; @@ -246,8 +235,7 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ fromStart?: boolean; @@ -294,8 +282,7 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ src: string; } @@ -332,8 +319,8 @@ interface MarqueeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface MarqueeInterface { /** @@ -384,8 +371,7 @@ interface MarqueeInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options: MarqueeOptions): MarqueeAttribute; } @@ -422,8 +408,8 @@ interface MarqueeInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class MarqueeAttribute extends CommonMethod { /** @@ -462,8 +448,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor(value: ResourceColor): MarqueeAttribute; @@ -508,8 +493,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontSize(value: Length): MarqueeAttribute; @@ -553,8 +537,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ allowScale(value: boolean): MarqueeAttribute; @@ -603,8 +586,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontWeight(value: number | FontWeight | string): MarqueeAttribute; @@ -650,8 +632,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontFamily(value: string | Resource): MarqueeAttribute; @@ -668,8 +649,7 @@ declare class MarqueeAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ marqueeUpdateStrategy(value: MarqueeUpdateStrategy): MarqueeAttribute; @@ -709,8 +689,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onStart(event: () => void): MarqueeAttribute; @@ -754,8 +733,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onBounce(event: () => void): MarqueeAttribute; @@ -795,8 +773,7 @@ declare class MarqueeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onFinish(event: () => void): MarqueeAttribute; } @@ -837,6 +814,7 @@ declare class MarqueeAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Marquee: MarqueeInterface; @@ -869,5 +847,6 @@ declare const Marquee: MarqueeInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const MarqueeInstance: MarqueeAttribute; diff --git a/api/@internal/component/ets/matrix2d.d.ts b/api/@internal/component/ets/matrix2d.d.ts index a0378005cc60e1bfdce048b0084f3a15ad0d3d25..594e7dc4e95d61c89672e5ad35dc8fb12201d0d5 100644 --- a/api/@internal/component/ets/matrix2d.d.ts +++ b/api/@internal/component/ets/matrix2d.d.ts @@ -18,10 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { LengthMetricsUnit } from '../Graphics'; -/*** endif */ - /** * 2D transformation matrix, supporting rotation, translation, and scaling of the X-axis and Y-axis * @@ -50,8 +46,7 @@ import { LengthMetricsUnit } from '../Graphics'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class Matrix2D { /** @@ -86,8 +81,7 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scaleX?: number; @@ -123,8 +117,7 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ rotateY?: number; @@ -160,8 +153,7 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ rotateX?: number; @@ -197,8 +189,7 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scaleY?: number; @@ -234,8 +225,7 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ translateX?: number; @@ -271,8 +261,7 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ translateY?: number; @@ -312,8 +301,7 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ identity(): Matrix2D; @@ -353,8 +341,7 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ invert(): Matrix2D; @@ -426,8 +413,7 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ rotate(degree: number, rx?: number, ry?: number): Matrix2D; @@ -471,8 +457,7 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ translate(tx?: number, ty?: number): Matrix2D; @@ -516,8 +501,7 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scale(sx?: number, sy?: number): Matrix2D; @@ -536,8 +520,7 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -549,8 +532,7 @@ declare class Matrix2D { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(unit: LengthMetricsUnit); } diff --git a/api/@internal/component/ets/media_cached_image.d.ts b/api/@internal/component/ets/media_cached_image.d.ts index 4a20ef46d6b456ce808e2110e72fd041353d73bb..36860708644caa7fdf7e112fe99cb6eaa302e81d 100644 --- a/api/@internal/component/ets/media_cached_image.d.ts +++ b/api/@internal/component/ets/media_cached_image.d.ts @@ -59,6 +59,7 @@ interface ASTCResource { * @systemapi * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ interface MediaCachedImageInterface { /** @@ -92,6 +93,7 @@ interface MediaCachedImageInterface { * @systemapi * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ declare class MediaCachedImageAttribute extends ImageAttribute {} @@ -101,6 +103,7 @@ declare class MediaCachedImageAttribute extends ImageAttribute {} * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 12 + * @noninterop */ declare const MediaCachedImage: MediaCachedImageInterface; @@ -110,5 +113,6 @@ declare const MediaCachedImage: MediaCachedImageInterface; * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 12 + * @noninterop */ declare const MediaCachedImageInstance: MediaCachedImageAttribute; diff --git a/api/@internal/component/ets/menu.d.ts b/api/@internal/component/ets/menu.d.ts index 52cc8ce8af590973b6ff4fae4f6ade4c3be35e4a..a9e75d46b9949d9d5c24b0f57c26b5b40b5c2fac 100644 --- a/api/@internal/component/ets/menu.d.ts +++ b/api/@internal/component/ets/menu.d.ts @@ -12,17 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - -/*** if arkts 1.2 */ -import { CommonMethod } from './common'; -import { Length, Font, ResourceColor, Dimension, BorderRadiuses, DividerStyleOptions } from './units'; -/*** endif */ - /** * Defines the Menu Component. * @@ -45,38 +38,36 @@ import { Length, Font, ResourceColor, Dimension, BorderRadiuses, DividerStyleOpt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - (): 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 * @@ -84,44 +75,37 @@ interface MenuInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum SubMenuExpandingMode { - /** - * Sub-menu will expand besides main menu - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - SIDE_EXPAND = 0, - - /** - * Sub-menu will expand embedded in main menu - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - EMBEDDED_EXPAND = 1, - - /** - * Sub-menu will expand over main menu - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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. * @@ -144,143 +128,129 @@ declare enum SubMenuExpandingMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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. * @@ -301,9 +271,9 @@ declare class MenuAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Menu: MenuInterface; - /** * Defines Menu Component instance. * @@ -324,5 +294,6 @@ declare const Menu: MenuInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const MenuInstance: MenuAttribute; diff --git a/api/@internal/component/ets/menu_item.d.ts b/api/@internal/component/ets/menu_item.d.ts index 0a1e00566da1b70fbd1f89d14047be7b52fa8ec2..0a20c255b369eea1b21b91fac4a91fb1dd2ff020 100644 --- a/api/@internal/component/ets/menu_item.d.ts +++ b/api/@internal/component/ets/menu_item.d.ts @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ResourceStr, Font, ResourceColor } from './units'; -import { CommonMethod, Bindable } from './common'; -import { CustomBuilder } from './builder'; -import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier'; -/*** endif */ - /** * Defines the option of MenuItem. * @@ -47,8 +40,8 @@ import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare interface MenuItemOptions { /** @@ -73,8 +66,7 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ startIcon?: ResourceStr; @@ -94,7 +86,6 @@ declare interface MenuItemOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ symbolStartIcon?: SymbolGlyphModifier; @@ -120,8 +111,7 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ content?: ResourceStr; @@ -147,8 +137,7 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ endIcon?: ResourceStr; @@ -168,7 +157,6 @@ declare interface MenuItemOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ symbolEndIcon?: SymbolGlyphModifier; @@ -194,8 +182,7 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ labelInfo?: ResourceStr; @@ -221,8 +208,7 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ builder?: CustomBuilder; } @@ -249,8 +235,8 @@ declare interface MenuItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface MenuItemInterface { /** @@ -278,8 +264,7 @@ interface MenuItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value?: MenuItemOptions | CustomBuilder): MenuItemAttribute; } @@ -306,8 +291,8 @@ interface MenuItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class MenuItemAttribute extends CommonMethod { /** @@ -339,19 +324,6 @@ declare class MenuItemAttribute extends CommonMethod { */ selected(value: boolean): MenuItemAttribute; - /** - * Setting whether menuItem is selected. - * - * @param { boolean | undefined | Bindable } value - * @returns { MenuItemAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - selected(value: boolean | undefined | Bindable): MenuItemAttribute; - /** * Whether the relevant check icon is displayed when a menu item is selected. @@ -400,8 +372,7 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ selectIcon(value: boolean | ResourceStr | SymbolGlyphModifier): MenuItemAttribute; @@ -430,8 +401,7 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onChange(callback: (selected: boolean) => void): MenuItemAttribute; @@ -454,8 +424,7 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ contentFont(value: Font): MenuItemAttribute; @@ -476,8 +445,7 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ contentFontColor(value: ResourceColor): MenuItemAttribute; @@ -500,8 +468,7 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ labelFont(value: Font): MenuItemAttribute; @@ -522,8 +489,7 @@ declare class MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ labelFontColor(value: ResourceColor): MenuItemAttribute; } @@ -548,6 +514,7 @@ declare class MenuItemAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const MenuItem: MenuItemInterface; @@ -571,5 +538,6 @@ declare const MenuItem: MenuItemInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const MenuItemInstance: MenuItemAttribute; diff --git a/api/@internal/component/ets/menu_item_group.d.ts b/api/@internal/component/ets/menu_item_group.d.ts index fa5e23ff42266d460da0a239e866870d6ff9cec1..486d933be414a86ff5fdeda9b5b5bd99708b9a6d 100644 --- a/api/@internal/component/ets/menu_item_group.d.ts +++ b/api/@internal/component/ets/menu_item_group.d.ts @@ -12,18 +12,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - -/*** if arkts 1.2 */ -import { CommonMethod } from './common'; -import { CustomBuilder } from './builder'; -import { ResourceStr } from './units'; -/*** endif */ - /** * Defines the option of MenuItemGroup. * @@ -46,65 +38,60 @@ import { ResourceStr } from './units'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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. * @@ -127,41 +114,39 @@ declare interface MenuItemGroupOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - (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. * @@ -184,11 +169,11 @@ interface MenuItemGroupInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ -declare class MenuItemGroupAttribute extends CommonMethod {} - +declare class MenuItemGroupAttribute extends CommonMethod { +} /** * Defines MenuItemGroup Component. * @@ -209,9 +194,9 @@ declare class MenuItemGroupAttribute extends CommonMethod; @@ -699,8 +631,7 @@ declare interface NavDestinationTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ duration?: number; @@ -712,8 +643,7 @@ declare interface NavDestinationTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ curve?: Curve; @@ -725,8 +655,7 @@ declare interface NavDestinationTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ delay?: number; @@ -739,8 +668,7 @@ declare interface NavDestinationTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ event: Callback; } @@ -767,8 +695,8 @@ declare interface NavDestinationTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class NavDestinationAttribute extends CommonMethod { /** @@ -822,8 +750,7 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -902,8 +826,7 @@ declare class NavDestinationAttribute extends CommonMethod void): NavDestinationAttribute; @@ -924,8 +847,7 @@ declare class NavDestinationAttribute extends CommonMethod void): NavDestinationAttribute; @@ -948,8 +870,7 @@ declare class NavDestinationAttribute extends CommonMethod boolean): NavDestinationAttribute; @@ -963,18 +884,7 @@ declare class NavDestinationAttribute extends CommonMethod>} callback - Indicates callback when pop to the navDestination with result. - * @returns {NavDestinationAttribute} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - onResult(callback: Optional>): NavDestinationAttribute; + onResult(callback: Optional>): NavDestinationAttribute; /** * Sets the mode of the **NavDestination** component. Dynamic modification is not supported. @@ -994,8 +904,7 @@ declare class NavDestinationAttribute extends CommonMethod | CustomBuilder): NavDestinationAttribute; @@ -1079,8 +985,7 @@ declare class NavDestinationAttribute extends CommonMethod | CustomBuilder, options?: NavigationMenuOptions): NavDestinationAttribute; @@ -1107,8 +1012,7 @@ declare class NavDestinationAttribute extends CommonMethod | CustomBuilder, options?: NavigationToolbarOptions): NavDestinationAttribute; @@ -1127,8 +1031,7 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; - - /** - * Invoked before sub-components of NavDestination are created. - * - * @param { Callback } callback - * - Indicates callback that invoked before sub-components of NavDestination are created. - * @returns { NavDestinationAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onReady(callback: Callback): NavDestinationAttribute; /** * Called when the navigation destination is about to be mounted. @@ -1168,8 +1057,7 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1182,8 +1070,7 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1195,8 +1082,7 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1208,8 +1094,7 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1224,8 +1109,7 @@ declare class NavDestinationAttribute extends CommonMethod, edges?: Array): NavDestinationAttribute; @@ -1242,8 +1126,7 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1265,8 +1148,7 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1280,8 +1162,7 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1337,8 +1217,7 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1352,8 +1231,7 @@ declare class NavDestinationAttribute extends CommonMethod>): NavDestinationAttribute; @@ -1367,8 +1245,7 @@ declare class NavDestinationAttribute extends CommonMethod>): NavDestinationAttribute; @@ -1384,8 +1261,7 @@ declare class NavDestinationAttribute extends CommonMethod>): NavDestinationAttribute; - - /** - * Invoked when destination be pushed with singleton mode. - * - * @param { Optional> } callback - Indicates callback when destination be pushed with singleton mode. - * @returns { NavDestinationAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onNewParam(callback: Optional>): NavDestinationAttribute; /** * Sets the display orientation for the **NavDestination** component. After the transition to the NavDestination, @@ -1438,8 +1301,7 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; @@ -1464,8 +1326,7 @@ declare class NavDestinationAttribute extends CommonMethod, animated?: boolean): NavDestinationAttribute; @@ -1488,8 +1349,7 @@ declare class NavDestinationAttribute extends CommonMethod): NavDestinationAttribute; } @@ -1514,6 +1374,7 @@ declare class NavDestinationAttribute extends CommonMethod Array | undefined; \ No newline at end of file diff --git a/api/@internal/component/ets/nav_router.d.ts b/api/@internal/component/ets/nav_router.d.ts index 9cec64c3cb28ea02f26de7c5683fd0a1388a1507..66fe39b8af5cf538f54a37c49baaed90c967abe4 100644 --- a/api/@internal/component/ets/nav_router.d.ts +++ b/api/@internal/component/ets/nav_router.d.ts @@ -102,6 +102,7 @@ declare interface RouteInfo { * @atomicservice * @since 11 * @deprecated since 13 + * @noninterop */ declare interface NavRouterInterface { /** @@ -252,6 +253,7 @@ declare enum NavRouteMode { * @atomicservice * @since 11 * @deprecated since 13 + * @noninterop */ declare class NavRouterAttribute extends CommonMethod { /** @@ -328,6 +330,7 @@ declare class NavRouterAttribute extends CommonMethod { * @atomicservice * @since 11 * @deprecated since 13 + * @noninterop */ declare const NavRouter: NavRouterInterface; @@ -352,5 +355,6 @@ declare const NavRouter: NavRouterInterface; * @atomicservice * @since 11 * @deprecated since 13 + * @noninterop */ declare const NavRouterInstance: NavRouterAttribute; diff --git a/api/@internal/component/ets/navigation.d.ts b/api/@internal/component/ets/navigation.d.ts index fa28000ab8fc2807a9551e17e9c8ebcff60ac8fe..55576f9ee856b8d787d1c1d5d0ed01635d99099f 100644 --- a/api/@internal/component/ets/navigation.d.ts +++ b/api/@internal/component/ets/navigation.d.ts @@ -18,19 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import window from '../../@ohos.window'; -import { Resource } from '../../global/resource'; -import { TextModifier } from '../../arkui/TextModifier'; -import { LengthMetrics } from '../../arkui/Graphics'; -import { Callback, BlurStyle, CommonMethod, Optional, LayoutSafeAreaType, LayoutSafeAreaEdge, BackgroundEffectOptions, BackgroundBlurStyleOptions, PixelMap, Bindable } from './common' -import { CustomBuilder, PageMapBuilder } from './builder' -import { Length, ResourceStr, ResourceColor, Dimension, VoidCallback } from './units' -import { TitleHeight } from './enums' -import { SymbolGlyphModifier } from '../../arkui/SymbolGlyphModifier' -import { NavDestinationContext, NavDestinationMode } from './navDestination' -/*** endif */ - /** * Import the SystemBarStyle type for Navigation. * @@ -41,18 +28,6 @@ import { NavDestinationContext, NavDestinationMode } from './navDestination' */ declare type SystemBarStyle = import('../api/@ohos.window').default.SystemBarStyle; - -/** - * Import the SystemBarStyle type for Navigation. - * - * @typedef { window.SystemBarStyle } SystemBarStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare type SystemBarStyle = window.SystemBarStyle; - /** * Defines the navigation common title. * @@ -75,8 +50,7 @@ declare type SystemBarStyle = window.SystemBarStyle; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface NavigationCommonTitle { /** @@ -110,8 +84,7 @@ declare interface NavigationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ main: string | Resource; @@ -146,8 +119,7 @@ declare interface NavigationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ sub: string | Resource; } @@ -174,8 +146,7 @@ declare interface NavigationCommonTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface NavigationCustomTitle { /** @@ -200,8 +171,7 @@ declare interface NavigationCustomTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ builder: CustomBuilder; @@ -227,8 +197,7 @@ declare interface NavigationCustomTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ height: TitleHeight | Length; } @@ -256,8 +225,7 @@ declare interface NavigationCustomTitle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum NavigationMode { /** @@ -279,8 +247,7 @@ declare enum NavigationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Stack, @@ -303,8 +270,7 @@ declare enum NavigationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Split, @@ -330,8 +296,7 @@ declare enum NavigationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Auto, } @@ -358,8 +323,7 @@ declare enum NavigationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum NavBarPosition { /** @@ -381,8 +345,7 @@ declare enum NavBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Start, @@ -405,8 +368,7 @@ declare enum NavBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ End, } @@ -433,8 +395,7 @@ declare enum NavBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum NavigationTitleMode { /** @@ -495,8 +456,7 @@ declare enum NavigationTitleMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Free = 0, @@ -525,8 +485,7 @@ declare enum NavigationTitleMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Full, @@ -555,8 +514,7 @@ declare enum NavigationTitleMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Mini, } @@ -583,8 +541,8 @@ declare enum NavigationTitleMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare interface NavigationMenuItem { /** @@ -618,8 +576,7 @@ declare interface NavigationMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ value: string | Resource; @@ -654,8 +611,7 @@ declare interface NavigationMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ icon?: string | Resource; @@ -675,7 +631,6 @@ declare interface NavigationMenuItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ symbolIcon?: SymbolGlyphModifier; @@ -686,8 +641,7 @@ declare interface NavigationMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isEnabled?: boolean; @@ -713,8 +667,7 @@ declare interface NavigationMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ action?: () => void; } @@ -734,8 +687,7 @@ declare interface NavigationMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface PopInfo { /** @@ -753,8 +705,7 @@ declare interface PopInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ info: NavPathInfo; @@ -773,8 +724,7 @@ declare interface PopInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ result: Object; } @@ -792,8 +742,7 @@ declare interface PopInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class NavPathInfo { /** @@ -829,21 +778,6 @@ declare class NavPathInfo { * @since 12 */ constructor(name: string, param: unknown, onPop?: import('../api/@ohos.base').Callback, isEntry?: boolean); - - /** - * Creates an instance of NavPathInfo. - * - * @param { string } name - The name of NavDestination. - * @param { Object | null | undefined } param - The detailed parameter of the NavDestination. - * @param { Callback } [onPop] - The callback when next page returns. - * @param { boolean } [isEntry] - Indicates whether it is an entry destination. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - constructor(name: string, param: Object | null | undefined, onPop?: Callback, isEntry?: boolean); /** * Name of the navigation destination page. @@ -860,8 +794,7 @@ declare class NavPathInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ name: string; @@ -883,18 +816,6 @@ declare class NavPathInfo { * @since 11 */ param?: unknown; - - /** - * The detailed parameter of the NavDestination. - * - * @type { ?(Object | null | undefined) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - param?: Object | null | undefined; /** * Callback returned when pop is called on the navigation destination page. @@ -917,18 +838,6 @@ declare class NavPathInfo { */ onPop?: import('../api/@ohos.base').Callback; - /** - * The callback when next page returns. - * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onPop?: Callback; - /** * Indicates whether it is an entry destination. * @@ -936,8 +845,7 @@ declare class NavPathInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isEntry?: boolean; @@ -948,8 +856,7 @@ declare class NavPathInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ navDestinationId?: string; } @@ -961,8 +868,7 @@ declare class NavPathInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum LaunchMode { /** @@ -973,8 +879,7 @@ declare enum LaunchMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ STANDARD = 0, @@ -985,8 +890,7 @@ declare enum LaunchMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ MOVE_TO_TOP_SINGLETON = 1, @@ -997,8 +901,7 @@ declare enum LaunchMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ POP_TO_SINGLETON = 2, @@ -1009,8 +912,7 @@ declare enum LaunchMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NEW_INSTANCE = 3, } @@ -1022,8 +924,7 @@ declare enum LaunchMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface NavigationOptions { /** @@ -1034,8 +935,7 @@ declare interface NavigationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ launchMode?: LaunchMode; @@ -1049,8 +949,7 @@ declare interface NavigationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ animated?: boolean; } @@ -1068,8 +967,7 @@ declare interface NavigationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class NavPathStack { /** @@ -1085,8 +983,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -1108,8 +1005,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ pushPath(info: NavPathInfo, animated?: boolean): void; @@ -1122,8 +1018,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pushPath(info: NavPathInfo, options?: NavigationOptions): void; @@ -1168,8 +1063,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pushDestination(info: NavPathInfo, animated?: boolean): Promise; @@ -1191,8 +1085,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pushDestination(info: NavPathInfo, options?: NavigationOptions): Promise; @@ -1219,20 +1112,6 @@ declare class NavPathStack { * @since 11 */ pushPathByName(name: string, param: unknown, animated?: boolean): void; - - /** - * Pushes the specified NavDestination into the stack. - * - * @param { string } name - Indicates the name of the NavDestination to be pushed. - * @param { Object | null | undefined } param - Indicates the detailed parameter of the NavDestination to be pushed. - * @param { boolean } [animated] - Indicates whether the transition is animated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - pushPathByName(name: string, param: Object | null | undefined, animated?: boolean): void; /** * Pushes the specified NavDestination into the stack. @@ -1262,21 +1141,6 @@ declare class NavPathStack { * @since 12 */ pushPathByName(name: string, param: Object, onPop: import('../api/@ohos.base').Callback, animated?: boolean): void; - - /** - * Pushes the specified NavDestination into the stack. - * - * @param { string } name - Indicates the name of the NavDestination to be pushed. - * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. - * @param { Callback } onPop - The callback when next page returns. - * @param { boolean } [animated] - Indicates whether the transition is animated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - pushPathByName(name: string, param: Object, onPop: Callback, animated?: boolean): void; /** * Pushes the specified NavDestination into the stack. @@ -1313,8 +1177,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pushDestinationByName(name: string, param: Object, animated?: boolean): Promise; @@ -1359,29 +1222,6 @@ declare class NavPathStack { */ pushDestinationByName(name: string, param: Object, onPop: import('../api/@ohos.base').Callback, animated?: boolean): Promise; - /** - * Pushes the specified NavDestination into the stack. - * - * @param { string } name - Indicates the name of the NavDestination to be pushed. - * @param { Object } param - Indicates the detailed parameter of the NavDestination to be pushed. - * @param { Callback } onPop - The callback when next page returns. - * @param { boolean } [animated] - Indicates whether the transition is animated. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - * 1. Mandatory parameters are left unspecified. - * 2. Incorrect parameters types. - * 3. Parameter verification failed. - * @throws { BusinessError } 100001 - Internal error. - * @throws { BusinessError } 100005 - Builder function not registered. - * @throws { BusinessError } 100006 - NavDestination not found. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - pushDestinationByName(name: string, param: Object, onPop: Callback, animated?: boolean): Promise; - /** * Replace the current NavDestination with the specific one.The current NavDestination will be destroyed. * @@ -1399,8 +1239,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ replacePath(info: NavPathInfo, animated?: boolean): void; @@ -1412,8 +1251,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ replacePath(info: NavPathInfo, options?: NavigationOptions): void; @@ -1433,8 +1271,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ replaceDestination(info: NavPathInfo, options?: NavigationOptions): Promise; @@ -1461,8 +1298,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ replacePathByName(name: string, param: Object, animated?: boolean): void; @@ -1483,8 +1319,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ removeByIndexes(indexes: Array): number; @@ -1505,8 +1340,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ removeByName(name: string): number; @@ -1520,8 +1354,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ removeByNavDestinationId(navDestinationId: string): boolean; @@ -1541,8 +1374,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ pop(animated?: boolean): NavPathInfo | undefined; @@ -1565,8 +1397,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pop(result: Object, animated?: boolean): NavPathInfo | undefined; @@ -1590,8 +1421,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ popToName(name: string, animated?: boolean): number; @@ -1624,8 +1454,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ popToName(name: string, result: Object, animated?: boolean): number; @@ -1647,8 +1476,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ popToIndex(index: number, animated?: boolean): void; @@ -1663,8 +1491,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ popToIndex(index: number, result: Object, animated?: boolean): void; @@ -1688,8 +1515,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ moveToTop(name: string, animated?: boolean): number; @@ -1712,8 +1538,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ moveIndexToTop(index: number, animated?: boolean): void; @@ -1734,8 +1559,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ clear(animated?: boolean): void; @@ -1754,8 +1578,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ getAllPathName(): Array; @@ -1781,19 +1604,6 @@ declare class NavPathStack { * @since 11 */ getParamByIndex(index: number): unknown | undefined; - - /** - * Obtains the param of the specified NavDestination. - * - * @param { number } index - Indicates the index of the NavDestination. - * @returns { Object | null | undefined } Returns the detailed parameter of the NavDestination if it exists in the stack, otherwise returns undefined; - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - getParamByIndex(index: number): Object | null | undefined; /** * Obtains the param of the specified NavDestination. @@ -1815,19 +1625,6 @@ declare class NavPathStack { * @since 11 */ getParamByName(name: string): Array; - - /** - * Obtains the param of the specified NavDestination. - * - * @param { string } name - Indicates the name of the NavDestination. - * @returns { Array } Returns the detailed parameter of all the NavDestinations. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - getParamByName(name: string): Array; /** * Obtains the indexes of all the navigation destination pages that match **name**. @@ -1846,8 +1643,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ getIndexByName(name: string): Array; @@ -1860,8 +1656,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ getParent(): NavPathStack | null; @@ -1882,8 +1677,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ size(): number; @@ -1908,8 +1702,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ disableAnimation(value: boolean): void; @@ -1920,8 +1713,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setInterception(interception: NavigationInterception): void; @@ -1932,8 +1724,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ getPathStack(): Array; @@ -1945,8 +1736,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ setPathStack(pathStack: Array, animated?: boolean): void; } @@ -1958,8 +1748,7 @@ declare class NavPathStack { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type NavBar = 'navBar' @@ -1974,8 +1763,7 @@ declare type NavBar = 'navBar' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type InterceptionShowCallback = (from: NavDestinationContext|NavBar, to: NavDestinationContext|NavBar, operation: NavigationOperation, isAnimated: boolean) => void; @@ -1987,8 +1775,7 @@ declare type InterceptionShowCallback = (from: NavDestinationContext|NavBar, to: * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type InterceptionModeCallback = (mode: NavigationMode) => void; @@ -1999,8 +1786,7 @@ declare type InterceptionModeCallback = (mode: NavigationMode) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface NavigationInterception { /** @@ -2011,8 +1797,7 @@ declare interface NavigationInterception { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ willShow?: InterceptionShowCallback; @@ -2023,8 +1808,7 @@ declare interface NavigationInterception { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ didShow?: InterceptionShowCallback; @@ -2035,8 +1819,7 @@ declare interface NavigationInterception { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ modeChange?: InterceptionModeCallback; } @@ -2096,8 +1879,8 @@ declare interface HomePathInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface NavigationInterface { /** @@ -2122,8 +1905,7 @@ interface NavigationInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (): NavigationAttribute; @@ -2144,8 +1926,7 @@ interface NavigationInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (pathInfos: NavPathStack): NavigationAttribute; @@ -2177,8 +1958,7 @@ interface NavigationInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ToolbarItemStatus { /** @@ -2197,8 +1977,7 @@ declare enum ToolbarItemStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ NORMAL = 0, @@ -2214,8 +1993,7 @@ declare enum ToolbarItemStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ DISABLED = 1, @@ -2233,8 +2011,7 @@ declare enum ToolbarItemStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ ACTIVE = 2, } @@ -2254,8 +2031,7 @@ declare enum ToolbarItemStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum NavigationOperation { /** @@ -2271,8 +2047,7 @@ declare enum NavigationOperation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PUSH = 1, @@ -2289,8 +2064,7 @@ declare enum NavigationOperation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ POP = 2, @@ -2307,8 +2081,7 @@ declare enum NavigationOperation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ REPLACE = 3, } @@ -2336,7 +2109,7 @@ declare enum NavigationOperation { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 + * @noninterop */ declare interface ToolbarItem { /** @@ -2354,8 +2127,7 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ value: ResourceStr; @@ -2374,8 +2146,7 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ icon?: ResourceStr; @@ -2395,7 +2166,6 @@ declare interface ToolbarItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ symbolIcon?: SymbolGlyphModifier; @@ -2414,8 +2184,7 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ action?: () => void; @@ -2434,8 +2203,7 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ status?: ToolbarItemStatus; @@ -2454,8 +2222,7 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ activeIcon?: ResourceStr; @@ -2475,7 +2242,6 @@ declare interface ToolbarItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ activeSymbolIcon?: SymbolGlyphModifier; } @@ -2487,8 +2253,8 @@ declare interface ToolbarItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare interface NavigationTitleOptions { /** @@ -2498,8 +2264,7 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ backgroundColor?: ResourceColor; @@ -2511,8 +2276,7 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ backgroundBlurStyle?: BlurStyle; @@ -2523,8 +2287,7 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -2535,8 +2298,7 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundEffect?: BackgroundEffectOptions; @@ -2549,8 +2311,7 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ barStyle?: BarStyle; @@ -2562,8 +2323,7 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ paddingStart?: LengthMetrics; @@ -2575,8 +2335,7 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ paddingEnd?: LengthMetrics; @@ -2587,8 +2346,7 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ mainTitleModifier?: TextModifier; @@ -2599,8 +2357,7 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ subTitleModifier?: TextModifier; @@ -2612,8 +2369,7 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ enableHoverMode?: boolean; } @@ -2625,8 +2381,7 @@ declare interface NavigationTitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum BarStyle { /** @@ -2635,8 +2390,7 @@ declare enum BarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ STANDARD = 0, @@ -2646,8 +2400,7 @@ declare enum BarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ STACK = 1, @@ -2657,8 +2410,7 @@ declare enum BarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ SAFE_AREA_PADDING = 2, } @@ -2670,8 +2422,7 @@ declare enum BarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface NavigationToolbarOptions { /** @@ -2681,8 +2432,7 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ backgroundColor?: ResourceColor; @@ -2694,8 +2444,7 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ backgroundBlurStyle?: BlurStyle; @@ -2706,8 +2455,7 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -2718,8 +2466,7 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundEffect?: BackgroundEffectOptions; @@ -2730,8 +2477,7 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ moreButtonOptions?: MoreButtonOptions; @@ -2743,8 +2489,7 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ barStyle?: BarStyle; @@ -2756,8 +2501,7 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ hideItemValue?: boolean } @@ -2769,8 +2513,7 @@ declare interface NavigationToolbarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ declare interface NavigationMenuOptions { /** @@ -2780,8 +2523,7 @@ declare interface NavigationMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ moreButtonOptions?: MoreButtonOptions; } @@ -2793,8 +2535,7 @@ declare interface NavigationMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ declare interface MoreButtonOptions { /** @@ -2804,8 +2545,7 @@ declare interface MoreButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundBlurStyle?: BlurStyle; @@ -2816,8 +2556,7 @@ declare interface MoreButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; @@ -2828,8 +2567,7 @@ declare interface MoreButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backgroundEffect?: BackgroundEffectOptions; } @@ -2856,8 +2594,8 @@ declare interface MoreButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class NavigationAttribute extends CommonMethod { /** @@ -2898,20 +2636,6 @@ declare class NavigationAttribute extends CommonMethod { */ navBarWidth(value: Length): NavigationAttribute; - /** - - * Sets the width of navigation bar. - * - * @param { Length | Bindable } value - * @returns { NavigationAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - navBarWidth(value: Length | Bindable): NavigationAttribute; - /** * Sets the position of the navigation bar. This attribute takes effect * only when the **Navigation** component is split. @@ -2943,8 +2667,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ navBarPosition(value: NavBarPosition): NavigationAttribute; @@ -2971,8 +2694,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ navBarWidthRange(value: [Dimension, Dimension]): NavigationAttribute; @@ -3003,8 +2725,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ minContentWidth(value: Dimension): NavigationAttribute; @@ -3039,8 +2760,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ mode(value: NavigationMode): NavigationAttribute; @@ -3079,8 +2799,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backButtonIcon(value: string | PixelMap | Resource | SymbolGlyphModifier): NavigationAttribute; @@ -3093,8 +2812,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ backButtonIcon(icon: string | PixelMap | Resource | SymbolGlyphModifier, accessibilityText?: ResourceStr): NavigationAttribute; @@ -3127,8 +2845,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ hideNavBar(value: boolean): NavigationAttribute; @@ -3178,8 +2895,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ title(value: ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle, options?: NavigationTitleOptions): NavigationAttribute; @@ -3223,8 +2939,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ hideTitleBar(value: boolean): NavigationAttribute; @@ -3240,8 +2955,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ hideTitleBar(hide: boolean, animated: boolean): NavigationAttribute; @@ -3276,8 +2990,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ hideBackButton(value: boolean): NavigationAttribute; @@ -3309,8 +3022,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ titleMode(value: NavigationTitleMode): NavigationAttribute; @@ -3351,8 +3063,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ menus(value: Array | CustomBuilder): NavigationAttribute; @@ -3365,8 +3076,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ menus(items: Array | CustomBuilder, options?: NavigationMenuOptions): NavigationAttribute; @@ -3404,8 +3114,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ toolbarConfiguration(value: Array | CustomBuilder, options?: NavigationToolbarOptions): NavigationAttribute; @@ -3437,8 +3146,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ hideToolBar(value: boolean): NavigationAttribute; @@ -3454,8 +3162,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ hideToolBar(hide: boolean, animated: boolean): NavigationAttribute; @@ -3467,8 +3174,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ enableToolBarAdaptation(enable: Optional): NavigationAttribute; @@ -3500,8 +3206,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute; @@ -3533,8 +3238,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onNavBarStateChange(callback: (isVisible: boolean) => void): NavigationAttribute; @@ -3547,8 +3251,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onNavigationModeChange(callback: (mode: NavigationMode) => void): NavigationAttribute; @@ -3577,19 +3280,6 @@ declare class NavigationAttribute extends CommonMethod { */ navDestination(builder: (name: string, param: unknown) => void): NavigationAttribute; - /** - * Set builder for user-defined NavDestination component. - * - * @param { PageMapBuilder | undefined } builder - The builder function of NavDestination component. - * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - navDestination(builder: PageMapBuilder | undefined): NavigationAttribute; - /** * Set custom navigation content transition animation. * @@ -3607,8 +3297,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ customNavContentTransition(delegate: (from: NavContentInfo, to: NavContentInfo, operation: NavigationOperation) => NavigationAnimatedTransition | undefined): NavigationAttribute; @@ -3623,8 +3312,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ignoreLayoutSafeArea(types?: Array, edges?: Array): NavigationAttribute; @@ -3635,8 +3323,7 @@ declare class NavigationAttribute extends CommonMethod { * @returns { NavigationAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ systemBarStyle(style: Optional): NavigationAttribute; @@ -3647,8 +3334,7 @@ declare class NavigationAttribute extends CommonMethod { * @param { boolean } recoverable - navigation can be recovered. * @returns { NavigationAttribute } Returns the instance of the NavigationAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ recoverable(recoverable: Optional): NavigationAttribute; @@ -3660,8 +3346,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ enableDragBar(isEnabled: Optional): NavigationAttribute; @@ -3673,8 +3358,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ enableModeChangeAnimation(isEnabled: Optional): NavigationAttribute; @@ -3706,8 +3390,7 @@ declare class NavigationAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice -* @since arkts {'1.1':'12','1.2':'20'} -* @arkts 1.1&1.2 +* @since 12 */ declare interface NavigationAnimatedTransition { /** @@ -3725,8 +3408,7 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onTransitionEnd?: (success: boolean) => void @@ -3745,8 +3427,7 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ timeout?: number; @@ -3758,8 +3439,7 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isInteractive?: boolean; @@ -3778,8 +3458,7 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ transition: (transitionProxy: NavigationTransitionProxy) => void } @@ -3799,8 +3478,7 @@ declare interface NavigationAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice -* @since arkts {'1.1':'12','1.2':'20'} -* @arkts 1.1&1.2 + * @since 12 */ declare interface NavigationTransitionProxy { /** @@ -3818,8 +3496,7 @@ declare interface NavigationTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ from: NavContentInfo; @@ -3838,8 +3515,7 @@ declare interface NavigationTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ to: NavContentInfo; @@ -3851,8 +3527,7 @@ declare interface NavigationTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isInteractive?: boolean; @@ -3869,8 +3544,7 @@ declare interface NavigationTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ finishTransition(): void; @@ -3886,18 +3560,6 @@ declare interface NavigationTransitionProxy { */ cancelTransition?(): void; - /** - * Notification system transition animation canceled. - * - * @type { ?VoidCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - cancelTransition?: VoidCallback; - /** * Updates the progress of this interactive transition animation. (Non-interactive * animations do not support setting the animation progress). @@ -3909,33 +3571,8 @@ declare interface NavigationTransitionProxy { * @since 12 */ updateTransition?(progress: number): void; - - /** - * Notification system transition animation update. - * - * @type { ?UpdateTransitionCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - updateTransition?: UpdateTransitionCallback; } -/** - * navigation update transition callback. - * - * @typedef { function } UpdateTransitionCallback - * @param { number } progress - Indicates the process of transition - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare type UpdateTransitionCallback = (progress: number) => void; - /** * Navigation content info. * @@ -3951,8 +3588,7 @@ declare type UpdateTransitionCallback = (progress: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface NavContentInfo { /** @@ -3970,8 +3606,7 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ name?: string; @@ -3990,8 +3625,7 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ index: number; @@ -4010,8 +3644,7 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ mode?: NavDestinationMode; @@ -4022,8 +3655,7 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ param?: Object; @@ -4034,8 +3666,7 @@ declare interface NavContentInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ navDestinationId?: string; } @@ -4060,6 +3691,7 @@ declare interface NavContentInfo { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Navigation: NavigationInterface; @@ -4083,5 +3715,6 @@ declare const Navigation: NavigationInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const NavigationInstance: NavigationAttribute; diff --git a/api/@internal/component/ets/navigator.d.ts b/api/@internal/component/ets/navigator.d.ts index 4d0851045d3ad9b5d5ec4453ea8a1ad1b35759fa..b929bf4bf8d506e5975b029c9cbdf2a13cf11efd 100644 --- a/api/@internal/component/ets/navigator.d.ts +++ b/api/@internal/component/ets/navigator.d.ts @@ -141,6 +141,7 @@ declare enum NavigationType { * @atomicservice * @since 11 * @deprecated since 13 + * @noninterop */ interface NavigatorInterface { /** @@ -225,6 +226,7 @@ interface NavigatorInterface { * @atomicservice * @since 11 * @deprecated since 13 + * @noninterop */ declare class NavigatorAttribute extends CommonMethod { /** @@ -369,6 +371,7 @@ declare class NavigatorAttribute extends CommonMethod { * @atomicservice * @since 11 * @deprecated since 13 + * @noninterop */ declare const Navigator: NavigatorInterface; @@ -393,5 +396,6 @@ declare const Navigator: NavigatorInterface; * @atomicservice * @since 11 * @deprecated since 13 + * @noninterop */ declare const NavigatorInstance: NavigatorAttribute; diff --git a/api/@internal/component/ets/node_container.d.ts b/api/@internal/component/ets/node_container.d.ts index 85dde515625b7cba65a8ee30830df501c9d15737..dd124174c3d910d2b63d043f2dd55281b000f1b4 100644 --- a/api/@internal/component/ets/node_container.d.ts +++ b/api/@internal/component/ets/node_container.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { NodeController } from '../../@ohos.arkui.node'; -import { CommonMethod } from './common'; -/*** endif */ - /** * Defines the Interface of NodeContainer. To display the node build by an associated NodeController. * @@ -38,8 +33,7 @@ import { CommonMethod } from './common'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface NodeContainerInterface { /** @@ -51,29 +45,17 @@ 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 - */ - (controller: import('../api/@ohos.arkui.node').NodeController): NodeContainerAttribute; /** * Constructor parameters * - * @param { NodeController } controller - Indicates the controller of the NodeContainer. + * @param { import('../api/@ohos.arkui.node').NodeController } controller - Indicates the controller of the NodeContainer. * @returns { NodeContainerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 - * @arkts 1.2 + * @since 12 */ - (controller: NodeController): NodeContainerAttribute; + (controller: import('../api/@ohos.arkui.node').NodeController): NodeContainerAttribute; } /** @@ -89,8 +71,8 @@ interface NodeContainerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @noninterop */ declare class NodeContainerAttribute extends CommonMethod {} @@ -108,6 +90,7 @@ declare class NodeContainerAttribute extends CommonMethod { opacity(value: number): T; } -/** - * Provides interfaces for common transitions. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare class CommonTransition { - /** - * Called when the slide in effect of the transition is set. - * - * @param { SlideEffect } value - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - slide(value: SlideEffect): this; - - /** - * Called when the translation effect of page transition is set. - * - * @param { TranslateOptions } value - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - translate(value: TranslateOptions): this; - - /** - * Called when setting the zoom effect of page transition. - * - * @param { ScaleOptions } value - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - scale(value: ScaleOptions): this; - - /** - * Called when the transparency value of the starting point of entry or the ending point of exit is set. - * - * @param { number } value - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - opacity(value: number): this; -} - /** * Defines pageTransition constructor parameters. * @@ -536,8 +457,7 @@ declare class CommonTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface PageTransitionOptions { /** @@ -559,8 +479,7 @@ declare interface PageTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ type?: RouteType; /** @@ -582,8 +501,7 @@ declare interface PageTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ duration?: number; /** @@ -608,8 +526,7 @@ declare interface PageTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ curve?: Curve | string | ICurve; /** @@ -634,8 +551,7 @@ declare interface PageTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ delay?: number; } @@ -649,8 +565,7 @@ declare interface PageTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type PageTransitionCallback = (type: RouteType, progress: number) => void; @@ -680,6 +595,7 @@ declare type PageTransitionCallback = (type: RouteType, progress: number) => voi * @crossplatform * @atomicservice * @since 11 + * @noninterop */ interface PageTransitionEnterInterface extends CommonTransition { /** @@ -755,47 +671,6 @@ interface PageTransitionEnterInterface extends CommonTransition { /** @@ -897,46 +773,6 @@ interface PageTransitionExitInterface extends CommonTransition { /** @@ -772,6 +774,7 @@ declare class PanelAttribute extends CommonMethod { * @since 11 * @deprecated since 12 * @useinstead bindSheet + * @noninterop */ declare const Panel: PanelInterface; @@ -796,5 +799,6 @@ declare const Panel: PanelInterface; * @atomicservice * @since 11 * @deprecated since 12 + * @noninterop */ declare const PanelInstance: PanelAttribute; diff --git a/api/@internal/component/ets/particle.d.ts b/api/@internal/component/ets/particle.d.ts index 3aadd3565441f17f5e21e9e2c6aedfa502f739ec..fd7a124ef37d37638f2dc9c408c0321613d0811b 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 @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { LengthMetrics, SizeT, PositionT } from '../../arkui/Graphics' -import { VP, ResourceStr,Dimension,ResourceColor } from './units' -import { ImageFit, Curve } from './enums' -import { ICurve, CommonMethod } from './common' -/*** endif */ - /** * Defines a pair of given type for particle. * @@ -32,8 +25,7 @@ import { ICurve, CommonMethod } from './common' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type ParticleTuple = [T1, T2]; @@ -44,8 +36,7 @@ declare type ParticleTuple = [T1, T2]; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface VelocityOptions { /** @@ -71,8 +62,7 @@ declare interface VelocityOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ speed: ParticleTuple; @@ -99,8 +89,7 @@ declare interface VelocityOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ angle: ParticleTuple; } @@ -173,42 +162,6 @@ declare interface AccelerationOptions< angle?: ParticlePropertyOptions; } -/** - * Defines acceleration options. - * - * @interface AccelerationOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare interface AccelerationOptions { - /** - * Speed property options. - * - * @type { ?ParticlePropertyOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - speed?: ParticlePropertyOptions; - - /** - * Angle property options. - * - * @type { ?ParticlePropertyOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - angle?: ParticlePropertyOptions; -} - /** * Defines the ParticleOptions Interface. * @interface ParticleOptions @@ -387,102 +340,6 @@ interface ParticleOptions< spin?: ParticlePropertyOptions; } -/** - * Defines the ParticleOptions Interface. - * @interface ParticleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface ParticleOptions { - /** - * Particle emitter. - * @type { EmitterOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - emitter: EmitterOptions; - - /** - * Particle color. - * @type { ?ParticleColorPropertyOptions } - * @default {range:['#FFFFFF','#FFFFFF']} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - color?: ParticleColorPropertyOptions; - - /** - * Particle opacity. - * @type { ?ParticlePropertyOptions } - * @default {range:[1.0,1.0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - opacity?: ParticlePropertyOptions; - - /** - * Particle scale. - * @type { ?ParticlePropertyOptions } - * @default {range:[1.0,1.0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - scale?: ParticlePropertyOptions; - - /** - * Particle velocity. - * - * @type { ?VelocityOptions } - * @default {speed:[0,0];angle:[0,0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - velocity?: VelocityOptions; - - /** - * Particle acceleration. - * - * @type { ?AccelerationOptions } - * @default {speed:{range:[0,0]};angle:{range:[0,0]}} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - acceleration?: AccelerationOptions; - - /** - * Particle spin. - * @type { ?ParticlePropertyOptions } - * @default {range:[0,0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - spin?: ParticlePropertyOptions; -} - /** * Defines the parameters for a point-like particle. * @interface PointParticleParameters @@ -496,8 +353,7 @@ interface ParticleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface PointParticleParameters { /** @@ -513,8 +369,7 @@ interface PointParticleParameters { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ radius: VP; } @@ -532,8 +387,7 @@ interface PointParticleParameters { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface ImageParticleParameters { /** @@ -549,8 +403,7 @@ interface ImageParticleParameters { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ src: ResourceStr; @@ -577,8 +430,7 @@ interface ImageParticleParameters { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ size: ParticleTuple; @@ -597,8 +449,7 @@ interface ImageParticleParameters { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ objectFit?: ImageFit; } @@ -654,17 +505,6 @@ interface ParticleConfigs { [ParticleType.IMAGE]: ImageParticleParameters; } -/** - * Defines the particle configs. - * @typedef {PointParticleParameters | ImageParticleParameters} ParticleConfigs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare type ParticleConfigs = PointParticleParameters | ImageParticleParameters; - /** * Defines the emitter property. * @@ -672,8 +512,7 @@ declare type ParticleConfigs = PointParticleParameters | ImageParticleParameters * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface EmitterProperty { @@ -684,8 +523,7 @@ interface EmitterProperty { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ index: number; @@ -696,8 +534,7 @@ interface EmitterProperty { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ emitRate?: number; @@ -708,8 +545,7 @@ interface EmitterProperty { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ position?: PositionT; @@ -720,8 +556,7 @@ interface EmitterProperty { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ size?: SizeT; @@ -733,7 +568,6 @@ interface EmitterProperty { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ annulusRegion?: ParticleAnnulusRegion; } @@ -883,81 +717,6 @@ interface EmitterParticleOptions { lifetimeRange?: number; } -/** - * Defines parameters of particles used by emitters. - * - * @interface EmitterParticleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface EmitterParticleOptions { - /** - * Particle type. - * - * @type { ParticleType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - type: ParticleType; - - /** - * Particle config. - * - * @type { ParticleConfigs } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - config: ParticleConfigs; - - /** - * Particle count. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - count: number; - - /** - * Particle lifetime. - * - * @type { ?number } - * @default 1000 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - lifetime?: number; - - /** - * Particle lifetimeRange,value range [0, ∞). - * when lifetimeRange>lifetime,minimum lifetime is 0. - * - * @type { ?number } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - lifetimeRange?: number; -} - /** * Defines the emitter Options. * @interface EmitterOptions @@ -1124,96 +883,6 @@ interface EmitterOptions { annulusRegion?: ParticleAnnulusRegion; } -/** - * Defines the emitter Options. - * @interface EmitterOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface EmitterOptions { - /** - * Set particle config. - * - * @type { EmitterParticleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - particle: EmitterParticleOptions; - - /** - * Emitting rate, that is, the number of particles produced per second. - * @type { ?number } - * @default 5 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - emitRate?: number; - - /** - * Shape of emitter. - * @type { ?ParticleEmitterShape } - * @default ParticleEmitterShape.RECTANGLE - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - shape?: ParticleEmitterShape; - - /** - * Position of emitter. - * The first element means X-axis location. - * The second element means the Y-axis location. - * - * @type { ?ParticleTuple } - * @default [0,0] - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - position?: ParticleTuple; - - /** - * Size of emitter. - * The first element means emitter width. - * The second element means emitter height. - * - * @type { ?ParticleTuple } - * @default ['100%','100%'] - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - size?: ParticleTuple; - - /** - * the description of the annulus region. This parameter is valid only for emitter whose shape is annulus. - * - * @type { ?ParticleAnnulusRegion } - * @default {innerRadius:LengthMetrics.vp(0),outerRadius:LengthMetrics.vp(0)} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - annulusRegion?: ParticleAnnulusRegion; -} - /** * Defines the particle property updater configs. * @interface ParticlePropertyUpdaterConfigs @@ -1294,17 +963,6 @@ interface ParticlePropertyUpdaterConfigs { [ParticleUpdater.CURVE]: Array>; } -/** - * Defines the particle property updater configs. - * @typedef { undefined | ParticleTuple | Array> } ParticlePropertyUpdaterConfigs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare type ParticlePropertyUpdaterConfigs = undefined | ParticleTuple | Array>; - /** * Defines the particle updater options. * @@ -1370,42 +1028,6 @@ interface ParticleUpdaterOptions { config: ParticlePropertyUpdaterConfigs[UPDATER]; } -/** - * Defines the particle updater options. - * - * @typedef ParticleUpdaterOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface ParticleUpdaterOptions { - /** - * Particle updater type. - * - * @type { ParticleUpdater } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - type: ParticleUpdater; - - /** - * Particle updater configuration. - * - * @type { ParticlePropertyUpdaterConfigs } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - config: ParticlePropertyUpdaterConfigs; -} - /** * Defines the particle color options. * @@ -1413,8 +1035,7 @@ interface ParticleUpdaterOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface ParticleColorOptions { /** @@ -1440,8 +1061,7 @@ interface ParticleColorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ r: ParticleTuple; @@ -1468,8 +1088,7 @@ interface ParticleColorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ g: ParticleTuple; @@ -1496,8 +1115,7 @@ interface ParticleColorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ b: ParticleTuple; @@ -1524,8 +1142,7 @@ interface ParticleColorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ a: ParticleTuple; } @@ -1595,42 +1212,6 @@ interface ParticleColorUpdaterOptions { config: ParticleColorPropertyUpdaterConfigs[UPDATER]; } -/** - * Defines the particle color updater options. - * - * @interface ParticleColorUpdaterOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface ParticleColorUpdaterOptions { - /** - * Color updater. - * - * @type { ParticleUpdater } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - type: ParticleUpdater; - - /** - * Color updater configuration. - * - * @type { ParticleColorPropertyUpdaterConfigs } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - config: ParticleColorPropertyUpdaterConfigs; -} - /** * Defines the particle property Options. * @interface ParticlePropertyOptions @@ -1705,42 +1286,6 @@ interface ParticlePropertyOptions { updater?: ParticleUpdaterOptions; } -/** - * Defines the particle property Options. - * @interface ParticlePropertyOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface ParticlePropertyOptions { - /** - * Initial range, within which the initial value are randomly generated. - * - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - range: ParticleTuple; - - /** - * Particle property updater. - * - * @type { ?ParticleUpdaterOptions } - * @default {type:UPDATER.NONE;config:undefined} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - updater?: ParticleUpdaterOptions; -} - /** * Defines the particle color property updater configs. * @interface ParticleColorPropertyUpdaterConfigs @@ -1823,17 +1368,6 @@ interface ParticleColorPropertyUpdaterConfigs { [ParticleUpdater.CURVE]: Array>; } -/** - * Defines the particle color property updater configs. - * @typedef {undefined | ParticleColorOptions | Array>} ParticleColorPropertyUpdaterConfigs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare type ParticleColorPropertyUpdaterConfigs = undefined | ParticleColorOptions | Array>; - /** * Defines the particle color property updater configs which can support generics. * @interface ParticleColorPropertyOptions @@ -1919,54 +1453,6 @@ interface ParticleColorPropertyOptions { updater?: ParticleColorUpdaterOptions; } -/** - * Defines the particle color property updater. - * @interface ParticleColorPropertyOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface ParticleColorPropertyOptions { - /** - * Initial color range, within which the initial color is randomly generated. - * - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - range: ParticleTuple; - - /** - * Distribution type of particle color. - * @type { ?DistributionType } - * @default DistributionType.UNIFORM - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - distributionType?: DistributionType; - - /** - * Particle color property updater. - * - * @type { ?ParticleColorUpdaterOptions } - * @default {type:UPDATER.NONE;config:undefined} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - updater?: ParticleColorUpdaterOptions; -} - /** * Defines the particle property lifecycle. * @interface ParticlePropertyAnimation @@ -1980,8 +1466,7 @@ interface ParticleColorPropertyOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface ParticlePropertyAnimation { /** @@ -1997,8 +1482,7 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ from: T; @@ -2015,8 +1499,7 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ to: T; @@ -2033,8 +1516,7 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ startMillis: number; @@ -2051,8 +1533,7 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ endMillis: number; @@ -2071,8 +1552,7 @@ interface ParticlePropertyAnimation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ curve?: Curve | ICurve; } @@ -2133,30 +1613,6 @@ interface Particles< >; } -/** - * Defines the Particles interface. - * - * @interface Particles - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface Particles { - /** - * Array of particles. - * - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - particles: Array; -} - /** * Defines the particle Interface. * @interface ParticleInterface @@ -2170,8 +1626,8 @@ interface Particles { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface ParticleInterface { /** @@ -2222,19 +1678,6 @@ interface ParticleInterface { ACC_ANGLE_UPDATER, SPIN_UPDATER >): ParticleAttribute; - - /** - * create a particle array. - * - * @param { Particles } particles - Array of particles. - * @returns { ParticleAttribute } Returns the particle attribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (particles: Particles): ParticleAttribute; } /** @@ -2250,8 +1693,7 @@ interface ParticleInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ParticleType { /** @@ -2265,8 +1707,7 @@ declare enum ParticleType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ POINT = 'point', @@ -2281,8 +1722,7 @@ declare enum ParticleType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ IMAGE = 'image', } @@ -2300,8 +1740,7 @@ declare enum ParticleType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ParticleEmitterShape { /** @@ -2315,8 +1754,7 @@ declare enum ParticleEmitterShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ RECTANGLE = 'rectangle', @@ -2331,8 +1769,7 @@ declare enum ParticleEmitterShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ CIRCLE = 'circle', @@ -2347,8 +1784,7 @@ declare enum ParticleEmitterShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ ELLIPSE = 'ellipse', @@ -2358,7 +1794,6 @@ declare enum ParticleEmitterShape { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ ANNULUS = 'annulus', } @@ -2370,8 +1805,7 @@ declare enum ParticleEmitterShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum DistributionType { /** @@ -2380,19 +1814,17 @@ declare enum DistributionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ UNIFORM = 0, /** * Gaussian distribution. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ GAUSSIAN = 1, } @@ -2410,8 +1842,7 @@ declare enum DistributionType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ParticleUpdater { /** @@ -2425,8 +1856,7 @@ declare enum ParticleUpdater { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ NONE = 'none', @@ -2441,8 +1871,7 @@ declare enum ParticleUpdater { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ RANDOM = 'random', @@ -2457,8 +1886,7 @@ declare enum ParticleUpdater { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ CURVE = 'curve', } @@ -2474,7 +1902,7 @@ declare enum ParticleUpdater { */ declare type SizeT = import('../api/arkui/Graphics').SizeT; - /** +/** * Defines the PositionT type. * * @typedef { import('../api/arkui/Graphics').PositionT } @@ -2498,8 +1926,8 @@ declare type PositionT = import('../api/arkui/Graphics').PositionT; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class ParticleAttribute extends CommonMethod { /** @@ -2510,8 +1938,7 @@ declare class ParticleAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ disturbanceFields(fields: Array): ParticleAttribute; @@ -2523,8 +1950,7 @@ declare class ParticleAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ emitter(value : Array) : ParticleAttribute; } @@ -2541,6 +1967,7 @@ declare class ParticleAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Particle: ParticleInterface; @@ -2550,8 +1977,7 @@ declare const Particle: ParticleInterface; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface DisturbanceFieldOptions { @@ -2565,8 +1991,7 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ strength?: number; @@ -2578,8 +2003,7 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ shape?: DisturbanceFieldShape; @@ -2591,8 +2015,7 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ size?: SizeT; @@ -2604,8 +2027,7 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ position?: PositionT; @@ -2621,8 +2043,7 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ feather?: number; @@ -2634,12 +2055,11 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ noiseScale?: number; - /** + /** * Noise frequency with a value greater or equal 0. * * @type { ?number } @@ -2647,8 +2067,7 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ noiseFrequency?: number; @@ -2660,8 +2079,7 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ noiseAmplitude?: number; } @@ -2673,8 +2091,7 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum DisturbanceFieldShape { @@ -2684,21 +2101,19 @@ declare enum DisturbanceFieldShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - RECT, + RECT = 0, - /** + /** * Shape circle. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - CIRCLE, + CIRCLE = 1, /** * Shape eclipse. @@ -2706,11 +2121,9 @@ declare enum DisturbanceFieldShape { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - ELLIPSE - + ELLIPSE = 2 } /** @@ -2720,7 +2133,6 @@ declare enum DisturbanceFieldShape { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ declare interface ParticleAnnulusRegion { /** @@ -2732,7 +2144,6 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ center?: PositionT, /** @@ -2743,7 +2154,6 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ outerRadius: LengthMetrics, /** @@ -2754,7 +2164,6 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ innerRadius: LengthMetrics, /** @@ -2766,7 +2175,6 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ startAngle?: number, /** @@ -2778,7 +2186,6 @@ declare interface ParticleAnnulusRegion { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ endAngle?: number, } diff --git a/api/@internal/component/ets/path.d.ts b/api/@internal/component/ets/path.d.ts index af9beaf1e7acff17ad84962154285274ca184989..cc93a3eff54c8a200cf3a0659b23ba7e6389ed7d 100644 --- a/api/@internal/component/ets/path.d.ts +++ b/api/@internal/component/ets/path.d.ts @@ -18,10 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonShapeMethod } from './common'; -/*** endif */ - /** * Define options used to construct a path. * @@ -30,8 +26,7 @@ import { CommonShapeMethod } from './common'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface PathOptions { /** @@ -224,6 +219,7 @@ declare interface PathOptions { * @form * @atomicservice * @since 11 + * @noninterop */ interface PathInterface { /** @@ -363,8 +359,8 @@ interface PathInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class PathAttribute extends CommonShapeMethod { /** @@ -448,6 +444,7 @@ declare class PathAttribute extends CommonShapeMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Path: PathInterface; @@ -480,32 +477,6 @@ declare const Path: PathInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const PathInstance: PathAttribute; - -/** - * Provides the path drawing interface. - * - * @interface PathInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface PathInterface { - /** - * Called when drawing path. - * - * @param { PathOptions } [options] - path options - * @returns { PathAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (options?: PathOptions): PathAttribute; -} \ No newline at end of file diff --git a/api/@internal/component/ets/pattern_lock.d.ts b/api/@internal/component/ets/pattern_lock.d.ts index 3512f08dae2bfe7d79c78149e750bc74d4e6b4d1..9231675816a0d9ac46069d591ce107c9f458724b 100644 --- a/api/@internal/component/ets/pattern_lock.d.ts +++ b/api/@internal/component/ets/pattern_lock.d.ts @@ -18,12 +18,6 @@ * @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 } @@ -37,8 +31,7 @@ import { CommonMethod, Callback, Optional } from './common' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum PatternLockChallengeResult { /** @@ -52,8 +45,7 @@ declare enum PatternLockChallengeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ CORRECT = 1, /** @@ -67,8 +59,7 @@ declare enum PatternLockChallengeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ WRONG = 2 } @@ -80,8 +71,7 @@ declare enum PatternLockChallengeResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface CircleStyleOptions { /** @@ -91,8 +81,7 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ color?: ResourceColor; @@ -103,8 +92,7 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ radius?: LengthMetrics; @@ -115,8 +103,7 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableWaveEffect?: boolean; @@ -127,8 +114,7 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ enableForeground?: boolean; } @@ -152,8 +138,7 @@ declare interface CircleStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class PatternLockController { /** @@ -175,8 +160,7 @@ declare class PatternLockController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(); @@ -202,16 +186,6 @@ 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. @@ -226,8 +200,7 @@ declare class PatternLockController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setChallengeResult(result: PatternLockChallengeResult): void; } @@ -254,8 +227,7 @@ declare class PatternLockController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface PatternLockInterface { /** @@ -283,8 +255,7 @@ interface PatternLockInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ (controller?: PatternLockController): PatternLockAttribute; } @@ -311,8 +282,7 @@ interface PatternLockInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class PatternLockAttribute extends CommonMethod { /** @@ -344,8 +314,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ sideLength(value: Length): PatternLockAttribute; @@ -378,8 +347,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ circleRadius(value: Length): PatternLockAttribute; @@ -408,8 +376,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundColor(value: ResourceColor): PatternLockAttribute; @@ -438,8 +405,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ regularColor(value: ResourceColor): PatternLockAttribute; @@ -468,8 +434,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ selectedColor(value: ResourceColor): PatternLockAttribute; @@ -498,8 +463,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ activeColor(value: ResourceColor): PatternLockAttribute; @@ -528,8 +492,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pathColor(value: ResourceColor): PatternLockAttribute; @@ -562,8 +525,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pathStrokeWidth(value: number | string): PatternLockAttribute; @@ -592,8 +554,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onPatternComplete(callback: (input: Array) => void): PatternLockAttribute; @@ -624,8 +585,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ autoReset(value: boolean): PatternLockAttribute; @@ -648,19 +608,7 @@ declare class PatternLockAttribute extends CommonMethod { * @since 12 */ onDotConnect(callback: import('../api/@ohos.base').Callback): PatternLockAttribute; - - /** - * Called when connecting to a grid dot. - * @param { Callback } callback - A callback instance used when connection to a grid dot. - * @returns { PatternLockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onDotConnect(callback: Callback): PatternLockAttribute; - + /** * Sets the background circle style for the dots in a grid when they are in the activated state. * @@ -669,8 +617,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ activateCircleStyle(options: Optional): PatternLockAttribute; @@ -683,8 +630,7 @@ declare class PatternLockAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ skipUnselectedPoint(skipped: boolean): PatternLockAttribute; } diff --git a/api/@internal/component/ets/plugin_component.d.ts b/api/@internal/component/ets/plugin_component.d.ts index c5749cdb6a647b081fe9f5f70347bb10aaae99aa..983d1b7f151aa6467ab28c711170360fe429a67f 100644 --- a/api/@internal/component/ets/plugin_component.d.ts +++ b/api/@internal/component/ets/plugin_component.d.ts @@ -18,19 +18,13 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod } from './common' -import { VoidCallback } from './units' -/*** endif */ - /** * PluginComponentTemplate * * @interface PluginComponentTemplate * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'9','1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ interface PluginComponentTemplate { /** @@ -39,8 +33,7 @@ interface PluginComponentTemplate { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'9','1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ source: string; /** @@ -49,8 +42,7 @@ interface PluginComponentTemplate { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'9','1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ bundleName: string; } @@ -62,8 +54,7 @@ interface PluginComponentTemplate { * @interface PluginComponentOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface PluginComponentOptions { /** @@ -79,8 +70,7 @@ declare interface PluginComponentOptions { * @type { PluginComponentTemplate } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ template: PluginComponentTemplate; @@ -100,16 +90,6 @@ declare interface PluginComponentOptions { * @since 18 */ data: any; - /** - * Plugin component data. - * AnonyMous Object Rectification - * @type { Object|undefined|null } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - * @arkts 1.2 - */ - data: Object|undefined|null; } /** @@ -119,8 +99,7 @@ declare interface PluginComponentOptions { * @interface PluginErrorData * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface PluginErrorData { /** @@ -136,8 +115,7 @@ declare interface PluginErrorData { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ errcode: number; @@ -154,8 +132,7 @@ declare interface PluginErrorData { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ msg: string; } @@ -168,8 +145,7 @@ declare interface PluginErrorData { * @param { PluginErrorData } info - Plugin error data * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type PluginErrorCallback = (info: PluginErrorData) => void; @@ -179,8 +155,8 @@ declare type PluginErrorCallback = (info: PluginErrorData) => void; * @interface PluginComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'9','1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 + * @noninterop */ interface PluginComponentInterface { /** @@ -200,8 +176,7 @@ interface PluginComponentInterface { * @returns { PluginComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options: PluginComponentOptions): PluginComponentAttribute; } @@ -212,8 +187,8 @@ interface PluginComponentInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'9','1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 + * @noninterop */ declare class PluginComponentAttribute extends CommonMethod { /** @@ -233,8 +208,7 @@ declare class PluginComponentAttribute extends CommonMethod { /** @@ -356,20 +351,6 @@ declare class PolygonAttribute extends CommonShapeMethod { * @since 11 */ points(value: Array): PolygonAttribute; - - /** - * Called when the vertex coordinate list of a polygon is set. - * - * @param { Array } value - * @returns { PolygonAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - points(value: Array): PolygonAttribute; } /** @@ -401,6 +382,7 @@ declare class PolygonAttribute extends CommonShapeMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Polygon: PolygonInterface; @@ -433,32 +415,6 @@ declare const Polygon: PolygonInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const PolygonInstance: PolygonAttribute; - -/** - * Provides the polygon drawing interface. - * - * @interface PolygonInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface PolygonInterface { - /** - * Called when drawing a polygon. - * - * @param { PolygonOptions } [options] - Polygon options - * @returns { PolygonAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (options?: PolygonOptions): PolygonAttribute; -} diff --git a/api/@internal/component/ets/polyline.d.ts b/api/@internal/component/ets/polyline.d.ts index f6937400d1df320eaad4e6c3b7b8da67a9447419..731954a5a3ba4f8f7db3d8e02599bd98afd9602b 100644 --- a/api/@internal/component/ets/polyline.d.ts +++ b/api/@internal/component/ets/polyline.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonShapeMethod } from './common'; -import { ShapePoint } from './line'; -/*** endif */ - /** * Define options used to construct a polyline. * @@ -31,8 +26,7 @@ import { ShapePoint } from './line'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface PolylineOptions { /** @@ -183,6 +177,7 @@ declare interface PolylineOptions { * @form * @atomicservice * @since 11 + * @noninterop */ interface PolylineInterface { /** @@ -306,8 +301,8 @@ interface PolylineInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class PolylineAttribute extends CommonShapeMethod { /** @@ -349,20 +344,6 @@ declare class PolylineAttribute extends CommonShapeMethod { * @since 11 */ points(value: Array): PolylineAttribute; - - /** - * Called when the polyline is set to pass through the coordinate point list. - * - * @param { Array } value - * @returns { PolylineAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - points(value: Array): PolylineAttribute; } /** @@ -394,6 +375,7 @@ declare class PolylineAttribute extends CommonShapeMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Polyline: PolylineInterface; @@ -426,32 +408,6 @@ declare const Polyline: PolylineInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const PolylineInstance: PolylineAttribute; - -/** - * Provides an interface for drawing polylines. - * - * @interface PolylineInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface PolylineInterface { - /** - * Set options for polyline component. - * - * @param { PolylineOptions } [options] - Poly line options - * @returns { PolylineAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (options?: PolylineOptions): PolylineAttribute; -} diff --git a/api/@internal/component/ets/progress.d.ts b/api/@internal/component/ets/progress.d.ts index 9b2aca0d3af7f4bd91b5976ec74af9944dbb1674..2413ca6a2fbcca66c710a46e740a42185ec577e7 100644 --- a/api/@internal/component/ets/progress.d.ts +++ b/api/@internal/component/ets/progress.d.ts @@ -18,14 +18,6 @@ * @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. * @@ -60,1813 +52,1620 @@ import { LengthMetrics } from '../Graphics' * @atomicservice * @since 11 */ -declare interface ProgressOptions { - /** - * Sets the value of Progress. - * - * @type { number } + declare interface ProgressOptions { + /** + * Sets the value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Sets the value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + value: number; + + /** + * Sets the total of Progress. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Sets the total of Progress. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Sets the total of Progress. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the total of Progress. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + total?: number; + + /** + * Sets the style of Progress. + * + * @type { ?ProgressStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + * @deprecated since 8 + * @useinstead type + */ + style?: ProgressStyle + + /** + * Sets the type of Progress. + * + * @type { ?Type } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Sets the type of Progress. + * + * @type { ?Type } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Sets the type of Progress. + * + * @type { ?Type } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the type of Progress. + * + * @type { ?Type } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + type?: Type + } + + /** + * Type of progress bar + * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 + * @since 8 */ /** - * Sets the value of Progress. + * Type of progress bar * - * @type { number } + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the value of Progress. + * Type of progress bar * - * @type { number } + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Sets the value of Progress. + * Type of progress bar * - * @type { number } + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - value: number; - - /** - * Sets the total of Progress. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sets the total of Progress. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Sets the total of Progress. - * - * @type { ?number } + declare enum ProgressType { + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Linear = 0, + + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Ring = 1, + + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Eclipse = 2, + + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + ScaleRing = 3, + + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Capsule = 4 + } + + /** + * Current status of progress bar. + * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form * @since 10 */ /** - * Sets the total of Progress. + * Current status of progress bar. * - * @type { ?number } + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice * @since 11 */ - total?: number; - - /** - * Sets the style of Progress. - * - * @type { ?ProgressStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 8 - * @useinstead type - */ - style?: ProgressStyle - - /** - * Sets the type of Progress. - * - * @type { ?Type } + declare enum ProgressStatus { + /** + * Loading status. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Loading status. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + LOADING, + + /** + * Processing status. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Processing status. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + PROGRESSING + } + + /** + * Defines style options for progress component. + * + * @extends CommonProgressStyleOptions + * @interface ProgressStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Sets the type of Progress. + * Defines style options for progress component. * - * @type { ?Type } + * @extends CommonProgressStyleOptions + * @interface ProgressStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Sets the type of Progress. + * Defines style options for progress component. * - * @type { ?Type } + * @extends CommonProgressStyleOptions + * @interface ProgressStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Sets the type of Progress. + * Defines style options for progress component. * - * @type { ?Type } + * @extends CommonProgressStyleOptions + * @interface ProgressStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - 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 } + declare interface ProgressStyleOptions extends CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + strokeWidth?: Length; + + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + scaleCount?: number; + + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + scaleWidth?: Length; + } + + /** + * Progress common style options. + * + * @interface CommonProgressStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 + * @since 10 */ - value: number; - /** - * Sets the total of Progress. + * Progress common style options. * - * @type { ?number } + * @interface CommonProgressStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since 20 - * @arkts 1.2 + * @since 11 + */ + declare interface CommonProgressStyleOptions { + /** + * Enable smooth effect. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Enable smooth effect. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + enableSmoothEffect?: boolean; + } + + /** + * Defines the enable scan effect. + * + * @interface ScanEffectOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 */ - total?: number; - /** - * Sets the type of Progress. + * Defines the enable scan effect. * - * @type { ?ProgressType } + * @interface ScanEffectOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since 20 - * @arkts 1.2 + * @since 11 */ - type?: ProgressType -} -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum ProgressType { - /** - * Linear progress bar style. - * + declare interface ScanEffectOptions { + /** + * Enable scan effect. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Enable scan effect. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + enableScanEffect?: boolean; + } + + /** + * Defines the Eclipse style Options. + * + * @extends CommonProgressStyleOptions + * @interface EclipseStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 10 */ /** - * Linear progress bar style. + * Defines the Eclipse style Options. * + * @extends CommonProgressStyleOptions + * @interface EclipseStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 + * @atomicservice + * @since 11 */ + declare interface EclipseStyleOptions extends CommonProgressStyleOptions { + + } + /** - * Linear progress bar style. + * Defines the ScaleRing style Options. * + * @extends CommonProgressStyleOptions + * @interface ScaleRingStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form * @since 10 */ /** - * Linear progress bar style. + * Defines the ScaleRing style Options. * + * @extends CommonProgressStyleOptions + * @interface ScaleRingStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Linear = 0, - - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 + * @since 11 */ - /** - * Ring progress bar. - * + declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + strokeWidth?: Length; + + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the scaleWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + scaleWidth?: Length; + + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the scaleCount property. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + scaleCount?: number; + } + + /** + * Defines the ring style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface RingStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form * @since 10 */ /** - * Ring progress bar. + * Defines the ring style Options. * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface RingStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - Ring = 1, - - /** - * Eclipse progress bar. - * + declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + strokeWidth?: Length; + + /** + * Enables progress shadow. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Enables progress shadow. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + shadow?: boolean; + + /** + * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. + * + * @type { ?ProgressStatus } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. + * + * @type { ?ProgressStatus } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + status?: ProgressStatus; + } + + /** + * Defines the linear style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface LinearStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 10 */ /** - * Eclipse progress bar. + * Defines the linear style Options. * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface LinearStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 + * @crossplatform + * @atomicservice + * @since 11 */ - /** - * Eclipse progress bar. - * + declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the strokeWidth property. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + strokeWidth?: Length; + /** + * Defines the stroke radius property. + * + * @type { ?(PX | VP | LPX | Resource) } + * @default strokeWidth / 2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the stroke radius property. + * + * @type { ?(PX | VP | LPX | Resource) } + * @default strokeWidth / 2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + strokeRadius?: PX | VP | LPX | Resource; + } + + /** + * Defines the capsule style Options. + * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface CapsuleStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form * @since 10 */ /** - * Eclipse progress bar. + * Defines the capsule style Options. * + * @extends ScanEffectOptions, CommonProgressStyleOptions + * @interface CapsuleStyleOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - Eclipse = 2, - - /** - * ScaleRing progress bar. - * + declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { + /** + * Set the inner border color. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the inner border color. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + borderColor?: ResourceColor; + + /** + * Set the border width. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the border width. + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + borderWidth?: Length; + + /** + * Set the text content. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the text content. + * + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Set the text content. + * + * @type { ?ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + content?: ResourceStr; + + /** + * Set the text style. + * + * @type { ?Font } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the text style. + * + * @type { ?Font } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + font?: Font; + + /** + * Set the text fontColor. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Set the text fontColor. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + fontColor?: ResourceColor; + + /** + * show default percentage. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * show default percentage. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + showDefaultPercentage?: boolean; + + /** + * Set border rounded corner radius. + * + * @type { ?LengthMetrics } + * @default height / 2 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + borderRadius?: LengthMetrics; + } + + /** + * Type of progress bar + * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 7 */ /** - * ScaleRing progress bar. + * Type of progress bar * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * ScaleRing progress bar. + * Type of progress bar * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * ScaleRing progress bar. + * Type of progress bar * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - ScaleRing = 3, - - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 + * @since 11 */ - /** - * Capsule progress bar. - * + declare enum ProgressStyle { + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Linear progress bar style. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Linear, + + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Ring progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Ring, + + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Eclipse progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Eclipse, + + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * ScaleRing progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + ScaleRing, + + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Capsule progress bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + Capsule, + } + + /** + * Defines the map for progress type and style. + * + * @interface ProgressStyleMap * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form * @since 10 */ /** - * Capsule progress bar. + * Defines the map for progress type and style. * + * @interface ProgressStyleMap * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - Capsule = 4 -} - -/** - * Current status of progress bar. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Current status of progress bar. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum ProgressStatus { - /** - * Loading status. - * + declare interface ProgressStyleMap { + /** + * Defines the map for Linear progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for Linear progress. + * + * @type { LinearStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.Linear]: LinearStyleOptions | ProgressStyleOptions; + + /** + * Defines the map for Ring progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for Ring progress. + * + * @type { RingStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.Ring]: RingStyleOptions | ProgressStyleOptions; + + /** + * Defines the map for Eclipse progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for Eclipse progress. + * + * @type { EclipseStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.Eclipse]: EclipseStyleOptions | ProgressStyleOptions; + + /** + * Defines the map for ScaleRing progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for ScaleRing progress. + * + * @type { ScaleRingStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.ScaleRing]: ScaleRingStyleOptions | ProgressStyleOptions; + + /** + * Defines the map for Capsule progress. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Defines the map for Capsule progress. + * + * @type { CapsuleStyleOptions | ProgressStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 11 + */ + [ProgressType.Capsule]: CapsuleStyleOptions | ProgressStyleOptions; + } + + /** + * Provides the progress bar interface. + * + * @interface ProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 + * @since 7 */ /** - * Loading status. + * Provides the progress bar interface. * + * @interface ProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @form + * @since 9 */ - LOADING, - /** - * Processing status. + * Provides the progress bar interface. * + * @interface ProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form * @since 10 */ /** - * Processing status. + * Provides the progress bar interface. * + * @interface ProgressInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform + * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - PROGRESSING -} - -/** - * Defines style options for progress component. - * - * @extends CommonProgressStyleOptions - * @interface ProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines style options for progress component. - * - * @extends CommonProgressStyleOptions - * @interface ProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines style options for progress component. - * - * @extends CommonProgressStyleOptions - * @interface ProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines style options for progress component. - * - * @extends CommonProgressStyleOptions - * @interface ProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface ProgressStyleOptions extends CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } + interface ProgressInterface { + /** + * Called when the progress bar is set. + * + * @param { ProgressOptions } options + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the progress bar is set. + * + * @param { ProgressOptions } options + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the progress bar is set. + * + * @param { ProgressOptions } options + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the progress bar is set. + * + * @param { ProgressOptions } options + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + (options: ProgressOptions): ProgressAttribute; + } + + /** + * Defines the progress attribute functions. + * + * @extends CommonMethod> * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 7 */ /** - * Defines the strokeWidth property. + * Defines the progress attribute functions. * - * @type { ?Length } + * @extends CommonMethod> * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines the strokeWidth property. + * Defines the progress attribute functions. * - * @type { ?Length } + * @extends CommonMethod> * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines the strokeWidth property. + * Defines the progress attribute functions. * - * @type { ?Length } + * @extends CommonMethod> * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - strokeWidth?: Length; - - /** - * Defines the scaleCount property. + declare class ProgressAttribute extends CommonMethod> { + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the current progress value is set. + * + * @param { number } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + value(value: number): ProgressAttribute; + + /** + * Called when the progress bar foreground is set. + * + * @param { ResourceColor | LinearGradient } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the progress bar foreground is set. + * + * @param { ResourceColor | LinearGradient } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * 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 + * @since 10 + */ + /** + * 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 11 + */ + color(value: ResourceColor | LinearGradient): ProgressAttribute; + + /** + * Called when the style of progress bar is set. + * + * @param { Style } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the style of progress bar is set. + * + * @param { Style } value + * @returns { ProgressAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the style of progress bar is set. + * + * @param { Style } value - indicates the style of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the style of progress bar is set. + * + * @param { Style } value - indicates the style of the progress. + * @returns { ProgressAttribute } the attribute of the progress. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + style(value: Style): 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 12 + */ + 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 12 + */ + contentModifier(modifier: ContentModifier): ProgressAttribute; + } + + /** + * ProgressConfiguration used by progress contentModifier + * + * @extends CommonConfiguration + * @interface ProgressConfiguration + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + declare interface ProgressConfiguration extends CommonConfiguration { + /** + * The value of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + value: number; + + /** + * The total of Progress. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + total: number; + } + + /** + * Defines Progress Component. * - * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 7 */ /** - * Defines the scaleCount property. + * Defines Progress Component. * - * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines the scaleCount property. + * Defines Progress Component. * - * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines the scaleCount property. + * Defines Progress Component. * - * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - scaleCount?: number; - + declare const Progress: ProgressInterface; + /** - * Defines the scaleWidth property. + * Defines Progress Component instance. * - * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 + * @since 7 */ /** - * Defines the scaleWidth property. + * Defines Progress Component instance. * - * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Defines the scaleWidth property. + * Defines Progress Component instance. * - * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Defines the scaleWidth property. + * Defines Progress Component instance. * - * @type { ?Length } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - scaleWidth?: Length; -} - -/** - * Progress common style options. - * - * @interface CommonProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Progress common style options. - * - * @interface CommonProgressStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface CommonProgressStyleOptions { - /** - * Enable smooth effect. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Enable smooth effect. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - enableSmoothEffect?: boolean; -} - -/** - * Defines the enable scan effect. - * - * @interface ScanEffectOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the enable scan effect. - * - * @interface ScanEffectOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface ScanEffectOptions { - /** - * Enable scan effect. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Enable scan effect. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableScanEffect?: boolean; -} - -/** - * Defines the Eclipse style Options. - * - * @extends CommonProgressStyleOptions - * @interface EclipseStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the Eclipse style Options. - * - * @extends CommonProgressStyleOptions - * @interface EclipseStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface EclipseStyleOptions extends CommonProgressStyleOptions { - -} - -/** - * Defines the ScaleRing style Options. - * - * @extends CommonProgressStyleOptions - * @interface ScaleRingStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the ScaleRing style Options. - * - * @extends CommonProgressStyleOptions - * @interface ScaleRingStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface ScaleRingStyleOptions extends CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - strokeWidth?: Length; - - /** - * Defines the scaleWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the scaleWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - scaleWidth?: Length; - - /** - * Defines the scaleCount property. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the scaleCount property. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - scaleCount?: number; -} - -/** - * Defines the ring style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface RingStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the ring style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface RingStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface RingStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - strokeWidth?: Length; - - /** - * Enables progress shadow. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Enables progress shadow. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - shadow?: boolean; - - /** - * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. - * - * @type { ?ProgressStatus } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The status of progress, default is PROGRESSING. Set to LOADING status will trigger the loading animation. - * - * @type { ?ProgressStatus } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - status?: ProgressStatus; -} - -/** - * Defines the linear style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface LinearStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the linear style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface LinearStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface LinearStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the strokeWidth property. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - strokeWidth?: Length; - /** - * Defines the stroke radius property. - * - * @type { ?(PX | VP | LPX | Resource) } - * @default strokeWidth / 2 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the stroke radius property. - * - * @type { ?(PX | VP | LPX | Resource) } - * @default strokeWidth / 2 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - strokeRadius?: PX | VP | LPX | Resource; -} - -/** - * Defines the capsule style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface CapsuleStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the capsule style Options. - * - * @extends ScanEffectOptions, CommonProgressStyleOptions - * @interface CapsuleStyleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface CapsuleStyleOptions extends ScanEffectOptions, CommonProgressStyleOptions { - /** - * Set the inner border color. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the inner border color. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - borderColor?: ResourceColor; - - /** - * Set the border width. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the border width. - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - borderWidth?: Length; - - /** - * Set the text content. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the text content. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Set the text content. - * - * @type { ?ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - content?: ResourceStr; - - /** - * Set the text style. - * - * @type { ?Font } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the text style. - * - * @type { ?Font } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - font?: Font; - - /** - * Set the text fontColor. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the text fontColor. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontColor?: ResourceColor; - - /** - * show default percentage. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * show default percentage. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - showDefaultPercentage?: boolean; - - /** - * Set border rounded corner radius. - * - * @type { ?LengthMetrics } - * @default height / 2 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - borderRadius?: LengthMetrics; -} - -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Type of progress bar - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum ProgressStyle { - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Linear progress bar style. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Linear, - - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Ring progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Ring, - - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Eclipse progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Eclipse, - - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * ScaleRing progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - ScaleRing, - - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Capsule progress bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Capsule, -} - -/** - * Defines the map for progress type and style. - * - * @interface ProgressStyleMap - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Defines the map for progress type and style. - * - * @interface ProgressStyleMap - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface ProgressStyleMap { - /** - * Defines the map for Linear progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for Linear progress. - * - * @type { LinearStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.Linear]: LinearStyleOptions | ProgressStyleOptions; - - /** - * Defines the map for Ring progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for Ring progress. - * - * @type { RingStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.Ring]: RingStyleOptions | ProgressStyleOptions; - - /** - * Defines the map for Eclipse progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for Eclipse progress. - * - * @type { EclipseStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.Eclipse]: EclipseStyleOptions | ProgressStyleOptions; - - /** - * Defines the map for ScaleRing progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for ScaleRing progress. - * - * @type { ScaleRingStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.ScaleRing]: ScaleRingStyleOptions | ProgressStyleOptions; - - /** - * Defines the map for Capsule progress. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Defines the map for Capsule progress. - * - * @type { CapsuleStyleOptions | ProgressStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - [ProgressType.Capsule]: CapsuleStyleOptions | ProgressStyleOptions; -} - -/** - * Provides the progress bar interface. - * - * @interface ProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Provides the progress bar interface. - * - * @interface ProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Provides the progress bar interface. - * - * @interface ProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Provides the progress bar interface. - * - * @interface ProgressInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface ProgressInterface { - /** - * Called when the progress bar is set. - * - * @param { ProgressOptions } options - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the progress bar is set. - * - * @param { ProgressOptions } options - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the progress bar is set. - * - * @param { ProgressOptions } options - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the progress bar is set. - * - * @param { ProgressOptions } options - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @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; -} - -/** - * Defines the progress attribute functions. - * - * @extends CommonMethod> - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines the progress attribute functions. - * - * @extends CommonMethod> - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines the progress attribute functions. - * - * @extends CommonMethod> - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines the progress attribute functions. - * - * @extends CommonMethod> - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare class ProgressAttribute extends CommonMethod> { - /** - * Called when the current progress value is set. - * - * @param { number } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the current progress value is set. - * - * @param { number } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the current progress value is set. - * - * @param { number } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the current progress value is set. - * - * @param { number } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - value(value: number): ProgressAttribute; - - /** - * Called when the progress bar foreground is set. - * - * @param { ResourceColor | LinearGradient } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the progress bar foreground is set. - * - * @param { ResourceColor | LinearGradient } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * 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 - * @since 10 - */ - /** - * 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 11 - */ - color(value: ResourceColor | LinearGradient): ProgressAttribute; - - /** - * Called when the style of progress bar is set. - * - * @param { Style } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the style of progress bar is set. - * - * @param { Style } value - * @returns { ProgressAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ - /** - * Called when the style of progress bar is set. - * - * @param { Style } value - indicates the style of the progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Called when the style of progress bar is set. - * - * @param { Style } value - indicates the style of the progress. - * @returns { ProgressAttribute } the attribute of the progress. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - style(value: Style): 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 12 - */ - 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 12 - */ - contentModifier(modifier: ContentModifier): 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 - * - * @extends CommonConfiguration - * @interface ProgressConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface ProgressConfiguration extends CommonConfiguration { - /** - * The value of Progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - value: number; - - /** - * The total of Progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - total: number; -} - -/** - * Defines Progress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines Progress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines Progress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines Progress Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare const Progress: ProgressInterface; - -/** - * Defines Progress Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines Progress Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines Progress Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines Progress Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare const ProgressInstance: ProgressAttribute; + declare const ProgressInstance: ProgressAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/qrcode.d.ts b/api/@internal/component/ets/qrcode.d.ts index 6d177af95a9ef1d8c23ada6fa7252ab2a094211f..ef9932eecfd28f2554c376d2c714606540a5eb51 100644 --- a/api/@internal/component/ets/qrcode.d.ts +++ b/api/@internal/component/ets/qrcode.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod } from './common' -import { ResourceColor, ResourceStr } from './units' -import { Resource } from '../../global/resource' -/*** endif */ - /** * Provides an interface for generating QR codes. * @@ -56,262 +50,257 @@ import { Resource } from '../../global/resource' * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ -interface QRCodeInterface { + interface QRCodeInterface { + /** + * Called when a QR code is set. + * + * @param { string } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when a QR code is set. + * + * @param { string } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when a QR code is set. + * + * @param { string } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when a QR code is set. + * + * @param { string } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Called when a QR code is set. + * + * @param { ResourceStr } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + (value: ResourceStr): QRCodeAttribute; + } + /** - * Called when a QR code is set. + * Defines the qrcode attribute functions. * - * @param { string } value - * @returns { QRCodeAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Called when a QR code is set. + * Defines the qrcode attribute functions. * - * @param { string } value - * @returns { QRCodeAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Called when a QR code is set. + * Defines the qrcode attribute functions. * - * @param { string } value - * @returns { QRCodeAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Called when a QR code is set. + * Defines the qrcode attribute functions. * - * @param { string } value - * @returns { QRCodeAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ + declare class QRCodeAttribute extends CommonMethod { + /** + * Called when the QR code color is set. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when the QR code color is set. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when the QR code color is set. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the QR code color is set. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + color(value: ResourceColor): QRCodeAttribute; + + /** + * Called when setting the QR code background color. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 7 + */ + /** + * Called when setting the QR code background color. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @since 9 + */ + /** + * Called when setting the QR code background color. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when setting the QR code background color. + * + * @param { ResourceColor } value + * @returns { QRCodeAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + backgroundColor(value: ResourceColor): QRCodeAttribute; + + /** + * Set the opacity of the QR code content color. + * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. + * @returns { QRCodeAttribute } the attribute of the QR code + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Set the opacity of the QR code content color. + * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. + * @returns { QRCodeAttribute } the attribute of the QR code + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + contentOpacity(value: number | Resource): QRCodeAttribute; + } + /** - * Called when a QR code is set. + * Defines QRCode Component. * - * @param { ResourceStr } value - * @returns { QRCodeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - (value: ResourceStr): QRCodeAttribute; -} - -/** - * Defines the qrcode attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines the qrcode attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines the qrcode attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines the qrcode attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class QRCodeAttribute extends CommonMethod { - /** - * Called when the QR code color is set. - * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Called when the QR code color is set. + * Defines QRCode Component. * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Called when the QR code color is set. + * Defines QRCode Component. * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Called when the QR code color is set. + * Defines QRCode Component. * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - color(value: ResourceColor): QRCodeAttribute; - + declare const QRCode: QRCodeInterface; + /** - * Called when setting the QR code background color. + * Defines QRCode Component instance. * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 */ /** - * Called when setting the QR code background color. + * Defines QRCode Component instance. * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @since 9 */ /** - * Called when setting the QR code background color. + * Defines QRCode Component instance. * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Called when setting the QR code background color. + * Defines QRCode Component instance. * - * @param { ResourceColor } value - * @returns { QRCodeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - backgroundColor(value: ResourceColor): QRCodeAttribute; - - /** - * Set the opacity of the QR code content color. - * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. - * @returns { QRCodeAttribute } the attribute of the QR code - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @since 11 */ - /** - * Set the opacity of the QR code content color. - * @param { number | Resource } value - indicates the opacity of the QR code content color. The value is between 0 and 1, with a default value of 1. - * @returns { QRCodeAttribute } the attribute of the QR code - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - contentOpacity(value: number | Resource): QRCodeAttribute; -} - -/** - * Defines QRCode Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines QRCode Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines QRCode Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines QRCode Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare const QRCode: QRCodeInterface; - -/** - * Defines QRCode Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines QRCode Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @since 9 - */ -/** - * Defines QRCode Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines QRCode Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare const QRCodeInstance: QRCodeAttribute; + declare const QRCodeInstance: QRCodeAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/radio.d.ts b/api/@internal/component/ets/radio.d.ts index 5cfb6276a3494c112402a424f02ca9f636414a15..957e09fdd8ada29583a26c7b3cae0d98a3cbfb78 100644 --- a/api/@internal/component/ets/radio.d.ts +++ b/api/@internal/component/ets/radio.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod, ContentModifier, CommonConfiguration, Callback, Bindable } from './common'; -import { CustomBuilder } from './builder'; -import { ResourceColor } from './units'; -/*** endif */ - /** * Defines the IndicatorType of Radio component * @@ -32,8 +26,7 @@ import { ResourceColor } from './units'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum RadioIndicatorType { /** @@ -43,8 +36,7 @@ declare enum RadioIndicatorType { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ TICK = 0, /** @@ -54,8 +46,7 @@ declare enum RadioIndicatorType { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ DOT = 1, /** @@ -65,8 +56,7 @@ declare enum RadioIndicatorType { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ CUSTOM = 2, } @@ -103,8 +93,7 @@ declare enum RadioIndicatorType { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RadioOptions { /** @@ -139,8 +128,7 @@ declare interface RadioOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ group: string; @@ -176,8 +164,7 @@ declare interface RadioOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ value: string; /** @@ -188,8 +175,7 @@ declare interface RadioOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ indicatorType?: RadioIndicatorType; /** @@ -200,8 +186,7 @@ declare interface RadioOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ indicatorBuilder?: CustomBuilder; } @@ -221,8 +206,7 @@ declare interface RadioOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RadioStyle { /** @@ -242,8 +226,7 @@ declare interface RadioStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ checkedBackgroundColor?: ResourceColor; @@ -264,8 +247,7 @@ declare interface RadioStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ uncheckedBorderColor?: ResourceColor; @@ -286,8 +268,7 @@ declare interface RadioStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ indicatorColor?: ResourceColor; } @@ -324,8 +305,8 @@ declare interface RadioStyle { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface RadioInterface { /** @@ -364,8 +345,7 @@ interface RadioInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (options: RadioOptions): RadioAttribute; } @@ -377,8 +357,7 @@ interface RadioInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnRadioChangeCallback = (isChecked: boolean) => void; @@ -414,8 +393,8 @@ declare type OnRadioChangeCallback = (isChecked: boolean) => void; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class RadioAttribute extends CommonMethod { /** @@ -471,20 +450,6 @@ declare class RadioAttribute extends CommonMethod { */ checked(isChecked: Optional): RadioAttribute; - /** - * Called when the radio box is selected. - * - * @param { boolean | undefined | Bindable } isChecked - * @returns { RadioAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - checked(isChecked: boolean | undefined | Bindable): RadioAttribute; - /** * Called when the radio box selection status changes. * @@ -534,8 +499,7 @@ declare class RadioAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onChange(callback: Optional): RadioAttribute; @@ -556,8 +520,7 @@ declare class RadioAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ radioStyle(value?: RadioStyle): RadioAttribute; @@ -569,8 +532,7 @@ declare class RadioAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentModifier(modifier: ContentModifier): RadioAttribute; @@ -582,8 +544,7 @@ declare class RadioAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ contentModifier(modifier: Optional>): RadioAttribute; } @@ -596,8 +557,7 @@ declare class RadioAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RadioConfiguration extends CommonConfiguration { /** @@ -607,8 +567,7 @@ declare interface RadioConfiguration extends CommonConfiguration; } @@ -666,6 +623,7 @@ declare interface RadioConfiguration extends CommonConfiguration } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - rating: number | undefined | Bindable; - /** * Indicator option. * @@ -137,8 +118,7 @@ declare interface RatingOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ indicator?: boolean } @@ -151,8 +131,7 @@ declare interface RatingOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface StarStyleOptions { /** @@ -199,7 +178,6 @@ declare interface StarStyleOptions { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ backgroundUri: ResourceStr; @@ -247,7 +225,6 @@ declare interface StarStyleOptions { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ foregroundUri: ResourceStr; @@ -295,7 +272,6 @@ declare interface StarStyleOptions { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ secondaryUri?: ResourceStr } @@ -332,8 +308,8 @@ declare interface StarStyleOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface RatingInterface { /** @@ -384,8 +360,7 @@ interface RatingInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options?: RatingOptions): RatingAttribute; } @@ -398,8 +373,7 @@ interface RatingInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RatingConfiguration extends CommonConfiguration { /** @@ -409,8 +383,7 @@ declare interface RatingConfiguration extends CommonConfiguration; } @@ -471,8 +440,7 @@ declare interface RatingConfiguration extends CommonConfiguration void; @@ -508,8 +476,8 @@ declare interface RatingConfiguration extends CommonConfiguration { /** @@ -548,8 +516,7 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ stars(value: number): RatingAttribute; @@ -562,8 +529,7 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ stars(starCount: Optional): RatingAttribute; @@ -603,8 +569,7 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ stepSize(value: number): RatingAttribute; @@ -617,8 +582,7 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ stepSize(size: Optional): RatingAttribute; @@ -670,8 +634,7 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ starStyle(options: StarStyleOptions): RatingAttribute; @@ -684,8 +647,7 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ starStyle(options: Optional): RatingAttribute; @@ -738,8 +700,7 @@ declare class RatingAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onChange(callback: Optional): RatingAttribute; @@ -751,8 +712,7 @@ declare class RatingAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentModifier(modifier: ContentModifier): RatingAttribute; @@ -764,8 +724,7 @@ declare class RatingAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ contentModifier(modifier: Optional>): RatingAttribute; } @@ -799,6 +758,7 @@ declare class RatingAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Rating: RatingInterface; @@ -831,5 +791,6 @@ declare const Rating: RatingInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const RatingInstance: RatingAttribute; diff --git a/api/@internal/component/ets/rect.d.ts b/api/@internal/component/ets/rect.d.ts index 84c8ecde7bd03677ac35ad1ea2c7cb730ebedf7c..916f08d928f3bf42c415b0e86de309f176dd29a7 100644 --- a/api/@internal/component/ets/rect.d.ts +++ b/api/@internal/component/ets/rect.d.ts @@ -18,24 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonShapeMethod } from './common'; -import { Length } from './units'; -/*** endif */ - -/** - * Defines the RadiusItem, the first element is the width of the rounded corner, the second is the height of the rounded corner. - * - * @typedef { [Length, Length] } RadiusItem - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare type RadiusItem = [Length, Length]; - /** * Define options used to construct a rectangle. * @@ -44,8 +26,7 @@ declare type RadiusItem = [Length, Length]; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface RectOptions { /** @@ -102,7 +83,6 @@ declare interface RectOptions { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ width?: Length; @@ -160,7 +140,6 @@ declare interface RectOptions { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ height?: Length; @@ -220,19 +199,6 @@ declare interface RectOptions { * @since 20 */ radius?: Length | Array; - - /** - * Corner radius of the rectangle. - * - * @type { ?(Length | Array) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - radius?: Length | Array; } /** @@ -243,8 +209,7 @@ declare interface RectOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface RoundedRectOptions { /** @@ -509,6 +474,7 @@ declare interface RoundedRectOptions { * @form * @atomicservice * @since 11 + * @noninterop */ interface RectInterface { /** @@ -569,7 +535,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 @@ -578,7 +544,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 @@ -656,8 +622,8 @@ interface RectInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class RectAttribute extends CommonShapeMethod { /** @@ -792,7 +758,7 @@ declare class RectAttribute extends CommonShapeMethod { /** * Called when the fillet size is set. * - * @param { Length | Array } value + * @param { number | string | Array } value * @returns { RectAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -812,20 +778,6 @@ declare class RectAttribute extends CommonShapeMethod { * @since 20 */ radius(value: Length | Array): RectAttribute; - - /** - * Called when the fillet size is set. - * - * @param { number | string | Array } value - * @returns { RectAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - radius(value: number | string | Array): RectAttribute; } /** @@ -851,6 +803,7 @@ declare class RectAttribute extends CommonShapeMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Rect: RectInterface; @@ -860,6 +813,7 @@ declare const Rect: RectInterface; * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 7 * @deprecated since 9 + * @noninterop */ declare const RectInStance: RectAttribute; @@ -882,34 +836,6 @@ declare const RectInStance: RectAttribute; * @form * @atomicservice * @since 11 + * @noninterop */ declare const RectInstance: RectAttribute; - -/** - * Provides an interface for drawing rectangles. - * - * @interface RectInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface RectInterface { - /** - * Called when a rectangle is created. - * - * @param { RectOptions | RoundedRectOptions } [options] - Rect options - * @returns { RectAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - ( - options?: RectOptions | RoundedRectOptions, - ): RectAttribute; -} \ No newline at end of file diff --git a/api/@internal/component/ets/refresh.d.ts b/api/@internal/component/ets/refresh.d.ts index 4a6048db3d38adfdf9d129cd91cac99791e56413..70b4bc745fe9281798668d9162c9f50e6256c848 100644 --- a/api/@internal/component/ets/refresh.d.ts +++ b/api/@internal/component/ets/refresh.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Callback, Optional, CommonMethod, Bindable } from './common' -import { CustomBuilder } from './builder' -import { ResourceStr } from './units' -import { ComponentContent } from '../ComponentContent' -/*** endif */ /** * The refresh status of the drop-down refresh. @@ -47,8 +41,7 @@ import { ComponentContent } from '../ComponentContent' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum RefreshStatus { /** @@ -70,8 +63,7 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Inactive, @@ -94,8 +86,7 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Drag, @@ -118,8 +109,7 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ OverDrag, @@ -142,8 +132,7 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Refresh, @@ -166,8 +155,7 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Done, } @@ -194,8 +182,7 @@ declare enum RefreshStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface RefreshOptions { /** @@ -226,18 +213,6 @@ interface RefreshOptions { * @since 11 */ refreshing: boolean; - /** - * Whether the current component is being refreshed. - * This parameter supports $$ for two-way binding of variables. - * - * @type { boolean | Bindable } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - refreshing: boolean | Bindable; /** * Distance to the top of the parent component from the component that @@ -292,8 +267,7 @@ interface RefreshOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ promptText?: ResourceStr; @@ -312,8 +286,7 @@ interface RefreshOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ builder?: CustomBuilder; @@ -324,8 +297,7 @@ interface RefreshOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ refreshingContent?: ComponentContent; } @@ -352,8 +324,8 @@ interface RefreshOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface RefreshInterface { /** @@ -381,8 +353,7 @@ interface RefreshInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value: RefreshOptions): RefreshAttribute; } @@ -409,8 +380,8 @@ interface RefreshInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class RefreshAttribute extends CommonMethod { /** @@ -438,8 +409,7 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onStateChange(callback: (state: RefreshStatus) => void): RefreshAttribute; @@ -468,8 +438,7 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onRefreshing(callback: () => void): RefreshAttribute; @@ -481,8 +450,7 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ refreshOffset(value: number): RefreshAttribute; @@ -494,8 +462,7 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pullToRefresh(value: boolean): RefreshAttribute; @@ -508,8 +475,7 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onOffsetChange(callback: Callback): RefreshAttribute; @@ -521,8 +487,7 @@ declare class RefreshAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pullDownRatio(ratio: Optional): RefreshAttribute; @@ -559,6 +524,7 @@ declare class RefreshAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Refresh: RefreshInterface; @@ -582,5 +548,6 @@ declare const Refresh: RefreshInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const RefreshInstance: RefreshAttribute; \ No newline at end of file diff --git a/api/@internal/component/ets/relative_container.d.ts b/api/@internal/component/ets/relative_container.d.ts index 1caa3043b68934d16bf5ec1ef5bcedb3f9cce0a1..916be0d86241dda86aceb217cb2b4e710d35e6d9 100644 --- a/api/@internal/component/ets/relative_container.d.ts +++ b/api/@internal/component/ets/relative_container.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Dimension } from './units'; -import { Axis } from './enums'; -import { CommonMethod } from './common'; -/*** endif */ - /** * Provides ports for relative containers. * @@ -49,8 +43,8 @@ import { CommonMethod } from './common'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface RelativeContainerInterface { /** @@ -78,8 +72,7 @@ interface RelativeContainerInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (): RelativeContainerAttribute; } @@ -91,8 +84,7 @@ interface RelativeContainerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface GuideLinePosition { /** @@ -102,8 +94,7 @@ declare interface GuideLinePosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ start? : Dimension; @@ -114,8 +105,7 @@ declare interface GuideLinePosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ end? : Dimension; } @@ -127,8 +117,7 @@ declare interface GuideLinePosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface GuideLineStyle { /** @@ -138,8 +127,7 @@ declare interface GuideLineStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ id : string; @@ -150,8 +138,7 @@ declare interface GuideLineStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ direction : Axis; @@ -162,8 +149,7 @@ declare interface GuideLineStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ position : GuideLinePosition; } @@ -175,8 +161,7 @@ declare interface GuideLineStyle { * @syscap SystemCapability.Test.UiTest * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum BarrierDirection { /** @@ -185,8 +170,7 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ LEFT, @@ -196,8 +180,7 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ RIGHT, @@ -207,8 +190,7 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ TOP, @@ -218,8 +200,7 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ BOTTOM, } @@ -231,8 +212,7 @@ declare enum BarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum LocalizedBarrierDirection { /** @@ -241,8 +221,7 @@ declare enum LocalizedBarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ START = 0, @@ -252,8 +231,7 @@ declare enum LocalizedBarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ END = 1, @@ -263,8 +241,7 @@ declare enum LocalizedBarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ TOP = 2, @@ -274,8 +251,7 @@ declare enum LocalizedBarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ BOTTOM = 3, } @@ -287,8 +263,7 @@ declare enum LocalizedBarrierDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface BarrierStyle { /** @@ -298,8 +273,7 @@ declare interface BarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ id : string; @@ -310,8 +284,7 @@ declare interface BarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ direction : BarrierDirection; @@ -322,8 +295,7 @@ declare interface BarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ referencedId : Array; } @@ -335,8 +307,7 @@ declare interface BarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface LocalizedBarrierStyle { /** @@ -346,8 +317,7 @@ declare interface LocalizedBarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ id : string; @@ -358,8 +328,7 @@ declare interface LocalizedBarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ localizedDirection : LocalizedBarrierDirection; @@ -370,8 +339,7 @@ declare interface LocalizedBarrierStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ referencedId : Array; } @@ -395,8 +363,8 @@ declare interface LocalizedBarrierStyle { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class RelativeContainerAttribute extends CommonMethod { /** @@ -407,8 +375,7 @@ declare class RelativeContainerAttribute extends CommonMethod): RelativeContainerAttribute; @@ -420,8 +387,7 @@ declare class RelativeContainerAttribute extends CommonMethod): RelativeContainerAttribute; @@ -433,8 +399,7 @@ declare class RelativeContainerAttribute extends CommonMethod): RelativeContainerAttribute; } @@ -462,6 +427,7 @@ declare class RelativeContainerAttribute extends CommonMethod {} @@ -167,6 +169,7 @@ declare class RemoteWindowAttribute extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 + * @noninterop */ declare const RemoteWindow: RemoteWindowInterface; @@ -176,5 +179,6 @@ declare const RemoteWindow: RemoteWindowInterface; * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 9 + * @noninterop */ declare const RemoteWindowInstance: RemoteWindowAttribute; diff --git a/api/@internal/component/ets/repeat.d.ts b/api/@internal/component/ets/repeat.d.ts index 3fcae59edd83fe581fd960de81a64e55adc8e080..4c29f0059a6f7300b1d3b94b78fd448d57176e94 100644 --- a/api/@internal/component/ets/repeat.d.ts +++ b/api/@internal/component/ets/repeat.d.ts @@ -174,6 +174,7 @@ declare type RepeatItemBuilder = (repeatItem: RepeatItem) => void; * @form * @atomicservice * @since 19 + * @noninterop */ declare class RepeatAttribute extends DynamicNode> { /** @@ -260,6 +261,7 @@ declare type RepeatArray = Array | ReadonlyArray | Readonly>; * @form * @atomicservice * @since 18 + * @noninterop */ declare type RepeatInterface = (arr: RepeatArray) => RepeatAttribute; @@ -282,5 +284,6 @@ declare type RepeatInterface = (arr: RepeatArray) => RepeatAttribute; * @form * @atomicservice * @since 18 + * @noninterop */ declare const Repeat: RepeatInterface; diff --git a/api/@internal/component/ets/rich_editor.d.ts b/api/@internal/component/ets/rich_editor.d.ts index 9ebb1c2f8c62bb09565051790d1894b2a144012d..c7eff682406db808058bd58b20aff1c0cd5f8f32 100644 --- a/api/@internal/component/ets/rich_editor.d.ts +++ b/api/@internal/component/ets/rich_editor.d.ts @@ -18,21 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ShadowOptions, ClickEvent, SelectionOptions, CommonMethod, Callback, HapticFeedbackMode, RectResult, HoverEvent, PixelMap } from './common'; -import { CustomBuilder } from './builder'; -import { ResourceColor, Length, ResourceStr, Dimension, Margin, BorderRadiuses, Font, VoidCallback } from './units'; -import { FontStyle, FontWeight, TextAlign, WordBreak, LineBreakStrategy, ImageSpanAlignment, ImageFit, ResponseType, CopyOptions, BarState } from './enums'; -import { DecorationStyleInterface, StyledString, MutableStyledString } from './styledString'; -import { Resource } from './../../../api/global/resource'; -import { SymbolEffectStrategy, SymbolRenderingStrategy } from './symbolglyph'; -import { DecorationStyleResult, TextRange, MenuType, TextEditControllerEx, LayoutManager, PreviewText, StyledStringController, StyledStringChangedListener, TextDataDetectorConfig, OnDidChangeCallback, EditMenuOptions, KeyboardAppearance } from './textCommon'; -import { GestureEvent } from './gesture'; -import { EnterKeyType, SubmitEvent } from './textInput'; -import { LengthMetrics , ColorMetrics } from '../Graphics'; -import { TextBackgroundStyle } from "./span"; -/*** endif */ - /** * Defines delete text direction. * @@ -47,8 +32,7 @@ import { TextBackgroundStyle } from "./span"; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum RichEditorDeleteDirection { /** @@ -63,8 +47,7 @@ declare enum RichEditorDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ BACKWARD, @@ -80,8 +63,7 @@ declare enum RichEditorDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ FORWARD, } @@ -100,8 +82,7 @@ declare enum RichEditorDeleteDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum RichEditorSpanType { /** @@ -116,8 +97,7 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ TEXT = 0, @@ -133,8 +113,7 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ IMAGE = 1, @@ -150,8 +129,7 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ MIXED = 2, @@ -161,8 +139,7 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ BUILDER = 3, @@ -172,8 +149,7 @@ declare enum RichEditorSpanType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ DEFAULT = 4, } @@ -224,8 +200,7 @@ declare enum UndoStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum RichEditorResponseType { /** @@ -241,8 +216,7 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ RIGHT_CLICK = 0, @@ -259,8 +233,7 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ LONG_PRESS = 1, @@ -277,8 +250,7 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ SELECT = 2, @@ -288,8 +260,7 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ DEFAULT = 3, } @@ -308,8 +279,7 @@ declare enum RichEditorResponseType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorSpanPosition { /** @@ -326,8 +296,7 @@ declare interface RichEditorSpanPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ spanIndex: number; @@ -345,8 +314,7 @@ declare interface RichEditorSpanPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ spanRange: [number, number]; } @@ -365,8 +333,7 @@ declare interface RichEditorSpanPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorTextStyle { /** @@ -383,8 +350,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor?: ResourceColor; @@ -402,8 +368,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontSize?: Length | number; @@ -421,8 +386,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontStyle?: FontStyle; @@ -440,8 +404,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontWeight?: number | FontWeight | string; @@ -459,8 +422,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontFamily?: ResourceStr; @@ -487,8 +449,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ decoration?: DecorationStyleInterface; @@ -507,8 +468,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textShadow?: ShadowOptions | Array; @@ -519,8 +479,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ letterSpacing?: number | string; @@ -531,8 +490,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineHeight?: number | string | Resource; @@ -543,8 +501,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ halfLeading?: boolean; @@ -560,8 +517,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontFeature?: string; @@ -572,8 +528,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ textBackgroundStyle?: TextBackgroundStyle; } @@ -594,8 +549,7 @@ declare interface RichEditorTextStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface LeadingMarginPlaceholder { /** @@ -613,8 +567,7 @@ declare interface LeadingMarginPlaceholder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pixelMap: PixelMap; @@ -633,8 +586,7 @@ declare interface LeadingMarginPlaceholder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ size: [Dimension, Dimension]; } @@ -654,8 +606,7 @@ declare interface LeadingMarginPlaceholder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorParagraphStyle { /** @@ -673,8 +624,7 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textAlign?: TextAlign; @@ -704,8 +654,7 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ leadingMargin?: Dimension | LeadingMarginPlaceholder; @@ -716,8 +665,7 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ wordBreak?: WordBreak; @@ -728,8 +676,7 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineBreakStrategy?: LineBreakStrategy; @@ -740,8 +687,7 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ paragraphSpacing?: number; } @@ -753,8 +699,7 @@ declare interface RichEditorParagraphStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface PasteEvent { /** @@ -804,8 +749,7 @@ declare interface PasteEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorTextSpan { /** @@ -822,8 +766,7 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ spanPosition: RichEditorSpanPosition; @@ -841,8 +784,7 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ value: string; @@ -860,8 +802,7 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textStyle?: RichEditorTextStyle; } @@ -881,8 +822,7 @@ declare interface RichEditorTextSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface RichEditorLayoutStyle { /** @@ -900,8 +840,7 @@ interface RichEditorLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ margin?: Dimension | Margin; @@ -920,8 +859,7 @@ interface RichEditorLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ borderRadius?: Dimension | BorderRadiuses; } @@ -940,8 +878,7 @@ interface RichEditorLayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorImageSpanStyle { /** @@ -958,8 +895,7 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ size?: [Dimension, Dimension]; @@ -977,8 +913,7 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ verticalAlign?: ImageSpanAlignment; @@ -996,8 +931,7 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ objectFit?: ImageFit; @@ -1016,8 +950,7 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ layoutStyle?: RichEditorLayoutStyle; } @@ -1037,8 +970,7 @@ declare interface RichEditorImageSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorSymbolSpanStyle { /** @@ -1056,8 +988,7 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontSize?: number | string | Resource; @@ -1076,8 +1007,7 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontColor?: Array; @@ -1096,8 +1026,7 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontWeight?: number | FontWeight | string; @@ -1116,8 +1045,7 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ effectStrategy?: SymbolEffectStrategy; @@ -1136,8 +1064,7 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ renderingStrategy?: SymbolRenderingStrategy; } @@ -1156,8 +1083,7 @@ declare interface RichEditorSymbolSpanStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorTextStyleResult { /** @@ -1174,8 +1100,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor: ResourceColor; @@ -1193,8 +1118,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontSize: number; @@ -1212,8 +1136,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontStyle: FontStyle; @@ -1231,8 +1154,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontWeight: number; @@ -1250,8 +1172,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontFamily: string; @@ -1278,8 +1199,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ decoration: DecorationStyleResult; @@ -1290,8 +1210,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textShadow?: Array; @@ -1302,8 +1221,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ letterSpacing?: number; @@ -1314,8 +1232,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineHeight?: number; @@ -1326,8 +1243,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ halfLeading?: boolean; @@ -1343,8 +1259,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontFeature?: string; @@ -1355,8 +1270,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ textBackgroundStyle?: TextBackgroundStyle; } @@ -1376,8 +1290,7 @@ declare interface RichEditorTextStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorParagraphResult { /** @@ -1395,8 +1308,7 @@ declare interface RichEditorParagraphResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ style: RichEditorParagraphStyle; @@ -1415,8 +1327,7 @@ declare interface RichEditorParagraphResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ range: [number, number]; } @@ -1436,8 +1347,7 @@ declare interface RichEditorParagraphResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorSymbolSpanStyleResult { /** @@ -1455,8 +1365,7 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontSize: number | string | Resource; @@ -1475,8 +1384,7 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontColor: Array; @@ -1495,8 +1403,7 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontWeight: number | FontWeight | string; @@ -1515,8 +1422,7 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ effectStrategy: SymbolEffectStrategy; @@ -1535,8 +1441,7 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ renderingStrategy: SymbolRenderingStrategy; } @@ -1555,8 +1460,7 @@ declare interface RichEditorSymbolSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorTextSpanResult { /** @@ -1573,8 +1477,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ spanPosition: RichEditorSpanPosition; @@ -1592,8 +1495,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ value: string; @@ -1611,8 +1513,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textStyle: RichEditorTextStyleResult; @@ -1630,8 +1531,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offsetInSpan: [number, number]; @@ -1650,8 +1550,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ symbolSpanStyle?: RichEditorSymbolSpanStyle; @@ -1670,8 +1569,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ valueResource?: Resource; @@ -1682,8 +1580,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ paragraphStyle?: RichEditorParagraphStyle; @@ -1694,8 +1591,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ previewText?: string; @@ -1706,8 +1602,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ urlStyle?: RichEditorUrlStyle; } @@ -1726,8 +1621,7 @@ declare interface RichEditorTextSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorImageSpanStyleResult { /** @@ -1744,8 +1638,7 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ size: [number, number]; @@ -1763,8 +1656,7 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ verticalAlign: ImageSpanAlignment; @@ -1782,8 +1674,7 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ objectFit: ImageFit; @@ -1794,8 +1685,7 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ layoutStyle?: RichEditorLayoutStyle; } @@ -1814,8 +1704,7 @@ declare interface RichEditorImageSpanStyleResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorImageSpanResult { /** @@ -1832,8 +1721,7 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ spanPosition: RichEditorSpanPosition; @@ -1851,8 +1739,7 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ valuePixelMap?: PixelMap; @@ -1870,8 +1757,7 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ valueResourceStr?: ResourceStr; @@ -1889,8 +1775,7 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ imageStyle: RichEditorImageSpanStyleResult; @@ -1908,8 +1793,7 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offsetInSpan: [number, number]; } @@ -1928,8 +1812,7 @@ declare interface RichEditorImageSpanResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorImageSpan { /** @@ -1946,8 +1829,7 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ spanPosition: RichEditorSpanPosition; @@ -1965,8 +1847,7 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ value: PixelMap | ResourceStr; @@ -1984,8 +1865,7 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ imageStyle?: RichEditorImageSpanStyle; } @@ -2004,8 +1884,7 @@ declare interface RichEditorImageSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorRange { /** @@ -2024,8 +1903,7 @@ declare interface RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ start?: number; @@ -2045,8 +1923,7 @@ declare interface RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ end?: number; } @@ -2066,8 +1943,7 @@ declare interface RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorGesture { /** @@ -2085,8 +1961,7 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onClick?: Callback; @@ -2105,8 +1980,7 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onLongPress?: Callback; @@ -2117,8 +1991,7 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @systemapi - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ onDoubleClick?: Callback; } @@ -2137,8 +2010,7 @@ declare interface RichEditorGesture { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorTextSpanOptions { /** @@ -2155,8 +2027,7 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offset?: number; @@ -2174,8 +2045,7 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ style?: RichEditorTextStyle; @@ -2194,8 +2064,7 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ paragraphStyle?: RichEditorParagraphStyle; @@ -2214,8 +2083,7 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ gesture?: RichEditorGesture; @@ -2226,8 +2094,7 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ urlStyle?: RichEditorUrlStyle; } @@ -2239,8 +2106,7 @@ declare interface RichEditorTextSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface KeyboardOptions { /** @@ -2250,8 +2116,7 @@ declare interface KeyboardOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ supportAvoidance?: boolean; } @@ -2270,8 +2135,7 @@ declare interface KeyboardOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorImageSpanOptions { /** @@ -2288,8 +2152,7 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offset?: number; @@ -2307,8 +2170,7 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ imageStyle?: RichEditorImageSpanStyle; @@ -2327,8 +2189,7 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ gesture?: RichEditorGesture; @@ -2339,8 +2200,7 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ onHover?: OnHoverCallback; } @@ -2360,8 +2220,7 @@ declare interface RichEditorImageSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorBuilderSpanOptions { /** @@ -2379,8 +2238,7 @@ declare interface RichEditorBuilderSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ offset?: number; @@ -2390,8 +2248,7 @@ declare interface RichEditorBuilderSpanOptions { * @type { ?ColorMetrics } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ dragBackgroundColor? : ColorMetrics; @@ -2401,8 +2258,7 @@ declare interface RichEditorBuilderSpanOptions { * @type { ?boolean } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ isDragShadowNeeded?: boolean; } @@ -2414,8 +2270,7 @@ declare interface RichEditorBuilderSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface PlaceholderStyle { /** @@ -2425,8 +2280,7 @@ declare interface PlaceholderStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ font?: Font; @@ -2437,8 +2291,7 @@ declare interface PlaceholderStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontColor?: ResourceColor; } @@ -2459,8 +2312,7 @@ declare interface PlaceholderStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorSpanStyleOptions extends RichEditorRange { } @@ -2481,8 +2333,7 @@ declare interface RichEditorSpanStyleOptions extends RichEditorRange { } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorParagraphStyleOptions extends RichEditorRange { /** @@ -2500,8 +2351,7 @@ declare interface RichEditorParagraphStyleOptions extends RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ style: RichEditorParagraphStyle; } @@ -2522,8 +2372,7 @@ declare interface RichEditorParagraphStyleOptions extends RichEditorRange { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanStyleOptions { /** @@ -2540,8 +2389,7 @@ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanSty * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textStyle: RichEditorTextStyle; @@ -2552,8 +2400,7 @@ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanSty * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ urlStyle?: RichEditorUrlStyle; } @@ -2574,8 +2421,7 @@ declare interface RichEditorUpdateTextSpanStyleOptions extends RichEditorSpanSty * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanStyleOptions { /** @@ -2592,8 +2438,7 @@ declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ imageStyle: RichEditorImageSpanStyle; } @@ -2615,8 +2460,7 @@ declare interface RichEditorUpdateImageSpanStyleOptions extends RichEditorSpanSt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanStyleOptions { /** @@ -2634,8 +2478,7 @@ declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ symbolStyle: RichEditorSymbolSpanStyle; } @@ -2655,8 +2498,7 @@ declare interface RichEditorUpdateSymbolSpanStyleOptions extends RichEditorSpanS * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorSymbolSpanOptions { /** @@ -2674,8 +2516,7 @@ declare interface RichEditorSymbolSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ offset?: number; @@ -2694,8 +2535,7 @@ declare interface RichEditorSymbolSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ style?: RichEditorSymbolSpanStyle; } @@ -2714,8 +2554,7 @@ declare interface RichEditorSymbolSpanOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorSelection { /** @@ -2732,8 +2571,7 @@ declare interface RichEditorSelection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selection: [number, number]; @@ -2751,8 +2589,7 @@ declare interface RichEditorSelection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ spans: Array; } @@ -2771,8 +2608,7 @@ declare interface RichEditorSelection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorInsertValue { /** @@ -2789,8 +2625,7 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ insertOffset: number; @@ -2808,8 +2643,7 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ insertValue: string; @@ -2820,8 +2654,7 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ previewText?: string; } @@ -2840,8 +2673,7 @@ declare interface RichEditorInsertValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorDeleteValue { /** @@ -2858,8 +2690,7 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offset: number; @@ -2877,8 +2708,7 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ direction: RichEditorDeleteDirection; @@ -2896,8 +2726,7 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ length: number; @@ -2915,8 +2744,7 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ richEditorDeleteSpans: Array; } @@ -2928,8 +2756,7 @@ declare interface RichEditorDeleteValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorChangeValue { /** @@ -2939,8 +2766,7 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ rangeBefore: TextRange; @@ -2951,8 +2777,7 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ replacedSpans: Array; @@ -2963,8 +2788,7 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ replacedImageSpans: Array; @@ -2975,8 +2799,7 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ replacedSymbolSpans: Array; @@ -3006,8 +2829,7 @@ declare interface RichEditorChangeValue { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface RichEditorOptions { /** @@ -3024,8 +2846,7 @@ declare interface RichEditorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ controller: RichEditorController; } @@ -3037,8 +2858,7 @@ declare interface RichEditorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface RichEditorStyledStringOptions { /** @@ -3048,8 +2868,7 @@ declare interface RichEditorStyledStringOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ controller: RichEditorStyledStringController; } @@ -3069,8 +2888,7 @@ declare interface RichEditorStyledStringOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface SelectionMenuOptions { /** @@ -3097,8 +2915,7 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onAppear?: MenuOnAppearCallback; @@ -3149,8 +2966,7 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ menuType?: MenuType; @@ -3161,8 +2977,7 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ onMenuShow?: MenuCallback; @@ -3173,8 +2988,7 @@ declare interface SelectionMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ onMenuHide?: MenuCallback; @@ -3184,8 +2998,7 @@ declare interface SelectionMenuOptions { * @type { ?PreviewMenuOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ previewMenuOptions?: PreviewMenuOptions; } @@ -3196,8 +3009,8 @@ declare interface SelectionMenuOptions { * @interface PreviewMenuOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 + * @noninterop */ declare interface PreviewMenuOptions { /** @@ -3206,8 +3019,7 @@ declare interface PreviewMenuOptions { * @type { ?HapticFeedbackMode } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ hapticFeedbackMode? : HapticFeedbackMode; } @@ -3219,8 +3031,7 @@ declare interface PreviewMenuOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class RichEditorBaseController implements TextEditControllerEx { /** @@ -3237,8 +3048,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ getCaretOffset(): number; @@ -3258,8 +3068,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ setCaretOffset(offset: number): boolean; @@ -3275,8 +3084,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ closeSelectionMenu(): void; @@ -3295,8 +3103,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getTypingStyle(): RichEditorTextStyle; @@ -3315,8 +3122,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setTypingStyle(value: RichEditorTextStyle): void; @@ -3349,8 +3155,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; @@ -3361,8 +3166,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ isEditing(): boolean; @@ -3372,8 +3176,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ stopEditing(): void; @@ -3384,8 +3187,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getLayoutManager(): LayoutManager; @@ -3396,8 +3198,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getPreviewText(): PreviewText; @@ -3408,8 +3209,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ getCaretRect(): RectResult | undefined; } @@ -3435,8 +3235,7 @@ declare class RichEditorBaseController implements TextEditControllerEx { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class RichEditorController extends RichEditorBaseController { /** @@ -3469,7 +3268,6 @@ declare class RichEditorController extends RichEditorBaseController { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ addTextSpan(content: ResourceStr, options?: RichEditorTextSpanOptions): number; @@ -3491,8 +3289,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ addImageSpan(value: PixelMap | ResourceStr, options?: RichEditorImageSpanOptions): number; @@ -3515,8 +3312,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ addBuilderSpan(value: CustomBuilder, options?: RichEditorBuilderSpanOptions): number; @@ -3539,8 +3335,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ addSymbolSpan(value: Resource, options?: RichEditorSymbolSpanOptions ): number; @@ -3558,8 +3353,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ updateSpanStyle(value: RichEditorUpdateTextSpanStyleOptions | RichEditorUpdateImageSpanStyleOptions | RichEditorUpdateSymbolSpanStyleOptions): void; @@ -3578,8 +3372,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ updateParagraphStyle(value: RichEditorParagraphStyleOptions): void; @@ -3597,8 +3390,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ deleteSpans(value?: RichEditorRange): void; @@ -3618,8 +3410,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ getSpans(value?: RichEditorRange): Array; @@ -3640,8 +3431,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getParagraphs(value?: RichEditorRange): Array; @@ -3660,8 +3450,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getSelection(): RichEditorSelection; @@ -3675,8 +3464,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fromStyledString(value: StyledString): Array; @@ -3690,8 +3478,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ toStyledString(value: RichEditorRange): StyledString; } @@ -3703,8 +3490,7 @@ declare class RichEditorController extends RichEditorBaseController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type RichEditorSpan = RichEditorImageSpanResult | RichEditorTextSpanResult; @@ -3716,8 +3502,7 @@ declare type RichEditorSpan = RichEditorImageSpanResult | RichEditorTextSpanResu * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class RichEditorStyledStringController extends RichEditorBaseController implements StyledStringController { /** @@ -3727,8 +3512,7 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setStyledString(styledString: StyledString): void; @@ -3748,7 +3532,6 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ getStyledString(): MutableStyledString; @@ -3759,8 +3542,7 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getSelection(): RichEditorRange; @@ -3771,8 +3553,7 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onContentChanged(listener: StyledStringChangedListener): void; } @@ -3791,8 +3572,8 @@ declare class RichEditorStyledStringController extends RichEditorBaseController * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class RichEditorAttribute extends CommonMethod { /** @@ -3864,8 +3645,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onSelect(callback: Callback): RichEditorAttribute; @@ -3877,8 +3657,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onSelectionChange(callback: Callback): RichEditorAttribute; @@ -3908,8 +3687,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ aboutToIMEInput(callback: Callback): RichEditorAttribute; @@ -3939,8 +3717,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onIMEInputComplete(callback: Callback): RichEditorAttribute; @@ -3952,8 +3729,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidIMEInput(callback: Callback): RichEditorAttribute; @@ -3983,8 +3759,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ aboutToDelete(callback: Callback): RichEditorAttribute; @@ -4048,8 +3823,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ copyOptions(value: CopyOptions): RichEditorAttribute; @@ -4076,8 +3850,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ bindSelectionMenu(spanType: RichEditorSpanType, content: CustomBuilder, responseType: ResponseType | RichEditorResponseType, options?: SelectionMenuOptions): RichEditorAttribute; @@ -4109,8 +3882,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): RichEditorAttribute; @@ -4131,8 +3903,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onPaste(callback: PasteEventCallback): RichEditorAttribute; @@ -4153,8 +3924,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableDataDetector(enable: boolean): RichEditorAttribute; @@ -4166,8 +3936,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enablePreviewText(enable: boolean): RichEditorAttribute; @@ -4188,8 +3957,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ dataDetectorConfig(config: TextDataDetectorConfig): RichEditorAttribute; @@ -4202,8 +3970,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ placeholder(value: ResourceStr, style?: PlaceholderStyle): RichEditorAttribute; @@ -4215,8 +3982,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ caretColor(value: ResourceColor): RichEditorAttribute; @@ -4228,8 +3994,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ selectedBackgroundColor(value: ResourceColor): RichEditorAttribute; @@ -4241,8 +4006,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onEditingChange(callback: Callback): RichEditorAttribute; @@ -4254,8 +4018,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enterKeyType(value: EnterKeyType): RichEditorAttribute; @@ -4267,8 +4030,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onSubmit(callback: SubmitCallback): RichEditorAttribute; @@ -4280,8 +4042,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillChange(callback: Callback) : RichEditorAttribute; @@ -4293,8 +4054,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidChange(callback: OnDidChangeCallback) : RichEditorAttribute; @@ -4306,8 +4066,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onCut(callback: Callback): RichEditorAttribute; @@ -4319,8 +4078,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onCopy(callback: Callback): RichEditorAttribute; @@ -4332,8 +4090,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ editMenuOptions(editMenu: EditMenuOptions): RichEditorAttribute; @@ -4345,8 +4102,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableKeyboardOnFocus(isEnabled: boolean): RichEditorAttribute; @@ -4358,8 +4114,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ enableHapticFeedback(isEnabled: boolean): RichEditorAttribute; @@ -4371,8 +4126,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ barState(state: BarState): RichEditorAttribute; @@ -4384,8 +4138,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ maxLength(maxLength: Optional): RichEditorAttribute; @@ -4397,8 +4150,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ maxLines(maxLines: Optional): RichEditorAttribute; @@ -4421,8 +4173,7 @@ declare class RichEditorAttribute extends CommonMethod { * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ keyboardAppearance(appearance: Optional): RichEditorAttribute; @@ -4433,8 +4184,7 @@ declare class RichEditorAttribute extends CommonMethod { * @returns { RichEditorAttribute } returns the instance of the RichEditorAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ stopBackPress(isStopped: Optional): RichEditorAttribute; @@ -4457,8 +4207,7 @@ declare class RichEditorAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface CutEvent { /** @@ -4491,8 +4240,7 @@ declare interface CutEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface CopyEvent { /** @@ -4525,8 +4273,7 @@ declare interface CopyEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ declare interface RichEditorUrlStyle { /** @@ -4536,8 +4283,7 @@ declare interface RichEditorUrlStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ url?: ResourceStr; } @@ -4551,8 +4297,7 @@ declare interface RichEditorUrlStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type SubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => void; @@ -4565,8 +4310,7 @@ declare type SubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => vo * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type MenuOnAppearCallback = (start: number, end: number) => void; @@ -4579,8 +4323,7 @@ declare type MenuOnAppearCallback = (start: number, end: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ declare type MenuCallback = (start: number, end: number) => void; @@ -4592,8 +4335,7 @@ declare type MenuCallback = (start: number, end: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type PasteEventCallback = (event?: PasteEvent) => void; @@ -4606,8 +4348,7 @@ declare type PasteEventCallback = (event?: PasteEvent) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ declare type OnHoverCallback = (status: boolean, event: HoverEvent) => void; @@ -4625,8 +4366,8 @@ declare type OnHoverCallback = (status: boolean, event: HoverEvent) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface RichEditorInterface { /** @@ -4645,8 +4386,7 @@ interface RichEditorInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value: RichEditorOptions): RichEditorAttribute; @@ -4658,8 +4398,7 @@ interface RichEditorInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ (options: RichEditorStyledStringOptions): RichEditorAttribute; } @@ -4677,6 +4416,7 @@ interface RichEditorInterface { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const RichEditorInstance: RichEditorAttribute; @@ -4693,5 +4433,6 @@ declare const RichEditorInstance: RichEditorAttribute; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const RichEditor: RichEditorInterface; diff --git a/api/@internal/component/ets/rich_text.d.ts b/api/@internal/component/ets/rich_text.d.ts index e11c5718fd7ceb4f87694e9e94fa8302579228d6..ce311f9449911d3c90c9b0e6bbdd35244a41165c 100644 --- a/api/@internal/component/ets/rich_text.d.ts +++ b/api/@internal/component/ets/rich_text.d.ts @@ -46,6 +46,7 @@ import { CommonMethod} from './common'; * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ interface RichTextInterface { /** @@ -123,6 +124,7 @@ interface RichTextInterface { * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ declare class RichTextAttribute extends CommonMethod { /** @@ -206,6 +208,7 @@ declare class RichTextAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ declare const RichText: RichTextInterface; @@ -229,5 +232,6 @@ declare const RichText: RichTextInterface; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ declare const RichTextInstance: RichTextAttribute; diff --git a/api/@internal/component/ets/root_scene.d.ts b/api/@internal/component/ets/root_scene.d.ts index 9d06f6b9740f03851dc23a96aeeacb6f7c7f6f80..0adf4bdbb9ffbdf0131963dd2b4ff52d1ce52de1 100644 --- a/api/@internal/component/ets/root_scene.d.ts +++ b/api/@internal/component/ets/root_scene.d.ts @@ -40,6 +40,7 @@ interface RootSceneSession { * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ interface RootSceneInterface { /** @@ -63,6 +64,7 @@ interface RootSceneInterface { * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ declare class RootSceneAttribute extends CommonMethod { } @@ -73,6 +75,7 @@ declare class RootSceneAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 10 + * @noninterop */ declare const RootScene: RootSceneInterface; @@ -82,5 +85,6 @@ declare const RootScene: RootSceneInterface; * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 10 + * @noninterop */ declare const RootSceneInstance: RootSceneAttribute; diff --git a/api/@internal/component/ets/row.d.ts b/api/@internal/component/ets/row.d.ts index b3981964e0ed82f58338a19756fb9cf55ba7ae84..f2d9fb5629f9aaeb85d17e5e713a11285903e91a 100644 --- a/api/@internal/component/ets/row.d.ts +++ b/api/@internal/component/ets/row.d.ts @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { PointLightStyle, Optional, CommonMethod } from './common'; -import { VerticalAlign, FlexAlign } from './enums'; -import { SpaceType } from './column'; -/*** endif */ - - /** * Define options used to construct a row. * @@ -33,8 +26,7 @@ import { SpaceType } from './column'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface RowOptions { /** @@ -80,8 +72,7 @@ declare interface RowOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ space?: string | number; } @@ -94,8 +85,7 @@ declare interface RowOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface RowOptionsV2 { /** @@ -106,8 +96,7 @@ interface RowOptionsV2 { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ space?: SpaceType; } @@ -144,8 +133,8 @@ interface RowOptionsV2 { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface RowInterface { /** @@ -196,8 +185,7 @@ interface RowInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options?: RowOptions): RowAttribute; /** @@ -210,8 +198,7 @@ interface RowInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options?: RowOptions | RowOptionsV2): RowAttribute; } @@ -248,8 +235,8 @@ interface RowInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class RowAttribute extends CommonMethod { /** @@ -288,8 +275,7 @@ declare class RowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ alignItems(value: VerticalAlign): RowAttribute; @@ -329,8 +315,7 @@ declare class RowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ justifyContent(value: FlexAlign): RowAttribute; /** @@ -340,8 +325,7 @@ declare class RowAttribute extends CommonMethod { * @returns { RowAttribute } The attribute of the row. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ pointLight(value: PointLightStyle): RowAttribute; /** @@ -353,8 +337,7 @@ declare class RowAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ reverse(isReversed: Optional): RowAttribute; } @@ -388,6 +371,7 @@ declare class RowAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Row: RowInterface; @@ -420,5 +404,6 @@ declare const Row: RowInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const RowInstance: RowAttribute; diff --git a/api/@internal/component/ets/row_split.d.ts b/api/@internal/component/ets/row_split.d.ts index 395b1e5e0a2cd92953b1690dff8175fbac7153f4..81238f40d94378174bc6f8910fefcedeeceb9b4e 100644 --- a/api/@internal/component/ets/row_split.d.ts +++ b/api/@internal/component/ets/row_split.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod } from './common'; -/*** endif */ - - /** * Provides interfaces for layout in the vertical direction. * @@ -45,8 +40,8 @@ import { CommonMethod } from './common'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface RowSplitInterface { /** @@ -71,8 +66,7 @@ interface RowSplitInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (): RowSplitAttribute; } @@ -93,8 +87,8 @@ interface RowSplitInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class RowSplitAttribute extends CommonMethod { /** @@ -122,8 +116,7 @@ declare class RowSplitAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ resizeable(value: boolean): RowSplitAttribute; } @@ -148,6 +141,7 @@ declare class RowSplitAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const RowSplit: RowSplitInterface; @@ -171,5 +165,6 @@ declare const RowSplit: RowSplitInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const RowSplitInstance: RowSplitAttribute; diff --git a/api/@internal/component/ets/save_button.d.ts b/api/@internal/component/ets/save_button.d.ts index 9493007579e7cfe8ec67a333f4a9c5418eba9ba4..c1f1563e882f2b62e467576c235d28714c861e5a 100644 --- a/api/@internal/component/ets/save_button.d.ts +++ b/api/@internal/component/ets/save_button.d.ts @@ -251,8 +251,7 @@ declare enum SaveDescription { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ SAVE_ALL = 12 } diff --git a/api/@internal/component/ets/screen.d.ts b/api/@internal/component/ets/screen.d.ts index 3262d2c683eb7c1e8f0d13a07b30fdc3b10db22a..fa457cfc0c9b7e007ce658a62a94538b0319725c 100644 --- a/api/@internal/component/ets/screen.d.ts +++ b/api/@internal/component/ets/screen.d.ts @@ -30,6 +30,7 @@ import { CommonMethod} from './common'; * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ interface ScreenInterface { /** @@ -53,6 +54,7 @@ interface ScreenInterface { * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ declare class ScreenAttribute extends CommonMethod { } @@ -63,6 +65,7 @@ declare class ScreenAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 10 + * @noninterop */ declare const Screen: ScreenInterface; @@ -72,5 +75,6 @@ declare const Screen: ScreenInterface; * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 10 + * @noninterop */ declare const ScreenInstance: ScreenAttribute; diff --git a/api/@internal/component/ets/scroll.d.ts b/api/@internal/component/ets/scroll.d.ts index 3121a855698354b3228e5b62bfd16268f7d2fb2f..3e0504a35b73da1424dafd58c4d416f30670b504 100644 --- a/api/@internal/component/ets/scroll.d.ts +++ b/api/@internal/component/ets/scroll.d.ts @@ -18,12 +18,7 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { BarState, Edge, Color, EdgeEffect, ScrollSource ,Curve} from './enums' -import { ICurve, RectResult, ScrollableCommonMethod, EdgeEffectOptions, NestedScrollOptions,CommonMethod } from './common' -import { Dimension, Length, VoidCallback, Resource, LengthMetrics } from './units' -import { ScrollSnapAlign, ScrollState } from './list' -/*** endif */ + /** * Content scroll direction. @@ -47,8 +42,7 @@ import { ScrollSnapAlign, ScrollState } from './list' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ScrollDirection { /** @@ -70,8 +64,7 @@ declare enum ScrollDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Vertical, @@ -94,8 +87,7 @@ declare enum ScrollDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Horizontal, @@ -127,8 +119,7 @@ declare enum ScrollDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ None, } @@ -148,8 +139,7 @@ declare enum ScrollDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ScrollAlign { /** @@ -165,8 +155,7 @@ declare enum ScrollAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ START, @@ -183,8 +172,7 @@ declare enum ScrollAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ CENTER, @@ -201,8 +189,7 @@ declare enum ScrollAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ END, @@ -219,8 +206,7 @@ declare enum ScrollAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ AUTO, } @@ -232,8 +218,7 @@ declare enum ScrollAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface OffsetResult { /** @@ -243,8 +228,7 @@ declare interface OffsetResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ xOffset: number; @@ -255,8 +239,7 @@ declare interface OffsetResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ yOffset: number; } @@ -268,8 +251,7 @@ declare interface OffsetResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface ScrollEdgeOptions { /** @@ -281,8 +263,7 @@ declare interface ScrollEdgeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ velocity?: number; } @@ -294,8 +275,7 @@ declare interface ScrollEdgeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface ScrollToIndexOptions { /** @@ -305,8 +285,7 @@ declare interface ScrollToIndexOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ extraOffset?: LengthMetrics; } @@ -318,8 +297,7 @@ declare interface ScrollToIndexOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface ScrollAnimationOptions { /** @@ -334,8 +312,7 @@ declare interface ScrollAnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ duration?: number; @@ -347,8 +324,7 @@ declare interface ScrollAnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ curve?: Curve | ICurve; @@ -365,8 +341,7 @@ declare interface ScrollAnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ canOverScroll?: boolean; } @@ -378,8 +353,7 @@ declare interface ScrollAnimationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface OffsetOptions { /** @@ -390,8 +364,7 @@ declare interface OffsetOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ xOffset?: Dimension; @@ -403,8 +376,7 @@ declare interface OffsetOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ yOffset?: Dimension; } @@ -474,8 +446,7 @@ declare interface UIScrollEvent extends UIScrollableCommonEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class Scroller { /** @@ -497,8 +468,7 @@ declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -538,17 +508,6 @@ declare class Scroller { */ scrollTo(options: ScrollOptions); - /** - * Called when the setting slides to the specified position. - * - * @param { ScrollOptions } options - scroll options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - scrollTo(options: ScrollOptions): void; /** * Called when scrolling to the edge of the container. @@ -588,18 +547,6 @@ declare class Scroller { */ scrollEdge(value: Edge, options?: ScrollEdgeOptions); - /** - * Called when scrolling to the edge of the container. - * - * @param { Edge } value - Edge type of the container. - * @param { ScrollEdgeOptions } [options] - Options of scrolling to edge. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - scrollEdge(value: Edge, options?: ScrollEdgeOptions): void; /** * Performs inertial scrolling based on the initial velocity passed in. @@ -616,8 +563,7 @@ declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fling(velocity: number): void; @@ -655,18 +601,6 @@ declare class Scroller { * @since 14 */ scrollPage(value: ScrollPageOptions); - - /** - * Called when page turning mode is set. - * - * @param { ScrollPageOptions } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - scrollPage(value: ScrollPageOptions): void; /** * Scrolls to the next or previous page. @@ -700,8 +634,7 @@ declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ currentOffset() : OffsetResult; @@ -762,21 +695,6 @@ declare class Scroller { */ scrollToIndex(value: number, smooth?: boolean, align?: ScrollAlign, options?: ScrollToIndexOptions); - /** - * Scroll to the specified index. - * - * @param { number } value - Index to jump to. - * @param { boolean } [smooth] - If true, scroll to index item with animation. If false, scroll to index item without animation. - * @param { ScrollAlign } [align] - Sets the alignment mode of a specified index. - * @param { ScrollToIndexOptions } [options] - Sets the options of a specified index, such as extra offset. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - scrollToIndex(value: number, smooth?: boolean, align?: ScrollAlign, options?: ScrollToIndexOptions): void; - /** * Called when the setting slides by offset. * @@ -810,19 +728,6 @@ declare class Scroller { */ scrollBy(dx: Length, dy: Length); - /** - * Called when the setting slides by offset. - * - * @param { Length } dx - * @param { Length } dy - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - scrollBy(dx: Length, dy: Length): void; - /** * Indicates whether the component scrolls to the end position. * @@ -842,8 +747,7 @@ declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ isAtEnd(): boolean; @@ -881,8 +785,7 @@ declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getItemRect(index: number): RectResult; @@ -904,8 +807,7 @@ declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ getItemIndex(x: number, y: number): number; } @@ -917,8 +819,7 @@ declare class Scroller { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface ScrollOptions { /** @@ -954,8 +855,7 @@ declare interface ScrollOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ xOffset: number | string; @@ -992,8 +892,7 @@ declare interface ScrollOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ yOffset: number | string; @@ -1040,8 +939,7 @@ declare interface ScrollOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ animation?: ScrollAnimationOptions | boolean; @@ -1063,8 +961,7 @@ declare interface ScrollOptions { * @interface ScrollPageOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ declare interface ScrollPageOptions { /** @@ -1075,8 +972,7 @@ declare interface ScrollPageOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ next: boolean; @@ -1089,8 +985,7 @@ declare interface ScrollPageOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ animation?: boolean; } @@ -1108,8 +1003,7 @@ declare interface ScrollPageOptions { * @interface ScrollSnapOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface ScrollSnapOptions { /** @@ -1126,8 +1020,7 @@ declare interface ScrollSnapOptions { * @default ScrollSnapAlign.NONE * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ snapAlign: ScrollSnapAlign; @@ -1157,8 +1050,7 @@ declare interface ScrollSnapOptions { * @default 100% * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ snapPagination?: Dimension | Array; @@ -1183,8 +1075,7 @@ declare interface ScrollSnapOptions { * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enableSnapToStart?: boolean; @@ -1209,8 +1100,7 @@ declare interface ScrollSnapOptions { * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enableSnapToEnd?: boolean; } @@ -1237,8 +1127,8 @@ declare interface ScrollSnapOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface ScrollInterface { /** @@ -1266,8 +1156,7 @@ interface ScrollInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (scroller?: Scroller): ScrollAttribute; } @@ -1280,8 +1169,7 @@ interface ScrollInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnScrollEdgeCallback = (side: Edge) => void; @@ -1292,8 +1180,7 @@ declare type OnScrollEdgeCallback = (side: Edge) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface OnScrollFrameBeginHandlerResult { /** @@ -1328,8 +1215,7 @@ interface OnScrollFrameBeginHandlerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ offsetRemain: number; } @@ -1344,8 +1230,7 @@ interface OnScrollFrameBeginHandlerResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnScrollFrameBeginCallback = (offset: number, state: ScrollState) => OnScrollFrameBeginHandlerResult; @@ -1371,8 +1256,8 @@ declare type OnScrollFrameBeginCallback = (offset: number, state: ScrollState) = * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class ScrollAttribute extends ScrollableCommonMethod { /** @@ -1400,8 +1285,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scrollable(value: ScrollDirection): ScrollAttribute; @@ -1459,8 +1343,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillScroll(handler: ScrollOnWillScrollCallback): ScrollAttribute; @@ -1479,8 +1362,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidScroll(handler: ScrollOnScrollCallback): ScrollAttribute; @@ -1527,8 +1409,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onScrollEdge(event: OnScrollEdgeCallback): ScrollAttribute; @@ -1573,8 +1454,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onScrollStart(event: VoidCallback): ScrollAttribute; @@ -1636,8 +1516,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onScrollStop(event: VoidCallback): ScrollAttribute; @@ -1666,8 +1545,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scrollBar(barState: BarState): ScrollAttribute; @@ -1696,8 +1574,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scrollBarColor(color: Color | number | string): ScrollAttribute; @@ -1726,8 +1603,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scrollBarWidth(value: number | string): ScrollAttribute; @@ -1760,8 +1636,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ edgeEffect(edgeEffect: EdgeEffect, options?: EdgeEffectOptions): ScrollAttribute; @@ -1801,8 +1676,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onScrollFrameBegin(event: OnScrollFrameBeginCallback): ScrollAttribute; @@ -1824,8 +1698,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ nestedScroll(value: NestedScrollOptions): ScrollAttribute; @@ -1847,8 +1720,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enableScrollInteraction(value: boolean): ScrollAttribute; @@ -1874,8 +1746,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ friction(value: number | Resource): ScrollAttribute; @@ -1894,8 +1765,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @returns { ScrollAttribute } the attribute of the scroll. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scrollSnap(value: ScrollSnapOptions): ScrollAttribute; @@ -1917,8 +1787,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enablePaging(value: boolean): ScrollAttribute; @@ -1932,8 +1801,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ initialOffset(value: OffsetOptions): ScrollAttribute; } @@ -1958,8 +1826,7 @@ declare class ScrollAttribute extends ScrollableCommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type ScrollOnScrollCallback = (xOffset: number, yOffset: number, scrollState: ScrollState) => void; @@ -1985,25 +1852,6 @@ declare type ScrollOnScrollCallback = (xOffset: number, yOffset: number, scrollS declare type ScrollOnWillScrollCallback = (xOffset: number, yOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => void | OffsetResult; - /** - * Called before scroll to allow developer to control real offset the Scroll can scroll. - * - * @typedef { function } ScrollOnWillScrollCallback - * @param { number } xOffset - horizontal offset this frame will scroll, which may or may not be reached. - * @param { number } yOffset - vertical offset this frame will scroll, which may or may not be reached. - * @param { ScrollState } scrollState - current scroll state. - * @param { ScrollSource } scrollSource - source of current scroll. - * @returns { undefined | OffsetResult } the remain offset for the Scroll, - * same as (xOffset, yOffset) when no OffsetResult is returned. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - declare type ScrollOnWillScrollCallback = - (xOffset: number, yOffset: number, scrollState: ScrollState, scrollSource: ScrollSource) => undefined | OffsetResult; - /** * Defines Scroll Component. * @@ -2024,6 +1872,7 @@ declare type ScrollOnWillScrollCallback = * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Scroll: ScrollInterface; @@ -2047,5 +1896,6 @@ declare const Scroll: ScrollInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const ScrollInstance: ScrollAttribute; diff --git a/api/@internal/component/ets/scroll_bar.d.ts b/api/@internal/component/ets/scroll_bar.d.ts index 3dfc4cf07a7a1a060e01eb5872d9cce97e0a7736..cc04ba76e8c70c92dff225802da007e05856757c 100644 --- a/api/@internal/component/ets/scroll_bar.d.ts +++ b/api/@internal/component/ets/scroll_bar.d.ts @@ -18,11 +18,7 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Scroller } from './scroll' -import { BarState } from './enums' -import { Optional, CommonMethod } from './common' -/*** endif */ + /** * Content scroll direction. @@ -46,8 +42,7 @@ import { Optional, CommonMethod } from './common' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ScrollBarDirection { /** @@ -69,8 +64,7 @@ declare enum ScrollBarDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Vertical, @@ -93,8 +87,7 @@ declare enum ScrollBarDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Horizontal, } @@ -121,8 +114,7 @@ declare enum ScrollBarDirection { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface ScrollBarOptions { /** @@ -147,8 +139,7 @@ declare interface ScrollBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scroller: Scroller; @@ -174,8 +165,7 @@ declare interface ScrollBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ direction?: ScrollBarDirection; @@ -201,8 +191,7 @@ declare interface ScrollBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ state?: BarState; } @@ -229,8 +218,8 @@ declare interface ScrollBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface ScrollBarInterface { /** @@ -258,8 +247,7 @@ interface ScrollBarInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value: ScrollBarOptions): ScrollBarAttribute; } @@ -286,8 +274,8 @@ interface ScrollBarInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class ScrollBarAttribute extends CommonMethod { /** @@ -297,8 +285,7 @@ declare class ScrollBarAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ enableNestedScroll(enabled: Optional): ScrollBarAttribute; @@ -335,6 +322,7 @@ declare class ScrollBarAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const ScrollBar: ScrollBarInterface; @@ -358,5 +346,6 @@ declare const ScrollBar: ScrollBarInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const ScrollBarInstance: ScrollBarAttribute; diff --git a/api/@internal/component/ets/search.d.ts b/api/@internal/component/ets/search.d.ts index fd40d664b01ee0a23ae9cf097c0c0dc8b8d1d25c..a23a92a51dd9b5c3bfdd742bfe5b7b037e86ec91 100644 --- a/api/@internal/component/ets/search.d.ts +++ b/api/@internal/component/ets/search.d.ts @@ -18,18 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { TextContentControllerBase, SelectionOptions,Callback,CommonMethod,Optional,TextDecorationOptions, Bindable } from './common'; -import { CustomBuilder } from './builder'; -import { ResourceStr,Length,ResourceColor ,Dimension,Font} from './units'; -import { CaretStyle, EditableTextOnChangeCallback, InsertValue, DeleteValue, EditMenuOptions,KeyboardAppearance,EditableTextChangeValue,AutoCapitalizationMode } from './textCommon'; -import { EnterKeyType, OnTextSelectionChangeCallback, OnContentScrollCallback, OnPasteCallback, SubmitEvent } from './textInput'; -import { CopyOptions,TextAlign } from './enums'; -import { KeyboardOptions } from './richEditor'; -import { Resource } from '../../global/resource'; -import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; -/*** endif */ - /** * Provides the method of switching the cursor position. * @@ -52,8 +40,7 @@ import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class SearchController extends TextContentControllerBase { /** @@ -76,8 +63,7 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -103,8 +89,7 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretPosition(value: number): void; @@ -121,8 +106,7 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ stopEditing(): void; @@ -149,8 +133,7 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; } @@ -170,8 +153,7 @@ declare class SearchController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum CancelButtonStyle { /** @@ -187,8 +169,7 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ CONSTANT, @@ -205,8 +186,7 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ INVISIBLE, @@ -223,8 +203,7 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ INPUT } @@ -244,8 +223,7 @@ declare enum CancelButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum SearchType { /** @@ -261,8 +239,7 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NORMAL = 0, @@ -279,8 +256,7 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NUMBER = 2, @@ -298,8 +274,7 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PHONE_NUMBER = 3, @@ -317,8 +292,7 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ EMAIL = 5, @@ -328,8 +302,7 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NUMBER_DECIMAL = 12, @@ -339,8 +312,7 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ URL = 13, @@ -362,8 +334,7 @@ declare enum SearchType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface SearchOptions { /** @@ -406,17 +377,6 @@ declare interface SearchOptions { */ value?: ResourceStr; - /** - * Text input in the search text box. - * - * @type { ?(string | Bindable)} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - value?: string | Bindable; - /** * Text displayed when there is no input. * @@ -446,8 +406,7 @@ declare interface SearchOptions { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ placeholder?: ResourceStr; @@ -484,8 +443,7 @@ declare interface SearchOptions { * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ icon?: string; @@ -511,8 +469,7 @@ declare interface SearchOptions { * @type { ?SearchController } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ controller?: SearchController; } @@ -539,8 +496,8 @@ declare interface SearchOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface SearchInterface { /** @@ -579,8 +536,7 @@ interface SearchInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options?: SearchOptions): SearchAttribute; } @@ -600,8 +556,7 @@ interface SearchInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface IconOptions { /** @@ -623,8 +578,7 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ size?: Length; @@ -643,8 +597,7 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ color?: ResourceColor; @@ -663,8 +616,7 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ src?: ResourceStr; } @@ -684,8 +636,7 @@ interface IconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface SearchButtonOptions { /** @@ -707,8 +658,7 @@ interface SearchButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontSize?: Length; @@ -727,8 +677,7 @@ interface SearchButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor?: ResourceColor; @@ -745,8 +694,7 @@ interface SearchButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ autoDisable?: Boolean; } @@ -758,8 +706,7 @@ interface SearchButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface CancelButtonOptions { /** @@ -770,8 +717,7 @@ interface CancelButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ style?: CancelButtonStyle; @@ -783,8 +729,7 @@ interface CancelButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ icon?: IconOptions; } @@ -804,8 +749,8 @@ interface CancelButtonOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice + * @noninterop * @since 20 - * @arkts 1.1&1.2 */ interface CancelButtonSymbolOptions { /** @@ -815,8 +760,7 @@ interface CancelButtonSymbolOptions { * @type { ?CancelButtonStyle } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ style?: CancelButtonStyle; @@ -838,7 +782,6 @@ interface CancelButtonSymbolOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ icon?: SymbolGlyphModifier; } @@ -852,8 +795,7 @@ interface CancelButtonSymbolOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ declare type SearchSubmitCallback = (searchContent: string, event?: SubmitEvent) => void; @@ -879,8 +821,8 @@ declare type SearchSubmitCallback = (searchContent: string, event?: SubmitEvent) * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class SearchAttribute extends CommonMethod { /** @@ -929,7 +871,6 @@ declare class SearchAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ searchButton(value: ResourceStr, option?: SearchButtonOptions): SearchAttribute; @@ -954,8 +895,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor(value: ResourceColor): SearchAttribute; @@ -1006,8 +946,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ searchIcon(value: IconOptions | SymbolGlyphModifier): SearchAttribute; @@ -1054,8 +993,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ cancelButton(value: CancelButtonOptions | CancelButtonSymbolOptions): SearchAttribute; @@ -1067,8 +1005,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textIndent(value: Dimension): SearchAttribute; @@ -1089,8 +1026,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ inputFilter(value: ResourceStr, error?: Callback): SearchAttribute; @@ -1103,8 +1039,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onEditChange(callback: Callback): SearchAttribute; @@ -1120,8 +1055,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ selectedBackgroundColor(value: ResourceColor): SearchAttribute; @@ -1153,8 +1087,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretStyle(value: CaretStyle): SearchAttribute; @@ -1183,8 +1116,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholderColor(value: ResourceColor): SearchAttribute; @@ -1218,8 +1150,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholderFont(value?: Font): SearchAttribute; @@ -1253,8 +1184,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textFont(value?: Font): SearchAttribute; @@ -1266,8 +1196,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enterKeyType(value: EnterKeyType): SearchAttribute; @@ -1323,19 +1252,6 @@ declare class SearchAttribute extends CommonMethod { */ onSubmit(callback: SearchSubmitCallback): SearchAttribute; - /** - * Call the function when clicked the search button. - * - * @param { Callback | SearchSubmitCallback } callback - callback of the listened event. - * @returns { SearchAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onSubmit(callback: Callback | SearchSubmitCallback): SearchAttribute; - /** * Call the function when editing the input text * @@ -1376,8 +1292,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onChange(callback: EditableTextOnChangeCallback): SearchAttribute; @@ -1409,8 +1324,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onTextSelectionChange(callback: OnTextSelectionChangeCallback): SearchAttribute; @@ -1442,8 +1356,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onContentScroll(callback: OnContentScrollCallback): SearchAttribute; @@ -1483,8 +1396,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onCopy(callback: Callback): SearchAttribute; @@ -1524,8 +1436,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onCut(callback: Callback): SearchAttribute; @@ -1568,8 +1479,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onPaste(callback: OnPasteCallback): SearchAttribute; @@ -1604,8 +1514,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ copyOption(value: CopyOptions): SearchAttribute; @@ -1645,7 +1554,6 @@ declare class SearchAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ maxLength(value: number): SearchAttribute; @@ -1678,8 +1586,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textAlign(value: TextAlign): SearchAttribute; @@ -1704,8 +1611,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enableKeyboardOnFocus(value: boolean): SearchAttribute; @@ -1733,8 +1639,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectionMenuHidden(value: boolean): SearchAttribute; @@ -1752,8 +1657,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ minFontSize(value: number | string | Resource): SearchAttribute; @@ -1771,8 +1675,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ maxFontSize(value: number | string | Resource): SearchAttribute; @@ -1810,7 +1713,6 @@ declare class SearchAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ minFontScale(scale: Optional): SearchAttribute; @@ -1846,7 +1748,6 @@ declare class SearchAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ maxFontScale(scale: Optional): SearchAttribute; @@ -1891,8 +1792,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): SearchAttribute; @@ -1904,8 +1804,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ decoration(value: TextDecorationOptions): SearchAttribute; @@ -1924,8 +1823,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ letterSpacing(value: number | string | Resource): SearchAttribute; @@ -1942,8 +1840,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineHeight(value: number | string | Resource): SearchAttribute; @@ -1964,8 +1861,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ type(value: SearchType): SearchAttribute; @@ -1981,8 +1877,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontFeature(value: string): SearchAttribute; @@ -2000,8 +1895,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillInsert(callback: Callback): SearchAttribute; @@ -2017,8 +1911,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidInsert(callback: Callback): SearchAttribute; @@ -2036,8 +1929,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillDelete(callback: Callback): SearchAttribute; @@ -2053,8 +1945,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidDelete(callback: Callback): SearchAttribute; @@ -2080,8 +1971,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ editMenuOptions(editMenu: EditMenuOptions): SearchAttribute; @@ -2098,8 +1988,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enablePreviewText(enable: boolean): SearchAttribute; @@ -2123,8 +2012,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ enableHapticFeedback(isEnabled: boolean): SearchAttribute; @@ -2137,7 +2025,6 @@ declare class SearchAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ autoCapitalizationMode(mode: AutoCapitalizationMode): SearchAttribute; @@ -2149,8 +2036,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ halfLeading(halfLeading: Optional): SearchAttribute; @@ -2161,8 +2047,7 @@ declare class SearchAttribute extends CommonMethod { * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ stopBackPress(isStopped: Optional): SearchAttribute; @@ -2179,8 +2064,7 @@ declare class SearchAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ onWillChange(callback: Callback): SearchAttribute; @@ -2191,8 +2075,7 @@ declare class SearchAttribute extends CommonMethod { * @returns { SearchAttribute } returns the instance of the SearchAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ keyboardAppearance(appearance: Optional): SearchAttribute; @@ -2253,6 +2136,7 @@ declare class SearchAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Search: SearchInterface; @@ -2276,5 +2160,6 @@ declare const Search: SearchInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const SearchInstance: SearchAttribute; diff --git a/api/@internal/component/ets/select.d.ts b/api/@internal/component/ets/select.d.ts index d465cbfba78f9d1bb8416db7a4cbea5fb336ecad..a973add1177264ff404773186601422139b04792 100644 --- a/api/@internal/component/ets/select.d.ts +++ b/api/@internal/component/ets/select.d.ts @@ -18,16 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonConfiguration, CommonMethod, ContentModifier, Optional, BlurStyle, Bindable } from './common'; -import { ControlSize } from './button'; -import { DividerOptions } from './textPicker'; -import { ResourceStr, Dimension, EdgeOutlineWidths, ResourceColor, EdgeColors, Resource, Font, Length, Offset, DividerStyleOptions } from './units'; -import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; -import { TextModifier } from '../TextModifier'; -import { OptionWidthMode } from './enums'; -/*** endif */ - /** * The declare of selectOption. * @@ -50,8 +40,8 @@ import { OptionWidthMode } from './enums'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare interface SelectOption { /** @@ -76,8 +66,7 @@ declare interface SelectOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ value: ResourceStr; @@ -103,8 +92,7 @@ declare interface SelectOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ icon?: ResourceStr; @@ -124,7 +112,6 @@ declare interface SelectOption { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ symbolIcon?: SymbolGlyphModifier; } @@ -151,8 +138,8 @@ declare interface SelectOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface SelectInterface { /** @@ -180,8 +167,7 @@ interface SelectInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (options: Array): SelectAttribute; } @@ -201,8 +187,7 @@ interface SelectInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ArrowPosition { /** @@ -218,8 +203,7 @@ declare enum ArrowPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ END = 0, @@ -236,8 +220,7 @@ declare enum ArrowPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ START = 1 } @@ -256,8 +239,7 @@ declare enum ArrowPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum MenuAlignType { /** @@ -272,8 +254,7 @@ declare enum MenuAlignType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ START, /** @@ -288,8 +269,7 @@ declare enum MenuAlignType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ CENTER, /** @@ -304,8 +284,7 @@ declare enum MenuAlignType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ END } @@ -316,8 +295,7 @@ declare enum MenuAlignType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ declare enum AvoidanceMode { /** @@ -326,8 +304,7 @@ declare enum AvoidanceMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ COVER_TARGET, /** @@ -336,8 +313,7 @@ declare enum AvoidanceMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ AVOID_AROUND_TARGET } @@ -351,8 +327,7 @@ declare enum AvoidanceMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnSelectCallback = (index: number, selectStr: string) => void; @@ -364,7 +339,6 @@ declare type OnSelectCallback = (index: number, selectStr: string) => void; * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ declare interface MenuOutlineOptions { /** @@ -375,7 +349,6 @@ declare interface MenuOutlineOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ width?: Dimension | EdgeOutlineWidths; @@ -387,7 +360,6 @@ declare interface MenuOutlineOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ color?: ResourceColor | EdgeColors; } @@ -414,8 +386,8 @@ declare interface MenuOutlineOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class SelectAttribute extends CommonMethod { /** @@ -459,19 +431,6 @@ declare class SelectAttribute extends CommonMethod { */ selected(numCount: Optional): SelectAttribute; - /** - * Sets the serial number of the select item, starting from 0. - * - * @param { number | Resource | undefined | Bindable | Bindable } numCount - the serial number of the select item. - * @returns { SelectAttribute } the attribute of the select. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - selected(numCount: number | Resource | undefined | Bindable | Bindable): SelectAttribute; - /** * Sets the text display of the select button itself. @@ -514,19 +473,6 @@ declare class SelectAttribute extends CommonMethod { */ value(resStr: Optional): SelectAttribute; - /** - * Sets the text display of the select button itself. - * - * @param { ResourceStr | undefined | Bindable | Bindable } resStr - the text display of the select button itself. - * @returns { SelectAttribute } the attribute of the select. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - value(resStr: ResourceStr | undefined | Bindable | Bindable): SelectAttribute; - /** * Sets the text properties of the select button itself. * @@ -552,8 +498,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ font(value: Font): SelectAttribute; @@ -565,8 +510,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ font(selectFont: Optional): SelectAttribute; @@ -595,8 +539,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor(value: ResourceColor): SelectAttribute; @@ -608,8 +551,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ fontColor(resColor: Optional): SelectAttribute; @@ -638,8 +580,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectedOptionBgColor(value: ResourceColor): SelectAttribute; @@ -651,8 +592,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ selectedOptionBgColor(resColor: Optional): SelectAttribute; @@ -681,8 +621,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectedOptionFont(value: Font): SelectAttribute; @@ -694,8 +633,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ selectedOptionFont(selectFont: Optional): SelectAttribute; @@ -724,8 +662,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectedOptionFontColor(value: ResourceColor): SelectAttribute; @@ -737,8 +674,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ selectedOptionFontColor(resColor: Optional): SelectAttribute; @@ -767,8 +703,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ optionBgColor(value: ResourceColor): SelectAttribute; @@ -780,8 +715,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ optionBgColor(resColor: Optional): SelectAttribute; @@ -810,8 +744,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ optionFont(value: Font): SelectAttribute; @@ -823,8 +756,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ optionFont(selectFont: Optional): SelectAttribute; @@ -853,8 +785,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ optionFontColor(value: ResourceColor): SelectAttribute; @@ -866,8 +797,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ optionFontColor(resColor: Optional): SelectAttribute; @@ -908,8 +838,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onSelect(callback: Optional): SelectAttribute; @@ -930,8 +859,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ space(value: Length): SelectAttribute; @@ -943,8 +871,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ space(spaceLength: Optional): SelectAttribute; @@ -965,8 +892,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ arrowPosition(value: ArrowPosition): SelectAttribute; @@ -978,8 +904,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ arrowPosition(position: Optional): SelectAttribute; @@ -1001,8 +926,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ menuAlign(alignType: MenuAlignType, offset?: Offset): SelectAttribute; @@ -1015,8 +939,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ menuAlign(alignType: Optional, offset?: Offset): SelectAttribute; @@ -1037,8 +960,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ optionWidth(value: Dimension | OptionWidthMode ): SelectAttribute; @@ -1050,8 +972,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ optionWidth(width: Optional ): SelectAttribute; @@ -1072,8 +993,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ optionHeight(value: Dimension): SelectAttribute; @@ -1085,8 +1005,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ optionHeight(height: Optional): SelectAttribute; @@ -1107,8 +1026,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ menuBackgroundColor(value: ResourceColor): SelectAttribute; @@ -1120,8 +1038,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ menuBackgroundColor(resColor: Optional): SelectAttribute; @@ -1142,8 +1059,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ menuBackgroundBlurStyle(value: BlurStyle): SelectAttribute; @@ -1155,8 +1071,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ menuBackgroundBlurStyle(style: Optional): SelectAttribute; @@ -1168,8 +1083,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ controlSize(value: ControlSize): SelectAttribute; @@ -1181,8 +1095,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ controlSize(size: Optional): SelectAttribute; @@ -1194,8 +1107,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ menuItemContentModifier(modifier: ContentModifier): SelectAttribute; @@ -1207,8 +1119,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ menuItemContentModifier(modifier: Optional>): SelectAttribute; @@ -1220,8 +1131,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ divider(options: Optional | null): SelectAttribute; @@ -1234,7 +1144,6 @@ declare class SelectAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ textModifier(modifier: Optional): SelectAttribute; @@ -1247,7 +1156,6 @@ declare class SelectAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ arrowModifier(modifier: Optional): SelectAttribute; @@ -1260,7 +1168,6 @@ declare class SelectAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ optionTextModifier(modifier: Optional): SelectAttribute; @@ -1273,7 +1180,6 @@ declare class SelectAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ selectedOptionTextModifier(modifier: Optional): SelectAttribute; @@ -1285,8 +1191,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ dividerStyle(style: Optional): SelectAttribute; @@ -1298,8 +1203,7 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ avoidance(mode: AvoidanceMode): SelectAttribute; @@ -1312,7 +1216,6 @@ declare class SelectAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ menuOutline(outline: MenuOutlineOptions): SelectAttribute; @@ -1349,8 +1252,8 @@ declare class SelectAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @noninterop */ declare interface MenuItemConfiguration extends CommonConfiguration{ /** @@ -1360,8 +1263,7 @@ declare interface MenuItemConfiguration extends CommonConfiguration { /** @@ -470,8 +459,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ viewPort(value: ViewportRect): ShapeAttribute; @@ -511,8 +499,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ stroke(value: ResourceColor): ShapeAttribute; @@ -552,8 +539,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fill(value: ResourceColor): ShapeAttribute; @@ -587,7 +573,7 @@ declare class ShapeAttribute extends CommonMethod { /** * Called when the offset of the starting point of border drawing is set. * - * @param { Length } value + * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -605,7 +591,6 @@ declare class ShapeAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ strokeDashOffset(value: Length): ShapeAttribute; @@ -649,20 +634,6 @@ declare class ShapeAttribute extends CommonMethod { */ strokeDashArray(value: Array): ShapeAttribute; - /** - * Called when the gap of the border is set. - * - * @param { Array } value - * @returns { ShapeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - strokeDashArray(value: Array): ShapeAttribute; - /** * Called when the path endpoint drawing style is set. * @@ -699,8 +670,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeLineCap(value: LineCapStyle): ShapeAttribute; @@ -740,8 +710,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeLineJoin(value: LineJoinStyle): ShapeAttribute; @@ -775,7 +744,7 @@ declare class ShapeAttribute extends CommonMethod { /** * Called when the limit value for drawing acute angles as oblique angles is set. * - * @param { Length } value + * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -793,7 +762,6 @@ declare class ShapeAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ strokeMiterLimit(value: Length): ShapeAttribute; @@ -833,8 +801,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeOpacity(value: number | string | Resource): ShapeAttribute; @@ -874,8 +841,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fillOpacity(value: number | string | Resource): ShapeAttribute; @@ -909,7 +875,7 @@ declare class ShapeAttribute extends CommonMethod { /** * Called when the width of the border is set. * - * @param { Length } value + * @param { number | string } value * @returns { ShapeAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -927,7 +893,6 @@ declare class ShapeAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ strokeWidth(value: Length): ShapeAttribute; @@ -967,8 +932,7 @@ declare class ShapeAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ antiAlias(value: boolean): ShapeAttribute; @@ -1019,22 +983,6 @@ declare class ShapeAttribute extends CommonMethod { * @since 11 */ mesh(value: Array, column: number, row: number): ShapeAttribute; - - /** - * Called when shape mesh. - * - * @param { Array } value - * @param { number } column - * @param { number } row - * @returns { ShapeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - mesh(value: Array, column: number, row: number): ShapeAttribute; } /** @@ -1066,6 +1014,7 @@ declare class ShapeAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Shape: ShapeInterface; @@ -1098,31 +1047,6 @@ declare const Shape: ShapeInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const ShapeInstance: ShapeAttribute; - -/** - * Provides interfaces for drawing components. - * - * @interface ShapeInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface ShapeInterface { - /** - * Shape component constructor. - * - * @param { PixelMap } [value] - PixelMap object to draw. - * @returns { ShapeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (value?: PixelMap): ShapeAttribute; -} diff --git a/api/@internal/component/ets/sidebar.d.ts b/api/@internal/component/ets/sidebar.d.ts index d60a3cd1455c426a29e2e68347219c4b36c21797..2add0dfbfbbcca9f830764dbe1954a03bc436629 100644 --- a/api/@internal/component/ets/sidebar.d.ts +++ b/api/@internal/component/ets/sidebar.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Resource } from '../../global/resource' -import { Length, ResourceColor, Dimension } from './units' -import { CommonMethod, PixelMap, Bindable } from './common' -/*** endif */ - /** * Sets the sidebar style of showing * @@ -46,8 +40,7 @@ import { CommonMethod, PixelMap, Bindable } from './common' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum SideBarContainerType { /** @@ -69,8 +62,7 @@ declare enum SideBarContainerType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Embed, @@ -93,8 +85,7 @@ declare enum SideBarContainerType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Overlay, @@ -109,8 +100,7 @@ declare enum SideBarContainerType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ AUTO, } @@ -137,8 +127,7 @@ declare enum SideBarContainerType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum SideBarPosition { /** @@ -160,8 +149,7 @@ declare enum SideBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Start, @@ -184,8 +172,7 @@ declare enum SideBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ End, } @@ -197,8 +184,7 @@ declare enum SideBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface ButtonIconOptions { /** @@ -233,8 +219,7 @@ declare interface ButtonIconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ shown: string | PixelMap | Resource; @@ -270,8 +255,7 @@ declare interface ButtonIconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ hidden: string | PixelMap | Resource; @@ -307,8 +291,7 @@ declare interface ButtonIconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ switching?: string | PixelMap | Resource; } @@ -335,8 +318,7 @@ declare interface ButtonIconOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface ButtonStyle { /** @@ -364,8 +346,7 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ left?: number; @@ -394,8 +375,7 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ top?: number; @@ -424,8 +404,7 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ width?: number; @@ -454,8 +433,7 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ height?: number; @@ -491,8 +469,7 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ icons?: ButtonIconOptions; } @@ -519,8 +496,8 @@ declare interface ButtonStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface SideBarContainerInterface { /** @@ -548,8 +525,7 @@ interface SideBarContainerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (type?: SideBarContainerType): SideBarContainerAttribute; } @@ -571,8 +547,7 @@ interface SideBarContainerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface DividerStyle { /** @@ -592,8 +567,7 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeWidth: Length; @@ -612,8 +586,7 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ color?: ResourceColor; @@ -632,8 +605,7 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ startMargin?: Length; @@ -652,8 +624,7 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ endMargin?: Length; } @@ -680,8 +651,8 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class SideBarContainerAttribute extends CommonMethod { /** @@ -713,19 +684,6 @@ declare class SideBarContainerAttribute extends CommonMethod } value - * @returns { SideBarContainerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - showSideBar(value: boolean | Bindable): SideBarContainerAttribute; - /** * Callback controlButton function when setting the style of button * @@ -751,8 +709,7 @@ declare class SideBarContainerAttribute extends CommonMethod void): SideBarContainerAttribute; @@ -848,20 +803,6 @@ declare class SideBarContainerAttribute extends CommonMethod } value - * @returns { SideBarContainerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - sideBarWidth(value: number | Bindable): SideBarContainerAttribute; - /** * Sets the min length of sidebar. * default value is 200vp. @@ -890,8 +831,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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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. * @@ -324,46 +295,39 @@ declare enum SliderChangeMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - SLIDE_AND_CLICK, - - /** - * Users are not allowed to move the slider by touching the slider. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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: @@ -381,35 +345,30 @@ declare enum SliderInteraction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface SlideRange { - /** - * Start of the slide range. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - from?: number; - - /** - * End of the slide range. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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. * @@ -442,298 +401,271 @@ declare interface SlideRange { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @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; - - /** - * Current value of Slider. - * - * @type { ?(number| undefined | Bindable) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - value?: number | undefined | Bindable; - - /** - * 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 * @@ -749,65 +681,58 @@ declare interface SliderOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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. * @@ -823,87 +748,79 @@ declare enum SliderBlockType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type SliderTriggerChangeCallback = (value: number, mode: SliderChangeMode) => void; - /** * You need a custom class to implement the ContentModifier API. * @@ -912,71 +829,60 @@ declare type SliderTriggerChangeCallback = (value: number, mode: SliderChangeMod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface SliderConfiguration extends CommonConfiguration { - /** - * Current progress. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - value: number; - - /** - * Minimum value. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - min: number; - - /** - * Maximum value. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - max: number; - - /** - * Step of the slider. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - step: number; - - /** - * Triggers slider changes. - * - * @type { SliderTriggerChangeCallback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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. * @@ -1009,52 +915,92 @@ 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. @@ -1066,54 +1012,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. @@ -1127,7 +1069,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. @@ -1141,7 +1082,6 @@ interface SliderPrefixOptions extends SliderCustomContentOptions { */ interface SliderSuffixOptions extends SliderCustomContentOptions { } - /** * Defines the attribute functions of Slider. * @@ -1174,634 +1114,600 @@ interface SliderSuffixOptions extends SliderCustomContentOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ + /** + * 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - contentModifier(modifier: ContentModifier): SliderAttribute; - - /** - * Set the valid slidable range. - * - * @param { SlideRange } value - * @returns { SliderAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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. * @@ -1831,9 +1737,9 @@ declare class SliderAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Slider: SliderInterface; - /** * Defines Slider Component instance. * @@ -1863,5 +1769,6 @@ declare const Slider: SliderInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const SliderInstance: SliderAttribute; diff --git a/api/@internal/component/ets/span.d.ts b/api/@internal/component/ets/span.d.ts index 8646766bc0cac06d85f6054e4ba92d49bb02c36b..624d82ec829b66755f13092dbbec585277d878ab 100644 --- a/api/@internal/component/ets/span.d.ts +++ b/api/@internal/component/ets/span.d.ts @@ -18,15 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ResourceColor, Dimension, BorderRadiuses, Length, Font } from './units'; -import { CommonMethod, ShadowOptions } from './common'; -import { LengthMetrics } from './../Graphics'; -import { Resource } from './../../../api/global/resource'; -import { FontStyle, FontWeight, TextCase } from './enums'; -import { DecorationStyleInterface } from './styledString'; -/*** endif */ - /** * Define the background style of span. * @@ -42,8 +33,7 @@ import { DecorationStyleInterface } from './styledString'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface TextBackgroundStyle { /** @@ -61,8 +51,7 @@ declare interface TextBackgroundStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ color?: ResourceColor; @@ -81,8 +70,7 @@ declare interface TextBackgroundStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ radius?: Dimension | BorderRadiuses; } @@ -102,8 +90,8 @@ declare interface TextBackgroundStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @noninterop */ declare class BaseSpan extends CommonMethod { /** @@ -123,8 +111,7 @@ declare class BaseSpan extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textBackgroundStyle(style: TextBackgroundStyle): T; @@ -136,8 +123,7 @@ declare class BaseSpan extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ baselineOffset(value: LengthMetrics): T; } @@ -174,8 +160,8 @@ declare class BaseSpan extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface SpanInterface { /** @@ -214,8 +200,7 @@ interface SpanInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value: string | Resource): SpanAttribute; } @@ -244,8 +229,8 @@ interface SpanInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class SpanAttribute extends BaseSpan { /** @@ -264,8 +249,7 @@ declare class SpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ font(value: Font): SpanAttribute; @@ -305,8 +289,7 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor(value: ResourceColor): SpanAttribute; @@ -346,8 +329,7 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontSize(value: number | string | Resource): SpanAttribute; @@ -387,8 +369,7 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontStyle(value: FontStyle): SpanAttribute; @@ -443,20 +424,6 @@ declare class SpanAttribute extends BaseSpan { */ fontWeight(value: number | FontWeight | ResourceStr): SpanAttribute; - /** - * Called when the font weight is set. - * - * @param { number | FontWeight | string } value - * @returns { SpanAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - fontWeight(value: number | FontWeight | string): SpanAttribute; - /** * Called when the font list of text is set. * @@ -493,8 +460,7 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontFamily(value: string | Resource): SpanAttribute; @@ -545,8 +511,7 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ decoration(value: DecorationStyleInterface): SpanAttribute; @@ -601,20 +566,6 @@ declare class SpanAttribute extends BaseSpan { */ letterSpacing(value: number | ResourceStr): SpanAttribute; - /** - * Called when the distance between text fonts is set. - * - * @param { number | string } value - * @returns { SpanAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - letterSpacing(value: number | string): SpanAttribute; - /** * Called when the type of letter in the text font is set. * @@ -651,8 +602,7 @@ declare class SpanAttribute extends BaseSpan { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textCase(value: TextCase): SpanAttribute; @@ -672,8 +622,7 @@ declare class SpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ lineHeight(value: Length): SpanAttribute; @@ -694,8 +643,7 @@ declare class SpanAttribute extends BaseSpan { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textShadow(value: ShadowOptions | Array): SpanAttribute; } @@ -729,6 +677,7 @@ declare class SpanAttribute extends BaseSpan { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Span: SpanInterface; @@ -761,5 +710,6 @@ declare const Span: SpanInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const SpanInstance: SpanAttribute; diff --git a/api/@internal/component/ets/stack.d.ts b/api/@internal/component/ets/stack.d.ts index ccce79ba0264de8843d3758f9fd76f0d5f2769d6..722a0971d1c12b1e92998b1d69d6da9471e19245 100644 --- a/api/@internal/component/ets/stack.d.ts +++ b/api/@internal/component/ets/stack.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { PointLightStyle, CommonMethod } from './common'; -import { Alignment } from './enums'; -/*** endif */ - /** * Options used to construct the stack. * @@ -31,8 +26,7 @@ import { Alignment } from './enums'; * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface StackOptions { /** @@ -79,8 +73,7 @@ declare interface StackOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ alignContent?: Alignment; } @@ -117,8 +110,8 @@ declare interface StackOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface StackInterface { /** @@ -169,8 +162,7 @@ interface StackInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options?: StackOptions): StackAttribute; } @@ -199,8 +191,8 @@ interface StackInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class StackAttribute extends CommonMethod { /** @@ -239,8 +231,7 @@ declare class StackAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ alignContent(value: Alignment): StackAttribute; @@ -251,8 +242,7 @@ declare class StackAttribute extends CommonMethod { * @returns { StackAttribute } The attribute of the stack. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ pointLight(value: PointLightStyle): StackAttribute; } @@ -286,6 +276,7 @@ declare class StackAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Stack: StackInterface; @@ -318,5 +309,6 @@ declare const Stack: StackInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const StackInstance: StackAttribute; diff --git a/api/@internal/component/ets/state_management.d.ts b/api/@internal/component/ets/state_management.d.ts index 9edb4e29fafcca00af5bd0a6f5d9ff4ac3e61388..8fa2bcf540e86c67e7c5c1c2ae8357b5a6c684b5 100644 --- a/api/@internal/component/ets/state_management.d.ts +++ b/api/@internal/component/ets/state_management.d.ts @@ -31,8 +31,7 @@ * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ColorMode { /** @@ -46,8 +45,7 @@ declare enum ColorMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ LIGHT = 0, @@ -62,8 +60,7 @@ declare enum ColorMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ DARK, } @@ -81,8 +78,7 @@ declare enum ColorMode { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum LayoutDirection { /** @@ -96,8 +92,7 @@ declare enum LayoutDirection { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ LTR, @@ -112,8 +107,7 @@ declare enum LayoutDirection { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ RTL, @@ -128,8 +122,7 @@ declare enum LayoutDirection { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Auto, } @@ -139,8 +132,7 @@ declare enum LayoutDirection { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'7','1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ declare class Storage { /** @@ -150,8 +142,7 @@ declare class Storage { * @param { string } file * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'7','1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ constructor(needCrossThread?: boolean, file?: string); @@ -162,8 +153,7 @@ declare class Storage { * @returns { string | undefined } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'7','1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ get(key: string): string | undefined; @@ -186,7 +176,6 @@ declare class Storage { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 20 - * @arkts 1.2 */ set(key: string, val: Object | undefined | null): void; @@ -195,8 +184,7 @@ declare class Storage { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'7','1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ clear(): void; @@ -206,8 +194,7 @@ declare class Storage { * @param { string } key * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'7','1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ delete(key: string): void; } diff --git a/api/@internal/component/ets/stepper.d.ts b/api/@internal/component/ets/stepper.d.ts index 59d4b0fc0f886d4b08b9f5ea20d758bf48ba7efe..c4a4fd0e75e337aca5e250acafe64159e63d5c1a 100644 --- a/api/@internal/component/ets/stepper.d.ts +++ b/api/@internal/component/ets/stepper.d.ts @@ -18,45 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Bindable, CommonMethod } from './common' -/*** endif */ - -/** - * Declare the StepperOptions. - * - * @interface StepperOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ -interface StepperOptions { - /** - * Set the stepper index. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - index?: number; - - /** - * Set the stepper index. - * - * @type { ?(number | Bindable) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - index?: number | Bindable; -} - /** * Declare the stepper. * @@ -79,8 +40,8 @@ interface StepperOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface StepperInterface { /** @@ -111,19 +72,6 @@ interface StepperInterface { * @since 11 */ (value?: { index?: number }): StepperAttribute; - /** - * Called when the stepper component is used. - * - * Anonymous Object Rectification. - * @param { StepperOptions } value - * @returns { StepperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (value?: StepperOptions): StepperAttribute; } /** @@ -148,8 +96,8 @@ interface StepperInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class StepperAttribute extends CommonMethod { /** @@ -177,8 +125,7 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onFinish(callback: () => void): StepperAttribute; @@ -207,8 +154,7 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onSkip(callback: () => void): StepperAttribute; @@ -237,8 +183,7 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onChange(callback: (prevIndex: number, index: number) => void): StepperAttribute; @@ -267,8 +212,7 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onNext(callback: (index: number, pendingIndex: number) => void): StepperAttribute; @@ -297,8 +241,7 @@ declare class StepperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onPrevious(callback: (index: number, pendingIndex: number) => void): StepperAttribute; } @@ -323,6 +266,7 @@ declare class StepperAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Stepper: StepperInterface; @@ -346,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 3fab51d1d05d572944ffb59e68d4530f881ee84d..bae1bcb089405d44416ecbc7a9c5d43abda8399e 100644 --- a/api/@internal/component/ets/stepper_item.d.ts +++ b/api/@internal/component/ets/stepper_item.d.ts @@ -18,10 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod } from './common' -/*** endif */ - /** * ItemState * @@ -44,8 +40,7 @@ import { CommonMethod } from './common' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ItemState { /** @@ -67,8 +62,7 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Normal, @@ -91,8 +85,7 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Disabled, @@ -115,8 +108,7 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Waiting, @@ -139,8 +131,7 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Skip, } @@ -167,8 +158,8 @@ declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface StepperItemInterface { /** @@ -193,8 +184,7 @@ interface StepperItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (): StepperItemAttribute; } @@ -221,8 +211,8 @@ interface StepperItemInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class StepperItemAttribute extends CommonMethod { /** @@ -250,8 +240,7 @@ declare class StepperItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ prevLabel(value: string): StepperItemAttribute; @@ -280,8 +269,7 @@ declare class StepperItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ nextLabel(value: string): StepperItemAttribute; @@ -310,8 +298,7 @@ declare class StepperItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ status(value?: ItemState): StepperItemAttribute; } @@ -336,6 +323,7 @@ declare class StepperItemAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const StepperItemInstance: StepperItemAttribute; @@ -359,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 a5ddf911e219a663d21a93cfb2666e2e8b78ce63..78895aa8a46502aa794bb901c00d6555f7865d35 100644 --- a/api/@internal/component/ets/styled_string.d.ts +++ b/api/@internal/component/ets/styled_string.d.ts @@ -282,26 +282,26 @@ declare interface StyleOptions { /** * The start position of the StyleOptions. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - start?: number; + start?: int; /** * The length of the modifiedStyledString's characters. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - length?: number; + length?: int; /** * The attribute key of the StyleOptions. @@ -2277,4 +2277,4 @@ declare abstract class CustomSpan { * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ -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 cb232e2c3489f3b445736c068311a877f021f25c..bf63a8a7e52e1132d33a568b14796149665a55b4 100644 --- a/api/@internal/component/ets/swiper.d.ts +++ b/api/@internal/component/ets/swiper.d.ts @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { IndicatorComponentController } from './indicatorcomponent'; -import { CommonMethod, Callback, ICurve, Optional, Bindable } from './common'; -import { EdgeEffect, Curve, PageFlipMode } from './enums'; -import { Length, LengthMetrics, VoidCallback, ResourceColor, VP, Font } from './units'; -/*** endif */ - /** * Provides methods for switching components. * @@ -46,8 +39,7 @@ import { Length, LengthMetrics, VoidCallback, ResourceColor, VP, Font } from './ * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class SwiperController { /** @@ -71,8 +63,7 @@ declare class SwiperController { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -101,18 +92,6 @@ declare class SwiperController { */ showNext(); - /** - * Called when the next child component is displayed. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - showNext(): void; - /** * Called when the previous subcomponent is displayed. * @@ -138,18 +117,6 @@ declare class SwiperController { */ showPrevious(); - /** - * Called when the previous subcomponent is displayed. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - showPrevious(): void; - /** * Controlling Swiper to change to the specified subcomponent. * @@ -178,21 +145,6 @@ declare class SwiperController { */ changeIndex(index: number, animationMode?: SwiperAnimationMode | boolean); - /** - * Controlling Swiper to change to the specified subcomponent. - * - * @param { number } index - the index of item to be redirected. - * @param { SwiperAnimationMode | boolean } [animationMode] - animation mode for changeIndex, - * true is equivalent to SwiperAnimationMode.DEFAULT_ANIMATION, false is equivalent to SwiperAnimationMode.NO_ANIMATION - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - changeIndex(index: number, animationMode?: SwiperAnimationMode | boolean): void; - /** * Called when need to stop the swiper animation. * @@ -232,19 +184,6 @@ declare class SwiperController { */ finishAnimation(callback?: VoidCallback); - /** - * Called when need to stop the swiper animation. - * - * @param { ?VoidCallback } callback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - finishAnimation(callback?: VoidCallback): void; - /** * Called when need to preload specified child. * @@ -259,8 +198,7 @@ declare class SwiperController { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ preloadItems(indices: Optional>): Promise; } @@ -280,8 +218,7 @@ declare class SwiperController { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class Indicator { /** @@ -303,8 +240,7 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ left(value: Length): T; @@ -327,8 +263,7 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ top(value: Length): T; @@ -352,8 +287,7 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ right(value: Length): T; @@ -377,8 +311,7 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ bottom(value: Length): T; @@ -407,8 +340,7 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ start(value: LengthMetrics): T; @@ -422,8 +354,7 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ end(value: LengthMetrics): T; @@ -446,8 +377,7 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ static dot(): DotIndicator; @@ -470,8 +400,7 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ static digit(): DigitIndicator; } @@ -493,8 +422,7 @@ declare class Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class DotIndicator extends Indicator { /** @@ -512,8 +440,7 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -537,8 +464,7 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ itemWidth(value: Length): DotIndicator; @@ -562,8 +488,7 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ itemHeight(value: Length): DotIndicator; @@ -587,8 +512,7 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectedItemWidth(value: Length): DotIndicator; @@ -612,8 +536,7 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectedItemHeight(value: Length): DotIndicator; @@ -637,8 +560,7 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ mask(value: boolean): DotIndicator; @@ -662,8 +584,7 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ color(value: ResourceColor): DotIndicator; @@ -687,8 +608,7 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectedColor(value: ResourceColor): DotIndicator; @@ -700,8 +620,7 @@ declare class DotIndicator extends Indicator { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ maxDisplayCount(maxDisplayCount: number): DotIndicator; @@ -714,8 +633,7 @@ declare class DotIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ space(space: LengthMetrics): DotIndicator; } @@ -744,8 +662,7 @@ declare class DotIndicator extends Indicator { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface SwiperAutoFill { /** @@ -761,8 +678,7 @@ declare interface SwiperAutoFill { * @type { VP } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 * @form */ minSize: VP; @@ -785,8 +701,7 @@ declare interface SwiperAutoFill { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class DigitIndicator extends Indicator { /** @@ -804,8 +719,7 @@ declare class DigitIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -828,8 +742,7 @@ declare class DigitIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor(value: ResourceColor): DigitIndicator; @@ -853,8 +766,7 @@ declare class DigitIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectedFontColor(value: ResourceColor): DigitIndicator; @@ -883,8 +795,7 @@ declare class DigitIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ digitFont(value: Font): DigitIndicator; @@ -908,8 +819,7 @@ declare class DigitIndicator extends Indicator { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectedDigitFont(value: Font): DigitIndicator; } @@ -928,8 +838,7 @@ declare class DigitIndicator extends Indicator { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface ArrowStyle { /** @@ -948,8 +857,7 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ showBackground?: boolean; @@ -971,8 +879,7 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ isSidebarMiddle?: boolean; @@ -994,8 +901,7 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ backgroundSize?: Length; @@ -1015,8 +921,7 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ backgroundColor?: ResourceColor; @@ -1040,8 +945,7 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ arrowSize?: Length; @@ -1061,8 +965,7 @@ declare interface ArrowStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ arrowColor?: ResourceColor; } @@ -1091,8 +994,7 @@ declare interface ArrowStyle { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum SwiperDisplayMode { /** @@ -1132,8 +1034,7 @@ declare enum SwiperDisplayMode { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ STRETCH, @@ -1183,8 +1084,8 @@ declare enum SwiperDisplayMode { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface SwiperInterface { /** @@ -1214,8 +1115,7 @@ interface SwiperInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (controller?: SwiperController): SwiperAttribute; } @@ -1325,8 +1225,7 @@ declare interface IndicatorStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface SwiperAnimationEvent { /** @@ -1345,8 +1244,7 @@ declare interface SwiperAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ currentOffset: number; @@ -1366,8 +1264,7 @@ declare interface SwiperAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ targetOffset: number; @@ -1387,8 +1284,7 @@ declare interface SwiperAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ velocity: number; } @@ -1401,8 +1297,7 @@ declare interface SwiperAnimationEvent { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface AutoPlayOptions { /** @@ -1414,8 +1309,7 @@ declare interface AutoPlayOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ stopWhenTouched: boolean; } @@ -1426,8 +1320,7 @@ declare interface AutoPlayOptions { * @enum { number } SwiperNestedScrollMode * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum SwiperNestedScrollMode { /** @@ -1436,8 +1329,7 @@ declare enum SwiperNestedScrollMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ SELF_ONLY = 0, @@ -1446,8 +1338,7 @@ declare enum SwiperNestedScrollMode { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ SELF_FIRST = 1, } @@ -1460,8 +1351,7 @@ declare enum SwiperNestedScrollMode { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ declare enum SwiperAnimationMode { /** @@ -1471,8 +1361,7 @@ declare enum SwiperAnimationMode { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ NO_ANIMATION = 0, @@ -1483,8 +1372,7 @@ declare enum SwiperAnimationMode { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ DEFAULT_ANIMATION = 1, @@ -1496,8 +1384,7 @@ declare enum SwiperAnimationMode { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ FAST_ANIMATION = 2, } @@ -1513,8 +1400,7 @@ declare enum SwiperAnimationMode { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnSwiperAnimationStartCallback = (index: number, targetIndex: number, extraInfo: SwiperAnimationEvent) => void; @@ -1528,8 +1414,7 @@ declare type OnSwiperAnimationStartCallback = (index: number, targetIndex: numbe * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnSwiperAnimationEndCallback = (index: number, extraInfo: SwiperAnimationEvent) => void; @@ -1542,8 +1427,7 @@ declare type OnSwiperAnimationEndCallback = (index: number, extraInfo: SwiperAni * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnSwiperGestureSwipeCallback = (index: number, extraInfo: SwiperAnimationEvent) => void; @@ -1571,8 +1455,8 @@ declare type OnSwiperGestureSwipeCallback = (index: number, extraInfo: SwiperAni * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class SwiperAttribute extends CommonMethod { /** @@ -1607,19 +1491,6 @@ declare class SwiperAttribute extends CommonMethod { * @since 11 */ index(value: number): SwiperAttribute; - /** - * Called when the index value of the displayed subcomponent is set in the container. - * - * @param { number | Bindable } value - * @returns { SwiperAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - index(value: number | Bindable): SwiperAttribute; /** * Called when setting whether the subcomponent plays automatically. @@ -1678,8 +1549,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ autoPlay(autoPlay: boolean, options: AutoPlayOptions): SwiperAttribute; @@ -1711,8 +1581,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interval(value: number): SwiperAttribute; @@ -1758,8 +1627,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ indicator(indicator: IndicatorComponentController | DotIndicator | DigitIndicator | boolean): SwiperAttribute; @@ -1782,8 +1650,7 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ displayArrow(value: ArrowStyle | boolean, isHoverShow?: boolean): SwiperAttribute; @@ -1814,8 +1681,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ loop(value: boolean): SwiperAttribute; @@ -1845,8 +1711,7 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ duration(value: number): SwiperAttribute; @@ -1877,8 +1742,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ vertical(value: boolean): SwiperAttribute; @@ -1916,8 +1780,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ itemSpace(value: number | string): SwiperAttribute; @@ -1950,8 +1813,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ displayMode(value: SwiperDisplayMode): SwiperAttribute; @@ -1988,8 +1850,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ cachedCount(value: number): SwiperAttribute; @@ -2005,8 +1866,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ cachedCount(count: number, isShown: boolean): SwiperAttribute; @@ -2045,8 +1905,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ displayCount(value: number | string | SwiperAutoFill, swipeByGroup?: boolean): SwiperAttribute; @@ -2082,8 +1941,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ effectMode(value: EdgeEffect): SwiperAttribute; @@ -2114,8 +1972,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ disableSwipe(value: boolean): SwiperAttribute; @@ -2151,8 +2008,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ curve(value: Curve | string | ICurve): SwiperAttribute; @@ -2195,8 +2051,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onChange(event: Callback): SwiperAttribute; @@ -2209,8 +2064,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onSelected(event: Callback): SwiperAttribute; @@ -2265,8 +2119,7 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ prevMargin(value: Length, ignoreBlank?: boolean): SwiperAttribute; @@ -2310,8 +2163,7 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ nextMargin(value: Length, ignoreBlank?: boolean): SwiperAttribute; @@ -2324,8 +2176,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onUnselected(event: Callback): SwiperAttribute; @@ -2387,8 +2238,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onAnimationStart(event: OnSwiperAnimationStartCallback): SwiperAttribute; @@ -2435,8 +2285,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onAnimationEnd(event: OnSwiperAnimationEndCallback): SwiperAttribute; @@ -2472,8 +2321,7 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onGestureSwipe(event: OnSwiperGestureSwipeCallback): SwiperAttribute; @@ -2492,8 +2340,7 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ nestedScroll(value: SwiperNestedScrollMode): SwiperAttribute; @@ -2514,8 +2361,7 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ customContentTransition(transition: SwiperContentAnimatedTransition): SwiperAttribute; @@ -2540,8 +2386,7 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onContentDidScroll(handler: ContentDidScrollCallback): SwiperAttribute; @@ -2553,8 +2398,7 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ indicatorInteractive(value: boolean): SwiperAttribute; @@ -2567,8 +2411,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ pageFlipMode(mode: Optional): SwiperAttribute; @@ -2581,8 +2424,7 @@ declare class SwiperAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ onContentWillScroll(handler: ContentWillScrollCallback): SwiperAttribute; @@ -2608,8 +2450,7 @@ declare class SwiperAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface SwiperContentAnimatedTransition { /** @@ -2621,8 +2462,7 @@ declare interface SwiperContentAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ timeout?: number; @@ -2633,8 +2473,7 @@ declare interface SwiperContentAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ transition: Callback; } @@ -2646,8 +2485,7 @@ declare interface SwiperContentAnimatedTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface SwiperContentTransitionProxy { /** @@ -2657,8 +2495,7 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ selectedIndex: number; @@ -2669,8 +2506,7 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ index: number; @@ -2681,8 +2517,7 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ position: number; @@ -2693,8 +2528,7 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ mainAxisLength: number; @@ -2704,8 +2538,7 @@ declare interface SwiperContentTransitionProxy { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ finishTransition(): void; } @@ -2718,8 +2551,7 @@ declare interface SwiperContentTransitionProxy { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ declare interface SwiperContentWillScrollResult { /** @@ -2730,8 +2562,7 @@ declare interface SwiperContentWillScrollResult { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ currentIndex: number; @@ -2743,8 +2574,7 @@ declare interface SwiperContentWillScrollResult { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ comingIndex: number; @@ -2757,8 +2587,7 @@ declare interface SwiperContentWillScrollResult { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ offset: number; } @@ -2774,8 +2603,7 @@ declare interface SwiperContentWillScrollResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type ContentDidScrollCallback = (selectedIndex: number, index: number, position: number, mainAxisLength: number) => void; @@ -2789,8 +2617,7 @@ declare type ContentDidScrollCallback = (selectedIndex: number, index: number, p * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ declare type ContentWillScrollCallback = (result: SwiperContentWillScrollResult) => boolean; @@ -2816,6 +2643,7 @@ declare type ContentWillScrollCallback = (result: SwiperContentWillScrollResult) * @form * @atomicservice * @since 11 + * @noninterop */ declare const Swiper: SwiperInterface; @@ -2841,5 +2669,6 @@ declare const Swiper: SwiperInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const SwiperInstance: SwiperAttribute; diff --git a/api/@internal/component/ets/symbol_span.d.ts b/api/@internal/component/ets/symbol_span.d.ts index d78fc42c8c89daecb28934b517def4dd185eae4c..45a7e9e37f7818818247296139dfebfa413e9bc8 100644 --- a/api/@internal/component/ets/symbol_span.d.ts +++ b/api/@internal/component/ets/symbol_span.d.ts @@ -18,14 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Resource } from './../../../api/global/resource'; -import { CommonMethod, AttributeModifier } from './common'; -import { ResourceColor } from './units'; -import { FontWeight } from './enums'; -import { SymbolEffectStrategy, SymbolRenderingStrategy } from './symbolglyph'; -/*** endif */ - /** * Provides an interface for SymbolSpan. * @@ -51,7 +43,7 @@ import { SymbolEffectStrategy, SymbolRenderingStrategy } from './symbolglyph'; * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 + * @noninterop */ interface SymbolSpanInterface { /** @@ -82,7 +74,6 @@ interface SymbolSpanInterface { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ (value: Resource): SymbolSpanAttribute; } @@ -112,7 +103,7 @@ interface SymbolSpanInterface { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 + * @noninterop */ declare class SymbolSpanAttribute extends CommonMethod { /** @@ -143,7 +134,6 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ fontSize(value: number | string | Resource): SymbolSpanAttribute; @@ -175,7 +165,6 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ fontColor(value: Array): SymbolSpanAttribute; @@ -207,7 +196,6 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | string): SymbolSpanAttribute; @@ -239,7 +227,6 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ effectStrategy(value: SymbolEffectStrategy): SymbolSpanAttribute; @@ -271,7 +258,6 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ renderingStrategy(value: SymbolRenderingStrategy): SymbolSpanAttribute; @@ -293,7 +279,6 @@ declare class SymbolSpanAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ attributeModifier(modifier: AttributeModifier): SymbolSpanAttribute; } @@ -320,6 +305,7 @@ declare class SymbolSpanAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @noninterop */ declare const SymbolSpan: SymbolSpanInterface; @@ -345,5 +331,6 @@ declare const SymbolSpan: SymbolSpanInterface; * @form * @atomicservice * @since 20 + * @noninterop */ declare const SymbolSpanInstance: SymbolSpanAttribute; diff --git a/api/@internal/component/ets/symbolglyph.d.ts b/api/@internal/component/ets/symbolglyph.d.ts index 9b9ad64302d868ac9363df80e5bf610ab5cc04f4..a3ee1ee6ed16cba9c043eb060d48e8c20b03ba75 100644 --- a/api/@internal/component/ets/symbolglyph.d.ts +++ b/api/@internal/component/ets/symbolglyph.d.ts @@ -43,6 +43,7 @@ * @form * @atomicservice * @since 20 + * @noninterop */ interface SymbolGlyphInterface { /** @@ -1005,6 +1006,7 @@ declare class QuickReplaceSymbolEffect extends SymbolEffect { * @form * @atomicservice * @since 20 + * @noninterop */ declare class SymbolGlyphAttribute extends CommonMethod { /** @@ -1304,6 +1306,7 @@ declare class SymbolGlyphAttribute extends CommonMethod { * @form * @atomicservice * @since 20 + * @noninterop */ declare const SymbolGlyph: SymbolGlyphInterface; @@ -1329,5 +1332,6 @@ declare const SymbolGlyph: SymbolGlyphInterface; * @form * @atomicservice * @since 20 + * @noninterop */ declare const SymbolGlyphInstance: SymbolGlyphAttribute; diff --git a/api/@internal/component/ets/tab_content.d.ts b/api/@internal/component/ets/tab_content.d.ts index 56eb3f714ad4c8d34039f841e950dbc7940aff3f..89af3678c4367e7fa671a7cacda7730bf3803d75 100644 --- a/api/@internal/component/ets/tab_content.d.ts +++ b/api/@internal/component/ets/tab_content.d.ts @@ -18,15 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod } from './common'; -import { CustomBuilder } from './builder' -import { TextHeightAdaptivePolicy, TextOverflow, VerticalAlign } from './enums'; -import { Dimension, Font, Length, LocalizedPadding, Padding, Resource, ResourceColor, ResourceStr, VoidCallback } from './units'; -import { ComponentContent } from '../ComponentContent' -import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; -/*** endif */ - /** * Enum for the mode of the tab bar when selected. * @@ -42,8 +33,7 @@ import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum SelectedMode { /** @@ -59,8 +49,7 @@ declare enum SelectedMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ INDICATOR, @@ -77,8 +66,7 @@ declare enum SelectedMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ BOARD } @@ -98,8 +86,7 @@ declare enum SelectedMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum LayoutMode { @@ -116,8 +103,7 @@ declare enum LayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ AUTO = 0, /** @@ -133,8 +119,7 @@ declare enum LayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ VERTICAL = 1, @@ -151,8 +136,7 @@ declare enum LayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ HORIZONTAL = 2 } @@ -284,77 +268,6 @@ interface IndicatorStyle { marginTop?: Length; } -/** - * Provide an interface for the style of an SubTabBar indicator including color, height, width, border radius - * and margin top - * - * @interface SubTabBarIndicatorStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare interface SubTabBarIndicatorStyle { - /** - * Define the color of the indicator - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - color?: ResourceColor; - - /** - * Define the height of the indicator - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - height?: Length; - - /** - * Define the width of the indicator. - * If it is 0, the width will be equal to the width of the content - * - * @type { ?Length } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - width?: Length; - - /** - * Define the border radius of the indicator - * - * @type { ?Length } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - borderRadius?: Length; - - /** - * Define the margin top of the indicator - * - * @type { ?Length } - * @default 8 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - marginTop?: Length; -} - /** * Provide an interface for the style of an indicator including border radius * @@ -370,8 +283,7 @@ declare interface SubTabBarIndicatorStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface BoardStyle { /** @@ -389,8 +301,7 @@ interface BoardStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ borderRadius?: Length; } @@ -555,115 +466,6 @@ declare interface LabelStyle { unselectedColor?: ResourceColor; } -/** - * TabBarLabelStyle object. - * - * @interface TabBarLabelStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare interface TabBarLabelStyle { - - /** - * overflow mode. - * - * @type { ?TextOverflow } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - overflow?: TextOverflow; - - /** - * Label max lines. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - maxLines?: number; - - /** - * Min font size for adapted height. - * - * @type { ?(number | ResourceStr) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - minFontSize?: number | ResourceStr; - - /** - * Max font size for adapted height. - * - * @type { ?(number | ResourceStr) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - maxFontSize?: number | ResourceStr; - - /** - * Adapt text height option. - * - * @type { ?TextHeightAdaptivePolicy } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - heightAdaptivePolicy?: TextHeightAdaptivePolicy; - - /** - * Font style. - * - * @type { ?Font } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - font?: Font; - - /** - * The text color of the selected tab bar. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - selectedColor?: ResourceColor; - - /** - * The text color of the unselected tab bar. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - unselectedColor?: ResourceColor; -} - /** * TabBarIconStyle object. * @@ -671,8 +473,7 @@ declare interface TabBarLabelStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface TabBarIconStyle { /** @@ -682,8 +483,7 @@ declare interface TabBarIconStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ selectedColor?: ResourceColor; @@ -694,8 +494,7 @@ declare interface TabBarIconStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ unselectedColor?: ResourceColor; } @@ -714,7 +513,7 @@ declare interface TabBarIconStyle { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 + * @noninterop */ declare class TabBarSymbol { /** @@ -735,7 +534,6 @@ declare class TabBarSymbol { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ normal: SymbolGlyphModifier; @@ -757,7 +555,6 @@ declare class TabBarSymbol { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ selected?: SymbolGlyphModifier; } @@ -769,8 +566,7 @@ declare class TabBarSymbol { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface TabBarOptions { /** @@ -810,8 +606,7 @@ declare interface TabBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ icon?: string | Resource; @@ -847,8 +642,7 @@ declare interface TabBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ text?: string | Resource } @@ -872,8 +666,7 @@ declare interface TabBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class SubTabBarStyle { /** @@ -898,8 +691,7 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(content: ResourceStr); /** @@ -909,8 +701,7 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(content: ResourceStr | ComponentContent); @@ -933,8 +724,7 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ static of(content: ResourceStr): SubTabBarStyle; /** @@ -946,8 +736,7 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ static of(content: ResourceStr | ComponentContent): SubTabBarStyle; @@ -972,18 +761,6 @@ declare class SubTabBarStyle { */ indicator(value: IndicatorStyle): SubTabBarStyle; - /** - * Set the style of the indicator when selected - * - * @param { SubTabBarIndicatorStyle } style - indicates the indicator style of the sub tab bar - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - indicator(style: SubTabBarIndicatorStyle): SubTabBarStyle; - /** * Set the mode of the indicator when selected * @@ -1005,8 +782,7 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectedMode(value: SelectedMode): SubTabBarStyle; @@ -1031,8 +807,7 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ board(value: BoardStyle): SubTabBarStyle; @@ -1057,18 +832,6 @@ declare class SubTabBarStyle { */ labelStyle(value: LabelStyle): SubTabBarStyle; - /** - * Set the label style of the sub tab bar - * - * @param { TabBarLabelStyle } style - indicates the label style of the sub tab bar - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - labelStyle(style: TabBarLabelStyle): SubTabBarStyle; - /** * Set the padding of the sub tab bar * @@ -1091,8 +854,7 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ padding(value: Padding | Dimension): SubTabBarStyle; @@ -1108,8 +870,7 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ padding(padding: LocalizedPadding): SubTabBarStyle; @@ -1130,8 +891,7 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ id(value: string): SubTabBarStyle; } @@ -1155,8 +915,7 @@ declare class SubTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class BottomTabBarStyle { /** @@ -1194,8 +953,7 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(icon: ResourceStr | TabBarSymbol, text: ResourceStr); @@ -1232,8 +990,7 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ static of(icon: ResourceStr | TabBarSymbol, text: ResourceStr): BottomTabBarStyle; @@ -1258,18 +1015,6 @@ declare class BottomTabBarStyle { */ labelStyle(value: LabelStyle): BottomTabBarStyle; - /** - * Set the label style of the bottom tab bar - * - * @param { TabBarLabelStyle } style - indicates the label style of the bottom tab bar - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - labelStyle(style: TabBarLabelStyle): BottomTabBarStyle; - /** * Set the padding of the bottom tab bar * @@ -1303,8 +1048,7 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ padding(value: Padding | Dimension | LocalizedPadding): BottomTabBarStyle; @@ -1326,8 +1070,7 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ layoutMode(value: LayoutMode): BottomTabBarStyle; @@ -1349,8 +1092,7 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ verticalAlign(value: VerticalAlign): BottomTabBarStyle; @@ -1376,8 +1118,7 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ symmetricExtensible(value: boolean): BottomTabBarStyle; @@ -1398,8 +1139,7 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ id(value: string): BottomTabBarStyle; @@ -1411,8 +1151,7 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ iconStyle(style: TabBarIconStyle): BottomTabBarStyle; } @@ -1439,8 +1178,8 @@ declare class BottomTabBarStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface TabContentInterface { /** @@ -1465,8 +1204,7 @@ interface TabContentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (): TabContentAttribute; } @@ -1493,8 +1231,8 @@ interface TabContentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class TabContentAttribute extends CommonMethod { /** @@ -1599,8 +1337,7 @@ declare class TabContentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ tabBar(content: ComponentContent | SubTabBarStyle | BottomTabBarStyle | string | Resource | CustomBuilder | TabBarOptions): TabContentAttribute; @@ -1614,8 +1351,7 @@ declare class TabContentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillShow(event: VoidCallback): TabContentAttribute; @@ -1628,8 +1364,7 @@ declare class TabContentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillHide(event: VoidCallback): TabContentAttribute; } @@ -1654,6 +1389,7 @@ declare class TabContentAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const TabContent: TabContentInterface; @@ -1677,5 +1413,6 @@ declare const TabContent: TabContentInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const TabContentInstance: TabContentAttribute; diff --git a/api/@internal/component/ets/tabs.d.ts b/api/@internal/component/ets/tabs.d.ts index a5c460d779aa0cc7f13c35c028540194c4e5ec31..486ee7f689aabb6bd5e18edec751cee7a07404dc 100644 --- a/api/@internal/component/ets/tabs.d.ts +++ b/api/@internal/component/ets/tabs.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { BackgroundBlurStyleOptions, BackgroundEffectOptions, BlurStyle, Callback, CommonMethod, Optional, TranslateOptions, DividerStyle, Bindable } from './common'; -import { EdgeEffect, PageFlipMode } from './enums'; -import { Dimension, Length, ResourceColor } from './units'; -/*** endif */ - /** * CommonModifier * @@ -32,6 +26,7 @@ import { Dimension, Length, ResourceColor } from './units'; * @crossplatform * @atomicservice * @since 15 + * @noninterop */ declare type CommonModifier = import('../api/arkui/CommonModifier').CommonModifier; @@ -57,8 +52,7 @@ declare type CommonModifier = import('../api/arkui/CommonModifier').CommonModifi * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum BarMode { /** @@ -82,8 +76,7 @@ declare enum BarMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Scrollable = 0, @@ -107,10 +100,9 @@ declare enum BarMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - Fixed = 1, + Fixed = 1 } /** @@ -120,8 +112,7 @@ declare enum BarMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum AnimationMode { /** @@ -130,8 +121,7 @@ declare enum AnimationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ CONTENT_FIRST = 0, @@ -141,8 +131,7 @@ declare enum AnimationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ACTION_FIRST = 1, @@ -152,8 +141,7 @@ declare enum AnimationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NO_ANIMATION = 2, @@ -164,8 +152,7 @@ declare enum AnimationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ CONTENT_FIRST_WITH_JUMP = 3, @@ -176,8 +163,7 @@ declare enum AnimationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ ACTION_FIRST_WITH_JUMP = 4, } @@ -204,8 +190,7 @@ declare enum AnimationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum BarPosition { /** @@ -227,8 +212,7 @@ declare enum BarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Start, @@ -251,8 +235,7 @@ declare enum BarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ End, } @@ -272,8 +255,7 @@ declare enum BarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum LayoutStyle { /** @@ -290,8 +272,7 @@ declare enum LayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ ALWAYS_CENTER = 0, /** @@ -308,8 +289,7 @@ declare enum LayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ ALWAYS_AVERAGE_SPLIT = 1, /** @@ -329,8 +309,7 @@ declare enum LayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ SPACE_BETWEEN_OR_CENTER = 2 } @@ -342,8 +321,7 @@ declare enum LayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ declare enum TabsCacheMode { /** @@ -352,8 +330,7 @@ declare enum TabsCacheMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ CACHE_BOTH_SIDE = 0, @@ -363,8 +340,7 @@ declare enum TabsCacheMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ CACHE_LATEST_SWITCHED = 1 } @@ -388,8 +364,7 @@ declare enum TabsCacheMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class TabsController { /** @@ -411,8 +386,7 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -439,8 +413,7 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ changeIndex(value: number): void; @@ -456,8 +429,7 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ preloadItems(indices: Optional>): Promise; @@ -468,8 +440,7 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ setTabBarTranslate(translate: TranslateOptions): void; @@ -480,8 +451,7 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ setTabBarOpacity(opacity: number): void; } @@ -493,8 +463,8 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 + * @noninterop */ declare interface TabsOptions { /** @@ -519,8 +489,7 @@ declare interface TabsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ barPosition?: BarPosition; @@ -549,17 +518,6 @@ declare interface TabsOptions { * @since 11 */ index?: number; - /** - * Set the index of the currently displayed tab. - * - * @type { ?(number | Bindable) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - index?: number | Bindable; /** * Set the Tabs controller. @@ -583,10 +541,9 @@ declare interface TabsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - controller?: TabsController + controller?: TabsController; /** * Set common attributes to tabbar. @@ -622,8 +579,8 @@ declare interface TabsOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface TabsInterface { /** @@ -661,8 +618,7 @@ interface TabsInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ (options?: TabsOptions): TabsAttribute; } @@ -685,6 +641,7 @@ interface TabsInterface { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ interface DividerStyle { /** @@ -786,8 +743,7 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface TabsAnimationEvent { /** @@ -807,8 +763,7 @@ declare interface TabsAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ currentOffset: number; @@ -829,8 +784,7 @@ declare interface TabsAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ targetOffset: number; @@ -851,8 +805,7 @@ declare interface TabsAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ velocity: number; } @@ -872,8 +825,7 @@ declare interface TabsAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface BarGridColumnOptions { /** @@ -893,8 +845,7 @@ interface BarGridColumnOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ sm?: number; @@ -915,8 +866,7 @@ interface BarGridColumnOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ md?: number; @@ -937,8 +887,7 @@ interface BarGridColumnOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ lg?: number; @@ -958,8 +907,7 @@ interface BarGridColumnOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ margin?: Dimension; @@ -979,8 +927,7 @@ interface BarGridColumnOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ gutter?: Dimension; } @@ -1000,8 +947,7 @@ interface BarGridColumnOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface ScrollableBarModeOptions { /** @@ -1020,8 +966,7 @@ interface ScrollableBarModeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ margin?: Dimension; @@ -1041,8 +986,7 @@ interface ScrollableBarModeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ nonScrollableLayoutStyle?: LayoutStyle; } @@ -1057,8 +1001,7 @@ interface ScrollableBarModeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnTabsAnimationStartCallback = (index: number, targetIndex: number, extraInfo: TabsAnimationEvent) => void; @@ -1071,8 +1014,7 @@ declare type OnTabsAnimationStartCallback = (index: number, targetIndex: number, * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnTabsAnimationEndCallback = (index: number, extraInfo: TabsAnimationEvent) => void; @@ -1085,8 +1027,7 @@ declare type OnTabsAnimationEndCallback = (index: number, extraInfo: TabsAnimati * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnTabsGestureSwipeCallback = (index: number, extraInfo: TabsAnimationEvent) => void; @@ -1100,8 +1041,7 @@ declare type OnTabsGestureSwipeCallback = (index: number, extraInfo: TabsAnimati * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type TabsCustomContentTransitionCallback = (from: number, to: number) => TabContentAnimatedTransition | undefined; @@ -1117,8 +1057,7 @@ declare type TabsCustomContentTransitionCallback = (from: number, to: number) => * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnTabsContentWillChangeCallback = (currentIndex: number, comingIndex: number) => boolean; @@ -1144,8 +1083,8 @@ declare type OnTabsContentWillChangeCallback = (currentIndex: number, comingInde * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class TabsAttribute extends CommonMethod { /** @@ -1173,8 +1112,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ vertical(value: boolean): TabsAttribute; @@ -1203,8 +1141,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ barPosition(value: BarPosition): TabsAttribute; @@ -1233,8 +1170,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scrollable(value: boolean): TabsAttribute; @@ -1314,8 +1250,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ barMode(value: BarMode, options?: ScrollableBarModeOptions): TabsAttribute; @@ -1357,8 +1292,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ barWidth(value: Length): TabsAttribute; @@ -1400,12 +1334,11 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ 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. * @@ -1418,7 +1351,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 @@ -1436,7 +1369,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. @@ -1464,8 +1397,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ animationDuration(value: number): TabsAttribute; @@ -1479,8 +1411,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ animationMode(mode: Optional): TabsAttribute; @@ -1493,8 +1424,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ edgeEffect(edgeEffect: Optional): TabsAttribute; @@ -1542,23 +1472,21 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ 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 arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ - onSelected(event: Callback): TabsAttribute; + onUnselected(event: Callback): TabsAttribute; /** * Called when the tab is clicked. @@ -1588,24 +1516,10 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ 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 arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onUnselected(event: Callback): TabsAttribute; - /** * Called when the tab content flip animation start. * @@ -1640,8 +1554,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onAnimationStart(handler: OnTabsAnimationStartCallback): TabsAttribute; @@ -1677,8 +1590,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onAnimationEnd(handler: OnTabsAnimationEndCallback): TabsAttribute; @@ -1714,8 +1626,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onGestureSwipe(handler: OnTabsGestureSwipeCallback): TabsAttribute; @@ -1742,8 +1653,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fadingEdge(value: boolean): TabsAttribute; @@ -1764,8 +1674,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ divider(value: DividerStyle | null): TabsAttribute; @@ -1785,8 +1694,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ barOverlap(value: boolean): TabsAttribute; @@ -1807,8 +1715,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ barBackgroundColor(value: ResourceColor): TabsAttribute; @@ -1833,8 +1740,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ barGridAlign(value: BarGridColumnOptions): TabsAttribute; @@ -1892,8 +1798,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ customContentTransition(delegate: TabsCustomContentTransitionCallback): TabsAttribute; @@ -1905,8 +1810,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ barBackgroundBlurStyle(value: BlurStyle): TabsAttribute; @@ -1918,8 +1822,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ pageFlipMode(mode: Optional): TabsAttribute; @@ -1932,8 +1835,7 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ barBackgroundBlurStyle(style: BlurStyle, options: BackgroundBlurStyleOptions): TabsAttribute; @@ -1945,11 +1847,23 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ 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. * @@ -1983,24 +1897,21 @@ declare class TabsAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ 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 arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ - cachedMaxCount(count: number, mode: TabsCacheMode): TabsAttribute; + onSelected(event: Callback): TabsAttribute; } /** @@ -2020,8 +1931,7 @@ declare class TabsAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface TabContentAnimatedTransition { /** @@ -2045,8 +1955,7 @@ declare interface TabContentAnimatedTransition { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ timeout?: number; @@ -2078,8 +1987,7 @@ declare interface TabContentAnimatedTransition { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ transition: Callback; } @@ -2101,8 +2009,7 @@ declare interface TabContentAnimatedTransition { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface TabContentTransitionProxy { /** @@ -2122,8 +2029,7 @@ declare interface TabContentTransitionProxy { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ from: number; @@ -2144,8 +2050,7 @@ declare interface TabContentTransitionProxy { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ to: number; @@ -2164,8 +2069,7 @@ declare interface TabContentTransitionProxy { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ finishTransition(): void; } @@ -2190,6 +2094,7 @@ declare interface TabContentTransitionProxy { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Tabs: TabsInterface; @@ -2213,5 +2118,6 @@ declare const Tabs: TabsInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const TabsInstance: TabsAttribute; diff --git a/api/@internal/component/ets/text.d.ts b/api/@internal/component/ets/text.d.ts index e2995382db2c7629845a63c0fbf9e83fe9c01316..c39a69db6eb81162a0d952ccb27c1490faa600cf 100644 --- a/api/@internal/component/ets/text.d.ts +++ b/api/@internal/component/ets/text.d.ts @@ -112,6 +112,7 @@ declare interface TextOverflowOptions { * @form * @atomicservice * @since 11 + * @noninterop */ interface TextInterface { /** @@ -184,6 +185,7 @@ interface TextInterface { * @form * @atomicservice * @since 11 + * @noninterop */ declare class TextAttribute extends CommonMethod { /** @@ -1741,6 +1743,7 @@ declare class TextAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const TextInstance: TextAttribute; @@ -1773,6 +1776,7 @@ declare const TextInstance: TextAttribute; * @form * @atomicservice * @since 11 + * @noninterop */ declare const Text: TextInterface; diff --git a/api/@internal/component/ets/text_area.d.ts b/api/@internal/component/ets/text_area.d.ts index 89c7e073de1493a3a78c99e79669c1dce7d81e52..d330e3dc162b37cf61555a7f59a02d0c6430f85c 100644 --- a/api/@internal/component/ets/text_area.d.ts +++ b/api/@internal/component/ets/text_area.d.ts @@ -18,20 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { KeyboardOptions, PasteEvent } from './richEditor'; -import { CaretStyle, DeleteValue, EditMenuOptions, EditableTextOnChangeCallback, InsertValue, - AutoCapitalizationMode,EditableTextChangeValue,KeyboardAppearance } from './textCommon'; -import { BarState, CopyOptions, FontStyle, FontWeight, LineBreakStrategy, TextContentStyle, TextAlign, TextOverflow, - TextHeightAdaptivePolicy, WordBreak, EllipsisMode } from './enums'; -import { EnterKeyType, SubmitEvent, ContentType } from './textInput'; -import { Dimension, Font, Length, LengthMetrics, ResourceColor, ResourceStr } from './units'; -import { InputCounterOptions, TextContentControllerBase, SelectionOptions, - TextDecorationOptions, CommonMethod, Callback, Optional, Bindable } from './common'; -import { CustomBuilder } from './builder'; -import { Resource } from '../../global/resource'; -/*** endif */ - /** * Provides the method of switching the cursor position. * @@ -53,8 +39,7 @@ import { Resource } from '../../global/resource'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class TextAreaController extends TextContentControllerBase { /** @@ -77,8 +62,7 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -104,8 +88,7 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretPosition(value: number): void; @@ -149,8 +132,7 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; @@ -167,8 +149,7 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ stopEditing(): void; } @@ -195,8 +176,7 @@ declare class TextAreaController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface TextAreaOptions { /** @@ -227,8 +207,7 @@ declare interface TextAreaOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholder?: ResourceStr; @@ -263,18 +242,6 @@ declare interface TextAreaOptions { */ text?: ResourceStr; - /** - * Sets the current value of TextArea. - * - * @type { ?(ResourceStr | Bindable | Bindable | Bindable) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - text?: ResourceStr | Bindable | Bindable | Bindable; - /** * Called when the position of the insertion cursor is set. * @@ -297,8 +264,7 @@ declare interface TextAreaOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ controller?: TextAreaController; } @@ -325,8 +291,8 @@ declare interface TextAreaOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface TextAreaInterface { /** @@ -354,8 +320,7 @@ interface TextAreaInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value?: TextAreaOptions): TextAreaAttribute; } @@ -375,8 +340,7 @@ interface TextAreaInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum TextAreaType { /** @@ -392,8 +356,7 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NORMAL = 0, @@ -410,8 +373,7 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NUMBER = 2, @@ -429,8 +391,7 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PHONE_NUMBER = 3, @@ -448,8 +409,7 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ EMAIL = 5, @@ -459,8 +419,7 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NUMBER_DECIMAL = 12, @@ -470,8 +429,7 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ URL = 13, @@ -495,8 +453,7 @@ declare enum TextAreaType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ declare type TextAreaSubmitCallback = (enterKeyType: EnterKeyType, event?: SubmitEvent) => void; @@ -522,8 +479,8 @@ declare type TextAreaSubmitCallback = (enterKeyType: EnterKeyType, event?: Submi * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class TextAreaAttribute extends CommonMethod { /** @@ -551,8 +508,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholderColor(value: ResourceColor): TextAreaAttribute; @@ -582,8 +538,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholderFont(value: Font): TextAreaAttribute; @@ -604,8 +559,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enterKeyType(value: EnterKeyType): TextAreaAttribute; @@ -645,8 +599,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textAlign(value: TextAlign): TextAreaAttribute; @@ -679,8 +632,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretColor(value: ResourceColor): TextAreaAttribute; @@ -709,8 +661,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor(value: ResourceColor): TextAreaAttribute; @@ -741,8 +692,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontSize(value: Length): TextAreaAttribute; @@ -771,8 +721,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontStyle(value: FontStyle): TextAreaAttribute; @@ -793,7 +742,7 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @since 10 */ - /** + /** * Called when the font weight is set. * *

NOTE: @@ -820,7 +769,6 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | ResourceStr): TextAreaAttribute; @@ -854,8 +802,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontFamily(value: ResourceStr): TextAreaAttribute; @@ -876,8 +823,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textOverflow(value: TextOverflow): TextAreaAttribute; @@ -889,8 +835,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textIndent(value: Dimension): TextAreaAttribute; @@ -928,8 +873,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ inputFilter(value: ResourceStr, error?: (value: string) => void): TextAreaAttribute; @@ -941,8 +885,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ caretStyle(value: CaretStyle): TextAreaAttribute; @@ -955,8 +898,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ selectedBackgroundColor(value: ResourceColor): TextAreaAttribute; @@ -993,18 +935,6 @@ declare class TextAreaAttribute extends CommonMethod { * @since 14 */ onSubmit(callback: TextAreaSubmitCallback): TextAreaAttribute; - /** - * Called when submitted. - * - * @param { ((enterKey: EnterKeyType) => void) | TextAreaSubmitCallback } callback - callback of the listened event. - * @returns { TextAreaAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onSubmit(callback: ((enterKey: EnterKeyType) => void) | TextAreaSubmitCallback): TextAreaAttribute; /** * Called when the input changes. @@ -1047,8 +977,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onChange(callback: EditableTextOnChangeCallback): TextAreaAttribute; @@ -1070,8 +999,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onTextSelectionChange(callback: (selectionStart: number, selectionEnd: number) => void): TextAreaAttribute; @@ -1094,8 +1022,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onContentScroll(callback: (totalOffsetX: number, totalOffsetY: number) => void): TextAreaAttribute; @@ -1119,8 +1046,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onEditChange(callback: (isEditing: boolean) => void): TextAreaAttribute; @@ -1149,8 +1075,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onCopy(callback: (value: string) => void): TextAreaAttribute; @@ -1179,8 +1104,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onCut(callback: (value: string) => void): TextAreaAttribute; @@ -1212,8 +1136,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onPaste(callback: (value: string, event: PasteEvent) => void): TextAreaAttribute; @@ -1248,8 +1171,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ copyOption(value: CopyOptions): TextAreaAttribute; @@ -1270,8 +1192,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enableKeyboardOnFocus(value: boolean): TextAreaAttribute; @@ -1297,8 +1218,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maxLength(value: number): TextAreaAttribute; @@ -1337,8 +1257,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ showCounter(value: boolean, options?: InputCounterOptions): TextAreaAttribute; @@ -1362,8 +1281,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ style(value: TextContentStyle): TextAreaAttribute; @@ -1382,8 +1300,7 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ barState(value: BarState): TextAreaAttribute; @@ -1413,8 +1330,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectionMenuHidden(value: boolean): TextAreaAttribute; @@ -1432,8 +1348,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ minFontSize(value: number | string | Resource): TextAreaAttribute; @@ -1451,8 +1366,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ maxFontSize(value: number | string | Resource): TextAreaAttribute; @@ -1490,7 +1404,6 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ minFontScale(scale: Optional): TextAreaAttribute; @@ -1524,7 +1437,6 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ maxFontScale(scale: Optional): TextAreaAttribute; @@ -1555,8 +1467,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextAreaAttribute; @@ -1588,8 +1499,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maxLines(value: number): TextAreaAttribute; @@ -1632,8 +1542,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ wordBreak(value: WordBreak): TextAreaAttribute; @@ -1649,8 +1558,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineBreakStrategy(strategy: LineBreakStrategy): TextAreaAttribute; @@ -1695,8 +1603,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): TextAreaAttribute; @@ -1708,8 +1615,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ decoration(value: TextDecorationOptions): TextAreaAttribute; @@ -1728,8 +1634,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ letterSpacing(value: number | string | Resource): TextAreaAttribute; @@ -1745,8 +1650,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineSpacing(value: LengthMetrics): TextAreaAttribute; @@ -1776,8 +1680,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineHeight(value: number | string | Resource): TextAreaAttribute; @@ -1798,8 +1701,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ type(value: TextAreaType): TextAreaAttribute; @@ -1810,8 +1712,7 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableAutoFill(value: boolean): TextAreaAttribute; @@ -1822,8 +1723,7 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentType(contentType: ContentType): TextAreaAttribute; @@ -1839,8 +1739,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontFeature(value: string): TextAreaAttribute; @@ -1858,8 +1757,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillInsert(callback: Callback): TextAreaAttribute; @@ -1875,8 +1773,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidInsert(callback: Callback): TextAreaAttribute; @@ -1894,8 +1791,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillDelete(callback: Callback): TextAreaAttribute; @@ -1911,8 +1807,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidDelete(callback: Callback): TextAreaAttribute; @@ -1926,8 +1821,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ editMenuOptions(editMenu: EditMenuOptions): TextAreaAttribute; @@ -1944,8 +1838,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enablePreviewText(enable: boolean): TextAreaAttribute; @@ -1969,8 +1862,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ enableHapticFeedback(isEnabled: boolean): TextAreaAttribute; @@ -1983,7 +1875,6 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ autoCapitalizationMode(mode: AutoCapitalizationMode): TextAreaAttribute; @@ -1995,8 +1886,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ halfLeading(halfLeading: Optional): TextAreaAttribute; @@ -2014,8 +1904,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ ellipsisMode(mode: Optional): TextAreaAttribute; @@ -2026,8 +1915,7 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ stopBackPress(isStopped: Optional): TextAreaAttribute; @@ -2044,8 +1932,7 @@ declare class TextAreaAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ onWillChange(callback: Callback): TextAreaAttribute; @@ -2056,8 +1943,7 @@ declare class TextAreaAttribute extends CommonMethod { * @returns { TextAreaAttribute } returns the instance of the TextAreaAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ keyboardAppearance(appearance: Optional): TextAreaAttribute; @@ -2118,6 +2004,7 @@ declare class TextAreaAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const TextArea: TextAreaInterface; @@ -2141,5 +2028,6 @@ declare const TextArea: TextAreaInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const TextAreaInstance: TextAreaAttribute; diff --git a/api/@internal/component/ets/text_clock.d.ts b/api/@internal/component/ets/text_clock.d.ts index 29a9c245dc6d74f1a14e0581a00ba86da8f24820..616157cd1d9774e5bb96ba365b2bb62e5fdcedde 100644 --- a/api/@internal/component/ets/text_clock.d.ts +++ b/api/@internal/component/ets/text_clock.d.ts @@ -18,12 +18,6 @@ * @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. * @@ -44,745 +38,701 @@ import { FontStyle, FontWeight } from './enums' * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ -declare class TextClockController { - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * constructor. - * + declare class TextClockController { + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + constructor(); + /** + * Provides a start event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides a start event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Provides a start event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + start(); + /** + * Provides a stop event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides a stop event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Provides a stop event for textclock. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + stop(); + } + + /** + * TextClockConfiguration used by text clock content modifier + * + * @extends CommonConfiguration + * @interface TextClockConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(); - /** - * Provides a start event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Provides a start event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Provides a start event for textclock. - * + * @since 12 + */ + declare interface TextClockConfiguration extends CommonConfiguration { + /** + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + timeZoneOffset: number; + + /** + * TextClock is started or not. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + started: boolean; + + /** + * The time of the TextClock. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + timeValue: number; + } + + /** + * Options to construct TextClock component. + * + * @interface TextClockOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @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. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Provides a stop event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Provides a stop event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ - stop(); - /** - * Provides a stop event for textclock. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - stop(): void; -} - -/** - * TextClockConfiguration used by text clock content modifier - * - * @extends CommonConfiguration - * @interface TextClockConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface TextClockConfiguration extends CommonConfiguration { - /** - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - timeZoneOffset: number; - - /** - * TextClock is started or not. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - started: boolean; - - /** - * The time of the TextClock. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - timeValue: number; -} - -/** - * Options to construct TextClock component. - * - * @interface TextClockOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface TextClockOptions { - /** - * Time zone offset. - * - * @type { ?number } + * @since 18 + */ + declare interface TextClockOptions { + /** + * Time zone offset. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Time zone offset. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Time zone offset. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Time zone offset. + * Anonymous Object Rectification. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ + timeZoneOffset?: number; + + /** + * TextClock controller. + * + * @type { ?TextClockController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * TextClock controller. + * + * @type { ?TextClockController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * TextClock controller. + * + * @type { ?TextClockController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * TextClock controller. + * Anonymous Object Rectification. + * + * @type { ?TextClockController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ + controller?: TextClockController + } + + /** + * TextClock component, which provides the text clock capability. + * + * @interface TextClockInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Time zone offset. + * TextClock component, which provides the text clock capability. * - * @type { ?number } + * @interface TextClockInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Time zone offset. + * TextClock component, which provides the text clock capability. * - * @type { ?number } + * @interface TextClockInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - /** - * Time zone offset. - * Anonymous Object Rectification. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - timeZoneOffset?: number; - - /** - * TextClock controller. - * - * @type { ?TextClockController } + interface TextClockInterface { + /** + * Construct the text clock component. + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. + * + * @param { object } options + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Construct the text clock component. + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. + * + * @param { object } options + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Construct the text clock component. + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. + * + * @param { object } options + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Construct the text clock component. + * Specifies the current time zone. + * The valid value is an integer ranging from - 14 to 12, + * Where a negative value indicates the eastern time zone, for example, -8. + * Anonymous Object Rectification. + * + * @param { TextClockOptions } [options] - TextClock options. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 18 + */ + (options?: TextClockOptions): TextClockAttribute; + } + + /** + * Provides attribute for TextClock. + * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * TextClock controller. + * Provides attribute for TextClock. * - * @type { ?TextClockController } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * TextClock controller. + * Provides attribute for TextClock. * - * @type { ?TextClockController } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - /** - * TextClock controller. - * Anonymous Object Rectification. + declare class TextClockAttribute extends CommonMethod { + /** + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". + * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * + * @param { string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". + * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * + * @param { string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". + * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * The default value is "hh:mm:ss" when TextClock is not in a form. + * The default value is "hh:mm" when TextClock is in a form. + * If the value has second or millisecond, the value will be set to the default value. + * + * @param { string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". + * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), + * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), + * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * The default value is "hh:mm:ss" when TextClock is not in a form. + * The default value is "hh:mm" when TextClock is in a form. + * If the value has second or millisecond, the value will be set to the default value. + * + * @param { ResourceStr } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + format(value: ResourceStr): TextClockAttribute; + + /** + * Provides a date change callback. + * The callback parameter is Unix Time Stamp, + * The number of milliseconds that have elapsed since January 1, 1970 (UTC). + * The minimum callback interval for this event is seconds. + * You can listen to this callback, + * Use the format attribute method to customize data display in the callback. + * + * @param { function } event - Listening date event callback. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides a date change callback. + * The callback parameter is Unix Time Stamp, + * The number of milliseconds that have elapsed since January 1, 1970 (UTC). + * The minimum callback interval for this event is seconds. + * You can listen to this callback, + * Use the format attribute method to customize data display in the callback. + * + * @param { function } event - Listening date event callback. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Provides a date change callback. + * The callback parameter is Unix Time Stamp, + * The number of milliseconds that have elapsed since January 1, 1970 (UTC). + * The minimum callback interval for this event default is seconds when TextClock is not in a form. + * The minimum callback interval for this event is minutes when TextClock is in a form. + * If visibility is Hidden the callback be disabled when TextClock is in a form. + * You can listen to this callback, + * Use the format attribute method to customize data display in the callback. + * + * @param { function } event - Listening date event callback. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + onDateChange(event: (value: number) => void): TextClockAttribute; + + /** + * Called when the value of TextClock fontColor is set + * + * @param { ResourceColor } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontColor is set + * + * @param { ResourceColor } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontColor is set + * + * @param { ResourceColor } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontColor(value: ResourceColor): TextClockAttribute; + + /** + * Called when the value of TextClock fontSize is set + * + * @param { Length } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontSize is set + * + * @param { Length } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontSize is set + * + * @param { Length } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontSize(value: Length): TextClockAttribute; + + /** + * Called when the value of TextClock fontStyle is set + * + * @param { FontStyle } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontStyle is set + * + * @param { FontStyle } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontStyle is set + * + * @param { FontStyle } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontStyle(value: FontStyle): TextClockAttribute; + + /** + * Called when the value of TextClock fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontWeight(value: number | FontWeight | string): TextClockAttribute; + + /** + * Called when the value of TextClock fontFamily is set + * + * @param { ResourceStr } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the value of TextClock fontFamily is set + * + * @param { ResourceStr } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the value of TextClock fontFamily is set + * + * @param { ResourceStr } value + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontFamily(value: ResourceStr): TextClockAttribute; + + /** + * Called when the text shadow is set. + * + * @param { ShadowOptions | Array } value - The shadow options. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 11 + */ + /** + * Called when the text shadow is set. + * + * @param { ShadowOptions | Array } value - The shadow options. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + textShadow(value: ShadowOptions | Array): TextClockAttribute; + + /** + * Called when the text fontFeature is set. + * + * @param { string } value - The fontFeature. + * normal | , + * where = [ | on | off ], like: "ss01" 0 + * number of can be single or multiple, and separated by comma ','. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 11 + */ + /** + * Called when the text fontFeature is set. + * + * @param { string } value - The fontFeature. + * normal | , + * where = [ | on | off ], like: "ss01" 0 + * number of can be single or multiple, and separated by comma ','. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + fontFeature(value: string): TextClockAttribute; + + /** + * Set the content modifier of textclock. + * + * @param { ContentModifier } modifier - The content modifier of textclock. + * @returns { TextClockAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + contentModifier(modifier: ContentModifier): TextClockAttribute; + + /** + * Set hour format + * + * @param { Optional } dateTimeOptions - Indicates whether a leading 0 is required for the hour. + * @returns { TextClockAttribute } the attribute of the text clock + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 12 + */ + dateTimeOptions(dateTimeOptions: Optional): TextClockAttribute; + } + + /** + * Defines TextClock Component. * - * @type { ?TextClockController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - controller?: TextClockController -} - -/** - * TextClock component, which provides the text clock capability. - * - * @interface TextClockInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * TextClock component, which provides the text clock capability. - * - * @interface TextClockInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * TextClock component, which provides the text clock capability. - * - * @interface TextClockInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface TextClockInterface { - /** - * Construct the text clock component. - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. - * - * @param { object } options - * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Construct the text clock component. - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. + * Defines TextClock Component. * - * @param { object } options - * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Construct the text clock component. - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. + * Defines TextClock Component. * - * @param { object } options - * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ + declare const TextClock: TextClockInterface; + /** - * Construct the text clock component. - * Specifies the current time zone. - * The valid value is an integer ranging from - 14 to 12, - * Where a negative value indicates the eastern time zone, for example, -8. - * Anonymous Object Rectification. + * Defines TextClock Component instance. * - * @param { TextClockOptions } [options] - TextClock options. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - (options?: TextClockOptions): TextClockAttribute; -} - -/** - * Provides attribute for TextClock. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Provides attribute for TextClock. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Provides attribute for TextClock. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class TextClockAttribute extends CommonMethod { - /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), - * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). - * - * @param { string } value - * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), - * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). + * Defines TextClock Component instance. * - * @param { string } value - * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), - * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). - * The default value is "hh:mm:ss" when TextClock is not in a form. - * The default value is "hh:mm" when TextClock is in a form. - * If the value has second or millisecond, the value will be set to the default value. + * Defines TextClock Component instance. * - * @param { string } value - * @returns { TextClockAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - /** - * set display time format,such as "yyyy/mm/dd","yyyy-mm-dd". - * support time format:yyyy,mm,mmm(English month abbreviation),mmmm(Full name of the month in English), - * dd,ddd(English Week abbreviation),dddd(Full name of the week in English), - * HH/hh(24-hour clock/12-hour clock),MM/mm(minute),SS/ss(second). - * The default value is "hh:mm:ss" when TextClock is not in a form. - * The default value is "hh:mm" when TextClock is in a form. - * If the value has second or millisecond, the value will be set to the default value. - * - * @param { ResourceStr } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - format(value: ResourceStr): TextClockAttribute; - - /** - * Provides a date change callback. - * The callback parameter is Unix Time Stamp, - * The number of milliseconds that have elapsed since January 1, 1970 (UTC). - * The minimum callback interval for this event is seconds. - * You can listen to this callback, - * Use the format attribute method to customize data display in the callback. - * - * @param { function } event - Listening date event callback. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Provides a date change callback. - * The callback parameter is Unix Time Stamp, - * The number of milliseconds that have elapsed since January 1, 1970 (UTC). - * The minimum callback interval for this event is seconds. - * You can listen to this callback, - * Use the format attribute method to customize data display in the callback. - * - * @param { function } event - Listening date event callback. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Provides a date change callback. - * The callback parameter is Unix Time Stamp, - * The number of milliseconds that have elapsed since January 1, 1970 (UTC). - * The minimum callback interval for this event default is seconds when TextClock is not in a form. - * The minimum callback interval for this event is minutes when TextClock is in a form. - * If visibility is Hidden the callback be disabled when TextClock is in a form. - * You can listen to this callback, - * Use the format attribute method to customize data display in the callback. - * - * @param { function } event - Listening date event callback. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - onDateChange(event: (value: number) => void): TextClockAttribute; - - /** - * Called when the value of TextClock fontColor is set - * - * @param { ResourceColor } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontColor is set - * - * @param { ResourceColor } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontColor is set - * - * @param { ResourceColor } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontColor(value: ResourceColor): TextClockAttribute; - - /** - * Called when the value of TextClock fontSize is set - * - * @param { Length } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontSize is set - * - * @param { Length } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontSize is set - * - * @param { Length } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontSize(value: Length): TextClockAttribute; - - /** - * Called when the value of TextClock fontStyle is set - * - * @param { FontStyle } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontStyle is set - * - * @param { FontStyle } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontStyle is set - * - * @param { FontStyle } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontStyle(value: FontStyle): TextClockAttribute; - - /** - * Called when the value of TextClock fontWeight is set - * - * @param { number | FontWeight | string } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontWeight is set - * - * @param { number | FontWeight | string } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontWeight is set - * - * @param { number | FontWeight | string } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontWeight(value: number | FontWeight | string): TextClockAttribute; - - /** - * Called when the value of TextClock fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the value of TextClock fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the value of TextClock fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontFamily(value: ResourceStr): TextClockAttribute; - - /** - * Called when the text shadow is set. - * - * @param { ShadowOptions | Array } value - The shadow options. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * Called when the text shadow is set. - * - * @param { ShadowOptions | Array } value - The shadow options. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - textShadow(value: ShadowOptions | Array): TextClockAttribute; - - /** - * Called when the text fontFeature is set. - * - * @param { string } value - The fontFeature. - * normal | , - * where = [ | on | off ], like: "ss01" 0 - * number of can be single or multiple, and separated by comma ','. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * Called when the text fontFeature is set. - * - * @param { string } value - The fontFeature. - * normal | , - * where = [ | on | off ], like: "ss01" 0 - * number of can be single or multiple, and separated by comma ','. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontFeature(value: string): TextClockAttribute; - - /** - * Set the content modifier of textclock. - * - * @param { ContentModifier } modifier - The content modifier of textclock. - * @returns { TextClockAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - contentModifier(modifier: ContentModifier): TextClockAttribute; - - /** - * Set hour format - * - * @param { Optional } dateTimeOptions - Indicates whether a leading 0 is required for the hour. - * @returns { TextClockAttribute } the attribute of the text clock - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - dateTimeOptions(dateTimeOptions: Optional): TextClockAttribute; -} - -/** - * Defines TextClock Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines TextClock Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines TextClock Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare const TextClock: TextClockInterface; - -/** - * Defines TextClock Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines TextClock Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines TextClock Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare const TextClockInstance: TextClockAttribute; + declare const TextClockInstance: TextClockAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/text_input.d.ts b/api/@internal/component/ets/text_input.d.ts index 0db6fdf2b3a564cf9d9b3d5df4bace7639148841..2cab7513ff005fd8cdf413f33484f8f66ebde9e2 100644 --- a/api/@internal/component/ets/text_input.d.ts +++ b/api/@internal/component/ets/text_input.d.ts @@ -18,18 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CancelButtonSymbolOptions, CancelButtonOptions } from "./search"; -import { Callback, CommonMethod, TextContentControllerBase, SelectionOptions, InputCounterOptions, TextDecorationOptions, Optional, Bindable} from "./common"; -import { CustomBuilder } from './builder'; -import { BarState, LineBreakStrategy, TextAlign, FontStyle, FontWeight, WordBreak, TextOverflow, - CopyOptions, TextHeightAdaptivePolicy, TextContentStyle, EllipsisMode } from './enums'; -import { Resource, ResourceStr, ResourceColor, Dimension, Font, Length } from './units'; -import { InsertValue, DeleteValue, CaretStyle, EditableTextOnChangeCallback, EditMenuOptions, - AutoCapitalizationMode,EditableTextChangeValue,KeyboardAppearance } from "./textCommon"; -import { KeyboardOptions, PasteEvent } from "./richEditor"; -/*** endif */ - /** * Declare the type of input box * @@ -52,8 +40,7 @@ import { KeyboardOptions, PasteEvent } from "./richEditor"; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum InputType { /** @@ -75,8 +62,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Normal, @@ -99,8 +85,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Number, @@ -123,8 +108,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ PhoneNumber, @@ -152,8 +136,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Email, @@ -184,8 +167,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Password, @@ -209,8 +191,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NUMBER_PASSWORD = 8, @@ -219,8 +200,7 @@ declare enum InputType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ SCREEN_LOCK_PASSWORD = 9, @@ -239,8 +219,7 @@ declare enum InputType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ USER_NAME = 10, @@ -262,8 +241,7 @@ declare enum InputType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NEW_PASSWORD = 11, @@ -277,8 +255,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ NUMBER_DECIMAL = 12, @@ -288,8 +265,7 @@ declare enum InputType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ URL = 13, @@ -309,8 +285,7 @@ declare enum InputType { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum ContentType { /** @@ -319,8 +294,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ USER_NAME = 0, @@ -330,8 +304,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PASSWORD = 1, @@ -341,8 +314,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NEW_PASSWORD = 2, @@ -353,8 +325,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ FULL_STREET_ADDRESS = 3, @@ -365,8 +336,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ HOUSE_NUMBER = 4, @@ -377,8 +347,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ DISTRICT_ADDRESS = 5, @@ -389,8 +358,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ CITY_ADDRESS = 6, @@ -401,8 +369,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PROVINCE_ADDRESS = 7, @@ -413,8 +380,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ COUNTRY_ADDRESS = 8, @@ -425,8 +391,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PERSON_FULL_NAME = 9, @@ -437,8 +402,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PERSON_LAST_NAME = 10, @@ -449,8 +413,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PERSON_FIRST_NAME = 11, @@ -461,8 +424,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PHONE_NUMBER = 12, @@ -473,8 +435,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PHONE_COUNTRY_CODE = 13, @@ -485,8 +446,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ FULL_PHONE_NUMBER = 14, @@ -497,8 +457,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ EMAIL_ADDRESS = 15, @@ -509,8 +468,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ BANK_CARD_NUMBER = 16, @@ -521,8 +479,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ID_CARD_NUMBER = 17, @@ -533,8 +490,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NICKNAME = 23, @@ -545,8 +501,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ DETAIL_INFO_WITHOUT_STREET = 24, @@ -557,8 +512,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ FORMAT_ADDRESS = 25, @@ -569,8 +523,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ PASSPORT_NUMBER = 26, @@ -581,8 +534,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ VALIDITY = 27, @@ -593,8 +545,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ ISSUE_AT = 28, @@ -605,8 +556,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ ORGANIZATION = 29, @@ -617,8 +567,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ TAX_ID = 30, @@ -629,8 +578,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ ADDRESS_CITY_AND_STATE = 31, @@ -640,8 +588,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ FLIGHT_NUMBER = 32, @@ -651,8 +598,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ LICENSE_NUMBER = 33, @@ -662,8 +608,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ LICENSE_FILE_NUMBER = 34, @@ -674,8 +619,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ LICENSE_PLATE = 35, @@ -685,8 +629,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ ENGINE_NUMBER = 36, @@ -696,8 +639,7 @@ declare enum ContentType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ LICENSE_CHASSIS_NUMBER = 37 } @@ -724,8 +666,7 @@ declare enum ContentType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum EnterKeyType { /** @@ -747,8 +688,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Go = 2, @@ -771,8 +711,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Search = 3, @@ -795,8 +734,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Send = 4, @@ -819,8 +757,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Next = 5, @@ -843,8 +780,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Done = 6, @@ -861,8 +797,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PREVIOUS = 7, @@ -879,8 +814,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ NEW_LINE = 8, } @@ -892,8 +826,7 @@ declare enum EnterKeyType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface UnderlineColor { /** @@ -908,8 +841,7 @@ declare interface UnderlineColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ typing?: ResourceColor | undefined; /** @@ -924,8 +856,7 @@ declare interface UnderlineColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ normal?: ResourceColor | undefined; /** @@ -942,8 +873,7 @@ declare interface UnderlineColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ error?: ResourceColor | undefined; /** @@ -958,8 +888,7 @@ declare interface UnderlineColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ disable?: ResourceColor | undefined; } @@ -971,8 +900,7 @@ declare interface UnderlineColor { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface SubmitEvent { /** @@ -981,8 +909,7 @@ declare interface SubmitEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ keepEditableState(): void; @@ -993,8 +920,7 @@ declare interface SubmitEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ text: string; } @@ -1020,8 +946,7 @@ declare interface SubmitEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class TextInputController extends TextContentControllerBase { /** @@ -1044,8 +969,7 @@ declare class TextInputController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -1076,8 +1000,7 @@ declare class TextInputController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretPosition(value: number): void; @@ -1117,8 +1040,7 @@ declare class TextInputController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setTextSelection(selectionStart: number, selectionEnd: number, options?: SelectionOptions): void; @@ -1135,8 +1057,7 @@ declare class TextInputController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ stopEditing(): void; } @@ -1163,8 +1084,7 @@ declare class TextInputController extends TextContentControllerBase { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface TextInputOptions { /** @@ -1189,8 +1109,7 @@ declare interface TextInputOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholder?: ResourceStr; @@ -1227,18 +1146,6 @@ declare interface TextInputOptions { */ text?: ResourceStr; - /** - * Sets the current value of TextInput. - * - * @type { ?(ResourceStr | Bindable | Bindable | Bindable) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - text?: ResourceStr | Bindable | Bindable | Bindable; - /** * Called when the position of the insertion cursor is set. * @@ -1261,8 +1168,7 @@ declare interface TextInputOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ controller?: TextInputController; } @@ -1289,8 +1195,7 @@ declare interface TextInputOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum TextInputStyle { /** @@ -1317,8 +1222,7 @@ declare enum TextInputStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Default, @@ -1349,8 +1253,7 @@ declare enum TextInputStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Inline } @@ -1377,8 +1280,8 @@ declare enum TextInputStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface TextInputInterface { /** @@ -1406,8 +1309,7 @@ interface TextInputInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value?: TextInputOptions): TextInputAttribute; } @@ -1426,8 +1328,7 @@ interface TextInputInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ interface PasswordIcon { /** @@ -1449,8 +1350,7 @@ interface PasswordIcon { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onIconSrc?: string | Resource; @@ -1473,8 +1373,7 @@ interface PasswordIcon { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ offIconSrc?: string | Resource; } @@ -1489,8 +1388,7 @@ interface PasswordIcon { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnSubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => void; @@ -1504,8 +1402,7 @@ declare type OnSubmitCallback = (enterKey: EnterKeyType, event: SubmitEvent) => * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnTextSelectionChangeCallback = (selectionStart: number, selectionEnd: number) => void; @@ -1519,8 +1416,7 @@ declare type OnTextSelectionChangeCallback = (selectionStart: number, selectionE * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnContentScrollCallback = (totalOffsetX: number, totalOffsetY: number) => void; @@ -1535,8 +1431,7 @@ declare type OnContentScrollCallback = (totalOffsetX: number, totalOffsetY: numb * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnPasteCallback = (content: string, event: PasteEvent) => void; @@ -1562,8 +1457,8 @@ declare type OnPasteCallback = (content: string, event: PasteEvent) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class TextInputAttribute extends CommonMethod { /** @@ -1591,8 +1486,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ type(value: InputType): TextInputAttribute; @@ -1603,8 +1497,7 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentType(value: ContentType): TextInputAttribute; @@ -1633,8 +1526,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholderColor(value: ResourceColor): TextInputAttribute; @@ -1659,8 +1551,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textOverflow(value: TextOverflow): TextInputAttribute; @@ -1672,8 +1563,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textIndent(value: Dimension): TextInputAttribute; @@ -1707,8 +1597,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ placeholderFont(value?: Font): TextInputAttribute; @@ -1737,8 +1626,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enterKeyType(value: EnterKeyType): TextInputAttribute; @@ -1771,8 +1659,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretColor(value: ResourceColor): TextInputAttribute; @@ -1836,8 +1723,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onEditChange(callback: Callback): TextInputAttribute; @@ -1877,8 +1763,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onSubmit(callback: OnSubmitCallback): TextInputAttribute; @@ -1922,8 +1807,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onChange(callback: EditableTextOnChangeCallback): TextInputAttribute; @@ -1955,8 +1839,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onTextSelectionChange(callback: OnTextSelectionChangeCallback): TextInputAttribute; @@ -1988,8 +1871,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onContentScroll(callback: OnContentScrollCallback): TextInputAttribute; @@ -2023,8 +1905,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maxLength(value: number): TextInputAttribute; @@ -2053,8 +1934,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontColor(value: ResourceColor): TextInputAttribute; @@ -2090,8 +1970,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontSize(value: Length): TextInputAttribute; @@ -2120,8 +1999,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontStyle(value: FontStyle): TextInputAttribute; @@ -2145,6 +2023,15 @@ declare class TextInputAttribute extends CommonMethod { /** * Called when the font weight is set. * + *

NOTE: + *
If the value is too large, the text may be clipped depending on the font. + *
For the number type, the value range is [100, 900], at an interval of 100. + *
The default value is 400. + *
A larger value indicates a heavier font weight. + *
For the string type, only strings that represent a number, for example, "400", + * and the following enumerated values of FontWeight are supported: "bold", "bolder", "lighter", "regular", and "medium". + *

+ * * @param { number | FontWeight | string } value - Default value is FontWeight.Normal. * @returns { TextInputAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -2161,7 +2048,6 @@ declare class TextInputAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ fontWeight(value: number | FontWeight | ResourceStr): TextInputAttribute; @@ -2196,8 +2082,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fontFamily(value: ResourceStr): TextInputAttribute; @@ -2250,8 +2135,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ inputFilter(value: ResourceStr, error?: Callback): TextInputAttribute; @@ -2291,8 +2175,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onCopy(callback: Callback): TextInputAttribute; @@ -2332,8 +2215,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onCut(callback: Callback): TextInputAttribute; @@ -2376,8 +2258,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onPaste(callback: OnPasteCallback): TextInputAttribute; @@ -2412,8 +2293,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ copyOption(value: CopyOptions): TextInputAttribute; @@ -2451,8 +2331,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ showPasswordIcon(value: boolean): TextInputAttribute; @@ -2490,8 +2369,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ textAlign(value: TextAlign): TextInputAttribute; @@ -2524,8 +2402,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ style(value: TextInputStyle | TextContentStyle): TextInputAttribute; @@ -2546,8 +2423,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretStyle(value: CaretStyle): TextInputAttribute; @@ -2572,8 +2448,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectedBackgroundColor(value: ResourceColor): TextInputAttribute; @@ -2594,8 +2469,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ caretPosition(value: number): TextInputAttribute; @@ -2621,8 +2495,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ enableKeyboardOnFocus(value: boolean): TextInputAttribute; @@ -2648,8 +2521,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ passwordIcon(value: PasswordIcon): TextInputAttribute; @@ -2687,8 +2559,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ showError(value?: ResourceStr | undefined): TextInputAttribute; @@ -2712,8 +2583,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ showUnit(value: CustomBuilder): TextInputAttribute; @@ -2738,8 +2608,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ showUnderline(value: boolean): TextInputAttribute; @@ -2758,8 +2627,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ underlineColor(value: ResourceColor | UnderlineColor | undefined): TextInputAttribute; @@ -2791,8 +2659,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectionMenuHidden(value: boolean): TextInputAttribute; @@ -2811,8 +2678,7 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ barState(value: BarState): TextInputAttribute; @@ -2833,8 +2699,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maxLines(value: number): TextInputAttribute; @@ -2853,8 +2718,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ wordBreak(value: WordBreak): TextInputAttribute; @@ -2872,8 +2736,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineBreakStrategy(strategy: LineBreakStrategy): TextInputAttribute; @@ -2919,8 +2782,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ customKeyboard(value: CustomBuilder, options?: KeyboardOptions): TextInputAttribute; @@ -2948,8 +2810,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ showCounter(value: boolean, options?: InputCounterOptions): TextInputAttribute; @@ -3006,19 +2867,6 @@ declare class TextInputAttribute extends CommonMethod { */ cancelButton(symbolOptions: CancelButtonSymbolOptions): TextInputAttribute; - /** - * Set the cancel button style - * - * @param { CancelButtonOptions | CancelButtonSymbolOptions } symbolOptions - indicates the style of the cancel button. - * @returns { TextInputAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - cancelButton(symbolOptions: CancelButtonOptions | CancelButtonSymbolOptions): TextInputAttribute; - /** * Sets selection when on focus. * @@ -3040,8 +2888,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ selectAll(value: boolean): TextInputAttribute; @@ -3061,8 +2908,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ minFontSize(value: number | string | Resource): TextInputAttribute; @@ -3082,8 +2928,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ maxFontSize(value: number | string | Resource): TextInputAttribute; @@ -3105,7 +2950,6 @@ declare class TextInputAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ minFontScale(scale: Optional): TextInputAttribute; @@ -3127,7 +2971,6 @@ declare class TextInputAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ maxFontScale(scale: Optional): TextInputAttribute; @@ -3157,8 +3000,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextInputAttribute; @@ -3177,8 +3019,7 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableAutoFill(value: boolean): TextInputAttribute; @@ -3194,8 +3035,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ decoration(value: TextDecorationOptions): TextInputAttribute; @@ -3216,8 +3056,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ letterSpacing(value: number | string | Resource): TextInputAttribute; @@ -3235,8 +3074,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineHeight(value: number | string | Resource): TextInputAttribute; @@ -3259,8 +3097,7 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } Returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ passwordRules(value: string): TextInputAttribute; @@ -3281,8 +3118,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontFeature(value: string): TextInputAttribute; @@ -3303,8 +3139,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ showPassword(visible: boolean): TextInputAttribute; @@ -3316,8 +3151,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onSecurityStateChange(callback: Callback): TextInputAttribute; @@ -3335,8 +3169,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillInsert(callback: Callback): TextInputAttribute; @@ -3352,8 +3185,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidInsert(callback: Callback): TextInputAttribute; @@ -3371,8 +3203,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onWillDelete(callback: Callback): TextInputAttribute; @@ -3388,8 +3219,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onDidDelete(callback: Callback): TextInputAttribute; @@ -3415,8 +3245,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ editMenuOptions(editMenu: EditMenuOptions): TextInputAttribute; @@ -3433,8 +3262,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enablePreviewText(enable: boolean): TextInputAttribute; @@ -3446,8 +3274,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ enableHapticFeedback(isEnabled: boolean): TextInputAttribute; @@ -3460,7 +3287,6 @@ declare class TextInputAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ autoCapitalizationMode(mode: AutoCapitalizationMode): TextInputAttribute; @@ -3472,8 +3298,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ halfLeading(halfLeading: Optional): TextInputAttribute; @@ -3485,8 +3310,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ ellipsisMode(mode: Optional): TextInputAttribute; @@ -3497,8 +3321,7 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ stopBackPress(isStopped: Optional): TextInputAttribute; @@ -3510,8 +3333,7 @@ declare class TextInputAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ onWillChange(callback: Callback): TextInputAttribute; @@ -3522,8 +3344,7 @@ declare class TextInputAttribute extends CommonMethod { * @returns { TextInputAttribute } returns the instance of the TextInputAttribute. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ keyboardAppearance(appearance: Optional): TextInputAttribute; @@ -3596,6 +3417,7 @@ declare class TextInputAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const TextInput: TextInputInterface; @@ -3619,5 +3441,6 @@ declare const TextInput: TextInputInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const TextInputInstance: TextInputAttribute; diff --git a/api/@internal/component/ets/text_picker.d.ts b/api/@internal/component/ets/text_picker.d.ts index 49e7af9f00042be97a7369fbe065085f6c3e6594..760696eb412a0bbf9adf608d76beaa3056adedcb 100644 --- a/api/@internal/component/ets/text_picker.d.ts +++ b/api/@internal/component/ets/text_picker.d.ts @@ -18,14 +18,6 @@ * @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. * @@ -41,1893 +33,2157 @@ import { LengthMetrics } from './../Graphics'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface TextPickerRangeContent { - /** - * Image resource. - * If the value is a string, such as **"/common/hello.png"**, it represents the path to the image. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Image resource. - * If the value is a string, such as **"/common/hello.png"**, it represents the path to the image. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - icon: string | Resource; - - /** - * Text information. - * - *

NOTE: - *
If the text length exceeds the column width, the text will be truncated. - *

- * - * @type { ?(string | Resource) } - * @default "" - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Text information. - * - *

NOTE: - *
If the text length exceeds the column width, the text will be truncated. - *

- * - * @type { ?(string | Resource) } - * @default "" - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - text?: string | Resource; -} - -/** - * Define the contents of text cascade picker. - * - * @interface TextCascadePickerRangeContent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ -/** - * Define the contents of text cascade picker. - * - * @interface TextCascadePickerRangeContent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ -declare interface TextCascadePickerRangeContent { - /** - * Text information. - * - *

NOTE: - * If the text length exceeds the column width, the text will be truncated. - *

- * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Text information. - * - *

NOTE: - * If the text length exceeds the column width, the text will be truncated. - *

- * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - text: string | Resource; - - /** - * Linkage data. - * - * @type { ?TextCascadePickerRangeContent[] } + declare interface TextPickerRangeContent { + /** + * Image resource. + * If the value is a string, such as **"/common/hello.png"**, it represents the path to the image. + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Image resource. + * If the value is a string, such as **"/common/hello.png"**, it represents the path to the image. + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + icon: string | Resource; + + /** + * Text information. + * + *

NOTE: + *
If the text length exceeds the column width, the text will be truncated. + *

+ * + * @type { ?(string | Resource) } + * @default "" + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Text information. + * + *

NOTE: + *
If the text length exceeds the column width, the text will be truncated. + *

+ * + * @type { ?(string | Resource) } + * @default "" + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + text?: string | Resource; + } + + /** + * Define the contents of text cascade picker. + * + * @interface TextCascadePickerRangeContent * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ /** - * Linkage data. + * Define the contents of text cascade picker. * - * @type { ?TextCascadePickerRangeContent[] } + * @interface TextCascadePickerRangeContent * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - children?: TextCascadePickerRangeContent[]; -} - -/** - * Defines the options of TextPicker. - * - * @interface TextPickerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the options of TextPicker. - * - * @interface TextPickerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the options of TextPicker. - * - * @interface TextPickerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface TextPickerOptions { - /** - * Data selection range of the picker. - * - * @type {string[] | Resource} + declare interface TextCascadePickerRangeContent { + /** + * Text information. + * + *

NOTE: + * If the text length exceeds the column width, the text will be truncated. + *

+ * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Text information. + * + *

NOTE: + * If the text length exceeds the column width, the text will be truncated. + *

+ * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + text: string | Resource; + + /** + * Linkage data. + * + * @type { ?TextCascadePickerRangeContent[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Linkage data. + * + * @type { ?TextCascadePickerRangeContent[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + children?: TextCascadePickerRangeContent[]; + } + + /** + * Defines the options of TextPicker. + * + * @interface TextPickerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Data selection range of the picker. - * Support the display of pictures, text and pictures plus text, or multi column plain text. + * Defines the options of TextPicker. * - * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]} + * @interface TextPickerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Data selection range of the picker. - * Support the display of pictures, text and pictures plus text, or multi column plain text. + * Defines the options of TextPicker. * - * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]} + * @interface TextPickerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - range: string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]; - - /** - * Value of the default item in the range. - * The priority of this parameter is lower than that of selected. - * - *

NOTE: - * This parameter works only when the picker contains text only. - *

- * - * @type { ?string } - * @default value of the first item + declare interface TextPickerOptions { + /** + * Data selection range of the picker. + * + * @type {string[] | Resource} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Data selection range of the picker. + * Support the display of pictures, text and pictures plus text, or multi column plain text. + * + * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Data selection range of the picker. + * Support the display of pictures, text and pictures plus text, or multi column plain text. + * + * @type {string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + range: string[] | string[][] | Resource | TextPickerRangeContent[] | TextCascadePickerRangeContent[]; + + /** + * Value of the default item in the range. + * The priority of this parameter is lower than that of selected. + * + *

NOTE: + * This parameter works only when the picker contains text only. + *

+ * + * @type { ?string } + * @default value of the first item + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Value of the default item in the range. + * The priority of this parameter is lower than that of selected. + * For a single-column picker, use a value of the string type. + * For a multi-column (linked) picker, use a value of the string[] type. + * + *

NOTE: + *
This parameter works only when the picker contains text only. + *

+ * + * @type { ?(string | string[]) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Value of the default item in the range. + * The priority of this parameter is lower than that of selected. + * For a single-column picker, use a value of the string type. + * For a multi-column (linked) picker, use a value of the string[] type. + * + *

NOTE: + * This parameter works only when the picker contains text only. + *

+ * + * @type { ?(string | string[]) } + * @default value of the first item + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + /** + * Value of the current selection. + * Only valid when only text is displayed. + * + * @type { ?(ResourceStr | ResourceStr[]) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + value?: ResourceStr | ResourceStr[]; + + /** + * Index of the default selected item in the array. + * The index is zero-based. + * + * @type { ?number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Index of the default selected item in the array. + * The index is zero-based. + * For a single-column picker, use a value of the number type. + * For a multi-column (linked) picker, use a value of the number[]. + * + * @type { ?(number | number[]) } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Index of the default selected item in the array. + * The index is zero-based. + * For a single-column picker, use a value of the number type. + * For a multi-column (linked) picker, use a value of the number[]. + * + * @type { ?(number | number[]) } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + selected?: number | number[]; + + /** + * Width of each column in the picker. + * + *

NOTE: + *
If the text length exceeds the column width, the text will be truncated. + *

+ * + * @type { ?LengthMetrics[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + columnWidths?: LengthMetrics[]; + } + + /** + * TextPickerInterface + * + * @interface TextPickerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Value of the default item in the range. - * The priority of this parameter is lower than that of selected. - * For a single-column picker, use a value of the string type. - * For a multi-column (linked) picker, use a value of the string[] type. + * TextPickerInterface * - *

NOTE: - *
This parameter works only when the picker contains text only. - *

- * - * @type { ?(string | string[]) } + * @interface TextPickerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Value of the default item in the range. - * The priority of this parameter is lower than that of selected. - * For a single-column picker, use a value of the string type. - * For a multi-column (linked) picker, use a value of the string[] type. - * - *

NOTE: - * This parameter works only when the picker contains text only. - *

+ * TextPickerInterface * - * @type { ?(string | string[]) } - * @default value of the first item + * @interface TextPickerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - /** - * Value of the current selection. - * Only valid when only text is displayed. - * - * @type { ?(ResourceStr | ResourceStr[]) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - value?: ResourceStr | ResourceStr[]; - - /** - * Value of the current selection. - * Only valid when only text is displayed. - * - * @type { ?(ResourceStr | ResourceStr[] | Bindable | Bindable) } + interface TextPickerInterface { + /** + * Defines the TextPicker constructor. + * + * @param { TextPickerOptions } options + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Defines the TextPicker constructor. + * + * @param { TextPickerOptions } options + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Defines the TextPicker constructor. + * + * @param { TextPickerOptions } options + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + (options?: TextPickerOptions): TextPickerAttribute; + } + + /** + * Defines the struct of DividerOptions. + * + * @interface DividerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + declare interface DividerOptions { + /** + * Stroke width of the divider. + * The unit is vp by default. You can also specify it as px. The percentage type is not supported. + * + *

NOTE: + *
If the value is less than 0, the default value is used. + *
The maximum value allowed is half the height of the column. + *

+ * + * @type { ?Dimension } + * @default 2.0px + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + strokeWidth?: Dimension; + + /** + * Color of the divider. + * + * @type { ?ResourceColor } + * @default '#33000000' + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + color?: ResourceColor; + + /** + * Distance between the divider and the start edge of the picker. + * The unit is vp by default. You can also specify it as px. The percentage type is not supported. + * + *

NOTE: + * Values less than 0 are invalid. The maximum value allowed is the width of the column. + *

+ * + * @type { ?Dimension } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + startMargin?: Dimension; + + /** + * Distance between the divider and the end edge of the picker. + * The unit is vp by default. You can also specify it as px. The percentage type is not supported. + * + *

NOTE: + *
Values less than 0 are invalid. The maximum value allowed is the width of the column. + *

+ * + * @type { ?Dimension } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + endMargin?: Dimension; + } + + /** + * Defines the text style options. + * + * @extends PickerTextStyle + * @interface TextPickerTextStyle + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + declare interface TextPickerTextStyle extends PickerTextStyle { + /** + * Minimum font size, used in conjunction with maxFontSize. + * When minFontSize and maxFontSize are set, + * the size setting in font is ineffective. + * The default maximum number of lines is 1, + * and the default height adaptation mode is MIN_FONT_SIZE_FIRST. + * + * @type { ?(number | string | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + minFontSize?: number | string | Resource; + + /** + * Maximum font size. + * + * @type { ?(number | string | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + maxFontSize?: number | string | Resource; + + /** + * Display mode when the text is too long. + * + *

NOTE: + * Ineffective when set to MARQUEE. + *

+ * + * @type { ?TextOverflow } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + overflow?: TextOverflow; + } + + /** + * Provide an interface to set the background style of selected items. + * + * @interface PickerBackgroundStyle * @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. - * - * @type { ?number } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 */ + declare interface PickerBackgroundStyle { + /** + * Define the background color of selected item. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + color?: ResourceColor; + + /** + * Defines the border radius of selected items. + * + * @type { ?(LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + borderRadius?: LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses; + } + /** - * Index of the default selected item in the array. - * The index is zero-based. - * For a single-column picker, use a value of the number type. - * For a multi-column (linked) picker, use a value of the number[]. + * Callback of the listened scroll stop event. * - * @type { ?(number | number[]) } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Index of the default selected item in the array. - * The index is zero-based. - * For a single-column picker, use a value of the number type. - * For a multi-column (linked) picker, use a value of the number[]. - * - * @type { ?(number | number[]) } - * @default 0 + * @typedef {function} TextPickerScrollStopCallback + * @param { string | string[] } value - Value of the selected item. + * @param { number | number[] } index - Index of the selected item. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 + * @since 14 */ - selected?: number | number[]; - + declare type TextPickerScrollStopCallback = (value: string | string[], index: number | number[]) => void; + /** - * Current selected subscript. + * Callback of TextPicker item is selected event. * - * @type { ?(number | number[] | Bindable | Bindable) } + * @typedef {function} OnTextPickerChangeCallback + * @param { string | string[] } selectItem - Value of the selected item. + * @param { number | number[] } index - Index of the selected item. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 - * @arkts 1.2 + * @since 18 */ - selected?: number | number[] | Bindable | Bindable; - + declare type OnTextPickerChangeCallback = (selectItem: string | string[], index: number | number[]) => void; + /** - * Width of each column in the picker. - * - *

NOTE: - *
If the text length exceeds the column width, the text will be truncated. - *

+ * Callback of the listened onEnterSelectedArea event. * - * @type { ?LengthMetrics[] } + * @typedef {function} TextPickerEnterSelectedAreaCallback + * @param { string | string[] } value - Value of the selected item. + * @param { number | number[] } index - Index of the selected item. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ - columnWidths?: LengthMetrics[]; -} - -/** - * TextPickerInterface - * - * @interface TextPickerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * TextPickerInterface - * - * @interface TextPickerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * TextPickerInterface - * - * @interface TextPickerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface TextPickerInterface { + declare type TextPickerEnterSelectedAreaCallback = (value: string | string[], index: number | number[]) => void; + /** - * Defines the TextPicker constructor. + * Style the text selector. * - * @param { TextPickerOptions } options - * @returns { TextPickerAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines the TextPicker constructor. + * Style the text selector. * - * @param { TextPickerOptions } options - * @returns { TextPickerAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines the TextPicker constructor. - * - * @param { TextPickerOptions } options - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - (options?: TextPickerOptions): TextPickerAttribute; -} - -/** - * Defines the struct of DividerOptions. - * - * @interface DividerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface DividerOptions { - /** - * Stroke width of the divider. - * The unit is vp by default. You can also specify it as px. The percentage type is not supported. + * Style the text selector. * - *

NOTE: - *
If the value is less than 0, the default value is used. - *
The maximum value allowed is half the height of the column. - *

- * - * @type { ?Dimension } - * @default 2.0px + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - strokeWidth?: Dimension; - - /** - * Color of the divider. - * - * @type { ?ResourceColor } - * @default "#33000000" + declare class TextPickerAttribute extends CommonMethod { + /** + * Sets the height of each item in the picker. + * + * @param { number | string } value + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Sets the height of each item in the picker. + * + * @param { number | string } value + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the height of each item in the picker. + * + * @param { number | string } value - Height of each item in the picker. + *
For the number type, the value range is [0, +∞). + *
For the string type, only numeric string values, for example, "56", are supported. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + defaultPickerItemHeight(value: number | string): TextPickerAttribute; + + /** + * Sets the height of each item in the picker. + * + * @param { Optional } height - Height of each item in the picker. + *
For the number type, the value range is [0, +∞). + *
For the string type, only numeric string values, for example, "56", are supported. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + defaultPickerItemHeight(height: Optional): TextPickerAttribute; + + /** + * Sets whether scrolling is loopable. + * + * @param { boolean } value - Whether scrolling is loopable. true: loopable; false: not loopable. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Sets whether scrolling is loopable. + * + * @param { boolean } value - Whether scrolling is loopable. true: loopable; false: not loopable. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + canLoop(value: boolean): TextPickerAttribute; + + /** + * Can scroll loop if true is set, on the contrary it can not. + * this API supports the undefined type for the isLoop parameter. + * + * @param { Optional } isLoop - Whether scrolling is loopable. true: loopable; false: not loopable. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + canLoop(isLoop: Optional): TextPickerAttribute; + + /** + * Sets the font color, font size, and font weight for the top and bottom items. + * + * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the font color, font size, and font weight for the top and bottom items. + * + * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + disappearTextStyle(value: PickerTextStyle): TextPickerAttribute; + + /** + * Sets the font color, font size, and font weight for the top and bottom items. + * This API supports the undefined type for the style parameter. + * + * @param { Optional } style - Font color, font size, and font weight of the top and bottom items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + disappearTextStyle(style: Optional): TextPickerAttribute; + + /** + * Sets the text style of disappearing items + * + * @param { Optional } style - indicates the text style of disappearing items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + disappearTextStyle(style: Optional): TextPickerAttribute; + + /** + * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items. + * + * @param { PickerTextStyle } value - Font color, font size, and font weight of all items except the top, + *
bottom, and selected items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items. + * + * @param { PickerTextStyle } value - indicates the text style of normal items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + textStyle(value: PickerTextStyle): TextPickerAttribute; + + /** + * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items. + * This API supports the undefined type for the style parameter. + * + * @param { Optional } style - Font color, font size, and font weight of all + *
items except the top, bottom, and selected items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + textStyle(style: Optional): TextPickerAttribute; + + /** + * Sets the text style of normal items + * + * @param { Optional } style - indicates the text style of normal items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + textStyle(style: Optional): TextPickerAttribute; + + /** + * Sets the font color, font size, and font weight for the selected item. + * + * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item.. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the font color, font size, and font weight for the selected item. + * + * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + selectedTextStyle(value: PickerTextStyle): TextPickerAttribute; + + /** + * Sets the font color, font size, and font weight for the selected item. + * This API supports the undefined type for the style parameter. + * + * @param { Optional } style - Font color, font size, and font weight of the selected item. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + selectedTextStyle(style: Optional): TextPickerAttribute; + + /** + * Sets the text style of selected items + * + * @param { Optional } style - indicates the text style of selected items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedTextStyle(style: Optional): TextPickerAttribute; + + /** + * Sets whether to enable the text style change animation during the scrolling process. + * + * @param { boolean } disabled + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + disableTextStyleAnimation(disabled: boolean): TextPickerAttribute; + + /** + * Sets the style of the text items when the text style change animation during the scrolling process is disabled. + * + * @param { TextPickerTextStyle } style + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + defaultTextStyle(style: TextPickerTextStyle): TextPickerAttribute; + + /** + * Triggered when the OK button in the dialog box is clicked. + * + * @param { function } callback + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + * @deprecated since 10 + */ + onAccept(callback: (value: string, index: number) => void): TextPickerAttribute; + + /** + * Triggered when the Cancel button in the dialog box is clicked. + * + * @param { function } callback + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + * @deprecated since 10 + */ + onCancel(callback: () => void): TextPickerAttribute; + + /** + * Triggered when an item in the picker is selected. + * + * @param { function } callback - the callback of onChange. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Triggered when an item in the picker is selected. + * When the picker contains text only or both text and imagery, + * value indicates the text of the selected item. + * When the picker contains imagery only, value is empty. + * + * @param { function } callback - the callback of onChange. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Triggered when an item in the picker is selected. + * When the picker contains text only or both text and imagery, + * value indicates the text of the selected item. + * When the picker contains imagery only, value is empty. + * + * @param { function } callback - the callback of onChange. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onChange(callback: (value: string | string[], index: number | number[]) => void): TextPickerAttribute; + + /** + * Triggered when the text picker snaps to the selected item. + * Compared to onChange, this API supports the undefined type for the callback parameter. + * + * @param { Optional } callback - the callback of onChange. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onChange(callback: Optional): TextPickerAttribute; + + /** + * Triggered when the scrolling in the text picker stops. + * If the scrolling is initiated by a gesture, + * this event is triggered when the finger is lifted from the screen and the scrolling stops. + * + * @param { TextPickerScrollStopCallback } callback - Triggered when the scrolling + *
in the text picker stops. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + onScrollStop(callback: TextPickerScrollStopCallback): TextPickerAttribute; + + /** + * Triggered when the scrolling in the text picker stops. + * If the scrolling is initiated by a gesture, + * this event is triggered when the finger is lifted from the screen and the scrolling stops. + * + * @param { Optional } callback - Triggered when the scrolling + *
in the text picker stops. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onScrollStop(callback: Optional): TextPickerAttribute; + + /** + * Triggered during the scrolling of the text picker when an item enters the divider area. + * When the picker contains text only or a combination of images and text, + * value indicates the text of the selected item. When the picker contains images only, value is empty. + * + * @param { TextPickerEnterSelectedAreaCallback } callback - Triggered during the scrolling of + *
the text picker when an item enters the divider area. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onEnterSelectedArea(callback: TextPickerEnterSelectedAreaCallback): TextPickerAttribute; + + /** + * Sets the index of the default selected item in the array. + * Its priority is higher than that of the selected value in options. + * For a single-column picker, use a value of the number type. + * For a multi-column (linked) picker, use a value of the number[] type. + * + * @param { number | number[] } value - Index of the default selected item in the array. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the index of the default selected item in the array. + * Its priority is higher than that of the selected value in options. + * For a single-column picker, use a value of the number type. + * For a multi-column (linked) picker, use a value of the number[] type. + * + * @param { number | number[] } value - Index of the default selected item in the array. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + selectedIndex(value: number | number[]): TextPickerAttribute; + + /** + * Sets the index of the default selected item in the array. + * Its priority is higher than that of the selected value in options. + * For a single-column picker, use a value of the number type. For a multi-column (linked) picker, + * use a value of the number[] type. Compared to [selectedIndex](#selectedindex10), + * this API supports the undefined type for the index parameter. + * + * @param { Optional } index - Index of the default selected item in the array. + *
The index is zero-based.
If index is set to undefined, the default value 0 is used. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + selectedIndex(index: Optional): TextPickerAttribute; + + /** + * Sets the divider style. + * + * @param { DividerOptions | null } value + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + divider(value: DividerOptions | null): TextPickerAttribute; + + /** + * Sets the divider style. + * + * @param { Optional } textDivider + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + divider(textDivider: Optional): TextPickerAttribute; + + /** + * Sets the height for the fade effect. + * If this attribute is not set, the default fade effect is displayed. + * + *

NOTE: + *
Avoid changing the attribute data during the animation process of this component. + *

+ * + * @param { Dimension } value - Height of the fade effect at the top and bottom edges of the content area. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + gradientHeight(value: Dimension): TextPickerAttribute; + + /** + * Specifies whether to enable haptic feedback. + * + * @param { Optional } enable - Whether to enable haptic feedback. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 18 + */ + enableHapticFeedback(enable: Optional): TextPickerAttribute; + + /** + * Sets the height for the fade effect. + * If this attribute is not set, the default fade effect is displayed. + * this API supports the undefinedtype for the height parameter. + * + *

NOTE: + *
Avoid changing the attribute data during the animation process of this component. + *

+ * + * @param { Optional } height - THeight of the fade effect at the top and bottom edges of + *
the content area. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + gradientHeight(height: Optional): TextPickerAttribute; + + /** + * Sets the sensitivity to the digital crown rotation. + * + * @param { Optional } sensitivity - Sensitivity to the digital crown rotation. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + digitalCrownSensitivity(sensitivity: Optional): TextPickerAttribute; + + /** + * Sets the background style of selected items. + * + * @param { Optional } style - the background style of selected items. + * @returns { TextPickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedBackgroundStyle(style: Optional): TextPickerAttribute; + } + + /** + * Defines the struct of TextPickerResult. + * + * @interface TextPickerResult * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 8 */ - color?: ResourceColor; - /** - * Distance between the divider and the start edge of the picker. - * The unit is vp by default. You can also specify it as px. The percentage type is not supported. + * Defines the struct of TextPickerResult. * - *

NOTE: - * Values less than 0 are invalid. The maximum value allowed is the width of the column. - *

- * - * @type { ?Dimension } - * @default 0 + * @interface TextPickerResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ - startMargin?: Dimension; - /** - * Distance between the divider and the end edge of the picker. - * The unit is vp by default. You can also specify it as px. The percentage type is not supported. + * Defines the struct of TextPickerResult. * - *

NOTE: - *
Values less than 0 are invalid. The maximum value allowed is the width of the column. - *

- * - * @type { ?Dimension } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - endMargin?: Dimension; -} - -/** - * Defines the text style options. - * - * @extends PickerTextStyle - * @interface TextPickerTextStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface TextPickerTextStyle extends PickerTextStyle { - /** - * Minimum font size, used in conjunction with maxFontSize. - * When minFontSize and maxFontSize are set, - * the size setting in font is ineffective. - * The default maximum number of lines is 1, - * and the default height adaptation mode is MIN_FONT_SIZE_FIRST. - * - * @type { ?(number | string | Resource) } + * @interface TextPickerResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - minFontSize?: number | string | Resource; - - /** - * Maximum font size. - * - * @type { ?(number | string | Resource) } + declare interface TextPickerResult { + /** + * The currently selected value. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * The currently selected value. + * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "". + * + * @type { string | string[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * The currently selected value. + * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "". + * + * @type { string | string[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + value: string | string[]; + + /** + * The subscript of the current selection. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * The subscript of the current selection. + * + * @type { number | number[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * The subscript of the current selection. + * + * @type { number | number[] } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + index: number | number[]; + } + + /** + * Defines the TextPickerDialogOptions for Text Picker Dialog. + * + * @extends TextPickerOptions + * @interface TextPickerDialogOptions * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 8 */ - maxFontSize?: number | string | Resource; - /** - * Display mode when the text is too long. - * - *

NOTE: - * Ineffective when set to MARQUEE. - *

+ * Defines the TextPickerDialogOptions for Text Picker Dialog. * - * @type { ?TextOverflow } + * @extends TextPickerOptions + * @interface TextPickerDialogOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ - overflow?: TextOverflow; -} - -/** - * Provide an interface to set the background style of selected items. - * - * @interface PickerBackgroundStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -declare interface PickerBackgroundStyle { /** - * Define the background color of selected item. + * Defines the TextPickerDialogOptions for Text Picker Dialog. * - * @type { ?ResourceColor } + * @extends TextPickerOptions + * @interface TextPickerDialogOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 20 + * @since 11 */ - color?: ResourceColor; - - /** - * Defines the border radius of selected items. - * - * @type { ?(LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses) } + declare interface TextPickerDialogOptions extends TextPickerOptions { + /** + * Called when the default height of the selected element is set. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the default height of the selected element is set. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Height of the picker item. + * + * @type { ?(number | string) } + * @default 56 vp (selected) and 36 vp (unselected) + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + defaultPickerItemHeight?: number | string; + + /** + * Can scroll loop if true is set, on the contrary it can not. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 10 + */ + /** + * Whether to support scroll looping. + * The value true means to support scroll looping, and false means the opposite. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + canLoop?: boolean; + + /** + * Text style of disappearing items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Font color, font size, and font weight of the top and bottom items. + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + disappearTextStyle?: PickerTextStyle; + + /** + * Text style of normal items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Font color, font size, and font weight of all items except the top, bottom, and selected items. + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + textStyle?: PickerTextStyle; + + /** + * Style of accept button. + * + *

NOTE: + *
In the acceptButtonStyle and cancelButtonStyle configurations, + *
only one primary field can be set to true at most. + *
If both the primary fields are set to true, neither will take effect. + *

+ * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + acceptButtonStyle?: PickerDialogButtonStyle; + + /** + * Style of cancel button. + * + *

NOTE: + *
In the acceptButtonStyle and cancelButtonStyle configurations, + *
only one primary field can be set to true at most. + *
If both the primary fields are set to true, neither will take effect. + *

+ * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + cancelButtonStyle?: PickerDialogButtonStyle; + + /** + * Text style of selected items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Font color, font size, and font weight of the selected item. + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + selectedTextStyle?: PickerTextStyle; + + /** + * Sets whether to enable the text style change animation during the scrolling process. + * true: Disable the text style change animation. + * false: Enable the text style change animation. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + disableTextStyleAnimation?: boolean; + + /** + * Style of the text items when the text style change animation during the scrolling process is disabled. + * + *

NOTE: + *
It is effective only when disableTextStyleAnimation is true. + *

+ * + * @type { ?TextPickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + defaultTextStyle?: TextPickerTextStyle; + + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Callback invoked when the OK button in the dialog box is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onAccept?: (value: TextPickerResult) => void; + + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Callback invoked when the Cancel button in the dialog box is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onCancel?: () => void; + + /** + * This event is triggered when a TextPicker text is selected in dialog. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * This event is triggered when a TextPicker text is selected in dialog. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Callback invoked when the text picker in the dialog box snaps to the selected item. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onChange?: (value: TextPickerResult) => void; + + /** + * Callback invoked when the scrolling in the text picker of the dialog box stops. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + onScrollStop?: Callback; + + /** + * Represents the callback triggered during the scrolling of the text picker when an item enters the divider area. + * Compared to the onChange event, this event is triggered earlier, + * specifically when the scroll distance of the current column exceeds half the height of the selected item, + * which indicates that the item has entered the divider area. + * + *

NOTE: + *
In scenarios where the picker contains linked columns, + *
the use of this callback is not recommended. + *
The reason is that it identifies nodes where items enter the divider area during scrolling. + *
However, items that change in response to the scrolling do not themselves scroll. As a result, + *
he callback's return values will only reflect changes for the currently scrolling column, + *
while other non-scrolling columns will remain unchanged. + *

+ * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onEnterSelectedArea?: Callback; + + /** + * Mask Region of dialog. The size cannot exceed the main window. + * + * @type { ?Rectangle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Mask area of the dialog box. + * Events outside the mask area are transparently transmitted, and events within the mask area are not. + * + * @type { ?Rectangle } + * @default { x: 0, y: 0, width: '100%', height: '100%' } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + maskRect?: Rectangle; + + /** + * Defines the dialog alignment of the screen. + * + * @type { ?DialogAlignment } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Alignment mode of the dialog box in the vertical direction. + * + * @type { ?DialogAlignment } + * @default DialogAlignment.Default + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + alignment?: DialogAlignment; + + /** + * Defines the dialog offset. + * + * @type { ?Offset } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Offset of the dialog box based on the alignment settings. + * + * @type { ?Offset } + * @default { dx: 0 , dy: 0 } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + offset?: Offset; + + /** + * Defines the textPickerDialog's background color + * + * @type { ?ResourceColor } + * @default Color.Transparent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Backplane color of the dialog box. + * + * @type { ?ResourceColor } + * @default Color.Transparent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + backgroundColor?: ResourceColor; + + /** + * Defines the textPickerDialog's background blur Style + * + * @type { ?BlurStyle } + * @default BlurStyle.COMPONENT_ULTRA_THICK + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Background blur style of the dialog box. + * + * @type { ?BlurStyle } + * @default BlurStyle.COMPONENT_ULTRA_THICK + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + backgroundBlurStyle?: BlurStyle; + + /** + * Options for customizing the background blur style. + * + * @type { ?BackgroundBlurStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 19 + */ + backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; + + /** + * Options for customizing the background effect. + * + * @type { ?BackgroundEffectOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 19 + */ + backgroundEffect?: BackgroundEffectOptions; + + /** + * Event callback when the dialog box appears. + * + *

NOTE: + *
1. The normal timing sequence is as follows: + * onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. + *
2. You can set the callback event for changing the dialog box display effect in onDidAppear. + * The settings take effect next time the dialog box appears. + *
3. If the user closes the dialog box immediately after it appears, + * onWillDisappearis invoked before onDidAppear. + *
4. If the dialog box is closed before its entrance animation is finished, this callback is not invoked. + *

+ * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onDidAppear?: () => void; + + /** + * Event callback when the dialog box disappears. + * + *

NOTE: + *
The normal timing sequence is as follows: + *
onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. + *

+ * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onDidDisappear?: () => void; + + /** + * Event callback when the dialog box is about to appear. + * + *

NOTE: + *
1. The normal timing sequence is as follows: + *
onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. + *
2. You can set the callback event for changing the dialog box display effect in onWillAppear. + *
the settings take effect next time the dialog box appears. + *

+ * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * + * @since 12 + */ + onWillAppear?: () => void; + + /** + * Event callback when the dialog box is about to disappear. + * + *

NOTE: + *
1. The normal timing sequence is as follows: + * onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. + *
2. If the user closes the dialog box immediately after it appears, + * onWillDisappear is invoked before onDidAppear. + *

+ * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onWillDisappear?: () => void; + + /** + * Shadow of the dialog box. + * Default value on 2-in-1 devices: ShadowStyle.OUTER_FLOATING_MD when the dialog box is focused + * and ShadowStyle.OUTER_FLOATING_SM otherwise. + * + * @type { ?(ShadowOptions | ShadowStyle) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + shadow?: ShadowOptions | ShadowStyle; + + /** + * Whether to enable the hover mode. + * + * @type { ?boolean } + * @default false - meaning not to enable the hover mode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + enableHoverMode?: boolean; + + /** + * Display area of the dialog box in hover mode. + * + * @type { ?HoverModeAreaType } + * @default HoverModeAreaType.BOTTOM_SCREEN + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + hoverModeArea?: HoverModeAreaType; + + /** + * Whether to enable haptic feedback. + * true (default): Haptic feedback is enabled. + * false: Haptic feedback is disabled. + * + *

NOTE: + *
To enable haptic feedback, you must declare the ohos.permission.VIBRATE permission + *
under requestPermissions in the module.json5 file of the project. + *
"requestPermissions": [{"name": "ohos.permission.VIBRATE"}]. + *

+ * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 18 + */ + enableHapticFeedback?: boolean; + + /** + * Background style of selected items. + * + * @type { ?PickerBackgroundStyle } + * @default { color: $r('sys.color.comp_background_tertiary'), borderRadius: $r('sys.float.corner_radius_level12') } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + selectedBackgroundStyle?: PickerBackgroundStyle; + } + + /** + * Defines the TextPickerDialogOptionsExt for Text Picker Dialog. + * + * @extends TextPickerOptions + * @interface TextPickerDialogOptionsExt * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 */ - borderRadius?: LengthMetrics | BorderRadiuses | LocalizedBorderRadiuses; -} - -/** - * Callback of the listened scroll stop event. - * - * @typedef {function} TextPickerScrollStopCallback - * @param { string | string[] } value - Value of the selected item. - * @param { number | number[] } index - Index of the selected item. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare type TextPickerScrollStopCallback = (value: string | string[], index: number | number[]) => void; - -/** - * Callback of TextPicker item is selected event. - * - * @typedef {function} OnTextPickerChangeCallback - * @param { string | string[] } selectItem - Value of the selected item. - * @param { number | number[] } index - Index of the selected item. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare type OnTextPickerChangeCallback = (selectItem: string | string[], index: number | number[]) => void; - -/** - * Callback of the listened onEnterSelectedArea event. - * - * @typedef {function} TextPickerEnterSelectedAreaCallback - * @param { string | string[] } value - Value of the selected item. - * @param { number | number[] } index - Index of the selected item. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare type TextPickerEnterSelectedAreaCallback = (value: string | string[], index: number | number[]) => void; - -/** - * Style the text selector. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Style the text selector. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Style the text selector. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class TextPickerAttribute extends CommonMethod { - /** - * Sets the height of each item in the picker. + declare interface TextPickerDialogOptionsExt extends TextPickerOptions { + /** + * Called when the default height of the selected element is set. + * + * @type { ?(number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + defaultPickerItemHeight?: number | string; + + /** + * Can scroll loop if true is set, on the contrary it can not. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + canLoop?: boolean; + + /** + * Text style of disappearing items. + * + * @type { ?TextPickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + disappearTextStyle?: TextPickerTextStyle; + + /** + * Text style of normal items + * + * @type { ?TextPickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + textStyle?: TextPickerTextStyle; + + /** + * Style of accept button. + * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + acceptButtonStyle?: PickerDialogButtonStyle; + + /** + * Style of cancel button. + * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + cancelButtonStyle?: PickerDialogButtonStyle; + + /** + * Text style of selected items + * + * @type { ?TextPickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedTextStyle?: TextPickerTextStyle; + + /** + * Defines whether to disable the text style animation. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + disableTextStyleAnimation?: boolean; + + /** + * Defines to set the default text style for options. + * + * @type { ?TextPickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + defaultTextStyle?: TextPickerTextStyle; + + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAccept?: Callback; + + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onCancel?: VoidCallback; + + /** + * This event is triggered when a TextPicker text is selected in dialog. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onChange?: Callback; + + /** + * This event is triggered when a TextPicker text is selected and scrolling has stopped in dialog. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onScrollStop?: Callback; + + /** + * This event is triggered when an item enters the selected area in dialog. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onEnterSelectedArea?: Callback; + + /** + * Mask Region of dialog. The size cannot exceed the main window. + * + * @type { ?Rectangle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + maskRect?: Rectangle; + + /** + * Defines the dialog alignment of the screen. + * + * @type { ?DialogAlignment } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + alignment?: DialogAlignment; + + /** + * Defines the dialog offset. + * + * @type { ?Offset } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + offset?: Offset; + + /** + * Defines the textPickerDialog's background color + * + * @type { ?ResourceColor } + * @default Color.Transparent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + backgroundColor?: ResourceColor; + + /** + * Defines the textPickerDialog's background blur Style + * + * @type { ?BlurStyle } + * @default BlurStyle.COMPONENT_ULTRA_THICK + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + backgroundBlurStyle?: BlurStyle; + + /** + * Defines the textPickerDialog's background blur style with options + * + * @type { ?BackgroundBlurStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; + + /** + * Defines the textPickerDialog's background effect with options + * + * @type { ?BackgroundEffectOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + backgroundEffect?: BackgroundEffectOptions; + + /** + * Callback function when the dialog appears. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onDidAppear?: VoidCallback; + + /** + * Callback function when the dialog disappears. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onDidDisappear?: VoidCallback; + + /** + * Callback function before the dialog openAnimation starts. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onWillAppear?: VoidCallback; + + /** + * Callback function before the dialog closeAnimation starts. + * + * @type { ?VoidCallback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onWillDisappear?: VoidCallback; + + /** + * Defines the dialog's shadow. + * + * @type { ?(ShadowOptions | ShadowStyle) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + shadow?: ShadowOptions | ShadowStyle; + + /** + * Defines whether to respond to the hover mode. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + enableHoverMode?: boolean; + + /** + * Defines the dialog's display area in hover mode. + * + * @type { ?HoverModeAreaType } + * @default HoverModeAreaType.BOTTOM_SCREEN + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + hoverModeArea?: HoverModeAreaType; + + /** + * Enable or disable haptic feedback. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + enableHapticFeedback?: boolean; + + /** + * Background style of selected items. + * + * @type { ?PickerBackgroundStyle } + * @default { color: $r('sys.color.comp_background_tertiary'), borderRadius: $r('sys.float.corner_radius_level12') } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + selectedBackgroundStyle?: PickerBackgroundStyle; + } + + /** + * Defines TextPickerDialog which uses show method to show TextPicker dialog. * - * @param { number | string } value - * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Sets the height of each item in the picker. + * Defines TextPickerDialog which uses show method to show TextPicker dialog. * - * @param { number | string } value - * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the height of each item in the picker. - * - * @param { number | string } value - Height of each item in the picker. - *
For the number type, the value range is [0, +∞]. For the string type, - *
only numeric string values, for example, "56", are supported. - * @returns { TextPickerAttribute } - * @default 56 vp (selected) and 36 vp (unselected). - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - defaultPickerItemHeight(value: number | string): TextPickerAttribute; - - /** - * Sets the height of each item in the picker. + * A text picker dialog box is a dialog box that allows users to select text from the given range. * - * @param { Optional } height - Height of each item in the picker. - *
For the number type, the value range is [0, +∞]. - *
For the string type, only numeric string values, for example, "56", are supported. - * @default 56 vp (selected) and 36 vp (unselected). - * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - defaultPickerItemHeight(height: Optional): TextPickerAttribute; - - /** - * Sets whether scrolling is loopable. - * - * @param { boolean } value - Whether scrolling is loopable. true: loopable; false: not loopable. - * @default true - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 + * @since 11 */ - /** - * Sets whether scrolling is loopable. + declare class TextPickerDialog { + /** + * Invoking method display. + * + * @param { TextPickerDialogOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Invoking method display. + * + * @param { TextPickerDialogOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Shows a text picker in the given settings. + * + * @param { TextPickerDialogOptions } options - Parameters of the text picker dialog box. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.UIContext#showTextPickerDialog + */ + static show(options?: TextPickerDialogOptions); + } + + /** + * Defines TextPicker Component. * - * @param { boolean } value - Whether scrolling is loopable. true: loopable; false: not loopable. - * @default true - * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 8 */ - canLoop(value: boolean): TextPickerAttribute; - - /** - * Can scroll loop if true is set, on the contrary it can not. - * this API supports the undefined type for the isLoop parameter. - * - * @param { Optional } isLoop - Whether scrolling is loopable. true: loopable; false: not loopable. - * @default true - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - canLoop(isLoop: Optional): TextPickerAttribute; - /** - * Sets the font color, font size, and font weight for the top and bottom items. + * Defines TextPicker Component. * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. - * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the font color, font size, and font weight for the top and bottom items. + * Creates a text picker based on the selection range specified by range. * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the top and bottom items. - * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - disappearTextStyle(value: PickerTextStyle): TextPickerAttribute; - + declare const TextPicker: TextPickerInterface; + /** - * Sets the font color, font size, and font weight for the top and bottom items. - * This API supports the undefined type for the style parameter. + * Defines TextPicker Component instance. * - * @param { Optional } style - Font color, font size, and font weight of the top and bottom items. - * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - disappearTextStyle(style: Optional): TextPickerAttribute; - + * @since 8 + */ /** - * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items. + * Defines TextPicker Component instance. * - * @param { PickerTextStyle } value - Font color, font size, and font weight of all items except the top, - *
bottom, and selected items. - * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items. + * Defines TextPicker Component instance. * - * @param { PickerTextStyle } value - indicates the text style of normal items. - * @returns { TextPickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - textStyle(value: PickerTextStyle): TextPickerAttribute; - - /** - * Sets the font color, font size, and font weight for all items except the top, bottom, and selected items. - * This API supports the undefined type for the style parameter. - * - * @param { Optional } style - Font color, font size, and font weight of all - *
items except the top, bottom, and selected items. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - textStyle(style: Optional): TextPickerAttribute; - - /** - * Sets the font color, font size, and font weight for the selected item. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item.. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the font color, font size, and font weight for the selected item. - * - * @param { PickerTextStyle } value - Font color, font size, and font weight of the selected item. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedTextStyle(value: PickerTextStyle): TextPickerAttribute; - - /** - * Sets the font color, font size, and font weight for the selected item. - * This API supports the undefined type for the style parameter. - * - * @param { Optional } style - Font color, font size, and font weight of the selected item. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedTextStyle(style: Optional): TextPickerAttribute; - - /** - * Sets whether to enable the text style change animation during the scrolling process. - * - * @param { boolean } disabled - * @default false - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - disableTextStyleAnimation(disabled: boolean): TextPickerAttribute; - - /** - * Sets the style of the text items when the text style change animation during the scrolling process is disabled. - * - * @param { TextPickerTextStyle } style - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - defaultTextStyle(style: TextPickerTextStyle): TextPickerAttribute; - - /** - * Triggered when the OK button in the dialog box is clicked. - * - * @param { function } callback - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - * @deprecated since 10 - */ - onAccept(callback: (value: string, index: number) => void): TextPickerAttribute; - - /** - * Triggered when the Cancel button in the dialog box is clicked. - * - * @param { function } callback - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - * @deprecated since 10 - */ - onCancel(callback: () => void): TextPickerAttribute; - - /** - * Triggered when an item in the picker is selected. - * - * @param { function } callback - the callback of onChange. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Triggered when an item in the picker is selected. - * When the picker contains text only or both text and imagery, - * value indicates the text of the selected item. - * When the picker contains imagery only, value is empty. - * - * @param { function } callback - the callback of onChange. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Triggered when an item in the picker is selected. - * When the picker contains text only or both text and imagery, - * value indicates the text of the selected item. - * When the picker contains imagery only, value is empty. - * - * @param { function } callback - the callback of onChange. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onChange(callback: (value: string | string[], index: number | number[]) => void): TextPickerAttribute; - - /** - * Triggered when the text picker snaps to the selected item. - * Compared to onChange, this API supports the undefined type for the callback parameter. - * - * @param { Optional } callback - the callback of onChange. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onChange(callback: Optional): TextPickerAttribute; - - /** - * Triggered when the scrolling in the text picker stops. - * If the scrolling is initiated by a gesture, - * this event is triggered when the finger is lifted from the screen and the scrolling stops. - * - * @param { TextPickerScrollStopCallback } callback - Triggered when the scrolling - *
in the text picker stops. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 - */ - onScrollStop(callback: TextPickerScrollStopCallback): TextPickerAttribute; - - /** - * Triggered when the scrolling in the text picker stops. - * If the scrolling is initiated by a gesture, - * this event is triggered when the finger is lifted from the screen and the scrolling stops. - * - * @param { Optional } callback - Triggered when the scrolling - *
in the text picker stops. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onScrollStop(callback: Optional): TextPickerAttribute; - - /** - * Triggered during the scrolling of the text picker when an item enters the divider area. - * When the picker contains text only or a combination of images and text, - * value indicates the text of the selected item. When the picker contains images only, value is empty. - * - * @param { TextPickerEnterSelectedAreaCallback } callback - Triggered during the scrolling of - *
the text picker when an item enters the divider area. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onEnterSelectedArea(callback: TextPickerEnterSelectedAreaCallback): TextPickerAttribute; - - /** - * Sets the index of the default selected item in the array. - * Its priority is higher than that of the selected value in options. - * For a single-column picker, use a value of the number type. - * For a multi-column (linked) picker, use a value of the number[] type. - * - * @param { number | number[] } value - Index of the default selected item in the array. - * @default 0 - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the index of the default selected item in the array. - * Its priority is higher than that of the selected value in options. - * For a single-column picker, use a value of the number type. - * For a multi-column (linked) picker, use a value of the number[] type. - * - * @param { number | number[] } value - Index of the default selected item in the array. - * @default 0 - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedIndex(value: number | number[]): TextPickerAttribute; - - /** - * Sets the index of the default selected item in the array. - * Its priority is higher than that of the selected value in options. - * For a single-column picker, use a value of the number type. For a multi-column (linked) picker, - * use a value of the number[] type. Compared to [selectedIndex](#selectedindex10), - * this API supports the undefined type for the index parameter. - * - * @param { Optional } index - Index of the default selected item in the array. - *
The index is zero-based.
If index is set to undefined, the default value 0 is used. - * @default 0 - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedIndex(index: Optional): TextPickerAttribute; - - /** - * Sets the divider style. - * - * @param { DividerOptions | null } value - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - divider(value: DividerOptions | null): TextPickerAttribute; - - /** - * Sets the divider style. - * - * @param { Optional } textDivider - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - divider(textDivider: Optional): TextPickerAttribute; - - /** - * Sets the height for the fade effect. - * If this attribute is not set, the default fade effect is displayed. - * - *

NOTE: - *
Avoid changing the attribute data during the animation process of this component. - *

- * - * @param { Dimension } value - Height of the fade effect at the top and bottom edges of the content area. - * @default 36vp - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - gradientHeight(value: Dimension): TextPickerAttribute; - - /** - * Specifies whether to enable haptic feedback. - * - * @param { Optional } enable - Whether to enable haptic feedback. - * @default true - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableHapticFeedback(enable: Optional): TextPickerAttribute; - - /** - * Sets the height for the fade effect. - * If this attribute is not set, the default fade effect is displayed. - * this API supports the undefinedtype for the height parameter. - * - *

NOTE: - *
Avoid changing the attribute data during the animation process of this component. - *

- * - * @param { Optional } height - THeight of the fade effect at the top and bottom edges of - *
the content area. - * @default 36vp - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - gradientHeight(height: Optional): TextPickerAttribute; - - /** - * Sets the sensitivity to the digital crown rotation. - * - * @param { Optional } sensitivity - Sensitivity to the digital crown rotation. - * @default CrownSensitivity.MEDIUM - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - digitalCrownSensitivity(sensitivity: Optional): TextPickerAttribute; - - /** - * Sets the background style of selected items. - * - * @param { Optional } style - the background style of selected items. - * @returns { TextPickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - selectedBackgroundStyle(style: Optional): TextPickerAttribute; -} - -/** - * Defines the struct of TextPickerResult. - * - * @interface TextPickerResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the struct of TextPickerResult. - * - * @interface TextPickerResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the struct of TextPickerResult. - * - * @interface TextPickerResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface TextPickerResult { - /** - * The currently selected value. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * The currently selected value. - * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "". - * - * @type { string | string[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The currently selected value. - * Only valid when only text is displayed.When picture or picture plus text is displayed, the value of value is "". - * - * @type { string | string[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - value: string | string[]; - - /** - * The subscript of the current selection. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * The subscript of the current selection. - * - * @type { number | number[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The subscript of the current selection. - * - * @type { number | number[] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - index: number | number[]; -} - -/** - * Defines the TextPickerDialogOptions for Text Picker Dialog. - * - * @extends TextPickerOptions - * @interface TextPickerDialogOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the TextPickerDialogOptions for Text Picker Dialog. - * - * @extends TextPickerOptions - * @interface TextPickerDialogOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the TextPickerDialogOptions for Text Picker Dialog. - * - * @extends TextPickerOptions - * @interface TextPickerDialogOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface TextPickerDialogOptions extends TextPickerOptions { - /** - * Called when the default height of the selected element is set. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the default height of the selected element is set. - * - * @type { ?(number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Height of the picker item. - * - * @type { ?(number | string) } - * @default 56 vp (selected) and 36 vp (unselected) - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - defaultPickerItemHeight?: number | string; - - /** - * Can scroll loop if true is set, on the contrary it can not. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Whether to support scroll looping. - * The value true means to support scroll looping, and false means the opposite. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - canLoop?: boolean; - - /** - * Text style of disappearing items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Font color, font size, and font weight of the top and bottom items. - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - disappearTextStyle?: PickerTextStyle; - - /** - * Text style of normal items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Font color, font size, and font weight of all items except the top, bottom, and selected items. - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - textStyle?: PickerTextStyle; - - /** - * Style of accept button. - * - *

NOTE: - *
In the acceptButtonStyle and cancelButtonStyle configurations, - *
only one primary field can be set to true at most. - *
If both the primary fields are set to true, neither will take effect. - *

- * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - acceptButtonStyle?: PickerDialogButtonStyle; - - /** - * Style of cancel button. - * - *

NOTE: - *
In the acceptButtonStyle and cancelButtonStyle configurations, - *
only one primary field can be set to true at most. - *
If both the primary fields are set to true, neither will take effect. - *

- * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - cancelButtonStyle?: PickerDialogButtonStyle; - - /** - * Text style of selected items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Font color, font size, and font weight of the selected item. - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedTextStyle?: PickerTextStyle; - - /** - * Sets whether to enable the text style change animation during the scrolling process. - * true: Disable the text style change animation. - * false: Enable the text style change animation. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - disableTextStyleAnimation?: boolean; - - /** - * Style of the text items when the text style change animation during the scrolling process is disabled. - * - *

NOTE: - *
It is effective only when disableTextStyleAnimation is true. - *

- * - * @type { ?TextPickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - defaultTextStyle?: TextPickerTextStyle; - - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Callback invoked when the OK button in the dialog box is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - onAccept?: (value: TextPickerResult) => void; - - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Callback invoked when the Cancel button in the dialog box is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - onCancel?: () => void; - - /** - * This event is triggered when a TextPicker text is selected in dialog. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * This event is triggered when a TextPicker text is selected in dialog. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Callback invoked when the text picker in the dialog box snaps to the selected item. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - onChange?: (value: TextPickerResult) => void; - - /** - * Callback invoked when the scrolling in the text picker of the dialog box stops. - * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 - */ - onScrollStop?: Callback; - - /** - * Represents the callback triggered during the scrolling of the text picker when an item enters the divider area. - * Compared to the onChange event, this event is triggered earlier, - * specifically when the scroll distance of the current column exceeds half the height of the selected item, - * which indicates that the item has entered the divider area. - * - *

NOTE: - *
In scenarios where the picker contains linked columns, - *
the use of this callback is not recommended. - *
The reason is that it identifies nodes where items enter the divider area during scrolling. - *
However, items that change in response to the scrolling do not themselves scroll. As a result, - *
he callback's return values will only reflect changes for the currently scrolling column, - *
while other non-scrolling columns will remain unchanged. - *

- * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onEnterSelectedArea?: Callback; - - /** - * Mask Region of dialog. The size cannot exceed the main window. - * - * @type { ?Rectangle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Mask area of the dialog box. - * Events outside the mask area are transparently transmitted, and events within the mask area are not. - * - * @type { ?Rectangle } - * @default { x: 0, y: 0, width: '100%', height: '100%' } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - maskRect?: Rectangle; - - /** - * Defines the dialog alignment of the screen. - * - * @type { ?DialogAlignment } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Alignment mode of the dialog box in the vertical direction. - * - * @type { ?DialogAlignment } - * @default DialogAlignment.Default - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - alignment?: DialogAlignment; - - /** - * Defines the dialog offset. - * - * @type { ?Offset } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Offset of the dialog box based on the alignment settings. - * - * @type { ?Offset } - * @default { dx: 0 , dy: 0 } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - offset?: Offset; - - /** - * Defines the textPickerDialog's background color - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Backplane color of the dialog box. - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - backgroundColor?: ResourceColor; - - /** - * Defines the textPickerDialog's background blur Style - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Background blur style of the dialog box. - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - backgroundBlurStyle?: BlurStyle; - - /** - * Options for customizing the background blur style. - * - * @type { ?BackgroundBlurStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 - */ - backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; - - /** - * Options for customizing the background effect. - * - * @type { ?BackgroundEffectOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 - */ - backgroundEffect?: BackgroundEffectOptions; - - /** - * Event callback when the dialog box appears. - * - *

NOTE: - *
1. The normal timing sequence is as follows: - * onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. - *
2. You can set the callback event for changing the dialog box display effect in onDidAppear. - * The settings take effect next time the dialog box appears. - *
3. If the user closes the dialog box immediately after it appears, - * onWillDisappearis invoked before onDidAppear. - *
4. If the dialog box is closed before its entrance animation is finished, this callback is not invoked. - *

- * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - onDidAppear?: () => void; - - /** - * Event callback when the dialog box disappears. - * - *

NOTE: - *
The normal timing sequence is as follows: - *
onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. - *

- * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - onDidDisappear?: () => void; - - /** - * Event callback when the dialog box is about to appear. - * - *

NOTE: - *
1. The normal timing sequence is as follows: - *
onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. - *
2. You can set the callback event for changing the dialog box display effect in onWillAppear. - *
the settings take effect next time the dialog box appears. - *

- * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - onWillAppear?: () => void; - - /** - * Event callback when the dialog box is about to disappear. - * - *

NOTE: - *
1. The normal timing sequence is as follows: - * onWillAppear > onDidAppear > (onAccept/onCancel/onChange/onScrollStop) > onWillDisappear > onDidDisappear. - *
2. If the user closes the dialog box immediately after it appears, - * onWillDisappear is invoked before onDidAppear. - *

- * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - onWillDisappear?: () => void; - - /** - * Shadow of the dialog box. - * Default value on 2-in-1 devices: ShadowStyle.OUTER_FLOATING_MD when the dialog box is focused - * and ShadowStyle.OUTER_FLOATING_SM otherwise. - * - * @type { ?(ShadowOptions | ShadowStyle) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - shadow?: ShadowOptions | ShadowStyle; - - /** - * Whether to enable the hover mode. - * - * @type { ?boolean } - * @default false - meaning not to enable the hover mode. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableHoverMode?: boolean; - - /** - * Display area of the dialog box in hover mode. - * - * @type { ?HoverModeAreaType } - * @default HoverModeAreaType.BOTTOM_SCREEN - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 - */ - hoverModeArea?: HoverModeAreaType; - - /** - * Whether to enable haptic feedback. - * true (default): Haptic feedback is enabled. - * false: Haptic feedback is disabled. - * - *

NOTE: - *
To enable haptic feedback, you must declare the ohos.permission.VIBRATE permission - *
under requestPermissions in the module.json5 file of the project. - *
"requestPermissions": [{"name": "ohos.permission.VIBRATE"}]. - *

- * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableHapticFeedback?: boolean; - - /** - * Background style of selected items. - * - * @type { ?PickerBackgroundStyle } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - selectedBackgroundStyle?: PickerBackgroundStyle; -} - -/** - * Defines TextPickerDialog which uses show method to show TextPicker dialog. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines TextPickerDialog which uses show method to show TextPicker dialog. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * A text picker dialog box is a dialog box that allows users to select text from the given range. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class TextPickerDialog { - /** - * Invoking method display. - * - * @param { TextPickerDialogOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Invoking method display. - * - * @param { TextPickerDialogOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Shows a text picker in the given settings. - * - * @param { TextPickerDialogOptions } options - Parameters of the text picker dialog box. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.UIContext#showTextPickerDialog - */ - static show(options?: TextPickerDialogOptions); -} - -/** - * Defines TextPicker Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines TextPicker Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Creates a text picker based on the selection range specified by range. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare const TextPicker: TextPickerInterface; - -/** - * Defines TextPicker Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines TextPicker Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines TextPicker Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare const TextPickerInstance: TextPickerAttribute; - + declare const TextPickerInstance: TextPickerAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/text_timer.d.ts b/api/@internal/component/ets/text_timer.d.ts index c3a15592a95904f1087ab93a15a4ff725c17d5ea..c6db62f919aa7f3d932b3ed3917229d3ff274786 100644 --- a/api/@internal/component/ets/text_timer.d.ts +++ b/api/@internal/component/ets/text_timer.d.ts @@ -18,12 +18,6 @@ * @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. * @@ -44,775 +38,717 @@ import { FontStyle,FontWeight } from './enums' * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ -declare class TextTimerController { - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ + declare class TextTimerController { + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * constructor. + * A constructor used to create a TextTimerController object. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + constructor(); + + /** + * Provides a start event for timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides a start event for timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Starts the timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + start(); + + /** + * Provides a pause event for timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides a pause event for timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Pauses the timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + pause(); + + /** + * Provides an event to reset timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Provides an event to reset timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Resets the timer. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + reset(); + } + /** - * constructor. - * A constructor used to create a TextTimerController object. + * TextTimerConfiguration used by content modifier. * + * @extends CommonConfiguration + * @interface TextTimerConfiguration * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(); - + * @since 12 + */ + declare interface TextTimerConfiguration extends CommonConfiguration { + /** + * Timer duration, in milliseconds. + * It is effective only when isCountDown is true. + * The maximum value is 86400000 ms (24 hours). + * + *

NOTE: + *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. + *
Otherwise, the default value is used as the initial countdown time. + *

+ * + * @type { number } + * @default 60000 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + count: number; + + /** + * Whether the timer is a countdown. + * The value true means that the timer counts down, + * and false means that the timer counts up. + * + * @type { boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + isCountDown: boolean; + + /** + * Whether the timer has already started. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + started: boolean; + + /** + * Elapsed time of the timer, in the minimum unit of the format. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + elapsedTime: number; + } + /** - * Provides a start event for timer. + * Defines the options of TextTimer. * + * @interface TextTimerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Provides a start event for timer. + * Defines the options of TextTimer. * + * @interface TextTimerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Starts the timer. + * Parameters of the TextTimer component. * + * @interface TextTimerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - start(); - - /** - * Provides a start event for timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - start():void; - + interface TextTimerOptions { + /** + * Sets whether to countdown.The default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Sets whether to countdown.The default value is false. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Whether the timer is a countdown. + * The value true means that the timer counts down, + * and false means that the timer counts up. + * + * @type { ?boolean } - Default value: false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + isCountDown?: boolean; + + /** + * Specifies the timer range. + * In the non-countDown scenario, a negative value indicates that the timer is not limited. + * The unit is millisecond. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Specifies the timer range. + * In the non-countDown scenario, a negative value indicates that the timer is not limited. + * The unit is millisecond. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Timer duration, in milliseconds. + * It is effective only when isCountDown is true. + * The maximum value is 86400000 ms (24 hours). + * + *

NOTE: + *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. + *
Otherwise, the default value is used as the initial countdown time. + *

+ * + * @type { ?number } - Default value: 60000 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + count?: number; + + /** + * Controller of Texttimer. + * + * @type { ?TextTimerController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Controller of Texttimer. + * + * @type { ?TextTimerController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * TextTimer controller. + * + * @type { ?TextTimerController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + controller?: TextTimerController; + } + /** - * Provides a pause event for timer. + * Provides an interface for texttimer containers. * + * @interface TextTimerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Provides a pause event for timer. + * Provides an interface for texttimer containers. * + * @interface TextTimerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Pauses the timer. + * Provides an interface for texttimer containers. * + * @interface TextTimerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - pause(); - - /** - * Provides a pause event for timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - pause():void; - + interface TextTimerInterface { + /** + * Defines the TextTimer constructor. + * + * @param { TextTimerOptions } options + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Defines the TextTimer constructor. + * + * @param { TextTimerOptions } options + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * A constructor used to create a TextTimerController object. + * + * @param { TextTimerOptions } options + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + (options?: TextTimerOptions): TextTimerAttribute; + } + /** - * Provides an event to reset timer. + * Defines the TextTimer attribute functions. * - * @syscap SystemCapability.ArkUI.ArkUI.Full + * @extends CommonMethod * @since 8 */ /** - * Provides an event to reset timer. + * Defines the TextTimer attribute functions. * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Resets the timer. + * Defines the TextTimer attribute functions. * + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ - reset(); - - /** - * Provides an event to reset timer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - reset():void; -} - -/** - * TextTimerConfiguration used by content modifier. - * - * @extends CommonConfiguration - * @interface TextTimerConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface TextTimerConfiguration extends CommonConfiguration { - /** - * Timer duration, in milliseconds. - * It is effective only when isCountDown is true. - * The maximum value is 86400000 ms (24 hours). - * - *

NOTE: - *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. - *
Otherwise, the default value is used as the initial countdown time. - *

- * - * @type { number } - * @default 60000 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - count: number; - - /** - * Whether the timer is a countdown. - * The value true means that the timer counts down, - * and false means that the timer counts up. - * - * @type { boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - isCountDown: boolean; - - /** - * Whether the timer has already started. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - started: boolean; + declare class TextTimerAttribute extends CommonMethod { + /** + * Set the display time format, for example, now is hh/mm/ss/ms and current: hh-mm-ss-ms. + * The time format string can be hh, mm, ss, or ms. + * + * @param { string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Set the display time format, for example, now is hh/mm/ss/ms and current: hh-mm-ss-ms. + * The time format string can be hh, mm, ss, or ms. + * + * @param { string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the custom format. + * The value must contain at least one of the following keywords: HH, mm, ss, and SS. + * + *

NOTE: + *
If the specified date format is yy, MM, or dd, the default value is used instead. + *

+ * + * @param { string } value - Custom format.Default value: 'HH:mm:ss.SS' + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + format(value: string): TextTimerAttribute; + + /** + * Called when the font color is set. + * + * @param { ResourceColor } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the font color is set. + * + * @param { ResourceColor } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the font color. + * + * @param { ResourceColor } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontColor(value: ResourceColor): TextTimerAttribute; + + /** + * Called when the font size is set. + * + * @param { Length } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the font size is set. + * + * @param { Length } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the font size. + * + * @param { Length } value - Font size.The default font size is 16 fp. + *
If fontSize is of the number type, the unit fp is used. + *
The value cannot be a percentage. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontSize(value: Length): TextTimerAttribute; + + /** + * Called when the fontStyle is set + * + * @param { FontStyle } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the fontStyle is set + * + * @param { FontStyle } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the font style. + * + * @param { FontStyle } value - Font style.Default value: FontStyle.Normal + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontStyle(value: FontStyle): TextTimerAttribute; + + /** + * Called when the fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Called when the fontWeight is set + * + * @param { number | FontWeight | string } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + /** + * Sets the font weight. + * + *

NOTE: + *
If the value is too large, the text may be clipped depending on the font. + *

+ * + * @param { number | FontWeight | ResourceStr } value - Font weight. + *
For the number type, Value range: [100, 900], at an interval of 100.The default value is 400. + *
A larger value indicates a heavier font weight. + *
For the string type, only strings that represent a number. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + fontWeight(value: number | FontWeight | ResourceStr): TextTimerAttribute; + + /** + * Called when the fontFamily is set + * + * @param { ResourceStr } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the fontFamily is set + * + * @param { ResourceStr } value + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Sets the font family. + * + * @param { ResourceStr } value - Font family. Default font: 'HarmonyOS Sans' + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + fontFamily(value: ResourceStr): TextTimerAttribute; + + /** + * Called when the timer value is returned. + * + * @param { function } event + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the timer value is returned. + * + * @param { function } event + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @since 10 + */ + /** + * Triggered when the time text changes. + * This event is not triggered when the screen is locked or the application is running in the background. + * When high-precision formats (such as SSS or SS) are used, the callback interval may vary. + * + * @param { function } event + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 11 + */ + onTimer(event: (utc: number, elapsedTime: number) => void): TextTimerAttribute; + + /** + * Called when the text shadow is set. + * + * @param { ShadowOptions | Array } value - The shadow options. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Sets the text shadow. + * It supports input parameters in an array to implement multiple text shadows. + * This API does not work with the fill attribute or coloring strategy. + * + * @param { ShadowOptions | Array } value - The shadow options. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + textShadow(value: ShadowOptions | Array): TextTimerAttribute; + + /** + * Creates a content modifier. + * + * @param { ContentModifier } modifier - The content modifier of texttimer. + * @returns { TextTimerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + contentModifier(modifier: ContentModifier): TextTimerAttribute; + } /** - * Elapsed time of the timer, in the minimum unit of the format. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - elapsedTime: number; -} - -/** - * Defines the options of TextTimer. - * - * @interface TextTimerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the options of TextTimer. - * - * @interface TextTimerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Parameters of the TextTimer component. - * - * @interface TextTimerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface TextTimerOptions { - /** - * Sets whether to countdown.The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Sets whether to countdown.The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Whether the timer is a countdown. - * The value true means that the timer counts down, - * and false means that the timer counts up. - * - * @type { ?boolean } - Default value: false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - isCountDown?: boolean; - - /** - * Specifies the timer range. - * In the non-countDown scenario, a negative value indicates that the timer is not limited. - * The unit is millisecond. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Specifies the timer range. - * In the non-countDown scenario, a negative value indicates that the timer is not limited. - * The unit is millisecond. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Timer duration, in milliseconds. - * It is effective only when isCountDown is true. - * The maximum value is 86400000 ms (24 hours). - * - *

NOTE: - *
If the value is between 0 and 86,400,000, it is used as the initial countdown time. - *
Otherwise, the default value is used as the initial countdown time. - *

- * - * @type { ?number } - Default value: 60000 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - count?: number; - - /** - * Controller of Texttimer. - * - * @type { ?TextTimerController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Controller of Texttimer. - * - * @type { ?TextTimerController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * TextTimer controller. - * - * @type { ?TextTimerController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - controller?: TextTimerController; -} - -/** - * Provides an interface for texttimer containers. - * - * @interface TextTimerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Provides an interface for texttimer containers. - * - * @interface TextTimerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Provides an interface for texttimer containers. - * - * @interface TextTimerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface TextTimerInterface { - /** - * Defines the TextTimer constructor. - * - * @param { TextTimerOptions } options - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Defines the TextTimer constructor. - * - * @param { TextTimerOptions } options - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * A constructor used to create a TextTimerController object. - * - * @param { TextTimerOptions } options - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - (options?: TextTimerOptions): TextTimerAttribute; -} - -/** - * Defines the TextTimer attribute functions. - * - * @extends CommonMethod - * @since 8 - */ -/** - * Defines the TextTimer attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines the TextTimer attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class TextTimerAttribute extends CommonMethod { - /** - * Set the display time format, for example, now is hh/mm/ss/ms and current: hh-mm-ss-ms. - * The time format string can be hh, mm, ss, or ms. - * - * @param { string } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Set the display time format, for example, now is hh/mm/ss/ms and current: hh-mm-ss-ms. - * The time format string can be hh, mm, ss, or ms. - * - * @param { string } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the custom format. - * The value must contain at least one of the following keywords: HH, mm, ss, and SS. - * - *

NOTE: - *
If the specified date format is yy, MM, or dd, the default value is used instead. - *

- * - * @param { string } value - Custom format.Default value: 'HH:mm:ss.SS' - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - format(value: string): TextTimerAttribute; - - /** - * Called when the font color is set. - * - * @param { ResourceColor } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the font color is set. - * - * @param { ResourceColor } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the font color. - * - * @param { ResourceColor } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontColor(value: ResourceColor): TextTimerAttribute; - - /** - * Called when the font size is set. - * - * @param { Length } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the font size is set. - * - * @param { Length } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the font size. - * - * @param { Length } value - Font size.The default font size is 16 fp. - *
If fontSize is of the number type, the unit fp is used. - *
The value cannot be a percentage. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontSize(value: Length): TextTimerAttribute; - - /** - * Called when the fontStyle is set - * - * @param { FontStyle } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the fontStyle is set - * - * @param { FontStyle } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the font style. - * - * @param { FontStyle } value - Font style.Default value: FontStyle.Normal - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontStyle(value: FontStyle): TextTimerAttribute; - - /** - * Called when the fontWeight is set + * Defines TextTimer Component. * - * @param { number | FontWeight | string } value - * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Called when the fontWeight is set + * Defines TextTimer Component. * - * @param { number | FontWeight | string } value - * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Called when the fontWeight is set + * Defines TextTimer Component. * - * @param { number | FontWeight | string } value - * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 11 */ + declare const TextTimer: TextTimerInterface; + /** - * Sets the font weight. - * - *

NOTE: - *
If the value is too large, the text may be clipped depending on the font. - *

- * - * @param { number | FontWeight | ResourceStr } value - Font weight. - *
For the number type, Value range: [100, 900], at an interval of 100.The default value is 400. - *
A larger value indicates a heavier font weight. - *
For the string type, only strings that represent a number. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - fontWeight(value: number | FontWeight | ResourceStr): TextTimerAttribute; - - /** - * Called when the fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the fontFamily is set - * - * @param { ResourceStr } value - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ - /** - * Sets the font family. - * - * @param { ResourceStr } value - Font family. Default font: 'HarmonyOS Sans' - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fontFamily(value: ResourceStr): TextTimerAttribute; - - /** - * Called when the timer value is returned. + * Defines TextTimer Component instance. * - * @param { function } event - * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Called when the timer value is returned. + * Defines TextTimer Component instance. * - * @param { function } event - * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @since 10 */ /** - * Triggered when the time text changes. - * This event is not triggered when the screen is locked or the application is running in the background. - * When high-precision formats (such as SSS or SS) are used, the callback interval may vary. + * Defines TextTimer Component instance. * - * @param { function } event - * @returns { TextTimerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - onTimer(event: (utc: number, elapsedTime: number) => void): TextTimerAttribute; - - /** - * Called when the text shadow is set. - * - * @param { ShadowOptions | Array } value - The shadow options. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @since 11 */ - /** - * Sets the text shadow. - * It supports input parameters in an array to implement multiple text shadows. - * This API does not work with the fill attribute or coloring strategy. - * - * @param { ShadowOptions | Array } value - The shadow options. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - textShadow(value: ShadowOptions | Array): TextTimerAttribute; - - /** - * Creates a content modifier. - * - * @param { ContentModifier } modifier - The content modifier of texttimer. - * @returns { TextTimerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - contentModifier(modifier: ContentModifier): TextTimerAttribute; -} - -/** - * Defines TextTimer Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines TextTimer Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines TextTimer Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare const TextTimer: TextTimerInterface; - -/** - * Defines TextTimer Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines TextTimer Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 10 - */ -/** - * Defines TextTimer Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 11 - */ -declare const TextTimerInstance: TextTimerAttribute; + declare const TextTimerInstance: TextTimerAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/time_picker.d.ts b/api/@internal/component/ets/time_picker.d.ts index 4fc274659814f7df5b5a9bf1e61eb70a2a638590..2609aae0ddbc03c0312d6e582aa1efeec3a2dc2f 100644 --- a/api/@internal/component/ets/time_picker.d.ts +++ b/api/@internal/component/ets/time_picker.d.ts @@ -18,14 +18,6 @@ * @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. * @@ -48,1234 +40,1161 @@ import { CrownSensitivity } from './enums'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ -declare interface TimePickerResult { - /** - * Application hour - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ + declare interface TimePickerResult { + /** + * Application hour + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Application hour + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Hour portion of the selected time. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + hour: number; + + /** + * Application minute + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Application minute + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Minute portion of the selected time. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + minute: number; + + /** + * Second portion of the selected time. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + second: number; + } + /** - * Application hour - * - * @type { ?number } + * Type of the TimePicker that need to be displayed. + * @enum {number} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 + * @since 11 */ /** - * Hour portion of the selected time. - * - * @type { number } + * Type of the TimePicker that need to be displayed. + * @enum {number} * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - hour: number; - + * @since 12 + */ + declare enum TimePickerFormat { + /** + * Hour and minute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Hour and minute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + HOUR_MINUTE, + + /** + * Hour and minute and second + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Hour and minute and second + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + HOUR_MINUTE_SECOND, + } + /** - * Application minute + * Defines the options of TimePicker. * - * @type { ?number } + * @interface TimePickerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Application minute + * Defines the options of TimePicker. * - * @type { ?number } + * @interface TimePickerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Minute portion of the selected time. + * Defines the options of TimePicker. * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - minute: number; - - /** - * Second portion of the selected time. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - second: number; -} - -/** - * Type of the TimePicker that need to be displayed. - * @enum {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ -/** - * Type of the TimePicker that need to be displayed. - * @enum {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum TimePickerFormat { - /** - * Hour and minute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Hour and minute. + * @interface TimePickerOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - HOUR_MINUTE, - - /** - * Hour and minute and second - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @since 11 */ + declare interface TimePickerOptions { + /** + * Specifies the time selector check time. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Specifies the time selector check time. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Specifies the time selector check time. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + selected?: Date; + + /** + * Specifies the format of the TimePicker that need to be displayed. + * + * @type { ?TimePickerFormat } + * @default HOUR_MINUTE + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Specifies the format of the TimePicker that need to be displayed. + * + * @type { ?TimePickerFormat } + * @default HOUR_MINUTE + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + format?: TimePickerFormat; + + /** + * Defines the start time of the time picker. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + start?: Date; + + /** + * Defines the end time of the time picker. + * + * @type { ?Date } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + end?: Date; + } + /** - * Hour and minute and second - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - HOUR_MINUTE_SECOND, -} - -/** - * Defines the options of TimePicker. - * - * @interface TimePickerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the options of TimePicker. - * - * @interface TimePickerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the options of TimePicker. - * - * @interface TimePickerOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface TimePickerOptions { - /** - * Specifies the time selector check time. + * Defines the TimePicker Component. * - * @type { ?Date } + * @interface TimePickerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Specifies the time selector check time. + * Defines the TimePicker Component. * - * @type { ?Date } + * @interface TimePickerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Specifies the time selector check time. + * Defines the TimePicker Component. * - * @type { ?Date } + * @interface TimePickerInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 11 */ - selected?: Date; - - /** - * Specifies the time selector check time. - * - * @type { ?(Date | Bindable) } + interface TimePickerInterface { + /** + * Defines the TimePicker constructor. + * + * @param { TimePickerOptions } options + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Defines the TimePicker constructor. + * + * @param { TimePickerOptions } options + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Defines the TimePicker constructor. + * + * @param { TimePickerOptions } options + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + (options?: TimePickerOptions): TimePickerAttribute; + } + /** + * Define the internationalization parameter format. + * + * @typedef { import('../api/@ohos.intl').default.DateTimeOptions } DateTimeOptions * @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. - * - * @type { ?TimePickerFormat } - * @default HOUR_MINUTE - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 + * @since 12 */ + declare type DateTimeOptions = import('../api/@ohos.intl').default.DateTimeOptions + /** - * Specifies the format of the TimePicker that need to be displayed. + * Callback of the timePicker time is selected event. * - * @type { ?TimePickerFormat } - * @default HOUR_MINUTE + * @typedef {function} OnTimePickerChangeCallback * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ - format?: TimePickerFormat; + declare type OnTimePickerChangeCallback = (result: TimePickerResult) => void; /** - * Defines the start time of the time picker. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - start?: Date; - - /** - * Defines the end time of the time picker. - * - * @type { ?Date } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - end?: Date; -} - -/** - * Defines the TimePicker Component. - * - * @interface TimePickerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the TimePicker Component. - * - * @interface TimePickerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the TimePicker Component. - * - * @interface TimePickerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface TimePickerInterface { - /** - * Defines the TimePicker constructor. + * Defines the TimePicker attribute functions. * - * @param { TimePickerOptions } options - * @returns { TimePickerAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Defines the TimePicker constructor. + * Defines the TimePicker attribute functions. * - * @param { TimePickerOptions } options - * @returns { TimePickerAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Defines the TimePicker constructor. + * Defines the TimePicker attribute functions. * - * @param { TimePickerOptions } options - * @returns { TimePickerAttribute } + * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - (options?: TimePickerOptions): TimePickerAttribute; -} -/** - * Define the internationalization parameter format. - * - * @typedef { import('../api/@ohos.intl').default.DateTimeOptions } DateTimeOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -declare type DateTimeOptions = import('../api/@ohos.intl').default.DateTimeOptions - -/** - * Callback of the timePicker time is selected event. - * - * @typedef {function} OnTimePickerChangeCallback - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare type OnTimePickerChangeCallback = (result: TimePickerResult) => void; - -/** - * Defines the TimePicker attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the TimePicker attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the TimePicker attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class TimePickerAttribute extends CommonMethod { + declare class TimePickerAttribute extends CommonMethod { + /** + * Time Selector: indicates whether to display the 24-hour clock. + * + * @param { boolean } value + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Time Selector: indicates whether to display the 24-hour clock. + * + * @param { boolean } value + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Time Selector: indicates whether to display the 24-hour clock. + * + * @param { boolean } value + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + useMilitaryTime(value: boolean): TimePickerAttribute; + + /** + * Time Selector: indicates whether to display the 24-hour clock. + * + * @param { Optional } isMilitaryTime + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + useMilitaryTime(isMilitaryTime: Optional): TimePickerAttribute; + + /** + * Sets whether to enable the wheel mode. + * @param { boolean } value - indicates whether to enable the wheel mode. + * @returns { TimePickerAttribute } the attribute of the time picker + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Sets whether to enable the wheel mode. + * @param { boolean } value - indicates whether to enable the wheel mode. + * @returns { TimePickerAttribute } the attribute of the time picker + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + loop(value: boolean): TimePickerAttribute; + + /** + * Sets whether to enable the wheel mode. + * @param { Optional } isLoop - indicates whether to enable the wheel mode. + * @returns { TimePickerAttribute } the attribute of the time picker + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + loop(isLoop: Optional): TimePickerAttribute; + + /** + * Sets the text style of disappearing items + * + * @param { PickerTextStyle } value - indicates the text style of disappearing items. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the text style of disappearing items + * + * @param { PickerTextStyle } value - indicates the text style of disappearing items. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + disappearTextStyle(value: PickerTextStyle): TimePickerAttribute; + + /** + * Sets the text style of disappearing items + * + * @param { Optional } style - indicates the text style of disappearing items. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + disappearTextStyle(style: Optional): TimePickerAttribute; + + /** + * Sets the text style of normal items + * + * @param { PickerTextStyle } value - indicates the text style of normal items. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the text style of normal items + * + * @param { PickerTextStyle } value - indicates the text style of normal items. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + textStyle(value: PickerTextStyle): TimePickerAttribute; + + /** + * Sets the text style of normal items + * + * @param { Optional } style - indicates the text style of normal items. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + textStyle(style: Optional): TimePickerAttribute; + + /** + * Sets the text style of selected items + * + * @param { PickerTextStyle } value - indicates the text style of selected items. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Sets the text style of selected items + * + * @param { PickerTextStyle } value - indicates the text style of selected items. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + selectedTextStyle(value: PickerTextStyle): TimePickerAttribute; + + /** + * Sets the text style of selected items + * + * @param { Optional } style - indicates the text style of selected items. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + selectedTextStyle(style: Optional): TimePickerAttribute; + + /** + * Set time format + * + * @param { DateTimeOptions } value - indicates the format of the time display. + * @returns { TimePickerAttribute } the attribute of the time picker + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + dateTimeOptions(value: DateTimeOptions): TimePickerAttribute; + + /** + * Set time format + * + * @param { Optional } timeFormat - indicates the format of the time display. + * @returns { TimePickerAttribute } the attribute of the time picker + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + dateTimeOptions(timeFormat: Optional): TimePickerAttribute; + + /** + * This event is triggered when a TimePicker time is selected. + * + * @param { function } callback + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * This event is triggered when a TimePicker time is selected. + * + * @param { function } callback + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * This event is triggered when a TimePicker time is selected. + * + * @param { function } callback + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onChange(callback: (value: TimePickerResult) => void): TimePickerAttribute; + + /** + * This event is triggered when a TimePicker time is selected. + * + * @param { Optional } callback + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onChange(callback: Optional): TimePickerAttribute; + + /** + * This event is triggered when an item enters the selected area. + * + * @param { Callback } callback + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onEnterSelectedArea(callback: Callback): TimePickerAttribute; + + /** + * Enable or disable haptic feedback. + * + * @param { boolean } enable - Default value is true, set false to disable haptic feedback. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 12 + */ + enableHapticFeedback(enable: boolean): TimePickerAttribute; + + /** + * Enable or disable haptic feedback. + * + * @param { Optional } enable - Default value is true, set false to disable haptic feedback. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 18 + */ + enableHapticFeedback(enable: Optional): TimePickerAttribute; + + /** + * If the attribute is set, the crown rotation sensitivity can be changed. + * + * @param { Optional } sensitivity + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + digitalCrownSensitivity(sensitivity: Optional): TimePickerAttribute; + + /** + * Defines whether the AM/PM option is cascaded with the time in 12-hour mode. + * + * @param { boolean } enabled - Default value is false, set true to enable. + * @returns { TimePickerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + enableCascade(enabled: boolean): TimePickerAttribute; + } + /** - * Time Selector: indicates whether to display the 24-hour clock. + * Defines the TimePickerDialogOptions for Data Picker Dialog. * - * @param { boolean } value - * @returns { TimePickerAttribute } + * @extends TimePickerOptions + * @interface TimePickerDialogOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 8 */ /** - * Time Selector: indicates whether to display the 24-hour clock. + * Defines the TimePickerDialogOptions for Data Picker Dialog. * - * @param { boolean } value - * @returns { TimePickerAttribute } + * @extends TimePickerOptions + * @interface TimePickerDialogOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Time Selector: indicates whether to display the 24-hour clock. - * - * @param { boolean } value - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - useMilitaryTime(value: boolean): TimePickerAttribute; - - /** - * Time Selector: indicates whether to display the 24-hour clock. + * Defines the TimePickerDialogOptions for Data Picker Dialog. * - * @param { Optional } isMilitaryTime - * @returns { TimePickerAttribute } + * @extends TimePickerOptions + * @interface TimePickerDialogOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - useMilitaryTime(isMilitaryTime: Optional): TimePickerAttribute; - - /** - * Sets whether to enable the wheel mode. - * @param { boolean } value - indicates whether to enable the wheel mode. - * @returns { TimePickerAttribute } the attribute of the time picker - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @since 11 */ + declare interface TimePickerDialogOptions extends TimePickerOptions { + /** + * Time Selector: indicates whether to display the 24-hour clock. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Time Selector: indicates whether to display the 24-hour clock. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Time Selector: indicates whether to display the 24-hour clock. + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + useMilitaryTime?: boolean; + + /** + * Text style of disappearing items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Text style of disappearing items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + disappearTextStyle?: PickerTextStyle; + + /** + * Text style of normal items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Text style of normal items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + textStyle?: PickerTextStyle; + + /** + * Style of accept button. + * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + acceptButtonStyle?: PickerDialogButtonStyle; + + /** + * Style of cancel button. + * + * @type { ?PickerDialogButtonStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + cancelButtonStyle?: PickerDialogButtonStyle; + + /** + * Text style of selected items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Text style of selected items + * + * @type { ?PickerTextStyle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + selectedTextStyle?: PickerTextStyle; + + /** + * Mask Region of dialog. The size cannot exceed the main window. + * + * @type { ?Rectangle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Mask Region of dialog. The size cannot exceed the main window. + * + * @type { ?Rectangle } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + maskRect?: Rectangle; + + /** + * Defines the dialog alignment of the screen. + * + * @type { ?DialogAlignment } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Defines the dialog alignment of the screen. + * + * @type { ?DialogAlignment } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + alignment?: DialogAlignment; + + /** + * Defines the dialog offset. + * + * @type { ?Offset } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Defines the dialog offset. + * + * @type { ?Offset } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + offset?: Offset; + + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the OK button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onAccept?: (value: TimePickerResult) => void; + + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Called when the Cancel button in the dialog is clicked. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onCancel?: () => void; + + /** + * This event is triggered when a TimePicker Time or time is selected in dialog. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * This event is triggered when a TimePicker Time or time is selected in dialog. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * This event is triggered when a TimePicker Time or time is selected in dialog. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + */ + onChange?: (value: TimePickerResult) => void; + + /** + * This event is triggered when an item enters the selected area in dialog. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + onEnterSelectedArea?: Callback; + + /** + * Defines the timePickerDialog's background color + * + * @type { ?ResourceColor } + * @default Color.Transparent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Defines the timePickerDialog's background color + * + * @type { ?ResourceColor } + * @default Color.Transparent + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + backgroundColor?: ResourceColor; + + /** + * Defines the timePickerDialog's background blur Style + * + * @type { ?BlurStyle } + * @default BlurStyle.COMPONENT_ULTRA_THICK + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 11 + */ + /** + * Defines the timePickerDialog's background blur Style + * + * @type { ?BlurStyle } + * @default BlurStyle.COMPONENT_ULTRA_THICK + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + backgroundBlurStyle?: BlurStyle; + + /** + * Defines the timePickerDialog's background blur style with options + * + * @type { ?BackgroundBlurStyleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 19 + */ + backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; + + /** + * Defines the timePickerDialog's background effect with options + * + * @type { ?BackgroundEffectOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 19 + */ + backgroundEffect?: BackgroundEffectOptions; + + /** + * Defines whether the AM/PM option is cascaded with the time in 12-hour mode. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + enableCascade?: boolean; + + /** + * Callback function when the dialog appears. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onDidAppear?: () => void; + + /** + * Callback function when the dialog disappears. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onDidDisappear?: () => void; + + /** + * Callback function before the dialog openAnimation starts. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onWillAppear?: () => void; + + /** + * Callback function before the dialog closeAnimation starts. + * + * @type { ?function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + onWillDisappear?: () => void; + + /** + * Defines the dialog's shadow. + * + * @type { ?(ShadowOptions | ShadowStyle) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + shadow?: ShadowOptions | ShadowStyle; + + /** + * Set time format + * + * @type { ?DateTimeOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ + dateTimeOptions?: DateTimeOptions; + + /** + * Defines whether to respond to the hover mode. + * + * @type { ?boolean } + * @default false + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + enableHoverMode?: boolean; + + /** + * Defines the dialog's display area in hover mode. + * + * @type { ?HoverModeAreaType } + * @default HoverModeAreaType.BOTTOM_SCREEN + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 14 + */ + hoverModeArea?: HoverModeAreaType; + + /** + * Enable or disable haptic feedback. + * + * @type { ?boolean } + * @default true + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 18 + */ + enableHapticFeedback?: boolean; + } + /** - * Sets whether to enable the wheel mode. - * @param { boolean } value - indicates whether to enable the wheel mode. - * @returns { TimePickerAttribute } the attribute of the time picker + * Defines TimePickerDialog which uses show method to show TimePicker dialog. + * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 8 */ - loop(value: boolean): TimePickerAttribute; - - /** - * Sets whether to enable the wheel mode. - * @param { Optional } isLoop - indicates whether to enable the wheel mode. - * @returns { TimePickerAttribute } the attribute of the time picker - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - loop(isLoop: Optional): TimePickerAttribute; - /** - * Sets the text style of disappearing items + * Defines TimePickerDialog which uses show method to show TimePicker dialog. * - * @param { PickerTextStyle } value - indicates the text style of disappearing items. - * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the text style of disappearing items + * Defines TimePickerDialog which uses show method to show TimePicker dialog. * - * @param { PickerTextStyle } value - indicates the text style of disappearing items. - * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - disappearTextStyle(value: PickerTextStyle): TimePickerAttribute; - + declare class TimePickerDialog { + /** + * Invoking method display. + * + * @param { TimePickerDialogOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 8 + */ + /** + * Invoking method display. + * + * @param { TimePickerDialogOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * Invoking method display. + * + * @param { TimePickerDialogOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 11 + * @deprecated since 18 + * @useinstead ohos.arkui.UIContext.UIContext#showTimePickerDialog + */ + static show(options?: TimePickerDialogOptions); + } + /** - * Sets the text style of disappearing items + * Defines TimePicker Component. * - * @param { Optional } style - indicates the text style of disappearing items. - * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - disappearTextStyle(style: Optional): TimePickerAttribute; - + * @since 8 + */ /** - * Sets the text style of normal items + * Defines TimePicker Component. * - * @param { PickerTextStyle } value - indicates the text style of normal items. - * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Sets the text style of normal items + * Defines TimePicker Component. * - * @param { PickerTextStyle } value - indicates the text style of normal items. - * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - textStyle(value: PickerTextStyle): TimePickerAttribute; - - /** - * Sets the text style of normal items - * - * @param { Optional } style - indicates the text style of normal items. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - textStyle(style: Optional): TimePickerAttribute; - + declare const TimePicker: TimePickerInterface; + /** - * Sets the text style of selected items + * Defines TimePicker Component instance. * - * @param { PickerTextStyle } value - indicates the text style of selected items. - * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 + * @since 8 */ /** - * Sets the text style of selected items + * Defines TimePicker Component instance. * - * @param { PickerTextStyle } value - indicates the text style of selected items. - * @returns { TimePickerAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ - selectedTextStyle(value: PickerTextStyle): TimePickerAttribute; - - /** - * Sets the text style of selected items - * - * @param { Optional } style - indicates the text style of selected items. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedTextStyle(style: Optional): TimePickerAttribute; - /** - * Set time format + * Defines TimePicker Component instance. * - * @param { DateTimeOptions } value - indicates the format of the time display. - * @returns { TimePickerAttribute } the attribute of the time picker * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - dateTimeOptions(value: DateTimeOptions): TimePickerAttribute; - - /** - * Set time format - * - * @param { Optional } timeFormat - indicates the format of the time display. - * @returns { TimePickerAttribute } the attribute of the time picker - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - dateTimeOptions(timeFormat: Optional): TimePickerAttribute; - - /** - * This event is triggered when a TimePicker time is selected. - * - * @param { function } callback - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * This event is triggered when a TimePicker time is selected. - * - * @param { function } callback - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * This event is triggered when a TimePicker time is selected. - * - * @param { function } callback - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - onChange(callback: (value: TimePickerResult) => void): TimePickerAttribute; - - /** - * This event is triggered when a TimePicker time is selected. - * - * @param { Optional } callback - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onChange(callback: Optional): TimePickerAttribute; - - /** - * This event is triggered when an item enters the selected area. - * - * @param { Callback } callback - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onEnterSelectedArea(callback: Callback): TimePickerAttribute; - - /** - * Enable or disable haptic feedback. - * - * @param { boolean } enable - Default value is true, set false to disable haptic feedback. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableHapticFeedback(enable: boolean): TimePickerAttribute; - - /** - * Enable or disable haptic feedback. - * - * @param { Optional } enable - Default value is true, set false to disable haptic feedback. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableHapticFeedback(enable: Optional): TimePickerAttribute; - - /** - * If the attribute is set, the crown rotation sensitivity can be changed. - * - * @param { Optional } sensitivity - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - digitalCrownSensitivity(sensitivity: Optional): TimePickerAttribute; - - /** - * Defines whether the AM/PM option is cascaded with the time in 12-hour mode. - * - * @param { boolean } enabled - Default value is false, set true to enable. - * @returns { TimePickerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableCascade(enabled: boolean): TimePickerAttribute; -} - -/** - * Defines the TimePickerDialogOptions for Data Picker Dialog. - * - * @extends TimePickerOptions - * @interface TimePickerDialogOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines the TimePickerDialogOptions for Data Picker Dialog. - * - * @extends TimePickerOptions - * @interface TimePickerDialogOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the TimePickerDialogOptions for Data Picker Dialog. - * - * @extends TimePickerOptions - * @interface TimePickerDialogOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface TimePickerDialogOptions extends TimePickerOptions { - /** - * Time Selector: indicates whether to display the 24-hour clock. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Time Selector: indicates whether to display the 24-hour clock. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Time Selector: indicates whether to display the 24-hour clock. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - useMilitaryTime?: boolean; - - /** - * Text style of disappearing items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Text style of disappearing items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - disappearTextStyle?: PickerTextStyle; - - /** - * Text style of normal items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Text style of normal items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - textStyle?: PickerTextStyle; - - /** - * Style of accept button. - * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - acceptButtonStyle?: PickerDialogButtonStyle; - - /** - * Style of cancel button. - * - * @type { ?PickerDialogButtonStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - cancelButtonStyle?: PickerDialogButtonStyle; - - /** - * Text style of selected items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Text style of selected items - * - * @type { ?PickerTextStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedTextStyle?: PickerTextStyle; - - /** - * Mask Region of dialog. The size cannot exceed the main window. - * - * @type { ?Rectangle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Mask Region of dialog. The size cannot exceed the main window. - * - * @type { ?Rectangle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - maskRect?: Rectangle; - - /** - * Defines the dialog alignment of the screen. - * - * @type { ?DialogAlignment } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Defines the dialog alignment of the screen. - * - * @type { ?DialogAlignment } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - alignment?: DialogAlignment; - - /** - * Defines the dialog offset. - * - * @type { ?Offset } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Defines the dialog offset. - * - * @type { ?Offset } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - offset?: Offset; - - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the OK button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - onAccept?: (value: TimePickerResult) => void; - - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the Cancel button in the dialog is clicked. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - onCancel?: () => void; - - /** - * This event is triggered when a TimePicker Time or time is selected in dialog. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * This event is triggered when a TimePicker Time or time is selected in dialog. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * This event is triggered when a TimePicker Time or time is selected in dialog. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - onChange?: (value: TimePickerResult) => void; - - /** - * This event is triggered when an item enters the selected area in dialog. - * - * @type { ?Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onEnterSelectedArea?: Callback; - - /** - * Defines the timePickerDialog's background color - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Defines the timePickerDialog's background color - * - * @type { ?ResourceColor } - * @default Color.Transparent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - backgroundColor?: ResourceColor; - - /** - * Defines the timePickerDialog's background blur Style - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Defines the timePickerDialog's background blur Style - * - * @type { ?BlurStyle } - * @default BlurStyle.COMPONENT_ULTRA_THICK - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - backgroundBlurStyle?: BlurStyle; - - /** - * Defines the timePickerDialog's background blur style with options - * - * @type { ?BackgroundBlurStyleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 - */ - backgroundBlurStyleOptions?: BackgroundBlurStyleOptions; - - /** - * Defines the timePickerDialog's background effect with options - * - * @type { ?BackgroundEffectOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 - */ - backgroundEffect?: BackgroundEffectOptions; - - /** - * Defines whether the AM/PM option is cascaded with the time in 12-hour mode. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableCascade?: boolean; - - /** - * Callback function when the dialog appears. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - onDidAppear?: () => void; - - /** - * Callback function when the dialog disappears. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - onDidDisappear?: () => void; - - /** - * Callback function before the dialog openAnimation starts. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - onWillAppear?: () => void; - - /** - * Callback function before the dialog closeAnimation starts. - * - * @type { ?function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - onWillDisappear?: () => void; - - /** - * Defines the dialog's shadow. - * - * @type { ?(ShadowOptions | ShadowStyle) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - shadow?: ShadowOptions | ShadowStyle; - - /** - * Set time format - * - * @type { ?DateTimeOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - dateTimeOptions?: DateTimeOptions; - - /** - * Defines whether to respond to the hover mode. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableHoverMode?: boolean; - - /** - * Defines the dialog's display area in hover mode. - * - * @type { ?HoverModeAreaType } - * @default HoverModeAreaType.BOTTOM_SCREEN - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 - */ - hoverModeArea?: HoverModeAreaType; - - /** - * Enable or disable haptic feedback. - * - * @type { ?boolean } - * @default true - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableHapticFeedback?: boolean; -} - -/** - * Defines TimePickerDialog which uses show method to show TimePicker dialog. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines TimePickerDialog which uses show method to show TimePicker dialog. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines TimePickerDialog which uses show method to show TimePicker dialog. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class TimePickerDialog { - /** - * Invoking method display. - * - * @param { TimePickerDialogOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Invoking method display. - * - * @param { TimePickerDialogOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Invoking method display. - * - * @param { TimePickerDialogOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.UIContext#showTimePickerDialog - */ - static show(options?: TimePickerDialogOptions); -} - -/** - * Defines TimePicker Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines TimePicker Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines TimePicker Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare const TimePicker: TimePickerInterface; - -/** - * Defines TimePicker Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ -/** - * Defines TimePicker Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines TimePicker Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare const TimePickerInstance: TimePickerAttribute; + declare const TimePickerInstance: TimePickerAttribute; + \ No newline at end of file diff --git a/api/@internal/component/ets/toggle.d.ts b/api/@internal/component/ets/toggle.d.ts index 4f1a07f3087dbbb03d2c1e70df48c4d01c473a5b..048a22ffe340a6b02f31abd6550ff85095ff2bc0 100644 --- a/api/@internal/component/ets/toggle.d.ts +++ b/api/@internal/component/ets/toggle.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Resource } from '../../global/resource'; -import { ResourceColor } from './units'; -import { CommonConfiguration, Callback, CommonMethod, ContentModifier, Bindable } from './common'; -/*** endif */ - /** * Declare the type of status button * @@ -56,8 +50,7 @@ import { CommonConfiguration, Callback, CommonMethod, ContentModifier, Bindable * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum ToggleType { /** @@ -88,8 +81,7 @@ declare enum ToggleType { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Checkbox, @@ -121,8 +113,7 @@ declare enum ToggleType { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Switch, @@ -154,8 +145,7 @@ declare enum ToggleType { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Button, } @@ -167,8 +157,7 @@ declare enum ToggleType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface SwitchStyle { /** @@ -178,8 +167,7 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pointRadius?: number | Resource; @@ -190,8 +178,7 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ unselectedColor?: ResourceColor; @@ -202,8 +189,7 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pointColor?: ResourceColor; @@ -214,8 +200,7 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ trackBorderRadius?: number | Resource; } @@ -228,8 +213,7 @@ declare interface SwitchStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface ToggleConfiguration extends CommonConfiguration { @@ -240,8 +224,7 @@ declare interface ToggleConfiguration extends CommonConfiguration; } @@ -278,8 +259,7 @@ declare interface ToggleConfiguration extends CommonConfiguration) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - isOn?: boolean | undefined | Bindable } /** @@ -423,8 +389,8 @@ declare interface ToggleOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface ToggleInterface { /** @@ -475,8 +441,7 @@ interface ToggleInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ (options: ToggleOptions): ToggleAttribute; } @@ -513,8 +478,8 @@ interface ToggleInterface { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class ToggleAttribute extends CommonMethod { /** @@ -553,8 +518,7 @@ declare class ToggleAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ onChange(callback: (isOn: boolean) => void): ToggleAttribute; @@ -566,8 +530,7 @@ declare class ToggleAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ contentModifier(modifier: ContentModifier): ToggleAttribute; @@ -607,8 +570,7 @@ declare class ToggleAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ selectedColor(value: ResourceColor): ToggleAttribute; @@ -648,8 +610,7 @@ declare class ToggleAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ switchPointColor(color: ResourceColor): ToggleAttribute; @@ -661,8 +622,7 @@ declare class ToggleAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ switchStyle(value: SwitchStyle): ToggleAttribute; } @@ -696,6 +656,7 @@ declare class ToggleAttribute extends CommonMethod { * @form * @atomicservice * @since 11 + * @noninterop */ declare const Toggle: ToggleInterface; @@ -728,5 +689,6 @@ declare const Toggle: ToggleInterface; * @form * @atomicservice * @since 11 + * @noninterop */ declare const ToggleInstance: ToggleAttribute; diff --git a/api/@internal/component/ets/ui_extension_component.d.ts b/api/@internal/component/ets/ui_extension_component.d.ts index 7637cdeaaaa74c343b90d4093d29fa37a8b0b3e8..513a4f2058bf41b715272884688e4481d738525f 100644 --- a/api/@internal/component/ets/ui_extension_component.d.ts +++ b/api/@internal/component/ets/ui_extension_component.d.ts @@ -18,21 +18,13 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import Want from '../../@ohos.app.ability.Want' -import { Callback, ErrorCallback, BusinessError } from '../../@ohos.base' -import { CommonMethod, TerminationInfo } from './common' -import { ComponentContent } from '../ComponentContent' -/*** endif */ - /** * Enumeration of different types of DpiFollowStrategy. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum DpiFollowStrategy { /** @@ -40,8 +32,7 @@ declare enum DpiFollowStrategy { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ FOLLOW_HOST_DPI = 0, @@ -50,8 +41,7 @@ declare enum DpiFollowStrategy { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ FOLLOW_UI_EXTENSION_ABILITY_DPI = 1, } @@ -61,25 +51,21 @@ declare enum DpiFollowStrategy { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare enum WindowModeFollowStrategy { /** * Followed the host Window Mode. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ FOLLOW_HOST_WINDOW_MODE = 0, - /** * Followed the UIExtensionAbility. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ FOLLOW_UI_EXTENSION_ABILITY_WINDOW_MODE = 1 } @@ -90,8 +76,7 @@ declare enum WindowModeFollowStrategy { * @interface UIExtensionOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface UIExtensionOptions { /** @@ -102,8 +87,7 @@ declare interface UIExtensionOptions { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ isTransferringCaller?: boolean; @@ -114,8 +98,7 @@ declare interface UIExtensionOptions { * @type { ?ComponentContent } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ placeholder?: ComponentContent; @@ -127,8 +110,7 @@ declare interface UIExtensionOptions { * @type { ?Record } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ areaChangePlaceholder?: Record; @@ -139,8 +121,7 @@ declare interface UIExtensionOptions { * @default DpiFollowStrategy.FOLLOW_UI_EXTENSION_ABILITY_DPI * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ dpiFollowStrategy?: DpiFollowStrategy; @@ -150,8 +131,7 @@ declare interface UIExtensionOptions { * @default WindowModeFollowStrategy.FOLLOW_UI_EXTENSION_ABILITY_WINDOW_MODE * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ windowModeFollowStrategy?: WindowModeFollowStrategy; } @@ -196,18 +176,6 @@ declare interface TerminationInfo { * @since 18 */ declare type ReceiveCallback = import('../api/@ohos.base').Callback>; - -/** - * Get Callback from @ohos.base. - * - * @typedef { Callback> } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - * @arkts 1.2 - */ -type ReceiveCallback = Callback>; - /** * This interface is used for send data to the UIExtensionAbility.
* It is returned from onRemoteReady callback of UIExtensionComponent
@@ -216,8 +184,7 @@ type ReceiveCallback = Callback>; * @interface UIExtensionProxy * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ declare interface UIExtensionProxy { /** @@ -235,8 +202,7 @@ declare interface UIExtensionProxy { * @param { Record } data * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ send(data: Record): void; @@ -261,8 +227,7 @@ declare interface UIExtensionProxy { * @throws { BusinessError } 100012 - Transferring data failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ sendSync(data: Record): Record; @@ -283,8 +248,7 @@ declare interface UIExtensionProxy { * @param { Callback } callback - Callback of the listened event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ on(type: 'asyncReceiverRegister', callback: Callback): void; @@ -305,8 +269,7 @@ declare interface UIExtensionProxy { * @param { Callback } callback - Callback of the listened event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ on(type: 'syncReceiverRegister', callback: Callback): void; @@ -327,8 +290,7 @@ declare interface UIExtensionProxy { * @param { Callback } [callback] - Callback of the listened event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ off(type: 'asyncReceiverRegister', callback?: Callback): void; @@ -349,8 +311,7 @@ declare interface UIExtensionProxy { * @param { Callback } [callback] - Callback of the listened event. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ off(type: 'syncReceiverRegister', callback?: Callback): void; } @@ -362,8 +323,8 @@ declare interface UIExtensionProxy { * @interface UIExtensionComponentInterface * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 + * @noninterop */ interface UIExtensionComponentInterface { /** @@ -391,24 +352,6 @@ interface UIExtensionComponentInterface { want: import('../api/@ohos.app.ability.Want').default, options?: UIExtensionOptions ): UIExtensionComponentAttribute; - - /** - * Construct the UIExtensionComponent.
- * Called when the UIExtensionComponent is used. - * - * @param { Want } want - indicates the want of UIExtensionAbility - * @param { UIExtensionOptions } [options] - Construction configuration of UIExtensionComponentAttribute - * @returns { UIExtensionComponentAttribute } - * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - * @arkts 1.2 - */ - ( - want: Want, - options?: UIExtensionOptions - ): UIExtensionComponentAttribute; } /** @@ -417,8 +360,8 @@ interface UIExtensionComponentInterface { * @extends CommonMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 + * @noninterop */ declare class UIExtensionComponentAttribute extends CommonMethod { /** @@ -433,21 +376,6 @@ declare class UIExtensionComponentAttribute extends CommonMethod ): UIExtensionComponentAttribute; - - /** - * callback called when remote UIExtensionAbility object is ready for receive data - * - * @param { Callback } callback - * @returns { UIExtensionComponentAttribute } - * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - * @arkts 1.2 - */ - onRemoteReady( - callback: Callback - ): UIExtensionComponentAttribute; /** * @param { import('../api/@ohos.base').Callback<{ [key: string]: Object }> } callback @@ -464,8 +392,7 @@ declare class UIExtensionComponentAttribute extends CommonMethod } callback - * @returns { UIExtensionComponentAttribute } - * @throws { BusinessError } 202 - Non-system applications are not allowed to use system APIs. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - * @arkts 1.2 - */ - onError( - callback: ErrorCallback - ): UIExtensionComponentAttribute; /** * Called when the provider of the embedded UI is terminated. @@ -535,8 +447,7 @@ declare class UIExtensionComponentAttribute extends CommonMethod): UIExtensionComponentAttribute; @@ -546,8 +457,7 @@ declare class UIExtensionComponentAttribute extends CommonMethod): UIExtensionComponentAttribute; } @@ -558,6 +468,7 @@ declare class UIExtensionComponentAttribute extends CommonMethod void; @@ -2093,19 +1903,6 @@ declare type VoidCallback = () => void; */ declare type LengthMetricsUnit = import('../api/arkui/Graphics').LengthMetricsUnit; -/** - * Defines length metrics unit. - * - * @typedef { _LengthMetricsUnit } LengthMetricsUnit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare type LengthMetricsUnit = _LengthMetricsUnit; - /** * Defines LengthMetrics. * @@ -2117,18 +1914,6 @@ declare type LengthMetricsUnit = _LengthMetricsUnit; */ declare type LengthMetrics = import('../api/arkui/Graphics').LengthMetrics; -/** - * Defines LengthMetrics. - * - * @typedef { _LengthMetrics } LengthMetrics - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare type LengthMetrics = _LengthMetrics; - /** * Defines ColorMetrics. * @@ -2140,18 +1925,6 @@ declare type LengthMetrics = _LengthMetrics; */ declare type ColorMetrics = import('../api/arkui/Graphics').ColorMetrics; -/** - * Defines ColorMetrics. - * - * @typedef { _ColorMetrics } ColorMetrics - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare type ColorMetrics = _ColorMetrics; - /** * Defines the font used for text. * @@ -2174,8 +1947,7 @@ declare type ColorMetrics = _ColorMetrics; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface Font { /** @@ -2200,8 +1972,7 @@ declare interface Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ size?: Length; @@ -2227,8 +1998,7 @@ declare interface Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ weight?: FontWeight | number | string; @@ -2254,8 +2024,7 @@ declare interface Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ family?: string | Resource; @@ -2281,8 +2050,7 @@ declare interface Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ style?: FontStyle; } @@ -2319,8 +2087,7 @@ declare interface Font { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface Area { /** @@ -2355,8 +2122,7 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ width: Length; @@ -2392,8 +2158,7 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ height: Length; @@ -2429,8 +2194,7 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ position: Position; @@ -2466,8 +2230,7 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ globalPosition: Position; } @@ -2504,8 +2267,7 @@ declare interface Area { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface Position { /** @@ -2540,8 +2302,7 @@ declare interface Position { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ x?: Length; @@ -2577,8 +2338,7 @@ declare interface Position { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ y?: Length; } @@ -2590,8 +2350,7 @@ declare interface Position { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface LocalizedPosition { /** @@ -2601,8 +2360,7 @@ declare interface LocalizedPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ start?: LengthMetrics; @@ -2613,8 +2371,7 @@ declare interface LocalizedPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ top?: LengthMetrics; } @@ -2627,8 +2384,7 @@ declare interface LocalizedPosition { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface Edges { /** @@ -2639,8 +2395,7 @@ declare interface Edges { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ top?: Dimension; @@ -2652,8 +2407,7 @@ declare interface Edges { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ left?: Dimension; @@ -2665,8 +2419,7 @@ declare interface Edges { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ bottom?: Dimension; @@ -2678,8 +2431,7 @@ declare interface Edges { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ right?: Dimension; } @@ -2691,8 +2443,7 @@ declare interface Edges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface LocalizedEdges { /** @@ -2702,8 +2453,7 @@ declare interface LocalizedEdges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ top?: LengthMetrics; @@ -2714,8 +2464,7 @@ declare interface LocalizedEdges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ start?: LengthMetrics; @@ -2726,8 +2475,7 @@ declare interface LocalizedEdges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ bottom?: LengthMetrics; @@ -2738,8 +2486,7 @@ declare interface LocalizedEdges { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ end?: LengthMetrics; } @@ -2761,8 +2508,7 @@ declare interface LocalizedEdges { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface Bias { /** @@ -2784,8 +2530,7 @@ declare interface Bias { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ horizontal?: number; @@ -2808,8 +2553,7 @@ declare interface Bias { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ vertical?: number; } @@ -2846,8 +2590,7 @@ declare interface Bias { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface ConstraintSizeOptions { /** @@ -2882,8 +2625,7 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ minWidth?: Length; @@ -2919,8 +2661,7 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maxWidth?: Length; @@ -2956,8 +2697,7 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ minHeight?: Length; @@ -2993,8 +2733,7 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ maxHeight?: Length; } @@ -3031,8 +2770,7 @@ declare interface ConstraintSizeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface SizeOptions { /** @@ -3067,8 +2805,7 @@ declare interface SizeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ width?: Length; @@ -3104,8 +2841,7 @@ declare interface SizeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ height?: Length; } @@ -3152,8 +2888,7 @@ declare interface SizeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface BorderOptions { /** @@ -3198,8 +2933,7 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ width?: EdgeWidths | Length | LocalizedEdgeWidths; @@ -3245,8 +2979,7 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ color?: EdgeColors | ResourceColor | LocalizedEdgeColors; @@ -3292,8 +3025,7 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ radius?: BorderRadiuses | Length | LocalizedBorderRadiuses; @@ -3329,8 +3061,7 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ style?: EdgeStyles | BorderStyle; @@ -3341,8 +3072,7 @@ declare interface BorderOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ dashGap?: EdgeWidths | LengthMetrics | LocalizedEdgeWidths; @@ -3353,8 +3083,7 @@ declare interface BorderOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ dashWidth?: EdgeWidths | LengthMetrics | LocalizedEdgeWidths; } @@ -3376,8 +3105,7 @@ declare interface BorderOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface OutlineOptions { /** @@ -3397,8 +3125,7 @@ declare interface OutlineOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ width?: EdgeOutlineWidths | Dimension; @@ -3419,8 +3146,7 @@ declare interface OutlineOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ color?: EdgeColors | ResourceColor | LocalizedEdgeColors; @@ -3441,8 +3167,7 @@ declare interface OutlineOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ radius?: OutlineRadiuses | Dimension; @@ -3463,8 +3188,7 @@ declare interface OutlineOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ style?: EdgeOutlineStyles | OutlineStyle; } @@ -3484,8 +3208,7 @@ declare interface OutlineOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface MarkStyle { /** @@ -3503,8 +3226,7 @@ declare interface MarkStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeColor?: ResourceColor; @@ -3523,8 +3245,7 @@ declare interface MarkStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ size?: Length; @@ -3543,8 +3264,7 @@ declare interface MarkStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ strokeWidth?: Length; } @@ -3571,8 +3291,7 @@ declare interface MarkStyle { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class ColorFilter { /** @@ -3600,8 +3319,7 @@ declare class ColorFilter { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(value: number[]); } @@ -3628,8 +3346,7 @@ declare class ColorFilter { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface TouchPoint { /** @@ -3654,8 +3371,7 @@ declare interface TouchPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ x: Dimension; @@ -3681,8 +3397,7 @@ declare interface TouchPoint { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ y: Dimension; } @@ -3695,8 +3410,7 @@ declare interface TouchPoint { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface DirectionalEdgesT { /** @@ -3707,8 +3421,7 @@ declare interface DirectionalEdgesT { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ start: T; @@ -3720,8 +3433,7 @@ declare interface DirectionalEdgesT { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ end: T; @@ -3733,8 +3445,7 @@ declare interface DirectionalEdgesT { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ top: T; @@ -3746,8 +3457,7 @@ declare interface DirectionalEdgesT { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ bottom: T; } @@ -3759,8 +3469,7 @@ declare interface DirectionalEdgesT { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface DividerStyleOptions { /** @@ -3770,8 +3479,7 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ strokeWidth?: LengthMetrics; @@ -3782,8 +3490,7 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ color?: ResourceColor; @@ -3794,8 +3501,7 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ startMargin?: LengthMetrics; @@ -3806,8 +3512,7 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ endMargin?: LengthMetrics; @@ -3818,8 +3523,7 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ mode?: DividerMode; } @@ -3831,8 +3535,7 @@ declare interface DividerStyleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ declare interface ChainWeightOptions { /** @@ -3842,8 +3545,7 @@ declare interface ChainWeightOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ horizontal?: number; @@ -3854,8 +3556,7 @@ declare interface ChainWeightOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ vertical?: number; } @@ -3867,8 +3568,7 @@ declare interface ChainWeightOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ declare interface AccessibilityOptions { /** @@ -3878,8 +3578,7 @@ declare interface AccessibilityOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'14','1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 */ accessibilityPreferred?: boolean; } diff --git a/api/@internal/component/ets/video.d.ts b/api/@internal/component/ets/video.d.ts index 29a25dc16743033c5824d1d324b695d0ff27076b..e1bb093a2ec9fa3f4b4ddef7602669459adb02b4 100644 --- a/api/@internal/component/ets/video.d.ts +++ b/api/@internal/component/ets/video.d.ts @@ -18,14 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Resource } from '../../global/resource'; -import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon'; -import { ImageFit } from './enums'; -import { CommonMethod, Callback, PixelMap } from './common'; -import { VoidCallback, ColorMetrics } from './units'; -/*** endif */ - /** * Seek mode. * @@ -48,8 +40,7 @@ import { VoidCallback, ColorMetrics } from './units'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum SeekMode { /** @@ -71,8 +62,7 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ PreviousKeyframe, @@ -95,8 +85,7 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ NextKeyframe, @@ -119,8 +108,7 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ ClosestKeyframe, @@ -143,8 +131,7 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Accurate, } @@ -171,8 +158,7 @@ declare enum SeekMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare enum PlaybackSpeed { /** @@ -194,8 +180,7 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Speed_Forward_0_75_X, @@ -218,8 +203,7 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Speed_Forward_1_00_X, @@ -242,8 +226,7 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Speed_Forward_1_25_X, @@ -266,8 +249,7 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Speed_Forward_1_75_X, @@ -290,8 +272,7 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ Speed_Forward_2_00_X, } @@ -303,8 +284,7 @@ declare enum PlaybackSpeed { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface FullscreenInfo { /** @@ -331,8 +311,7 @@ interface FullscreenInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ fullscreen: boolean; } @@ -344,8 +323,7 @@ interface FullscreenInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface PreparedInfo { /** @@ -372,8 +350,7 @@ interface PreparedInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ duration: number; } @@ -385,8 +362,7 @@ interface PreparedInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface PlaybackInfo { /** @@ -413,8 +389,7 @@ interface PlaybackInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ time: number; } @@ -425,8 +400,7 @@ interface PlaybackInfo { * @interface PosterOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare interface PosterOptions { /** @@ -436,8 +410,7 @@ declare interface PosterOptions { * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ showFirstFrame?: boolean; } @@ -473,8 +446,7 @@ declare interface PosterOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface VideoOptions { /** @@ -499,8 +471,7 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ src?: string | Resource; @@ -526,8 +497,7 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ currentProgressRate?: number | string | PlaybackSpeed; @@ -553,8 +523,7 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ previewUri?: string | PixelMap | Resource; @@ -580,8 +549,7 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ controller?: VideoController; @@ -591,8 +559,7 @@ declare interface VideoOptions { * @type { ?ImageAIOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ imageAIOptions?: ImageAIOptions; @@ -602,8 +569,7 @@ declare interface VideoOptions { * @type { ?PosterOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ posterOptions?: PosterOptions; } @@ -627,8 +593,7 @@ declare interface VideoOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare class VideoController { /** @@ -650,8 +615,7 @@ declare class VideoController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ constructor(); @@ -678,17 +642,6 @@ declare class VideoController { */ start(); - /** - * Provides events to play. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - start(): void; - /** * Provides a pause event for playback. * @@ -712,17 +665,6 @@ declare class VideoController { */ pause(); - /** - * Provides a pause event for playback. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - pause(): void; - /** * Provides an event to stop playback. * @@ -746,17 +688,6 @@ declare class VideoController { */ stop(); - /** - * Provides an event to stop playback. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - stop(): void; - /** * Provide the progress method of video playback. * @@ -783,18 +714,6 @@ declare class VideoController { */ setCurrentTime(value: number); - /** - * Provide the progress method of video playback. - * - * @param { number } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - setCurrentTime(value: number): void; - /** * Provides a full screen playback method. * @@ -821,18 +740,6 @@ declare class VideoController { */ requestFullscreen(value: boolean); - /** - * Provides a full screen playback method. - * - * @param { boolean } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - requestFullscreen(value: boolean): void; - /** * Provides a method to exit full screen playback. * @@ -856,17 +763,6 @@ declare class VideoController { */ exitFullscreen(); - /** - * Provides a method to exit full screen playback. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - exitFullscreen(): void; - /** * Provide the progress method of video playback. * @@ -896,26 +792,12 @@ declare class VideoController { */ setCurrentTime(value: number, seekMode: SeekMode); - /** - * Provide the progress method of video playback. - * - * @param { number } value - * @param { SeekMode } seekMode - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - setCurrentTime(value: number, seekMode: SeekMode): void; - /** * Provide the reset method of video playback. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ reset(): void; } @@ -942,8 +824,8 @@ declare class VideoController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface VideoInterface { /** @@ -971,8 +853,7 @@ interface VideoInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (value: VideoOptions): VideoAttribute; } @@ -999,8 +880,8 @@ interface VideoInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class VideoAttribute extends CommonMethod { /** @@ -1028,8 +909,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ muted(value: boolean): VideoAttribute; @@ -1058,8 +938,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ autoPlay(value: boolean): VideoAttribute; @@ -1088,8 +967,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ controls(value: boolean): VideoAttribute; @@ -1118,8 +996,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ loop(value: boolean): VideoAttribute; @@ -1148,8 +1025,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ objectFit(value: ImageFit): VideoAttribute; @@ -1189,8 +1065,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onStart(event: VoidCallback): VideoAttribute; @@ -1230,8 +1105,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onPause(event: VoidCallback): VideoAttribute; @@ -1271,8 +1145,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onFinish(event: VoidCallback): VideoAttribute; @@ -1312,8 +1185,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onFullscreenChange(callback: Callback): VideoAttribute; @@ -1353,8 +1225,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onPrepared(callback: Callback): VideoAttribute; @@ -1394,8 +1265,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onSeeking(callback: Callback): VideoAttribute; @@ -1435,8 +1305,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onSeeked(callback: Callback): VideoAttribute; @@ -1476,8 +1345,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onUpdate(callback: Callback): VideoAttribute; @@ -1519,19 +1387,6 @@ declare class VideoAttribute extends CommonMethod { * @since 20 */ onError(event: VoidCallback | import('../api/@ohos.base').ErrorCallback): VideoAttribute; - - /** - * Called when playback fails. - * - * @param { function } event - * @returns { VideoAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onError(event: () => void): VideoAttribute; /** * Called when the video is stopped. @@ -1541,8 +1396,7 @@ declare class VideoAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onStop(event: Callback): VideoAttribute; @@ -1553,8 +1407,7 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableAnalyzer(enable: boolean): VideoAttribute; @@ -1565,8 +1418,7 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ analyzerConfig(config: ImageAnalyzerConfig): VideoAttribute; @@ -1577,8 +1429,7 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ surfaceBackgroundColor(color: ColorMetrics): VideoAttribute; @@ -1593,8 +1444,7 @@ declare class VideoAttribute extends CommonMethod { * @returns { VideoAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ enableShortcutKey(enabled: boolean): VideoAttribute; } @@ -1619,6 +1469,7 @@ declare class VideoAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Video: VideoInterface; @@ -1642,5 +1493,6 @@ declare const Video: VideoInterface; * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const VideoInstance: VideoAttribute; diff --git a/api/@internal/component/ets/water_flow.d.ts b/api/@internal/component/ets/water_flow.d.ts index 05823f127d14451bde0c7822aa389ccb91a70e29..8c8a90fa55755786a728fd9b4ffa098e3d0d5a33 100644 --- a/api/@internal/component/ets/water_flow.d.ts +++ b/api/@internal/component/ets/water_flow.d.ts @@ -18,16 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ScrollableCommonMethod, NestedScrollOptions, CommonMethod, Optional, OnWillScrollCallback, OnScrollCallback } from './common'; -import { CustomBuilder } from './builder' -import { Length, Dimension, Margin, ConstraintSizeOptions, Resource } from './units'; -import { Scroller, OnScrollFrameBeginCallback } from './scroll'; -import { ScrollState } from './list' -import { FlexDirection } from './enums' -import { ComponentContent } from '../../arkui/ComponentContent' -/*** endif */ - /** * function that returns item main size by index. * @@ -37,8 +27,7 @@ import { ComponentContent } from '../../arkui/ComponentContent' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare type GetItemMainSizeByIndex = (index: number) => number; @@ -48,8 +37,7 @@ declare type GetItemMainSizeByIndex = (index: number) => number; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class SectionOptions { /** @@ -60,8 +48,7 @@ declare class SectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ itemsCount: number; @@ -74,8 +61,7 @@ declare class SectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ crossCount?: number; @@ -96,8 +82,7 @@ declare class SectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onGetItemMainSizeByIndex?: GetItemMainSizeByIndex; @@ -110,8 +95,7 @@ declare class SectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ columnsGap?: Dimension; @@ -124,8 +108,7 @@ declare class SectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ rowsGap?: Dimension; @@ -137,8 +120,7 @@ declare class SectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ margin?: Margin | Dimension; } @@ -149,8 +131,7 @@ declare class SectionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class WaterFlowSections { /** @@ -159,8 +140,7 @@ declare class WaterFlowSections { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(); @@ -184,8 +164,7 @@ declare class WaterFlowSections { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ splice(start: number, deleteCount?: number, sections?: Array): boolean; @@ -197,8 +176,7 @@ declare class WaterFlowSections { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ push(section: SectionOptions): boolean; @@ -214,8 +192,7 @@ declare class WaterFlowSections { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ update(sectionIndex:number, section: SectionOptions): boolean; @@ -226,8 +203,7 @@ declare class WaterFlowSections { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ values(): Array; @@ -238,8 +214,7 @@ declare class WaterFlowSections { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ length(): number; } @@ -251,8 +226,7 @@ declare class WaterFlowSections { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare enum WaterFlowLayoutMode { /** @@ -262,8 +236,7 @@ declare enum WaterFlowLayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ALWAYS_TOP_DOWN = 0, @@ -287,8 +260,7 @@ declare enum WaterFlowLayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ SLIDING_WINDOW = 1, } @@ -315,8 +287,7 @@ declare enum WaterFlowLayoutMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare interface WaterFlowOptions { /** @@ -341,8 +312,7 @@ declare interface WaterFlowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ footer?: CustomBuilder; @@ -353,8 +323,7 @@ declare interface WaterFlowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ footerContent?: ComponentContent; @@ -384,8 +353,7 @@ declare interface WaterFlowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scroller?: Scroller; @@ -401,8 +369,7 @@ declare interface WaterFlowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ sections?: WaterFlowSections; @@ -414,8 +381,7 @@ declare interface WaterFlowOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ layoutMode?: WaterFlowLayoutMode; } @@ -501,8 +467,8 @@ declare type OnWaterFlowScrollIndexCallback = (first: number, last: number) => v * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ interface WaterFlowInterface { /** @@ -530,8 +496,7 @@ interface WaterFlowInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ (options?: WaterFlowOptions): WaterFlowAttribute; } @@ -558,8 +523,8 @@ interface WaterFlowInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @noninterop */ declare class WaterFlowAttribute extends ScrollableCommonMethod { /** @@ -587,8 +552,7 @@ declare class WaterFlowAttribute extends ScrollableCommonMethod void): WaterFlowAttribute; - - /** - * Called when the scrollable will scroll. - * - * @param { Optional } handler - callback of scrollable. - * @returns { WaterFlowAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onWillScroll(handler: Optional): WaterFlowAttribute; - - /** - * Called when the scrollable did scroll. - * - * @param { OnScrollCallback } handler - callback of scrollable, - * scrollOffset is offset this frame did scroll, scrollState is current scroll state. - * @returns { WaterFlowAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - onDidScroll(handler: OnScrollCallback): WaterFlowAttribute; } /** @@ -1025,6 +955,7 @@ declare class WaterFlowAttribute extends ScrollableCommonMethod { /** @@ -8366,6 +8384,7 @@ declare class WebAttribute extends CommonMethod { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 20 + * @arkts 1.1&1.2 */ onLoadStarted(callback: Callback): WebAttribute; @@ -8380,6 +8399,7 @@ declare class WebAttribute extends CommonMethod { * @returns { WebAttribute } * @syscap SystemCapability.Web.Webview.Core * @since 20 + * @arkts 1.1&1.2 */ onLoadFinished(callback: Callback): WebAttribute; @@ -10812,6 +10832,7 @@ declare class WebAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 11 + * @noninterop */ declare const Web: WebInterface; @@ -10827,6 +10848,7 @@ declare const Web: WebInterface; * @syscap SystemCapability.Web.Webview.Core * @atomicservice * @since 11 + * @noninterop */ declare const WebInstance: WebAttribute; diff --git a/api/@internal/component/ets/window_scene.d.ts b/api/@internal/component/ets/window_scene.d.ts index 032103b5187f7a1f71d7e0030ae7e7eaefeb4961..ae1d897fd86192af22a831658ab3f96a6583648d 100644 --- a/api/@internal/component/ets/window_scene.d.ts +++ b/api/@internal/component/ets/window_scene.d.ts @@ -31,6 +31,7 @@ import { CommonMethod } from './common' * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ interface WindowSceneInterface { /** @@ -54,6 +55,7 @@ interface WindowSceneInterface { * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 + * @noninterop */ declare class WindowSceneAttribute extends CommonMethod { /** @@ -78,6 +80,7 @@ declare class WindowSceneAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 10 + * @noninterop */ declare const WindowScene: WindowSceneInterface; @@ -87,5 +90,6 @@ declare const WindowScene: WindowSceneInterface; * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 10 + * @noninterop */ declare const WindowSceneInstance: WindowSceneAttribute; diff --git a/api/@internal/component/ets/with_theme.d.ts b/api/@internal/component/ets/with_theme.d.ts index f79a48b6433b5c5d3f5c52c02f4710e5c31d37a4..a25661f83d16df9b7dfe4c5098ae39821989d64b 100644 --- a/api/@internal/component/ets/with_theme.d.ts +++ b/api/@internal/component/ets/with_theme.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CustomTheme } from '../../@ohos.arkui.theme'; -import { ThemeColorMode } from './common'; -/*** endif */ - /** * CustomTheme. * @@ -41,8 +36,7 @@ declare type CustomTheme = import('../api/@ohos.arkui.theme').CustomTheme; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare interface WithThemeOptions { /** @@ -52,8 +46,7 @@ declare interface WithThemeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ theme?: CustomTheme; @@ -64,8 +57,7 @@ declare interface WithThemeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ colorMode?: ThemeColorMode; } @@ -80,42 +72,18 @@ declare interface WithThemeOptions { * @crossplatform * @atomicservice * @since 12 +* @noninterop */ declare type WithThemeInterface = (options: WithThemeOptions) => WithThemeAttribute; -/** - * Define WithThemeInterface. - * - * @interface WithThemeInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface WithThemeInterface { - /** - * The withTheme options. - * - * @param { WithThemeOptions } options - * @returns { WithThemeAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (options: WithThemeOptions): WithThemeAttribute; -} - /** * Defines the WithTheme attribute functions.. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice -* @since arkts {'1.1':'12','1.2':'20'} -* @arkts 1.1&1.2 +* @since 12 +* @noninterop */ declare class WithThemeAttribute { } @@ -127,6 +95,7 @@ declare class WithThemeAttribute { * @crossplatform * @atomicservice * @since 12 +* @noninterop */ declare const WithTheme: WithThemeInterface; @@ -137,5 +106,6 @@ declare const WithTheme: WithThemeInterface; * @crossplatform * @atomicservice * @since 12 +* @noninterop */ declare const WithThemeInstance: WithThemeAttribute; \ No newline at end of file diff --git a/api/@internal/component/ets/xcomponent.d.ts b/api/@internal/component/ets/xcomponent.d.ts index 422c84bc0c951bed4ec61f806ba0175985351843..60f347cb22bf23ec90bf00e3a5ea24f7e3cd2c3f 100644 --- a/api/@internal/component/ets/xcomponent.d.ts +++ b/api/@internal/component/ets/xcomponent.d.ts @@ -18,13 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { ImageAIOptions, ImageAnalyzerConfig } from './imageCommon'; -import { CommonMethod } from './common'; -import { XComponentType } from './enums'; -import { VoidCallback } from './units'; -/*** endif */ - /** * Describes the rectangle of the surface held by the XComponent. * @@ -40,8 +33,7 @@ import { VoidCallback } from './units'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ declare interface SurfaceRect { /** @@ -61,8 +53,7 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ offsetX?: number; @@ -83,8 +74,7 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ offsetY?: number; @@ -104,8 +94,7 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ surfaceWidth: number; @@ -125,8 +114,7 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ surfaceHeight: number; } @@ -146,8 +134,7 @@ declare interface SurfaceRect { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ declare interface SurfaceRotationOptions { /** @@ -166,8 +153,7 @@ declare interface SurfaceRotationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ lock?: boolean; } @@ -186,8 +172,7 @@ declare interface SurfaceRotationOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class XComponentController { /** @@ -202,8 +187,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(); @@ -223,8 +207,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getXComponentSurfaceId(): string; @@ -246,8 +229,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ getXComponentContext(): Object; @@ -282,8 +264,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ setXComponentSurfaceRect(rect: SurfaceRect): void; @@ -303,8 +284,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ getXComponentSurfaceRect(): SurfaceRect; @@ -324,8 +304,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ setXComponentSurfaceRotation(rotationOptions: SurfaceRotationOptions): void; @@ -345,8 +324,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ getXComponentSurfaceRotation(): Required; @@ -366,8 +344,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ onSurfaceCreated(surfaceId: string): void; @@ -389,8 +366,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ onSurfaceChanged(surfaceId: string, rect: SurfaceRect): void; @@ -410,8 +386,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ onSurfaceDestroyed(surfaceId: string): void; @@ -428,8 +403,7 @@ declare class XComponentController { * @throws { BusinessError } 110003 - Image analysis is stopped. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ startImageAnalyzer(config: ImageAnalyzerConfig): Promise; @@ -439,8 +413,7 @@ declare class XComponentController { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ stopImageAnalyzer(): void; @@ -481,8 +454,7 @@ declare class XComponentController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ declare interface XComponentOptions { /** @@ -500,8 +472,7 @@ declare interface XComponentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ type: XComponentType; @@ -521,8 +492,7 @@ declare interface XComponentOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ controller: XComponentController; @@ -533,8 +503,7 @@ declare interface XComponentOptions { * @type { ?ImageAIOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ imageAIOptions?: ImageAIOptions; @@ -544,8 +513,7 @@ declare interface XComponentOptions { * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'17','1.2':'20'} - * @arkts 1.1&1.2 + * @since 17 */ screenId?: number; } @@ -556,8 +524,7 @@ declare interface XComponentOptions { * @interface NativeXComponentParameters * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ declare interface NativeXComponentParameters { /** @@ -566,8 +533,7 @@ declare interface NativeXComponentParameters { * @type { XComponentType } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ type: XComponentType; @@ -577,8 +543,7 @@ declare interface NativeXComponentParameters { * @type { ?ImageAIOptions } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ imageAIOptions?: ImageAIOptions; } @@ -598,6 +563,7 @@ declare interface NativeXComponentParameters { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ interface XComponentInterface { /** @@ -673,8 +639,7 @@ interface XComponentInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare type OnNativeLoadCallback = (event?: object) => void; @@ -692,8 +657,8 @@ declare type OnNativeLoadCallback = (event?: object) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 + * @noninterop */ declare class XComponentAttribute extends CommonMethod { /** @@ -723,8 +688,7 @@ declare class XComponentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onLoad(callback: OnNativeLoadCallback): XComponentAttribute; @@ -755,8 +719,7 @@ declare class XComponentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ onDestroy(event: VoidCallback): XComponentAttribute; @@ -770,8 +733,7 @@ declare class XComponentAttribute extends CommonMethod { * @returns { XComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ enableAnalyzer(enable: boolean): XComponentAttribute; @@ -782,8 +744,7 @@ declare class XComponentAttribute extends CommonMethod { * @returns { XComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ enableSecure(isSecure: boolean): XComponentAttribute; @@ -804,7 +765,6 @@ declare class XComponentAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ hdrBrightness(brightness: number): XComponentAttribute; @@ -815,8 +775,7 @@ declare class XComponentAttribute extends CommonMethod { * @returns { XComponentAttribute } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ enableTransparentLayer(enabled: boolean): XComponentAttribute; } @@ -834,6 +793,7 @@ declare class XComponentAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const XComponent: XComponentInterface; @@ -850,111 +810,6 @@ declare const XComponent: XComponentInterface; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare const XComponentInstance: XComponentAttribute; - -/** - * Defines the XComponent parameter interface. - * - * @interface XComponentParameter - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -declare interface XComponentParameter { - /** - * The id of xcomponent - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - id: string; - /** - * The type of xcomponent - * - * @type { XComponentType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - type: XComponentType; - /** - * The name of the dynamic library compiled and output by the native layer. - * - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - libraryname?: string; - /** - * The controller of xcomponent. - * - * @type { ?XComponentController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - controller?: XComponentController; -} - -/** - * Defines XComponent. - * - * @interface XComponentInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -interface XComponentInterface { - /** - * Constructor parameters - * - * @param { XComponentParameter } value - Indicates the options of the xcomponent. - * @returns { XComponentAttribute } The attribute of the xcomponent. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (value: XComponentParameter): XComponentAttribute; - - /** - * Constructor parameters - * - * @param { XComponentOptions } options - Indicates the options of the xcomponent. - * @returns { XComponentAttribute } The attribute of the xcomponent. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (options: XComponentOptions): XComponentAttribute; - - /** - * Constructor parameters - * - * @param { NativeXComponentParameters } params - Indicates the constructor parameters of the xcomponent for native developing. - * @returns { XComponentAttribute } The attribute of the xcomponent. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (params: NativeXComponentParameters): XComponentAttribute; -} \ No newline at end of file diff --git a/api/@internal/ets/global.d.ets b/api/@internal/ets/global.d.ets index 06cedd8482f75cfc45f081bfe5932716878521ae..052dad6a999b485256007bd085ac5dfdf674e46b 100644 --- a/api/@internal/ets/global.d.ets +++ b/api/@internal/ets/global.d.ets @@ -20,143 +20,6 @@ import { TouchObject, KeyEvent, MouseEvent } from '../../../api/arkui/component/common'; -/** - * Sets the interval for repeatedly calling a function. - * - * @param { Function | string } handler - Indicates the function to be called after the timer goes off. - * For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. - * For devices of "lite wearable" and "smartVision" types, this parameter must be a function. - * @param { number } delay - Indicates the interval between each two calls, in milliseconds. The function will be called after this delay. - * @param { any[] } arguments - Indicates additional arguments to pass to "handler" when the timer goes off. - * @returns { number } Returns the timer ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Sets the interval for repeatedly calling a function. - * - * @param { Function | string } handler - Indicates the function to be called after the timer goes off. - * For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. - * For devices of "lite wearable" and "smartVision" types, this parameter must be a function. - * @param { number } delay - Indicates the interval between each two calls, in milliseconds. The function will be called after this delay. - * @param { any[] } arguments - Indicates additional arguments to pass to "handler" when the timer goes off. - * @returns { number } Returns the timer ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Sets the interval for repeatedly calling a function. - * - * @param { Function | string } handler - Indicates the function to be called after the timer goes off. - * For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. - * For devices of "lite wearable" and "smartVision" types, this parameter must be a function. - * @param { number } delay - Indicates the interval between each two calls, in milliseconds. The function will be called after this delay. - * @param { any[] } arguments - Indicates additional arguments to pass to "handler" when the timer goes off. - * @returns { number } Returns the timer ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -export declare function setInterval(func: () => void, delay: int): int; - -/** - * Sets a timer after which a function will be executed. - * - * @param { Function | string } handler - Indicates the function to be called after the timer goes off. - * For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. - * For devices of "lite wearable" and "smartVision" types, this parameter must be a function. - * @param { number } [delay] - Indicates the delay (in milliseconds) after which the function will be called. - * If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible. - * @param { any[] } arguments - Indicates additional arguments to pass to "handler" when the timer goes off. - * @returns { number } Returns the timer ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Sets a timer after which a function will be executed. - * - * @param { Function | string } handler - Indicates the function to be called after the timer goes off. - * For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. - * For devices of "lite wearable" and "smartVision" types, this parameter must be a function. - * @param { number } [delay] - Indicates the delay (in milliseconds) after which the function will be called. - * If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible. - * @param { any[] } [arguments] - Indicates additional arguments to pass to "handler" when the timer goes off. - * @returns { number } Returns the timer ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Sets a timer after which a function will be executed. - * - * @param { Function | string } handler - Indicates the function to be called after the timer goes off. - * For devices of "tv", "phone, tablet", and "wearable" types, this parameter can be a function or string. - * For devices of "lite wearable" and "smartVision" types, this parameter must be a function. - * @param { number } [delay] - Indicates the delay (in milliseconds) after which the function will be called. - * If this parameter is left empty, default value "0" will be used, which means that the function will be called immediately or as soon as possible. - * @param { any[] } [arguments] - Indicates additional arguments to pass to "handler" when the timer goes off. - * @returns { number } Returns the timer ID. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -export declare function setTimeout(func: () => void, delay?: int): int; - -/** - * Cancel the interval set by " setInterval()". - * - * @param { number } [intervalID] - Indicates the timer ID returned by "setInterval()". - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Cancel the interval set by " setInterval()". - * - * @param { number } [intervalID] - Indicates the timer ID returned by "setInterval()". - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Cancel the interval set by " setInterval()". - * - * @param { number } [intervalID] - Indicates the timer ID returned by "setInterval()". - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -export declare function clearInterval(intervalID: int): void; - -/** - * Cancel the timer set by "setTimeout()". - * - * @param { number } [timeoutID] - Indicates the timer ID returned by "setTimeout()". - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Cancel the timer set by "setTimeout()". - * - * @param { number } [timeoutID] - Indicates the timer ID returned by "setTimeout()". - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Cancel the timer set by "setTimeout()". - * - * @param { number } [timeoutID] - Indicates the timer ID returned by "setTimeout()". - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -export declare function clearTimeout(timeoutID: int): void; - /** * Defining syscap function. * diff --git a/api/@ohos.UiTest.d.ts b/api/@ohos.UiTest.d.ts index e6d1bcd5093efa56b22dec98af80759a6dd0412a..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. * diff --git a/api/@ohos.accessibility.config.d.ts b/api/@ohos.accessibility.config.d.ts index 45a5ff46c8b557a681328a61e60985ee8ad9ee31..09fea52272c8fda2ba773a0c2301a25d3ea0f5b4 100644 --- a/api/@ohos.accessibility.config.d.ts +++ b/api/@ohos.accessibility.config.d.ts @@ -397,11 +397,26 @@ declare namespace config { * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ set(value: T): Promise; + /** + * Setting configuration value. + * + * @permission ohos.permission.WRITE_ACCESSIBILITY_CONFIG + * @param { T } value Indicates the value. + * @returns { Promise } + * @throws { BusinessError } 201 - Permission verification failed. + * The application does not have the permission required to call the API. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.BarrierFree.Accessibility.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + setReturnsPromise(value: T): Promise; + /** * Setting configuration value. * @@ -417,11 +432,31 @@ declare namespace config { * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ set(value: T, callback: AsyncCallback): void; + /** + * Setting configuration value. + * + * @permission ohos.permission.WRITE_ACCESSIBILITY_CONFIG + * @param { T } value Indicates the value. + * @param { AsyncCallback } callback + * @throws { BusinessError } 201 - Permission verification failed. + * The application does not have the permission required to call the API. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.BarrierFree.Accessibility.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + setWithCallback(value: T, callback: AsyncCallback): void; + + /** + * @arkts 1.2 + */ + overload set { setReturnsPromise, setWithCallback }; + /** * Getting configuration value. * @@ -431,11 +466,22 @@ declare namespace config { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ get(): Promise; + /** + * Getting configuration value. + * + * @returns { Promise } + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.BarrierFree.Accessibility.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + getReturnsPromise(): Promise; + /** * Getting configuration value. * @@ -443,11 +489,27 @@ declare namespace config { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.BarrierFree.Accessibility.Core * @systemapi - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ get(callback: AsyncCallback): void; + /** + * Getting configuration value. + * + * @param { AsyncCallback } callback + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.BarrierFree.Accessibility.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + getWithCallback(callback: AsyncCallback): void; + + /** + * @arkts 1.2 + */ + overload get { getReturnsPromise, getWithCallback }; + /** * Register the listener to listen for configuration changes. * diff --git a/api/@ohos.accessibility.d.ts b/api/@ohos.accessibility.d.ts index d85f0d6573772c9b63754f9e64162b1377c0d47f..0f04d961ab1d4bb58decd1c3194d1e161dc7be29 100644 --- a/api/@ohos.accessibility.d.ts +++ b/api/@ohos.accessibility.d.ts @@ -1235,11 +1235,21 @@ declare namespace accessibility { * 2. Incorrect parameter types; * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ function sendAccessibilityEvent(event: EventInfo, callback: AsyncCallback): void; + /** + * Send accessibility event. + * + * @param { EventInfo } event The object of the accessibility {@code EventInfo} . + * @param { AsyncCallback } callback Asynchronous callback interface. + * @syscap SystemCapability.BarrierFree.Accessibility.Core + * @since 20 + * @arkts 1.2 + */ + function sendAccessibilityEventWithCallback(event: EventInfo, callback: AsyncCallback): void; + /** * Send accessibility event. * @@ -1250,11 +1260,26 @@ declare namespace accessibility { * 2. Incorrect parameter types; * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'9', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ function sendAccessibilityEvent(event: EventInfo): Promise; + /** + * Send accessibility event. + * + * @param { EventInfo } event The object of the accessibility {@code EventInfo} . + * @returns { Promise } Returns {@code true} if success ; returns {@code false} otherwise. + * @syscap SystemCapability.BarrierFree.Accessibility.Core + * @since 20 + * @arkts 1.2 + */ + function sendAccessibilityEventReturnsPromise(event: EventInfo): Promise; + + /** + * @arkts 1.2 + */ + overload sendAccessibilityEvent { sendAccessibilityEventWithCallback, sendAccessibilityEventReturnsPromise }; + /** * Gets touch mode type. * @returns { string } Returns touch mode type, include 'singleTouchMode', 'doubleTouchMode', and 'none'. @@ -1287,10 +1312,21 @@ declare namespace accessibility { * @syscap SystemCapability.BarrierFree.Accessibility.Core * @crossplatform * @since 20 - * @arkts 1.1&1.2 */ function on(type: 'accessibilityStateChange', callback: Callback): void; + /** + * Register the observe of the accessibility state changed. + * + * @param { 'accessibilityStateChange' } type state event type. + * @param { Callback } callback Asynchronous callback interface. + * @syscap SystemCapability.BarrierFree.Accessibility.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function onAccessibilityStateChange(type: 'accessibilityStateChange', callback: Callback): void; + /** * Register the observe of the touchGuide state changed. * @@ -1301,11 +1337,21 @@ declare namespace accessibility { * 2. Incorrect parameter types; * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Vision - * @since arkts {'1.1':'7', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ function on(type: 'touchGuideStateChange', callback: Callback): void; + /** + * Register the observe of the touchGuide state changed. + * + * @param { 'touchGuideStateChange' } type state event type. + * @param { Callback } callback Asynchronous callback interface. + * @syscap SystemCapability.BarrierFree.Accessibility.Vision + * @since 20 + * @arkts 1.2 + */ + function onTouchGuideStateChange(type: 'touchGuideStateChange', callback: Callback): void; + /** * Register the observe of the screen reader state changed. * @param { 'screenReaderStateChange' } type state event type. @@ -1315,11 +1361,25 @@ declare namespace accessibility { * 2. Incorrect parameter types; * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ function on(type: 'screenReaderStateChange', callback: Callback): void; + /** + * Register the observe of the screen reader state changed. + * @param { 'screenReaderStateChange' } type state event type. + * @param { Callback } callback callback Asynchronous callback interface. + * @syscap SystemCapability.BarrierFree.Accessibility.Core + * @since 20 + * @arkts 1.2 + */ + function onScreenReaderStateChange(type: 'screenReaderStateChange', callback: Callback): void; + + /** + * @arkts 1.2 + */ + overload on { onAccessibilityStateChange, onTouchGuideStateChange, onScreenReaderStateChange }; + /** * Register the observe of the touch mode changed. * @param { 'touchModeChange' } type touch mode change. @@ -1357,10 +1417,21 @@ declare namespace accessibility { * @syscap SystemCapability.BarrierFree.Accessibility.Core * @crossplatform * @since 20 - * @arkts 1.1&1.2 */ function off(type: 'accessibilityStateChange', callback?: Callback): void; + /** + * Unregister the observe of the accessibility state changed. + * + * @param { 'accessibilityStateChange' } type state event type + * @param { Callback } [callback] Asynchronous callback interface. + * @syscap SystemCapability.BarrierFree.Accessibility.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + function offAccessibilityStateChange(type: 'accessibilityStateChange', callback?: Callback): void; + /** * Unregister the observe of the touchGuide state changed. * @@ -1371,11 +1442,21 @@ declare namespace accessibility { * 2. Incorrect parameter types; * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'7', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 7 */ function off(type: 'touchGuideStateChange', callback?: Callback): void; + /** + * Unregister the observe of the touchGuide state changed. + * + * @param { 'touchGuideStateChange' } type state event type + * @param { Callback } [callback] Asynchronous callback interface. + * @syscap SystemCapability.BarrierFree.Accessibility.Core + * @since 20 + * @arkts 1.2 + */ + function offTouchGuideStateChange(type: 'touchGuideStateChange', callback?: Callback): void; + /** * Unregister the observe of the screen reader state changed. * @param { 'screenReaderStateChange' } type state event type @@ -1385,11 +1466,25 @@ declare namespace accessibility { * 2. Incorrect parameter types; * 3. Parameter verification failed. * @syscap SystemCapability.BarrierFree.Accessibility.Core - * @since arkts {'1.1':'18', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ function off(type: 'screenReaderStateChange', callback?: Callback): void; + /** + * Unregister the observe of the screen reader state changed. + * @param { 'screenReaderStateChange' } type state event type + * @param { Callback } [callback] callback Asynchronous callback interface. + * @syscap SystemCapability.BarrierFree.Accessibility.Core + * @since 20 + * @arkts 1.2 + */ + function offScreenReaderStateChange(type: 'screenReaderStateChange', callback?: Callback): void; + + /** + * @arkts 1.2 + */ + overload off { offAccessibilityStateChange, offTouchGuideStateChange, offScreenReaderStateChange }; + /** * Unregister the observe of the touch mode changed. * @param { 'touchModeChange' } type touch mode change. diff --git a/api/@ohos.animator.d.ts b/api/@ohos.animator.d.ts index 7b40c6e1ec838c62541ade25dc2380d6f1021b24..296ec868c8fe17df89b1d98cdb927b1f1e069910 100644 --- a/api/@ohos.animator.d.ts +++ b/api/@ohos.animator.d.ts @@ -18,11 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { FillMode, PlayMode } from './arkui/component/enums'; -import { ExpectedFrameRateRange } from './arkui/component/common'; -/*** endif */ - /** * Defines the animator options. * @interface AnimatorOptions @@ -42,8 +37,7 @@ import { ExpectedFrameRateRange } from './arkui/component/common'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ export interface AnimatorOptions { /** @@ -68,8 +62,7 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ duration: number; @@ -141,8 +134,7 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ easing: string; @@ -168,8 +160,7 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ delay: number; @@ -198,8 +189,7 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ fill: "none" | "forwards" | "backwards" | "both"; @@ -225,8 +215,7 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ direction: "normal" | "reverse" | "alternate" | "alternate-reverse"; @@ -252,8 +241,7 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ iterations: number; @@ -279,8 +267,7 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ begin: number; @@ -306,8 +293,7 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ end: number; } @@ -318,8 +304,7 @@ export interface AnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ export declare class SimpleAnimatorOptions { /** @@ -330,8 +315,7 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ constructor(begin: number, end: number); @@ -343,8 +327,7 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ duration(duration: number): SimpleAnimatorOptions; @@ -370,8 +353,7 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ easing(curve: string): SimpleAnimatorOptions; @@ -383,8 +365,7 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ delay(delay: number): SimpleAnimatorOptions; @@ -396,8 +377,7 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ fill(fillMode: FillMode): SimpleAnimatorOptions; @@ -409,8 +389,7 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ direction(direction: PlayMode): SimpleAnimatorOptions; @@ -422,8 +401,7 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ iterations(iterations: number): SimpleAnimatorOptions; } @@ -447,8 +425,7 @@ export declare class SimpleAnimatorOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ export interface AnimatorResult { /** @@ -495,8 +472,7 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ reset(options: AnimatorOptions): void; @@ -511,8 +487,7 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ reset(options: AnimatorOptions | SimpleAnimatorOptions): void; @@ -532,8 +507,7 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ play(): void; @@ -553,8 +527,7 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ finish(): void; @@ -574,8 +547,7 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ pause(): void; @@ -595,8 +567,7 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ cancel(): void; @@ -617,8 +588,7 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ reverse(): void; @@ -651,8 +621,7 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onFrame: (progress: number) => void; @@ -685,8 +654,7 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onFinish: () => void; @@ -719,8 +687,7 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onCancel: () => void; @@ -753,8 +720,7 @@ export interface AnimatorResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ onRepeat: () => void; @@ -763,8 +729,7 @@ export interface AnimatorResult { * @param { ExpectedFrameRateRange } rateRange - Indicates ExpectedFrameRateRange. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setExpectedFrameRateRange(rateRange: ExpectedFrameRateRange): void; } @@ -787,15 +752,7 @@ export interface AnimatorResult { * @atomicservice * @since 11 */ -/** - * Defines the Animator class. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ -declare class Animator { +export default class Animator { /** * Create an animator object for custom animation. * @param { AnimatorOptions } options - Options. @@ -858,10 +815,7 @@ declare class Animator { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ static create(options: AnimatorOptions | SimpleAnimatorOptions): AnimatorResult; } - -export default Animator; diff --git a/api/@ohos.animator.static.d.ets b/api/@ohos.animator.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..3a86f1557c86c2ca742b2b2c8ba23fb3f3ddb419 --- /dev/null +++ b/api/@ohos.animator.static.d.ets @@ -0,0 +1,355 @@ +'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.AbilityConstant.d.ts b/api/@ohos.app.ability.AbilityConstant.d.ts index 574ba2bd5ec01256bf678937b2f6f9c8461a957a..e8323d9e7cf86d279067b7a2c0d7a17950bc6d7d 100644 --- a/api/@ohos.app.ability.AbilityConstant.d.ts +++ b/api/@ohos.app.ability.AbilityConstant.d.ts @@ -486,6 +486,17 @@ declare namespace AbilityConstant { * @arkts 1.1&1.2 */ PREPARE_CONTINUATION = 10, + + /** + * Start by preload. + * + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @stagemodelonly + * @atomicservice + * @since arkts {'1.1':'20', '1.2':'20'} + * @arkts 1.1&1.2 + */ + PRELOAD = 11, } /** diff --git a/api/@ohos.app.ability.AbilityStage.d.ts b/api/@ohos.app.ability.AbilityStage.d.ts index efd9eb3ccfcc95621bc4aa14b15e47deeaa541e9..707ad6ce8e2f1032068c3b1bab79b0f850e0f40d 100644 --- a/api/@ohos.app.ability.AbilityStage.d.ts +++ b/api/@ohos.app.ability.AbilityStage.d.ts @@ -137,7 +137,8 @@ declare class AbilityStage { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ onAcceptWant(want: Want): string; @@ -152,6 +153,7 @@ declare class AbilityStage { * @stagemodelonly * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ onAcceptWantAsync(want: Want): Promise; @@ -182,6 +184,7 @@ declare class AbilityStage { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ onNewProcessRequest(want: Want): string; @@ -195,6 +198,7 @@ declare class AbilityStage { * @stagemodelonly * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ onNewProcessRequestAsync(want: Want): Promise; diff --git a/api/@ohos.app.ability.Configuration.d.ts b/api/@ohos.app.ability.Configuration.d.ts index 94322a7f338c7a43467efbac407e0cfaded4da79..0e9dfcb3061678bc3fd6ff415a5d761d445368f9 100644 --- a/api/@ohos.app.ability.Configuration.d.ts +++ b/api/@ohos.app.ability.Configuration.d.ts @@ -260,6 +260,7 @@ export interface Configuration { * @syscap SystemCapability.Ability.AbilityBase * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ locale?: Intl.Locale; } diff --git a/api/@ohos.app.ability.InteropAbilityLifecycleCallback.d.ts b/api/@ohos.app.ability.InteropAbilityLifecycleCallback.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..5691bce49464a12dcfcaa915056045c911234c95 --- /dev/null +++ b/api/@ohos.app.ability.InteropAbilityLifecycleCallback.d.ts @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"), + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * @kit AbilityKit + */ + +import window from './@ohos.window'; + +/*** if arkts 1.1 */ +/** + * The callback was called when only an ability is registered for listening. + * + * @typedef { function } + * @param { any } ability - Indicates the ability to register for listening. + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @since 21 + */ +type AbilityCallbackFn = (ability: any) => void; + +/** + * The callback was called when both ability and window stage are registered for listening. + * + * @typedef { function } + * @param { any } ability - Indicates the ability to register for listening. + * @param { window.WindowStage } windowStage - Indicates the window stage to register for listening. + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @since 21 + */ +type WindowStageCallbackFn = (ability: any, windowStage: window.WindowStage) => void; +/*** endif */ + +/*** if arkts 1.2 */ +/** + * The callback was called when only an ability is registered for listening. + * + * @typedef { function } + * @param { Any } ability - Indicates the ability to register for listening. + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @since 21 + * @arkts 1.2 + */ +type AbilityCallbackFn = (ability: Any) => void; + +/** + * The callback was called when both ability and window stage are registered for listening. + * + * @typedef { function } + * @param { Any } ability - Indicates the ability to register for listening. + * @param { window.WindowStage } windowStage - Indicates the window stage to register for listening. + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @since 21 + * @arkts 1.2 + */ +type WindowStageCallbackFn = (ability: Any, windowStage: window.WindowStage) => void; +/*** endif */ + +/** + * The interop ability lifecycle callback. + * + * @typedef InteropAbilityLifecycleCallback + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @since 21 + * @arkts 1.1&1.2 + */ +declare interface InteropAbilityLifecycleCallback { + /** + * Called back when an ability is started for initialization. + * + * @type { AbilityCallbackFn } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @since 21 + * @arkts 1.1&1.2 + */ + onAbilityCreate: AbilityCallbackFn; + + /** + * Called back when a window stage is created. + * + * @type { WindowStageCallbackFn } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @since 21 + * @arkts 1.1&1.2 + */ + onWindowStageCreate: WindowStageCallbackFn; + + /** + * Called back when a window stage is destroyed. + * + * @type { WindowStageCallbackFn } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @since 21 + * @arkts 1.1&1.2 + */ + onWindowStageDestroy: WindowStageCallbackFn; + + /** + * Called back when an ability is destroyed. + * + * @type { AbilityCallbackFn } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @since 21 + * @arkts 1.1&1.2 + */ + onAbilityDestroy: AbilityCallbackFn; + + /** + * Called back when the state of an ability changes to foreground. + * + * @type { AbilityCallbackFn } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @since 21 + * @arkts 1.1&1.2 + */ + onAbilityForeground: AbilityCallbackFn; + + /** + * Called back when the state of an ability changes to background. + * + * @type { AbilityCallbackFn } + * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore + * @stagemodelonly + * @since 21 + * @arkts 1.1&1.2 + */ + onAbilityBackground: AbilityCallbackFn; +} + +export default InteropAbilityLifecycleCallback; \ No newline at end of file diff --git a/api/@ohos.app.ability.ShareExtensionAbility.d.ts b/api/@ohos.app.ability.ShareExtensionAbility.d.ts index 8f6013e83d1fe3e7e1f6bb1905b2b6f267276e7b..bcedcbbf4420e44ff6bc7b85163c1f2394018cdd 100644 --- a/api/@ohos.app.ability.ShareExtensionAbility.d.ts +++ b/api/@ohos.app.ability.ShareExtensionAbility.d.ts @@ -26,7 +26,8 @@ import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility'; * @extends UIExtensionAbility * @syscap SystemCapability.Ability.AbilityRuntime.Core * @StageModelOnly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ export default class ShareExtensionAbility extends UIExtensionAbility { } \ No newline at end of file diff --git a/api/@ohos.app.ability.UIAbility.d.ts b/api/@ohos.app.ability.UIAbility.d.ts index 164845cbb154b6ec5c88d2c72b261fd2298e7bbf..0bd48763a630d0463e0c1741adf09bb35b2d81d8 100644 --- a/api/@ohos.app.ability.UIAbility.d.ts +++ b/api/@ohos.app.ability.UIAbility.d.ts @@ -676,6 +676,7 @@ declare class UIAbility extends Ability { * @stagemodelonly * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ onWillForeground(): void; @@ -694,6 +695,7 @@ declare class UIAbility extends Ability { * @stagemodelonly * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ onDidForeground(): void; @@ -740,6 +742,7 @@ declare class UIAbility extends Ability { * @stagemodelonly * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ onWillBackground(): void; @@ -757,6 +760,7 @@ declare class UIAbility extends Ability { * @stagemodelonly * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ onDidBackground(): void; @@ -885,7 +889,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 */ onSaveState(reason: AbilityConstant.StateType, wantParam: Record): AbilityConstant.OnSaveResult; @@ -900,6 +905,7 @@ declare class UIAbility extends Ability { * @stagemodelonly * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ onSaveStateAsync(stateType: AbilityConstant.StateType, wantParam: Record): Promise; @@ -918,7 +924,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 */ onShare(wantParam: Record): void; @@ -952,7 +959,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 */ onPrepareToTerminate(): boolean; @@ -978,7 +986,8 @@ declare class UIAbility extends Ability { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ onPrepareToTerminateAsync(): Promise; diff --git a/api/@ohos.app.ability.UIExtensionContentSession.d.ts b/api/@ohos.app.ability.UIExtensionContentSession.d.ts index bd9c0479e1aa5758540a2694d00fbf27beaad389..6b8d83ed67cb953644b8860bc56ab9dc5476d094 100644 --- a/api/@ohos.app.ability.UIExtensionContentSession.d.ts +++ b/api/@ohos.app.ability.UIExtensionContentSession.d.ts @@ -21,10 +21,10 @@ import type AbilityStartCallback from './application/AbilityStartCallback'; import type { AsyncCallback } from './@ohos.base'; import type uiExtensionHost from './@ohos.uiExtensionHost'; +import type uiExtension from './@ohos.arkui.uiExtension'; /*** 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 */ /*** if arkts 1.2 */ @@ -533,7 +533,8 @@ declare class UIExtensionContentSession { * 2. Incorrect parameter types. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ setWindowPrivacyMode(isPrivacyMode: boolean): Promise; @@ -549,7 +550,8 @@ declare class UIExtensionContentSession { * 2. Incorrect parameter types. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ setWindowPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback): void; @@ -654,7 +656,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 */ getUIExtensionWindowProxy(): uiExtension.WindowProxy; } diff --git a/api/@ohos.app.ability.Want.d.ts b/api/@ohos.app.ability.Want.d.ts index 3f97d2f34cfd195d3061e8bc90abcce50481422e..fdf0bec5f4d23904fcd141008b9f9caf495b18d6 100644 --- a/api/@ohos.app.ability.Want.d.ts +++ b/api/@ohos.app.ability.Want.d.ts @@ -193,7 +193,8 @@ export default class Want { * @type { ?int } * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ flags?: int; diff --git a/api/@ohos.app.ability.abilityManager.d.ts b/api/@ohos.app.ability.abilityManager.d.ts index 5059b1ead8260538fbf2854f9ab4908075b50e4d..62726632ab6797fb2339af7a52bcea035c1be726 100644 --- a/api/@ohos.app.ability.abilityManager.d.ts +++ b/api/@ohos.app.ability.abilityManager.d.ts @@ -570,7 +570,7 @@ declare namespace abilityManager { * * @typedef { _AbilityRunningInfo } * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since arkts {'1.1':'9', '1.2':'20'} + * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ export type AbilityRunningInfo = _AbilityRunningInfo; diff --git a/api/@ohos.app.ability.appRecovery.d.ts b/api/@ohos.app.ability.appRecovery.d.ts index 517fb27763a386c37f5d788ca1e44fbf9b7d9a2e..3a430e8e4d0345ce550428bddab6ebf5688148c3 100644 --- a/api/@ohos.app.ability.appRecovery.d.ts +++ b/api/@ohos.app.ability.appRecovery.d.ts @@ -55,7 +55,7 @@ declare namespace appRecovery { /** * The flag that determines when to restart you app. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} @@ -141,7 +141,7 @@ 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 arkts {'1.1':'11','1.2':'20'} @@ -195,7 +195,7 @@ declare namespace appRecovery { /** * The flag that determines how to save the ability state. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice * @since arkts {'1.1':'11','1.2':'20'} diff --git a/api/@ohos.app.ability.application.d.ts b/api/@ohos.app.ability.application.d.ts index d6a92cda87c3066894453fa34ac643c9c78cb9da..71a7199e911ce05dae62138747a5a5dac77eb1c4 100644 --- a/api/@ohos.app.ability.application.d.ts +++ b/api/@ohos.app.ability.application.d.ts @@ -75,7 +75,8 @@ declare namespace application { * @returns { Promise } Returns the module context of plugin. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ export function createPluginModuleContext(context: Context, pluginBundleName: string, pluginModuleName: string): Promise; diff --git a/api/@ohos.app.ability.autoFillManager.d.ts b/api/@ohos.app.ability.autoFillManager.d.ts index b18eefefd3606a8973afdb32f5ae66dde94f22d6..59c3caf071ad56836d558dd7b83a99519a66de41 100644 --- a/api/@ohos.app.ability.autoFillManager.d.ts +++ b/api/@ohos.app.ability.autoFillManager.d.ts @@ -18,6 +18,7 @@ * @kit AbilityKit */ +/*** if arkts 1.1 */ import type { UIContext } from './@ohos.arkui.UIContext'; import type * as _ViewData from './application/ViewData'; import type * as _PageNodeInfo from './application/PageNodeInfo'; @@ -27,6 +28,10 @@ import type * as _CustomData from './application/CustomData'; import type * as _AutoFillRect from './application/AutoFillRect'; import type * as _AutoFillPopupConfig from './application/AutoFillPopupConfig'; import { PopupPlacement } from './application/AutoFillPopupConfig'; +/*** endif */ +/*** if arkts 1.2 */ +import { UIContext } from './@ohos.arkui.UIContext'; +/*** endif */ /** * This module provides the function of auto fill manager. @@ -43,9 +48,34 @@ import { PopupPlacement } from './application/AutoFillPopupConfig'; * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ 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. * @@ -61,7 +91,8 @@ declare namespace autoFillManager { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface AutoSaveCallback { /** @@ -74,12 +105,14 @@ declare namespace autoFillManager { /** * Called when auto save request is successfully handled. * + * @type { OnSuccessFn } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - onSuccess(): void; + onSuccess: OnSuccessFn; /** * Called when auto save request is failed to be handled. @@ -91,12 +124,14 @@ declare namespace autoFillManager { /** * Called when auto save request is failed to be handled. * + * @type { OnFailureFn } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - onFailure(): void; + onFailure: OnFailureFn; } /** @@ -122,7 +157,8 @@ declare namespace autoFillManager { * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @stagemodelonly * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ export function requestAutoSave(context: UIContext, callback?: AutoSaveCallback): void; diff --git a/api/@ohos.app.ability.common.d.ts b/api/@ohos.app.ability.common.d.ts index aa0bd3d5e2a10c790ab96924d6876e29f6b0df5e..96308ef0201aa11e724020b3dd62e4fcd6caac86 100644 --- a/api/@ohos.app.ability.common.d.ts +++ b/api/@ohos.app.ability.common.d.ts @@ -39,7 +39,6 @@ import * as _UIServiceExtensionContext from './application/UIServiceExtensionCon import * as _UIServiceProxy from './application/UIServiceProxy'; import * as _UIServiceHostProxy from './application/UIServiceHostProxy'; import * as _UIServiceExtensionConnectCallback from './application/UIServiceExtensionConnectCallback'; -import { PacMap as _PacMap } from './ability/dataAbilityHelper'; /*** endif */ /*** if arkts 1.2 */ import _UIAbilityContext from './application/UIAbilityContext'; @@ -49,13 +48,13 @@ import _ApplicationContext from './application/ApplicationContext'; import _BaseContext from './application/BaseContext'; import _Context from './application/Context'; import _ExtensionContext from './application/ExtensionContext'; -import _FormExtensionContext from './application/FormExtensionContext'; 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'; +import { PacMap as _PacMap } from './ability/dataAbilityHelper'; /** * This module provides application context classes and common data structures. @@ -239,7 +238,6 @@ declare namespace common { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @crossplatform - * @atomicservice * @since 20 * @arkts 1.2 */ @@ -339,19 +337,6 @@ declare namespace common { */ export type FormExtensionContext = _FormExtensionContext.default; - /** - * The context of form extension. It allows access to - * formExtension-specific resources. - * - * @typedef { _FormExtensionContext } - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @stagemodelonly - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - export type FormExtensionContext = _FormExtensionContext; - /** * The context of service extension. It allows access to * serviceExtension-specific resources. @@ -411,7 +396,6 @@ declare namespace common { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @crossplatform - * @atomicservice * @since 20 * @arkts 1.2 */ @@ -430,7 +414,8 @@ declare namespace common { * @typedef { _PacMap } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export type PacMap = _PacMap; diff --git a/api/@ohos.app.ability.dialogSession.d.ts b/api/@ohos.app.ability.dialogSession.d.ts index e51f9fd394f27b76390a452b0487c103acc34a7e..6c1a2f9d6cf32c11cb6bab1630b770d203b5d034 100644 --- a/api/@ohos.app.ability.dialogSession.d.ts +++ b/api/@ohos.app.ability.dialogSession.d.ts @@ -29,7 +29,8 @@ import type { MultiAppMode } from './bundleManager/ApplicationInfo'; * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace dialogSession { @@ -40,7 +41,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface DialogAbilityInfo { @@ -51,7 +53,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -62,7 +65,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ moduleName: string; @@ -73,7 +77,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ abilityName: string; @@ -84,7 +89,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ abilityIconId: int; @@ -95,7 +101,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ abilityLabelId: int; @@ -106,7 +113,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleIconId: int; @@ -117,7 +125,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ bundleLabelId: int; @@ -128,7 +137,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ visible: boolean; @@ -139,7 +149,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ appIndex: int; @@ -150,7 +161,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ multiAppMode: MultiAppMode; } @@ -162,7 +174,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface DialogSessionInfo { @@ -173,7 +186,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ callerAbilityInfo: DialogAbilityInfo; @@ -184,7 +198,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ targetAbilityInfos: Array; @@ -195,7 +210,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ parameters?: Record; } @@ -214,7 +230,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function getDialogSessionInfo(dialogSessionId: string): DialogSessionInfo; @@ -234,7 +251,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function sendDialogResult(dialogSessionId: string, targetWant: Want, isAllowed: boolean): Promise; @@ -254,7 +272,8 @@ declare namespace dialogSession { * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function sendDialogResult(dialogSessionId: string, targetWant: Want, isAllowed: boolean, callback: AsyncCallback): void; } diff --git a/api/@ohos.app.ability.errorManager.d.ts b/api/@ohos.app.ability.errorManager.d.ts index 5350223c8b9c07d591f503f210e0fe2a2fbf211c..34542a98e11c206a5b0bf73c586ebcbd7bc29885 100644 --- a/api/@ohos.app.ability.errorManager.d.ts +++ b/api/@ohos.app.ability.errorManager.d.ts @@ -77,7 +77,7 @@ declare namespace errorManager { * * @param { 'error' } type - error. * @param { ErrorObserver } observer - The error observer. - * @returns { number } Returns the number code of the observer. + * @returns { int } Returns the number code of the observer. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 16000003 - The specified ID does not exist. @@ -86,7 +86,7 @@ declare namespace errorManager { * @atomicservice * @since 19 */ - function on(type: 'error', observer: ErrorObserver): number; + function on(type: 'error', observer: ErrorObserver): int; /** * Unregister error observer. @@ -117,7 +117,7 @@ declare namespace errorManager { * Unregister error observer. * * @param { 'error' } type - error. - * @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 } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. @@ -127,7 +127,7 @@ declare namespace errorManager { * @atomicservice * @since 19 */ - function off(type: 'error', observerId: number, callback: AsyncCallback): void; + function off(type: 'error', observerId: int, callback: AsyncCallback): void; /** * Unregister error observer. @@ -158,7 +158,7 @@ declare namespace errorManager { * Unregister error observer. * * @param { 'error' } type - error. - * @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 } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. @@ -168,7 +168,7 @@ declare namespace errorManager { * @atomicservice * @since 19 */ - function off(type: 'error', observerId: number): Promise; + function off(type: 'error', observerId: int): Promise; /** * Register an error observer for all VM instances include worker and taskpool. @@ -266,7 +266,7 @@ declare namespace errorManager { /** * Define the instance type of VM. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Ability.AbilityRuntime.AbilityCore * @atomicservice * @since 18 @@ -329,7 +329,7 @@ declare namespace errorManager { * modification will overwrite the previous one. * * @param { 'loopObserver' } type - loopObserver. - * @param { number } timeout - Indicates timeout(ms) value of loop observer. + * @param { int } timeout - Indicates timeout(ms) value of loop observer. * @param { LoopObserver } observer - The loop observer. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; * 2. Incorrect parameter types; 3. Parameter verification failed. @@ -338,7 +338,7 @@ declare namespace errorManager { * @atomicservice * @since 19 */ - function on(type: 'loopObserver', timeout: number, observer: LoopObserver): void; + function on(type: 'loopObserver', timeout: int, observer: LoopObserver): void; /** * Unregister loop observer. This function can only by called from main thread. 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.wantAgent.d.ts b/api/@ohos.app.ability.wantAgent.d.ts index 4d624aae511c428ac4c6c6618aac4f11b371a892..c06e02e9fb1616b147e9c5ff6c813ad855eefd23 100644 --- a/api/@ohos.app.ability.wantAgent.d.ts +++ b/api/@ohos.app.ability.wantAgent.d.ts @@ -134,7 +134,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 getUid(agent: WantAgent, callback: AsyncCallback): void; @@ -162,7 +163,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 getUid(agent: WantAgent): Promise; @@ -889,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; @@ -906,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; @@ -923,7 +927,8 @@ declare namespace wantAgent { * @type { int } * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ finalCode: int; @@ -940,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; @@ -964,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; } diff --git a/api/@ohos.app.ability.wantConstant.d.ts b/api/@ohos.app.ability.wantConstant.d.ts index 3d81cfacb4f5681852bcce9e84e4a5d57125b781..4bc06044523955e7a4452bec30299940d94ec89a 100644 --- a/api/@ohos.app.ability.wantConstant.d.ts +++ b/api/@ohos.app.ability.wantConstant.d.ts @@ -378,7 +378,8 @@ declare namespace wantConstant { * Indicates the dest ability refers to a plugin ability. * * @syscap SystemCapability.Ability.AbilityBase - * @since 19 + * @since arkts {'1.1':'19', '1.2':'20'} + * @arkts 1.1&1.2 */ DESTINATION_PLUGIN_ABILITY = 'ohos.params.pluginAbility', @@ -387,7 +388,8 @@ declare namespace wantConstant { * * @syscap SystemCapability.Ability.AbilityBase * @atomicservice - * @since 17 + * @since arkts {'1.1':'17', '1.2':'20'} + * @arkts 1.1&1.2 */ APP_LAUNCH_TRUSTLIST = 'ohos.params.appLaunchTrustList', @@ -406,6 +408,7 @@ declare namespace wantConstant { * @syscap SystemCapability.Ability.AbilityBase * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ ATOMIC_SERVICE_SHARE_ROUTER = 'ohos.params.atomicservice.shareRouter', } diff --git a/api/@ohos.app.form.formProvider.d.ts b/api/@ohos.app.form.formProvider.d.ts index 02cf9ea01f3c56d0ee78677ad9452993c014fc1f..be6a67cd3058c3a67c66c1290c1fb5d14afc6fbe 100644 --- a/api/@ohos.app.form.formProvider.d.ts +++ b/api/@ohos.app.form.formProvider.d.ts @@ -77,8 +77,8 @@ declare namespace formProvider { * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. * @syscap SystemCapability.Ability.Form * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @arkts 1.1 */ function setFormNextRefreshTime(formId: string, minute: int, callback: AsyncCallback): void; @@ -117,11 +117,58 @@ declare namespace formProvider { * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. * @syscap SystemCapability.Ability.Form * @atomicservice - * @since arkts {'1.1':'11', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 + * @arkts 1.1 */ function setFormNextRefreshTime(formId: string, minute: int): Promise; + /** + * Set next update time for a specified form. + * + * @param { string } formId - Indicates the form ID. + * @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. + * @throws { BusinessError } 16500050 - IPC connection error. + * @throws { BusinessError } 16500060 - Service connection error. + * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. + * @throws { BusinessError } 16501000 - An internal functional error occurred. + * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. + * @throws { BusinessError } 16501002 - The number of forms exceeds the maximum allowed. + * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. + * @syscap SystemCapability.Ability.Form + * @since 20 + * @arkts 1.2 + */ + function setFormNextRefreshTimeWithCallback(formId: string, minute: int, callback: AsyncCallback): void; + + /** + * Set next update time for a specified form. + * + * @param { string } formId - Indicates the form ID. + * @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. + * @throws { BusinessError } 16500050 - IPC connection error. + * @throws { BusinessError } 16500060 - Service connection error. + * @throws { BusinessError } 16500100 - Failed to obtain the configuration information. + * @throws { BusinessError } 16501000 - An internal functional error occurred. + * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. + * @throws { BusinessError } 16501002 - The number of forms exceeds the maximum allowed. + * @throws { BusinessError } 16501003 - The form cannot be operated by the current application. + * @syscap SystemCapability.Ability.Form + * @since 20 + * @arkts 1.2 + */ + function setFormNextRefreshTimeReturnsPromise(formId: string, minute: int): Promise; + + /** + * @arkts 1.2 + */ + overload setFormNextRefreshTime { setFormNextRefreshTimeWithCallback, setFormNextRefreshTimeReturnsPromise }; + /** * Update a specified form. * Client to communication with FormManagerService. 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.arkui.ArcAlphabetIndexer.d.ts b/api/@ohos.arkui.ArcAlphabetIndexer.d.ts index d8561313e21dd5a07ef7928df922a4c686f209f0..0c926da8c71401ffa426852660f3028498a540c7 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 * @@ -70,6 +70,7 @@ declare type OnSelectCallback = (index: number) => void; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export interface ArcAlphabetIndexerInterface { /** @@ -96,6 +97,7 @@ export interface ArcAlphabetIndexerInterface { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ declare class ArcAlphabetIndexerAttribute extends CommonMethod { /** @@ -275,6 +277,16 @@ declare class ArcAlphabetIndexerAttribute extends CommonMethod { /** @@ -370,6 +374,7 @@ export declare class ArcListAttribute extends CommonMethod { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare class ArcListItemAttribute extends CommonMethod { /** @@ -404,6 +409,7 @@ export declare class ArcListItemAttribute extends CommonMethod { } @@ -93,6 +95,7 @@ export declare class ArcScrollBarAttribute 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 + * @noninterop + */ +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 + * @noninterop + */ +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 + * @noninterop + */ +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 + */ +/** + * Defines the ArcSwiper Component that can provide the ability for sub components to swipe and display. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @uicomponent + * @since 20 + * @noninterop + */ +declare let ArcSwiper: ArcSwiperInterface; + +/** + * Defines ArcSwiper Component instance. + * + * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @crossplatform + * @atomicservice + * @since 18 + * @noninterop + */ declare let ArcSwiperInstance: ArcSwiperAttribute; \ No newline at end of file diff --git a/api/@ohos.arkui.Prefetcher.static.d.ets b/api/@ohos.arkui.Prefetcher.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..c174af04541c33ff4d52efe5d5f779659dd129b0 --- /dev/null +++ b/api/@ohos.arkui.Prefetcher.static.d.ets @@ -0,0 +1,121 @@ +/* + * 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 + */ + +/** + * Implement this interface to provide data prefetching for the LazyForEach component. + * + * @extends IDataSource + * @interface IDataSourcePrefetching + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface IDataSourcePrefetching extends IDataSource { + /** + * Prefetches data for the specified element in the data collection. + * This method can be either synchronous or asynchronous. + * + * @param { int } index - Index of the item in the collection. + * @returns { Promise | void } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + prefetch(index: int): Promise | void; + + /** + * Cancels prefetching data for the specified element in the data collection. + * This method can be either synchronous or asynchronous. + * + * @param { int } index - Index of the item in the collection. + * @returns { Promise | void } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + cancel?(index: int): Promise | void; +} + +/** + * Implement this interface to provide prefetcher logic. + * + * @interface IPrefetcher + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface IPrefetcher { + /** + * Sets the data source to bind to this prefetcher. + * + * @param { IDataSourcePrefetching } dataSource - Data source that supports prefetching. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setDataSource(dataSource: IDataSourcePrefetching): void; + + /** + * Call this method when the visible area boundaries were changed. + * + * @param { int } minVisible - Index of the first visible data item. + * @param { int } maxVisible - Index of the last visible data item. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + visibleAreaChanged(minVisible: int, maxVisible: int): void; +} + +/** + * Basic implementation of {@link IPrefetcher}. + * It provides an intelligent data prefetching algorithm to make decisions about which data + * items should be prefetched in response to the real-time changes of visible on-screen area + * and changes in the duration of the prefetching. It also determines which prefetch requests + * should be canceled based on user scrolling actions. + * + * @implements IPrefetcher + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export class BasicPrefetcher implements IPrefetcher { + /** + * Constructs a basic prefetcher instance and optionally sets the data source. + * + * @param { IDataSourcePrefetching } [dataSource] - Data source that supports prefetching. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + constructor(dataSource?: IDataSourcePrefetching); + + /** + * Sets the data source to bind to this prefetcher. + * + * @param { IDataSourcePrefetching } dataSource - Data source that supports prefetching. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setDataSource(dataSource: IDataSourcePrefetching): void; + + /** + * Call this method when the visible area changed. + * + * @param { int } minVisible - Index of the first visible data item. + * @param { int } maxVisible - Index of the last visible data item. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + visibleAreaChanged(minVisible: int, maxVisible: int): void; +} diff --git a/api/@ohos.arkui.StateManagement.d.ts b/api/@ohos.arkui.StateManagement.d.ts index 1b53279d976244bc51cb7de750e2316115561823..a5bbb3bc1c5cea3cf77e48b261dba1e867d0696d 100644 --- a/api/@ohos.arkui.StateManagement.d.ts +++ b/api/@ohos.arkui.StateManagement.d.ts @@ -253,6 +253,7 @@ export declare type TypeDecorator = (type: TypeConstructor) => PropertyDec * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export declare const Type: TypeDecorator; diff --git a/api/@ohos.arkui.UIContext.d.ts b/api/@ohos.arkui.UIContext.d.ts index cba990663f4ffad21ec4a2a3d59be81170fc0c6c..9d65406671d9e58da81b472c842c4dd92fa4780c 100755 --- a/api/@ohos.arkui.UIContext.d.ts +++ b/api/@ohos.arkui.UIContext.d.ts @@ -25,11 +25,9 @@ import type inspector from './@ohos.arkui.inspector'; import promptAction, { LevelOrder } from './@ohos.promptAction'; import router from './@ohos.router'; import type componentUtils from './@ohos.arkui.componentUtils'; -/*** if arkts 1.1 */ import { ComponentContent, FrameNode, Frame } from './@ohos.arkui.node'; import type { AnimatorOptions, AnimatorResult } from './@ohos.animator'; import type observer from './@ohos.arkui.observer'; -/*** endif */ import { SimpleAnimatorOptions } from './@ohos.animator'; import type { Callback, AsyncCallback } from './@ohos.base'; import { MeasureOptions } from './@ohos.measure'; @@ -39,29 +37,6 @@ import image from './@ohos.multimedia.image'; import type common from './@ohos.app.ability.common'; import type pointer from './@ohos.multimodalInput.pointer'; -/*** if arkts 1.2 */ -import { ComponentContent, FrameNode, Frame } from '@ohos.arkui.node'; -import type observer from '@ohos.arkui.observer'; -import { AnimatorOptions, AnimatorResult } from './@ohos.animator'; -import { - ClickEvent, ExpectedFrameRateRange, DragItemInfo, AnimateParam, KeyframeAnimateParam, - KeyframeState, SheetOptions, PopupCommonOptions, MenuOptions, KeyEvent, Optional -} from './arkui/component/common'; -import { CustomBuilder } from './arkui/component/builder'; -import { GestureEvent, GestureRecognizer } from './arkui/component/gesture'; -import { ResourceStr, SizeOptions, VoidCallback } from './arkui/component/units'; -import { Nullable, Color, FontStyle, WidthBreakpoint, HeightBreakpoint, PixelRoundMode } from './arkui/component/enums'; -import { TimePickerDialogOptions } from './arkui/component/timePicker'; -import { AlertDialogParamWithConfirm, AlertDialogParamWithButtons, AlertDialogParamWithOptions } from './arkui/component/alertDialog'; -import { ActionSheetOptions } from './arkui/component/actionSheet'; -import { TextPickerDialogOptions } from './arkui/component/textPicker'; -import { LocalStorage } from './arkui/stateManagement/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'; -/*** endif */ /** * class Font * @@ -80,10 +55,9 @@ import { TextMenuOptions } from './arkui/component/textCommon'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ -export declare class Font { +export class Font { /** * Register a customized font in the FontManager. * @@ -99,8 +73,7 @@ export declare class Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ registerFont(options: font.FontOptions): void; @@ -120,8 +93,7 @@ export declare class Font { * @returns { Array } A list of font names * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ getSystemFontList(): Array; @@ -138,8 +110,7 @@ export declare class Font { * @returns { font.FontInfo } Returns the font info * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ getFontByName(fontName: string): font.FontInfo; } @@ -157,10 +128,9 @@ export declare class Font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ -export declare class MediaQuery { +export class MediaQuery { /** * Sets the media query criteria and returns the corresponding listening handle * @@ -178,8 +148,7 @@ export declare class MediaQuery { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ matchMediaSync(condition: string): mediaQuery.MediaQueryListener; } @@ -195,10 +164,9 @@ export declare class MediaQuery { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ -export declare class UIInspector { +export class UIInspector { /** * Sets the component after layout or draw criteria and returns the corresponding listening handle * @param { string } id - component id. @@ -214,8 +182,7 @@ export declare class UIInspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ createComponentObserver(id: string): inspector.ComponentObserver; } @@ -241,10 +208,9 @@ export declare class UIInspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ -export declare class Router { +export class Router { /** * Navigates to a specified page in the application. * @@ -276,8 +242,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ pushUrl(options: router.RouterOptions, callback: AsyncCallback): void; @@ -312,8 +277,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ pushUrl(options: router.RouterOptions): Promise; @@ -350,8 +314,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ pushUrl(options: router.RouterOptions, mode: router.RouterMode, callback: AsyncCallback): void; @@ -388,8 +351,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ pushUrl(options: router.RouterOptions, mode: router.RouterMode): Promise; @@ -422,8 +384,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ replaceUrl(options: router.RouterOptions, callback: AsyncCallback): void; @@ -456,8 +417,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ replaceUrl(options: router.RouterOptions): Promise; @@ -492,8 +452,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ replaceUrl(options: router.RouterOptions, mode: router.RouterMode, callback: AsyncCallback): void; @@ -528,8 +487,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ replaceUrl(options: router.RouterOptions, mode: router.RouterMode): Promise; @@ -556,8 +514,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ back(options?: router.RouterOptions): void; @@ -569,8 +526,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ back(index: number, params?: Object): void; @@ -587,8 +543,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ clear(): void; @@ -607,8 +562,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ getLength(): string; @@ -627,8 +581,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ getState(): router.RouterState; @@ -640,8 +593,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getStateByIndex(index: number): router.RouterState | undefined; @@ -653,8 +605,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getStateByUrl(url: string): Array; @@ -683,8 +634,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ showAlertBeforeBackPage(options: router.EnableAlertOptions): void; @@ -701,8 +651,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ hideAlertBeforeBackPage(): void; @@ -721,8 +670,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ getParams(): Object; @@ -755,8 +703,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ pushNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback): void; @@ -789,8 +736,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ pushNamedRoute(options: router.NamedRouterOptions): Promise; @@ -825,8 +771,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ pushNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode, callback: AsyncCallback): void; @@ -861,8 +806,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ pushNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise; @@ -893,8 +837,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ replaceNamedRoute(options: router.NamedRouterOptions, callback: AsyncCallback): void; @@ -922,8 +865,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ replaceNamedRoute(options: router.NamedRouterOptions): Promise; @@ -953,8 +895,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode, callback: AsyncCallback): void; @@ -987,8 +928,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ replaceNamedRoute(options: router.NamedRouterOptions, mode: router.RouterMode): Promise; } @@ -1000,8 +940,7 @@ export declare class Router { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ declare type CustomBuilderWithId = (id: number) => void; @@ -1012,8 +951,7 @@ declare type CustomBuilderWithId = (id: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ export interface TargetInfo { /** @@ -1023,8 +961,7 @@ export interface TargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ id: string | number; @@ -1035,8 +972,7 @@ export interface TargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ componentId?: number; } @@ -1054,10 +990,9 @@ export interface TargetInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ -export declare class PromptAction { +export class PromptAction { /** * Displays the notification text. * @@ -1083,8 +1018,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ showToast(options: promptAction.ShowToastOptions): void; @@ -1101,8 +1035,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ openToast(options: promptAction.ShowToastOptions): Promise; @@ -1119,8 +1052,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ closeToast(toastId: number): void; @@ -1167,8 +1099,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ showDialog(options: promptAction.ShowDialogOptions, callback: AsyncCallback): void; @@ -1200,8 +1131,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ showDialog(options: promptAction.ShowDialogOptions): Promise; @@ -1238,8 +1168,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ showActionMenu(options: promptAction.ActionMenuOptions, callback: AsyncCallback): void; @@ -1271,8 +1200,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ showActionMenu(options: promptAction.ActionMenuOptions): Promise; @@ -1291,8 +1219,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ openCustomDialog(dialogContent: ComponentContent, options?: promptAction.BaseDialogOptions): Promise; @@ -1314,8 +1241,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ openCustomDialogWithController(dialogContent: ComponentContent, controller: promptAction.DialogController, options?: promptAction.BaseDialogOptions): Promise; @@ -1336,8 +1262,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ updateCustomDialog(dialogContent: ComponentContent, options: promptAction.BaseDialogOptions): Promise; @@ -1355,8 +1280,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ closeCustomDialog(dialogContent: ComponentContent): Promise; @@ -1375,8 +1299,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ openCustomDialog(options: promptAction.CustomDialogOptions): Promise; @@ -1397,8 +1320,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ presentCustomDialog(builder: CustomBuilder | CustomBuilderWithId, controller?: promptAction.DialogController, options?: promptAction.DialogOptions): Promise; @@ -1415,8 +1337,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ closeCustomDialog(dialogId: number): void; @@ -1427,8 +1348,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ getTopOrder(): LevelOrder; @@ -1439,8 +1359,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ getBottomOrder(): LevelOrder; @@ -1462,8 +1381,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ openPopup(content: ComponentContent, target: TargetInfo, options?: PopupCommonOptions): Promise; @@ -1485,8 +1403,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ updatePopup(content: ComponentContent, options: PopupCommonOptions, partialUpdate?: boolean): Promise; @@ -1504,8 +1421,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ closePopup(content: ComponentContent): Promise; @@ -1527,8 +1443,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ openMenu(content: ComponentContent, target: TargetInfo, options?: MenuOptions): Promise; @@ -1550,8 +1465,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ updateMenu(content: ComponentContent, options: MenuOptions, partialUpdate?: boolean): Promise; @@ -1569,8 +1483,7 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ closeMenu(content: ComponentContent): Promise; } @@ -1586,10 +1499,9 @@ export declare class PromptAction { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ -type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode) => void; +declare type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode) => void; /** * Defines the callback type used in UIObserver watch pan event. @@ -1603,10 +1515,9 @@ type ClickEventListenerCallback = (event: ClickEvent, node?: FrameNode) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'19','1.2':'20' } - * @arkts 1.1&1.2 + * @since 19 */ -type PanListenerCallback = (event: GestureEvent, current: GestureRecognizer, node?: FrameNode) => void; +declare type PanListenerCallback = (event: GestureEvent, current: GestureRecognizer, node?: FrameNode) => void; /** * Defines the callback type used in UIObserver watch gesture. @@ -1619,10 +1530,9 @@ type PanListenerCallback = (event: GestureEvent, current: GestureRecognizer, nod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ -type GestureEventListenerCallback = (event: GestureEvent, node?: FrameNode) => void; +declare type GestureEventListenerCallback = (event: GestureEvent, node?: FrameNode) => void; /** * Defines the type can be used for identiting the node, for the string type, it's the inspector id @@ -1674,8 +1584,7 @@ export declare type GestureListenerCallback = (info: GestureTriggerInfo) => void * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ export interface PageInfo { /** @@ -1684,8 +1593,7 @@ export interface PageInfo { * @type { ?observer.RouterPageInfo } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ routerPageInfo?: observer.RouterPageInfo; @@ -1695,8 +1603,7 @@ export interface PageInfo { * @type { ?observer.NavDestinationInfo } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ navDestinationInfo?: observer.NavDestinationInfo; } @@ -1708,8 +1615,7 @@ export interface PageInfo { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'15','1.2':'20' } - * @arkts 1.1&1.2 + * @since 15 */ export interface OverlayManagerOptions { /** @@ -1720,8 +1626,7 @@ export interface OverlayManagerOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'15','1.2':'20' } - * @arkts 1.1&1.2 + * @since 15 */ renderRootOverlay?: boolean; @@ -1743,7 +1648,6 @@ export interface OverlayManagerOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ enableBackPressedEvent?: boolean; } @@ -1767,16 +1671,7 @@ export interface OverlayManagerOptions { * @atomicservice * @since 12 */ -/** - * Register callbacks to observe ArkUI behavior. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ -export declare class UIObserver { +export class UIObserver { /** * Subscribes to status changes of this **NavDestination** component. * @@ -1806,24 +1701,6 @@ export declare class UIObserver { */ on(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback: Callback): void; - /** - * Registers a callback function to be called when the navigation destination is updated. - * - * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. - * @param { observer.NavDestinationSwitchObserverOptions } options - The options object. - * @param { Callback } callback - The callback function to be called when the navigation destination is updated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - on( - type: 'navDestinationUpdate', - options: observer.NavDestinationSwitchObserverOptions, - callback: Callback - ): void; - /** * Removes a callback function that was previously registered with `on()`. * @@ -1848,25 +1725,6 @@ export declare class UIObserver { * @since 12 */ off(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback?: Callback): void; - - /** - * Removes a callback function that was previously registered with `on()`. - * - * @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'. - * @param { observer.NavDestinationSwitchObserverOptions } options - The options object. - * @param { Callback } callback - The callback function to remove. If not provided, all callbacks for the given event type and - * navigation ID will be removed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - off( - type: 'navDestinationUpdate', - options: observer.NavDestinationSwitchObserverOptions, - callback?: Callback - ): void; /** * Subscribes to status changes of this **NavDestination** component. @@ -1891,8 +1749,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'navDestinationUpdate', callback: Callback): void; @@ -1915,8 +1772,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'navDestinationUpdate', callback?: Callback): void; @@ -1956,8 +1812,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'scrollEvent', options: observer.ObserverOptions, callback: Callback): void; @@ -1971,8 +1826,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'scrollEvent', options: observer.ObserverOptions, callback?: Callback): void; @@ -1984,8 +1838,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'scrollEvent', callback: Callback): void; @@ -1998,8 +1851,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'scrollEvent', callback?: Callback): void; @@ -2022,8 +1874,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'routerPageUpdate', callback: Callback): void; @@ -2046,8 +1897,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'routerPageUpdate', callback?: Callback): void; @@ -2059,8 +1909,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'densityUpdate', callback: Callback): void; @@ -2073,8 +1922,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'densityUpdate', callback?: Callback): void; @@ -2086,8 +1934,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'willDraw', callback: Callback): void; @@ -2100,8 +1947,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'willDraw', callback?: Callback): void; @@ -2113,8 +1959,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'didLayout', callback: Callback): void; @@ -2127,8 +1972,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'didLayout', callback?: Callback): void; @@ -2141,8 +1985,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on( type: 'navDestinationSwitch', @@ -2158,8 +2001,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off( type: 'navDestinationSwitch', @@ -2176,8 +2018,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on( type: 'navDestinationSwitch', @@ -2195,8 +2036,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off( type: 'navDestinationSwitch', @@ -2213,8 +2053,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'willClick', callback: ClickEventListenerCallback): void; @@ -2227,8 +2066,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'willClick', callback?: ClickEventListenerCallback): void; @@ -2241,8 +2079,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'didClick', callback: ClickEventListenerCallback): void; @@ -2255,8 +2092,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'didClick', callback?: ClickEventListenerCallback): void; @@ -2269,8 +2105,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'willClick', callback: GestureEventListenerCallback): void; @@ -2283,8 +2118,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'willClick', callback?: GestureEventListenerCallback): void; @@ -2297,8 +2131,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'didClick', callback: GestureEventListenerCallback): void; @@ -2311,8 +2144,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'didClick', callback?: GestureEventListenerCallback): void; @@ -2325,8 +2157,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'19','1.2':'20' } - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'beforePanStart', callback: PanListenerCallback): void; @@ -2339,8 +2170,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'19','1.2':'20' } - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'beforePanStart', callback?: PanListenerCallback): void; @@ -2353,8 +2183,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'19','1.2':'20' } - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'beforePanEnd', callback: PanListenerCallback): void; @@ -2367,8 +2196,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'19','1.2':'20' } - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'beforePanEnd', callback?: PanListenerCallback): void; @@ -2381,8 +2209,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'19','1.2':'20' } - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'afterPanStart', callback: PanListenerCallback): void; @@ -2395,8 +2222,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'19','1.2':'20' } - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'afterPanStart', callback?: PanListenerCallback): void; @@ -2409,8 +2235,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'19','1.2':'20' } - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'afterPanEnd', callback: PanListenerCallback): void; @@ -2423,8 +2248,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'19','1.2':'20' } - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'afterPanEnd', callback?: PanListenerCallback): void; @@ -2438,8 +2262,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'tabContentUpdate', options: observer.ObserverOptions, callback: Callback): void; @@ -2453,8 +2276,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'tabContentUpdate', options: observer.ObserverOptions, callback?: Callback): void; @@ -2467,8 +2289,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'tabContentUpdate', callback: Callback): void; @@ -2481,8 +2302,7 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'tabContentUpdate', callback?: Callback): void; @@ -2574,10 +2394,9 @@ export declare class UIObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ -export declare class ComponentUtils { +export class ComponentUtils { /** * Provide the ability to obtain the coordinates and size of component drawing areas. * @@ -2595,8 +2414,7 @@ export declare class ComponentUtils { * @throws { BusinessError } 100001 - UI execution context not found. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ getRectangleById(id: string): componentUtils.ComponentInfo; } @@ -2606,10 +2424,9 @@ export declare class ComponentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ -export declare class OverlayManager { +export class OverlayManager { /** * Adds a specified ComponentContent node to the OverlayManager. * @@ -2629,8 +2446,7 @@ export declare class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ addComponentContent(content: ComponentContent, index?: number): void; @@ -2648,8 +2464,7 @@ export declare class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ addComponentContentWithOrder(content: ComponentContent, levelOrder?: LevelOrder): void; @@ -2660,8 +2475,7 @@ export declare class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ removeComponentContent(content: ComponentContent): void; @@ -2672,8 +2486,7 @@ export declare class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ showComponentContent(content: ComponentContent): void; @@ -2684,8 +2497,7 @@ export declare class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ hideComponentContent(content: ComponentContent): void; @@ -2695,8 +2507,7 @@ export declare class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ showAllComponentContents(): void; @@ -2706,8 +2517,7 @@ export declare class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ hideAllComponentContents(): void; } @@ -2725,8 +2535,7 @@ export declare class OverlayManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ export interface AtomicServiceBar { /** @@ -2735,8 +2544,7 @@ export interface AtomicServiceBar { * @param { boolean } visible - whether this bar is visible. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ setVisible(visible: boolean): void; @@ -2753,8 +2561,7 @@ export interface AtomicServiceBar { * @param { Nullable< Color | number | string> } color - the color to set, undefined indicates using default. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ setBackgroundColor(color: Nullable< Color | number | string>): void; @@ -2771,8 +2578,7 @@ export interface AtomicServiceBar { * @param { string } content - the content of the bar. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ setTitleContent(content: string): void; @@ -2789,8 +2595,7 @@ export interface AtomicServiceBar { * @param { FontStyle } font - the font style of the bar's title. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ setTitleFontStyle(font: FontStyle): void; @@ -2807,8 +2612,7 @@ export interface AtomicServiceBar { * @param { Nullable< Color | number | string> } color - the color to set to icon, undefined indicates using default. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ setIconColor(color: Nullable< Color | number | string>): void; @@ -2819,8 +2623,7 @@ export interface AtomicServiceBar { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'15','1.2':'20' } - * @arkts 1.1&1.2 + * @since 15 */ getBarRect(): Frame; } @@ -2906,18 +2709,16 @@ export interface GestureObserverConfigs { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ -export declare class DynamicSyncScene { +export class DynamicSyncScene { /** * Sets the FrameRateRange of the DynamicSyncScene. * * @param { ExpectedFrameRateRange } range - The range of frameRate. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ setFrameRateRange(range: ExpectedFrameRateRange): void; @@ -2927,8 +2728,7 @@ export declare class DynamicSyncScene { * @returns { ExpectedFrameRateRange } The range of frameRate. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getFrameRateRange(): ExpectedFrameRateRange; } @@ -2939,18 +2739,16 @@ export declare class DynamicSyncScene { * @extends DynamicSyncScene * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ -export declare class SwiperDynamicSyncScene extends DynamicSyncScene { +export class SwiperDynamicSyncScene extends DynamicSyncScene { /** * Type of the SwiperDynamicSyncSceneType. * @type { SwiperDynamicSyncSceneType } * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ readonly type: SwiperDynamicSyncSceneType; } @@ -2961,8 +2759,7 @@ export declare class SwiperDynamicSyncScene extends DynamicSyncScene { * @extends DynamicSyncScene * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'14','1.2':'20' } - * @arkts 1.1&1.2 + * @since 14 */ export class MarqueeDynamicSyncScene extends DynamicSyncScene { /** @@ -2971,8 +2768,7 @@ export class MarqueeDynamicSyncScene extends DynamicSyncScene { * @readonly * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'14','1.2':'20' } - * @arkts 1.1&1.2 + * @since 14 */ readonly type: MarqueeDynamicSyncSceneType; } @@ -2993,8 +2789,7 @@ export class MarqueeDynamicSyncScene extends DynamicSyncScene { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ export declare class DragController { /** @@ -3040,8 +2835,7 @@ export declare class DragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo, callback: AsyncCallback): void; @@ -3086,8 +2880,7 @@ export declare class DragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo) : Promise; @@ -3132,8 +2925,7 @@ export declare class DragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ createDragAction(customArray: Array, dragInfo: dragController.DragInfo): dragController.DragAction; @@ -3156,8 +2948,7 @@ export declare class DragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ getDragPreview(): dragController.DragPreview; @@ -3173,8 +2964,7 @@ export declare class DragController { * @param { boolean } enable - Indicating enable drag event strict reporting or not. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ setDragEventStrictReportingEnabled(enable: boolean): void; @@ -3183,8 +2973,7 @@ export declare class DragController { * @param { dragController.DragStartRequestStatus } requestStatus - Status about the drag start behavior. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ notifyDragStartRequest(requestStatus: dragController.DragStartRequestStatus): void; @@ -3196,8 +2985,7 @@ export declare class DragController { * @throws { BusinessError } 190004 - Operation failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'15','1.2':'20' } - * @arkts 1.1&1.2 + * @since 15 */ cancelDataLoading(key: string): void; @@ -3235,10 +3023,9 @@ export declare class DragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ -export declare class MeasureUtils { +export class MeasureUtils { /** * Obtains the width of the specified text in a single line layout. * @@ -3247,8 +3034,7 @@ export declare class MeasureUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ measureText(options: MeasureOptions): number; @@ -3260,8 +3046,7 @@ export declare class MeasureUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ measureTextSize(options: MeasureOptions): SizeOptions; @@ -3281,16 +3066,14 @@ export declare class MeasureUtils { * class FocusController * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ -export declare class FocusController { +export class FocusController { /** * clear focus to the root container. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ clearFocus(): void; @@ -3302,8 +3085,7 @@ export declare class FocusController { * @throws { BusinessError } 150003 - the component is not on tree or does not exist. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ requestFocus(key: string): void; @@ -3314,8 +3096,7 @@ export declare class FocusController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'14','1.2':'20' } - * @arkts 1.1&1.2 + * @since 14 */ activate(isActive: boolean, autoInactive?: boolean): void; @@ -3335,8 +3116,7 @@ export declare class FocusController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'14','1.2':'20' } - * @arkts 1.1&1.2 + * @since 14 */ setAutoFocusTransfer(isAutoFocusTransfer: boolean): void; @@ -3346,8 +3126,7 @@ export declare class FocusController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'15','1.2':'20' } - * @arkts 1.1&1.2 + * @since 15 */ setKeyProcessingMode(mode: KeyProcessingMode): void; } @@ -3358,8 +3137,7 @@ export declare class FocusController { * @typedef {pointer.PointerStyle} PointerStyle * @syscap SystemCapability.MultimodalInput.Input.Pointer * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ export type PointerStyle = pointer.PointerStyle; @@ -3369,18 +3147,16 @@ export type PointerStyle = pointer.PointerStyle; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ -export declare class CursorController { +export class CursorController { /** * Restore default cursor. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ restoreDefault(): void; /** @@ -3390,8 +3166,7 @@ export declare class CursorController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ setCursor(value: PointerStyle): void; } @@ -3402,8 +3177,7 @@ export declare class CursorController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ export declare class ContextMenuController { /** @@ -3412,8 +3186,7 @@ export declare class ContextMenuController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ close(): void; } @@ -3426,16 +3199,7 @@ export declare class ContextMenuController { * @atomicservice * @since 12 */ -/** - * Class FrameCallback - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ -export declare abstract class FrameCallback { +export abstract class FrameCallback { /** * Call when a new display frame is being rendered. * @@ -3444,8 +3208,7 @@ export declare abstract class FrameCallback { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ onFrame(frameTimeInNano: number): void; @@ -3457,8 +3220,7 @@ export declare abstract class FrameCallback { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ onIdle(timeLeftInNano: number): void; } @@ -3472,8 +3234,7 @@ export declare abstract class FrameCallback { * @StageModelOnly * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ export type Context = common.Context; @@ -3481,8 +3242,7 @@ export type Context = common.Context; * class ComponentSnapshot * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ export declare class ComponentSnapshot { /** @@ -3499,8 +3259,7 @@ export declare class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ get(id: string, callback: AsyncCallback, options?: componentSnapshot.SnapshotOptions): void; @@ -3518,8 +3277,7 @@ export declare class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ get(id: string, options?: componentSnapshot.SnapshotOptions): Promise; @@ -3541,8 +3299,7 @@ export declare class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ createFromBuilder(builder: CustomBuilder, callback: AsyncCallback, delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): void; @@ -3565,8 +3322,7 @@ export declare class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ createFromBuilder(builder: CustomBuilder, delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): Promise; @@ -3588,8 +3344,7 @@ export declare class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getSync(id: string, options?: componentSnapshot.SnapshotOptions): image.PixelMap; @@ -3607,8 +3362,7 @@ export declare class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'15','1.2':'20' } - * @arkts 1.1&1.2 + * @since 15 */ getWithUniqueId(uniqueId: number, options?: componentSnapshot.SnapshotOptions): Promise; @@ -3629,8 +3383,7 @@ export declare class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'15','1.2':'20' } - * @arkts 1.1&1.2 + * @since 15 */ getSyncWithUniqueId(uniqueId: number, options?: componentSnapshot.SnapshotOptions): image.PixelMap; @@ -3652,8 +3405,7 @@ export declare class ComponentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ createFromComponent(content: ComponentContent, delay?: number, checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): Promise; @@ -3694,16 +3446,7 @@ export declare class ComponentSnapshot { * @atomicservice * @since 11 */ -/** - * class UIContext - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ -export declare class UIContext { +export class UIContext { /** * Checks whether the UiContext object ia available. * @@ -3730,8 +3473,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ getFont(): Font; @@ -3750,8 +3492,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ getMediaQuery(): MediaQuery; @@ -3768,8 +3509,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ getUIInspector(): UIInspector; @@ -3784,8 +3524,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getFilteredInspectorTree(filters?: Array): string; @@ -3802,8 +3541,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getFilteredInspectorTreeById(id: string, depth: number, filters?: Array): string; @@ -3822,8 +3560,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ getRouter(): Router; @@ -3842,8 +3579,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ getPromptAction(): PromptAction; @@ -3860,8 +3596,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ getComponentUtils(): ComponentUtils; @@ -3880,8 +3615,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getUIObserver(): UIObserver; @@ -3892,8 +3626,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getOverlayManager(): OverlayManager; @@ -3905,8 +3638,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'15','1.2':'20' } - * @arkts 1.1&1.2 + * @since 15 */ setOverlayManagerOptions(options: OverlayManagerOptions): boolean; @@ -3917,8 +3649,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'15','1.2':'20' } - * @arkts 1.1&1.2 + * @since 15 */ getOverlayManagerOptions(): OverlayManagerOptions; @@ -3947,8 +3678,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ createAnimator(options: AnimatorOptions): AnimatorResult; @@ -3964,8 +3694,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ createAnimator(options: AnimatorOptions | SimpleAnimatorOptions): AnimatorResult; @@ -3986,8 +3715,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ animateTo(value: AnimateParam, event: () => void): void; @@ -4007,8 +3735,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ showAlertDialog(options: AlertDialogParamWithConfirm | AlertDialogParamWithButtons | AlertDialogParamWithOptions): void; @@ -4027,8 +3754,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ showActionSheet(value: ActionSheetOptions): void; @@ -4047,8 +3773,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ showDatePickerDialog(options: DatePickerDialogOptions): void; @@ -4067,8 +3792,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ showTimePickerDialog(options: TimePickerDialogOptions): void; @@ -4087,8 +3811,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ showTextPickerDialog(options: TextPickerDialogOptions): void; @@ -4107,8 +3830,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ runScopedTask(callback: () => void): void; @@ -4120,8 +3842,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ setKeyboardAvoidMode(value: KeyboardAvoidMode): void; @@ -4131,8 +3852,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ getKeyboardAvoidMode(): KeyboardAvoidMode; @@ -4143,8 +3863,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ setPixelRoundMode(mode: PixelRoundMode): void; @@ -4155,8 +3874,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ getPixelRoundMode(): PixelRoundMode; @@ -4168,8 +3886,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'15','1.2':'20' } - * @arkts 1.1&1.2 + * @since 15 */ dispatchKeyEvent(node: number | string, event: KeyEvent): boolean; @@ -4179,8 +3896,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ getAtomicServiceBar(): Nullable; @@ -4203,8 +3919,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ getDragController(): DragController; @@ -4214,8 +3929,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getMeasureUtils(): MeasureUtils; @@ -4236,8 +3950,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ keyframeAnimateTo(param: KeyframeAnimateParam, keyframes: Array): void; @@ -4246,8 +3959,7 @@ export declare class UIContext { * @returns { FocusController } the FocusController * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getFocusController(): FocusController; @@ -4259,8 +3971,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 arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ animateToImmediately(param: AnimateParam, event: Callback): void; @@ -4272,8 +3983,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getFrameNodeById(id: string): FrameNode | null; @@ -4285,8 +3995,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getAttachedFrameNodeById(id: string): FrameNode | null; @@ -4305,8 +4014,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getFrameNodeByUniqueId(id: number): FrameNode | null; @@ -4320,8 +4028,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getPageInfoByUniqueId(id: number): PageInfo; @@ -4334,8 +4041,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getNavigationInfoByUniqueId(id: number): observer.NavigationInfo | undefined; @@ -4347,8 +4053,7 @@ export declare class UIContext { * set values less than 0 to 0 and values greater than 1 to 1. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ setDynamicDimming(id: string, value: number): void; @@ -4359,8 +4064,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getCursorController(): CursorController; @@ -4371,8 +4075,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getContextMenuController(): ContextMenuController; @@ -4381,8 +4084,7 @@ export declare class UIContext { * @returns { ComponentSnapshot } the ComponentSnapshot * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getComponentSnapshot(): ComponentSnapshot; @@ -4392,8 +4094,7 @@ export declare class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ vp2px(value: number): number; @@ -4403,8 +4104,7 @@ export declare class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ px2vp(value: number): number; @@ -4414,8 +4114,7 @@ export declare class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ fp2px(value: number): number; @@ -4425,8 +4124,7 @@ export declare class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ px2fp(value: number): number; @@ -4436,8 +4134,7 @@ export declare class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ lpx2px(value: number): number; @@ -4447,8 +4144,7 @@ export declare class UIContext { * @returns { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ px2lpx(value: number): number; @@ -4460,8 +4156,7 @@ export declare class UIContext { * @stagemodelonly * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getSharedLocalStorage(): LocalStorage | undefined; @@ -4473,8 +4168,7 @@ export declare class UIContext { * @stagemodelonly * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getHostContext(): Context | undefined; @@ -4485,8 +4179,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ getWindowName(): string | undefined; @@ -4496,8 +4189,7 @@ export declare class UIContext { * @returns { WidthBreakpoint } The width breakpoint of current window. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'13','1.2':'20' } - * @arkts 1.1&1.2 + * @since 13 */ getWindowWidthBreakpoint(): WidthBreakpoint; @@ -4507,8 +4199,7 @@ export declare class UIContext { * @returns { HeightBreakpoint } The height breakpoint of current window. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'13','1.2':'20' } - * @arkts 1.1&1.2 + * @since 13 */ getWindowHeightBreakpoint(): HeightBreakpoint; @@ -4539,8 +4230,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ openBindSheet(bindSheetContent: ComponentContent, sheetOptions?: SheetOptions, targetId?: number): Promise; @@ -4562,8 +4252,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ updateBindSheet(bindSheetContent: ComponentContent, sheetOptions: SheetOptions, partialUpdate?: boolean): Promise; @@ -4584,8 +4273,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ closeBindSheet(bindSheetContent: ComponentContent): Promise; @@ -4595,8 +4283,7 @@ export declare class UIContext { * @param { FrameCallback } frameCallback - The frame callback to run on the next frame. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ postFrameCallback(frameCallback: FrameCallback): void; @@ -4607,8 +4294,7 @@ export declare class UIContext { * @param { number } delayTime - The delay time in milliseconds, * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ postDelayedFrameCallback(frameCallback: FrameCallback, delayTime: number): void; @@ -4619,8 +4305,7 @@ export declare class UIContext { * @returns { Array} The instance of SwiperDynamicSyncScene. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ requireDynamicSyncScene(id: string): Array; @@ -4641,8 +4326,7 @@ export declare class UIContext { * @throws { BusinessError } 202 - The caller is not a system application. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts { '1.1':'13','1.2':'20' } - * @arkts 1.1&1.2 + * @since 13 */ clearResourceCache(): void; @@ -4653,8 +4337,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'13','1.2':'20' } - * @arkts 1.1&1.2 + * @since 13 */ isFollowingSystemFontScale(): boolean; @@ -4665,8 +4348,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'13','1.2':'20' } - * @arkts 1.1&1.2 + * @since 13 */ getMaxFontScale(): number; @@ -4678,8 +4360,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'13','1.2':'20' } - * @arkts 1.1&1.2 + * @since 13 */ bindTabsToScrollable(tabsController: TabsController, scroller: Scroller): void; @@ -4691,8 +4372,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'13','1.2':'20' } - * @arkts 1.1&1.2 + * @since 13 */ unbindTabsFromScrollable(tabsController: TabsController, scroller: Scroller): void; @@ -4705,8 +4385,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'13','1.2':'20' } - * @arkts 1.1&1.2 + * @since 13 */ bindTabsToNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void; @@ -4719,8 +4398,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'13','1.2':'20' } - * @arkts 1.1&1.2 + * @since 13 */ unbindTabsFromNestedScrollable(tabsController: TabsController, parentScroller: Scroller, childScroller: Scroller): void; @@ -4730,8 +4408,7 @@ export declare class UIContext { * @param { Optional } enabled - enable or disable swipe to back event. * @syscap SystemCapability.ArkUI.ArkUI.Circle * @atomicservice - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ enableSwipeBack(enabled: Optional): void; @@ -4743,8 +4420,7 @@ export declare class UIContext { * @throws { BusinessError } 202 - The caller is not a system application. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ freezeUINode(id: string, isFrozen: boolean): void; @@ -4756,8 +4432,7 @@ export declare class UIContext { * @throws { BusinessError } 202 - The caller is not a system application. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts { '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ freezeUINode(uniqueId: number, isFrozen: boolean): void; @@ -4768,8 +4443,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'16','1.2':'20' } - * @arkts 1.1&1.2 + * @since 16 */ getTextMenuController(): TextMenuController; @@ -4797,8 +4471,7 @@ export declare class UIContext { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'17','1.2':'20' } - * @arkts 1.1&1.2 + * @since 17 */ static createUIContextWithoutWindow(context: common.UIAbilityContext | common.ExtensionContext) : UIContext | undefined; @@ -4808,36 +4481,9 @@ export declare class UIContext { * @static * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'17','1.2':'20' } - * @arkts 1.1&1.2 + * @since 17 */ 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 - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - 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 - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - static getFocusedUIContext(): UIContext | undefined; } /** @@ -4847,8 +4493,7 @@ export declare class UIContext { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ export const enum KeyboardAvoidMode { @@ -4857,8 +4502,7 @@ export const enum KeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ OFFSET = 0, @@ -4867,8 +4511,7 @@ export const enum KeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'11','1.2':'20' } - * @arkts 1.1&1.2 + * @since 11 */ RESIZE = 1, @@ -4877,8 +4520,7 @@ export const enum KeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'14','1.2':'20' } - * @arkts 1.1&1.2 + * @since 14 */ OFFSET_WITH_CARET = 2, @@ -4887,8 +4529,7 @@ export const enum KeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'14','1.2':'20' } - * @arkts 1.1&1.2 + * @since 14 */ RESIZE_WITH_CARET = 3, @@ -4897,10 +4538,9 @@ export const enum KeyboardAvoidMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'14','1.2':'20' } - * @arkts 1.1&1.2 + * @since 14 */ - NONE = 4, + NONE = 4 } /** @@ -4909,8 +4549,7 @@ export const enum KeyboardAvoidMode { * @enum { number } SwiperDynamicSyncSceneType * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ export const enum SwiperDynamicSyncSceneType { /** @@ -4918,8 +4557,7 @@ export const enum SwiperDynamicSyncSceneType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ GESTURE = 0, @@ -4928,8 +4566,7 @@ export const enum SwiperDynamicSyncSceneType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ ANIMATION = 1 } @@ -4940,8 +4577,7 @@ export const enum SwiperDynamicSyncSceneType { * @enum { number } MarqueeDynamicSyncSceneType * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'14','1.2':'20' } - * @arkts 1.1&1.2 + * @since 14 */ export const enum MarqueeDynamicSyncSceneType { /** @@ -4949,8 +4585,7 @@ export const enum MarqueeDynamicSyncSceneType { * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts { '1.1':'14','1.2':'20' } - * @arkts 1.1&1.2 + * @since 14 */ ANIMATION = 1 } @@ -4961,10 +4596,9 @@ export const enum MarqueeDynamicSyncSceneType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'16','1.2':'20' } - * @arkts 1.1&1.2 + * @since 16 */ -export declare class TextMenuController { +export class TextMenuController { /** * Set text menu options. * @@ -4972,8 +4606,7 @@ export declare class TextMenuController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts { '1.1':'16','1.2':'20' } - * @arkts 1.1&1.2 + * @since 16 */ setMenuOptions(options: TextMenuOptions): void; diff --git a/api/@ohos.arkui.UIContext.static.d.ets b/api/@ohos.arkui.UIContext.static.d.ets new file mode 100755 index 0000000000000000000000000000000000000000..5b07f38ef099391f34701fc1f553b6fe4754a074 --- /dev/null +++ b/api/@ohos.arkui.UIContext.static.d.ets @@ -0,0 +1,3392 @@ +'use static'; +/* + * 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 + */ +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 from './@ohos.promptAction'; +import { LevelOrder } from './@ohos.promptAction'; +import router from './@ohos.router'; +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 type componentSnapshot from './@ohos.arkui.componentSnapshot'; +import type dragController from './@ohos.arkui.dragController'; +import image from './@ohos.multimedia.image'; +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 + * @since 20 + */ +export declare class Font { + /** + * Register a customized font in the FontManager. + * + * @param { font.FontOptions } options - FontOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @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 + * @since 20 + */ + getFontByName(fontName: string): font.FontInfo; +} + +/** + * class MediaQuery + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @since 20 + */ + matchMediaSync(condition: string): mediaQuery.MediaQueryListener; +} + +/** + * class UIInspector + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + createComponentObserver(id: string): inspector.ComponentObserver; +} + +/** + * class Router + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist + * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist + * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist + * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @throws { BusinessError } 100002 - Uri error. The URI of the page to redirect is incorrect or does not exist + * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the + * standard system. + * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does + * not exist. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the + * standard system. + * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does + * not exist. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the + * standard system. + * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does + * not exist. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Failed to get the delegate. This error code is thrown only in the standard + * system. + * @throws { BusinessError } 200002 - Uri error. The URI of the page to be used for replacement is incorrect or does + * not exist. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @since 20 + */ + back(options?: router.RouterOptions): void; + + /** + * Returns to the specified page. + * + * @param { number } index - index of page. + * @param { Object } [params] - params of page. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @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 + * @since 20 + */ + getLength(): string; + + /** + * Obtains information about the current page state. + * + * @returns { router.RouterState } Page state. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @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 + * @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: + *
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 + */ + showAlertBeforeBackPage(options: router.EnableAlertOptions): void; + + /** + * Hide alert before back page. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + hideAlertBeforeBackPage(): void; + + /** + * Obtains information about the current page params. + * + * @returns { Object } Page params. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. + * @throws { BusinessError } 100004 - Named route error. The named route does not exist. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. + * @throws { BusinessError } 100004 - Named route error. The named route does not exist. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. + * @throws { BusinessError } 100004 - Named route error. The named route does not exist. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @throws { BusinessError } 100003 - Page stack error. Too many pages are pushed. + * @throws { BusinessError } 100004 - Named route error. The named route does not exist. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - The UI execution context is not found. This error code is thrown only in the + * standard system. + * @throws { BusinessError } 100004 - Named route error. The named route does not exist. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 } 100004 - Named route error. The named route does not exist. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 } 100004 - Named route error. The named route does not exist. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Failed to get the delegate. This error code is thrown only in the standard + * system. + * @throws { BusinessError } 100004 - Named route error. The named route does not exist. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @since 20 + */ +export declare class PromptAction { + /** + * Displays the notification text. + * + * @param { promptAction.ShowToastOptions } options - Options. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + showToast(options: promptAction.ShowToastOptions): void; + + /** + * Displays the notification text. + * + * @param { promptAction.ShowToastOptions } options - Options. + * @returns { Promise } return the toast id that will be used by closeToast. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + openToast(options: promptAction.ShowToastOptions): Promise; + + /** + * Close the notification text. + * + * @param { number } toastId - the toast id that returned by openToast. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @throws { BusinessError } 103401 - Cannot find the toast. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
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 + */ + showDialog(options: promptAction.ShowDialogOptions, + callback: AsyncCallback): void; + + /** + * Displays the dialog box. + * + * @param { promptAction.ShowDialogOptions } options - Options. + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + showDialog(options: promptAction.ShowDialogOptions): Promise; + + /** + * Displays the menu. + * + * @param { promptAction.ActionMenuOptions } options - Options. + * @param { AsyncCallback } callback - the callback of showActionMenu. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + showActionMenu(options: promptAction.ActionMenuOptions, + callback: AsyncCallback): void; + + /** + * Displays the menu. + * + * @param { promptAction.ActionMenuOptions } options - Options. + * @returns { Promise } callback - the callback of showActionMenu. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal error. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + showActionMenu(options: promptAction.ActionMenuOptions): Promise; + + /** + * Open the custom dialog with frameNode. + * + * @param { ComponentContent } dialogContent - the content of custom dialog. + * @param { promptAction.BaseDialogOptions } options - Options. + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 103301 - The ComponentContent is incorrect. + * @throws { BusinessError } 103302 - Dialog content already exists. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + openCustomDialog(dialogContent: ComponentContent, + options?: promptAction.BaseDialogOptions): Promise; + + /** + * 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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 103301 - The ComponentContent is incorrect. + * @throws { BusinessError } 103302 - Dialog content already exists. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + openCustomDialogWithController(dialogContent: ComponentContent, + controller: promptAction.DialogController, + options?: promptAction.BaseDialogOptions): Promise; + + /** + * Update the custom dialog with frameNode. + * + * @param { ComponentContent } dialogContent - the content of custom dialog. + * @param { promptAction.BaseDialogOptions } options - Options. + * @returns { Promise } the promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 103301 - The ComponentContent is incorrect. + * @throws { BusinessError } 103303 - The ComponentContent cannot be found. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @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 + * @since 20 + */ +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 + * @since 20 + */ +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 + * @since 20 + */ +export interface PageInfo { + /** + * the property of router page information. + * + * @type { ?observer.RouterPageInfo } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + routerPageInfo?: observer.RouterPageInfo; + + /** + * the property of navDestination information. + * + * @type { ?observer.NavDestinationInfo } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + navDestinationInfo?: observer.NavDestinationInfo; +} + +/** + * the property of OverlayManager. + * + * @interface OverlayManagerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +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; + +/** + * 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 + * @since 20 + */ +export const enum NodeRenderState { + /** + * 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. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + 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 +} + +/** + * 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 + * @since 20 + */ +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 { + /** + * The gesture has been successfully recognized by the system, and the action-start/action callback will be + * executed immediately. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + WILL_START = 0, + + /** + * 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. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + 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 { + /** + * The tap gesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + TAP = 0, + + /** + * The long press gesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + LONG_PRESS = 1, + + /** + * The pan gesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PAN = 2, + + /** + * The pinch gesture. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + PINCH = 3, + + /** + * 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 + * @since 20 + */ +export interface AtomicServiceBar { + /** + * Set the visibility of the bar, except the icon. + * + * @param { boolean } visible - whether this bar is visible. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @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 + * @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 + * @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 + * @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 + * @since 20 + */ +export declare class DynamicSyncScene { + /** + * Sets the FrameRateRange of the DynamicSyncScene. + * + * @param { ExpectedFrameRateRange } range - The range of frameRate. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setFrameRateRange(range: ExpectedFrameRateRange): void; + + /** + * Gets the FrameRateRange of the DynamicSyncScene. + * + * @returns { ExpectedFrameRateRange } The range of frameRate. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getFrameRateRange(): ExpectedFrameRateRange; +} + +/** + * Represents a dynamic synchronization scene of Swiper. + * + * @extends DynamicSyncScene + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class SwiperDynamicSyncScene extends DynamicSyncScene { + /** + * 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 + * @since 20 + */ +export declare class MarqueeDynamicSyncScene extends DynamicSyncScene { + /** + * Type of the MarqueeDynamicSyncSceneType. + * @type { MarqueeDynamicSyncSceneType } + * @readonly + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + readonly type: MarqueeDynamicSyncSceneType; +} + +/** + * class DragController + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 { dragController.DragInfo } dragInfo - Information about the drag event. + * @param { AsyncCallback } callback - Callback that contains + * the drag event information. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal handling failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo, + callback: AsyncCallback): void; + + /** + * Execute a drag event. + * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. + * @param { dragController.DragInfo } dragInfo - Information about the drag event. + * @returns { Promise } A Promise with the drag event information. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal handling failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: dragController.DragInfo) + : Promise; + + /** + * Create one drag action object, which can be used for starting drag later or monitoring the drag status after + * drag started. + * @param { Array } customArray - Objects used for prompts displayed when the + * objects are dragged. + * @param { dragController.DragInfo } dragInfo - Information about the drag event. + * @returns { dragController.DragAction } one drag action object + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Internal handling failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + createDragAction(customArray: Array, + dragInfo: dragController.DragInfo): dragController.DragAction; + + /** + * Get a drag preview object. + * @returns { dragController.DragPreview } A drag preview object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * scope of the child. + * Please be noted, the default value of the flag is false, it means, for the same situation, the + * parent will not receive the leave notification, just the child can get the enter event, which is + * not fully strict. + * @param { boolean } enable - Indicating enable drag event strict reporting or not. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @since 20 + */ +export declare class MeasureUtils { + /** + * Obtains the width of the specified text in a single line layout. + * + * @param { MeasureOptions } options - Options. + * @returns { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + measureText(options: MeasureOptions): number; + + /** + * Obtains the width and height of the specified text in a single line layout. + * + * @param { MeasureOptions } options - Options of measure area occupied by text. + * @returns { SizeOptions } width and height for text to display + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + measureTextSize(options: MeasureOptions): SizeOptions; +} + +/** + * class FocusController + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class FocusController { + /** + * clear focus to the root container. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + clearFocus(): void; + + /** + * request focus to the specific component. + * @param { string } key - the inspector key of the component. + * @throws { BusinessError } 150001 - the component cannot be focused. + * @throws { BusinessError } 150002 - This component has an unfocusable ancestor. + * @throws { BusinessError } 150003 - the component is not on tree or does not exist. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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; +} + +/** + * Pointer style. + * + * @typedef {pointer.PointerStyle} PointerStyle + * @syscap SystemCapability.MultimodalInput.Input.Pointer + * @since 20 + */ +export type PointerStyle = pointer.PointerStyle; + +/** + * class CursorController + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class CursorController { + /** + * Restore default cursor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + restoreDefault(): void; + /** + * Set cursor style. + * + * @param { PointerStyle } value - cursor style enum. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setCursor(value: PointerStyle): void; +} + +/** + * class ContextMenuController + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class ContextMenuController { + /** + * Close context menu. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + close(): void; +} + +/** + * Class FrameCallback + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @since 20 + */ + onFrame(frameTimeInNano: number): void; + + /** + * Called at the end of the next idle frame. If there is no next frame, will request one automatically. + * + * @param { number } timeLeftInNano - The remaining time from the deadline for this frame. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + onIdle(timeLeftInNano: number): void; +} + +/** + * The base context of an ability or an application. It allows access to + * application-specific resources. + * + * @typedef { common.Context } Context + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @StageModelOnly + * @since 20 + */ +export type Context = common.Context; + +/** + * class ComponentSnapshot + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @since 20 + */ + get(id: string, callback: AsyncCallback, options?: componentSnapshot.SnapshotOptions): void; + + /** + * Get a component snapshot by component id. + * + * @param { string } id - Target component ID, set by developer through .id attribute. + * @param { componentSnapshot.SnapshotOptions } [options] - Define the snapshot options. + * @returns { Promise } A Promise with the snapshot in PixelMap format. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - Invalid ID. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 { 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 - Invalid ID. + * @throws { BusinessError } 160002 - Timeout. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getSyncWithUniqueId(uniqueId: number, options?: componentSnapshot.SnapshotOptions): image.PixelMap; + + /** + * Generate a snapshot from a custom component content. + * + * @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. + * @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 + */ + createFromComponent(content: ComponentContent, delay?: number, + checkImageStatus?: boolean, options?: componentSnapshot.SnapshotOptions): Promise; + + /** + * Get a component snapshot by component range. + * + * @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 { 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 + * @systemapi + * @since 20 + */ + getWithRange(start: NodeIdentity, end: NodeIdentity, isStartRect: boolean, + options?: componentSnapshot.SnapshotOptions): Promise; +} + +/** + * class UIContext + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class UIContext { + /** + * get object font. + * + * @returns { Font } object Font. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @since 20 + */ + getMediaQuery(): MediaQuery; + + /** + * get object UIInspector. + * @returns { UIInspector } object UIInspector. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getUIInspector(): UIInspector; + + /** + * get the filtered attributes of the component tree. + * @param { Array } [filters] - the list of filters used to filter out component tree to be obtained. + * @returns { string } the specified attributes of the component tree in json string. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getFilteredInspectorTree(filters?: Array): string; + + /** + * get the filtered attributes of the component tree with the specified id and depth + * @param { string } id - ID of the specified component tree to be obtained. + * @param { number } depth - depth of the component tree to be obtained. + * @param { Array } [filters] - the list of filters used to filter out component tree to be obtained. + * @returns { string } the specified attributes of the component tree in json string. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getFilteredInspectorTreeById(id: string, depth: number, filters?: Array): string; + + /** + * get object router. + * + * @returns { Router } object Router. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getRouter(): Router; + + /** + * get object PromptAction. + * + * @returns { PromptAction } object PromptAction. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getPromptAction(): PromptAction; + + /** + * get object ComponentUtils. + * @returns { ComponentUtils } object ComponentUtils. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getComponentUtils(): ComponentUtils; + + /** + * Get the UI observer. + * + * @returns { UIObserver } The UI observer. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getUIObserver(): UIObserver; + + /** + * Get object OverlayManager. + * + * @returns { OverlayManager } object OverlayManager. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @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 + * @since 20 + */ + runScopedTask(callback: () => void): void; + + /** + * Set KeyboardAvoidMode. The default mode is KeyboardAvoidMode.OFFSET + * + * @param { KeyboardAvoidMode } value - The mode of keyboard avoid. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + setKeyboardAvoidMode(value: KeyboardAvoidMode): void; + + /** + * Get KeyboardAvoidMode. + * @returns { KeyboardAvoidMode } The mode of keyboard avoid. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @since 20 + */ + getAtomicServiceBar(): Nullable; + + /** + * Get DragController. + * @returns { DragController } the DragController + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getDragController(): DragController; + + /** + * 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 + * @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. + * + * @param { AnimateParam } param - Set animation effect parameters. + * @param { Callback } event - Specify the closure function that displays dynamic effects, + * and the system will automatically insert transition animations for state changes caused by the closure function. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + animateToImmediately(param: AnimateParam, event: Callback): void; + + /** + * Get FrameNode by id. + * + * @param { string } id - The id of FrameNode. + * @returns { FrameNode | null } The instance of FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getFrameNodeById(id: string): FrameNode | null; + + /** + * Get the FrameNode attached to current window by id. + * + * @param { string } id - The id of FrameNode. + * @returns { FrameNode | null } The instance of FrameNode. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getAttachedFrameNodeById(id: string): FrameNode | null; + + /** + * Get FrameNode by uniqueId. + * + * @param { number } id - The uniqueId of the FrameNode. + * @returns { FrameNode | null } - The FrameNode with the target uniqueId, or null if the frameNode is not existed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getFrameNodeByUniqueId(id: number): FrameNode | null; + + /** + * Get page information of the frameNode with uniqueId. + * + * @param { number } id - The uniqueId of the target FrameNode. + * @returns { PageInfo } - The page information of the frameNode with the target uniqueId, includes + * navDestination and router page information. If the frame node does not have navDestination and + * router page information, it will return an empty object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getPageInfoByUniqueId(id: number): PageInfo; + + /** + * Get navigation information of the frameNode with uniqueId. + * + * @param { number } id - The uniqueId of the target FrameNode. + * @returns { observer.NavigationInfo | undefined } - The navigation information of the frameNode with the + * target uniqueId, or undefined if the frameNode is not existed or does not have navigation information. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getNavigationInfoByUniqueId(id: number): observer.NavigationInfo | 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 20 + */ + setDynamicDimming(id: string, value: number): void; + + /** + * Get object cursor controller. + * + * @returns { CursorController } object cursor controller. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getCursorController(): CursorController; + + /** + * Get object context menu controller. + * + * @returns { ContextMenuController } object context menu controller. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getContextMenuController(): ContextMenuController; + + /** + * Get ComponentSnapshot. + * @returns { ComponentSnapshot } the ComponentSnapshot + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getComponentSnapshot(): ComponentSnapshot; + + /** + * Converts a value in vp units to a value in px. + * @param { number } value + * @returns { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + vp2px(value: number): number; + + /** + * Converts a value in px units to a value in vp. + * @param { number } value + * @returns { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + px2vp(value: number): number; + + /** + * Converts a value in fp units to a value in px. + * @param { number } value + * @returns { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fp2px(value: number): number; + + /** + * Converts a value in px units to a value in fp. + * @param { number } value + * @returns { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + px2fp(value: number): number; + + /** + * Converts a value in lpx units to a value in px. + * @param { number } value + * @returns { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + lpx2px(value: number): number; + + /** + * Converts a value in px units to a value in lpx. + * @param { number } value + * @returns { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + px2lpx(value: number): number; + + /** + * Get current LocalStorage shared from stage. + * + * @returns { LocalStorage | undefined } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @stagemodelonly + * @since 20 + */ + getSharedLocalStorage(): LocalStorage | undefined; + + /** + * Obtains context of the ability. + * + * @returns { Context | undefined } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @stagemodelonly + * @since 20 + */ + getHostContext(): Context | undefined; + + /** + * 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 + * @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 + * @since 20 + */ + getWindowWidthBreakpoint(): WidthBreakpoint; + + /** + * Get the height breakpoint of current window. + * + * @returns { HeightBreakpoint } The height breakpoint of current window. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getWindowHeightBreakpoint(): HeightBreakpoint; + + /** + * Open the BindSheet. + * + * @param { ComponentContent } bindSheetContent - The content of BindSheet. + * @param { SheetOptions } sheetOptions - The options of sheet. + * @param { number } targetId - The uniqueId of the FrameNode to which BindSheet is attached. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 120001 - The bindSheetContent is incorrect. + * @throws { BusinessError } 120002 - The bindSheetContent already exists. + * @throws { BusinessError } 120004 - The targetId does not exist. + * @throws { BusinessError } 120005 - The node of targetId is not in the component tree. + * @throws { BusinessError } 120006 - The node of targetId is not a child of the page node or NavDestination node. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + openBindSheet(bindSheetContent: ComponentContent, sheetOptions?: SheetOptions, + targetId?: number): Promise; + + /** + * Update the BindSheet with sheetOptions. + * + * @param { ComponentContent } bindSheetContent - The content of BindSheet. + * @param { SheetOptions } sheetOptions - The update options of sheet. + * @param { boolean } partialUpdate - If true, only the specified properties in the sheetOptions are updated, + * otherwise the rest of the properties are overwritten with the default values. + * Default value is false. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 120001 - The bindSheetContent is incorrect. + * @throws { BusinessError } 120003 - The bindSheetContent cannot be found. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + updateBindSheet(bindSheetContent: ComponentContent, sheetOptions: SheetOptions, + partialUpdate?: boolean): Promise; + + /** + * Close the BindSheet. + * + * @param { ComponentContent } bindSheetContent - The content of BindSheet. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 120001 - The bindSheetContent is incorrect. + * @throws { BusinessError } 120003 - The bindSheetContent cannot be found. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + closeBindSheet(bindSheetContent: ComponentContent): Promise; + + /** + * Post a frame callback to run on the next frame. + * + * @param { FrameCallback } frameCallback - The frame callback to run on the next frame. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + postFrameCallback(frameCallback: FrameCallback): void; + + /** + * Post a frame callback to run on the next frame after the specified delay. + * + * @param { FrameCallback } frameCallback - The frame callback to run on the next frame. + * @param { number } delayTime - The delay time in milliseconds, + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + postDelayedFrameCallback(frameCallback: FrameCallback, delayTime: number): void; + + /** + * Require DynamicSyncScene by id. + * + * @param { string } id - The id of DynamicSyncScene. + * @returns { Array} The instance of SwiperDynamicSyncScene. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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. + * + * @throws { BusinessError } 202 - The caller is not a system application. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + clearResourceCache(): void; + + /** + * Checks whether current font scale follows the system. + * + * @returns { boolean } Returns true if current font scale follows the system; returns false otherwise. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + isFollowingSystemFontScale(): boolean; + + /** + * Get the max font scale. + * + * @returns { number } The max font scale. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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 + * @since 20 + */ +export const enum KeyboardAvoidMode { + /** + * 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 + * @since 20 + */ + RESIZE = 1, + + /** + * 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 + * @since 20 + */ + RESIZE_WITH_CARET = 3, + + /** + * 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 + * @since 20 + */ +export const enum SwiperDynamicSyncSceneType { + /** + * Scene type is GESTURE. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + GESTURE = 0, + + /** + * Scene type is ANIMATION. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + ANIMATION = 1 +} + +/** + * Enum of scene type for Marquee + * + * @enum { number } MarqueeDynamicSyncSceneType + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export const enum MarqueeDynamicSyncSceneType { + /** + * Scene type is ANIMATION. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @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.ArcButton.d.ets b/api/@ohos.arkui.advanced.ArcButton.d.ets index 31269ad4acbb9c5292e5dfdc0b7676ef7d927412..3d9a4303ad9098b05c00030bfc51bc8956b41ed4 100644 --- a/api/@ohos.arkui.advanced.ArcButton.d.ets +++ b/api/@ohos.arkui.advanced.ArcButton.d.ets @@ -28,6 +28,7 @@ import { ColorMetrics, LengthMetrics } from '@ohos.arkui.node'; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare enum ArcButtonPosition { /** @@ -58,6 +59,7 @@ export declare enum ArcButtonPosition { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare enum ArcButtonStyleMode { /** @@ -116,6 +118,7 @@ export declare enum ArcButtonStyleMode { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare enum ArcButtonStatus { /** @@ -155,6 +158,7 @@ export declare enum ArcButtonStatus { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ interface CommonArcButtonOptions { /** @@ -327,6 +331,7 @@ interface CommonArcButtonOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare class ArcButtonOptions { /** @@ -510,6 +515,7 @@ export declare class ArcButtonOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @Component export declare struct ArcButton { diff --git a/api/@ohos.arkui.advanced.ArcSlider.d.ets b/api/@ohos.arkui.advanced.ArcSlider.d.ets index 99741247f87543f4b0a97462996d2781bf18ecc7..678a385aafb50c1e05bc9f3c423207f119f81742 100644 --- a/api/@ohos.arkui.advanced.ArcSlider.d.ets +++ b/api/@ohos.arkui.advanced.ArcSlider.d.ets @@ -26,6 +26,7 @@ * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare enum ArcSliderPosition { @@ -59,6 +60,7 @@ export declare enum ArcSliderPosition { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ interface ArcSliderValueOptionsConstructorOptions { /** @@ -104,6 +106,7 @@ interface ArcSliderValueOptionsConstructorOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ObservedV2 declare class ArcSliderValueOptions { @@ -165,6 +168,7 @@ declare class ArcSliderValueOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ interface ArcSliderLayoutOptionsConstructorOptions { /** @@ -197,6 +201,7 @@ interface ArcSliderLayoutOptionsConstructorOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ObservedV2 declare class ArcSliderLayoutOptions { @@ -246,6 +251,7 @@ declare class ArcSliderLayoutOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ interface ArcSliderStyleOptionsConstructorOptions { /** @@ -316,6 +322,7 @@ interface ArcSliderStyleOptionsConstructorOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ObservedV2 declare class ArcSliderStyleOptions { @@ -405,6 +412,7 @@ declare class ArcSliderStyleOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ declare type ArcSliderTouchHandler = (event: TouchEvent) => void; @@ -417,6 +425,7 @@ declare type ArcSliderTouchHandler = (event: TouchEvent) => void; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ declare type ArcSliderChangeHandler = (progress: number) => void; @@ -429,6 +438,7 @@ declare type ArcSliderChangeHandler = (progress: number) => void; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ declare type ArcSliderEnlargeHandler = (isEnlarged: boolean) => void; @@ -440,6 +450,7 @@ declare type ArcSliderEnlargeHandler = (isEnlarged: boolean) => void; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ interface ArcSliderOptionsConstructorOptions { /** @@ -527,6 +538,7 @@ interface ArcSliderOptionsConstructorOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ObservedV2 declare class ArcSliderOptions { @@ -633,6 +645,7 @@ declare class ArcSliderOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @Component declare struct ArcSlider { diff --git a/api/@ohos.arkui.advanced.Chip.d.ets b/api/@ohos.arkui.advanced.Chip.d.ets index bbbfa32252a293f5771298301efd15c165fb3855..9977ba7a5d9c258b17ded4cc83a4029fbe624069 100644 --- a/api/@ohos.arkui.advanced.Chip.d.ets +++ b/api/@ohos.arkui.advanced.Chip.d.ets @@ -39,6 +39,7 @@ import { SymbolGlyphModifier } from './@ohos.arkui.modifier'; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export declare enum ChipSize { @@ -86,6 +87,7 @@ export declare enum ChipSize { * @crossplatform * @atomicservice * @since 14 + * @noninterop */ export declare enum AccessibilitySelectedType { /** @@ -135,6 +137,7 @@ export declare enum AccessibilitySelectedType { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface IconCommonOptions { @@ -225,6 +228,7 @@ export interface IconCommonOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface SuffixIconOptions extends IconCommonOptions { @@ -300,6 +304,7 @@ export interface SuffixIconOptions extends IconCommonOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface PrefixIconOptions extends IconCommonOptions {} @@ -311,6 +316,7 @@ export interface PrefixIconOptions extends IconCommonOptions {} * @crossplatform * @atomicservice * @since 14 + * @noninterop */ export interface AccessibilityOptions { /** @@ -356,6 +362,7 @@ export interface AccessibilityOptions { * @crossplatform * @atomicservice * @since 14 + * @noninterop */ export interface CloseOptions extends AccessibilityOptions {} @@ -366,6 +373,7 @@ export interface CloseOptions extends AccessibilityOptions {} * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export interface ChipSymbolGlyphOptions { @@ -398,6 +406,7 @@ export interface ChipSymbolGlyphOptions { * @crossplatform * @atomicservice * @since 14 + * @noninterop */ export interface ChipSuffixSymbolGlyphOptions { /** @@ -450,6 +459,7 @@ export interface ChipSuffixSymbolGlyphOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface LabelMarginOptions { @@ -500,6 +510,7 @@ export interface LabelMarginOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface LocalizedLabelMarginOptions { @@ -542,6 +553,7 @@ export interface LocalizedLabelMarginOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface LabelOptions { @@ -679,6 +691,7 @@ export interface LabelOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface ChipOptions { /** @@ -989,6 +1002,7 @@ export interface ChipOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ @Builder export declare function Chip(options: ChipOptions): void; \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.ChipGroup.d.ets b/api/@ohos.arkui.advanced.ChipGroup.d.ets index 1242e40f7ab976df799aa0b5a870eef8a043d748..05705ffca9b191173edb8a90996440300242cafb 100644 --- a/api/@ohos.arkui.advanced.ChipGroup.d.ets +++ b/api/@ohos.arkui.advanced.ChipGroup.d.ets @@ -30,6 +30,7 @@ import { SymbolGlyphModifier } from './@ohos.arkui.modifier'; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface IconOptions { @@ -64,6 +65,7 @@ export interface IconOptions { * @crossplatform * @atomicservice * @since 14 + * @noninterop */ export interface SuffixImageIconOptions extends IconOptions { /** @@ -120,6 +122,7 @@ export interface SuffixImageIconOptions extends IconOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface LabelOptions { @@ -144,6 +147,7 @@ export interface LabelOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface ChipGroupItemOptions { @@ -279,6 +283,7 @@ export interface ChipGroupItemOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface ChipItemStyle { @@ -347,6 +352,7 @@ export interface ChipItemStyle { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface ChipGroupSpaceOptions { @@ -392,6 +398,7 @@ export interface ChipGroupSpaceOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface IconItemOptions { /** @@ -458,6 +465,7 @@ export interface IconItemOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 14 + * @noninterop */ export interface SymbolItemOptions { /** @@ -524,6 +532,7 @@ export interface SymbolItemOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface ChipGroupPaddingOptions { /** @@ -557,6 +566,7 @@ export interface ChipGroupPaddingOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ @Component export declare struct IconGroupSuffix { @@ -591,6 +601,7 @@ export declare struct IconGroupSuffix { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ @Component export declare struct ChipGroup { diff --git a/api/@ohos.arkui.advanced.ComposeListItem.d.ets b/api/@ohos.arkui.advanced.ComposeListItem.d.ets index e62ea4898c24b03b8173ca0e6620dc5969386935..692354ee1cb586292ff2976a9606a0887d7432bc 100644 --- a/api/@ohos.arkui.advanced.ComposeListItem.d.ets +++ b/api/@ohos.arkui.advanced.ComposeListItem.d.ets @@ -18,20 +18,14 @@ * @kit ArkUI */ -/*** if 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'; -/*** endif */ - /** * Declare enum IconType * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 */ + + /** * Declare enum IconType * @enum { number } @@ -46,7 +40,7 @@ import { Builder } from './arkui/component/builder'; * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 + * @noninterop */ export declare enum IconType { /** @@ -66,7 +60,6 @@ export declare enum IconType { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ BADGE = 1, /** @@ -86,7 +79,6 @@ export declare enum IconType { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ NORMAL_ICON = 2, /** @@ -106,7 +98,6 @@ export declare enum IconType { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ SYSTEM_ICON = 3, /** @@ -126,7 +117,6 @@ export declare enum IconType { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ HEAD_SCULPTURE = 4, /** @@ -146,7 +136,6 @@ export declare enum IconType { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ APP_ICON = 5, /** @@ -166,7 +155,6 @@ export declare enum IconType { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ PREVIEW = 6, /** @@ -186,7 +174,6 @@ export declare enum IconType { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ LONGITUDINAL = 7, /** @@ -206,7 +193,6 @@ export declare enum IconType { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ VERTICAL = 8 } @@ -228,7 +214,7 @@ export declare enum IconType { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 + * @noninterop */ export declare class OperateIcon { /** @@ -251,7 +237,6 @@ export declare class OperateIcon { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ value: ResourceStr; @@ -269,7 +254,6 @@ export declare class OperateIcon { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ symbolStyle?: SymbolGlyphModifier; @@ -293,7 +277,6 @@ export declare class OperateIcon { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ action?: () => void; @@ -313,7 +296,6 @@ export declare class OperateIcon { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ accessibilityText?: ResourceStr; @@ -333,7 +315,6 @@ export declare class OperateIcon { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ accessibilityDescription?: ResourceStr; @@ -355,7 +336,6 @@ export declare class OperateIcon { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ accessibilityLevel?: string; } @@ -377,7 +357,7 @@ export declare class OperateIcon { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 + * @noninterop */ export declare class OperateCheck { /** @@ -400,7 +380,6 @@ export declare class OperateCheck { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ isCheck?: boolean; @@ -424,7 +403,6 @@ export declare class OperateCheck { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ onChange?: (value: boolean) => void; @@ -444,7 +422,6 @@ export declare class OperateCheck { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ accessibilityText?: ResourceStr; @@ -464,7 +441,6 @@ export declare class OperateCheck { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ accessibilityDescription?: ResourceStr; @@ -486,7 +462,6 @@ export declare class OperateCheck { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ accessibilityLevel?: string; } @@ -508,7 +483,7 @@ export declare class OperateCheck { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 + * @noninterop */ export declare class OperateButton { /** @@ -531,7 +506,6 @@ export declare class OperateButton { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ text?: ResourceStr; @@ -551,7 +525,6 @@ export declare class OperateButton { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ accessibilityText?: ResourceStr; @@ -571,7 +544,6 @@ export declare class OperateButton { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ accessibilityDescription?: ResourceStr; @@ -593,7 +565,6 @@ export declare class OperateButton { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ accessibilityLevel?: string; } @@ -615,7 +586,7 @@ export declare class OperateButton { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 + * @noninterop */ export declare class ContentItem { /** @@ -638,7 +609,6 @@ export declare class ContentItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ iconStyle?: IconType; @@ -662,7 +632,6 @@ export declare class ContentItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ icon?: ResourceStr; @@ -680,7 +649,6 @@ export declare class ContentItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ symbolStyle?: SymbolGlyphModifier; @@ -704,7 +672,6 @@ export declare class ContentItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ primaryText?: ResourceStr; @@ -728,7 +695,6 @@ export declare class ContentItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ secondaryText?: ResourceStr; @@ -752,7 +718,6 @@ export declare class ContentItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ description?: ResourceStr; } @@ -774,7 +739,7 @@ export declare class ContentItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 + * @noninterop */ export declare class OperateItem { /** @@ -797,7 +762,6 @@ export declare class OperateItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ icon?: OperateIcon; @@ -821,7 +785,6 @@ export declare class OperateItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ subIcon?: OperateIcon; @@ -845,7 +808,6 @@ export declare class OperateItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ button?: OperateButton; @@ -869,21 +831,9 @@ export declare class OperateItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1 */ switch?: OperateCheck; - /** - * Sets the toggle. - * @type { ?OperateCheck } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - toggle?: OperateCheck; - /** * Sets the checkBox. * @type { ?OperateCheck } @@ -904,7 +854,6 @@ export declare class OperateItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ checkbox?: OperateCheck; @@ -928,7 +877,6 @@ export declare class OperateItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ radio?: OperateCheck; @@ -952,7 +900,6 @@ export declare class OperateItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ image?: ResourceStr; @@ -970,7 +917,6 @@ export declare class OperateItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ symbolStyle?: SymbolGlyphModifier; @@ -994,7 +940,6 @@ export declare class OperateItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ text?: ResourceStr; @@ -1018,7 +963,6 @@ export declare class OperateItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ arrow?: OperateIcon; } @@ -1046,7 +990,7 @@ export declare class OperateItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 + * @noninterop */ @Component export declare struct ComposeListItem { @@ -1070,21 +1014,9 @@ export declare struct ComposeListItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1 */ @Prop contentItem?: ContentItem; - /** - * The ContentItem. - * @type { ?ContentItem } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - @PropRef contentItem?: ContentItem; - /** * The OperateItem. * @type { ?OperateItem } @@ -1105,27 +1037,6 @@ export declare struct ComposeListItem { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1 */ @Prop operateItem?: OperateItem; - - /** - * The OperateItem. - * @type { ?OperateItem } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - @PropRef operateItem?: OperateItem; - - /** - * The method to build component. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - @Builder build(): void; } \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.ComposeTitleBar.d.ets b/api/@ohos.arkui.advanced.ComposeTitleBar.d.ets index a6fc36e28c48a9e4d77e3ecbba0e4701550a7ad5..63dd48397d5e57551d251d98fbdea7153399f374 100644 --- a/api/@ohos.arkui.advanced.ComposeTitleBar.d.ets +++ b/api/@ohos.arkui.advanced.ComposeTitleBar.d.ets @@ -32,6 +32,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ /** * Declaration of the menu item on the right side. @@ -218,6 +219,7 @@ export declare class ComposeTitleBarMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ /** * Declaration of the composable title bar. diff --git a/api/@ohos.arkui.advanced.Counter.d.ets b/api/@ohos.arkui.advanced.Counter.d.ets index c4fbb5de1830caaa9e925abe0539bbc17f7fe189..627b90da88d8c77d0744832ae563b20c5273430f 100644 --- a/api/@ohos.arkui.advanced.Counter.d.ets +++ b/api/@ohos.arkui.advanced.Counter.d.ets @@ -34,6 +34,7 @@ * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare enum CounterType { /** @@ -111,6 +112,7 @@ declare enum CounterType { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare class CommonOptions { /** @@ -206,6 +208,7 @@ declare class CommonOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare class InlineStyleOptions extends CommonOptions { /** @@ -326,6 +329,7 @@ declare class InlineStyleOptions extends CommonOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare class NumberStyleOptions extends InlineStyleOptions { /** @@ -438,6 +442,7 @@ declare class NumberStyleOptions extends InlineStyleOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare class DateData { /** @@ -554,6 +559,7 @@ declare class DateData { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare class DateStyleOptions extends CommonOptions { /** @@ -654,6 +660,7 @@ declare class DateStyleOptions extends CommonOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare class CounterOptions { /** @@ -758,6 +765,7 @@ declare class CounterOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ @Component declare struct CounterComponent { diff --git a/api/@ohos.arkui.advanced.Dialog.d.ets b/api/@ohos.arkui.advanced.Dialog.d.ets index 2cf3a85e2384593100e1f09618498b3f508b5ee6..78ff88a60554294d06059cd984878c8ecd57fc76 100644 --- a/api/@ohos.arkui.advanced.Dialog.d.ets +++ b/api/@ohos.arkui.advanced.Dialog.d.ets @@ -42,6 +42,7 @@ import { Theme, CustomTheme } from '@ohos.arkui.theme'; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare class ButtonOptions { /** @@ -180,6 +181,7 @@ export declare class ButtonOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @CustomDialog export declare struct TipsDialog { @@ -473,6 +475,7 @@ export declare struct TipsDialog { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @CustomDialog export declare struct SelectDialog { @@ -647,6 +650,7 @@ export declare struct SelectDialog { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @CustomDialog export declare struct ConfirmDialog { @@ -859,6 +863,7 @@ export declare struct ConfirmDialog { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @CustomDialog export declare struct AlertDialog { @@ -1007,6 +1012,7 @@ export declare struct AlertDialog { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @CustomDialog export declare struct LoadingDialog { @@ -1082,6 +1088,7 @@ export declare struct LoadingDialog { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ @CustomDialog export declare struct CustomContentDialog { @@ -1177,6 +1184,7 @@ export declare struct CustomContentDialog { * @crossplatform * @atomicservice * @since 14 + * @noninterop */ @Component export declare struct PopoverDialog { @@ -1224,6 +1232,7 @@ export declare struct PopoverDialog { * @crossplatform * @atomicservice * @since 14 + * @noninterop */ export declare interface PopoverOptions extends CustomPopupOptions { } diff --git a/api/@ohos.arkui.advanced.DialogV2.d.ets b/api/@ohos.arkui.advanced.DialogV2.d.ets index ea718b4be8ac7339b2587d6868f3f21dcbc9bbc1..ef37040175b41e6ea11b10576132028d5d328ef7 100644 --- a/api/@ohos.arkui.advanced.DialogV2.d.ets +++ b/api/@ohos.arkui.advanced.DialogV2.d.ets @@ -26,6 +26,7 @@ * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare type AdvancedDialogV2ButtonAction = () => void; @@ -37,6 +38,7 @@ export declare type AdvancedDialogV2ButtonAction = () => void; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ObservedV2 export declare class AdvancedDialogV2Button { @@ -152,6 +154,7 @@ export declare class AdvancedDialogV2Button { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare interface AdvancedDialogV2ButtonOptions { /** @@ -249,6 +252,7 @@ export declare interface AdvancedDialogV2ButtonOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare type AdvancedDialogV2OnCheckedChange = (checked: boolean) => void; @@ -260,6 +264,7 @@ export declare type AdvancedDialogV2OnCheckedChange = (checked: boolean) => void * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ComponentV2 export declare struct TipsDialogV2 { @@ -394,6 +399,7 @@ export declare struct TipsDialogV2 { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ComponentV2 export declare struct SelectDialogV2 { @@ -463,6 +469,7 @@ export declare struct SelectDialogV2 { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ComponentV2 export declare struct ConfirmDialogV2 { @@ -554,6 +561,7 @@ export declare struct ConfirmDialogV2 { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ComponentV2 export declare struct AlertDialogV2 { @@ -623,6 +631,7 @@ export declare struct AlertDialogV2 { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ComponentV2 export declare struct LoadingDialogV2 { @@ -647,6 +656,7 @@ export declare struct LoadingDialogV2 { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ComponentV2 export declare struct CustomContentDialogV2 { @@ -714,6 +724,7 @@ export declare struct CustomContentDialogV2 { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ComponentV2 export declare struct PopoverDialogV2 { @@ -774,6 +785,7 @@ export declare struct PopoverDialogV2 { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare type PopoverDialogV2OnVisibleChange = (visible: boolean) => void; @@ -786,6 +798,7 @@ export declare type PopoverDialogV2OnVisibleChange = (visible: boolean) => void; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare interface PopoverDialogV2Options extends CustomPopupOptions { } diff --git a/api/@ohos.arkui.advanced.DownloadFileButton.d.ets b/api/@ohos.arkui.advanced.DownloadFileButton.d.ets index 4dadd5eb536a624aa90fd3d942c07877a405a27c..1b0c5ca03229d2fa7cc1344ff4cec5943fdd0855 100644 --- a/api/@ohos.arkui.advanced.DownloadFileButton.d.ets +++ b/api/@ohos.arkui.advanced.DownloadFileButton.d.ets @@ -26,6 +26,7 @@ * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export declare enum DownloadIconStyle { /** @@ -57,6 +58,7 @@ export declare enum DownloadIconStyle { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export declare enum DownloadDescription { @@ -149,6 +151,7 @@ export declare enum DownloadDescription { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export declare enum DownloadLayoutDirection { @@ -181,6 +184,7 @@ export declare enum DownloadLayoutDirection { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface DownloadContentOptions { /** @@ -214,6 +218,7 @@ export interface DownloadContentOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface DownloadStyleOptions { @@ -324,6 +329,7 @@ export interface DownloadStyleOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ @Component export declare struct DownloadFileButton { diff --git a/api/@ohos.arkui.advanced.EditableTitleBar.d.ets b/api/@ohos.arkui.advanced.EditableTitleBar.d.ets index 16b6821c860ff442a168950a925a7fb066602ce1..75ca1ff796811281b0905f092349ab885f98e6d1 100644 --- a/api/@ohos.arkui.advanced.EditableTitleBar.d.ets +++ b/api/@ohos.arkui.advanced.EditableTitleBar.d.ets @@ -32,6 +32,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ export declare class EditableTitleBarMenuItem { /** @@ -142,6 +143,7 @@ export declare class EditableTitleBarMenuItem { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export type EditableTitleBarItem = EditableTitleBarMenuItem; @@ -157,6 +159,7 @@ export type EditableTitleBarItem = EditableTitleBarMenuItem; * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ export declare enum EditableLeftIconType { /** @@ -194,6 +197,7 @@ export declare enum EditableLeftIconType { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export declare interface EditableTitleBarOptions { /** @@ -251,6 +255,7 @@ export declare interface EditableTitleBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ @Component export declare struct EditableTitleBar { diff --git a/api/@ohos.arkui.advanced.ExceptionPrompt.d.ets b/api/@ohos.arkui.advanced.ExceptionPrompt.d.ets index 3a0898c50e3537cd7077a8082e54088585e82309..b8a28b70f0af0c3411c08eb48b0d4682485bb972 100644 --- a/api/@ohos.arkui.advanced.ExceptionPrompt.d.ets +++ b/api/@ohos.arkui.advanced.ExceptionPrompt.d.ets @@ -32,6 +32,7 @@ * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export declare enum MarginType { /** @@ -79,6 +80,7 @@ export declare enum MarginType { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface PromptOptions { /** @@ -205,6 +207,7 @@ export interface PromptOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ @Component export declare struct ExceptionPrompt { diff --git a/api/@ohos.arkui.advanced.Filter.d.ets b/api/@ohos.arkui.advanced.Filter.d.ets index 0590758fff6bd3f8cd922363f967b0d065fb8bc1..445b315d3e76c98d07b44d8d3035de57365d5e09 100644 --- a/api/@ohos.arkui.advanced.Filter.d.ets +++ b/api/@ohos.arkui.advanced.Filter.d.ets @@ -36,6 +36,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ export declare enum FilterType { /** @@ -75,6 +76,7 @@ export declare enum FilterType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ export declare class FilterParams { /** @@ -119,6 +121,7 @@ export declare class FilterParams { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ export declare class FilterResult { /** @@ -175,6 +178,7 @@ export declare class FilterResult { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ @Component export declare struct Filter { diff --git a/api/@ohos.arkui.advanced.FoldSplitContainer.d.ets b/api/@ohos.arkui.advanced.FoldSplitContainer.d.ets index 4c647daed5a1797c667e24fec8d7ccba7fc5499c..34c6237ecf63d33eadf63c46224729d1969e9f5f 100644 --- a/api/@ohos.arkui.advanced.FoldSplitContainer.d.ets +++ b/api/@ohos.arkui.advanced.FoldSplitContainer.d.ets @@ -30,6 +30,7 @@ import { Callback } from '@ohos.base'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare enum ExtraRegionPosition { /** @@ -56,6 +57,7 @@ export declare enum ExtraRegionPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export interface ExpandedRegionLayoutOptions { /** @@ -102,6 +104,7 @@ export interface ExpandedRegionLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export interface HoverModeRegionLayoutOptions { /** @@ -139,6 +142,7 @@ export interface HoverModeRegionLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export interface FoldedRegionLayoutOptions { /** @@ -158,6 +162,7 @@ export interface FoldedRegionLayoutOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare enum PresetSplitRatio { /** @@ -192,6 +197,7 @@ export declare enum PresetSplitRatio { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export interface HoverModeStatus { /** @@ -240,6 +246,7 @@ export interface HoverModeStatus { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export type OnHoverStatusChangeHandler = (status: HoverModeStatus) => void; /** @@ -249,6 +256,7 @@ export type OnHoverStatusChangeHandler = (status: HoverModeStatus) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ @Component export declare struct FoldSplitContainer { diff --git a/api/@ohos.arkui.advanced.FormMenu.d.ets b/api/@ohos.arkui.advanced.FormMenu.d.ets index 439220da814c5955582229a69fe754e4fd7a65b7..dc7d4486843143e06db2f7dd6544373cb5d75625 100755 --- a/api/@ohos.arkui.advanced.FormMenu.d.ets +++ b/api/@ohos.arkui.advanced.FormMenu.d.ets @@ -29,6 +29,7 @@ import { AsyncCallback } from './@ohos.base'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export interface FormMenuItemStyle { /** @@ -49,6 +50,7 @@ export interface FormMenuItemStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export interface AddFormOptions { /** @@ -91,6 +93,7 @@ export interface AddFormOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ @Builder export declare function AddFormMenuItem( diff --git a/api/@ohos.arkui.advanced.FullScreenLaunchComponent.d.ets b/api/@ohos.arkui.advanced.FullScreenLaunchComponent.d.ets index 3d541c1aee4a5fd246d539972738caac1afd1c94..44ab11e7c50512cdd66631f88be89b535691a899 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 @@ -28,6 +28,7 @@ import { Callback, ErrorCallback } from '@ohos.base'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ @Component export declare struct FullScreenLaunchComponent { 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..2e3a1a3ba478ac69c0474537922162ba7cebd735 --- /dev/null +++ b/api/@ohos.arkui.advanced.FullScreenLaunchComponent.static.d.ets @@ -0,0 +1,91 @@ +/* + * 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'; + +/** + * 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; + +/** + * 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 { Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + @BuilderParam content: Callback; + /** + * 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>; +} \ 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 61ed933ac2379c64e0de179395e45792f9485ba5..98356fbb6816074dab8688f8cbaacfc6ca7f51bf 100644 --- a/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets +++ b/api/@ohos.arkui.advanced.GridObjectSortComponent.d.ets @@ -39,6 +39,7 @@ import { Component } from './arkui/component/customComponent'; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export declare enum GridObjectSortComponentType { /** @@ -89,6 +90,7 @@ export declare enum GridObjectSortComponentType { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface GridObjectSortComponentItem { /** @@ -206,6 +208,7 @@ export interface GridObjectSortComponentItem { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface GridObjectSortComponentOptions { /** @@ -334,6 +337,7 @@ export interface GridObjectSortComponentOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ @Component export declare struct GridObjectSortComponent { diff --git a/api/@ohos.arkui.advanced.InnerFullScreenLaunchComponent.d.ets b/api/@ohos.arkui.advanced.InnerFullScreenLaunchComponent.d.ets index dddafd97918def2c67c87dc28c64daeaacb8efdf..61f6561f822b323c9df6c0581be8391376145d1c 100644 --- a/api/@ohos.arkui.advanced.InnerFullScreenLaunchComponent.d.ets +++ b/api/@ohos.arkui.advanced.InnerFullScreenLaunchComponent.d.ets @@ -26,6 +26,7 @@ import Callback from '@ohos.base'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 12 + * @noninterop */ @Component export declare struct InnerFullScreenLaunchComponent { @@ -62,6 +63,7 @@ export declare struct InnerFullScreenLaunchComponent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 12 + * @noninterop */ export declare class LaunchController { @@ -86,5 +88,6 @@ export declare class LaunchController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi * @since 12 + * @noninterop **/ export declare type LaunchAtomicServiceCallback = (appId: string, options?: AtomicServiceOptions) => 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..8eacaeb2776ef792bca8868f22addf08a928ecc0 100644 --- a/api/@ohos.arkui.advanced.MultiNavigation.d.ets +++ b/api/@ohos.arkui.advanced.MultiNavigation.d.ets @@ -28,6 +28,7 @@ import base from '@ohos.base'; * @crossplatform * @atomicservice * @since 14 + * @noninterop */ export declare enum SplitPolicy { /** @@ -69,6 +70,7 @@ export declare enum SplitPolicy { * @crossplatform * @atomicservice * @since 14 + * @noninterop */ @Component export declare struct MultiNavigation { @@ -127,6 +129,7 @@ export declare struct MultiNavigation { * @crossplatform * @atomicservice * @since 14 + * @noninterop */ export declare class MultiNavPathStack extends NavPathStack { /** @@ -511,6 +514,7 @@ export declare class MultiNavPathStack extends NavPathStack { * @crossplatform * @atomicservice * @since 14 + * @noninterop */ declare type NavDestinationBuildFunction = (name: string, param?: object) => void; @@ -523,6 +527,7 @@ declare type NavDestinationBuildFunction = (name: string, param?: object) => voi * @crossplatform * @atomicservice * @since 14 + * @noninterop */ declare type OnNavigationModeChangeCallback = (mode: NavigationMode) => void; @@ -535,5 +540,6 @@ declare type OnNavigationModeChangeCallback = (mode: NavigationMode) => void; * @crossplatform * @atomicservice * @since 14 + * @noninterop */ declare type OnHomeShowOnTopCallback = (name: string) => void; \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.Popup.d.ets b/api/@ohos.arkui.advanced.Popup.d.ets index 770fdfcca1bce4a0760459cfa0dd885784a1256e..e719efa2855e074dc40e5fd27e345ab2d3f5bc7d 100644 --- a/api/@ohos.arkui.advanced.Popup.d.ets +++ b/api/@ohos.arkui.advanced.Popup.d.ets @@ -30,6 +30,7 @@ * @crossplatform * @atomicservice * @since 12 + * @noninterop */ @@ -115,6 +116,7 @@ export interface PopupTextOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface PopupButtonOptions { /** @@ -198,6 +200,7 @@ export interface PopupButtonOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface PopupIconOptions { /** @@ -298,6 +301,7 @@ export interface PopupIconOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface PopupOptions { /** @@ -453,6 +457,7 @@ export interface PopupOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ @Builder export declare function Popup(options: PopupOptions): void; diff --git a/api/@ohos.arkui.advanced.ProgressButton.d.ets b/api/@ohos.arkui.advanced.ProgressButton.d.ets index af298952447b72390d373b7e4a9f34219e77de3b..a75b72f89d8aa5ed9e03252130a8c6eb8f6c8513 100644 --- a/api/@ohos.arkui.advanced.ProgressButton.d.ets +++ b/api/@ohos.arkui.advanced.ProgressButton.d.ets @@ -28,6 +28,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ @Component export declare struct ProgressButton { @@ -143,6 +144,7 @@ export declare struct ProgressButton { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ export declare interface ProgressButtonColorOptions { diff --git a/api/@ohos.arkui.advanced.ProgressButtonV2.d.ets b/api/@ohos.arkui.advanced.ProgressButtonV2.d.ets index 81039add5e12af8694b1cd2dc77c1264df5db5b3..38118b80cb19bb22ef65dc4953e054444466706b 100644 --- a/api/@ohos.arkui.advanced.ProgressButtonV2.d.ets +++ b/api/@ohos.arkui.advanced.ProgressButtonV2.d.ets @@ -27,6 +27,7 @@ import { ColorMetrics } from './@ohos.arkui.node'; * @atomicservice * @crossplatform * @since 18 + * @noninterop */ @ComponentV2 export declare struct ProgressButtonV2 { @@ -112,6 +113,7 @@ export declare struct ProgressButtonV2 { * @atomicservice * @crossplatform * @since 18 + * @noninterop */ @ObservedV2 export declare class ProgressButtonV2Color { @@ -178,6 +180,7 @@ export declare class ProgressButtonV2Color { * @atomicservice * @crossplatform * @since 18 + * @noninterop */ export type ClickCallback = () => void; @@ -189,6 +192,7 @@ export type ClickCallback = () => void; * @atomicservice * @crossplatform * @since 18 + * @noninterop */ export declare interface ProgressButtonV2ColorOptions { /** diff --git a/api/@ohos.arkui.advanced.SegmentButton.d.ets b/api/@ohos.arkui.advanced.SegmentButton.d.ets index 1112cd8a2ca7838fe79bf4d9fbfb36dd1eb72de5..a4526020adb249b8a2d65ed05fc1098164962a44 100644 --- a/api/@ohos.arkui.advanced.SegmentButton.d.ets +++ b/api/@ohos.arkui.advanced.SegmentButton.d.ets @@ -38,6 +38,7 @@ * @crossplatform * @atomicservice * @since 12 + * @noninterop */ interface SegmentButtonTextItem { @@ -101,6 +102,7 @@ interface SegmentButtonTextItem { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ interface SegmentButtonIconItem { /** @@ -206,6 +208,7 @@ interface SegmentButtonIconItem { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ interface SegmentButtonIconTextItem { /** @@ -328,6 +331,7 @@ interface SegmentButtonIconTextItem { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare type DimensionNoPercentage = PX | VP | FP | LPX | Resource; @@ -338,6 +342,7 @@ declare type DimensionNoPercentage = PX | VP | FP | LPX | Resource; * @crossplatform * @atomicservice * @since 20 + * @noninterop */ declare enum BorderRadiusMode { /** @@ -373,6 +378,7 @@ declare enum BorderRadiusMode { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ interface CommonSegmentButtonOptions { /** @@ -709,6 +715,7 @@ interface CommonSegmentButtonOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare type ItemRestriction = [T, T, T?, T?, T?]; @@ -726,6 +733,7 @@ declare type ItemRestriction = [T, T, T?, T?, T?]; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare type SegmentButtonItemTuple = ItemRestriction | ItemRestriction | ItemRestriction; @@ -743,6 +751,7 @@ declare type SegmentButtonItemTuple = ItemRestriction | I * @crossplatform * @atomicservice * @since 12 + * @noninterop */ declare type SegmentButtonItemArray = Array | Array | Array; @@ -764,6 +773,7 @@ declare type SegmentButtonItemArray = Array | Array { @@ -1370,6 +1386,7 @@ declare class SegmentButtonItemOptionsArray extends Array void; @@ -165,6 +167,7 @@ export type OnSelectedIndexChange = (selectedIndex: number) => void; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export type OnSelectedIndexesChange = (selectedIndexes: number[]) => void; @@ -176,6 +179,7 @@ export type OnSelectedIndexesChange = (selectedIndexes: number[]) => void; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ObservedV2 export declare class SegmentButtonV2Item { @@ -321,6 +325,7 @@ export declare class SegmentButtonV2Item { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ObservedV2 export declare class SegmentButtonV2Items extends Array { @@ -355,6 +360,7 @@ export declare class SegmentButtonV2Items extends Array { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ComponentV2 export declare struct TabSegmentButtonV2 { @@ -795,6 +801,7 @@ export declare struct TabSegmentButtonV2 { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ComponentV2 export declare struct CapsuleSegmentButtonV2 { @@ -1235,6 +1242,7 @@ export declare struct CapsuleSegmentButtonV2 { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ComponentV2 export declare struct MultiCapsuleSegmentButtonV2 { diff --git a/api/@ohos.arkui.advanced.SelectTitleBar.d.ets b/api/@ohos.arkui.advanced.SelectTitleBar.d.ets index 07247df74633d45c3af7f707de86b252b22126b9..cabb6021588ddbca339228666b748622db0d8982 100644 --- a/api/@ohos.arkui.advanced.SelectTitleBar.d.ets +++ b/api/@ohos.arkui.advanced.SelectTitleBar.d.ets @@ -32,6 +32,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ /** * Declaration of the menu item on the right side. @@ -208,6 +209,7 @@ export declare class SelectTitleBarMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ /** * Declaration of the selectable title bar. diff --git a/api/@ohos.arkui.advanced.SelectionMenu.d.ets b/api/@ohos.arkui.advanced.SelectionMenu.d.ets index 25053bb86d4911e862f55250c412ce1252d135e3..79637d0d60987bfca8675c163be996811c9b4fda 100644 --- a/api/@ohos.arkui.advanced.SelectionMenu.d.ets +++ b/api/@ohos.arkui.advanced.SelectionMenu.d.ets @@ -32,6 +32,7 @@ * @crossplatform * @atomicservice * @since 12 + * @noninterop */ @@ -127,6 +128,7 @@ export interface EditorMenuOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface ExpandedMenuOptions extends MenuItemOptions { /** @@ -165,6 +167,7 @@ export interface ExpandedMenuOptions extends MenuItemOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface EditorEventInfo { /** @@ -203,6 +206,7 @@ export interface EditorEventInfo { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export interface SelectionMenuOptions { /** @@ -354,6 +358,7 @@ export interface SelectionMenuOptions { * @crossplatform * @atomicservice * @since 12 + * @noninterop */ @Builder export declare function SelectionMenu(options: SelectionMenuOptions): void; diff --git a/api/@ohos.arkui.advanced.SplitLayout.d.ets b/api/@ohos.arkui.advanced.SplitLayout.d.ets index 72388ba2d30f578a1b9f4228c1f217318ace2c3b..61c2e3aabb604527040c998b3f6dcc2fd956af28 100644 --- a/api/@ohos.arkui.advanced.SplitLayout.d.ets +++ b/api/@ohos.arkui.advanced.SplitLayout.d.ets @@ -35,6 +35,7 @@ import { BuilderParam, Builder } from './arkui/component/builder'; * @atomicservice * @since arkts{ '1.1':'11','1.2':'20' } * @arkts 1.1&1.2 + * @noninterop */ @Component export declare struct SplitLayout { diff --git a/api/@ohos.arkui.advanced.SubHeader.d.ets b/api/@ohos.arkui.advanced.SubHeader.d.ets index a7cde45e007cbcf7918576c2eb96b28bf77f86c6..547d2f9016069128ff6e8ae039d0e80958e6606e 100644 --- a/api/@ohos.arkui.advanced.SubHeader.d.ets +++ b/api/@ohos.arkui.advanced.SubHeader.d.ets @@ -17,18 +17,16 @@ * @file * @kit ArkUI */ -/*** if arkts 1.1 */ + import { TextModifier } from './@ohos.arkui.modifier'; -/*** endif */ + /*** if arkts 1.2 */ -import { TextModifier } from './arkui/TextModifier'; -import { ResourceStr, Resource, ResourceColor, LocalizedMargin, LocalizedPadding } from './arkui/component/units'; +import { Resource, ResourceStr, ResourceColor, LocalizedPadding, LocalizedMargin } from './arkui/component/units'; +import { SymbolEffectStrategy, SymbolRenderingStrategy } from './arkui/component/symbolglyph'; import { SelectOption } from './arkui/component/select'; -import { PropRef } from './arkui/stateManagement/decorator'; +import { Prop, BuilderParam } from './arkui/stateManagement/common'; 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'; /*** endif */ /** @@ -42,7 +40,8 @@ import { BuilderParam, Builder } from './arkui/component/builder'; * @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 @@ -50,8 +49,8 @@ import { BuilderParam, Builder } from './arkui/component/builder'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 + * @noninterop */ export declare enum OperationType { /** @@ -63,15 +62,15 @@ 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. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ TEXT_ARROW = 0, @@ -84,15 +83,15 @@ 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. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ BUTTON = 1, @@ -105,15 +104,15 @@ 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. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ ICON_GROUP = 2, @@ -126,15 +125,15 @@ 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. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ LOADING = 3 } @@ -148,15 +147,16 @@ 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 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 + * @noninterop */ export declare class OperationOption { /** @@ -170,7 +170,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. @@ -178,8 +179,7 @@ export declare class OperationOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ value: ResourceStr; @@ -194,7 +194,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. @@ -202,8 +203,7 @@ export declare class OperationOption { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ action?: () => void; @@ -212,8 +212,7 @@ export declare class OperationOption { * @type { ?ResourceStr }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ accessibilityText?: ResourceStr; @@ -222,8 +221,7 @@ export declare class OperationOption { * @type { ?ResourceStr } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ accessibilityDescription?: ResourceStr; @@ -233,8 +231,7 @@ export declare class OperationOption { * @default "auto" * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ accessibilityLevel?: string; @@ -244,8 +241,7 @@ export declare class OperationOption { * @default { false } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ defaultFocus?: boolean; } @@ -259,15 +255,16 @@ 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 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 + * @noninterop */ export declare class SelectOptions { /** @@ -281,7 +278,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. @@ -289,8 +287,7 @@ export declare class SelectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ options: Array; @@ -305,7 +302,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. @@ -313,8 +311,7 @@ export declare class SelectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ selected?: number; @@ -329,7 +326,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. @@ -346,7 +344,6 @@ export declare class SelectOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ value?: ResourceStr; @@ -361,7 +358,8 @@ export declare class SelectOptions { * @type { (index: number, value?: string) => void }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Callback when the select is selected. @@ -369,8 +367,7 @@ export declare class SelectOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ onSelect?: (index: number, value?: string) => void; @@ -380,8 +377,7 @@ export declare class SelectOptions { * @default { false } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ defaultFocus?: boolean; } @@ -398,6 +394,7 @@ export declare class SelectOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare class SymbolOptions { /** @@ -413,8 +410,7 @@ export declare class SymbolOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ fontSize?: number | string | Resource; @@ -431,8 +427,7 @@ export declare class SymbolOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ fontColor?: Array; @@ -449,8 +444,7 @@ export declare class SymbolOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ fontWeight?: number | FontWeight | string; @@ -467,8 +461,7 @@ export declare class SymbolOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ effectStrategy?: SymbolEffectStrategy; @@ -485,8 +478,7 @@ export declare class SymbolOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ renderingStrategy?: SymbolRenderingStrategy; } @@ -500,15 +492,16 @@ 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 * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 + * @noninterop */ @Component export declare struct SubHeader { @@ -524,7 +517,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. @@ -533,21 +527,9 @@ export declare struct SubHeader { * @crossplatform * @atomicservice * @since 18 - * @arkts 1.1 */ @Prop icon?: ResourceStr; - /** - * Icon resource of content area. - * @type { ResourceStr }. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - @PropRef icon?: ResourceStr; - /** * Attributes of Symbol icon. * @type { SymbolOptions}. @@ -560,8 +542,7 @@ export declare struct SubHeader { * @type { SymbolOptions}. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ iconSymbolOptions?: SymbolOptions; @@ -576,7 +557,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. @@ -585,21 +567,9 @@ export declare struct SubHeader { * @crossplatform * @atomicservice * @since 18 - * @arkts 1.1 */ @Prop primaryTitle?: ResourceStr; - /** - * The first line text of content area. - * @type { ResourceStr }. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - @PropRef primaryTitle?: ResourceStr; - /** * The secondary line text of content area. * @type { ResourceStr }. @@ -611,7 +581,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. @@ -620,21 +591,9 @@ export declare struct SubHeader { * @crossplatform * @atomicservice * @since 18 - * @arkts 1.1 */ @Prop secondaryTitle?: ResourceStr; - /** - * The secondary line text of content area. - * @type { ResourceStr }. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - @PropRef secondaryTitle?: ResourceStr; - /** * Select option of content area. * @type { SelectOptions }. @@ -646,7 +605,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. @@ -654,8 +614,7 @@ export declare struct SubHeader { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ select?: SelectOptions; @@ -670,7 +629,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. @@ -679,21 +639,9 @@ export declare struct SubHeader { * @crossplatform * @atomicservice * @since 18 - * @arkts 1.1 */ @Prop operationType?: OperationType; - /** - * Operation style of SubHeader. - * @type { OperationStyle }. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - @PropRef operationType?: OperationType; - /** * operation item. * @type { Array }. @@ -705,7 +653,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. @@ -713,8 +662,7 @@ export declare struct SubHeader { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ operationItem?: Array; @@ -730,8 +678,7 @@ export declare struct SubHeader { * @type { Array }. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ operationSymbolOptions?: Array; @@ -748,8 +695,7 @@ export declare struct SubHeader { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ primaryTitleModifier?: TextModifier; @@ -766,8 +712,7 @@ export declare struct SubHeader { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ secondaryTitleModifier?: TextModifier; @@ -784,8 +729,7 @@ export declare struct SubHeader { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20' } - * @arkts 1.1&1.2 + * @since 18 */ @BuilderParam titleBuilder?: () => void; @@ -807,23 +751,9 @@ export declare struct SubHeader { * @crossplatform * @atomicservice * @since 18 - * @arkts 1.1 */ @Prop contentMargin?: LocalizedMargin; - /** - * 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 - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - @PropRef contentMargin?: LocalizedMargin; - /** * Set the content padding. * @type { ?LocalizedPadding } @@ -844,30 +774,6 @@ export declare struct SubHeader { * @crossplatform * @atomicservice * @since 18 - * @arkts 1.1 */ @Prop contentPadding?: LocalizedPadding; - - /** - * 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 - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - @PropRef contentPadding?: LocalizedPadding; - - /** - * The method to build component. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - @Builder build(): void; } \ No newline at end of file diff --git a/api/@ohos.arkui.advanced.SubHeaderV2.d.ets b/api/@ohos.arkui.advanced.SubHeaderV2.d.ets index fbc8463724b2f2f47f4da58b42dd6fa786e42b94..579630f1e41d04f4ab171336676095fb73249daa 100644 --- a/api/@ohos.arkui.advanced.SubHeaderV2.d.ets +++ b/api/@ohos.arkui.advanced.SubHeaderV2.d.ets @@ -27,6 +27,7 @@ import { TextModifier as TextModifier } from '@ohos.arkui.modifier'; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ declare type SubHeaderV2IconType = ResourceStr | SymbolGlyphModifier; @@ -38,6 +39,7 @@ declare type SubHeaderV2IconType = ResourceStr | SymbolGlyphModifier; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export interface SubHeaderV2TitleOptions { /** @@ -84,6 +86,7 @@ export interface SubHeaderV2TitleOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ObservedV2 export declare class SubHeaderV2Title { @@ -145,6 +148,7 @@ export declare class SubHeaderV2Title { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export type SubHeaderV2SelectOnSelect = (selectedIndex: number, selectedContent?: string) => void; @@ -156,6 +160,7 @@ export type SubHeaderV2SelectOnSelect = (selectedIndex: number, selectedContent? * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export interface SubHeaderV2SelectOptions { /** @@ -225,6 +230,7 @@ export interface SubHeaderV2SelectOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ObservedV2 export declare class SubHeaderV2Select { @@ -306,6 +312,7 @@ export declare class SubHeaderV2Select { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare enum SubHeaderV2OperationType { /** @@ -350,6 +357,7 @@ export declare enum SubHeaderV2OperationType { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export type SubHeaderV2OperationItemAction = () => void; @@ -361,6 +369,7 @@ export type SubHeaderV2OperationItemAction = () => void; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ declare type SubHeaderV2OperationItemType = ResourceStr | SymbolGlyphModifier; @@ -372,6 +381,7 @@ declare type SubHeaderV2OperationItemType = ResourceStr | SymbolGlyphModifier; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export interface SubHeaderV2OperationItemOptions { /** @@ -443,6 +453,7 @@ export interface SubHeaderV2OperationItemOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ObservedV2 export declare class SubHeaderV2OperationItem { @@ -527,6 +538,7 @@ export declare class SubHeaderV2OperationItem { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export type SubHeaderV2TitleBuilder = () => void; @@ -538,6 +550,7 @@ export type SubHeaderV2TitleBuilder = () => void; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ComponentV2 export declare struct SubHeaderV2 { diff --git a/api/@ohos.arkui.advanced.SwipeRefresher.d.ets b/api/@ohos.arkui.advanced.SwipeRefresher.d.ets index 1c42bba52e4fd3238f9e6162d95022f42580473f..7f816cc7ec1ae9646112322a5d27b1fe24354cd9 100644 --- a/api/@ohos.arkui.advanced.SwipeRefresher.d.ets +++ b/api/@ohos.arkui.advanced.SwipeRefresher.d.ets @@ -42,6 +42,7 @@ import { Builder } from './arkui/component/builder'; * @atomicservice * @since 20 * @arkts 1.1&1.2 + * @noninterop */ @Component export declare struct SwipeRefresher { diff --git a/api/@ohos.arkui.advanced.TabTitleBar.d.ets b/api/@ohos.arkui.advanced.TabTitleBar.d.ets index 67a01ac9b66ebf2bce42bf52f0ba04af36a7ef69..0a8ba8beeeb96bf6f51bdda188a9adea5ad4e882 100644 --- a/api/@ohos.arkui.advanced.TabTitleBar.d.ets +++ b/api/@ohos.arkui.advanced.TabTitleBar.d.ets @@ -32,6 +32,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ export declare class TabTitleBarMenuItem { /** @@ -136,6 +137,7 @@ export declare class TabTitleBarMenuItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ export declare class TabTitleBarTabItem { /** @@ -188,6 +190,7 @@ export declare class TabTitleBarTabItem { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ @Component export declare struct TabTitleBar { diff --git a/api/@ohos.arkui.advanced.ToolBar.d.ets b/api/@ohos.arkui.advanced.ToolBar.d.ets index d64f5770f464f8a8f1f74ba6020934a7ed83acbc..d7e6264debc443bab0ba91a6df900a0e53ad3b05 100644 --- a/api/@ohos.arkui.advanced.ToolBar.d.ets +++ b/api/@ohos.arkui.advanced.ToolBar.d.ets @@ -43,6 +43,7 @@ import { LengthMetrics } from './@ohos.arkui.node'; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare enum ItemState { /** @@ -119,6 +120,7 @@ export declare enum ItemState { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ export interface ToolBarSymbolGlyphOptions { @@ -176,6 +178,7 @@ export interface ToolBarSymbolGlyphOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @Observed export declare class ToolBarOption { @@ -395,6 +398,7 @@ export declare class ToolBarOption { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @Observed export declare class ToolBarOptions extends Array { @@ -412,6 +416,7 @@ export declare class ToolBarOptions extends Array { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare class ToolBarModifier { /** @@ -513,6 +518,7 @@ export declare class ToolBarModifier { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @Component export declare struct ToolBar { diff --git a/api/@ohos.arkui.advanced.ToolBarV2.d.ets b/api/@ohos.arkui.advanced.ToolBarV2.d.ets index 947c190948fcd81c1ee4af34b4e87e1815d844bd..b6dcf31fdca97311ae2e5bbac728a6a47eacf5a5 100644 --- a/api/@ohos.arkui.advanced.ToolBarV2.d.ets +++ b/api/@ohos.arkui.advanced.ToolBarV2.d.ets @@ -28,6 +28,7 @@ import { ColorMetrics, LengthMetrics } from './@ohos.arkui.node'; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare enum ToolBarV2ItemState { /** @@ -66,6 +67,7 @@ export declare enum ToolBarV2ItemState { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ObservedV2 export class ToolBarV2SymbolGlyph { @@ -111,6 +113,7 @@ export class ToolBarV2SymbolGlyph { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export interface ToolBarV2SymbolGlyphOptions { /** @@ -143,6 +146,7 @@ export interface ToolBarV2SymbolGlyphOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ObservedV2 export declare class ToolBarV2ItemText { @@ -199,6 +203,7 @@ export declare class ToolBarV2ItemText { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export interface ToolBarV2ItemTextOptions { /** @@ -240,6 +245,7 @@ export interface ToolBarV2ItemTextOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare type ToolBarV2ItemIconType = ToolBarV2ItemImage | ToolBarV2SymbolGlyph; @@ -251,6 +257,7 @@ export declare type ToolBarV2ItemIconType = ToolBarV2ItemImage | ToolBarV2Symbol * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ObservedV2 export declare class ToolBarV2ItemImage { @@ -307,6 +314,7 @@ export declare class ToolBarV2ItemImage { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export interface ToolBarV2ItemImageOptions { /** @@ -349,6 +357,7 @@ export interface ToolBarV2ItemImageOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ObservedV2 export declare class ToolBarV2Item { @@ -450,6 +459,7 @@ export declare class ToolBarV2Item { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export interface ToolBarV2ItemOptions { /** @@ -532,6 +542,7 @@ export interface ToolBarV2ItemOptions { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export type ToolBarV2ItemAction = (index: number) => void; @@ -542,6 +553,7 @@ export type ToolBarV2ItemAction = (index: number) => void; * @crossplatform * @atomicservice * @since 18 + * @noninterop */ export declare class ToolBarV2Modifier { /** @@ -598,6 +610,7 @@ export declare class ToolBarV2Modifier { * @crossplatform * @atomicservice * @since 18 + * @noninterop */ @ComponentV2 export declare struct ToolBarV2 { diff --git a/api/@ohos.arkui.advanced.TreeView.d.ets b/api/@ohos.arkui.advanced.TreeView.d.ets index 17e438a871ce7f10b7fb61fd478f23864b8862fd..0688933b711a1f2ad48e15011a03eb50293077f9 100644 --- a/api/@ohos.arkui.advanced.TreeView.d.ets +++ b/api/@ohos.arkui.advanced.TreeView.d.ets @@ -36,6 +36,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ export declare enum TreeListenType { /** @@ -110,6 +111,7 @@ export declare enum TreeListenType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ export declare class TreeListener { /** @@ -184,6 +186,7 @@ export declare class TreeListener { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ export declare class TreeListenerManager { /** @@ -229,6 +232,7 @@ export declare class TreeListenerManager { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ @Component export declare struct TreeView { @@ -260,6 +264,7 @@ export declare struct TreeView { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ export interface CallbackParam { /** @@ -320,6 +325,7 @@ export interface CallbackParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ export interface NodeParam { /** @@ -495,6 +501,7 @@ export interface NodeParam { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 11 + * @noninterop */ export declare class TreeController { /** diff --git a/api/@ohos.arkui.component.d.ets b/api/@ohos.arkui.component.d.ets index a0fe3c2371592461fd29063e99add539952569be..461b86ba7a40c72ae5e4d448919f1603512e90c8 100644 --- a/api/@ohos.arkui.component.d.ets +++ b/api/@ohos.arkui.component.d.ets @@ -23,7 +23,6 @@ export * from './arkui/UserView'; export * from './arkui/component/animation'; export * from './arkui/component/customComponent'; export * from './arkui/component/common'; -export * from './arkui/component/column'; export * from './arkui/component/text'; export * from './arkui/component/styledString'; export * from './arkui/component/enums'; @@ -71,12 +70,12 @@ export * from './arkui/component/gridCol'; export * from './arkui/component/gridRow'; export * from './arkui/component/gridItem'; export * from './arkui/component/hyperlink'; +export * from './arkui/component/inspector'; 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'; @@ -127,7 +126,6 @@ export * from './arkui/component/sidebar'; export * from './arkui/component/slider'; export * from './arkui/component/span'; export * from './arkui/component/stack'; -export * from './arkui/component/stateManagement'; export * from './arkui/component/stepper'; export * from './arkui/component/stepperItem'; export * from './arkui/component/styledString'; diff --git a/api/@ohos.arkui.componentSnapshot.d.ts b/api/@ohos.arkui.componentSnapshot.d.ts index 9d76a24829f7ec7508377272affc3e7df6480d2e..bbb183f6ddf63287b1a01f0ff4dae8d7a7adb909 100644 --- a/api/@ohos.arkui.componentSnapshot.d.ts +++ b/api/@ohos.arkui.componentSnapshot.d.ts @@ -18,12 +18,8 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CustomBuilder } from './arkui/component/builder'; -/*** endif */ - import { AsyncCallback } from './@ohos.base'; -import image from './@ohos.multimedia.image'; +import image from './@ohos.multimedia.image' /** * This module allows developers to export snapshot image from a component or a custom builder. @@ -40,8 +36,7 @@ import image from './@ohos.multimedia.image'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare namespace componentSnapshot { /** @@ -51,10 +46,9 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ - export interface SnapshotRegion { + interface SnapshotRegion { /** * Left side position of rectangle, in PX. * @@ -62,8 +56,7 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ left: number; @@ -74,8 +67,7 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ right: number; @@ -86,8 +78,7 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ top: number; @@ -98,8 +89,7 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ bottom: number; } @@ -112,10 +102,9 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ - export interface LocalizedSnapshotRegion { + interface LocalizedSnapshotRegion { /** * Left/Right side position of rectangle, in PX * @@ -123,8 +112,7 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ start: number; @@ -135,8 +123,7 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ end: number; @@ -147,8 +134,7 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ top: number; @@ -159,8 +145,7 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ bottom: number; } @@ -172,10 +157,9 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ - export type SnapshotRegionType = SnapshotRegion | LocalizedSnapshotRegion; + type SnapshotRegionType = SnapshotRegion | LocalizedSnapshotRegion; /** * Defines the extra options for snapshot taking. @@ -184,10 +168,9 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - export interface SnapshotOptions { + interface SnapshotOptions { /** * Defines the scale property to render the snapshot. * @@ -195,8 +178,7 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ scale?: number @@ -207,8 +189,7 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ waitUntilRenderFinished?: boolean @@ -219,8 +200,7 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ region?: SnapshotRegionType } @@ -253,10 +233,9 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since 12 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.ComponentSnapshot#get - * @arkts 1.1&1.2 */ function get(id: string, callback: AsyncCallback, options?: SnapshotOptions): void; @@ -288,10 +267,9 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since 12 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.ComponentSnapshot#get - * @arkts 1.1&1.2 */ function get(id: string, options?: SnapshotOptions): Promise; @@ -327,10 +305,9 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since 12 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.ComponentSnapshot#createFromBuilder - * @arkts 1.1&1.2 */ function createFromBuilder(builder: CustomBuilder, callback: AsyncCallback, delay?: number, checkImageStatus?: boolean, options?: SnapshotOptions): void; @@ -367,10 +344,9 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} + * @since 12 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.ComponentSnapshot#createFromBuilder - * @arkts 1.1&1.2 */ function createFromBuilder(builder: CustomBuilder, delay?: number, checkImageStatus?: boolean, options?: SnapshotOptions): Promise; @@ -392,10 +368,9 @@ declare namespace componentSnapshot { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - export function getSync(id: string, options?: SnapshotOptions): image.PixelMap; + function getSync(id: string, options?: SnapshotOptions): image.PixelMap; } export default componentSnapshot; 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.ts b/api/@ohos.arkui.componentUtils.d.ts index 5f2b6268df7841b1c25d4b4b01f67dd361d7d6b0..32658420dca159b505dcfb4717f7f95fb6b865ed 100644 --- a/api/@ohos.arkui.componentUtils.d.ts +++ b/api/@ohos.arkui.componentUtils.d.ts @@ -37,8 +37,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare namespace componentUtils { @@ -61,10 +60,9 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - export interface ComponentInfo { + interface ComponentInfo { /** * component size. @@ -85,8 +83,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ size: Size @@ -109,8 +106,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ localOffset: Offset @@ -133,8 +129,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ windowOffset: Offset @@ -157,8 +152,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ screenOffset: Offset @@ -181,8 +175,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ translate: TranslateResult @@ -205,8 +198,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ scale: ScaleResult @@ -229,8 +221,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ rotate: RotateResult @@ -253,8 +244,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ transform: Matrix4Result } @@ -278,10 +268,9 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - export interface Size { + interface Size { /** * Defines the width property. @@ -302,8 +291,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ width: number @@ -326,8 +314,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ height: number } @@ -351,10 +338,9 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - export interface Offset { + interface Offset { /** * Coordinate x of the Position. @@ -375,8 +361,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ x: number @@ -399,8 +384,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ y: number } @@ -424,10 +408,9 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - export interface TranslateResult { + interface TranslateResult { /** * Indicates the translation distance of the x-axis, in vp. @@ -448,8 +431,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ x: number @@ -472,8 +454,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ y: number @@ -496,8 +477,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ z: number } @@ -521,10 +501,9 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - export interface ScaleResult { + interface ScaleResult { /** * Zoom factor of the x-axis. @@ -545,8 +524,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ x: number @@ -569,8 +547,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ y: number @@ -593,8 +570,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ z: number @@ -617,8 +593,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ centerX: number @@ -641,8 +616,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ centerY: number } @@ -666,10 +640,9 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - export interface RotateResult { + interface RotateResult { /** * Axis of rotation vector x coordinate. @@ -690,8 +663,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ x: number @@ -714,8 +686,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ y: number @@ -738,8 +709,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ z: number @@ -762,8 +732,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ centerX: number @@ -786,8 +755,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ centerY: number @@ -810,8 +778,7 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ angle: number } @@ -835,10 +802,9 @@ declare namespace componentUtils { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - export type Matrix4Result = [ + type Matrix4Result = [ number, number, number, 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.ts b/api/@ohos.arkui.dragController.d.ts index 644633570beba5f4b62c5bb2934aa30f0da3f6d0..01b51d532bd6a3c19b5451b3a0b852720d1189a3 100644 --- a/api/@ohos.arkui.dragController.d.ts +++ b/api/@ohos.arkui.dragController.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { DragEvent, DragPreviewOptions, DragItemInfo, ICurve } from './arkui/component/common'; -import { CustomBuilder } from './arkui/component/builder'; -import { TouchPoint, ResourceColor } from './arkui/component/units'; -import { Curve } from './arkui/component/enums'; -/*** endif */ import type { AsyncCallback, BusinessError, Callback } from './@ohos.base'; @@ -48,8 +42,7 @@ import type unifiedDataChannel from './@ohos.data.unifiedDataChannel'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ declare namespace dragController { /** @@ -74,8 +67,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ const enum DragStatus { /** @@ -94,8 +86,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ STARTED = 0, /** @@ -114,8 +105,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ ENDED = 1, } @@ -142,8 +132,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface DragAndDropInfo { /** @@ -165,8 +154,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ status: DragStatus; /** @@ -188,8 +176,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ event: DragEvent; /** @@ -211,8 +198,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ extraParams?: string; } @@ -239,8 +225,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface DragAction { /** @@ -268,8 +253,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ startDrag(): Promise; /** @@ -300,8 +284,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ on(type: 'statusChange', callback: Callback): void; @@ -333,8 +316,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ off(type: 'statusChange', callback?: Callback): void; } @@ -361,8 +343,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface DragInfo { /** @@ -384,8 +365,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ pointerId: number; @@ -408,8 +388,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ data?: unifiedDataChannel.UnifiedData; @@ -432,8 +411,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ extraParams?: string; @@ -456,8 +434,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ touchPoint?: TouchPoint; @@ -480,8 +457,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ previewOptions?: DragPreviewOptions; @@ -522,8 +498,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface AnimationOptions { /** @@ -545,8 +520,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ duration?: number; /** @@ -568,8 +542,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ curve?: Curve | ICurve; } @@ -590,8 +563,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ export class DragPreview { /** @@ -613,8 +585,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ setForegroundColor(color: ResourceColor): void; /** @@ -639,8 +610,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ animate(options: AnimationOptions, handler: () =>void): void; } @@ -660,8 +630,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ interface DragEventParam { @@ -684,8 +653,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ event: DragEvent; @@ -708,8 +676,7 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ extraParams: string; } @@ -718,12 +685,11 @@ declare namespace dragController { * Execute a drag event. * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. - * @param { AsyncCallback<{ event: DragEvent, extraParams: string }> } callback - Callback that contains the drag - * event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @param { AsyncCallback<{ event: DragEvent, extraParams: string }> } callback - Callback that contains the drag event information. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 @@ -733,45 +699,44 @@ declare namespace dragController { * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @param { AsyncCallback } callback - Callback that contains the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 - */ + */ /** * Execute a drag event. * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @param { AsyncCallback } callback - Callback that contains the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @deprecated since 18 + * @since 18 + * @deprecated since 18 * @useinstead ohos.arkui.UIContext.DragController#executeDrag - * @arkts 1.1&1.2 */ function executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo, - callback: AsyncCallback): void; + callback: AsyncCallback): void; /** * Execute a drag event. * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { Promise<{ event: DragEvent, extraParams: string }> } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 10 @@ -781,10 +746,10 @@ declare namespace dragController { * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { Promise } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -795,18 +760,17 @@ declare namespace dragController { * @param { CustomBuilder | DragItemInfo } custom - Object used for prompts displayed when the object is dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { Promise } A Promise with the drag event information. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} + * @since 18 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.DragController#executeDrag - * @arkts 1.1&1.2 */ function executeDrag(custom: CustomBuilder | DragItemInfo, dragInfo: DragInfo): Promise; @@ -814,13 +778,13 @@ declare namespace dragController { * Create one drag action object, which can be used for starting drag later or monitoring * the drag status after drag started. * @param { Array } customArray - Objects used for prompts - * displayed when the objects are dragged. + * displayed when the objects are dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 11 @@ -829,13 +793,13 @@ declare namespace dragController { * Create one drag action object, which can be used for starting drag later or monitoring * the drag status after drag started. * @param { Array } customArray - Objects used for prompts - * displayed when the objects are dragged. + * displayed when the objects are dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice @@ -845,21 +809,20 @@ declare namespace dragController { * Create one drag action object, which can be used for starting drag later or monitoring * the drag status after drag started. * @param { Array } customArray - Objects used for prompts - * displayed when the objects are dragged. + * displayed when the objects are dragged. * @param { DragInfo } dragInfo - Information about the drag event. * @returns { DragAction } one drag action object - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. * @throws { BusinessError } 100001 - Internal handling failed. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} + * @since 18 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.DragController#createDragAction - * @arkts 1.1&1.2 */ function createDragAction(customArray: Array, dragInfo: DragInfo): DragAction; @@ -882,42 +845,39 @@ declare namespace dragController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} + * @since 18 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.DragController#getDragPreview - * @arkts 1.1&1.2 */ function getDragPreview(): DragPreview; /** * Define the status for the application to notify the framework whether to execute drag. - * + * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @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 arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ 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 * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ READY = 1, } @@ -932,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. @@ -1045,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 @@ -1119,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.ts b/api/@ohos.arkui.drawableDescriptor.d.ts index e57f057fc71547d07bb5349a5e903c81e25d4ed9..3cee05526ebad735bd061af06a1220b85c0dc4ca 100644 --- a/api/@ohos.arkui.drawableDescriptor.d.ts +++ b/api/@ohos.arkui.drawableDescriptor.d.ts @@ -18,515 +18,284 @@ * @kit ArkUI */ -import image from './@ohos.multimedia.image'; + import image from './@ohos.multimedia.image'; -/** - * Indicates the return result of the data to be fetched. - * - * @typedef DrawableDescriptorResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ -declare interface DrawableDescriptorResult { - /** - * DrawableDescriptor width.The default value is -1. - * - * @type { ?number } - * @readonly - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - readonly width?: number; - - /** - * DrawableDescriptor height.The default value is -1. - * - * @type { ?number } - * @readonly - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - readonly height?: number; -} - -/** - * DrawableDescriptor's option which is used in constructor. - * - * @typedef DrawableDescriptorOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ -declare interface DrawableDescriptorOptions { - /** - * If true, it will fetch the data using the uri when object is constructing.The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetchWhenConstructingWithUri?: boolean; -} - -/** - * Use the DrawableDescriptor class to get drawable image. - * - * @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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -export declare class DrawableDescriptor { - /** - * Creates a new DrawableDescriptor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi Hide this for inner system use. - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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; - - /** - * 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. - * - * @returns { number } Return the width of the DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - getOriginalWidth(): number; - - /** - * Get original height of drawable object. - * - * @returns { number } Return the height of the DrawableDescriptor object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - getOriginalHeight(): number; - - /** - * Fetch the drawable's data whose corresponding uri is passed in constructor.This fetched data can be draw in Image view. - * - * @returns { Promise } Return the promise returned by the funciton. - * @throws { BusinessError } 100001 - Data loading failed. Maybe the uri is invalid. - * @throws { BusinessError } 100002 - Data decoding failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetch(): Promise; - - /** - * Fetch the drawable's data whose corresponding uri is passed in constructor.This fetched data can be draw in Image view. - * - * @returns { DrawableDescriptorResult } Return the result of the DrawableDescriptor object. - * @throws { BusinessError } 100001 - Data loading failed. Maybe the uri is invalid. - * @throws { BusinessError } 100002 - Data decoding failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetchSync(): DrawableDescriptorResult; -} - -/** - * 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 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. - * - * @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 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. - * - * @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 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. - * - * @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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(src?: image.PixelMap); - - /** - * Creates a new PixelMapDrawableDescriptor. - * @param { image.PixelMap | ResourceStr } src - Indicates the resource to create PixelMapDrawableDescriptor. - * @param { DrawableDescriptorOptions } options - Indicates the option to create PixelMapDrawableDescriptor. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - constructor(src?: image.PixelMap | ResourceStr, options?: DrawableDescriptorOptions); -} - -/** - * Animation control options - * - * @interface AnimationOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -export declare interface AnimationOptions { - /** - * The duration of animation playback once. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - duration?: number; - /** - * Animation playback times. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - iterations?: number; - - /** - * If true, it will fetch the data using the uri when object is constructing.The default value is false. - * - * @type { ?boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - fetchWhenConstructingWithUri?: boolean; -} - -/** - * Define the data structure for PixelMap animations. - * - * @extends DrawableDescriptor - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(pixelMaps: Array, options?: AnimationOptions); - - /** - * Creates a new AnimatedDrawableDescriptor. - * @param { Array | ResourceStr } pixelMaps - Indicates the resource to create AnimatedDrawableDescriptor. - * @param { ?AnimationOptions } [options] - Animation control options. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - constructor(pixelMaps: Array | ResourceStr, options?: AnimationOptions); - - /** - * Get the running status of animation. - * - * @returns { boolean } Return the running status of animation. - * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - isRunning(): boolean; - - /** - * Start the animation. - * - * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - start(): void; - - /** - * Stop the animation. - * - * @throws { BusinessError } 100001 - Image data is not ready.Maybe you should fetch the data first. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - stop(): void; -} + /** + * 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 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 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 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 + */ + declare 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 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); + } + \ No newline at end of file diff --git a/api/@ohos.arkui.drawableDescriptor.static.d.ets b/api/@ohos.arkui.drawableDescriptor.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..e9c0a538cb02dc915d8f4658a154a9f72b98188b --- /dev/null +++ b/api/@ohos.arkui.drawableDescriptor.static.d.ets @@ -0,0 +1,170 @@ +/* + * 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 20 + */ +export declare class DrawableDescriptor { + /** + * Creates a new DrawableDescriptor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi Hide this for inner system use. + * @since 20 + */ + constructor(); + + /** + * Get pixelMap of drawable image. + * + * @returns { image.PixelMap | undefined } Return the PixelMap of the calling DrawableDescriptor object. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getPixelMap(): image.PixelMap | undefined; +} + +/** + * Use the LayeredDrawableDescriptor class to get the foreground, the background and the mask DrawableDescriptor. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +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 + * @since 20 + */ + constructor( + foreground?: DrawableDescriptor, + background?: DrawableDescriptor, + mask?: DrawableDescriptor + ); + + /** + * Get DrawableDescriptor for the foreground. + * + * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of foreground. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getForeground(): DrawableDescriptor | undefined; + + /** + * Get DrawableDescriptor for the background. + * + * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of background. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getBackground(): DrawableDescriptor | undefined; + + /** + * Get DrawableDescriptor for the mask. + * + * @returns { DrawableDescriptor | undefined } Return the DrawableDescriptor object of mask. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + getMask(): DrawableDescriptor | undefined; + + /** + * Get the clip path info of the adaptive icon mask. + * + * @returns { string } Return the clip path info of mask. + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static getMaskClipPath(): string; +} + +/** + * Use the PixelMapDrawableDescriptor class to get the resource of pixelmap or resource descriptor information. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +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 + * @since 20 + */ + constructor(src?: image.PixelMap); +} + +/** + * Animation control options + * + * @interface AnimationOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export interface AnimationOptions { + /** + * The duration of animation playback once. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + duration?: number; + /** + * Animation playback times. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iterations?: number; +} + +/** + * Define the data structure for PixelMap animations. + * + * @extends DrawableDescriptor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +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 + * @since 20 + */ + constructor(pixelMaps: Array, options?: AnimationOptions); +} diff --git a/api/@ohos.arkui.inspector.d.ts b/api/@ohos.arkui.inspector.d.ts index 2634340ef8a1c270e2f0626d4c1d20bdec2c1d1d..7588379244d078300cf24b5674986eed8fd50a88 100644 --- a/api/@ohos.arkui.inspector.d.ts +++ b/api/@ohos.arkui.inspector.d.ts @@ -33,8 +33,7 @@ import { Callback } from './@ohos.base'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare namespace inspector { @@ -51,8 +50,7 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface ComponentObserver { @@ -73,8 +71,7 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'layout', callback: () => void): void; @@ -95,8 +92,7 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'layout', callback?: () => void): void; @@ -117,8 +113,7 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'draw', callback: () => void): void; @@ -139,8 +134,7 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'draw', callback?: () => void): void; @@ -184,85 +178,11 @@ declare namespace inspector { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 * @deprecated since 18 * @useinstead ohos.arkui.UIContext.UIInspector#createComponentObserver */ function createComponentObserver(id: string): ComponentObserver; - - /** - * Obtains all attributes of the component with the specified ID. - * - * @param { string } id - ID of the component whose attributes are to be obtained. - * @returns { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @test - * @arkts 1.2 - */ - function getInspectorByKey(id: string): string; - - /** - * Get components tree. - * - * @returns { Object } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @test - * @arkts 1.2 - */ - function getInspectorTree(): Object; - - /** - * Sends an event to the component with the specified ID. - * - * @param { string } id - ID of the component for which the event is to be sent. - * @param { number } action - Type of the event to be sent. The options are as follows: Click event: 10 LongClick: 11. - * @param { string } params - Event parameters. If there is no parameter, pass an empty string "". - * @returns { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @test - * @arkts 1.2 - */ - function sendEventByKey(id: string, action: number, params: string): boolean; } -export default inspector; -/** - * export function getInspectorByKey from inspector namespace and provide it for kit ArkUI. - * @constant - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -export const GETINSPECTORBYKEY = inspector.getInspectorByKey; -/** - * export function getInspectorTree from inspector namespace and provide it for kit ArkUI. - * @constant - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -export const GETINSPECTORTREE = inspector.getInspectorTree; -/** - * export function sendEventByKey from inspector namespace and provide it for kit ArkUI. - * @constant - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -export const SENDEVENTBYKEY = inspector.sendEventByKey; \ No newline at end of file +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..cdf11d54dbeab9d16d6e30d9c6c5f88d46bda722 --- /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 } 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 { Object } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + * @test + */ + function getInspectorTree(): Object; + /** + * Sends an event to the component with the specified ID. + * + * @param { string } id - ID of the component for which the event is to be sent. + * @param { 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.d.ts b/api/@ohos.arkui.modifier.d.ts index 0605302b7a84295ce732052acd5a65a6d6d9478b..9d78a024b13825e8610025573a7050c8aea457dd 100644 --- a/api/@ohos.arkui.modifier.d.ts +++ b/api/@ohos.arkui.modifier.d.ts @@ -18,6 +18,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { CommonModifier } from './arkui/CommonModifier'; @@ -26,6 +27,7 @@ export { CommonModifier } from './arkui/CommonModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { AlphabetIndexerModifier } from './arkui/AlphabetIndexerModifier'; @@ -34,6 +36,7 @@ export { AlphabetIndexerModifier } from './arkui/AlphabetIndexerModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { BlankModifier } from './arkui/BlankModifier'; @@ -42,6 +45,7 @@ export { BlankModifier } from './arkui/BlankModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { ButtonModifier } from './arkui/ButtonModifier'; @@ -50,6 +54,7 @@ export { ButtonModifier } from './arkui/ButtonModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { CalendarPickerModifier } from './arkui/CalendarPickerModifier'; @@ -58,6 +63,7 @@ export { CalendarPickerModifier } from './arkui/CalendarPickerModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { CheckboxModifier } from './arkui/CheckboxModifier'; @@ -66,6 +72,7 @@ export { CheckboxModifier } from './arkui/CheckboxModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { CheckboxGroupModifier } from './arkui/CheckboxGroupModifier'; @@ -74,6 +81,7 @@ export { CheckboxGroupModifier } from './arkui/CheckboxGroupModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { ColumnModifier } from './arkui/ColumnModifier'; @@ -82,6 +90,7 @@ export { ColumnModifier } from './arkui/ColumnModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { ColumnSplitModifier } from './arkui/ColumnSplitModifier'; @@ -90,6 +99,7 @@ export { ColumnSplitModifier } from './arkui/ColumnSplitModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { CounterModifier } from './arkui/CounterModifier'; @@ -98,6 +108,7 @@ export { CounterModifier } from './arkui/CounterModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { DataPanelModifier } from './arkui/DataPanelModifier'; @@ -106,6 +117,7 @@ export { DataPanelModifier } from './arkui/DataPanelModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { DatePickerModifier } from './arkui/DatePickerModifier'; @@ -114,6 +126,7 @@ export { DatePickerModifier } from './arkui/DatePickerModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { DividerModifier } from './arkui/DividerModifier'; @@ -123,6 +136,7 @@ export { DividerModifier } from './arkui/DividerModifier'; * @systemapi * @crossplatform * @since 12 + * @noninterop */ export { FormComponentModifier } from './arkui/FormComponentModifier'; @@ -131,6 +145,7 @@ export { FormComponentModifier } from './arkui/FormComponentModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { GaugeModifier } from './arkui/GaugeModifier'; @@ -139,6 +154,7 @@ export { GaugeModifier } from './arkui/GaugeModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { GridModifier } from './arkui/GridModifier'; @@ -147,6 +163,7 @@ export { GridModifier } from './arkui/GridModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { GridColModifier } from './arkui/GridColModifier'; @@ -155,6 +172,7 @@ export { GridColModifier } from './arkui/GridColModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { GridItemModifier } from './arkui/GridItemModifier'; @@ -163,6 +181,7 @@ export { GridItemModifier } from './arkui/GridItemModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { GridRowModifier } from './arkui/GridRowModifier'; @@ -171,6 +190,7 @@ export { GridRowModifier } from './arkui/GridRowModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { HyperlinkModifier } from './arkui/HyperlinkModifier'; @@ -179,6 +199,7 @@ export { HyperlinkModifier } from './arkui/HyperlinkModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { ImageAnimatorModifier } from './arkui/ImageAnimatorModifier'; @@ -187,6 +208,7 @@ export { ImageAnimatorModifier } from './arkui/ImageAnimatorModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { ImageModifier } from './arkui/ImageModifier'; @@ -200,6 +222,7 @@ export { ImageModifier } from './arkui/ImageModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 20 + * @noninterop */ export { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; /** @@ -207,6 +230,7 @@ export { SymbolGlyphModifier } from './arkui/SymbolGlyphModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { ImageSpanModifier } from './arkui/ImageSpanModifier'; @@ -215,6 +239,7 @@ export { ImageSpanModifier } from './arkui/ImageSpanModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { LineModifier } from './arkui/LineModifier'; @@ -223,6 +248,7 @@ export { LineModifier } from './arkui/LineModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { ListModifier } from './arkui/ListModifier'; @@ -231,6 +257,7 @@ export { ListModifier } from './arkui/ListModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { ListItemModifier } from './arkui/ListItemModifier'; @@ -239,6 +266,7 @@ export { ListItemModifier } from './arkui/ListItemModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { ListItemGroupModifier } from './arkui/ListItemGroupModifier'; @@ -247,6 +275,7 @@ export { ListItemGroupModifier } from './arkui/ListItemGroupModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { LoadingProgressModifier } from './arkui/LoadingProgressModifier'; @@ -255,6 +284,7 @@ export { LoadingProgressModifier } from './arkui/LoadingProgressModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { MarqueeModifier } from './arkui/MarqueeModifier'; @@ -263,6 +293,7 @@ export { MarqueeModifier } from './arkui/MarqueeModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { MenuModifier } from './arkui/MenuModifier'; @@ -271,6 +302,7 @@ export { MenuModifier } from './arkui/MenuModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { MenuItemModifier } from './arkui/MenuItemModifier'; @@ -279,6 +311,7 @@ export { MenuItemModifier } from './arkui/MenuItemModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { NavDestinationModifier } from './arkui/NavDestinationModifier'; @@ -287,6 +320,7 @@ export { NavDestinationModifier } from './arkui/NavDestinationModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { NavigationModifier } from './arkui/NavigationModifier'; @@ -295,6 +329,7 @@ export { NavigationModifier } from './arkui/NavigationModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { NavigatorModifier } from './arkui/NavigatorModifier'; @@ -303,6 +338,7 @@ export { NavigatorModifier } from './arkui/NavigatorModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { NavRouterModifier } from './arkui/NavRouterModifier'; @@ -311,6 +347,7 @@ export { NavRouterModifier } from './arkui/NavRouterModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { PanelModifier } from './arkui/PanelModifier'; @@ -319,6 +356,7 @@ export { PanelModifier } from './arkui/PanelModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { PathModifier } from './arkui/PathModifier'; @@ -327,6 +365,7 @@ export { PathModifier } from './arkui/PathModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { PatternLockModifier } from './arkui/PatternLockModifier'; @@ -335,6 +374,7 @@ export { PatternLockModifier } from './arkui/PatternLockModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { PolygonModifier } from './arkui/PolygonModifier'; @@ -343,6 +383,7 @@ export { PolygonModifier } from './arkui/PolygonModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { PolylineModifier } from './arkui/PolylineModifier'; @@ -351,6 +392,7 @@ export { PolylineModifier } from './arkui/PolylineModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { ProgressModifier } from './arkui/ProgressModifier'; @@ -359,6 +401,7 @@ export { ProgressModifier } from './arkui/ProgressModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { QRCodeModifier } from './arkui/QRCodeModifier'; @@ -367,6 +410,7 @@ export { QRCodeModifier } from './arkui/QRCodeModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { RadioModifier } from './arkui/RadioModifier'; @@ -375,6 +419,7 @@ export { RadioModifier } from './arkui/RadioModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { RatingModifier } from './arkui/RatingModifier'; @@ -383,6 +428,7 @@ export { RatingModifier } from './arkui/RatingModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { RectModifier } from './arkui/RectModifier'; @@ -391,6 +437,7 @@ export { RectModifier } from './arkui/RectModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { RefreshModifier } from './arkui/RefreshModifier'; @@ -399,6 +446,7 @@ export { RefreshModifier } from './arkui/RefreshModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { RichEditorModifier } from './arkui/RichEditorModifier'; @@ -407,6 +455,7 @@ export { RichEditorModifier } from './arkui/RichEditorModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { RowModifier } from './arkui/RowModifier'; @@ -415,6 +464,7 @@ export { RowModifier } from './arkui/RowModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { RowSplitModifier } from './arkui/RowSplitModifier'; @@ -423,6 +473,7 @@ export { RowSplitModifier } from './arkui/RowSplitModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { ScrollModifier } from './arkui/ScrollModifier'; @@ -431,6 +482,7 @@ export { ScrollModifier } from './arkui/ScrollModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { SearchModifier } from './arkui/SearchModifier'; @@ -439,6 +491,7 @@ export { SearchModifier } from './arkui/SearchModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { SelectModifier } from './arkui/SelectModifier'; @@ -447,6 +500,7 @@ export { SelectModifier } from './arkui/SelectModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { ShapeModifier } from './arkui/ShapeModifier'; @@ -455,6 +509,7 @@ export { ShapeModifier } from './arkui/ShapeModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { SideBarContainerModifier } from './arkui/SideBarContainerModifier'; @@ -463,6 +518,7 @@ export { SideBarContainerModifier } from './arkui/SideBarContainerModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { SliderModifier } from './arkui/SliderModifier'; @@ -471,6 +527,7 @@ export { SliderModifier } from './arkui/SliderModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { SpanModifier } from './arkui/SpanModifier'; @@ -479,6 +536,7 @@ export { SpanModifier } from './arkui/SpanModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { StackModifier } from './arkui/StackModifier'; @@ -487,6 +545,7 @@ export { StackModifier } from './arkui/StackModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { StepperItemModifier } from './arkui/StepperItemModifier'; @@ -495,6 +554,7 @@ export { StepperItemModifier } from './arkui/StepperItemModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { SwiperModifier } from './arkui/SwiperModifier'; @@ -503,6 +563,7 @@ export { SwiperModifier } from './arkui/SwiperModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { TabsModifier } from './arkui/TabsModifier'; @@ -511,6 +572,7 @@ export { TabsModifier } from './arkui/TabsModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { TextAreaModifier } from './arkui/TextAreaModifier'; @@ -519,6 +581,7 @@ export { TextAreaModifier } from './arkui/TextAreaModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { TextModifier } from './arkui/TextModifier'; @@ -527,6 +590,7 @@ export { TextModifier } from './arkui/TextModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { TextClockModifier } from './arkui/TextClockModifier'; @@ -535,6 +599,7 @@ export { TextClockModifier } from './arkui/TextClockModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { TextInputModifier } from './arkui/TextInputModifier'; @@ -543,6 +608,7 @@ export { TextInputModifier } from './arkui/TextInputModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { TextPickerModifier } from './arkui/TextPickerModifier'; @@ -551,6 +617,7 @@ export { TextPickerModifier } from './arkui/TextPickerModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { TextTimerModifier } from './arkui/TextTimerModifier'; @@ -559,6 +626,7 @@ export { TextTimerModifier } from './arkui/TextTimerModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { TimePickerModifier } from './arkui/TimePickerModifier'; @@ -567,6 +635,7 @@ export { TimePickerModifier } from './arkui/TimePickerModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { ToggleModifier } from './arkui/ToggleModifier'; @@ -575,6 +644,7 @@ export { ToggleModifier } from './arkui/ToggleModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { VideoModifier } from './arkui/VideoModifier'; @@ -583,6 +653,7 @@ export { VideoModifier } from './arkui/VideoModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { WaterFlowModifier } from './arkui/WaterFlowModifier'; @@ -591,6 +662,7 @@ export { WaterFlowModifier } from './arkui/WaterFlowModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 12 + * @noninterop */ export { AttributeUpdater } from './arkui/AttributeUpdater'; @@ -601,6 +673,7 @@ export { AttributeUpdater } from './arkui/AttributeUpdater'; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export { ContainerSpanModifier } from './arkui/ContainerSpanModifier'; @@ -611,6 +684,7 @@ export { ContainerSpanModifier } from './arkui/ContainerSpanModifier'; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export { SymbolSpanModifier } from './arkui/SymbolSpanModifier'; @@ -621,6 +695,7 @@ export { SymbolSpanModifier } from './arkui/SymbolSpanModifier'; * @crossplatform * @atomicservice * @since 12 + * @noninterop */ export { ParticleModifier } from './arkui/ParticleModifier'; @@ -629,5 +704,6 @@ export { ParticleModifier } from './arkui/ParticleModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 20 + * @noninterop */ export { StepperModifier } from './arkui/StepperModifier'; diff --git a/api/@ohos.arkui.modifier.static.d.ets b/api/@ohos.arkui.modifier.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..22e4f59881bfc1c7a73dc7cbe2b27a869a8183ef --- /dev/null +++ b/api/@ohos.arkui.modifier.static.d.ets @@ -0,0 +1,298 @@ +/* + * 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 AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { BlankModifier } from './arkui/BlankModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { ColumnModifier } from './arkui/ColumnModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { ColumnSplitModifier } from './arkui/ColumnSplitModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { DividerModifier } from './arkui/DividerModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { FlexModifier } from './arkui/FlexModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { FolderStackModifier } from './arkui/FolderStackModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { GridColModifier } from './arkui/GridColModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { GridRowModifier } from './arkui/GridRowModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { RelativeContainerModifier } from './arkui/RelativeContainerModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { RowModifier } from './arkui/RowModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { RowSplitModifier } from './arkui/RowSplitModifier'; + +/** + * Export AttributeUpdater, which is used to update attributes to native side. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 20 + */ +export { StackModifier } from './arkui/StackModifier'; + +/** + * 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'; diff --git a/api/@ohos.arkui.observer.d.ts b/api/@ohos.arkui.observer.d.ts index dcc34ce7762a7935db1f6c721c8b0778ea3d7cde..6ba74fa4c2501f3198e94f8911ef3925be5339c0 100644 --- a/api/@ohos.arkui.observer.d.ts +++ b/api/@ohos.arkui.observer.d.ts @@ -17,19 +17,9 @@ * @file * @kit ArkUI */ -/*** if arkts 1.2 */ -import { NavPathStack, NavigationOperation, NavBar, ResourceStr } from '@ohos.arkui.component'; -import { UIContext } from '@ohos.arkui.UIContext'; -import UIAbilityContext from './application/UIAbilityContext'; -import { Callback } from './@ohos.base'; -/*** endif */ - -/*** if arkts 1.1 */ import type { Callback } from './@ohos.base'; import type UIAbilityContext from './application/UIAbilityContext'; import type { NavigationOperation, NavBar } from '../component/navigation'; -/*** endif */ - /** * Register callbacks to observe ArkUI behavior. * @@ -45,8 +35,7 @@ import type { NavigationOperation, NavBar } from '../component/navigation'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare namespace uiObserver { /** @@ -64,8 +53,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export enum NavDestinationState { /** @@ -76,13 +64,12 @@ declare namespace uiObserver { * @since 11 */ /** - * When the NavDestination is displayed. + * When the NavDestination displayed. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ON_SHOWN = 0, @@ -99,8 +86,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ON_HIDDEN = 1, @@ -110,8 +96,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ON_APPEAR = 2, @@ -121,8 +106,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ON_DISAPPEAR = 3, @@ -132,8 +116,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ON_WILL_SHOW = 4, @@ -143,8 +126,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ON_WILL_HIDE = 5, @@ -154,8 +136,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ON_WILL_APPEAR = 6, @@ -165,8 +146,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ON_WILL_DISAPPEAR = 7, @@ -196,8 +176,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ON_BACKPRESS = 100 } @@ -217,8 +196,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export enum RouterPageState { /** @@ -234,8 +212,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ABOUT_TO_APPEAR = 0, @@ -252,8 +229,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ABOUT_TO_DISAPPEAR = 1, @@ -270,8 +246,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ON_PAGE_SHOW = 2, @@ -288,8 +263,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ON_PAGE_HIDE = 3, @@ -306,8 +280,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ON_BACK_PRESS = 4 } @@ -319,8 +292,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export enum ScrollEventType { /** @@ -329,8 +301,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ SCROLL_START = 0, @@ -340,8 +311,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ SCROLL_STOP = 1 } @@ -353,8 +323,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export enum TabContentState { /** @@ -363,8 +332,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ON_SHOW = 0, @@ -374,8 +342,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ ON_HIDE = 1 } @@ -395,8 +362,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface NavDestinationInfo { /** @@ -414,8 +380,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ navigationId: ResourceStr, @@ -434,8 +399,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ name: ResourceStr, @@ -454,8 +418,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ state: NavDestinationState, @@ -466,8 +429,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ index: number; @@ -478,8 +440,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ param?: Object; @@ -490,8 +451,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ navDestinationId: string; @@ -525,8 +485,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface NavigationInfo { /** @@ -536,8 +495,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ navigationId: string; @@ -548,8 +506,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pathStack: NavPathStack; @@ -572,8 +529,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface ScrollEventInfo { /** @@ -583,8 +539,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ id: string, @@ -595,8 +550,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ uniqueId: number, @@ -607,8 +561,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ scrollEvent: ScrollEventType, @@ -619,8 +572,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ offset: number, @@ -643,8 +595,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface TabContentInfo { /** @@ -654,8 +605,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ tabContentId: string, @@ -666,8 +616,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ tabContentUniqueId: number, @@ -678,8 +627,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ state: TabContentState, @@ -690,8 +638,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ index: number, @@ -702,8 +649,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ id: string, @@ -714,8 +660,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ uniqueId: number } @@ -727,8 +672,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface ObserverOptions { /** @@ -738,8 +682,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ id: string } @@ -757,8 +700,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export class RouterPageInfo { /** @@ -776,8 +718,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ context: UIAbilityContext | UIContext; @@ -796,8 +737,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ index: number; @@ -816,8 +756,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ name: string; @@ -836,8 +775,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ path: string; @@ -856,8 +794,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ state: RouterPageState; @@ -868,8 +805,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pageId: string; } @@ -880,8 +816,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export class DensityInfo { /** @@ -891,8 +826,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ context: UIContext; @@ -903,8 +837,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ density: number; } @@ -916,8 +849,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface NavDestinationSwitchInfo { /** @@ -927,8 +859,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ context: UIAbilityContext | UIContext; @@ -939,8 +870,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ from: NavDestinationInfo | NavBar; @@ -951,8 +881,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ to: NavDestinationInfo | NavBar; @@ -963,8 +892,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ operation: NavigationOperation; } @@ -976,8 +904,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface NavDestinationSwitchObserverOptions { /** @@ -987,8 +914,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ navigationId: ResourceStr; } @@ -1015,21 +941,6 @@ declare namespace uiObserver { * @since 12 */ export function on(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback: Callback): void; - - /** - * Registers a callback function to be called when the navigation destination is updated. - * - * @param { 'navDestinationUpdate' } type - The type of event to listen for. Must be 'navDestinationUpdate'. - * @param { NavDestinationSwitchObserverOptions } options - The options object. - * @param { Callback } callback - The callback function to be called when the navigation destination is updated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - export function on(type: 'navDestinationUpdate', options: NavDestinationSwitchObserverOptions, callback: Callback): void; - /** * Removes a callback function that was previously registered with `on()`. * @@ -1054,21 +965,6 @@ declare namespace uiObserver { * @since 12 */ export function off(type: 'navDestinationUpdate', options: { navigationId: ResourceStr }, callback?: Callback): void; - - /** - * Removes a callback function that was previously registered with `on()`. - * - * @param { 'navDestinationUpdate' } type - The type of event to remove the listener for. Must be 'navDestinationUpdate'. - * @param { NavDestinationSwitchObserverOptions } options - The options object. - * @param { Callback } callback - The callback function to remove. If not provided, all callbacks for the given event type and - * navigation ID will be removed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - export function off(type: 'navDestinationUpdate', options: NavDestinationSwitchObserverOptions, callback?: Callback): void; /** * Registers a callback function to be called when the navigation destination is updated. @@ -1087,8 +983,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function on(type: 'navDestinationUpdate', callback: Callback): void; @@ -1111,8 +1006,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function off(type: 'navDestinationUpdate', callback?: Callback): void; @@ -1125,8 +1019,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function on(type: 'scrollEvent', options: ObserverOptions, callback: Callback): void; @@ -1140,8 +1033,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function off(type: 'scrollEvent', options: ObserverOptions, callback?: Callback): void; @@ -1153,8 +1045,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function on(type: 'scrollEvent', callback: Callback): void; @@ -1167,8 +1058,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function off(type: 'scrollEvent', callback?: Callback): void; @@ -1191,8 +1081,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function on(type: 'routerPageUpdate', context: UIAbilityContext | UIContext, callback: Callback): void; @@ -1217,8 +1106,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function off(type: 'routerPageUpdate', context: UIAbilityContext | UIContext, callback?: Callback): void; @@ -1231,8 +1119,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function on(type: 'densityUpdate', context: UIContext, callback: Callback): void; @@ -1246,8 +1133,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function off(type: 'densityUpdate', context: UIContext, callback?: Callback): void; @@ -1260,8 +1146,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function on(type: 'willDraw', context: UIContext, callback: Callback): void; @@ -1275,8 +1160,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function off(type: 'willDraw', context: UIContext, callback?: Callback): void; @@ -1289,8 +1173,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function on(type: 'didLayout', context: UIContext, callback: Callback): void; @@ -1304,8 +1187,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function off(type: 'didLayout', context: UIContext, callback?: Callback): void; @@ -1318,8 +1200,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function on(type: 'tabContentUpdate', options: ObserverOptions, callback: Callback): void; @@ -1333,8 +1214,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function off(type: 'tabContentUpdate', options: ObserverOptions, callback?: Callback): void; @@ -1346,8 +1226,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function on(type: 'tabContentUpdate', callback: Callback): void; @@ -1360,8 +1239,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function off(type: 'tabContentUpdate', callback?: Callback): void; @@ -1374,8 +1252,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function on( type: 'navDestinationSwitch', @@ -1393,8 +1270,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function off( type: 'navDestinationSwitch', @@ -1412,8 +1288,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function on( type: 'navDestinationSwitch', @@ -1433,8 +1308,7 @@ declare namespace uiObserver { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export function off( type: 'navDestinationSwitch', 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 5f64735337d276e29544a4254f87cb593e156ce7..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" @@ -37,8 +38,7 @@ * @namespace performanceMonitor * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ declare namespace performanceMonitor { /** @@ -47,16 +47,14 @@ declare namespace performanceMonitor { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ export enum ActionType { /** * The user presses the finger on the screen. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ LAST_DOWN = 0, @@ -64,8 +62,7 @@ declare namespace performanceMonitor { * The user lifts up the finger from the screen. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ LAST_UP = 1, @@ -73,8 +70,7 @@ declare namespace performanceMonitor { * The user first moves the finger after pressing down the screen. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ FIRST_MOVE = 2 } @@ -85,16 +81,14 @@ declare namespace performanceMonitor { * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export enum SourceType { /** * The user touches the screen to trigger the scene. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PERF_TOUCH_EVENT = 0, @@ -102,8 +96,7 @@ declare namespace performanceMonitor { * TThe user uses the mouse to trigger the scene. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PERF_MOUSE_EVENT = 1, @@ -111,8 +104,7 @@ declare namespace performanceMonitor { * The user uses the touchpad to trigger the scene. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PERF_TOUCHPAD_EVENT = 2, @@ -120,8 +112,7 @@ declare namespace performanceMonitor { * The user uses the joystick to trigger the scene. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PERF_JOYSTICK_EVENT = 3, @@ -129,8 +120,7 @@ declare namespace performanceMonitor { * The user uses the keyboard to trigger the scene. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ PERF_KEY_EVENT = 4 } @@ -143,10 +133,9 @@ declare namespace performanceMonitor { * @param { string } note Indicates the app expected info delivered. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @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. @@ -154,8 +143,7 @@ declare namespace performanceMonitor { * @param { string } scene Indicates the scene name. It must be the same with the {@code scene} of start. * @syscap SystemCapability.ArkUI.ArkUI.Full * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ function end(scene: string): void; @@ -165,11 +153,10 @@ 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ function recordInputEventTime(type: ActionType, sourceType: SourceType, time: number): void; } diff --git a/api/@ohos.arkui.performanceMonitor.static.d.ets b/api/@ohos.arkui.performanceMonitor.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..c035aa775bd1629f8a8320a5e416a093a3cd0011 --- /dev/null +++ b/api/@ohos.arkui.performanceMonitor.static.d.ets @@ -0,0 +1,154 @@ +'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 + */ +/** + * Provides interfaces to monitor a scene for performance measurement. + * + *

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

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

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

Each {@code begin} matches one {@code end}, and they must have the same scene id. + * + * @namespace performanceMonitor + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ +declare namespace performanceMonitor { + /** + * Enumerates the input event type. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @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 + } + /** + * Enumerates the input source type. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @systemapi + * @since 20 + */ + 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 + } + /** + * 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 20 + */ + 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 20 + */ + 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 20 + */ + 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.ts b/api/@ohos.arkui.shape.d.ts index 3274f282b20d6ac3f484d23002c52dd538c260c6..f4688f6e5c8e55933a4ed6dce5fd5772008173d0 100644 --- a/api/@ohos.arkui.shape.d.ts +++ b/api/@ohos.arkui.shape.d.ts @@ -18,9 +18,7 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Position, ResourceColor, Length, SizeOptions } from './arkui/component/units' -/*** endif */ + /** * Interface for shape size properties. @@ -30,18 +28,16 @@ import { Position, ResourceColor, Length, SizeOptions } from './arkui/component/ * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ -export interface ShapeSize { +interface ShapeSize { /** * Defines the width of Shape. * @type { ? (number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ width?: number | string; @@ -51,8 +47,7 @@ export interface ShapeSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ height?: number | string; } @@ -66,18 +61,16 @@ export interface ShapeSize { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ -export interface RectShapeOptions extends ShapeSize { +interface RectShapeOptions extends ShapeSize { /** * Defines the corner radius of the RectShape. * @type { ? (number | string | Array) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ radius?: number | string | Array; } @@ -91,18 +84,16 @@ export interface RectShapeOptions extends ShapeSize { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ -export interface RoundRectShapeOptions extends ShapeSize { +interface RoundRectShapeOptions extends ShapeSize { /** * Defines the width of the corner radius for RectShape. * @type { ? (number | string) } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ radiusWidth?: number | string; @@ -112,8 +103,7 @@ export interface RoundRectShapeOptions extends ShapeSize { * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ radiusHeight?: number | string; } @@ -126,18 +116,16 @@ export interface RoundRectShapeOptions extends ShapeSize { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ -export interface PathShapeOptions { +interface PathShapeOptions { /** * Defines the commands for drawing the PathShape. * @type { ?string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ commands?: string; } @@ -149,8 +137,7 @@ export interface PathShapeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class CommonShapeMethod { /** @@ -162,8 +149,7 @@ declare class CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ offset(offset: Position): T; @@ -176,8 +162,7 @@ declare class CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fill(color: ResourceColor): T; @@ -190,8 +175,7 @@ declare class CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ position(position: Position): T; } @@ -204,8 +188,7 @@ declare class CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare class BaseShape extends CommonShapeMethod { /** @@ -217,8 +200,7 @@ declare class BaseShape extends CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ width(width: Length): T; @@ -231,8 +213,7 @@ declare class BaseShape extends CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ height(height: Length): T; @@ -245,8 +226,7 @@ declare class BaseShape extends CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ size(size: SizeOptions): T; } @@ -259,8 +239,7 @@ declare class BaseShape extends CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export declare class RectShape extends BaseShape { /** @@ -271,8 +250,7 @@ export declare class RectShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(options?: RectShapeOptions | RoundRectShapeOptions); @@ -285,8 +263,7 @@ export declare class RectShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ radiusWidth(rWidth: number | string): RectShape; @@ -299,8 +276,7 @@ export declare class RectShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ radiusHeight(rHeight: number | string): RectShape; @@ -313,8 +289,7 @@ export declare class RectShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ radius(radius: number | string | Array): RectShape; } @@ -327,8 +302,7 @@ export declare class RectShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export declare class CircleShape extends BaseShape { /** @@ -339,8 +313,7 @@ export declare class CircleShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(options?: ShapeSize); } @@ -353,8 +326,7 @@ export declare class CircleShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export declare class EllipseShape extends BaseShape { /** @@ -365,8 +337,7 @@ export declare class EllipseShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(options?: ShapeSize); } @@ -379,8 +350,7 @@ export declare class EllipseShape extends BaseShape { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export declare class PathShape extends CommonShapeMethod { /** @@ -391,8 +361,7 @@ export declare class PathShape extends CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constructor(options?: PathShapeOptions); @@ -405,8 +374,7 @@ export declare class PathShape extends CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @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.static.d.ets similarity index 96% rename from api/@ohos.arkui.stateManagement.d.ets rename to api/@ohos.arkui.stateManagement.static.d.ets index 94b7c1ab1e9de08e097b1db1fb7fc0b1a10df3c5..4f8e84173bb4dfc78d7b79441a86a0b14a756fd6 100644 --- a/api/@ohos.arkui.stateManagement.d.ets +++ b/api/@ohos.arkui.stateManagement.static.d.ets @@ -1,3 +1,4 @@ +'use static' /* * Copyright (C) 2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/api/@ohos.arkui.theme.d.ts b/api/@ohos.arkui.theme.d.ts index 50f2062772205f75c8b4595c24474139a5a9aeee..b2c873def59fe764e929e573cb054cca023ffdde 100644 --- a/api/@ohos.arkui.theme.d.ts +++ b/api/@ohos.arkui.theme.d.ts @@ -18,11 +18,6 @@ * @file * @kit ArkUI */ - -/*** if arkts 1.2 */ -import { ResourceColor } from './arkui/component/units'; -/*** endif */ - /** * Defines the struct of Theme. * @@ -30,8 +25,7 @@ import { ResourceColor } from './arkui/component/units'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export declare interface Theme { /** @@ -41,8 +35,7 @@ export declare interface Theme { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ colors: Colors; } @@ -54,8 +47,7 @@ export declare interface Theme { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export declare interface Colors { @@ -66,8 +58,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ brand: ResourceColor; @@ -78,8 +69,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ warning: ResourceColor; @@ -90,8 +80,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ alert: ResourceColor; @@ -102,8 +91,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ confirm: ResourceColor; @@ -114,8 +102,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontPrimary: ResourceColor; @@ -126,8 +113,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontSecondary: ResourceColor; @@ -138,8 +124,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontTertiary: ResourceColor; @@ -150,8 +135,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontFourth: ResourceColor; @@ -162,8 +146,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontEmphasize: ResourceColor; @@ -174,8 +157,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontOnPrimary: ResourceColor; @@ -186,8 +168,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontOnSecondary: ResourceColor; @@ -198,8 +179,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontOnTertiary: ResourceColor; @@ -210,8 +190,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontOnFourth: ResourceColor; @@ -222,8 +201,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ iconPrimary: ResourceColor; @@ -234,8 +212,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ iconSecondary: ResourceColor; @@ -246,8 +223,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ iconTertiary: ResourceColor; @@ -258,8 +234,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ iconFourth: ResourceColor; @@ -270,8 +245,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ iconEmphasize: ResourceColor; @@ -282,8 +256,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ iconSubEmphasize: ResourceColor; @@ -294,8 +267,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ iconOnPrimary: ResourceColor; @@ -306,8 +278,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ iconOnSecondary: ResourceColor; @@ -318,8 +289,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ iconOnTertiary: ResourceColor; @@ -330,8 +300,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ iconOnFourth: ResourceColor; @@ -342,8 +311,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundPrimary: ResourceColor; @@ -354,8 +322,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundSecondary: ResourceColor; @@ -366,8 +333,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundTertiary: ResourceColor; @@ -378,8 +344,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundFourth: ResourceColor; @@ -390,8 +355,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ backgroundEmphasize: ResourceColor; @@ -402,8 +366,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compForegroundPrimary: ResourceColor; @@ -414,8 +377,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compBackgroundPrimary: ResourceColor; @@ -426,8 +388,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compBackgroundPrimaryTran: ResourceColor; @@ -438,8 +399,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compBackgroundPrimaryContrary: ResourceColor; @@ -450,8 +410,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compBackgroundGray: ResourceColor; @@ -462,8 +421,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compBackgroundSecondary: ResourceColor; @@ -474,8 +432,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compBackgroundTertiary: ResourceColor; @@ -486,8 +443,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compBackgroundEmphasize: ResourceColor; @@ -498,8 +454,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compBackgroundNeutral: ResourceColor; @@ -510,8 +465,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compEmphasizeSecondary: ResourceColor; @@ -522,8 +476,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compEmphasizeTertiary: ResourceColor; @@ -534,8 +487,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compDivider: ResourceColor; @@ -546,8 +498,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compCommonContrary: ResourceColor; @@ -558,8 +509,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compBackgroundFocus: ResourceColor; @@ -570,8 +520,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compFocusedPrimary: ResourceColor; @@ -582,8 +531,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compFocusedSecondary: ResourceColor; @@ -594,8 +542,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ compFocusedTertiary: ResourceColor; @@ -606,68 +553,62 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interactiveHover: ResourceColor; /** - * Pressed interactive color + * Pressed interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interactivePressed: ResourceColor; /** - * Focus interactive color + * Focus interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interactiveFocus: ResourceColor; /** - * Active interactive color + * Active interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interactiveActive: ResourceColor; /** - * Select interactive color + * Select interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interactiveSelect: ResourceColor; /** - * Click interactive color + * Click interactive color * * @type { ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interactiveClick: ResourceColor; } @@ -679,8 +620,7 @@ export declare interface Colors { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export declare interface CustomTheme { /** @@ -690,8 +630,7 @@ export declare interface CustomTheme { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ colors?: CustomColors; } @@ -706,27 +645,13 @@ export declare interface CustomTheme { * @since 12 */ export declare type CustomColors = Partial; - -/** - * Defines the struct of CustomColors. - * - * @typedef { Partial } CustomColors - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ -export type CustomColors = Partial; - /** * Class ThemeControl provides the Theme management for whole Ability and pages. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export declare class ThemeControl { /** @@ -738,8 +663,7 @@ export declare class ThemeControl { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ static setDefaultTheme(theme: CustomTheme): void; } diff --git a/api/@ohos.arkui.theme.static.d.ets b/api/@ohos.arkui.theme.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..01238b37d2b98d943dc3632c142906e641fc9deb --- /dev/null +++ b/api/@ohos.arkui.theme.static.d.ets @@ -0,0 +1,499 @@ +'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 { ResourceColor } from './arkui/component/units'; +/** + * Defines the struct of Theme. + * + * @interface Theme + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface Theme { + /** + * Define tokens associated with color resources. + * + * @type { Colors } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + colors: Colors; +} +/** + * Defines the struct of Colors. + * + * @interface Colors + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface Colors { + /** + * System brand Color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + brand: ResourceColor; + /** + * System warning Color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + warning: ResourceColor; + /** + * System alert Color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + alert: ResourceColor; + /** + * System confirm Color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + confirm: ResourceColor; + /** + * First level text color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontPrimary: ResourceColor; + /** + * Secondary text color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontSecondary: ResourceColor; + /** + * tertiary text color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontTertiary: ResourceColor; + /** + * Fourth text color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontFourth: ResourceColor; + /** + * Emphasize text color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontEmphasize: ResourceColor; + /** + * First level text inversion, used on colored backgrounds. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontOnPrimary: ResourceColor; + /** + * Secondary level text inversion, used on colored backgrounds. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontOnSecondary: ResourceColor; + /** + * Tertiary level text inversion, used on colored backgrounds. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontOnTertiary: ResourceColor; + /** + * Fourth level text inversion, used on colored backgrounds. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + fontOnFourth: ResourceColor; + /** + * First level icon color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iconPrimary: ResourceColor; + /** + * Secondary level icon color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iconSecondary: ResourceColor; + /** + * Tertiary level icon color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iconTertiary: ResourceColor; + /** + * Fourth level icon color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iconFourth: ResourceColor; + /** + * Emphasize level icon color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iconEmphasize: ResourceColor; + /** + * Secondary emphasize level icon color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iconSubEmphasize: ResourceColor; + /** + * First level icon reversed, used on a colored background. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iconOnPrimary: ResourceColor; + /** + * Secondary level icon reversed, used on a colored background. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iconOnSecondary: ResourceColor; + /** + * Tertiary level icon reversed, used on a colored background. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iconOnTertiary: ResourceColor; + /** + * Fourth level icon reversed, used on a colored background. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + iconOnFourth: ResourceColor; + /** + * System Primary level background color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + backgroundPrimary: ResourceColor; + /** + * System Secondary level background color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + backgroundSecondary: ResourceColor; + /** + * System tertiary level background color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + backgroundTertiary: ResourceColor; + /** + * System fourth level background color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + backgroundFourth: ResourceColor; + /** + * System emphasize level background color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + backgroundEmphasize: ResourceColor; + /** + * CompForegroundPrimary color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compForegroundPrimary: ResourceColor; + /** + * CompBackgroundPrimary color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compBackgroundPrimary: ResourceColor; + /** + * CompBackgroundPrimaryTran color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compBackgroundPrimaryTran: ResourceColor; + /** + * CompBackgroundPrimaryContrary color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compBackgroundPrimaryContrary: ResourceColor; + /** + * CompBackgroundGray color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compBackgroundGray: ResourceColor; + /** + * 10% black universal control background. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compBackgroundSecondary: ResourceColor; + /** + * 5% black universal control background. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compBackgroundTertiary: ResourceColor; + /** + * 100% bright brand background color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compBackgroundEmphasize: ResourceColor; + /** + * Black neutral high gloss color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compBackgroundNeutral: ResourceColor; + /** + * 20% High gloss brand background color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compEmphasizeSecondary: ResourceColor; + /** + * 10% High gloss brand background color. + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compEmphasizeTertiary: ResourceColor; + /** + * Universal Division Line Color + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compDivider: ResourceColor; + /** + * CompCommonContrary Color + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compCommonContrary: ResourceColor; + /** + * CompBackgroundFocus Color + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compBackgroundFocus: ResourceColor; + /** + * CompFocusedPrimary Color + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compFocusedPrimary: ResourceColor; + /** + * CompFocusedSecondary Color + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compFocusedSecondary: ResourceColor; + /** + * CompFocusedTertiary Color + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + compFocusedTertiary: ResourceColor; + /** + * Hover interactive color + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interactiveHover: ResourceColor; + /** + * Pressed interactive color + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interactivePressed: ResourceColor; + /** + * Focus interactive color + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interactiveFocus: ResourceColor; + /** + * Active interactive color + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interactiveActive: ResourceColor; + /** + * Select interactive color + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interactiveSelect: ResourceColor; + /** + * Click interactive color + * + * @type { ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + interactiveClick: ResourceColor; +} +/** + * Defines the struct of CustomTheme. + * + * @interface CustomTheme + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare interface CustomTheme { + /** + * Define tokens associated with color resources.. + * + * @type { ?CustomColors } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + colors?: CustomColors; +} +/** + * Defines the struct of CustomColors. + * + * @typedef { Partial } CustomColors + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export type CustomColors = Partial; +/** + * Class ThemeControl provides the Theme management for whole Ability and pages. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +export declare class ThemeControl { + /** + * Sets the default Theme: + * - for whole Ability when invoked from the Ability level code. + * - for the ArkUI page and for later opened pages when invoked at the ArkUI page level. + * + * @param { CustomTheme } theme + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + static setDefaultTheme(theme: CustomTheme): void; +} diff --git a/api/@ohos.arkui.uiExtension.d.ts b/api/@ohos.arkui.uiExtension.d.ts index d9e31f89a458426fa3c4ae1715d4f492024f9d96..5a91c6f9f9b5d30c1541cc452d73514d054a76fd 100644 --- a/api/@ohos.arkui.uiExtension.d.ts +++ b/api/@ohos.arkui.uiExtension.d.ts @@ -61,7 +61,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. @@ -77,7 +78,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. @@ -125,7 +127,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: @@ -140,9 +143,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. @@ -202,7 +207,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. @@ -212,24 +218,25 @@ declare namespace uiExtension { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - 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.atomicservice.AtomicServiceNavigation.d.ets b/api/@ohos.atomicservice.AtomicServiceNavigation.d.ets index aeb2fb3aba1f7160657577c59fbdeb1f907bdc9b..bf3974a1ae6716f561d800407aea98a8dca3e4c6 100644 --- a/api/@ohos.atomicservice.AtomicServiceNavigation.d.ets +++ b/api/@ohos.atomicservice.AtomicServiceNavigation.d.ets @@ -27,6 +27,7 @@ import { Callback } from '@ohos.base'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ export declare enum MixMode { /** @@ -63,6 +64,7 @@ export declare enum MixMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ export declare enum GradientAlpha { /** @@ -106,6 +108,7 @@ export declare enum GradientAlpha { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ export declare enum BackgroundTheme { /** @@ -141,6 +144,7 @@ export declare enum BackgroundTheme { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ @Component export declare struct AtomicServiceNavigation { @@ -314,6 +318,7 @@ export declare struct AtomicServiceNavigation { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export interface TitleOptions { /** @@ -378,6 +383,7 @@ export interface TitleOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ export interface GradientBackground { /** @@ -438,6 +444,7 @@ export interface GradientBackground { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ export interface SideBarOptions { /** @@ -479,6 +486,7 @@ export interface SideBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ export declare enum TitleBarType { /** @@ -518,5 +526,6 @@ export declare enum TitleBarType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export type NavDestinationBuilder = (name: string, param?: Object) => void; \ No newline at end of file diff --git a/api/@ohos.atomicservice.AtomicServiceSearch.d.ets b/api/@ohos.atomicservice.AtomicServiceSearch.d.ets index 59626bf350d36fbadf832b65abec3b6ce5d5a443..766dfdced4539209311dc781137a072374396bcd 100644 --- a/api/@ohos.atomicservice.AtomicServiceSearch.d.ets +++ b/api/@ohos.atomicservice.AtomicServiceSearch.d.ets @@ -26,6 +26,7 @@ import { OperationOption } from '@ohos.arkui.advanced.SubHeader'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ declare type OnSelectCallback = (index: number, selectValue: string) => void; /** @@ -37,6 +38,7 @@ declare type OnSelectCallback = (index: number, selectValue: string) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ declare type OnPasteCallback = (pasteValue: string, event: PasteEvent) => void; /** @@ -48,6 +50,7 @@ declare type OnPasteCallback = (pasteValue: string, event: PasteEvent) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ declare type OnTextSelectionChangeCallback = (selectionStart: number, selectionEnd: number) => void; /** @@ -59,6 +62,7 @@ declare type OnTextSelectionChangeCallback = (selectionStart: number, selectionE * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ declare type OnContentScrollCallback = (totalOffsetX: number, totalOffsetY: number) => void; /** @@ -68,6 +72,7 @@ declare type OnContentScrollCallback = (totalOffsetX: number, totalOffsetY: numb * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ export interface InputFilterParams { /** @@ -96,6 +101,7 @@ export interface InputFilterParams { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ export interface SearchButtonParams { /** @@ -124,6 +130,7 @@ export interface SearchButtonParams { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ export interface MenuAlignParams { /** @@ -153,6 +160,7 @@ export interface MenuAlignParams { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ export interface SearchParams { /** @@ -536,6 +544,7 @@ export interface SearchParams { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ export interface SelectParams { /** @@ -735,6 +744,7 @@ export interface SelectParams { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ export interface OperationParams { /** @@ -763,6 +773,7 @@ export interface OperationParams { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ @Component export declare struct AtomicServiceSearch { diff --git a/api/@ohos.atomicservice.AtomicServiceTabs.d.ets b/api/@ohos.atomicservice.AtomicServiceTabs.d.ets index b9a3d830ffcc4c9d68f68774660d86407b79ddbc..a2ae7de1d3c1a19396aa225b884077986e3411c8 100644 --- a/api/@ohos.atomicservice.AtomicServiceTabs.d.ets +++ b/api/@ohos.atomicservice.AtomicServiceTabs.d.ets @@ -25,6 +25,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ @Component export declare struct AtomicServiceTabs { @@ -154,6 +155,7 @@ export declare struct AtomicServiceTabs { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare class TabBarOptions { /** @@ -178,6 +180,7 @@ export declare class TabBarOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare enum TabBarPosition { @@ -207,6 +210,7 @@ export declare enum TabBarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export type TabContentBuilder = () => void; @@ -220,5 +224,6 @@ export type TabContentBuilder = () => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export type OnContentWillChangeCallback = (currentIndex: number, comingIndex: number) => boolean; \ No newline at end of file diff --git a/api/@ohos.atomicservice.AtomicServiceWeb.d.ets b/api/@ohos.atomicservice.AtomicServiceWeb.d.ets index 53aa1234299ad5d2861b42642be9b01e623c1ef2..2972dfe13c8f8d3e3b39cf9e5cb884fa9a0fc88d 100644 --- a/api/@ohos.atomicservice.AtomicServiceWeb.d.ets +++ b/api/@ohos.atomicservice.AtomicServiceWeb.d.ets @@ -27,6 +27,7 @@ import { Callback } from '@ohos.base'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ @Component export declare struct AtomicServiceWeb { @@ -180,6 +181,7 @@ export declare struct AtomicServiceWeb { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare interface OnMessageEvent { /** @@ -200,6 +202,7 @@ export declare interface OnMessageEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare interface OnErrorReceiveEvent { /** @@ -230,6 +233,7 @@ export declare interface OnErrorReceiveEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare interface OnHttpErrorReceiveEvent { /** @@ -260,6 +264,7 @@ export declare interface OnHttpErrorReceiveEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare interface OnPageBeginEvent { /** @@ -280,6 +285,7 @@ export declare interface OnPageBeginEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare interface OnPageEndEvent { /** @@ -300,6 +306,7 @@ export declare interface OnPageEndEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare interface OnLoadInterceptEvent { /** @@ -320,6 +327,7 @@ export declare interface OnLoadInterceptEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare interface OnProgressChangeEvent { /** @@ -339,6 +347,7 @@ export declare interface OnProgressChangeEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ @Observed export declare class AtomicServiceWebController { @@ -477,6 +486,7 @@ export declare class AtomicServiceWebController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare interface WebHeader { /** @@ -509,5 +519,6 @@ export declare interface WebHeader { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export type OnLoadInterceptCallback = (event: OnLoadInterceptEvent) => boolean; diff --git a/api/@ohos.atomicservice.HalfScreenLaunchComponent.d.ets b/api/@ohos.atomicservice.HalfScreenLaunchComponent.d.ets index 2bb4864c30ff81642a92e1c10140e1e53d59b1b1..70e8caa05e435561bb3d79b146146dc3e4cfdbbb 100644 --- a/api/@ohos.atomicservice.HalfScreenLaunchComponent.d.ets +++ b/api/@ohos.atomicservice.HalfScreenLaunchComponent.d.ets @@ -27,6 +27,7 @@ import { Callback, ErrorCallback } from '@ohos.base'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 + * @noninterop */ @Component export declare struct HalfScreenLaunchComponent { diff --git a/api/@ohos.atomicservice.InterstitialDialogAction.d.ets b/api/@ohos.atomicservice.InterstitialDialogAction.d.ets index 4c92b0a8361e5d03c2c3aced05fe3d0fa9df18cc..c2bbc22ef3e776fb6e83e3baacc356d2e6bd0297 100644 --- a/api/@ohos.atomicservice.InterstitialDialogAction.d.ets +++ b/api/@ohos.atomicservice.InterstitialDialogAction.d.ets @@ -26,6 +26,7 @@ import { ComponentContent } from '@ohos.arkui.node'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare enum IconStyle { /** @@ -52,6 +53,7 @@ export declare enum IconStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare enum TitlePosition { /** @@ -78,6 +80,7 @@ export declare enum TitlePosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare enum BottomOffset { /** @@ -104,6 +107,7 @@ export declare enum BottomOffset { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare interface DialogOptions { /** @@ -221,6 +225,7 @@ export declare interface DialogOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare class InterstitialDialogAction { /** diff --git a/api/@ohos.atomicservice.NavPushPathHelper.d.ets b/api/@ohos.atomicservice.NavPushPathHelper.d.ets index fb559885ecf027832999bf667079f779a1039ce2..c715ae2e20fd8dcd1efc4415cc531e0b2430d740 100644 --- a/api/@ohos.atomicservice.NavPushPathHelper.d.ets +++ b/api/@ohos.atomicservice.NavPushPathHelper.d.ets @@ -24,6 +24,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 12 + * @noninterop */ export declare class NavPushPathHelper { /** diff --git a/api/@ohos.base.d.ets b/api/@ohos.base.d.ets deleted file mode 100644 index 2db65e803e6790af078ce6cdbe04f7afc54daf1e..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 | null, data: T | undefined)=> 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 { int } code - * @params { Error } error - * @syscap SystemCapability.Base - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - constructor(code: int, error: Error); - /** - * A constructor used to create a BusinessError object - * @params { int } code - * @params { T } data - * @params { Error } error - * @syscap SystemCapability.Base - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - constructor(code: int, 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 { int } code - * @syscap SystemCapability.Base - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - code: int; - /** - * 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.bluetooth.access.d.ts b/api/@ohos.bluetooth.access.d.ts index 13915e2e9ee373f5b6aeae58158d26bfcdfa8890..7aeb4edc2d8696bc8b88fe06c1eff538a1993688 100644 --- a/api/@ohos.bluetooth.access.d.ts +++ b/api/@ohos.bluetooth.access.d.ts @@ -288,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; @@ -349,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; @@ -442,7 +444,7 @@ declare namespace access { /** * The enum of bluetooth state. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice diff --git a/api/@ohos.bluetooth.ble.d.ts b/api/@ohos.bluetooth.ble.d.ts index c2feb8c7779cfceaf1f6529b96f78e9b3128ae73..2271a38e95bdde4242a3bc6f7dc6724a603a1e22 100644 --- a/api/@ohos.bluetooth.ble.d.ts +++ b/api/@ohos.bluetooth.ble.d.ts @@ -2880,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. @@ -2893,7 +2893,7 @@ declare namespace ble { * @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. @@ -4107,14 +4107,14 @@ declare namespace ble { /** * The Id of the read request * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice * @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 * @@ -4125,13 +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 arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - offset: number; + offset: int; /** * The UUID of a CharacteristicReadRequest instance * @@ -4256,14 +4256,14 @@ declare namespace ble { /** * The Id of the write request * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice * @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 * @@ -4274,13 +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 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 * @@ -4463,14 +4463,14 @@ declare namespace ble { /** * The Id of the read request * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice * @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 * @@ -4481,13 +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 arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - offset: number; + offset: int; /** * The UUID of a DescriptorReadRequest instance * @@ -4638,14 +4638,14 @@ declare namespace ble { /** * The Id of the write request * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice * @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 * @@ -4656,13 +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 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 * @@ -4871,14 +4871,14 @@ declare namespace ble { /** * The Id of the write request * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice * @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 * @@ -4897,14 +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 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 * @@ -4915,13 +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 arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - offset: number; + offset: int; /** * Indicates the value to be sent * @@ -5259,13 +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 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} @@ -5280,13 +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 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} * @@ -5529,12 +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 arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - duration?: number; + duration?: int; } /** @@ -5558,12 +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 arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - duration?: number; + duration?: int; } /** @@ -6154,14 +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 arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - interval?: number; + interval?: int; /** * Bluetooth LE scan mode * @@ -6432,7 +6432,7 @@ declare namespace ble { /** * The enum of gatt characteristic write type * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice @@ -6506,7 +6506,7 @@ declare namespace ble { /** * The enum of scan duty. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice @@ -6593,7 +6593,7 @@ declare namespace ble { /** * The enum of BLE match mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} diff --git a/api/@ohos.bluetooth.connection.d.ts b/api/@ohos.bluetooth.connection.d.ts index efbc3b9f7738e38b5f256cea1f68ce30e9afb4af..4f19dba260267696593df3c2025eaac7cedff92a 100644 --- a/api/@ohos.bluetooth.connection.d.ts +++ b/api/@ohos.bluetooth.connection.d.ts @@ -746,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. @@ -758,7 +758,7 @@ declare namespace connection { * @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. @@ -1372,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; @@ -1413,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; @@ -1444,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; @@ -1471,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; @@ -1502,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; @@ -1533,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; @@ -1549,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; @@ -1565,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; @@ -1578,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; @@ -1591,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; @@ -1804,7 +1814,7 @@ declare namespace connection { /** * The enum of BR scan mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @since arkts {'1.1':'13','1.2':'20'} @@ -1895,7 +1905,7 @@ declare namespace connection { /** * The enum of bond state. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice diff --git a/api/@ohos.bluetooth.constant.d.ts b/api/@ohos.bluetooth.constant.d.ts index 2f6a671b02713dbe273184c4ca74eb99f29ce29a..acd1baf6cd7f54b8f4373698e3f8ebd07dc5c624 100644 --- a/api/@ohos.bluetooth.constant.d.ts +++ b/api/@ohos.bluetooth.constant.d.ts @@ -361,7 +361,7 @@ declare namespace constant { /** * The enum of profile connection state. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @atomicservice @@ -471,7 +471,7 @@ declare namespace constant { /** * The enum of major class of a bluetooth device. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @since arkts {'1.1':'13','1.2':'20'} @@ -584,7 +584,7 @@ declare namespace constant { /** * The enum of major minor class of a bluetooth device. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.Bluetooth.Core * @crossplatform * @since arkts {'1.1':'13','1.2':'20'} diff --git a/api/@ohos.buffer.d.ts b/api/@ohos.buffer.d.ts index bed436ace9ca449dd697017fe34ca1b8cd2c9c5a..07478c41eea3949721d39d29378d708c4063e24c 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. * @@ -159,7 +188,7 @@ declare namespace buffer { * Creates and initializes a Buffer instance of the specified length. * * @param { int } size - Size of the Buffer instance to create, in bytes. - * @param { string | Buffer | double | long } [fill] - Value to be filled in the buffer. The default value is 0. + * @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: int, fill?: string | Buffer | double | long, 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. @@ -407,8 +436,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(array: double[]): Buffer; @@ -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 { 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 from(arrayBuffer: ArrayBuffer, byteOffset?: int, length?: int): 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; @@ -566,21 +576,6 @@ declare namespace buffer { */ function from(object: Object, offsetOrEncoding: int | string, length: int): 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 from(input: Object, offsetOrEncoding: int | string, length: int): Buffer; - /** * Creates a new Buffer containing string. The encoding parameter identifies the character encoding * to be used when converting string into bytes. @@ -619,11 +614,89 @@ 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; + + /** + * @since 20 + * @arkts 1.2 + */ + export overload from { fromWithArray, fromWithArrayBufferByteOffsetLength, fromWithBuffer, + fromWithObjectTypedInputOffsetOrEncodingLength, fromWithStringTypedInputEncoding } + /** * Returns true if obj is a Buffer, false otherwise * @@ -975,7 +1048,7 @@ declare namespace buffer { /** * Fills this Buffer instance at the specified position. By default, data is filled cyclically. * - * @param { string | Buffer | Uint8Array | double | long } value - Value to fill. + * @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'. @@ -991,7 +1064,7 @@ declare namespace buffer { * @arkts 1.1&1.2 */ fill( - value: string | Buffer | Uint8Array | double | long, + value: string | Buffer | Uint8Array | int | double | long, offset?: int, end?: int, encoding?: BufferEncoding @@ -1219,7 +1292,7 @@ declare namespace buffer { /** * Checks whether this Buffer instance contains the specified value. * - * @param { string | double | long | Buffer | Uint8Array } value - Value to match. + * @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. @@ -1234,7 +1307,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - includes(value: string | double | long | Buffer | Uint8Array, byteOffset?: int, 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 @@ -1268,7 +1341,7 @@ declare namespace buffer { /** * Obtains the index of the first occurrence of the specified value in this Buffer instance. * - * @param { string | double | long | Buffer | Uint8Array } value - Value to match. + * @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'. @@ -1282,7 +1355,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - indexOf(value: string | double | long | Buffer | Uint8Array, byteOffset?: int, encoding?: BufferEncoding): int; + indexOf(value: string | int | double | long | Buffer | Uint8Array, byteOffset?: int, encoding?: BufferEncoding): int; /** * Creates and returns an iterator of buf keys (indices). @@ -1399,7 +1472,7 @@ declare namespace buffer { /** * Obtains the index of the last occurrence of the specified value in this Buffer instance. * - * @param { string | double | long | Buffer | Uint8Array } value - Value to match. + * @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. @@ -1414,7 +1487,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - lastIndexOf(value: string | double | long | Buffer | Uint8Array, byteOffset?: int, encoding?: BufferEncoding): int; + 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 @@ -3165,7 +3238,8 @@ declare namespace buffer { * Writes a big-endian signed value of the specified length to this Buffer instance at the specified offset. * * @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 } 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: @@ -3213,7 +3287,8 @@ declare namespace buffer { * Writes a little-endian signed value of the specified length to this Buffer instance at the specified offset. * * @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 } 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: @@ -3501,7 +3576,8 @@ declare namespace buffer { * Writes an unsigned big-endian value of the specified length to this Buffer instance at the specified offset. * * @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 } 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: @@ -3549,7 +3625,8 @@ declare namespace buffer { * Writes an unsigned little-endian value of the specified length to this Buffer instance at the specified offset. * * @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 } 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: @@ -3577,7 +3654,7 @@ declare namespace buffer { * @since 20 * @arkts 1.2 */ - [index: int]: Long; + [index: int]: long; } /** @@ -3687,21 +3764,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 @@ -3728,7 +3801,7 @@ declare namespace buffer { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - size: int; + get size(): int; /** * The content-type of the Blob @@ -3755,7 +3828,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. diff --git a/api/@ohos.bundle.bundleManager.d.ts b/api/@ohos.bundle.bundleManager.d.ts index f37ee52072b4c7ce1be256024d0f7b266cd1a9e4..2b929348edec133d01c14fed823ef6746c49b69a 100644 --- a/api/@ohos.bundle.bundleManager.d.ts +++ b/api/@ohos.bundle.bundleManager.d.ts @@ -972,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 * diff --git a/api/@ohos.curves.d.ts b/api/@ohos.curves.d.ts index 6e9f42033bd1b286e920b84aebe88c31541f769f..3c0b0007a82ea62ef7d470dd22b0135152518044 100644 --- a/api/@ohos.curves.d.ts +++ b/api/@ohos.curves.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2025 Huawei Device Co., Ltd. + * 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 @@ -42,17 +42,6 @@ * @atomicservice * @since 11 */ -/** - * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. - * - * @namespace curves - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ declare namespace curves { /** * enum Curve. @@ -78,18 +67,7 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * enum Curve. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - export enum Curve { + enum Curve { /** * Linear. Indicates that the animation has the same velocity from start to finish. * @@ -111,16 +89,6 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * Linear. Indicates that the animation has the same velocity from start to finish. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ Linear, /** * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, @@ -146,17 +114,6 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, - * CubicBezier(0.25, 0.1, 0.25, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ Ease, /** * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). @@ -179,16 +136,6 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ EaseIn, /** * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). @@ -211,16 +158,6 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ EaseOut, /** * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). @@ -243,16 +180,6 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ EaseInOut, /** * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). @@ -275,16 +202,6 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ FastOutSlowIn, /** * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). @@ -307,16 +224,6 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ LinearOutSlowIn, /** * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). @@ -339,16 +246,6 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ FastOutLinearIn, /** * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). @@ -371,16 +268,6 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ ExtremeDeceleration, /** * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). @@ -403,16 +290,6 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ Sharp, /** * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). @@ -435,16 +312,6 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ Rhythm, /** * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). @@ -467,16 +334,6 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ Smooth, /** * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). @@ -499,16 +356,6 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ Friction, } @@ -536,18 +383,7 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * Interface for curve object. - * - * @interface ICurve - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - export interface ICurve { + interface ICurve { /** * Get curve value by fraction. * @@ -580,19 +416,6 @@ declare namespace curves { * @atomicservice * @since 11 */ - /** - * Get curve value by fraction. - * - * @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1]. - * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ interpolate(fraction: number): number; } @@ -622,10 +445,9 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export function initCurve(curve?: Curve): ICurve; + function initCurve(curve?: Curve): ICurve; /** * Initializes the interpolator curve when called. @@ -672,10 +494,9 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export function stepsCurve(count: number, end: boolean): ICurve; + function stepsCurve(count: number, end: boolean): ICurve; /** * Constructs a custom curve when called. @@ -701,10 +522,9 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export function customCurve(interpolate: (fraction: number) => number): ICurve; + function customCurve(interpolate: (fraction: number) => number): ICurve; /** * Constructs a step curve when called. @@ -762,10 +582,9 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve; + function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve; /** * Creates a cubic Bezier curve. The curve value must range from 0 to 1. This API is deprecated since API version 9. @@ -838,10 +657,9 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve; + function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve; /** * Constructs a spring curve when called. @@ -920,10 +738,9 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; + function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; /** * Constructs a responsive spring motion when called. @@ -980,10 +797,9 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; + function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; /** * Constructs an interpolating spring curve when called, the animation duration can not be specified manually, @@ -1034,10 +850,9 @@ declare namespace curves { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export function interpolatingSpring(velocity: number, mass: number, stiffness: number, damping: number): ICurve; + function interpolatingSpring(velocity: number, mass: number, stiffness: number, damping: number): ICurve; } export default curves; diff --git a/api/@ohos.curves.static.d.ets b/api/@ohos.curves.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..7f4359f97e784d70f403c86c423168b711cc731b --- /dev/null +++ b/api/@ohos.curves.static.d.ets @@ -0,0 +1,360 @@ +'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 transition 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.data.UdmfComponents.d.ets b/api/@ohos.data.UdmfComponents.d.ets index e3a59e42b2e37fbc21a327c7ab031574004a25f6..8c0544060f35aa8fcb2aa32af1b2fb08796f7466 100644 --- a/api/@ohos.data.UdmfComponents.d.ets +++ b/api/@ohos.data.UdmfComponents.d.ets @@ -21,7 +21,7 @@ import uniformDataStruct from '@ohos.data.uniformDataStruct'; /** * Enumerates the form card types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 20 */ @@ -82,22 +82,22 @@ declare struct ContentFormCard { /** * Width of the form card. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 20 */ @Prop - formWidth?: number; + formWidth?: double; /** * Height of the form card. * - * @type { ?number } + * @type { ?double } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 20 */ @Prop - formHeight?: number; + formHeight?: double; /** * Callback to be invoked when the form card is tapped. diff --git a/api/@ohos.data.distributedKVStore.d.ts b/api/@ohos.data.distributedKVStore.d.ts index 7c1b0573d54e5a40ca32f32f942730febf7fafa6..49a44cf505a82634bde2362987295387b84eebc4 100644 --- a/api/@ohos.data.distributedKVStore.d.ts +++ b/api/@ohos.data.distributedKVStore.d.ts @@ -28,7 +28,8 @@ import BaseContext from './application/BaseContext'; * * @namespace distributedKVStore * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace distributedKVStore { /** @@ -37,7 +38,8 @@ declare namespace distributedKVStore { * * @interface KVManagerConfig * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface KVManagerConfig { /** @@ -45,7 +47,8 @@ declare namespace distributedKVStore { * * @type { string } * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ bundleName: string; @@ -54,7 +57,8 @@ declare namespace distributedKVStore { * * @syscap SystemCapability.DistributedDataManager.KVStore.Core * if swap the area, you should close all the KV store and use the new Context to create the KVManager - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Indicates the ability or hap context @@ -62,7 +66,8 @@ declare namespace distributedKVStore { * @type { BaseContext } * @syscap SystemCapability.DistributedDataManager.KVStore.Core * if swap the area, you should close all the KV store and use the new BaseContext to create the KVManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ context: BaseContext; } @@ -368,14 +373,16 @@ declare namespace distributedKVStore { * * @enum { number } * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ enum KVStoreType { /** * Device-collaboration database, as specified by {@code DeviceKVStore} * * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ DEVICE_COLLABORATION, @@ -383,7 +390,8 @@ declare namespace distributedKVStore { * Single-version database, as specified by {@code SingleKVStore} * * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ SINGLE_VERSION } @@ -393,7 +401,8 @@ declare namespace distributedKVStore { * * @enum { number } * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ enum SecurityLevel { /** @@ -401,7 +410,8 @@ declare namespace distributedKVStore { * There are some low impact when the data is leaked. * * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ S1, @@ -410,7 +420,8 @@ declare namespace distributedKVStore { * There are some major impact when the data is leaked. * * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ S2, @@ -419,7 +430,8 @@ declare namespace distributedKVStore { * There are some severity impact when the data is leaked. * * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ S3, @@ -428,7 +440,8 @@ declare namespace distributedKVStore { * There are some critical impact when the data is leaked. * * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ S4 } @@ -438,7 +451,8 @@ declare namespace distributedKVStore { * * @interface Options * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface Options { /** @@ -446,7 +460,8 @@ declare namespace distributedKVStore { * * @type { ?boolean } * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ createIfMissing?: boolean; @@ -455,7 +470,8 @@ declare namespace distributedKVStore { * * @type { ?boolean } * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ encrypt?: boolean; @@ -464,7 +480,8 @@ declare namespace distributedKVStore { * * @type { ?boolean } * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ backup?: boolean; @@ -474,7 +491,8 @@ declare namespace distributedKVStore { * @permission ohos.permission.DISTRIBUTED_DATASYNC * @type { ?boolean } * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ autoSync?: boolean; @@ -483,7 +501,8 @@ declare namespace distributedKVStore { * * @type { ?KVStoreType } * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ kvStoreType?: KVStoreType; @@ -492,7 +511,8 @@ declare namespace distributedKVStore { * * @type { SecurityLevel } * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ securityLevel: SecurityLevel; @@ -501,7 +521,8 @@ declare namespace distributedKVStore { * * @type { ?Schema } * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ schema?: Schema; } @@ -511,14 +532,16 @@ declare namespace distributedKVStore { * You can set the schema object in options when create or open the database. * * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ class Schema { /** * A constructor used to create a Schema instance. * * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ constructor(); @@ -597,7 +620,6 @@ declare namespace distributedKVStore { /** * Indicates the default value of field node. - * * @type { string } * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore * @since 9 @@ -1143,7 +1165,8 @@ declare namespace distributedKVStore { * * @interface SingleKVStore * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface SingleKVStore { /** @@ -1161,7 +1184,8 @@ declare namespace distributedKVStore { * @throws { BusinessError } 15100003 - Database corrupted. * @throws { BusinessError } 15100005 - Database or result set already closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Writes a key-value pair of the string type into the {@code SingleKVStore} database. @@ -1179,7 +1203,8 @@ declare namespace distributedKVStore { * @throws { BusinessError } 15100005 - Database or result set already closed. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ put(key: string, value: Uint8Array | string | number | boolean, callback: AsyncCallback): void; @@ -1198,7 +1223,8 @@ declare namespace distributedKVStore { * @throws { BusinessError } 15100003 - Database corrupted. * @throws { BusinessError } 15100005 - Database or result set already closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ /** * Writes a key-value pair of the string type into the {@code SingleKVStore} database. @@ -1216,7 +1242,8 @@ declare namespace distributedKVStore { * @throws { BusinessError } 15100005 - Database or result set already closed. * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ put(key: string, value: Uint8Array | string | number | boolean): Promise; @@ -1579,7 +1606,8 @@ declare namespace distributedKVStore { * @throws { BusinessError } 15100004 - Not found. * @throws { BusinessError } 15100005 - Database or result set already closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ get(key: string, callback: AsyncCallback): void; @@ -1596,7 +1624,8 @@ declare namespace distributedKVStore { * @throws { BusinessError } 15100004 - Not found. * @throws { BusinessError } 15100005 - Database or result set already closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ get(key: string): Promise; @@ -1934,7 +1963,8 @@ declare namespace distributedKVStore { *
2.Parameter verification failed. * @throws { BusinessError } 15100005 - Database or result set already closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ backup(file: string, callback: AsyncCallback): void; @@ -1948,7 +1978,8 @@ declare namespace distributedKVStore { *
2.Parameter verification failed. * @throws { BusinessError } 15100005 - Database or result set already closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ backup(file: string): Promise; @@ -2322,7 +2353,8 @@ declare namespace distributedKVStore { * @extends SingleKVStore * @typedef DeviceKVStore * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface DeviceKVStore extends SingleKVStore { /** @@ -2338,7 +2370,8 @@ declare namespace distributedKVStore { * @throws { BusinessError } 15100004 - Not found. * @throws { BusinessError } 15100005 - Database or result set already closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ get(key: string, callback: AsyncCallback): void; @@ -2355,7 +2388,8 @@ declare namespace distributedKVStore { * @throws { BusinessError } 15100004 - Not found. * @throws { BusinessError } 15100005 - Database or result set already closed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ get(key: string): Promise; @@ -2374,7 +2408,8 @@ declare namespace distributedKVStore { * @throws { BusinessError } 15100004 - Not found. * @throws { BusinessError } 15100005 - Database or result set already closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ get(deviceId: string, key: string, callback: AsyncCallback): void; @@ -2393,7 +2428,8 @@ declare namespace distributedKVStore { * @throws { BusinessError } 15100004 - Not found. * @throws { BusinessError } 15100005 - Database or result set already closed. * @syscap SystemCapability.DistributedDataManager.KVStore.DistributedKVStore - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ get(deviceId: string, key: string): Promise; @@ -3044,7 +3080,8 @@ declare namespace distributedKVStore { *
2.Incorrect parameters types; *
3.Parameter verification failed. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ function createKVManager(config: KVManagerConfig): KVManager; @@ -3054,7 +3091,8 @@ declare namespace distributedKVStore { * * @interface KVManager * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ interface KVManager { /** @@ -3072,7 +3110,8 @@ declare namespace distributedKVStore { * @throws { BusinessError } 15100002 - Open existed database with changed options. * @throws { BusinessError } 15100003 - Database corrupted. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ getKVStore(storeId: string, options: Options, callback: AsyncCallback): void; @@ -3091,7 +3130,8 @@ declare namespace distributedKVStore { * @throws { BusinessError } 15100002 - Open existed database with changed options. * @throws { BusinessError } 15100003 - Database corrupted. * @syscap SystemCapability.DistributedDataManager.KVStore.Core - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ getKVStore(storeId: string, options: Options): Promise; diff --git a/api/@ohos.data.relationalStore.d.ts b/api/@ohos.data.relationalStore.d.ts index 6a7921332cc62cff4fba68e5a4352b3864137f2f..95148671cc2a278702eadbe111e700dc0b7d4d81 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; } /** @@ -1230,17 +1239,19 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ interface ExceptionMessage { /** * 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 + * @arkts 1.1&1.2 */ - code: number; + code: int; /** * Error message. @@ -1249,6 +1260,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ message: string; @@ -1259,6 +1271,7 @@ declare namespace relationalStore { * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 + * @arkts 1.1&1.2 */ sql: string; } @@ -1296,7 +1309,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,16 +1364,18 @@ declare namespace relationalStore { /** * Indicates the database synchronization mode. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ enum SyncMode { /** * Indicates the data is pushed to remote device from local device. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ SYNC_MODE_PUSH = 0, @@ -1368,7 +1383,8 @@ declare namespace relationalStore { * Indicates the data is pulled from remote device to local device. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ SYNC_MODE_PULL = 1, @@ -1376,7 +1392,8 @@ declare namespace relationalStore { * Indicates the data is pulled from remote device to local device. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ SYNC_MODE_TIME_FIRST, @@ -1384,7 +1401,8 @@ declare namespace relationalStore { * Indicates force push the native data to the cloud. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ SYNC_MODE_NATIVE_FIRST, @@ -1392,7 +1410,8 @@ declare namespace relationalStore { * Indicates the data is pulled from cloud to local device. * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ SYNC_MODE_CLOUD_FIRST } @@ -1400,16 +1419,18 @@ declare namespace relationalStore { /** * Describes the subscription type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ enum SubscribeType { /** * Subscription to remote data changes * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ SUBSCRIBE_TYPE_REMOTE = 0, @@ -1424,7 +1445,8 @@ declare namespace relationalStore { * Subscription to cloud data changes * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SUBSCRIBE_TYPE_CLOUD, @@ -1439,7 +1461,8 @@ declare namespace relationalStore { * Subscription to cloud data changes details * * @syscap SystemCapability.DistributedDataManager.CloudSync.Client - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SUBSCRIBE_TYPE_CLOUD_DETAILS, @@ -1447,7 +1470,8 @@ declare namespace relationalStore { * Subscription to local data changes details * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ SUBSCRIBE_TYPE_LOCAL_DETAILS } @@ -1455,9 +1479,10 @@ declare namespace relationalStore { /** * Describes the change type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ enum ChangeType { /** @@ -1471,7 +1496,8 @@ declare namespace relationalStore { * Means the change type is data change. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ DATA_CHANGE, @@ -1486,7 +1512,8 @@ declare namespace relationalStore { * Means the change type is asset change. * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ ASSET_CHANGE } @@ -1496,7 +1523,8 @@ declare namespace relationalStore { * * @interface ChangeInfo * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ interface ChangeInfo { /** @@ -1504,7 +1532,8 @@ declare namespace relationalStore { * * @type { string } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ table: string; @@ -1513,7 +1542,8 @@ declare namespace relationalStore { * * @type { ChangeType } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 10 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ type: ChangeType; @@ -1521,31 +1551,34 @@ 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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 + * @since arkts {'1.1':'10', '1.2':'20'} + * @arkts 1.1&1.2 */ - deleted: Array | Array; + deleted: Array | Array; } /** @@ -1669,7 +1702,7 @@ declare namespace relationalStore { /** * Describes the conflict resolutions to insert data into the table. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since arkts {'1.1':'10', '1.2':'20'} @@ -1899,7 +1932,7 @@ declare namespace relationalStore { /** * Enumerates the type of rebuild. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -1943,7 +1976,7 @@ declare namespace relationalStore { /** * Enumerates the type of transaction. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @since 20 @@ -2038,10 +2071,11 @@ declare namespace relationalStore { /** * Enumerates the data types of a column. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ enum ColumnType { /** @@ -2049,7 +2083,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ NULL, @@ -2060,7 +2095,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ INTEGER, @@ -2069,7 +2105,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ REAL, @@ -2078,7 +2115,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ TEXT, @@ -2087,7 +2125,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ BLOB, @@ -2096,7 +2135,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ ASSET, @@ -2105,7 +2145,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ ASSETS, @@ -2114,7 +2155,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ FLOAT_VECTOR, @@ -2123,7 +2165,8 @@ declare namespace relationalStore { * * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ UNLIMITED_INT, } @@ -2773,7 +2816,7 @@ 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. @@ -2782,7 +2825,7 @@ declare namespace relationalStore { * @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. @@ -2800,7 +2843,7 @@ 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; @@ -2810,7 +2853,7 @@ declare namespace relationalStore { * @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. @@ -2885,11 +2928,26 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ 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. @@ -2913,11 +2971,26 @@ declare namespace relationalStore { *
2. Incorrect parameter types. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since arkts {'1.1':'10', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ 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. @@ -3042,13 +3115,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 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. @@ -3059,13 +3132,13 @@ declare namespace relationalStore { /** * Obtains the number of rows in the result set. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform * @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. @@ -3078,13 +3151,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 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. @@ -3198,7 +3271,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. @@ -3226,7 +3299,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. @@ -3257,7 +3330,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. @@ -3286,13 +3359,13 @@ declare namespace relationalStore { * @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; @@ -3320,14 +3393,15 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -3354,9 +3428,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800034 - SQLite: Library used incorrectly. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -3389,7 +3464,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; @@ -3419,7 +3494,7 @@ declare namespace relationalStore { * @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. @@ -3447,7 +3522,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. @@ -3476,7 +3551,7 @@ declare namespace relationalStore { * @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. @@ -3714,7 +3789,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. @@ -3743,7 +3818,7 @@ declare namespace relationalStore { * @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. @@ -3777,7 +3852,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. @@ -3806,7 +3881,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. @@ -3840,8 +3915,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. @@ -3869,7 +3944,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. @@ -3903,8 +3978,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. @@ -3932,7 +4007,7 @@ declare namespace relationalStore { * @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. @@ -3953,7 +4028,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. @@ -3982,7 +4057,7 @@ declare namespace relationalStore { * @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. @@ -4003,7 +4078,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. @@ -4032,7 +4107,7 @@ declare namespace relationalStore { * @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. @@ -4107,7 +4182,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. @@ -4136,7 +4211,7 @@ declare namespace relationalStore { * @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. @@ -4169,7 +4244,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. @@ -4197,7 +4272,7 @@ declare namespace relationalStore { * @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. @@ -4294,8 +4369,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; @@ -4319,9 +4394,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. @@ -4381,7 +4457,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; @@ -4411,7 +4487,7 @@ declare namespace relationalStore { * @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. @@ -4486,7 +4562,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. @@ -4508,7 +4584,7 @@ declare namespace relationalStore { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - version: number; + version: int; /** * Set whether the database is rebuilt. @@ -4661,7 +4737,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. @@ -4689,7 +4765,7 @@ declare namespace relationalStore { * @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. @@ -4712,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 { 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. @@ -4740,7 +4816,7 @@ declare namespace relationalStore { * @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. @@ -4748,7 +4824,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. @@ -4773,9 +4849,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. @@ -4914,7 +4991,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. @@ -4943,7 +5020,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. @@ -4951,7 +5028,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. @@ -4979,7 +5056,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. @@ -4988,7 +5065,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. @@ -5014,9 +5091,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -5024,7 +5102,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. @@ -5049,9 +5128,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -5215,7 +5295,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. @@ -5243,7 +5323,7 @@ declare namespace relationalStore { * @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. @@ -5270,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 { 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. @@ -5298,7 +5378,7 @@ declare namespace relationalStore { * @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. @@ -5308,7 +5388,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. @@ -5333,9 +5413,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. @@ -5468,7 +5549,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; @@ -5499,7 +5580,7 @@ declare namespace relationalStore { * @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. @@ -5592,7 +5673,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. @@ -5620,14 +5701,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. @@ -5655,7 +5736,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. * @@ -5770,7 +5851,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; @@ -5801,7 +5882,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. @@ -6265,7 +6346,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; @@ -6452,7 +6534,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. @@ -6478,9 +6560,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. @@ -6885,8 +6968,7 @@ 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 arkts {'1.1':'12', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ execute(sql: string, txId: number, args?: Array): Promise; @@ -7709,17 +7791,18 @@ declare namespace relationalStore { * @param { SyncMode } mode - Indicates the database synchronization mode. * @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. + * @returns { Promise> } + * {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. * @throws { BusinessError } 14800000 - Inner error. * @throws { BusinessError } 14800014 - The RdbStore or ResultSet is already closed. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core - * @since 12 + * @since arkts {'1.1':'12', '1.2':'20'} + * @arkts 1.1&1.2 */ - sync(mode: SyncMode, predicates: RdbPredicates): Promise>; + sync(mode: SyncMode, predicates: RdbPredicates): Promise>; /** * Sync data to cloud. @@ -8448,8 +8531,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. @@ -8475,9 +8558,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. @@ -8486,8 +8570,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. @@ -8515,16 +8599,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. @@ -8547,9 +8632,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. @@ -8656,14 +8742,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. @@ -8783,7 +8870,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. @@ -8806,7 +8893,7 @@ declare namespace relationalStore { * @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. @@ -8838,13 +8925,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. @@ -8868,7 +8986,7 @@ declare namespace relationalStore { * @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. @@ -8876,7 +8994,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. @@ -8896,9 +9014,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. @@ -8907,7 +9026,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. @@ -8931,9 +9050,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -8942,7 +9062,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. @@ -8965,9 +9085,10 @@ declare namespace relationalStore { * @throws { BusinessError } 14800047 - The WAL file size exceeds the default limit. * @syscap SystemCapability.DistributedDataManager.RelationalStore.Core * @crossplatform - * @since 18 + * @since arkts {'1.1':'18', '1.2':'20'} + * @arkts 1.1&1.2 */ - 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. @@ -8977,7 +9098,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. @@ -9000,7 +9121,7 @@ declare namespace relationalStore { * @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. @@ -9010,7 +9131,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. @@ -9030,16 +9151,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. @@ -9062,14 +9184,14 @@ declare namespace relationalStore { * @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. @@ -9089,9 +9211,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. diff --git a/api/@ohos.data.unifiedDataChannel.d.ts b/api/@ohos.data.unifiedDataChannel.d.ts index 32c500d1658562c4320edfad0ca38232f43cdb6e..581745b9a2609d3c73d9da2ace59b9ddb81d1da2 100644 --- a/api/@ohos.data.unifiedDataChannel.d.ts +++ b/api/@ohos.data.unifiedDataChannel.d.ts @@ -62,7 +62,7 @@ import Want from "./@ohos.app.ability.Want"; declare namespace unifiedDataChannel { /** * Types of scope that UnifiedData can be used. - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 12 @@ -84,6 +84,16 @@ declare namespace unifiedDataChannel { CROSS_APP } + /** + * RrcordData is used for input parameter obj of the equal function + * @typedef { undefined | null | Object | Record | Array } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 + */ + type RecordData = undefined | null | Object | Record | Array; + /** * Indicated delay get UnifiedData * @@ -98,21 +108,30 @@ declare namespace unifiedDataChannel { /** * Indicates type of value. - * @typedef {number | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined} + * @typedef {int | long | double | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined} * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 12 */ /** * Indicates type of value. - * @typedef {number | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined} + * @typedef {int | long | double | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined} * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'14', '1.2':'20'} - * @arkts 1.1&1.2 + * @since 14 + */ + type ValueType = int | long | double | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined; + + /** + * Indicates type of value. + * @typedef {int | long | double | string | boolean | image.PixelMap | Want | ArrayBuffer | RecordData | null | undefined} + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @crossplatform + * @since 20 + * @arkts 1.2 */ - type ValueType = number | string | boolean | image.PixelMap | Want | ArrayBuffer | object | null | undefined; + type ValueType = int | long | double | string | boolean | image.PixelMap | Want | ArrayBuffer | RecordData | null | undefined; /** * Describe the unified data properties. @@ -131,6 +150,15 @@ declare namespace unifiedDataChannel { */ extras?: Record; + /** + * extra property data. key-value pairs. + * @type { ?Record } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + extras?: Record; + /** * the user-defined tag of a UnifiedData object. * @type { ?string } @@ -381,13 +409,13 @@ declare namespace unifiedDataChannel { /** * A map for each type and data size, key is data type, value is the corresponding data size * - * @type { Record } + * @type { Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - summary: Record; + summary: Record; /** * Total data size of data in Bytes * @@ -397,13 +425,13 @@ declare namespace unifiedDataChannel { /** * Total data size of data in Bytes * - * @type { number } + * @type { long } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - totalSize: number; + totalSize: long; } /** @@ -854,13 +882,13 @@ declare namespace unifiedDataChannel { /** * Indicates the abstract of text * - * @param { string } the abstract of text + * @param { string | undefined } the abstract of text * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @crossplatform * @since 20 * @arkts 1.2 */ - set textAbstract(value: string); + set textAbstract(value: string | undefined); } /** @@ -2010,12 +2038,12 @@ declare namespace unifiedDataChannel { /** * Indicates the details of system defined data * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - details?: Record; + details?: Record; /** * Indicates the details of system defined data @@ -2026,7 +2054,7 @@ declare namespace unifiedDataChannel { /** * Indicates the details of system defined data * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 @@ -2034,12 +2062,12 @@ declare namespace unifiedDataChannel { /** * Indicates the details of system defined data * - * @returns { Record | undefined } 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; + get details(): Record | undefined; /** * Indicates the details of system defined data @@ -2050,7 +2078,7 @@ declare namespace unifiedDataChannel { /** * Indicates the details of system defined data * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 @@ -2058,12 +2086,12 @@ declare namespace unifiedDataChannel { /** * Indicates the details of system defined data * - * @param { Record } the details of system defined data + * @param { Record | undefined } the details of system defined data * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 20 * @arkts 1.2 */ - set details(value: Record); + set details(value: Record | undefined); } /** @@ -2094,12 +2122,12 @@ declare namespace unifiedDataChannel { /** * Indicates the id of form * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 */ - formId: number; + formId: int; /** * Indicates the id of form @@ -2110,7 +2138,7 @@ declare namespace unifiedDataChannel { /** * Indicates the id of form * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 @@ -2118,12 +2146,12 @@ declare namespace unifiedDataChannel { /** * Indicates the id of form * - * @returns { number } the id of form + * @returns { int } the id of form * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 20 * @arkts 1.2 */ - get formId(): number; + get formId(): int; /** * Indicates the id of form @@ -2134,7 +2162,7 @@ declare namespace unifiedDataChannel { /** * Indicates the id of form * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 11 @@ -2142,12 +2170,12 @@ declare namespace unifiedDataChannel { /** * Indicates the id of form * - * @param { number } the id of form + * @param { int } the id of form * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 20 * @arkts 1.2 */ - set formId(value: number); + set formId(value: int); /** * Indicates the name of form @@ -2909,7 +2937,8 @@ declare namespace unifiedDataChannel { * @extends UnifiedRecord * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ class ApplicationDefinedRecord extends UnifiedRecord { /** @@ -2929,6 +2958,61 @@ declare namespace unifiedDataChannel { * @since 11 */ applicationDefinedType: string; + + /** + * Indicates the type of data, should always be started with 'ApplicationDefined.', will + * return error otherwise + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the type of data, should always be started with 'ApplicationDefined.', will + * return error otherwise + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the type of data, should always be started with 'ApplicationDefined.', will + * return error otherwise + * + * @returns { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get applicationDefinedType(): string; + + /** + * Indicates the type of data, should always be started with 'ApplicationDefined.', will + * return error otherwise + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the type of data, should always be started with 'ApplicationDefined.', will + * return error otherwise + * + * @type { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the type of data, should always be started with 'ApplicationDefined.', will + * return error otherwise + * + * @oaram { string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set applicationDefinedType(value: string); + /** * Indicates the raw data of application defined data * @@ -2944,6 +3028,54 @@ declare namespace unifiedDataChannel { * @since 11 */ rawData: Uint8Array; + + /** + * Indicates the raw data of application defined data + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the raw data of application defined data + * + * @type { Uint8Array } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the raw data of application defined data + * + * @returns { Uint8Array } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + get rawData(): Uint8Array; + + /** + * Indicates the raw data of application defined data + * + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 10 + */ + /** + * Indicates the raw data of application defined data + * + * @type { Uint8Array } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @atomicservice + * @since 11 + */ + /** + * Indicates the raw data of application defined data + * + * @param { Uint8Array } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + set rawData(value: Uint8Array); } /** @@ -3027,7 +3159,7 @@ declare namespace unifiedDataChannel { /** * Describe the visibility range of data * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 20 @@ -3139,7 +3271,7 @@ declare namespace unifiedDataChannel { /** * Defines the types of file conflict options when getting data from the UDMF. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since arkts {'1.1':'15', '1.2':'20'} @@ -3170,7 +3302,7 @@ declare namespace unifiedDataChannel { /** * Defines the types of progress indicator when getting data from the UDMF. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since arkts {'1.1':'15', '1.2':'20'} @@ -3201,7 +3333,7 @@ declare namespace unifiedDataChannel { /** * Defines the listener status of obtaining progress and data. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since arkts {'1.1':'15', '1.2':'20'} @@ -3302,13 +3434,13 @@ declare namespace unifiedDataChannel { /** * Indicates the UDMF processing progress. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since arkts {'1.1':'15', '1.2':'20'} * @arkts 1.1&1.2 */ - progress: number; + progress: int; /** * Indicates the status of obtaining progress and data. @@ -3423,12 +3555,12 @@ declare namespace unifiedDataChannel { /** * Indicates the maximum number of data records to be loaded. * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @atomicservice * @since 20 */ - recordCount?: number; + recordCount?: long; } /** diff --git a/api/@ohos.data.uniformDataStruct.d.ts b/api/@ohos.data.uniformDataStruct.d.ts index 4f811c4ed20686cd02cc92b179db4dfc3b651ce7..a2b21ac71d95a309f25b315fd480f5088fd7abed 100644 --- a/api/@ohos.data.uniformDataStruct.d.ts +++ b/api/@ohos.data.uniformDataStruct.d.ts @@ -61,6 +61,15 @@ declare namespace uniformDataStruct { * @since 12 */ abstract?: string; + + /** + * Indicates the abstract of the PlainText. + * @type { ?string } + * @syscap SystemCapability.DistributedDataManager.UDMF.Core + * @since 20 + * @arkts 1.2 + */ + textAbstract?: string; /** * Object of the dictionary type used to describe the attributes of the text content. Both the key and value of the * object are of the string type. For example, the following is a details object used to describe the properties of @@ -247,11 +256,11 @@ declare namespace uniformDataStruct { * Object of the dictionary type used to describe the icon. The key is of the string type, and the value can be a * number, a string, or a Uint8Array. By default, it is an empty dictionary object. * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 12 */ - details?: Record; + details?: Record; } /** @@ -348,11 +357,11 @@ declare namespace uniformDataStruct { /** * Indicates the form id of form. * - * @type { number } + * @type { int } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 15 */ - formId: number; + formId: int; /** * Indicates the form name of form. @@ -393,11 +402,11 @@ declare namespace uniformDataStruct { /** * Indicates the details of form. * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 15 */ - details?: Record; + details?: Record; } /** @@ -439,11 +448,11 @@ declare namespace uniformDataStruct { /** * Indicates the details of fileUri. * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 15 */ - details?: Record; + details?: Record; } /** @@ -476,11 +485,11 @@ declare namespace uniformDataStruct { /** * Indicates the details of pixelMap. * - * @type { ?Record } + * @type { ?Record } * @syscap SystemCapability.DistributedDataManager.UDMF.Core * @since 15 */ - details?: Record; + details?: Record; } } diff --git a/api/@ohos.display.d.ts b/api/@ohos.display.d.ts index d4f7b43605de8bdf4c0da0a61c0bc43b598ffc6b..660cf9fdfc16947edf00fb690bba6944902015a8 100644 --- a/api/@ohos.display.d.ts +++ b/api/@ohos.display.d.ts @@ -98,7 +98,7 @@ declare namespace display { * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - export function getDefaultDisplaySync(): Display; + function getDefaultDisplaySync(): Display; /** * Obtain the primary display. For devices other than 2in1 devices, the Display object obtained is the built-in screen. @@ -116,7 +116,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 +127,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export function getDisplayByIdSync(displayId: number): Display; + function getDisplayByIdSync(displayId: long): Display; /** * Obtain all displays. @@ -138,7 +138,7 @@ declare namespace display { * @deprecated since 9 * @useinstead ohos.display#getAllDisplays */ - export function getAllDisplay(callback: AsyncCallback>): void; + function getAllDisplay(callback: AsyncCallback>): void; /** * Obtain all displays. @@ -169,7 +169,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export function getAllDisplays(callback: AsyncCallback>): void; + function getAllDisplays(callback: AsyncCallback>): void; /** * Obtain all displays. @@ -201,12 +201,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. @@ -217,13 +217,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 @@ -233,7 +233,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 @@ -244,22 +244,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 @@ -269,7 +269,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 @@ -280,16 +280,16 @@ declare namespace display { * Unregister the callback for display changes. * * @param { 'add' | 'remove' | 'change' } type the event of display change event - * @param { Callback } callback the display id of changed + * @param { Callback } callback the display id of changed * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. *
2. Incorrect parameter types. * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - export function off(type: 'add' | 'remove' | 'change', callback?: Callback): void; + function off(type: 'add' | 'remove' | 'change', callback?: Callback): void; /** * Register the callback for private mode changes. @@ -304,7 +304,7 @@ declare namespace display { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - export function on(type: 'privateModeChange', callback: Callback): void; + function on(type: 'privateModeChange', callback: Callback): void; /** * Unregister the callback for private mode changes. @@ -319,7 +319,7 @@ declare namespace display { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - export function off(type: 'privateModeChange', callback?: Callback): void; + function off(type: 'privateModeChange', callback?: Callback): void; /** * Check whether the device is foldable. @@ -346,10 +346,10 @@ declare namespace display { * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - export function isFoldable(): boolean; + function isFoldable(): boolean; /** * Get the current fold status of the foldable device. @@ -376,10 +376,10 @@ declare namespace display { * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - export function getFoldStatus(): FoldStatus; + function getFoldStatus(): FoldStatus; /** * Register the callback for fold status changes. @@ -415,10 +415,10 @@ declare namespace display { * @syscap SystemCapability.Window.SessionManager * @crossplatform * @atomicservice - * @since arkts {'1.1':'20', '1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - export function on(type: 'foldStatusChange', callback: Callback): void; + function on(type: 'foldStatusChange', callback: Callback): void; /** * Unregister the callback for fold status changes. @@ -454,40 +454,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. @@ -502,7 +528,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export function on(type: 'captureStatusChange', callback: Callback): void; + function on(type: 'captureStatusChange', callback: Callback): void; /** * Unregister the callback for device capture, casting, or recording status changes. @@ -517,7 +543,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export function off(type: 'captureStatusChange', callback?: Callback): void; + function off(type: 'captureStatusChange', callback?: Callback): void; /** @@ -530,7 +556,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export function isCaptured(): boolean; + function isCaptured(): boolean; /** * Get the display mode of the foldable device. @@ -547,10 +573,20 @@ declare namespace display { * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * Get the display mode of the foldable device. + * + * @returns { FoldDisplayMode } display mode of the foldable device. + * @throws { BusinessError } 1400003 - This display manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ - export function getFoldDisplayMode(): FoldDisplayMode; + function getFoldDisplayMode(): FoldDisplayMode; /** * Change the display mode of the foldable device. @@ -565,7 +601,7 @@ declare namespace display { * @since arkts {'1.1':'10', '1.2':'20'} * @arkts 1.1&1.2 */ - export function setFoldDisplayMode(mode: FoldDisplayMode): void; + function setFoldDisplayMode(mode: FoldDisplayMode): void; /** * Change the display mode of the foldable device. @@ -579,7 +615,7 @@ declare namespace display { * @since arkts {'1.1':'19', '1.2':'20'} * @arkts 1.1&1.2 */ - export function setFoldDisplayMode(mode: FoldDisplayMode, reason: string): void; + function setFoldDisplayMode(mode: FoldDisplayMode, reason: string): void; /** * Register the callback for fold display mode changes. @@ -587,7 +623,7 @@ declare namespace display { * @param { 'foldDisplayModeChange' } type the event of fold display mode changes * @param { Callback } callback Callback used to return the current fold display mode * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2. Incorrect parameter types. + * 2. Incorrect parameter types. * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @since 10 @@ -598,14 +634,27 @@ declare namespace display { * @param { 'foldDisplayModeChange' } type the event of fold display mode changes * @param { Callback } callback Callback used to return the current fold display mode * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2. Incorrect parameter types. + * 2. Incorrect parameter types. * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * Register the callback for fold display mode changes. + * + * @param { 'foldDisplayModeChange' } type the event of fold display mode changes + * @param { Callback } callback Callback used to return the current fold display mode + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * 2. Incorrect parameter types. + * @throws { BusinessError } 1400003 - This display manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ - export function on(type: 'foldDisplayModeChange', callback: Callback): void; + function on(type: 'foldDisplayModeChange', callback: Callback): void; /** * Unregister the callback for fold display mode changes. @@ -613,7 +662,7 @@ declare namespace display { * @param { 'foldDisplayModeChange' } type the event of fold display mode changes * @param { Callback } callback Callback used to return the current fold display mode * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2. Incorrect parameter types. + * 2. Incorrect parameter types. * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @since 10 @@ -624,14 +673,27 @@ declare namespace display { * @param { 'foldDisplayModeChange' } type the event of fold display mode changes * @param { Callback } callback Callback used to return the current fold display mode * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. - *
2. Incorrect parameter types. + * 2. Incorrect parameter types. * @throws { BusinessError } 1400003 - This display manager service works abnormally. * @syscap SystemCapability.Window.SessionManager * @atomicservice - * @since arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * Unregister the callback for fold display mode changes. + * + * @param { 'foldDisplayModeChange' } type the event of fold display mode changes + * @param { Callback } callback Callback used to return the current fold display mode + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified. + * 2. Incorrect parameter types. + * @throws { BusinessError } 1400003 - This display manager service works abnormally. + * @syscap SystemCapability.Window.SessionManager + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ - export function off(type: 'foldDisplayModeChange', callback?: Callback): void; + function off(type: 'foldDisplayModeChange', callback?: Callback): void; /** * Get the fold crease region in the current display mode. @@ -651,7 +713,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export function getCurrentFoldCreaseRegion(): FoldCreaseRegion; + function getCurrentFoldCreaseRegion(): FoldCreaseRegion; /** * set fold status locked or not. @@ -666,14 +728,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. @@ -682,13 +744,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. @@ -699,13 +761,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. @@ -717,13 +779,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. @@ -734,12 +796,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. @@ -749,12 +812,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. @@ -764,13 +828,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. @@ -780,7 +844,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. @@ -816,31 +880,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. @@ -874,10 +938,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. * @@ -897,7 +961,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, @@ -920,7 +984,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, @@ -958,7 +1022,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, @@ -1040,10 +1104,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. * @@ -1137,7 +1201,7 @@ declare namespace display { * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 */ - export enum DisplayState { + enum DisplayState { /** * Unknown. * @@ -1435,11 +1499,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 @@ -1447,14 +1511,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. @@ -1497,74 +1561,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; } /** @@ -1583,7 +1647,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. * @@ -1681,7 +1745,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. * @@ -1733,7 +1797,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. * @@ -1748,26 +1812,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; } /** @@ -1795,18 +1859,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 @@ -1814,14 +1878,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. @@ -1880,25 +1944,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 */ @@ -1909,25 +1973,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 @@ -1935,26 +1999,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 @@ -1962,50 +2026,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 @@ -2013,14 +2077,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. @@ -2045,33 +2109,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 @@ -2079,26 +2143,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 @@ -2106,26 +2170,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 @@ -2133,13 +2197,13 @@ declare namespace display { /** * DPI on the y-axis. * - * @type { number } + * @type { double } * @syscap SystemCapability.WindowManager.WindowManager.Core * @crossplatform * @atomicservice * @since 20 */ - yDPI: number; + yDPI: double; /** * The shape of screen @@ -2198,32 +2262,32 @@ declare namespace display { /** * 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 */ - 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 */ - y?: number; + y?: long; /** * All supported refresh rates. * - * @type { ?Array } + * @type { ?Array } * @syscap SystemCapability.Window.SessionManager * @atomicservice * @since 20 */ - supportedRefreshRates?: Array; + supportedRefreshRates?: Array; /** * Obtain the cutout info of the display. @@ -2366,20 +2430,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; } /** @@ -2393,11 +2457,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.distributedDeviceManager.d.ts b/api/@ohos.distributedDeviceManager.d.ts index 31588f25ed45f2f2c0d5a5eebc92df4ae519aa39..a9b7ef6792142a3de9956249a9ae8adf3ea78972 100644 --- a/api/@ohos.distributedDeviceManager.d.ts +++ b/api/@ohos.distributedDeviceManager.d.ts @@ -25,7 +25,8 @@ import type { AsyncCallback, Callback } from './@ohos.base'; * * @namespace distributedDeviceManager * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace distributedDeviceManager { @@ -34,7 +35,8 @@ declare namespace distributedDeviceManager { * Basic description information of a distributed device. * @interface DeviceBasicInfo * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface DeviceBasicInfo { /** @@ -43,7 +45,8 @@ declare namespace distributedDeviceManager { * the obtained ID will change. * @type { string } * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; @@ -51,7 +54,8 @@ declare namespace distributedDeviceManager { * Device name. * @type { string } * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ deviceName: string; @@ -60,7 +64,8 @@ declare namespace distributedDeviceManager { * which can be {@code phone}, {@code tablet}, {@code tv}, {@code smartVision}, {@code car}. * @type { string } * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ deviceType: string; @@ -68,41 +73,155 @@ declare namespace distributedDeviceManager { * Device network id. * @type { ?string } * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ networkId?: string; } /** * The state of the nearby devices. - * @enum { number } + * @enum { int } * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ enum DeviceStateChange { /** * This state indicates the device is online but the state is unknown,The distributed function cannot used until * state changes to AVAILABLE. * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ UNKNOWN = 0, /** * This state indicates the device has been synchronized to the database, Now the distributed function can be used. * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ AVAILABLE = 1, /** * This state indicates the device is offline. * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ UNAVAILABLE = 2, } + /** + * Device status change result. + * @interface DeviceStateChangeResult + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + interface DeviceStateChangeResult { + /** + * The state of the nearby devices. + * @type { DeviceStateChange } + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + action: DeviceStateChange; + /** + * Basic description information of a distributed device. + * @type { DeviceBasicInfo } + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + device: DeviceBasicInfo; + } + + /** + * Device name change result. + * @interface DeviceNameChangeResult + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + interface DeviceNameChangeResult { + /** + * Device name. + * @type { string } + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + deviceName: string; + } + + /** + * Discovery failure result. + * @interface DiscoveryFailureResult + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + interface DiscoveryFailureResult { + /** + * Discovery failure cause code. + * @type { int } + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + reason: int; + } + + /** + * Discovery successful result. + * @interface DiscoverySuccessResult + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + interface DiscoverySuccessResult { + /** + * Basic description information of a distributed device. + * @type { DeviceBasicInfo } + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + device: DeviceBasicInfo; + } + + /** + * Reply result. + * @interface ReplyResult + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @systemapi + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + interface ReplyResult { + /** + * Param of ui state changes. + * @type { string } + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @systemapi + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + param: string; + } + + /** + * ServiceDie data. + * @interface ServiceDieData + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + interface ServiceDieData {} + /** * Device profile information filter options. * @interface DeviceProfileInfoFilterOptions @@ -134,7 +253,8 @@ declare namespace distributedDeviceManager { * @interface ServiceProfileInfo * @syscap SystemCapability.DistributedHardware.DeviceManager * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface ServiceProfileInfo { /** @@ -142,7 +262,8 @@ declare namespace distributedDeviceManager { * @type { string } * @syscap SystemCapability.DistributedHardware.DeviceManager * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; @@ -179,7 +300,8 @@ declare namespace distributedDeviceManager { * @interface DeviceProfileInfo * @syscap SystemCapability.DistributedHardware.DeviceManager * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ interface DeviceProfileInfo { /** @@ -187,7 +309,8 @@ declare namespace distributedDeviceManager { * @type { string } * @syscap SystemCapability.DistributedHardware.DeviceManager * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ deviceId: string; @@ -223,7 +346,8 @@ declare namespace distributedDeviceManager { * @type { string } * @syscap SystemCapability.DistributedHardware.DeviceManager * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ deviceType: string; @@ -241,7 +365,8 @@ declare namespace distributedDeviceManager { * @type { string } * @syscap SystemCapability.DistributedHardware.DeviceManager * @systemapi - * @since 15 + * @since arkts {'1.1':'15','1.2':'20'} + * @arkts 1.1&1.2 */ deviceName: string; @@ -616,7 +741,8 @@ declare namespace distributedDeviceManager { * 2. Incorrect parameter type; * 3. Parameter verification failed. * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ function createDeviceManager(bundleName: string): DeviceManager; @@ -639,7 +765,8 @@ declare namespace distributedDeviceManager { * * @interface DeviceManager * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ interface DeviceManager { @@ -688,7 +815,8 @@ declare namespace distributedDeviceManager { * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. * @throws { BusinessError } 11600101 - Failed to execute the function. * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getLocalDeviceNetworkId(): string; @@ -726,7 +854,8 @@ declare namespace distributedDeviceManager { * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. * @throws { BusinessError } 11600101 - Failed to execute the function. * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getLocalDeviceId(): string; @@ -744,7 +873,8 @@ declare namespace distributedDeviceManager { * 4. The size of specified networkId is greater than 255. * @throws { BusinessError } 11600101 - Failed to execute the function. * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ getDeviceName(networkId: string): string; @@ -753,7 +883,7 @@ declare namespace distributedDeviceManager { * * @permission ohos.permission.DISTRIBUTED_DATASYNC * @param { string } networkId - Device network id. - * @returns { number } - Returns device type. + * @returns { int } - Returns device type. * @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; @@ -762,9 +892,10 @@ declare namespace distributedDeviceManager { * 4. The size of specified networkId is greater than 255. * @throws { BusinessError } 11600101 - Failed to execute the function. * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ - getDeviceType(networkId: string): number; + getDeviceType(networkId: string): int; /** * Start to discover nearby devices. @@ -849,7 +980,8 @@ declare namespace distributedDeviceManager { * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. * @throws { BusinessError } 11600101 - Failed to execute the function. * @syscap SystemCapability.DistributedHardware.DeviceManager - * @since 10 + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 */ unbindTarget(deviceId: string): void; @@ -889,7 +1021,26 @@ declare namespace distributedDeviceManager { * @syscap SystemCapability.DistributedHardware.DeviceManager * @since 10 */ - on(type: 'deviceStateChange', callback: Callback<{ action: DeviceStateChange; device: DeviceBasicInfo; }>): void; + /** + * Register a device state callback so that the application can be notified upon device state changes based on + * the application bundle name. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'deviceStateChange' } type - Device state change. + * @param { Callback } callback + * Indicates the device state callback to register. + * @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 type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + on(type: 'deviceStateChange', callback: Callback): void; /** * UnRegister device state callback based on the application bundle name. @@ -907,7 +1058,25 @@ declare namespace distributedDeviceManager { * @syscap SystemCapability.DistributedHardware.DeviceManager * @since 10 */ - off(type: 'deviceStateChange', callback?: Callback<{ action: DeviceStateChange; device: DeviceBasicInfo; }>): void; + /** + * UnRegister device state callback based on the application bundle name. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'deviceStateChange' } type - Device state change. + * @param { Callback } [callback] + * Indicates the device state callback to unregister. + * @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 type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'deviceStateChange', callback?: Callback): void; /** * Register a device discovery result callback so that the application can be notified when discovery success. @@ -924,7 +1093,24 @@ declare namespace distributedDeviceManager { * @syscap SystemCapability.DistributedHardware.DeviceManager * @since 10 */ - on(type: 'discoverSuccess', callback: Callback<{ device: DeviceBasicInfo; }>): void; + /** + * Register a device discovery result callback so that the application can be notified when discovery success. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'discoverSuccess' } type - Successfully discovered device. + * @param { Callback } callback - Indicates the device discovery callback to register. + * @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 type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + on(type: 'discoverSuccess', callback: Callback): void; /** * UnRegister the device discovery result callback. @@ -941,7 +1127,24 @@ declare namespace distributedDeviceManager { * @syscap SystemCapability.DistributedHardware.DeviceManager * @since 10 */ - off(type: 'discoverSuccess', callback?: Callback<{ device: DeviceBasicInfo; }>): void; + /** + * UnRegister the device discovery result callback. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'discoverSuccess' } type - Successfully discovered device. + * @param { Callback } [callback] - Indicates the device discovery callback to unregister. + * @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 type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'discoverSuccess', callback?: Callback): void; /** * Register a device name change callback so that the application can be notified when discovery success. @@ -958,7 +1161,24 @@ declare namespace distributedDeviceManager { * @syscap SystemCapability.DistributedHardware.DeviceManager * @since 10 */ - on(type: 'deviceNameChange', callback: Callback<{ deviceName: string; }>): void; + /** + * Register a device name change callback so that the application can be notified when discovery success. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'deviceNameChange' } type - Changed device name. + * @param { Callback } callback - Indicates the device name change callback to register. + * @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 type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + on(type: 'deviceNameChange', callback: Callback): void; /** * UnRegister the device name change result callback. @@ -975,7 +1195,24 @@ declare namespace distributedDeviceManager { * @syscap SystemCapability.DistributedHardware.DeviceManager * @since 10 */ - off(type: 'deviceNameChange', callback?: Callback<{ deviceName: string; }>): void; + /** + * UnRegister the device name change result callback. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'deviceNameChange' } type - Changed device name. + * @param { Callback } [callback] - Indicates the device name change callback to unregister. + * @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 type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'deviceNameChange', callback?: Callback): void; /** * Register a device discovery result callback so that the application can be notified when discover failed. @@ -993,7 +1230,25 @@ declare namespace distributedDeviceManager { * @syscap SystemCapability.DistributedHardware.DeviceManager * @since 10 */ - on(type: 'discoverFailure', callback: Callback<{ reason: number; }>): void; + /** + * Register a device discovery result callback so that the application can be notified when discover failed. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'discoverFailure' } type - Discovery Device Failure. + * @param { Callback } callback + * Indicates the device found result callback to register. + * @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 type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + on(type: 'discoverFailure', callback: Callback): void; /** * UnRegister the device discovery result callback. @@ -1011,7 +1266,25 @@ declare namespace distributedDeviceManager { * @syscap SystemCapability.DistributedHardware.DeviceManager * @since 10 */ - off(type: 'discoverFailure', callback?: Callback<{ reason: number; }>): void; + /** + * UnRegister the device discovery result callback. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'discoverFailure' } type - Discovery Device Failure. + * @param { Callback } [callback] + * Indicates the device found result callback to unregister. + * @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 type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'discoverFailure', callback?: Callback): void; /** * Register a serviceError callback so that the application can be notified when devicemanager service died @@ -1028,7 +1301,24 @@ declare namespace distributedDeviceManager { * @syscap SystemCapability.DistributedHardware.DeviceManager * @since 10 */ - on(type: 'serviceDie', callback?: Callback<{}>): void; + /** + * Register a serviceError callback so that the application can be notified when devicemanager service died + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'serviceDie' } type - Service death. + * @param { Callback } [callback] - Indicates the service error callback to register. + * @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 type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + on(type: 'serviceDie', callback?: Callback): void; /** * UnRegister the service error callback. @@ -1045,7 +1335,24 @@ declare namespace distributedDeviceManager { * @syscap SystemCapability.DistributedHardware.DeviceManager * @since 10 */ - off(type: 'serviceDie', callback?: Callback<{}>): void; + /** + * UnRegister the service error callback. + * + * @permission ohos.permission.DISTRIBUTED_DATASYNC + * @param { 'serviceDie' } type - Service death. + * @param { Callback } [callback] - Indicates the service error callback to unregister. + * @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 type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'serviceDie', callback?: Callback): void; /** * Register a callback from deviceManager service so that the devicemanager ui can be notified when uiStateChanges. @@ -1058,12 +1365,32 @@ declare namespace distributedDeviceManager { * 2. Incorrect parameter type; * 3. Parameter verification failed; * 4. The size of specified type is greater than 255. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.DistributedHardware.DeviceManager * @systemapi this method can be used only by system applications. * @since 10 */ - on(type: 'replyResult', callback: Callback<{ param: string; }>): void; + /** + * Register a callback from deviceManager service so that the devicemanager ui can be notified when uiStateChanges. + * + * @permission ohos.permission.ACCESS_SERVICE_DM + * @param { 'replyResult' } type - Ui reply result to register. + * @param { Callback } callback - Indicates the devicemanager ui state to register. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @throws { BusinessError } 201 - Permission verification failed. + * The application does not have the permission required to call the API. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @systemapi this method can be used only by system applications. + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + on(type: 'replyResult', callback: Callback): void; /** * Unregister uiStateChange, this interface can only be used by devicemanager ui. @@ -1076,12 +1403,32 @@ declare namespace distributedDeviceManager { * 2. Incorrect parameter type; * 3. Parameter verification failed; * 4. The size of specified type is greater than 255. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.DistributedHardware.DeviceManager * @systemapi this method can be used only by system applications. * @since 10 */ - off(type: 'replyResult', callback?: Callback<{ param: string; }>): void; + /** + * Unregister uiStateChange, this interface can only be used by devicemanager ui. + * + * @permission ohos.permission.ACCESS_SERVICE_DM + * @param { 'replyResult' } type - Ui reply result to unregister. + * @param { Callback } [callback] - Indicates the devicemanager ui state to unregister. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; + * 2. Incorrect parameter type; + * 3. Parameter verification failed; + * 4. The size of specified type is greater than 255. + * @throws { BusinessError } 201 - Permission verification failed. + * The application does not have the permission required to call the API. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.DistributedHardware.DeviceManager + * @systemapi this method can be used only by system applications. + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + off(type: 'replyResult', callback?: Callback): void; /** * Get the device list under the same account. diff --git a/api/@ohos.effectKit.d.ts b/api/@ohos.effectKit.d.ts index 507f0c73b87caa61f0c1e72090127a260c370f06..47a801c3c5d139ebb7c7970b97745c797187e484 100644 --- a/api/@ohos.effectKit.d.ts +++ b/api/@ohos.effectKit.d.ts @@ -72,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 @@ -88,7 +88,7 @@ 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 * @crossplatform @@ -97,29 +97,29 @@ declare namespace effectKit { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - blur(radius: number): Filter; + blur(radius: double): Filter; /** * 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. * @param { TileMode } tileMode - The tile mode of blur. * @returns { Filter } Filters for the current effect have been added. * @syscap SystemCapability.Multimedia.Image.Core * @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 @@ -128,7 +128,7 @@ declare namespace effectKit { */ /** * 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 * @crossplatform @@ -137,7 +137,7 @@ declare namespace effectKit { * @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. @@ -184,7 +184,7 @@ declare namespace effectKit { /** * 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 @@ -193,7 +193,7 @@ declare namespace effectKit { /** * 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 @@ -201,7 +201,7 @@ declare namespace effectKit { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - setColorMatrix(colorMatrix: Array): Filter; + setColorMatrix(colorMatrix: Array): Filter; /** * Gets the PixelMap where all filter effects have been added to the image. @@ -346,7 +346,7 @@ declare namespace effectKit { /** * 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 @@ -356,7 +356,7 @@ declare namespace effectKit { */ /** * 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 @@ -366,7 +366,7 @@ declare namespace effectKit { * @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 @@ -422,14 +422,14 @@ declare namespace effectKit { /** * 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 @@ -438,7 +438,7 @@ declare namespace effectKit { */ /** * 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 * @crossplatform @@ -447,7 +447,7 @@ declare namespace effectKit { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - isBlackOrWhiteOrGrayColor(color: number): boolean; + isBlackOrWhiteOrGrayColor(color: int): boolean; } /** @@ -478,13 +478,13 @@ declare namespace effectKit { /** * Red - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @since 9 */ /** * Red - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @form * @atomicservice @@ -492,7 +492,7 @@ declare namespace effectKit { */ /** * Red - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form @@ -500,17 +500,17 @@ declare namespace effectKit { * @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 @@ -518,7 +518,7 @@ declare namespace effectKit { */ /** * Green - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form @@ -526,17 +526,17 @@ declare namespace effectKit { * @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 @@ -544,7 +544,7 @@ declare namespace effectKit { */ /** * Blue - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form @@ -552,17 +552,17 @@ declare namespace effectKit { * @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 @@ -570,7 +570,7 @@ declare namespace effectKit { */ /** * Alpha - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Image.Core * @crossplatform * @form @@ -578,7 +578,7 @@ declare namespace effectKit { * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 */ - alpha: number; + alpha: int; } /** @@ -645,7 +645,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. @@ -655,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. @@ -667,7 +667,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. @@ -678,7 +678,7 @@ declare namespace effectKit { * @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. @@ -715,7 +715,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. @@ -725,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. @@ -737,7 +737,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. @@ -748,12 +748,12 @@ declare namespace effectKit { * @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; /** * TileMode enumeration description * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Multimedia.Image.Core * @since arkts {'1.1':'14', '1.2':'20'} * @arkts 1.1&1.2 @@ -797,4 +797,4 @@ declare namespace effectKit { } } -export default effectKit; +export default effectKit; \ No newline at end of file diff --git a/api/@ohos.events.emitter.d.ts b/api/@ohos.events.emitter.d.ts index f2af6c2e11d3cbe4dfed59d243492030d5a4216f..b93a5198f0247f2cb23a6af9fff74e1e5d9c857d 100644 --- a/api/@ohos.events.emitter.d.ts +++ b/api/@ohos.events.emitter.d.ts @@ -504,13 +504,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; } /** @@ -768,16 +768,27 @@ 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 + * @atomicservice + * @since 20 + * @arkts 1.2 + */ + data?: T | ESObject; } } diff --git a/api/@ohos.file.fileuri.d.ts b/api/@ohos.file.fileuri.d.ts index 93d80cdf64aa42c0169194334971d62132cc18d2..462c9c3d1de0deb3ede8be0b2bb9eeaa65bb07aa 100644 --- a/api/@ohos.file.fileuri.d.ts +++ b/api/@ohos.file.fileuri.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 @@ -84,7 +84,8 @@ declare namespace fileUri { /** * Obtains the file name of uri. * - * @type { string } + * @returns { string } + * string: Return the file name of uri. * @readonly * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900042 - Unknown error @@ -94,15 +95,17 @@ declare namespace fileUri { /** * Obtains the file name of uri. * - * @type { string } + * @returns { string } + * string: Return the file name of uri. * @readonly * @throws { BusinessError } 13900005 - I/O error * @throws { BusinessError } 13900042 - Unknown error * @syscap SystemCapability.FileManagement.AppFileService * @atomicservice - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - readonly name: string; + get name(): string; /** * Get the full directory uri where the file URI is located diff --git a/api/@ohos.file.keyManager.d.ts b/api/@ohos.file.keyManager.d.ts index 058ad8dd99c542845ec486d06e0eba73e8c6f1a1..864eeabb70a4aa8edcaed94535c23ed4f476c749 100644 --- a/api/@ohos.file.keyManager.d.ts +++ b/api/@ohos.file.keyManager.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2024-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,26 +23,28 @@ * * @namespace keyManager * @syscap SystemCapability.FileManagement.StorageService.Encryption - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace keyManager { /** * Initiate the deactivation of user key for the specified user when user screen is locked. * * @permission ohos.permission.STORAGE_MANAGER_CRYPT - * @param { number } userId + * @param { long } userId * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. * @throws { BusinessError } 401 - The input parameter is invalid. Possible causes: Mandatory - parameters are left unspecified; Or input parameter has type different from the type the interface requires. + * parameters are left unspecified; Or input parameter has type different from the type the interface requires. * @throws { BusinessError } 13600001 - IPC error. * @throws { BusinessError } 13600008 - No such object. Possible causes: Cannot find userkey for the specified user. * @throws { BusinessError } 13600009 - User ID out of range. Possible causes: input parameter userId < 100 or userId > 10736. * @syscap SystemCapability.FileManagement.StorageService.Encryption * @systemapi - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - function deactivateUserKey(userId: number):void; + function deactivateUserKey(userId: long):void; } export default keyManager; \ No newline at end of file diff --git a/api/@ohos.file.photoAccessHelper.d.ts b/api/@ohos.file.photoAccessHelper.d.ts index 8845d4c861735afefd6d6aede3ec91c9af267d5b..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,11 +102,10 @@ declare namespace photoAccessHelper { * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @StageModelOnly - * @crossplatform * @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. @@ -132,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 @@ -147,7 +146,7 @@ declare namespace photoAccessHelper { /** * Enumerates media file types. * - * @enum { number } PhotoType + * @enum { int } PhotoType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform * @atomicservice @@ -206,7 +205,7 @@ declare namespace photoAccessHelper { /** * Enumerates the PhotoAsset types. * - * @enum { number } PhotoSubtype + * @enum { int } PhotoSubtype * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 10 @@ -214,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'} @@ -269,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 @@ -296,7 +295,7 @@ declare namespace photoAccessHelper { /** * Ability to access thumbnail * - * @enum { number } ThumbnailVisibility + * @enum { int } ThumbnailVisibility * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'14','1.2':'20'} @@ -326,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 @@ -334,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 @@ -383,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'} @@ -548,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'} @@ -669,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 @@ -706,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 @@ -743,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'} @@ -785,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'} @@ -816,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'} @@ -867,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'} @@ -888,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'} @@ -939,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'} @@ -1324,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. @@ -2046,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; @@ -2057,12 +2056,12 @@ declare namespace photoAccessHelper { * @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; @@ -2073,7 +2072,7 @@ declare namespace photoAccessHelper { * @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. * @@ -2197,7 +2196,7 @@ declare namespace photoAccessHelper { * 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 @@ -2210,7 +2209,7 @@ declare namespace photoAccessHelper { * @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; } /** @@ -2977,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'} @@ -3117,12 +3116,12 @@ declare namespace photoAccessHelper { /** * User id * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since 19 */ - userId?: number; + userId?: int; } /** @@ -3301,13 +3300,13 @@ declare namespace photoAccessHelper { /** * Token ID of the target application * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ - tokenId?: number; + tokenId?: long; } /** @@ -3339,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 @@ -3350,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 @@ -3362,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 @@ -3371,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. @@ -3638,7 +3637,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. @@ -3650,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. @@ -3663,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 @@ -3673,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. @@ -3689,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. @@ -3702,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 @@ -3712,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. * @@ -3823,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'} @@ -3890,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'} @@ -4110,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'} @@ -4271,7 +4270,7 @@ declare namespace photoAccessHelper { /** * Number of assets in the album * - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @since 10 @@ -4279,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 * @@ -4469,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 @@ -4477,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 @@ -4496,36 +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 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 arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ - readonly dateModified?: number; + readonly dateModified?: long; /** * Modify metadata for the album * @@ -5536,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 @@ -5549,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. * @@ -5571,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 @@ -5589,7 +5588,7 @@ declare namespace photoAccessHelper { bundleName: string, appName: string, appId: string, - tokenId: number, + tokenId: long, authorizationMode: AuthorizationMode, photoCreationConfigs: Array ): Promise>; @@ -5615,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. @@ -5627,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. * @@ -5636,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. @@ -5648,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. @@ -5830,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; @@ -5846,17 +5845,17 @@ declare namespace photoAccessHelper { * @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; @@ -5867,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; @@ -5886,14 +5885,14 @@ declare namespace photoAccessHelper { * @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; @@ -5904,12 +5903,12 @@ declare namespace photoAccessHelper { * @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; @@ -5920,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. * @@ -5957,7 +5956,7 @@ 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; @@ -5967,13 +5966,13 @@ declare namespace photoAccessHelper { * @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; @@ -5984,7 +5983,7 @@ declare namespace photoAccessHelper { * @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. * @@ -6864,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 @@ -7126,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 @@ -7265,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 @@ -7281,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. @@ -7939,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'} @@ -8000,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 @@ -8028,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'} @@ -8109,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'} @@ -8389,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. @@ -8400,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. @@ -8445,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. @@ -8455,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. @@ -8576,7 +8575,7 @@ 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 @@ -8584,7 +8583,7 @@ declare namespace photoAccessHelper { * @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 @@ -9006,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. @@ -9016,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 @@ -9106,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 * @@ -9156,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 * @@ -9266,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 * @@ -9346,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 * @@ -9436,13 +9435,13 @@ declare namespace photoAccessHelper { /** * modified time of thumbnail status * - * @type { ?number } + * @type { ?long } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 */ - thumbnailModifiedMs?: number; + thumbnailModifiedMs?: long; /** * visibility of thumbnails * @@ -9468,13 +9467,13 @@ declare namespace photoAccessHelper { /** * album id of album asset * - * @type { number } + * @type { int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 */ - albumId: number; + albumId: int; /** * type of album asset * @@ -9518,33 +9517,33 @@ declare namespace photoAccessHelper { /** * number of assets in this album * - * @type { number } + * @type { int } * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @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 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 arkts {'1.1':'14','1.2':'20'} * @arkts 1.1&1.2 */ - videoCount: number; + videoCount: int; } /** @@ -9644,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'} @@ -9674,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'} @@ -9776,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'} @@ -9832,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; @@ -9844,7 +9843,7 @@ declare namespace photoAccessHelper { * @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; } /** @@ -9874,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; @@ -9886,7 +9885,7 @@ declare namespace photoAccessHelper { * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ - getOrderPosition(assets: Array): Promise>; + getOrderPosition(assets: Array): Promise>; } /** @@ -9954,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 @@ -9966,7 +9965,7 @@ declare namespace photoAccessHelper { * @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 @@ -9993,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; @@ -10006,13 +10005,13 @@ declare namespace photoAccessHelper { * @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'} @@ -10109,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; } /** @@ -10206,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 @@ -10222,7 +10221,7 @@ declare namespace photoAccessHelper { submitCloudEnhancementTasks( photoAssets: Array, hasCloudWatermark: boolean, - triggerMode?: number + triggerMode?: int ): Promise; /** @@ -10331,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'} @@ -10379,7 +10378,7 @@ 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 arkts {'1.1':'14','1.2':'20'} @@ -10418,7 +10417,7 @@ 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 arkts {'1.1':'14','1.2':'20'} @@ -10567,7 +10566,7 @@ declare namespace photoAccessHelper { /** * Enumerates the types of download tasks. * - * @enum { number } CloudMediaDownloadType + * @enum { int } CloudMediaDownloadType * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @systemapi * @since arkts {'1.1':'14','1.2':'20'} @@ -10597,7 +10596,7 @@ 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 arkts {'1.1':'14','1.2':'20'} diff --git a/api/@ohos.file.storageStatistics.d.ts b/api/@ohos.file.storageStatistics.d.ts index 0bcb09387a7bd35c7c3b6d89f5f3b2ecf84a6964..7d8cf858eb5476fb055b66d070211d0c8e662ec8 100644 --- a/api/@ohos.file.storageStatistics.d.ts +++ b/api/@ohos.file.storageStatistics.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 @@ -25,7 +25,8 @@ import { AsyncCallback, Callback } from './@ohos.base'; * * @namespace storageStatistics * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics - * @since 8 + * @since arkts {'1.1':'8', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace storageStatistics { /** @@ -112,35 +113,39 @@ parameters are left unspecified; * * @interface BundleStats * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface BundleStats { /** * The size of application installation data. * - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - appSize: number; + appSize: long; /** * The size of application cache data. * - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - cacheSize: number; + cacheSize: long; /** * The size of application local data, distributed data and database data. * - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - dataSize: number; + dataSize: long; } /** * Get the bundle statistics. @@ -225,7 +230,8 @@ parameters are left unspecified; * @throws { BusinessError } 13600001 - IPC error. * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getCurrentBundleStats(callback: AsyncCallback): void; @@ -238,7 +244,8 @@ parameters are left unspecified; * @throws { BusinessError } 13600001 - IPC error. * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getCurrentBundleStats(): Promise; @@ -282,18 +289,20 @@ parameters are left unspecified; * @interface StorageStats * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface StorageStats { /** * The total size of device. * - * @type { number } + * @type { long } * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - total: number; + total: long; /** * The size of audio file. @@ -360,7 +369,8 @@ parameters are left unspecified; * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getUserStorageStats(): Promise; @@ -378,7 +388,8 @@ parameters are left unspecified; * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getUserStorageStats(callback: AsyncCallback): void; @@ -386,7 +397,7 @@ parameters are left unspecified; * Get the user storage statistics. * * @permission ohos.permission.STORAGE_MANAGER - * @param { number } userId - The id of the user + * @param { long } userId - The id of the user * @returns { Promise } return Promise * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. @@ -398,15 +409,16 @@ parameters are left unspecified; * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getUserStorageStats(userId: number): Promise; + function getUserStorageStats(userId: long): Promise; /** * Get the user storage statistics. * * @permission ohos.permission.STORAGE_MANAGER - * @param { number } userId - The id of the user + * @param { long } userId - The id of the user * @param { AsyncCallback } callback - callback * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. @@ -418,15 +430,16 @@ parameters are left unspecified; * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getUserStorageStats(userId: number, callback: AsyncCallback): void; + function getUserStorageStats(userId: long, callback: AsyncCallback): void; /** * Get the total size. * * @permission ohos.permission.STORAGE_MANAGER - * @param { AsyncCallback } callback - callback + * @param { AsyncCallback } callback - callback * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:Mandatory @@ -440,21 +453,22 @@ parameters are left unspecified; /** * Get the total size. * - * @param { AsyncCallback } callback - callback + * @param { AsyncCallback } callback - callback * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:Mandatory parameters are left unspecified; * @throws { BusinessError } 13600001 - IPC error. * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getTotalSize(callback: AsyncCallback): void; + function getTotalSize(callback: AsyncCallback): void; /** * Get the total size. * * @permission ohos.permission.STORAGE_MANAGER - * @returns { Promise } return Promise + * @returns { Promise } return Promise * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:Mandatory @@ -468,13 +482,14 @@ parameters are left unspecified; /** * Get the total size. * - * @returns { Promise } return Promise + * @returns { Promise } return Promise * @throws { BusinessError } 13600001 - IPC error. * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getTotalSize(): Promise; + function getTotalSize(): Promise; /** * Get the total size with sync interface @@ -506,7 +521,7 @@ parameters are left unspecified; * Get the free size. * * @permission ohos.permission.STORAGE_MANAGER - * @param { AsyncCallback } callback - callback + * @param { AsyncCallback } callback - callback * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:Mandatory @@ -520,21 +535,22 @@ parameters are left unspecified; /** * Get the free size. * - * @param { AsyncCallback } callback - callback + * @param { AsyncCallback } callback - callback * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:Mandatory parameters are left unspecified; * @throws { BusinessError } 13600001 - IPC error. * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getFreeSize(callback: AsyncCallback): void; + function getFreeSize(callback: AsyncCallback): void; /** * Get the free size. * * @permission ohos.permission.STORAGE_MANAGER - * @returns { Promise } return Promise + * @returns { Promise } return Promise * @throws { BusinessError } 201 - Permission verification failed. * @throws { BusinessError } 202 - The caller is not a system application. * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:Mandatory @@ -548,13 +564,14 @@ parameters are left unspecified; /** * Get the free size. * - * @returns { Promise } return Promise + * @returns { Promise } return Promise * @throws { BusinessError } 13600001 - IPC error. * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.SpatialStatistics - * @since 15 + * @since arkts {'1.1':'15', '1.2':'20'} + * @arkts 1.1&1.2 */ - function getFreeSize(): Promise; + function getFreeSize(): Promise; /** * Get the free size with sync interface. diff --git a/api/@ohos.file.volumeManager.d.ts b/api/@ohos.file.volumeManager.d.ts index 87377b26908cc65d6daff6a84b7ff7bbb5ff8c44..1b90ba7c3f8e84830c3161ba288037868bbb7ff5 100644 --- a/api/@ohos.file.volumeManager.d.ts +++ b/api/@ohos.file.volumeManager.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 @@ -26,7 +26,8 @@ import { AsyncCallback, Callback } from './@ohos.base'; * @namespace volumeManager * @syscap SystemCapability.FileManagement.StorageService.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace volumeManager { /** @@ -35,7 +36,8 @@ declare namespace volumeManager { * @interface Volume * @syscap SystemCapability.FileManagement.StorageService.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ export interface Volume { /** @@ -54,7 +56,8 @@ declare namespace volumeManager { * @type { string } * @syscap SystemCapability.FileManagement.StorageService.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ uuid: string; @@ -74,7 +77,8 @@ declare namespace volumeManager { * @type { string } * @syscap SystemCapability.FileManagement.StorageService.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ description: string; @@ -131,7 +135,8 @@ parameters are left unspecified; * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllVolumes(callback: AsyncCallback>): void; @@ -148,7 +153,8 @@ parameters are left unspecified; * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getAllVolumes(): Promise>; @@ -260,7 +266,8 @@ parameters are left unspecified; * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getVolumeByUuid(uuid: string, callback: AsyncCallback): void; @@ -280,7 +287,8 @@ parameters are left unspecified; * @throws { BusinessError } 13900042 - Unknown error. * @syscap SystemCapability.FileManagement.StorageService.Volume * @systemapi - * @since 9 + * @since arkts {'1.1':'9', '1.2':'20'} + * @arkts 1.1&1.2 */ function getVolumeByUuid(uuid: string): Promise; diff --git a/api/@ohos.fileshare.d.ts b/api/@ohos.fileshare.d.ts index 2eed8dfe4473678478dcf8418d4ec86ee4ecdc9b..f42bb987874e9da9bd2df0ca2f165fee7fb205db 100644 --- a/api/@ohos.fileshare.d.ts +++ b/api/@ohos.fileshare.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2024 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 @@ -38,7 +38,7 @@ declare namespace fileShare { /** * Enumerates the uri operate mode types. * - * @enum { number } OperationMode + * @enum { int } OperationMode * @syscap SystemCapability.FileManagement.AppFileService.FolderAuthorization * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 @@ -186,12 +186,12 @@ declare namespace fileShare { /** * Indicates the mode of operation for the URI, example { OperationMode.READ_MODE } or { OperationMode.READ_MODE | OperationMode.WRITE_MODE } * - * @type { number } + * @type { int } * @syscap SystemCapability.FileManagement.AppFileService.FolderAuthorization * @since arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 */ - operationMode: number; + operationMode: int; } /** @@ -363,7 +363,8 @@ declare namespace fileShare { * @throws { BusinessError } 13900001 - Operation not permitted. * @throws { BusinessError } 13900042 - Out of memory * @syscap SystemCapability.FileManagement.AppFileService.FolderAuthorization - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function activatePermission(policies: Array): Promise; @@ -380,7 +381,8 @@ declare namespace fileShare { * @throws { BusinessError } 13900001 - Operation not permitted. * @throws { BusinessError } 13900042 - Out of memory * @syscap SystemCapability.FileManagement.AppFileService.FolderAuthorization - * @since 11 + * @since arkts {'1.1':'11', '1.2':'20'} + * @arkts 1.1&1.2 */ function deactivatePermission(policies: Array): Promise; diff --git a/api/@ohos.font.d.ets b/api/@ohos.font.d.ets deleted file mode 100644 index 13654ce8ed0c457d28cfc7973a7b905236b75c24..0000000000000000000000000000000000000000 --- a/api/@ohos.font.d.ets +++ /dev/null @@ -1,798 +0,0 @@ -/* - * Copyright (c) 2022-2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * @kit ArkUI - */ -import { Resource } from './global/resource' -/** - * @namespace font - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ -/** - * @namespace font - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ -/** - * @namespace font - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - declare namespace font { - /** - * @typedef FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * @typedef FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * @typedef FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface FontOptions { - - /** - * The font name to register. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * The font name to register. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The font name to register. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The font name to register. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - familyName: string | Resource; - - /** - * The path of the font file. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * The path of the font file. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The path of the font file. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The path of the font file. - * - * @type { string | Resource } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - familySrc: string | Resource; - } - - /** - * @typedef FontInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * @typedef FontInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * @typedef FontInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export interface FontInfo { - - /** - * The path of the font file. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The path of the font file. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The path of the font file. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - path: string; - - /** - * The name of postscript. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The name of postscript. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The name of postscript. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - postScriptName: string; - - /** - * The font name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The font name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The font name. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - fullName: string; - - /** - * A set of fonts with a common design. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * A set of fonts with a common design. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * A set of fonts with a common design. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - family: string; - - /** - * A subset of the font family. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * A subset of the font family. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * A subset of the font family. - * - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - subfamily: string; - - /** - * The weight of the font. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The weight of the font. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The weight of the font. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - weight: number; - - /** - * The width of the font style. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * The width of the font style. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * The width of the font style. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - width: number; - - /** - * Whether it is italic. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Whether it is italic. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Whether it is italic. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - italic: boolean; - - /** - * Whether it is compact. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Whether it is compact. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Whether it is compact. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - monoSpace: boolean; - - /** - * Whether symbol fonts are supported. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Whether symbol fonts are supported. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Whether symbol fonts are supported. - * - * @type { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - symbolic: boolean; - } - - /** - * @typedef UIFontConfig - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontConfig - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontConfig { - /** - * The paths of system font files. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * The paths of system font files. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - fontDir: Array; - - /** - * The generic font info. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * The generic font info. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - generic: Array; - - /** - * The fallback font info. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * The fallback font info. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - fallbackGroups: Array; - } - - /** - * @typedef UIFontGenericInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontGenericInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontGenericInfo { - /** - * Name of the font set. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Name of the font set. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - family: string; - - /** - * Alias info of the font set. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Alias info of the font set. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - alias: Array; - - /** - * Adjust info of the font set. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Adjust info of the font set. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - adjust: Array; - } - - /** - * @typedef UIFontAliasInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontAliasInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontAliasInfo { - /** - * Font set name. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Font set name. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - name: string; - - /** - * Weight the font set contains only fonts with, if weight = 0, - * this font set can contain fonts with any weight. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Weight the font set contains only fonts with, if weight = 0, - * this font set can contain fonts with any weight. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - weight: number; - } - - /** - * @typedef UIFontAdjustInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontAdjustInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontAdjustInfo { - /** - * Original weight of the font - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Original weight of the font - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - weight: number; - /** - * Font weight displayed in the app - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Font weight displayed in the app - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - to: number; - } - - /** - * @typedef UIFontFallbackGroupInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontFallbackGroupInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontFallbackGroupInfo { - /** - * Indicates which font set uses following list for fallback font - * if the font set name is "", it means that the following list can be fallback font for all font sets. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Indicates which font set uses following list for fallback font - * if the font set name is "", it means that the following list can be fallback font for all font sets. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - fontSetName: string; - - /** - * Fallback font list related. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Fallback font list related. - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - fallback: Array; - } - - /** - * @typedef UIFontFallbackInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * @typedef UIFontFallbackInfo - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export interface UIFontFallbackInfo { - /** - * Language that font set support. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Language that font set support. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - language: string; - - /** - * Font name related. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Font name related. - * @type { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - family: string; - } - - /** - * Register a customized font in the FontManager. - * - * @param { FontOptions } options - FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Register a customized font in the FontManager. - * - * @param { FontOptions } options - FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Register a customized font in the FontManager. - * - * @param { FontOptions } options - FontOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function registerFont(options: FontOptions): void; - - /** - * Gets a list of fonts supported by system. - * - * @returns { Array } A list of font names - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Gets a list of fonts supported by system. - * - * @returns { Array } A list of font names - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Gets a list of fonts supported by system. - * - * @returns { Array } A list of font names - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function getSystemFontList(): Array; - - /** - * Get font details according to the font name. - * - * @param { string } fontName - font name - * @returns { FontInfo } Returns the font info - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Get font details according to the font name. - * - * @param { string } fontName - font name - * @returns { FontInfo } Returns the font info - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 11 - */ - /** - * Get font details according to the font name. - * - * @param { string } fontName - font name - * @returns { FontInfo } Returns the font info - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - export function getFontByName(fontName: string): FontInfo; - - /** - * Get font details according to the font name. - * - * @returns { UIFontConfig } Returns the ui font config - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 11 - */ - /** - * Get font details according to the font name. - * - * @returns { UIFontConfig } Returns the ui font config - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - export function getUIFontConfig(): UIFontConfig; -} - -export default font; \ No newline at end of file diff --git a/api/@ohos.font.d.ts b/api/@ohos.font.d.ts index 3bddff9027228945f0b911560d625daecb14133c..4a8422fd69866d2cda2a8c382a37841b5c387f0c 100644 --- a/api/@ohos.font.d.ts +++ b/api/@ohos.font.d.ts @@ -17,9 +17,6 @@ * @file * @kit ArkUI */ -/*** if arkts 1.2 */ -import { Resource } from './global/resource' -/*** endif */ /** * @namespace font @@ -37,8 +34,7 @@ import { Resource } from './global/resource' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ declare namespace font { /** @@ -57,8 +53,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface FontOptions { @@ -91,8 +86,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ familyName: string | Resource; @@ -125,8 +119,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ familySrc: string | Resource; } @@ -147,8 +140,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface FontInfo { @@ -174,8 +166,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ path: string; @@ -201,8 +192,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ postScriptName: string; @@ -228,8 +218,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fullName: string; @@ -255,8 +244,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ family: string; @@ -282,8 +270,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ subfamily: string; @@ -309,8 +296,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ weight: number; @@ -336,8 +322,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ width: number; @@ -363,8 +348,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ italic: boolean; @@ -390,8 +374,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ monoSpace: boolean; @@ -417,8 +400,7 @@ declare namespace font { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ symbolic: boolean; } @@ -432,8 +414,7 @@ declare namespace font { * @typedef UIFontConfig * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface UIFontConfig { /** @@ -447,8 +428,7 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontDir: Array; @@ -463,8 +443,7 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ generic: Array; @@ -479,8 +458,7 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fallbackGroups: Array; } @@ -494,8 +472,7 @@ declare namespace font { * @typedef UIFontGenericInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface UIFontGenericInfo { /** @@ -509,8 +486,7 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ family: string; @@ -525,8 +501,7 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ alias: Array; @@ -541,8 +516,7 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ adjust: Array; } @@ -556,8 +530,7 @@ declare namespace font { * @typedef UIFontAliasInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface UIFontAliasInfo { /** @@ -571,8 +544,7 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ name: string; @@ -589,8 +561,7 @@ declare namespace font { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ weight: number; } @@ -604,8 +575,7 @@ declare namespace font { * @typedef UIFontAdjustInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface UIFontAdjustInfo { /** @@ -619,8 +589,7 @@ declare namespace font { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ weight: number; /** @@ -634,8 +603,7 @@ declare namespace font { * @type { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ to: number; } @@ -649,8 +617,7 @@ declare namespace font { * @typedef UIFontFallbackGroupInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface UIFontFallbackGroupInfo { /** @@ -666,8 +633,7 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontSetName: string; @@ -682,8 +648,7 @@ declare namespace font { * @type { Array } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fallback: Array; } @@ -697,8 +662,7 @@ declare namespace font { * @typedef UIFontFallbackInfo * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ interface UIFontFallbackInfo { /** @@ -712,8 +676,7 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ language: string; @@ -728,8 +691,7 @@ declare namespace font { * @type { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ family: string; } @@ -834,8 +796,7 @@ declare namespace font { * @returns { UIFontConfig } Returns the ui font config * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ function getUIFontConfig(): UIFontConfig; } diff --git a/api/@ohos.font.static.d.ets b/api/@ohos.font.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..d8b9c96ab6e076cb58652a9c5b493c9c315ef52d --- /dev/null +++ b/api/@ohos.font.static.d.ets @@ -0,0 +1,290 @@ +/* + * Copyright (c) 2025 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 + * @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 b661f598b4f08afe8209269441a837a1cc5edb77..8f010e87fffd6b004eaead77fbc0855e1100ad50 100644 --- a/api/@ohos.fontManager.d.ts +++ b/api/@ohos.fontManager.d.ts @@ -33,7 +33,7 @@ declare namespace fontManager { * * @permission ohos.permission.UPDATE_FONT * @param { string } path - path indicates the font path. - * @returns { Promise } - int 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. @@ -55,7 +55,7 @@ declare namespace fontManager { * * @permission ohos.permission.UPDATE_FONT * @param { string } fullName - fullName indicates the font name. - * @returns { Promise } - int 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. diff --git a/api/@ohos.geoLocationManager.d.ts b/api/@ohos.geoLocationManager.d.ts index 74511e841d3fd3e8d4d97e0e90c6bc626bfec255..6e00ad602d8f547d7c488d804de7dd9475b3e73e 100644 --- a/api/@ohos.geoLocationManager.d.ts +++ b/api/@ohos.geoLocationManager.d.ts @@ -1439,62 +1439,62 @@ declare namespace geoLocationManager { /** * Number of satellites. * - * @type { number } + * @type { int } * @syscap SystemCapability.Location.Location.Gnss * @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 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 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 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 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 arkts {'1.1':'9','1.2':'20'} * @arkts 1.1&1.2 */ - carrierFrequencies: Array; + carrierFrequencies: Array; /** * Satellite constellation type array. @@ -1509,12 +1509,12 @@ declare namespace geoLocationManager { /** * Satellite additional information array. * - * @type { ?Array } + * @type { ?Array } * @syscap SystemCapability.Location.Location.Gnss * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - satelliteAdditionalInfo?: Array; + satelliteAdditionalInfo?: Array; } /** @@ -1529,12 +1529,12 @@ declare namespace geoLocationManager { /** * GNSS cache location report period. * - * @type { number } + * @type { int } * @syscap SystemCapability.Location.Location.Gnss * @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. @@ -1705,32 +1705,32 @@ declare namespace geoLocationManager { /** * Latitude for reverse geocoding query. * - * @type { number } + * @type { double } * @syscap SystemCapability.Location.Location.Geocoder * @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 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 arkts {'1.1':'9','1.2':'20'} * @arkts 1.1&1.2 */ - maxItems?: number; + maxItems?: int; } /** @@ -1775,52 +1775,52 @@ declare namespace geoLocationManager { /** * Indicates the maximum number of geocode query results. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Location.Location.Geocoder * @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 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 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 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 arkts {'1.1':'9','1.2':'20'} * @arkts 1.1&1.2 */ - maxLongitude?: number; + maxLongitude?: double; } /** @@ -1837,24 +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 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 arkts {'1.1':'9','1.2':'20'} * @arkts 1.1&1.2 */ - longitude?: number; + longitude?: double; /** * Indicates language used for the location description. @@ -2010,12 +2010,12 @@ declare namespace geoLocationManager { /** * Indicates the amount of additional descriptive information. * - * @type { ?number } + * @type { ?int } * @syscap SystemCapability.Location.Location.Geocoder * @since arkts {'1.1':'9','1.2':'20'} * @arkts 1.1&1.2 */ - descriptionsSize?: number; + descriptionsSize?: int; /** * Indicates whether it is an mock GeoAddress @@ -2085,56 +2085,56 @@ declare namespace geoLocationManager { /** * 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 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 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 arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 */ - maxAccuracy?: number; + maxAccuracy?: double; } /** @@ -2193,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; } /** @@ -2267,13 +2267,13 @@ declare namespace geoLocationManager { /** * Location report interval, in seconds. * - * @type { number } + * @type { int } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @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. @@ -2334,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. @@ -2375,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 */ @@ -2384,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 */ @@ -2406,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. @@ -2554,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. @@ -2583,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. @@ -2681,25 +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 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 arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - scanTimeout?: number; + scanTimeout?: int; } /** @@ -2768,35 +2768,35 @@ declare namespace geoLocationManager { /** * Received signal strength indicator (RSSI). * - * @type {number} + * @type {int} * @syscap SystemCapability.Location.Location.Core * @systemapi * @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 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 arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - timestamp: number; + timestamp: long; } /** @@ -2834,24 +2834,24 @@ declare namespace geoLocationManager { /** * RSSI of the remote device. * - * @type {number} + * @type {int} * @syscap SystemCapability.Location.Location.Core * @systemapi * @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 arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ - timestamp: number; + timestamp: long; } /** @@ -2876,12 +2876,12 @@ declare namespace geoLocationManager { /** * RSSI of the scanned device * - * @type { number } + * @type { int } * @syscap SystemCapability.Location.Location.Core * @since arkts {'1.1':'16','1.2':'20'} * @arkts 1.1&1.2 */ - rssi: number; + rssi: int; /** * The raw data of broadcast packet @@ -3058,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'} @@ -3109,7 +3109,7 @@ declare namespace geoLocationManager { /** * Enum for coordinate system type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Geofence * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 @@ -3137,7 +3137,7 @@ declare namespace geoLocationManager { /** * Enum for location icon status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Core * @systemapi * @since arkts {'1.1':'12','1.2':'20'} @@ -3178,7 +3178,7 @@ declare namespace geoLocationManager { /** * Enum for location error code. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} @@ -3239,7 +3239,7 @@ declare namespace geoLocationManager { /** * Enum for geofence transition status. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Geofence * @since 12 */ @@ -3272,7 +3272,7 @@ declare namespace geoLocationManager { /** * Enum for satellite constellation category. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Gnss * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 @@ -3354,7 +3354,7 @@ declare namespace geoLocationManager { /** * Enum for satellite additional information. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Gnss * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 @@ -3409,7 +3409,7 @@ declare namespace geoLocationManager { /** * Enum for user activity scenario. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} @@ -3460,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'} @@ -3491,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'} @@ -3573,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'} @@ -3687,7 +3687,7 @@ declare namespace geoLocationManager { /** * Enum for power consumption scenario. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'12','1.2':'20'} @@ -3728,7 +3728,7 @@ declare namespace geoLocationManager { /** * Enum for location privacy type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Core * @systemapi * @since arkts {'1.1':'9','1.2':'20'} @@ -3769,7 +3769,7 @@ declare namespace geoLocationManager { /** * Enum for sports type * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Core * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} @@ -3867,7 +3867,7 @@ declare namespace geoLocationManager { /** * Enum for country code type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Core * @since arkts {'1.1':'9','1.2':'20'} * @arkts 1.1&1.2 @@ -3913,7 +3913,7 @@ declare namespace geoLocationManager { /** * Enum for locating required data type. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Location.Location.Core * @systemapi * @since arkts {'1.1':'10','1.2':'20'} diff --git a/api/@ohos.graphics.common2D.d.ts b/api/@ohos.graphics.common2D.d.ts index 3795b8afdeb1c71eda0df0636182a5f642130fda..9e9838befe546e2d2cfbdf252af2164abade7d88 100644 --- a/api/@ohos.graphics.common2D.d.ts +++ b/api/@ohos.graphics.common2D.d.ts @@ -36,36 +36,64 @@ declare namespace common2D { 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 arkts {'1.1':'11', '1.2':'20'} + * @since 11 + */ + /** + * 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: number; + 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 arkts {'1.1':'11', '1.2':'20'} + * @since 11 + */ + /** + * 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: number; + red: int; + /** + * Green component of the color. The value is an integer ranging from 0 to 255. + * @type { int } + * @syscap SystemCapability.Graphics.Drawing + * @since 11 + */ /** * Green component of the color. The value is an integer ranging from 0 to 255. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing - * @since arkts {'1.1':'11', '1.2':'20'} + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ - green: number; + green: int; + /** + * Blue component of the color. The value is an integer ranging from 0 to 255. + * @type { int } + * @syscap SystemCapability.Graphics.Drawing + * @since 11 + */ /** * Blue component of the color. The value is an integer ranging from 0 to 255. - * @type { number } + * @type { int } * @syscap SystemCapability.Graphics.Drawing - * @since arkts {'1.1':'11', '1.2':'20'} + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ - blue: number; + blue: int; } /** @@ -78,36 +106,64 @@ declare namespace common2D { 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 arkts {'1.1':'11', '1.2':'20'} + * @since 11 + */ + /** + * 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: number; + left: double; + /** + * Y coordinate of the upper left corner of the rectangle. The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @since 11 + */ /** * Y coordinate of the upper left corner of the rectangle. The value is a floating point number. - * @type { number } + * @type { double } * @syscap SystemCapability.Graphics.Drawing - * @since arkts {'1.1':'11', '1.2':'20'} + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ - top: number; + 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 arkts {'1.1':'11', '1.2':'20'} + * @since 11 + */ + /** + * 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: number; + 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 arkts {'1.1':'11', '1.2':'20'} + * @since 11 + */ + /** + * 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: number; + bottom: double; } /** @@ -120,21 +176,35 @@ declare namespace common2D { interface Point { /** * Horizontal coordinate. The value is a floating point number. - * @type { number } + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @since 12 + */ + /** + * Horizontal coordinate. The value is a floating point number. + * @type { double } * @syscap SystemCapability.Graphics.Drawing - * @since arkts {'1.1':'12', '1.2':'20'} + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ - x: number; + x: double; /** * Vertical coordinate. The value is a floating point number. - * @type { number } + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @since 12 + */ + /** + * Vertical coordinate. The value is a floating point number. + * @type { double } * @syscap SystemCapability.Graphics.Drawing - * @since arkts {'1.1':'12', '1.2':'20'} + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ - y: number; + y: double; } /** @@ -148,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; } /** @@ -165,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.drawing.d.ts b/api/@ohos.graphics.drawing.d.ts index 3f52a32d8040d7b369180345290040a404fcdc87..23c93603dee78d5b239598c8ffd04425df57e487 100644 --- a/api/@ohos.graphics.drawing.d.ts +++ b/api/@ohos.graphics.drawing.d.ts @@ -51,7 +51,7 @@ 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 arkts {'1.1':'11', '1.2':'20'} * @arkts 1.1&1.2 @@ -265,7 +265,7 @@ declare namespace drawing { /** * Enumerates the directions of a closed contour. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -287,7 +287,7 @@ declare namespace drawing { /** * Enumerates the fill types of a path. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -330,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 */ @@ -374,30 +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 arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * A constructor used to create a RoundRect object. + * A rounded rectangle is created when both xRadii and yRadii are greater than 0. + * Otherwise, only a rectangle is created. + * @param { common2D.Rect } rect - Rectangle that encloses the rounded rectangle to create. + * @param { 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: number, yRadii: number); + 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. @@ -413,21 +446,37 @@ 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 arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -476,7 +525,7 @@ declare namespace drawing { /** * 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 */ @@ -551,14 +600,27 @@ declare namespace drawing { /** * 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. @@ -613,174 +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 arkts {'1.1':'11', '1.2':'20'} + * @since 11 + */ + /** + * 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: number, y1: number, x2: number, y2: number, startDeg: number, sweepDeg: number): void; + 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. @@ -817,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; @@ -840,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; @@ -853,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. @@ -903,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. @@ -960,18 +1326,40 @@ 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. @@ -1012,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. @@ -1066,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. @@ -1105,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. @@ -1116,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: @@ -1133,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 @@ -1151,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 */ @@ -1180,7 +1655,7 @@ declare namespace drawing { /** * Enumerates the filter modes. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -1205,7 +1680,7 @@ declare namespace drawing { /** * Enumerates the shadow drawing behaviors. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -1289,24 +1764,55 @@ 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 arkts {'1.1':'11', '1.2':'20'} + * @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 arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * 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: number, top: number, right: number, bottom: number): void; + drawRect(left: double, top: double, right: double, bottom: double): void; /** * Draws a rounded rectangle. @@ -1343,55 +1849,105 @@ 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, - ambientColor: common2D.Color, spotColor: common2D.Color, 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 } planeParams - 3D vector, + * which is used to determine the z-axis offset of an occluder relative to the canvas, + * based on its x and y coordinates. * @param { common2D.Point3d } devLightPos - Position of the light relative to the canvas. - * @param { number } lightRadius - Radius of the light. The value is a floating point number. - * @param { common2D.Color | number } ambientColor - Ambient shadow color, represented by a 32-bit unsigned integer in hexadecimal ARGB format. - * @param { common2D.Color | number } spotColor - Spot shadow color, represented by a 32-bit unsigned integer in hexadecimal ARGB format. - * @param { ShadowFlag } flag - Indicates the flag to control opaque occluder, shadow, and light position. + * @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 + * @crossplatform + * @since 20 + */ + drawShadow(path: Path, planeParams: common2D.Point3d, devLightPos: common2D.Point3d, lightRadius: double, + ambientColor: common2D.Color, spotColor: common2D.Color, 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 * @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 @@ -1399,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 @@ -1478,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 @@ -1487,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. @@ -1529,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. @@ -1560,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. @@ -1595,68 +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 arkts {'1.1':'12', '1.2':'20'} + * @since 12 + */ + /** + * Draws a PixelMap based on a mesh, where mesh vertices are evenly distributed across the PixelMap. + * @param { image.PixelMap } pixelmap - PixelMap to draw. + * @param { 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: number, meshHeight: number, - vertices: Array, vertOffset: number, colors: Array, colorOffset: number): void; + drawPixelMapMesh(pixelmap: image.PixelMap, meshWidth: int, meshHeight: int, + vertices: Array, vertOffset: int, colors: Array, colorOffset: int): void; /** * Draws a region. @@ -1705,27 +2413,48 @@ declare namespace drawing { 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 arkts {'1.1':'12', '1.2':'20'} + * @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. @@ -1739,11 +2468,18 @@ 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. @@ -1755,39 +2491,71 @@ declare namespace drawing { /** * 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. @@ -1806,59 +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; + /** + * 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. + * @syscap SystemCapability.Graphics.Drawing + * @since 12 + */ /** * Applies a rotation matrix on top of the current canvas matrix (identity matrix by default). - * Subsequent drawing and clipping operations will automatically have a rotation effect applied to their shapes and positions. - * @param { number } degrees - Angle to rotate, in degrees. The value is a floating point number. - * A positive value indicates a clockwise rotation, and a negative value indicates a counterclockwise rotation. - * @param { number } sx - X coordinate of the rotation center. The value is a floating point number. - * @param { number } sy - Y coordinate of the rotation center. The value is a floating point number. + * 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. + *
2. Incorrect parameter types. * @syscap SystemCapability.Graphics.Drawing - * @since arkts {'1.1':'12', '1.2':'20'} + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ - rotate(degrees: number, sx: number, sy: number) : void; + 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. @@ -1930,13 +2749,24 @@ 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 */ + /** + * 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; /** @@ -1968,7 +2798,7 @@ declare namespace drawing { /** * Enumerates the canvas clipping modes. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -1999,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 */ @@ -2079,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. @@ -2118,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; } /** @@ -2142,13 +3018,13 @@ 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); } /** @@ -2230,7 +3106,7 @@ declare namespace drawing { /** * Enumerates the font edging types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -2260,7 +3136,7 @@ declare namespace drawing { /** * Enumerates the font hinting types. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -2337,23 +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 arkts {'1.1':'11', '1.2':'20'} + * @since 11 + */ + /** + * 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: number): void; + 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. @@ -2385,48 +3278,93 @@ declare namespace drawing { /** * 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. @@ -2451,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. @@ -2519,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. @@ -2559,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. @@ -2576,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. @@ -2600,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, @@ -2658,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 */ @@ -2717,126 +3739,234 @@ 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 arkts {'1.1':'11', '1.2':'20'} + * @since 11 + */ + /** + * 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: number; + 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 arkts {'1.1':'11', '1.2':'20'} + * @since 11 + */ + /** + * 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: number; + 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 arkts {'1.1':'11', '1.2':'20'} + * @since 11 + */ + /** + * 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: number; + 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 arkts {'1.1':'11', '1.2':'20'} + * @since 11 + */ + /** + * 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: number; + 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. * @type { number } * @syscap SystemCapability.Graphics.Drawing - * @since arkts {'1.1':'11', '1.2':'20'} + * @since 11 + */ + /** + * Interline spacing, that is, the distance from the descent of one line of text to the ascent of the next line. + * The value is a floating point number. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ - leading: number; + 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; } /** @@ -2851,26 +3981,52 @@ 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. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @since 12 + */ + /** + * Divides the image into lattices. The lattices on both even columns and even rows are fixed, + * and they are drawn at their original size if the target is large enough. + * If the target is too small to hold the fixed lattices, all the fixed lattices are scaled down to fit the target, + * and the lattices that are not on even columns and even rows are scaled to accommodate the remaining space. + * @param { Array } xDivs - Array of X coordinates used to divide the image. The value is an integer. + * @param { Array } yDivs - Array of Y coordinates used to divide the image. The value is an integer. + * @param { 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 arkts {'1.1':'12', '1.2':'20'} + * @crossplatform + * @since 20 * @arkts 1.1&1.2 */ - static createImageLattice(xDivs: Array, yDivs: Array, fXCount: number, fYCount: number, + static createImageLattice(xDivs: Array, yDivs: Array, fXCount: int, fYCount: int, fBounds?: common2D.Rect | null, fRectTypes?: Array | null, fColors?: Array | null): Lattice; /** @@ -2878,32 +4034,59 @@ 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. - * 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. + * 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. + *
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; + /** + * 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 arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -2943,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 */ @@ -2989,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. @@ -3039,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. @@ -3079,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. @@ -3223,7 +4618,7 @@ declare namespace drawing { /** * Enumerates the tile modes of the shader effect. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -3266,34 +4661,70 @@ 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; } /** @@ -3313,24 +4744,48 @@ declare namespace drawing { *
2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Graphics.Drawing - * @since arkts {'1.1':'11', '1.2':'20'} + * @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; *
2. Incorrect parameter types; 3. Parameter verification failed. * @static * @syscap SystemCapability.Graphics.Drawing - * @since arkts {'1.1':'18', '1.2':'20'} + * @since 18 + */ + /** + * 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 | number, mode: BlendMode): ColorFilter; + static createBlendModeColorFilter(color: common2D.Color | int, mode: BlendMode): ColorFilter; /** * Creates a ColorFilter object by combining another two color filters. @@ -3373,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; } @@ -3406,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. @@ -3436,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 @@ -3446,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. @@ -3503,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 */ @@ -3533,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 */ @@ -3562,7 +5047,7 @@ declare namespace drawing { /** * Enumerates the blur types of a mask filter. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -3626,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. @@ -3654,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 { int } color - Color in hexadecimal ARGB format. + * @syscap SystemCapability.Graphics.Drawing + * @since 18 + */ /** - * 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 + * @crossplatform + * @since 20 + */ + setColor(color: int): void; /** * Set the color by four floating point values, unpremultiplied. The color values are interpreted as being in @@ -3719,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. @@ -3769,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. @@ -3956,40 +5549,76 @@ declare namespace drawing { /** * 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 @@ -4022,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. @@ -4049,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. @@ -4187,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. @@ -4267,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. @@ -4340,122 +6058,232 @@ 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 @@ -4477,21 +6305,28 @@ 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. - * @returns { Array } nine scalar values contained by Matrix. + * @returns { Array } nine scalar values contained by Matrix. * @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, @@ -4525,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 */ @@ -4599,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. @@ -4658,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. @@ -4694,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. @@ -4742,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. @@ -4774,7 +6686,7 @@ declare namespace drawing { /** * Enumerates the operations for combining two regions. - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since arkts {'1.1':'12', '1.2':'20'} * @arkts 1.1&1.2 @@ -4832,7 +6744,7 @@ declare namespace drawing { /** * Enumerates the corner positions of a rounded rectangle. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @since 12 */ @@ -4870,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 */ @@ -4936,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. @@ -4963,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. @@ -5024,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. @@ -5122,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. @@ -5158,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. @@ -5208,4 +7120,4 @@ declare namespace drawing { } } -export default drawing; +export default drawing; \ No newline at end of file diff --git a/api/@ohos.graphics.text.d.ts b/api/@ohos.graphics.text.d.ts index 8c75136d72295a3bc6840d6c8c9e131f645c86bc..1f6ccc449a75d730b08e588ea55e2976c30f182e 100755 --- a/api/@ohos.graphics.text.d.ts +++ b/api/@ohos.graphics.text.d.ts @@ -1839,13 +1839,13 @@ declare namespace text { /** * Obtains the range of the word where the glyph with a given offset is located. - * @param { double } 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 arkts{ '1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - getWordBoundary(offset: double): Range; + getWordBoundary(offset: int): Range; /** * Obtains the number of text lines. diff --git a/api/@ohos.graphics.uiEffect.d.ts b/api/@ohos.graphics.uiEffect.d.ts index daa434171b69c0fbad11f02ced417bd61ff63faa..e1761d612b5f30e340b4511986c28287606880fa 100644 --- a/api/@ohos.graphics.uiEffect.d.ts +++ b/api/@ohos.graphics.uiEffect.d.ts @@ -39,7 +39,7 @@ 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 @@ -47,26 +47,26 @@ declare namespace uiEffect { * @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 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. @@ -76,12 +76,12 @@ declare namespace uiEffect { * @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. @@ -91,12 +91,12 @@ declare namespace uiEffect { * @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. @@ -107,13 +107,172 @@ declare namespace uiEffect { * @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 { 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 } 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(radius: double, gradientParam: LinearGradientBlurOptions): Filter; + + /** + * Sets the deformation effect controlled by bezier curves of the component. + * + * @param { Array } controlPoints - The bezier control points, 12 points needed. + * @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 + */ + bezierWarp(controlPoints: Array): Filter; + + /** + * Sets the content light filter. + * + * @param { common2D.Point3d } lightPosition + * @param { common2D.Color } lightColor + * @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. + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + contentLight(lightPosition: common2D.Point3d, lightColor: common2D.Color, lightIntensity: double, + displacementMap?: Mask): Filter; + + /** + * Sets the color gradient filter, may blend with alpha mask. + * + * @param { Array } colors + * @param { Array } positions + * @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. + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + colorGradient(colors: Array, positions: Array, strengths: Array, + alphaMask?: Mask): Filter; + + /** + * Detects and glows edges of contents. + * + * @param { double } alpha + * @param { Color } [color] + * @param { Mask } [mask] + * @param { boolean } [bloom] + * @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 + */ + edgeLight(alpha: double, color?: Color, mask?: Mask, bloom?: boolean): Filter; + + /** + * Sets distort effect with displacement map. + * + * @param { Mask } displacementMap + * @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?: [double, double]): Filter; + + /** + * Sets dispersion effect with mask map. + * + * @param { Mask } dispersionMap + * @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: double, rFactor?: [double, double], gFactor?: [double, double], + bFactor?: [double, double]): Filter; + + /** + * Applies a high dynamic range (HDR) brightness enhancement filter to the component. + * @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: 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 arkts {'1.1':'12', '1.2':'20'} @@ -164,7 +323,7 @@ declare namespace uiEffect { /** * WaterRippleMode enumeration description * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} @@ -215,7 +374,7 @@ declare namespace uiEffect { /** * FlyMode enumeration description * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Graphics.Drawing * @systemapi * @since arkts {'1.1':'12', '1.2':'20'} @@ -261,6 +420,22 @@ declare namespace uiEffect { * @arkts 1.1&1.2 */ backgroundColorBlender(blender: BrightnessBlender): 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; } /** @@ -285,90 +460,205 @@ 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; + } + + /** + * The Color of Light. + * @typedef Color + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + interface Color { + /** + * Red component of color. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + red: double; + /** + * Green component of color. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + green: double; + /** + * Blue component of color + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + blue: double; + /** + * Alpha component of color. + * @type { double } + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + alpha: double; + } + + /** + * Defines the mask for Filter or VisualEffect. + * @typedef { Mask } + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + class Mask { + /** + * Create a Mask of ripple. + * @param { common2D.Point } center + * @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 + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + static createRippleMask(center: common2D.Point, radius: double, width: double, offset?: double): Mask; + + /** + * Create a Mask of pixelmap. + * @param { image.PixelMap } pixelMap + * @param { common2D.Rect } srcRect + * @param { common2D.Rect } dstRect + * @param { Color } [fillColor] + * @returns { Mask } + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @static + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + static createPixelMapMask(pixelMap: image.PixelMap, srcRect: common2D.Rect, dstRect: common2D.Rect, + fillColor?: Color): Mask; + + /** + * Create a Mask of radial gradient. + * @param { common2D.Point } center + * @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 + * @syscap SystemCapability.Graphics.Drawing + * @systemapi + * @since 20 + */ + 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; } /** @@ -413,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 af3e8719de0df4ef9242c15735489b976e6ca831..6b8fc14fea209abb1524a584ae0f7bf26fe33f5d 100644 --- a/api/@ohos.hiSysEvent.d.ts +++ b/api/@ohos.hiSysEvent.d.ts @@ -140,10 +140,20 @@ declare namespace hiSysEvent { * @type { ?object } * @syscap SystemCapability.HiviewDFX.HiSysEvent * @systemapi hide for inner use - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ params?: object; + + /** + * The params of the event. + * + * @type { ?Record } + * @syscap SystemCapability.HiviewDFX.HiSysEvent + * @systemapi hide for inner use + * @since 20 + * @arkts 1.2 + */ + params?: Record; } /** 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.hilog.d.ts b/api/@ohos.hilog.d.ts index 998320202635cd938c7c1ada1878b9f4169ef097..e41fa2654e5c71d3814f1b7f0cd006f6d3adcea4 100644 --- a/api/@ohos.hilog.d.ts +++ b/api/@ohos.hilog.d.ts @@ -85,7 +85,7 @@ 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. @@ -96,7 +96,7 @@ declare namespace hilog { * @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. @@ -137,7 +137,7 @@ 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. @@ -148,7 +148,7 @@ declare namespace hilog { * @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. @@ -189,7 +189,7 @@ 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. @@ -200,7 +200,7 @@ declare namespace hilog { * @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. @@ -241,7 +241,7 @@ 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. @@ -252,7 +252,7 @@ declare namespace hilog { * @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. @@ -293,7 +293,7 @@ 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. @@ -304,7 +304,7 @@ declare namespace hilog { * @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. @@ -320,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 @@ -330,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. @@ -360,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 7dc81bdeb32591d2ab251ed109e8266943010b27..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, @@ -814,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; } /** @@ -1381,10 +1407,25 @@ declare namespace hiAppEvent { * @syscap SystemCapability.HiviewDFX.HiAppEvent * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @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; } /** diff --git a/api/@ohos.i18n.d.ts b/api/@ohos.i18n.d.ts index ab1b00a6f4707bc8c7a3dab8c3e2f6bf099e84ae..8e7c10a4e971bb78c11d067b3657b5a77a78a13e 100644 --- a/api/@ohos.i18n.d.ts +++ b/api/@ohos.i18n.d.ts @@ -511,7 +511,6 @@ declare namespace i18n { * 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 } 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 } 890001 - Invalid parameter. Possible causes: Parameter verification failed. @@ -530,7 +529,6 @@ declare namespace i18n { * @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 } 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 } 890001 - Invalid parameter. Possible causes: Parameter verification failed. @@ -1311,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. @@ -1322,6 +1320,7 @@ declare namespace i18n { * @atomicservice * @since 18 * @deprecated since 20 + * @useinstead getUnicodeWrappedFilePath */ static getUnicodeWrappedFilePath(path: string, delimiter?: string, locale?: intl.Locale): string; @@ -4246,6 +4245,7 @@ declare namespace i18n { * @atomicservice * @since 18 * @deprecated since 20 + * @useinstead getSimpleDateTimeFormatByPattern */ export function getSimpleDateTimeFormatByPattern(pattern: string, locale?: intl.Locale): SimpleDateTimeFormat; @@ -4280,6 +4280,7 @@ declare namespace i18n { * @atomicservice * @since 18 * @deprecated since 20 + * @useinstead getSimpleDateTimeFormatBySkeleton */ export function getSimpleDateTimeFormatBySkeleton(skeleton: string, locale?: intl.Locale): SimpleDateTimeFormat; @@ -4334,6 +4335,7 @@ declare namespace i18n { * @atomicservice * @since 18 * @deprecated since 20 + * @useinstead getSimpleNumberFormatBySkeleton */ export function getSimpleNumberFormatBySkeleton(skeleton: string, locale?: intl.Locale): SimpleNumberFormat; @@ -4393,6 +4395,7 @@ declare namespace i18n { * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} * @deprecated since 20 + * @useinstead constructor * @arkts 1.1&1.2 */ constructor(numberFormat: intl.NumberFormat | SimpleNumberFormat, options?: StyledNumberFormatOptions); diff --git a/api/@ohos.intl.d.ts b/api/@ohos.intl.d.ts index dd77c2628e3d167ba1c496b66c6ea587857e29ae..0cbfb8e4cc7db463464282d8fdee70b5a1ecbb83 100644 --- a/api/@ohos.intl.d.ts +++ b/api/@ohos.intl.d.ts @@ -434,7 +434,7 @@ declare namespace intl { * @atomicservice * @since 12 * @deprecated since 20 - * @useinstead i18n.System.getSystemLocaleObject + * @useinstead i18n.System.getSystemLocaleInstance */ constructor(); diff --git a/api/@ohos.matrix4.d.ts b/api/@ohos.matrix4.d.ts index ae8ae432e4aefa318ac4d98a197e100b7602ed31..1aa87f826f96aeffd783336f434280a9e5b337d6 100644 --- a/api/@ohos.matrix4.d.ts +++ b/api/@ohos.matrix4.d.ts @@ -40,8 +40,7 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare namespace matrix4 { /** @@ -66,10 +65,9 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export interface TranslateOption { + interface TranslateOption { /** * Indicates the translation distance of the x-axis, in px. * @@ -95,8 +93,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ x?: number; @@ -125,8 +122,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ y?: number; @@ -155,8 +151,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ z?: number; } @@ -183,10 +178,9 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export interface ScaleOption { + interface ScaleOption { /** * Zoom factor of the x-axis. * @@ -213,8 +207,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ x?: number; @@ -244,8 +237,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ y?: number; @@ -275,8 +267,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ z?: number; @@ -305,8 +296,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ centerX?: number; @@ -335,8 +325,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ centerY?: number; } @@ -363,10 +352,9 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export interface RotateOption { + interface RotateOption { /** * Axis of rotation vector x coordinate. * @@ -391,8 +379,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ x?: number; @@ -420,8 +407,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ y?: number; @@ -450,8 +436,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ z?: number; @@ -482,8 +467,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ centerX?: number; @@ -514,8 +498,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ centerY?: number; @@ -542,8 +525,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ angle?: number; } @@ -556,8 +538,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface Point { @@ -568,8 +549,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ x: number; @@ -580,8 +560,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ y: number; } @@ -593,8 +572,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface PolyToPolyOptions { @@ -605,8 +583,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ src: Array; @@ -617,8 +594,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ srcIndex?: number; @@ -629,8 +605,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ dst:Array; @@ -642,8 +617,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ dstIndex?: number; @@ -657,8 +631,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pointCount?:number; @@ -685,10 +658,9 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export interface Matrix4Transit { + interface Matrix4Transit { /** * Copy function of Matrix, which can copy a copy of the current matrix object. * @@ -711,8 +683,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ copy(): Matrix4Transit; @@ -738,8 +709,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ invert(): Matrix4Transit; @@ -768,8 +738,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ combine(options: Matrix4Transit): Matrix4Transit; @@ -798,8 +767,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ translate(options: TranslateOption): Matrix4Transit; @@ -828,8 +796,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scale(options: ScaleOption): Matrix4Transit; @@ -842,8 +809,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ skew(x: number, y: number): Matrix4Transit; @@ -872,8 +838,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ rotate(options: RotateOption): Matrix4Transit; @@ -902,8 +867,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ transformPoint(options: [number, number]): [number, number]; @@ -915,11 +879,9 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setPolyToPoly(options: PolyToPolyOptions): Matrix4Transit - } /** @@ -1012,8 +974,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ function init( options: [ @@ -1058,8 +1019,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ function identity(): Matrix4Transit; diff --git a/api/@ohos.matrix4.static.d.ets b/api/@ohos.matrix4.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..555733ea86b26d7d4da676f517d9f52645669739 --- /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 4df04ccd50f063a9bf987b413ed4ba8aba399d4f..7639a07ca3dd40e35ee13e23620198961b3b5c3e 100644 --- a/api/@ohos.measure.d.ts +++ b/api/@ohos.measure.d.ts @@ -18,12 +18,6 @@ * @kit ArkUI */ -/*** if arkts 1.2 */ -import { FontStyle, FontWeight, TextAlign, TextOverflow, TextCase, WordBreak } from './arkui/component/enums' -import { SizeOptions } from './arkui/component/units'; -import { Resource } from './global/resource' -/*** endif */ - /** * Defines the options of MeasureText. * @@ -46,8 +40,7 @@ import { Resource } from './global/resource' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface MeasureOptions { /** @@ -71,8 +64,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textContent: string | Resource; @@ -90,8 +82,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ constraintWidth?: number | string | Resource; @@ -109,8 +100,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontSize?: number | string | Resource; @@ -128,8 +118,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontStyle?: number | FontStyle; @@ -147,8 +136,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontWeight?: number | string | FontWeight; @@ -166,8 +154,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ fontFamily?: string | Resource; @@ -185,8 +172,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ letterSpacing?: number | string; @@ -204,8 +190,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textAlign?: number | TextAlign; @@ -223,8 +208,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ overflow?: number | TextOverflow; @@ -242,8 +226,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ maxLines?: number; @@ -261,8 +244,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ lineHeight?: number | string | Resource; @@ -280,8 +262,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ baselineOffset?: number | string; @@ -299,8 +280,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textCase?: number | TextCase; @@ -319,8 +299,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ textIndent?: number | string; @@ -339,8 +318,7 @@ export interface MeasureOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ wordBreak?: WordBreak; } 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..bdb4f3a5b93691fb0c2a503f7086e6efd3527abe 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,376 +28,189 @@ 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; + /** * 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 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ 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 + * @since 20 */ 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 + * @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; + /** * 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 + * @since 20 */ 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 + * @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; + + /** * 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 + * @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.mediaquery.d.ts b/api/@ohos.mediaquery.d.ts index 16540d063afab82db2b618c99e1ffbc50b0d4f21..eea1e126235de20fe746504523c520a9bae251c5 100644 --- a/api/@ohos.mediaquery.d.ts +++ b/api/@ohos.mediaquery.d.ts @@ -18,13 +18,7 @@ * @kit ArkUI */ -/*** if arkts 1.1 */ import { Callback } from './@ohos.base'; -/*** endif */ - -/*** if arkts 1.2 */ -import { Callback } from './@ohos.base'; -/*** endif */ /** * Used to do mediaquery operations. @@ -58,8 +52,7 @@ import { Callback } from './@ohos.base'; * @crossplatform * @form * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ declare namespace mediaquery { @@ -95,8 +88,7 @@ declare namespace mediaquery { * @crossplatform * @form * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ interface MediaQueryResult { /** @@ -139,8 +131,7 @@ declare namespace mediaquery { * @crossplatform * @form * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ readonly matches: boolean; @@ -184,8 +175,7 @@ declare namespace mediaquery { * @crossplatform * @form * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ readonly media: string; } @@ -226,8 +216,7 @@ declare namespace mediaquery { * @crossplatform * @form * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ interface MediaQueryListener extends MediaQueryResult { /** @@ -270,8 +259,7 @@ declare namespace mediaquery { * @crossplatform * @form * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'change', callback: Callback): void; @@ -315,8 +303,7 @@ declare namespace mediaquery { * @crossplatform * @form * @atomicservice - * @since arkts { '1.1':'12','1.2':'20' } - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'change', callback?: Callback): void; } diff --git a/api/@ohos.mediaquery.static.d.ets b/api/@ohos.mediaquery.static.d.ets new file mode 100644 index 0000000000000000000000000000000000000000..3f0d0c7d307c6d229d662232ec23f4db26ece82e --- /dev/null +++ b/api/@ohos.mediaquery.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 + * @kit ArkUI + * @arkts 1.2 + */ + +import { Callback } from './@ohos.base'; + +/** + * Used to do mediaquery operations. + * + * @namespace mediaquery + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ +declare namespace mediaquery { + + /** + * Defines the Result of mediaquery. + * + * @interface MediaQueryResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + export interface MediaQueryResult { + + /** + * Whether the match condition is met. + * This parameter is read-only. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + readonly matches: boolean; + + /** + * Matching condition of a media event. + * This parameter is read-only. + * + * @type { string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + readonly media: string; + } + + /** + * Defines the Listener of mediaquery. + * + * @interface MediaQueryListener + * @extends MediaQueryResult + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + 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 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 media attributes chang. + * + * @param { 'change' } type + * @param { Callback } callback + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 20 + */ + 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 20 + */ + export function matchMediaSync(condition: string): MediaQueryListener; +} + +export default mediaquery; diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index 8b0980542e330ef7c5ed5e8070665ab414c23ce1..2ba5050dd82d04563523d4255bf8e37e8ef81c67 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -5313,6 +5313,7 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi * @since 20 + * @arkts 1.1&1.2 */ on(type: 'activeVolumeTypeChange', callback: Callback): void; @@ -5326,6 +5327,7 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi * @since 20 + * @arkts 1.1&1.2 */ off(type: 'activeVolumeTypeChange', callback?: Callback): void; @@ -5402,6 +5404,7 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi * @since 20 + * @arkts 1.1&1.2 */ on(type: 'systemVolumeChange', callback: Callback): void; @@ -5415,6 +5418,7 @@ declare namespace audio { * @syscap SystemCapability.Multimedia.Audio.Volume * @systemapi * @since 20 + * @arkts 1.1&1.2 */ off(type: 'systemVolumeChange', callback?: Callback): void; @@ -5514,6 +5518,7 @@ declare namespace audio { * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 20 + * @arkts 1.1&1.2 */ on(type: 'streamVolumeChange', streamUsage: StreamUsage, callback: Callback): void; @@ -5525,6 +5530,7 @@ declare namespace audio { * If there is no callback parameter, all callbacks will be unregistered. * @syscap SystemCapability.Multimedia.Audio.Volume * @since 20 + * @arkts 1.1&1.2 */ off(type: 'streamVolumeChange', callback?: Callback): void; } @@ -7642,6 +7648,7 @@ declare namespace audio { * @typedef StreamVolumeEvent * @syscap SystemCapability.Multimedia.Audio.Volume * @since 20 + * @arkts 1.1&1.2 */ interface StreamVolumeEvent { /** @@ -7649,20 +7656,23 @@ declare namespace audio { * @type { StreamUsage } * @syscap SystemCapability.Multimedia.Audio.Volume * @since 20 + * @arkts 1.1&1.2 */ streamUsage: StreamUsage; /** * Volume level. - * @type { number } + * @type { int } * @syscap SystemCapability.Multimedia.Audio.Volume * @since 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 20 + * @arkts 1.1&1.2 */ updateUi: boolean; } diff --git a/api/@ohos.multimedia.avsession.d.ts b/api/@ohos.multimedia.avsession.d.ts index 6ad3e24f29bff0b0030b8283aff39f1a02972de5..142c9518492fa4b8fb78ef452c57cc3b4a1c34a3 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'; @@ -1036,6 +1036,7 @@ declare namespace avSession { * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi * @since 20 + * @arkts 1.1&1.2 */ interface DeviceState { /** @@ -1045,38 +1046,42 @@ declare namespace avSession { * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi * @since 20 + * @arkts 1.1&1.2 */ readonly deviceId: string; /** * Device connection state. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - readonly deviceState: number; + readonly deviceState: int; /** * Reason for connection failure, for example, user cancellation and timeout. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - readonly reasonCode: number; + readonly reasonCode: int; /** * System radar error code returned by cast+services. - * @type { number } + * @type { int } * @readonly * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi * @since 20 + * @arkts 1.1&1.2 */ - readonly radarErrorCode: number; + readonly radarErrorCode: int; } /** @@ -1090,6 +1095,7 @@ declare namespace avSession { * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function on(type: 'deviceStateChanged', callback: Callback): void; @@ -1103,6 +1109,7 @@ declare namespace avSession { * @syscap SystemCapability.Multimedia.AVSession.AVCast * @systemapi * @since 20 + * @arkts 1.1&1.2 */ function off(type: 'deviceStateChanged', callback?: Callback): void; @@ -7835,9 +7842,9 @@ 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 @@ -7847,17 +7854,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 + */ + /** + * 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 arkts { '1.1':'12','1.2':'20'} + * @since 20 * @arkts 1.1&1.2 */ - off(type: 'activeStateChange', callback?: (isActive: boolean) => void); + off(type: 'activeStateChange', callback?: (isActive: boolean) => void): void; /** * Register the valid commands of the session changed callback @@ -8298,12 +8316,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'; diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts index a8d27470139d527f40b57b4ab97abdd095d7dace..a5b1a2336eeb24724809d9bdec0b51a6d1a1b812 100644 --- a/api/@ohos.multimedia.camera.d.ts +++ b/api/@ohos.multimedia.camera.d.ts @@ -475,6 +475,41 @@ declare namespace camera { readonly supportedMetadataObjectTypes: Array; } + /** + * Control center status info. + * + * @typedef ControlCenterStatusInfo + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + interface ControlCenterStatusInfo { + /** + * Control center effect type. + * + * @type { ControlCenterEffectType } + * @readonly + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + readonly effectType: ControlCenterEffectType; + + /** + * If effect type is active. + * + * @type { boolean } + * @readonly + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + readonly isActive: boolean; + } + /** * Enum for camera error code. * @@ -1017,14 +1052,13 @@ declare namespace camera { * @permission ohos.permission.CAMERA * @param { CameraDevice } camera - Camera device used to create the instance. * @returns { CameraInput } Returns a CameraInput instance. Failure of an interface call returns the corresponding - * error code, which is of type CameraErrorCode. + * error code, which is of type CameraErrorCode. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400102 - Operation not allowed. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ createCameraInput(camera: CameraDevice): CameraInput; @@ -1057,23 +1091,69 @@ declare namespace camera { * * @permission ohos.permission.CAMERA * @param { CameraPosition } position - Camera position, first get the supported camera device - * objects through the getSupportedCameras interface, and then get the device position information - * based on the returned camera device objects. + * objects through the getSupportedCameras interface, and then get the device position information + * based on the returned camera device objects. * @param { CameraType } type - camera type, first get the supported camera device object through - * the getSupportedCameras interface, then get the device type information based on the returned - * camera device object. + * the getSupportedCameras interface, then get the device type information based on the returned + * camera device object. * @returns { CameraInput } Returns a CameraInput instance. Failure of an interface call returns - * the corresponding error code, which is of type CameraErrorCode. + * the corresponding error code, which is of type CameraErrorCode. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400102 - Operation not allowed. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ createCameraInput(position: CameraPosition, type: CameraType): CameraInput; + /** + * @since 20 + * @arkts 1.2 + */ + overload createCameraInput { createCameraInputWithCamera, createCameraInputWithPositionType }; + + /** + * Creates a CameraInput instance by camera. + * + * Before using this interface, first through the getSupportedCameras interface to query the current list of camera + * devices supported by the device, the developer needs to be based on specific scenarios to choose the camera device + * that meets the needs of the developer, and then use this interface to create a CameraInput instance. + * + * @permission ohos.permission.CAMERA + * @param { CameraDevice } camera - Camera device used to create the instance. + * @returns { CameraInput } Returns a CameraInput instance. Failure of an interface call returns the corresponding + * error code, which is of type CameraErrorCode. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + createCameraInputWithCamera(camera: CameraDevice): CameraInput; + + /** + * Creates a CameraInput instance by camera position and type. + * + * @permission ohos.permission.CAMERA + * @param { CameraPosition } position - Camera position, first get the supported camera device + * objects through the getSupportedCameras interface, and then get the device position information + * based on the returned camera device objects. + * @param { CameraType } type - camera type, first get the supported camera device object through + * the getSupportedCameras interface, then get the device type information based on the returned + * camera device object. + * @returns { CameraInput } Returns a CameraInput instance. Failure of an interface call returns + * the corresponding error code, which is of type CameraErrorCode. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + createCameraInputWithPositionType(position: CameraPosition, type: CameraType): CameraInput; + /** * Creates a PreviewOutput instance. * @@ -1099,15 +1179,14 @@ declare namespace camera { * Creates a PreviewOutput instance. * * @param { Profile } profile - Supported preview configuration information, - * obtained through the getSupportedOutputCapability API. + * obtained through the getSupportedOutputCapability API. * @param { string } surfaceId - Surface object id used in camera photo output. * @returns { PreviewOutput } The PreviewOutput instance. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ createPreviewOutput(profile: Profile, surfaceId: string): PreviewOutput; @@ -1134,11 +1213,46 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ createPreviewOutput(surfaceId: string): PreviewOutput; + /** + * @since 20 + * @arkts 1.2 + */ + overload createPreviewOutput { createPreviewOutputWithProfileSurfaceId, createPreviewOutputWithSurfaceId }; + + /** + * Creates a PreviewOutput instance. + * + * @param { Profile } profile - Supported preview configuration information, + * obtained through the getSupportedOutputCapability API. + * @param { string } surfaceId - Surface object id used in camera photo output. + * @returns { PreviewOutput } The PreviewOutput instance. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + createPreviewOutputWithProfileSurfaceId(profile: Profile, surfaceId: string): PreviewOutput; + + /** + * Creates a PreviewOutput instance without profile. + * You can use this method to create a preview output instance without a profile, This instance can + * only be used in a preconfiged session. + * + * @param { string } surfaceId - Surface object id used in camera preview output. + * @returns { PreviewOutput } The PreviewOutput instance. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + createPreviewOutputWithSurfaceId(surfaceId: string): PreviewOutput; + /** * Creates a PhotoOutput instance. * @@ -1224,15 +1338,14 @@ declare namespace camera { * Creates a VideoOutput instance. * * @param { VideoProfile } profile - Supported recording configuration information, - * obtained through the getSupportedOutputCapability API. + * obtained through the getSupportedOutputCapability API. * @param { string } surfaceId - Surface object id used in camera video output. * @returns { VideoOutput } The VideoOutput instance. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ createVideoOutput(profile: VideoProfile, surfaceId: string): VideoOutput; @@ -1259,11 +1372,46 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ createVideoOutput(surfaceId: string): VideoOutput; + /** + * @since 20 + * @arkts 1.2 + */ + overload createVideoOutput { createVideoOutputWithProfileSurfaceId, createVideoOutputWithSurfaceId }; + + /** + * Creates a VideoOutput instance. + * + * @param { VideoProfile } profile - Supported recording configuration information, + * obtained through the getSupportedOutputCapability API. + * @param { string } surfaceId - Surface object id used in camera video output. + * @returns { VideoOutput } The VideoOutput instance. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + createVideoOutputWithProfileSurfaceId(profile: VideoProfile, surfaceId: string): VideoOutput; + + /** + * Creates a VideoOutput instance without profile. + * You can use this method to create a video output instance without a profile, This instance can + * only be used in a preconfiged session. + * + * @param { string } surfaceId - Surface object id used in camera video output. + * @returns { VideoOutput } The VideoOutput instance. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + createVideoOutputWithSurfaceId(surfaceId: string): VideoOutput; + /** * Creates a MetadataOutput instance. * @@ -1373,7 +1521,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; @@ -1396,7 +1545,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; @@ -1419,8 +1569,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the camera status change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'cameraStatus', callback: AsyncCallback): void; @@ -1439,8 +1588,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the camera status change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'cameraStatus', callback?: AsyncCallback): void; @@ -1462,8 +1610,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the fold status change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'foldStatusChange', callback: AsyncCallback): void; @@ -1482,8 +1629,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the fold status change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'foldStatusChange', callback?: AsyncCallback): void; @@ -1504,8 +1650,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'cameraMute', callback: AsyncCallback): void; @@ -1526,11 +1671,34 @@ declare namespace camera { * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'cameraMute', callback?: AsyncCallback): void; + /** + * Subscribes control center status change event callback. + * + * @param { 'controlCenterStatusChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the control center status change. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + */ + on(type: 'controlCenterStatusChange', callback: AsyncCallback): void; + + /** + * Unsubscribes control center status change event callback. + * + * @param { 'controlCenterStatusChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the control center status change. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + */ + off(type: 'controlCenterStatusChange', callback?: AsyncCallback): void; + /** * Determines whether the camera device supports prelaunch. * This function must be called in prior to the setPrelaunchConfig and prelaunch functions. @@ -1771,8 +1939,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the torch status change * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'torchStatusChange', callback: AsyncCallback): void; @@ -1791,90 +1958,232 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the torch status change * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'torchStatusChange', callback?: AsyncCallback): void; - } - /** - * Torch status info. - * - * @typedef TorchStatusInfo - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 11 - */ - /** - * Torch status info. - * - * @typedef TorchStatusInfo - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 - */ - interface TorchStatusInfo { /** - * is torch available + * @since 20 + * @arkts 1.2 + */ + overload on { onCameraStatus, onFoldStatusChange, onCameraMute, onTorchStatusChange, + onControlCenterStatusChange }; + + /** + * Camera state callback to get the state change of the camera by registering a callback + * function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @type { boolean } - * @readonly + * @param { 'cameraStatus' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the camera status change. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 11 + * @since 20 + * @arkts 1.2 */ + onCameraStatus(type: 'cameraStatus', callback: AsyncCallback): void; + /** - * is torch available + * Registers a listener for fold state changes. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @type { boolean } - * @readonly + * @param { 'foldStatusChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the fold status change. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - readonly isTorchAvailable: boolean; + onFoldStatusChange(type: 'foldStatusChange', callback: AsyncCallback): void; /** - * is torch active + * Subscribes camera mute change event callback. * - * @type { boolean } - * @readonly + * @param { 'cameraMute' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the camera mute change. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 11 + * @systemapi + * @since 20 + * @arkts 1.2 */ + onCameraMute(type: 'cameraMute', callback: AsyncCallback): void; + /** - * Whether the flashlight is activated or not. True means the flashlight is activated, false means the flashlight - * is not activated. + * Registers a listener for flashlight state changes to get flashlight state change by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @type { boolean } - * @readonly + * @param { 'torchStatusChange' } type - Event type + * @param { AsyncCallback } callback - Callback used to return the torch status change * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - readonly isTorchActive: boolean; + onTorchStatusChange(type: 'torchStatusChange', callback: AsyncCallback): void; /** - * the current torch brightness level. + * Subscribes control center status change event callback. * - * @type { double } - * @readonly + * @param { 'controlCenterStatusChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the control center status change. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 11 + * @systemapi + * @since 20 + * @arkts 1.2 */ + onControlCenterStatusChange(type: 'controlCenterStatusChange', callback: AsyncCallback): void; + /** - * Flashlight brightness level, value range is [0,1], the closer to 1, the brighter it is. + * @since 20 + * @arkts 1.2 + */ + overload off { offCameraStatus, offFoldStatusChange, offCameraMute, offTorchStatusChange, + offControlCenterStatusChange }; + + /** + * Unsubscribes from camera status change event callback. * - * @type { double } - * @readonly + * @param { 'cameraStatus' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the camera status change. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - readonly torchLevel: double; - } + offCameraStatus(type: 'cameraStatus', callback?: AsyncCallback): void; + + /** + * Unsubscribes from fold status change event callback. + * + * @param { 'foldStatusChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the fold status change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offFoldStatusChange(type: 'foldStatusChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from camera mute change event callback. + * + * @param { 'cameraMute' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the camera mute change. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offCameraMute(type: 'cameraMute', callback?: AsyncCallback): void; + + /** + * Unsubscribes torch status change event callback. + * + * @param { 'torchStatusChange' } type - Event type + * @param { AsyncCallback } [callback] - Callback used to return the torch status change + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offTorchStatusChange(type: 'torchStatusChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes control center status change event callback. + * + * @param { 'controlCenterStatusChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the control center status change. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offControlCenterStatusChange(type: 'controlCenterStatusChange', callback?: AsyncCallback): void; + } + + /** + * Torch status info. + * + * @typedef TorchStatusInfo + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 11 + */ + /** + * Torch status info. + * + * @typedef TorchStatusInfo + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + interface TorchStatusInfo { + /** + * is torch available + * + * @type { boolean } + * @readonly + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 11 + */ + /** + * is torch available + * + * @type { boolean } + * @readonly + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + readonly isTorchAvailable: boolean; + + /** + * is torch active + * + * @type { boolean } + * @readonly + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 11 + */ + /** + * Whether the flashlight is activated or not. True means the flashlight is activated, false means the flashlight + * is not activated. + * + * @type { boolean } + * @readonly + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + readonly isTorchActive: boolean; + + /** + * the current torch brightness level. + * + * @type { double } + * @readonly + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 11 + */ + /** + * Flashlight brightness level, value range is [0,1], the closer to 1, the brighter it is. + * + * @type { double } + * @readonly + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + readonly torchLevel: double; + } /** * Enum for torch mode. @@ -2727,8 +3036,7 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ open(callback: AsyncCallback): void; @@ -2753,8 +3061,7 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ open(): Promise; @@ -2773,15 +3080,15 @@ declare namespace camera { * Open camera. * * @param { boolean } isSecureEnabled - Setting true enables the camera to be opened in a safe way, - * setting false does the opposite. Failure of an interface call returns an error code of type CameraErrorCode. + * setting false does the opposite. Failure of an interface call returns an error code of type + * CameraErrorCode. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 7400107 - Can not use camera cause of conflict. * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ open(isSecureEnabled: boolean): Promise; @@ -2812,6 +3119,71 @@ declare namespace camera { */ open(type: CameraConcurrentType): Promise; + /** + * @since 20 + * @arkts 1.2 + */ + overload open { openWithCallback, openReturnsPromise, openWithisSecureEnabledReturnsPromiseofBigint, + openWithCameraConcurrentTypeReturnsPromise }; + + /** + * Open camera. + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400107 - Can not use camera cause of conflict. + * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + openWithCallback(callback: AsyncCallback): void; + + /** + * Open camera. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @throws { BusinessError } 7400107 - Can not use camera cause of conflict. + * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + openReturnsPromise(): Promise; + + /** + * Open camera. + * + * @param { boolean } isSecureEnabled - Setting true enables the camera to be opened in a safe way, + * setting false does the opposite. Failure of an interface call returns an error code of type + * CameraErrorCode. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400107 - Can not use camera cause of conflict. + * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + openWithisSecureEnabledReturnsPromiseofBigint(isSecureEnabled: boolean): Promise; + + /** + * Open camera with specified concurrent type. + * + * @param { CameraConcurrentType } type - Camera concurrent type. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @throws { BusinessError } 7400107 - Can not use camera cause of conflict. + * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + openWithCameraConcurrentTypeReturnsPromise(type: CameraConcurrentType): Promise; + /** * Close camera. * @@ -2827,8 +3199,7 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ close(callback: AsyncCallback): void; @@ -2847,11 +3218,38 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ close(): Promise; + /** + * @since 20 + * @arkts 1.2 + */ + overload close { closeWithCallback, closeReturnsPromise }; + + /** + * Close camera. + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + closeWithCallback(callback: AsyncCallback): void; + + /** + * Close camera. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + closeReturnsPromise(): Promise; + /** * Delay close camera. * @@ -2888,8 +3286,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the camera input errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'error', camera: CameraDevice, callback: ErrorCallback): void; @@ -2910,8 +3307,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the camera input errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'error', camera: CameraDevice, callback?: ErrorCallback): void; @@ -2923,8 +3319,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'cameraOcclusionDetection', callback: AsyncCallback): void; @@ -2936,11 +3331,76 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'cameraOcclusionDetection', callback?: AsyncCallback): void; + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onCameraOcclusionDetection }; + + /** + * Registers a listener for CameraInput error events to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + * @param { 'error' } type - Event type. + * @param { CameraDevice } camera - Camera device. + * @param { ErrorCallback } callback - Callback used to get the camera input errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onError(type: 'error', camera: CameraDevice, callback: ErrorCallback): void; + + /** + * Subscribes to camera occlusion detection results. + * + * @param { 'cameraOcclusionDetection' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get detection results. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onCameraOcclusionDetection(type: 'cameraOcclusionDetection', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offCameraOcclusionDetection }; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { CameraDevice } camera - Camera device. + * @param { ErrorCallback } [callback] - Callback used to get the camera input errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', camera: CameraDevice, callback?: ErrorCallback): void; + + /** + * Unsubscribes from camera occlusion detection results. + * + * @param { 'cameraOcclusionDetection' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get detection results. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offCameraOcclusionDetection(type: 'cameraOcclusionDetection', callback?: AsyncCallback): void; + /** * Sets the camera to be used as a camera at the specified position. * @@ -2950,7 +3410,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; @@ -5109,14 +5570,37 @@ declare namespace camera { } /** - * Zoom query object. + * Zoom info object * - * @interface ZoomQuery + * @typedef ZoomInfo * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 + * @systemapi + * @since 20 + * @arkts 1.1&1.2 */ - /** - * Zoom query object. + interface ZoomInfo { + /** + * Zoom ratio range value. + * + * @type { ?Array } + * @readonly + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + readonly zoomRatioRange?: Array; + } + + /** + * Zoom query object. + * + * @interface ZoomQuery + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 12 + */ + /** + * Zoom query object. * * @interface ZoomQuery * @syscap SystemCapability.Multimedia.Camera.Core @@ -5866,6 +6350,36 @@ declare namespace camera { */ BLACK_WHITE = 3 } + + /** + * Enumerates the control center effect types. + * + * @enum { int } + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + enum ControlCenterEffectType { + /** + * Beauty type. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + BEAUTY = 0, + /** + * Portrait type. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + PORTRAIT = 1 + } /** * Enum for policy type @@ -6409,8 +6923,7 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ commitConfig(callback: AsyncCallback): void; @@ -6431,11 +6944,40 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ commitConfig(): Promise; + /** + * @since 20 + * @arkts 1.2 + */ + overload commitConfig {commitConfigWithCallback, commitConfigReturnsPromise }; + + /** + * Commit capture session config. + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + commitConfigWithCallback(callback: AsyncCallback): void; + + /** + * Commit capture session config. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + commitConfigReturnsPromise(): Promise; + /** * Determines whether the camera input can be added into the session. * This method is valid between Session.beginConfig() and Session.commitConfig(). @@ -6704,8 +7246,7 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ start(callback: AsyncCallback): void; @@ -6737,11 +7278,42 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ start(): Promise; + /** + * @since 20 + * @arkts 1.2 + */ + overload start { startWithCallback, startReturnsPromise }; + + /** + * Starts capture session. + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @throws { BusinessError } 7400103 - Session not config. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + startWithCallback(callback: AsyncCallback): void; + + /** + * Starts capture session. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @throws { BusinessError } 7400103 - Session not config. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + startReturnsPromise(): Promise; + /** * Stops capture session. * @@ -6757,8 +7329,7 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ stop(callback: AsyncCallback): void; @@ -6777,11 +7348,38 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ stop(): Promise; + /** + * @since 20 + * @arkts 1.2 + */ + overload stop { stopWithCallback, stopReturnsPromise }; + + /** + * Stops capture session. + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + stopWithCallback(callback: AsyncCallback): void; + + /** + * Stops capture session. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + stopReturnsPromise(): Promise; + /** * Release capture session instance. * @@ -6797,8 +7395,7 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ release(callback: AsyncCallback): void; @@ -6817,11 +7414,38 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ release(): Promise; + /** + * @since 20 + * @arkts 1.2 + */ + overload release { releaseWithCallback, releaseReturnsPromise }; + + /** + * Release capture session instance. + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + releaseWithCallback(callback: AsyncCallback): void; + + /** + * Release capture session instance. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + releaseReturnsPromise(): Promise; + /** * Set usage for the capture session. * @@ -7908,8 +8532,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'error', callback: ErrorCallback): void; @@ -7928,8 +8551,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'error', callback?: ErrorCallback): void; @@ -7952,8 +8574,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -7972,8 +8593,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -7996,8 +8616,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -8016,8 +8635,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -8029,8 +8647,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ on(type: 'macroStatusChanged', callback: AsyncCallback): void; @@ -8042,8 +8659,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ off(type: 'macroStatusChanged', callback?: AsyncCallback): void; @@ -8056,8 +8672,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'featureDetection', featureType: SceneFeatureType, callback: AsyncCallback): void; @@ -8070,8 +8685,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'featureDetection', featureType: SceneFeatureType, callback?: AsyncCallback): void; @@ -8082,8 +8696,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'effectSuggestionChange', callback: AsyncCallback): void; @@ -8094,8 +8707,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'effectSuggestionChange', callback?: AsyncCallback): void; @@ -8118,8 +8730,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'autoDeviceSwitchStatusChange', callback: AsyncCallback): void; @@ -8138,8 +8749,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'autoDeviceSwitchStatusChange', callback?: AsyncCallback): void; @@ -8151,8 +8761,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'lcdFlashStatus', callback: AsyncCallback): void; @@ -8164,37 +8773,305 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'lcdFlashStatus', callback?: AsyncCallback): void; /** - * Gets session functions. + * Subscribes to system pressure level event callback. * - * @param { CameraOutputCapability } outputCapability - CameraOutputCapability to set. - * @returns { Array } List of session functions. - * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. + * @param { 'systemPressureLevelChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @atomicservice + * @since 20 */ - getSessionFunctions(outputCapability: CameraOutputCapability): Array; + on(type: 'systemPressureLevelChange', callback: AsyncCallback): void; /** - * Gets session conflict functions. + * Unsubscribes to system pressure level event callback. * - * @returns { Array } List of session conflict functions. + * @param { 'systemPressureLevelChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + off(type: 'systemPressureLevelChange', callback?: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onFocusStateChange, onSmoothZoomInfoAvailable, onMacroStatusChanged, onFeatureDetection, + onEffectSuggestionChange, onAutoDeviceSwitchStatusChange, onLcdFlashStatus, onSystemPressureLevelChange }; + + /** + * Registers a listener for error events from a normal video session to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onError(type: 'error', callback: ErrorCallback): void; + + /** + * Registers a listener for camera focus state changes to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * Registers a listener for state changes in the camera's smooth zoom to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; + + /** + * Subscribes camera macro status event callback. + * + * @param { 'macroStatusChanged' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - getSessionConflictFunctions(): Array; - } + onMacroStatusChanged(type: 'macroStatusChanged', callback: AsyncCallback): void; + + /** + * Subscribes to feature detection results. + * + * @param { 'featureDetection' } type - Event type. + * @param { SceneFeatureType } featureType - Feature type. + * @param { AsyncCallback } callback - Callback used to get the detection result. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onFeatureDetection(type: 'featureDetection', featureType: SceneFeatureType, callback: AsyncCallback): void; + + /** + * Subscribes to effect suggestion event callback. + * + * @param { 'effectSuggestionChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onEffectSuggestionChange(type: 'effectSuggestionChange', callback: AsyncCallback): void; + + /** + * Registers a listener for the camera's automatic lens switching state changes to get the result + * by registering a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + * @param { 'autoDeviceSwitchStatusChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onAutoDeviceSwitchStatusChange(type: 'autoDeviceSwitchStatusChange', callback: AsyncCallback): void; + + /** + * Subscribes to lcd flash status. + * + * @param { 'lcdFlashStatus' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the lcd flash status. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onLcdFlashStatus(type: 'lcdFlashStatus', callback: AsyncCallback): void; + + /** + * Subscribes to system pressure level event callback. + * + * @param { 'systemPressureLevelChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onSystemPressureLevelChange(type: 'systemPressureLevelChange', + callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offFocusStateChange, offSmoothZoomInfoAvailable, offMacroStatusChanged, + offFeatureDetection, offEffectSuggestionChange, offAutoDeviceSwitchStatusChange, offLcdFlashStatus, + offSystemPressureLevelChange }; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the zoom info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + + /** + * Unsubscribes camera macro status event callback. + * + * @param { 'macroStatusChanged' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offMacroStatusChanged(type: 'macroStatusChanged', callback?: AsyncCallback): void; + + /** + * Unsubscribes from feature detection result. + * + * @param { 'featureDetection' } type - Event type. + * @param { SceneFeatureType } featureType - Feature type. + * @param { AsyncCallback } [callback] - Callback used to get the detection result. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offFeatureDetection(type: 'featureDetection', featureType: SceneFeatureType, callback?: AsyncCallback): void; + + /** + * Unsubscribes from effect suggestion event callback. + * + * @param { 'effectSuggestionChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offEffectSuggestionChange(type: 'effectSuggestionChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes to auto device switch status event callback. + * + * @param { 'autoDeviceSwitchStatusChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offAutoDeviceSwitchStatusChange(type: 'autoDeviceSwitchStatusChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from lcd flash status. + * + * @param { 'lcdFlashStatus' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the lcd flash status. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offLcdFlashStatus(type: 'lcdFlashStatus', callback?: AsyncCallback): void; + + /** + * Unsubscribes to system pressure level event callback. + * + * @param { 'systemPressureLevelChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offSystemPressureLevelChange(type: 'systemPressureLevelChange', + callback?: AsyncCallback): void; + + /** + * Gets session functions. + * + * @param { CameraOutputCapability } outputCapability - CameraOutputCapability to set. + * @returns { Array } List of session functions. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 + */ + getSessionFunctions(outputCapability: CameraOutputCapability): Array; + + /** + * Gets session conflict functions. + * + * @returns { Array } List of session conflict functions. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 + */ + getSessionConflictFunctions(): Array; + } /** * Video session object used by the system camera. @@ -8386,8 +9263,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'error', callback: ErrorCallback): void; @@ -8406,8 +9282,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'error', callback?: ErrorCallback): void; @@ -8430,8 +9305,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -8450,8 +9324,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -8474,8 +9347,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -8494,8 +9366,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -8507,8 +9378,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ on(type: 'macroStatusChanged', callback: AsyncCallback): void; @@ -8520,8 +9390,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ off(type: 'macroStatusChanged', callback?: AsyncCallback): void; @@ -8533,8 +9402,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'lcdFlashStatus', callback: AsyncCallback): void; @@ -8546,8 +9414,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'lcdFlashStatus', callback?: AsyncCallback): void; @@ -8571,8 +9438,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'autoDeviceSwitchStatusChange', callback: AsyncCallback): void; @@ -8591,8 +9457,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'autoDeviceSwitchStatusChange', callback?: AsyncCallback): void; @@ -8604,8 +9469,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ on(type: 'focusTrackingInfoAvailable', callback: Callback): void; @@ -8617,8 +9481,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ off(type: 'focusTrackingInfoAvailable', callback?: Callback): void; @@ -8709,8 +9572,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ on(type: 'lightStatusChange', callback: AsyncCallback): void; @@ -8722,67 +9584,372 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ off(type: 'lightStatusChange', callback?: AsyncCallback): void; - } - /** - * Enum for the camera light status. - * - * @enum { int } - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - enum LightStatus { /** - * Sufficient lighting. + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onFocusStateChange, onSmoothZoomInfoAvailable, onMacroStatusChanged, onLcdFlashStatus, + onAutoDeviceSwitchStatusChange, onFocusTrackingInfoAvailable, onEffectSuggestionChange, onLightStatusChange }; + + /** + * Registers a listener for error events in normal photo sessions to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - NORMAL = 0, + onError(type: 'error', callback: ErrorCallback): void; /** - * Insufficient lighting. + * Registers a listener for error events in normal photo sessions to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - INSUFFICIENT = 1 - } + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; - /** - * Enumerates the camera portrait effects. - * - * @enum { int } - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 - */ - enum PortraitEffect { /** - * portrait effect off. + * Registers a listener for state changes in the camera's smooth zoom to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - OFF = 0, + onSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; /** - * circular blurring for portrait. + * Subscribes camera macro status event callback. * - * @syscap SystemCapability.Multimedia.Camera.Core + * @param { 'macroStatusChanged' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onMacroStatusChanged(type: 'macroStatusChanged', callback: AsyncCallback): void; + + /** + * Subscribes to lcd flash status. + * + * @param { 'lcdFlashStatus' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the lcd flash status. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onLcdFlashStatus(type: 'lcdFlashStatus', callback: AsyncCallback): void; + + /** + * Registers a listener for the camera's automatic lens switching state changes to get the + * result by registering a callback function. This API uses an asynchronous callback to + * return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + * @param { 'autoDeviceSwitchStatusChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onAutoDeviceSwitchStatusChange(type: 'autoDeviceSwitchStatusChange', + callback: AsyncCallback): void; + + /** + * Subscribes to focus tracking info event callback. + * + * @param { 'focusTrackingInfoAvailable' } type - Event type. + * @param { Callback } callback - Callback used to get the focus tracking info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onFocusTrackingInfoAvailable(type: 'focusTrackingInfoAvailable', callback: Callback): void; + + /** + * Subscribes to effect suggestion change events. + * @param { 'effectSuggestionChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 202 - Not System Application.[object Object] + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onEffectSuggestionChange(type: 'effectSuggestionChange', callback: AsyncCallback): void; + + /** + * Subscribes camera light status event callback. + * + * @param { 'lightStatusChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onLightStatusChange(type: 'lightStatusChange', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offFocusStateChange, offSmoothZoomInfoAvailable, offMacroStatusChanged, offLcdFlashStatus, + offAutoDeviceSwitchStatusChange, offFocusTrackingInfoAvailable, offEffectSuggestionChange, offLightStatusChange }; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the zoom info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + + /** + * Unsubscribes camera macro status event callback. + * + * @param { 'macroStatusChanged' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offMacroStatusChanged(type: 'macroStatusChanged', callback?: AsyncCallback): void; + + /** + * Unsubscribes from lcd flash status. + * + * @param { 'lcdFlashStatus' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the lcd flash status. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offLcdFlashStatus(type: 'lcdFlashStatus', callback?: AsyncCallback): void; + + /** + * Unsubscribes to auto device switch status event callback. + * + * @param { 'autoDeviceSwitchStatusChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offAutoDeviceSwitchStatusChange(type: 'autoDeviceSwitchStatusChange', + callback?: AsyncCallback): void; + + /** + * Unsubscribes from focus tracking info event callback. + * + * @param { 'focusTrackingInfoAvailable' } type - Event type. + * @param { Callback } [callback] - Callback used to get the focus tracking info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offFocusTrackingInfoAvailable(type: 'focusTrackingInfoAvailable', callback?: Callback): void; + + /** + * Unsubscribes from effect suggestion change events. + * @param { 'effectSuggestionChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @throws { BusinessError } 202 - Not System Application.[object Object] + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offEffectSuggestionChange(type: 'effectSuggestionChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes camera light status event callback. + * + * @param { 'lightStatusChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offLightStatusChange(type: 'lightStatusChange', callback?: AsyncCallback): void; + } + + /** + * Enumerates the system pressure levels of the current camera session. When the system pressure increases, + * you are advised to reduce the load of the current camera session. + * @enum { int } + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + enum SystemPressureLevel { + /** + * Normal level. This level indicates that the system pressure is normal. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + SYSTEM_PRESSURE_NORMAL = 0, + + /** + * Low level. This level indicates that the system pressure is slightly increased. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + SYSTEM_PRESSURE_MILD = 1, + + /** + * Severity level. This level indicates that the system pressure is severely increased. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + SYSTEM_PRESSURE_SEVERE = 2, + + /** + * Critical level. This level indicates that the system pressure has reached a critical threshold. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + SYSTEM_PRESSURE_CRITICAL = 3, + + /** + * Shutdown level. This level indicates that the system pressure is fatal, and the camera session will be + * shut down soon. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + * @arkts 1.1&1.2 + */ + SYSTEM_PRESSURE_SHUTDOWN = 4 + } + + /** + * Enum for the camera light status. + * + * @enum { int } + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + enum LightStatus { + /** + * Sufficient lighting. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + NORMAL = 0, + + /** + * Insufficient lighting. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + INSUFFICIENT = 1 + } + + /** + * Enumerates the camera portrait effects. + * + * @enum { int } + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + enum PortraitEffect { + /** + * portrait effect off. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'10','1.2':'20'} + * @arkts 1.1&1.2 + */ + OFF = 0, + + /** + * circular blurring for portrait. + * + * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 @@ -9142,8 +10309,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ on(type: 'error', callback: ErrorCallback): void; @@ -9154,8 +10320,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ off(type: 'error', callback?: ErrorCallback): void; @@ -9166,8 +10331,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -9178,8 +10342,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -9190,8 +10353,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -9202,8 +10364,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -9215,8 +10376,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'lcdFlashStatus', callback: AsyncCallback): void; @@ -9228,16 +10388,125 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'lcdFlashStatus', callback?: AsyncCallback): void; /** - * Gets session functions. + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onFocusStateChange, onSmoothZoomInfoAvailable, onLcdFlashStatus }; + + /** + * Subscribes to error events. * - * @param { CameraOutputCapability } outputCapability - CameraOutputCapability to set. - * @returns { Array } List of session functions. + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onError(type: 'error', callback: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * Subscribes zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; + + /** + * Subscribes to lcd flash status. + * + * @param { 'lcdFlashStatus' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the lcd flash status. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onLcdFlashStatus(type: 'lcdFlashStatus', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offFocusStateChange, offSmoothZoomInfoAvailable, offLcdFlashStatus }; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the zoom info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + + /** + * Unsubscribes from lcd flash status. + * + * @param { 'lcdFlashStatus' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the lcd flash status. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offLcdFlashStatus(type: 'lcdFlashStatus', callback?: AsyncCallback): void; + + /** + * Gets session functions. + * + * @param { CameraOutputCapability } outputCapability - CameraOutputCapability to set. + * @returns { Array } List of session functions. * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. 2.Incorrect parameter types. * @syscap SystemCapability.Multimedia.Camera.Core @@ -9279,8 +10548,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'error', callback: ErrorCallback): void; @@ -9292,8 +10560,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'error', callback?: ErrorCallback): void; @@ -9305,8 +10572,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -9318,8 +10584,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -9331,8 +10596,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -9344,10 +10608,99 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onFocusStateChange, onSmoothZoomInfoAvailable }; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onError(type: 'error', callback: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * Subscribes zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offFocusStateChange, offSmoothZoomInfoAvailable }; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the zoom info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; } /** @@ -9464,8 +10817,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ on(type: 'error', callback: ErrorCallback): void; @@ -9476,8 +10828,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ off(type: 'error', callback?: ErrorCallback): void; @@ -9488,8 +10839,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -9500,8 +10850,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -9512,8 +10861,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -9524,8 +10872,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -9537,8 +10884,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'lcdFlashStatus', callback: AsyncCallback): void; @@ -9550,10 +10896,119 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'lcdFlashStatus', callback?: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onFocusStateChange, onSmoothZoomInfoAvailable, onLcdFlashStatus }; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onError(type: 'error', callback: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * Subscribes zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; + + /** + * Subscribes to lcd flash status. + * + * @param { 'lcdFlashStatus' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the lcd flash status. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onLcdFlashStatus(type: 'lcdFlashStatus', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offFocusStateChange, offSmoothZoomInfoAvailable, offLcdFlashStatus }; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the zoom info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + + /** + * Unsubscribes from lcd flash status. + * + * @param { 'lcdFlashStatus' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the lcd flash status. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offLcdFlashStatus(type: 'lcdFlashStatus', callback?: AsyncCallback): void; } /** @@ -9666,8 +11121,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'error', callback: ErrorCallback): void; @@ -9679,8 +11133,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'error', callback?: ErrorCallback): void; @@ -9692,8 +11145,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -9705,8 +11157,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -9718,8 +11169,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -9731,8 +11181,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -9744,8 +11193,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'isoInfoChange', callback: AsyncCallback): void; @@ -9757,8 +11205,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'isoInfoChange', callback?: AsyncCallback): void; @@ -9770,8 +11217,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'exposureInfoChange', callback: AsyncCallback): void; @@ -9783,8 +11229,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'exposureInfoChange', callback?: AsyncCallback): void; @@ -9796,8 +11241,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'apertureInfoChange', callback: AsyncCallback): void; @@ -9809,8 +11253,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'apertureInfoChange', callback?: AsyncCallback): void; @@ -9822,8 +11265,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'luminationInfoChange', callback: AsyncCallback): void; @@ -9835,10 +11277,185 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'luminationInfoChange', callback?: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onFocusStateChange, onSmoothZoomInfoAvailable, onIsoInfoChange, onExposureInfoChange, + onApertureInfoChange, onLuminationInfoChange }; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onError(type: 'error', callback: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * Subscribes zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; + + /** + * Subscribes ISO info event callback. + * + * @param { 'isoInfoChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the ISO info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onIsoInfoChange(type: 'isoInfoChange', callback: AsyncCallback): void; + + /** + * Subscribes exposure info event callback. + * + * @param { 'exposureInfoChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the exposure info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onExposureInfoChange(type: 'exposureInfoChange', callback: AsyncCallback): void; + + /** + * Subscribes aperture info event callback. + * + * @param { 'apertureInfoChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the aperture info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onApertureInfoChange(type: 'apertureInfoChange', callback: AsyncCallback): void; + + /** + * Subscribes lumination info event callback. + * + * @param { 'luminationInfoChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the lumination info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onLuminationInfoChange(type: 'luminationInfoChange', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offFocusStateChange, offSmoothZoomInfoAvailable, offIsoInfoChange, offExposureInfoChange, + offApertureInfoChange, offLuminationInfoChange }; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the zoom info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + + /** + * Unsubscribes from ISO info event callback. + * + * @param { 'isoInfoChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the ISO info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offIsoInfoChange(type: 'isoInfoChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from exposure info event callback. + * + * @param { 'exposureInfoChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the exposure info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offExposureInfoChange(type: 'exposureInfoChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from aperture info event callback. + * + * @param { 'apertureInfoChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the aperture info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offApertureInfoChange(type: 'apertureInfoChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from lumination info event callback. + * + * @param { 'luminationInfoChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the lumination info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offLuminationInfoChange(type: 'luminationInfoChange', callback?: AsyncCallback): void; } /** @@ -9860,8 +11477,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'error', callback: ErrorCallback): void; @@ -9873,8 +11489,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'error', callback?: ErrorCallback): void; @@ -9886,8 +11501,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -9899,8 +11513,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -9912,8 +11525,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -9925,8 +11537,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -9938,8 +11549,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'isoInfoChange', callback: AsyncCallback): void; @@ -9951,8 +11561,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'isoInfoChange', callback?: AsyncCallback): void; @@ -9964,8 +11573,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'exposureInfoChange', callback: AsyncCallback): void; @@ -9977,8 +11585,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'exposureInfoChange', callback?: AsyncCallback): void; @@ -9990,8 +11597,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'apertureInfoChange', callback: AsyncCallback): void; @@ -10003,8 +11609,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'apertureInfoChange', callback?: AsyncCallback): void; @@ -10016,8 +11621,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'luminationInfoChange', callback: AsyncCallback): void; @@ -10029,69 +11633,244 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'luminationInfoChange', callback?: AsyncCallback): void; - } - /** - * Enum for slow motion status. - * - * @enum { int } - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - enum SlowMotionStatus { /** - * Slow motion disabled. + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onFocusStateChange, onSmoothZoomInfoAvailable, onIsoInfoChange, onExposureInfoChange, + onApertureInfoChange, onLuminationInfoChange }; + + /** + * Subscribes to error events. * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - DISABLED = 0, + onError(type: 'error', callback: ErrorCallback): void; /** - * Slow motion ready. + * Subscribes focus state change event callback. * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - READY = 1, + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; /** - * Slow motion video start. + * Subscribes zoom info event callback. * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - VIDEO_START = 2, + onSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; /** - * Slow motion video done. + * Subscribes ISO info event callback. * + * @param { 'isoInfoChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the ISO info. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - VIDEO_DONE = 3, + onIsoInfoChange(type: 'isoInfoChange', callback: AsyncCallback): void; /** - * Slow motion finished. + * Subscribes exposure info event callback. * + * @param { 'exposureInfoChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the exposure info. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 + */ + onExposureInfoChange(type: 'exposureInfoChange', callback: AsyncCallback): void; + + /** + * Subscribes aperture info event callback. + * + * @param { 'apertureInfoChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the aperture info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onApertureInfoChange(type: 'apertureInfoChange', callback: AsyncCallback): void; + + /** + * Subscribes lumination info event callback. + * + * @param { 'luminationInfoChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the lumination info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onLuminationInfoChange(type: 'luminationInfoChange', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offFocusStateChange, offSmoothZoomInfoAvailable, offIsoInfoChange, offExposureInfoChange, + offApertureInfoChange, offLuminationInfoChange }; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the zoom info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + + /** + * Unsubscribes from ISO info event callback. + * + * @param { 'isoInfoChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the ISO info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offIsoInfoChange(type: 'isoInfoChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from exposure info event callback. + * + * @param { 'exposureInfoChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the exposure info. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offExposureInfoChange(type: 'exposureInfoChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from aperture info event callback. + * + * @param { 'apertureInfoChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the aperture info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offApertureInfoChange(type: 'apertureInfoChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from lumination info event callback. + * + * @param { 'luminationInfoChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the lumination info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offLuminationInfoChange(type: 'luminationInfoChange', callback?: AsyncCallback): void; + } + + /** + * Enum for slow motion status. + * + * @enum { int } + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + enum SlowMotionStatus { + /** + * Slow motion disabled. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + DISABLED = 0, + + /** + * Slow motion ready. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + READY = 1, + + /** + * Slow motion video start. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + VIDEO_START = 2, + + /** + * Slow motion video done. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + VIDEO_DONE = 3, + + /** + * Slow motion finished. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ FINISHED = 4 } @@ -10115,8 +11894,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'error', callback: ErrorCallback): void; @@ -10128,8 +11906,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'error', callback?: ErrorCallback): void; @@ -10141,8 +11918,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10154,8 +11930,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -10167,8 +11942,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -10180,8 +11954,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; @@ -10238,8 +12011,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'slowMotionStatus', callback: AsyncCallback): void; @@ -10251,48 +12023,28 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'slowMotionStatus', callback?: AsyncCallback): void; - } - /** - * High resolution session object. - * - * @extends Session, AutoExposure, Focus - * @interface HighResolutionPhotoSession - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - interface HighResolutionPhotoSession extends Session, AutoExposure, Focus { /** - * Subscribes to error events. - * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the capture session errors. - * @throws { BusinessError } 202 - Not System Application. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'error', callback: ErrorCallback): void; + overload on { onError, onFocusStateChange, onSmoothZoomInfoAvailable, onSlowMotionStatus }; /** - * Unsubscribes from error events. + * Subscribes to error events. * * @param { 'error' } type - Event type. * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - off(type: 'error', callback?: ErrorCallback): void; + onError(type: 'error', callback: ErrorCallback): void; /** * Subscribes focus state change event callback. @@ -10302,153 +12054,107 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'focusStateChange', callback: AsyncCallback): void; + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; /** - * Unsubscribes from focus state change event callback. + * Subscribes zoom info event callback. * - * @param { 'focusStateChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - off(type: 'focusStateChange', callback?: AsyncCallback): void; - } + onSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; - /** - * Macro photo session object. - * - * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus - * @interface MacroPhotoSession - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 12 - */ - /** - * Macro photo session object. - * - * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, DepthFusion - * @interface MacroPhotoSession - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 14 - */ - /** - * Macro photo session object. - * - * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, DepthFusion, ColorManagement - * @interface MacroPhotoSession - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @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 { /** - * Subscribes to error events. + * Subscribes slow motion status callback. * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @param { 'slowMotionStatus' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the slow motion status. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'error', callback: ErrorCallback): void; + onSlowMotionStatus(type: 'slowMotionStatus', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offFocusStateChange, offSmoothZoomInfoAvailable, offSlowMotionStatus }; /** * Unsubscribes from error events. * * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - off(type: 'error', callback?: ErrorCallback): void; + offError(type: 'error', callback?: ErrorCallback): void; /** - * Subscribes focus state change event callback. + * Unsubscribes from focus state change event callback. * * @param { 'focusStateChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'focusStateChange', callback: AsyncCallback): void; + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; /** - * Unsubscribes from focus state change event callback. + * Unsubscribes from zoom info event callback. * - * @param { 'focusStateChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the zoom info. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - off(type: 'focusStateChange', callback?: AsyncCallback): void; - - /** - * Subscribes zoom info event callback. - * - * @param { 'smoothZoomInfoAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the zoom info. - * @throws { BusinessError } 202 - Not System Application. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; + offSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; /** - * Unsubscribes from zoom info event callback. + * Unsubscribes slow motion status callback. * - * @param { 'smoothZoomInfoAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @param { 'slowMotionStatus' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the slow motion status. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + offSlowMotionStatus(type: 'slowMotionStatus', callback?: AsyncCallback): void; } /** - * Macro video session object. - * - * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus - * @interface MacroVideoSession - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 12 - */ - /** - * Macro video session object. + * High resolution session object. * - * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, ColorManagement - * @interface MacroVideoSession + * @extends Session, AutoExposure, Focus + * @interface HighResolutionPhotoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - interface MacroVideoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, ColorManagement { + interface HighResolutionPhotoSession extends Session, AutoExposure, Focus { /** * Subscribes to error events. * @@ -10457,8 +12163,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'error', callback: ErrorCallback): void; @@ -10470,8 +12175,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'error', callback?: ErrorCallback): void; @@ -10483,8 +12187,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10496,198 +12199,104 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; /** - * Subscribes zoom info event callback. - * - * @param { 'smoothZoomInfoAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the zoom info. - * @throws { BusinessError } 202 - Not System Application. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; + overload on { onError, onFocusStateChange }; /** - * Unsubscribes from zoom info event callback. + * Subscribes to error events. * - * @param { 'smoothZoomInfoAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; - } + onError(type: 'error', callback: ErrorCallback): void; - /** - * Secure camera session object. - * - * @extends Session, Flash, AutoExposure, Focus, Zoom - * @interface SecureSession - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 - */ - /** - * Secure camera session object. - * - * @extends Session, Flash, AutoExposure, Focus, Zoom - * @interface SecureSession - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 19 - */ - /** - * Secure camera session object. - * - * @extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom - * @interface SecureSession - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'20','1.2':'20'} - * @arkts 1.1&1.2 - */ - interface SecureSession extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom { - /** - * Add Secure output for camera. - * - * @param { PreviewOutput } previewOutput - Specify the output as a secure flow. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400102 - Operation not allowed. - * @throws { BusinessError } 7400103 - Session not config. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 - */ - /** - * Preview output is marked as secure out put by this interface. - * - * @param { PreviewOutput } previewOutput - Specify the output as a secure flow. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400102 - Operation not allowed. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 18 - */ /** - * Add Secure output for camera. + * Subscribes focus state change event callback. * - * @param { PreviewOutput } previewOutput - Specify the output as a secure flow. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400102 - Operation not allowed. + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @systemapi + * @since 20 + * @arkts 1.2 */ - addSecureOutput(previewOutput: PreviewOutput): void; + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; /** - * Subscribes to error events. - * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the capture session errors. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 - */ - /** - * Registers a listener for error events on security camera sessions to get the result by registering - * a callback function. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). - * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the capture session errors. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'error', callback: ErrorCallback): void; + overload off { offError, offFocusStateChange }; /** * Unsubscribes from error events. * * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the capture session errors. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 - */ - /** - * Unsubscribes from error events. - * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the capture session errors. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 - */ - off(type: 'error', callback?: ErrorCallback): void; - - /** - * Subscribes focus status change event callback. - * - * @param { 'focusStateChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the focus state change. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 - */ - /** - * Registers a listener for error events on security camera sessions to get the result by registering - * a callback function. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). - * - * @param { 'focusStateChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @systemapi + * @since 20 + * @arkts 1.2 */ - on(type: 'focusStateChange', callback: AsyncCallback): void; + offError(type: 'error', callback?: ErrorCallback): void; /** - * Unsubscribes from focus status change event callback. - * - * @param { 'focusStateChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the focus state change. - * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 - */ - /** - * Unsubscribes from focus status change event callback. + * Unsubscribes from focus state change event callback. * * @param { 'focusStateChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @systemapi + * @since 20 + * @arkts 1.2 */ - off(type: 'focusStateChange', callback?: AsyncCallback): void; + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; } /** - * Light painting photo session object. + * Macro photo session object. * - * @extends Session, Flash, Focus, Zoom, ColorEffect - * @interface LightPaintingPhotoSession + * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus + * @interface MacroPhotoSession * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} + * @since 12 + */ + /** + * Macro photo session object. + * + * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, DepthFusion + * @interface MacroPhotoSession + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 14 + */ + /** + * Macro photo session object. + * + * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, DepthFusion, ColorManagement + * @interface MacroPhotoSession + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ - interface LightPaintingPhotoSession extends Session, Flash, Focus, Zoom, ColorEffect { + interface MacroPhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, DepthFusion, ColorManagement { /** * Subscribes to error events. * @@ -10696,8 +12305,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'error', callback: ErrorCallback): void; @@ -10709,8 +12317,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'error', callback?: ErrorCallback): void; @@ -10722,8 +12329,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10735,8 +12341,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -10748,8 +12353,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -10761,114 +12365,144 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; /** - * Gets the light painting type in use. + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onFocusStateChange, onSmoothZoomInfoAvailable }; + + /** + * Subscribes to error events. * - * @returns { LightPaintingType } The light painting type in use. + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - getLightPaintingType(): LightPaintingType; + onError(type: 'error', callback: ErrorCallback): void; /** - * Sets a light painting type for a camera device. + * Subscribes focus state change event callback. * - * @param { LightPaintingType } type - Light painting type to set. + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. * @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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - setLightPaintingType(type: LightPaintingType): void; + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; /** - * Gets supported light painting types. + * Subscribes zoom info event callback. * - * @returns { Array } List of light painting types. + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - getSupportedLightPaintingTypes(): Array; - } + onSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; - /** - * Quick shot photo session object. - * - * @extends Session, AutoExposure, ColorEffect, ColorManagement, EffectSuggestion, Flash, Focus, Zoom - * @interface QuickShotPhotoSession - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - interface QuickShotPhotoSession extends Session, AutoExposure, ColorEffect, ColorManagement, EffectSuggestion, Flash, Focus, Zoom { /** - * Subscribes to error events. + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offFocusStateChange, offSmoothZoomInfoAvailable }; + + /** + * Unsubscribes from error events. * * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'error', callback: ErrorCallback): void; + offError(type: 'error', callback?: ErrorCallback): void; /** - * Unsubscribes from error events. + * Unsubscribes from focus state change event callback. * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - off(type: 'error', callback?: ErrorCallback): void; + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; /** - * Subscribes to effect suggestion event callback. + * Unsubscribes from zoom info event callback. * - * @param { 'effectSuggestionChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the zoom info. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'effectSuggestionChange', callback: AsyncCallback): void; + offSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + } + /** + * Macro video session object. + * + * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus + * @interface MacroVideoSession + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + /** + * Macro video session object. + * + * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, ColorManagement + * @interface MacroVideoSession + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 + */ + interface MacroVideoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorEffect, ManualFocus, ColorManagement { /** - * Unsubscribes from effect suggestion event callback. + * Subscribes to error events. * - * @param { 'effectSuggestionChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - off(type: 'effectSuggestionChange', callback?: AsyncCallback): void; + on(type: 'error', callback: ErrorCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + off(type: 'error', callback?: ErrorCallback): void; /** * Subscribes focus state change event callback. @@ -10878,8 +12512,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -10891,8 +12524,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -10904,8 +12536,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; @@ -10917,48 +12548,28 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; - } - /** - * Panorama photo session object. - * - * @extends Session, Focus, AutoExposure, WhiteBalance, ColorEffect - * @interface PanoramaPhotoSession - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - interface PanoramaPhotoSession extends Session, Focus, AutoExposure, WhiteBalance, ColorEffect { /** - * Subscribes to error events. - * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the capture session errors. - * @throws { BusinessError } 202 - Not System Application. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'error', callback: ErrorCallback): void; + overload on { onError, onFocusStateChange, onSmoothZoomInfoAvailable }; /** - * Unsubscribes from error events. + * Subscribes to error events. * * @param { 'error' } type - Event type. * @param { ErrorCallback } callback - Callback used to get the capture session errors. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - off(type: 'error', callback?: ErrorCallback): void; + onError(type: 'error', callback: ErrorCallback): void; /** * Subscribes focus state change event callback. @@ -10968,139 +12579,1011 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'focusStateChange', callback: AsyncCallback): void; + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; /** - * Unsubscribes from focus state change event callback. + * Subscribes zoom info event callback. * - * @param { 'focusStateChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - off(type: 'focusStateChange', callback?: AsyncCallback): void; - } + onSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; - /** - * Fluorescence photo session object. - * - * @extends Session, AutoExposure, Focus, Zoom - * @interface FluorescencePhotoSession - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 - */ - interface FluorescencePhotoSession extends Session, AutoExposure, Focus, Zoom { /** - * Subscribes to error events. - * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the capture session errors. - * @throws { BusinessError } 202 - Not System Application. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'error', callback: ErrorCallback): void; + overload off { offError, offFocusStateChange, offSmoothZoomInfoAvailable }; /** * Unsubscribes from error events. * * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - off(type: 'error', callback?: ErrorCallback): void; + offError(type: 'error', callback?: ErrorCallback): void; /** - * Subscribes focus state change event callback. + * Unsubscribes from focus state change event callback. * * @param { 'focusStateChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'focusStateChange', callback: AsyncCallback): void; + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; /** - * Unsubscribes from focus state change event callback. + * Unsubscribes from zoom info event callback. * - * @param { 'focusStateChange' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the zoom info. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - off(type: 'focusStateChange', callback?: AsyncCallback): void; - } - - /** - * Photo Functions object. - * - * @extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery - * @interface PhotoFunctions - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @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 { + offSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; } /** - * Video Functions object. + * Secure camera session object. * - * @extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, StabilizationQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery - * @interface VideoFunctions + * @extends Session, Flash, AutoExposure, Focus, Zoom + * @interface SecureSession * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ - interface VideoFunctions extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, StabilizationQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery { - } - /** - * Portrait Photo Functions object. + * Secure camera session object. * - * @extends FlashQuery, AutoExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, PortraitQuery, ApertureQuery, SceneDetectionQuery - * @interface PortraitPhotoFunctions + * @extends Session, Flash, AutoExposure, Focus, Zoom + * @interface SecureSession * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @atomicservice + * @since 19 */ - interface PortraitPhotoFunctions extends FlashQuery, AutoExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, PortraitQuery, ApertureQuery, SceneDetectionQuery { - } - /** - * Photo Conflict Functions object. + * Secure camera session object. * - * @extends ZoomQuery, MacroQuery - * @interface PhotoConflictFunctions + * @extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom + * @interface SecureSession * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} + * @atomicservice + * @since arkts {'1.1':'20','1.2':'20'} * @arkts 1.1&1.2 */ - interface PhotoConflictFunctions extends ZoomQuery, MacroQuery { + interface SecureSession extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom { + /** + * Add Secure output for camera. + * + * @param { PreviewOutput } previewOutput - Specify the output as a secure flow. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @throws { BusinessError } 7400103 - Session not config. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 12 + */ + /** + * Preview output is marked as secure out put by this interface. + * + * @param { PreviewOutput } previewOutput - Specify the output as a secure flow. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 18 + */ + /** + * Add Secure output for camera. + * + * @param { PreviewOutput } previewOutput - Specify the output as a secure flow. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 + */ + addSecureOutput(previewOutput: PreviewOutput): void; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 12 + */ + /** + * Registers a listener for error events on security camera sessions to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + on(type: 'error', callback: ErrorCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 12 + */ + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + off(type: 'error', callback?: ErrorCallback): void; + + /** + * Subscribes focus status change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 12 + */ + /** + * Registers a listener for error events on security camera sessions to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + on(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * Unsubscribes from focus status change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 12 + */ + /** + * Unsubscribes from focus status change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + off(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onFocusStateChange }; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onError(type: 'error', callback: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offFocusStateChange }; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; + } + + /** + * Light painting photo session object. + * + * @extends Session, Flash, Focus, Zoom, ColorEffect + * @interface LightPaintingPhotoSession + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + interface LightPaintingPhotoSession extends Session, Flash, Focus, Zoom, ColorEffect { + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + on(type: 'error', callback: ErrorCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + off(type: 'error', callback?: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + on(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + off(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Subscribes zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; + + /** + * Unsubscribes from zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onFocusStateChange, onSmoothZoomInfoAvailable }; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onError(type: 'error', callback: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * Subscribes zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offFocusStateChange, offSmoothZoomInfoAvailable }; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the zoom info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + + /** + * Gets the light painting type in use. + * + * @returns { LightPaintingType } The light painting type in use. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400103 - Session not config. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + getLightPaintingType(): LightPaintingType; + + /** + * Sets a light painting type for a camera device. + * + * @param { LightPaintingType } type - Light painting type to set. + * @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 arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + setLightPaintingType(type: LightPaintingType): void; + + /** + * Gets supported light painting types. + * + * @returns { Array } List of light painting types. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400103 - Session not config. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + getSupportedLightPaintingTypes(): Array; + } + + /** + * Quick shot photo session object. + * + * @extends Session, AutoExposure, ColorEffect, ColorManagement, EffectSuggestion, Flash, Focus, Zoom + * @interface QuickShotPhotoSession + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + interface QuickShotPhotoSession extends Session, AutoExposure, ColorEffect, ColorManagement, EffectSuggestion, Flash, Focus, Zoom { + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + on(type: 'error', callback: ErrorCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + off(type: 'error', callback?: ErrorCallback): void; + + /** + * Subscribes to effect suggestion event callback. + * + * @param { 'effectSuggestionChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + on(type: 'effectSuggestionChange', callback: AsyncCallback): void; + + /** + * Unsubscribes from effect suggestion event callback. + * + * @param { 'effectSuggestionChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + off(type: 'effectSuggestionChange', callback?: AsyncCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + on(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + off(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Subscribes zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + on(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; + + /** + * Unsubscribes from zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + off(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onEffectSuggestionChange, onFocusStateChange, onSmoothZoomInfoAvailable }; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onError(type: 'error', callback: ErrorCallback): void; + + /** + * Subscribes to effect suggestion event callback. + * + * @param { 'effectSuggestionChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onEffectSuggestionChange(type: 'effectSuggestionChange', callback: AsyncCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * Subscribes zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the zoom info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offEffectSuggestionChange, offFocusStateChange, offSmoothZoomInfoAvailable }; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', callback?: ErrorCallback): void; + + /** + * Unsubscribes from effect suggestion event callback. + * + * @param { 'effectSuggestionChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offEffectSuggestionChange(type: 'effectSuggestionChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from zoom info event callback. + * + * @param { 'smoothZoomInfoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the zoom info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offSmoothZoomInfoAvailable(type: 'smoothZoomInfoAvailable', callback?: AsyncCallback): void; + } + + /** + * Panorama photo session object. + * + * @extends Session, Focus, AutoExposure, WhiteBalance, ColorEffect + * @interface PanoramaPhotoSession + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + interface PanoramaPhotoSession extends Session, Focus, AutoExposure, WhiteBalance, ColorEffect { + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + on(type: 'error', callback: ErrorCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + off(type: 'error', callback?: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + on(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 12 + */ + off(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onFocusStateChange }; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onError(type: 'error', callback: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offFocusStateChange }; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; + } + + /** + * Fluorescence photo session object. + * + * @extends Session, AutoExposure, Focus, Zoom + * @interface FluorescencePhotoSession + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 + */ + interface FluorescencePhotoSession extends Session, AutoExposure, Focus, Zoom { + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 13 + */ + on(type: 'error', callback: ErrorCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 13 + */ + off(type: 'error', callback?: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 13 + */ + on(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 13 + */ + off(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onFocusStateChange }; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onError(type: 'error', callback: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offFocusStateChange }; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; + } + + /** + * Photo Functions object. + * + * @extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery + * @interface PhotoFunctions + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @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 { + } + + /** + * Video Functions object. + * + * @extends FlashQuery, AutoExposureQuery, ManualExposureQuery, FocusQuery, ZoomQuery, StabilizationQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, MacroQuery, SceneDetectionQuery + * @interface VideoFunctions + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @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 { + } + + /** + * Portrait Photo Functions object. + * + * @extends FlashQuery, AutoExposureQuery, FocusQuery, ZoomQuery, BeautyQuery, ColorEffectQuery, ColorManagementQuery, PortraitQuery, ApertureQuery, SceneDetectionQuery + * @interface PortraitPhotoFunctions + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @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 { + } + + /** + * Photo Conflict Functions object. + * + * @extends ZoomQuery, MacroQuery + * @interface PhotoConflictFunctions + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 + */ + interface PhotoConflictFunctions extends ZoomQuery, MacroQuery { } /** @@ -11119,8 +13602,8 @@ declare namespace camera { /** * Portrait Photo Conflict Functions object. * - * @interface PortraitPhotoFunctions * @extends ZoomQuery, PortraitQuery, ApertureQuery + * @interface PortraitPhotoFunctions * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} @@ -11161,8 +13644,7 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ release(callback: AsyncCallback): void; @@ -11181,10 +13663,37 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ release(): Promise; + + /** + * @since 20 + * @arkts 1.2 + */ + overload release { releaseWithCallback, releaseReturnsPromise }; + + /** + * Release output instance. + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + releaseWithCallback(callback: AsyncCallback): void; + + /** + * Release output instance. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + releaseReturnsPromise(): Promise; } /** @@ -11305,8 +13814,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'frameStart', callback: AsyncCallback): void; @@ -11325,8 +13833,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'frameStart', callback?: AsyncCallback): void; @@ -11349,8 +13856,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'frameEnd', callback: AsyncCallback): void; @@ -11369,8 +13875,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'frameEnd', callback?: AsyncCallback): void; @@ -11393,8 +13898,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the preview output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'error', callback: ErrorCallback): void; @@ -11413,8 +13917,7 @@ declare namespace camera { * @param { ErrorCallback } callback - Callback used to get the preview output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'error', callback?: ErrorCallback): void; @@ -11650,24 +14153,138 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to sketch status data. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @systemapi + * @since 11 + */ + on(type: 'sketchStatusChanged', callback: AsyncCallback): void; + + /** + * Unsubscribes sketch status changed event callback. + * + * @param { 'sketchStatusChanged' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get sketch status data. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 11 + */ + off(type: 'sketchStatusChanged', callback?: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onFrameStart, onFrameEnd, onError, onSketchStatusChanged }; + + /** + * Registers a listener for the preview frame to start to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + * @param { 'frameStart' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onFrameStart(type: 'frameStart', callback: AsyncCallback): void; + + /** + * Registers a listener for the end of the preview frame to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + * @param { 'frameEnd' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onFrameEnd(type: 'frameEnd', callback: AsyncCallback): void; + + /** + * Registers a listener for error events on the preview output to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the preview output errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onError(type: 'error', callback: ErrorCallback): void; + + /** + * Subscribes sketch status changed event callback. + * + * @param { 'sketchStatusChanged' } type - Event type. + * @param { AsyncCallback } callback - Callback used to sketch status data. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onSketchStatusChanged(type: 'sketchStatusChanged', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offFrameStart, offFrameEnd, offError, offSketchStatusChanged }; + + /** + * Unsubscribes from frame start event callback. + * + * @param { 'frameStart' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offFrameStart(type: 'frameStart', callback?: AsyncCallback): void; + + /** + * Unsubscribes from frame end event callback. + * + * @param { 'frameEnd' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offFrameEnd(type: 'frameEnd', callback?: AsyncCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the preview output errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 */ - on(type: 'sketchStatusChanged', callback: AsyncCallback): void; + offError(type: 'error', callback?: ErrorCallback): void; /** * Unsubscribes sketch status changed event callback. * * @param { 'sketchStatusChanged' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get sketch status data. + * @param { AsyncCallback } [callback] - Callback used to get sketch status data. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - off(type: 'sketchStatusChanged', callback?: AsyncCallback): void; + offSketchStatusChanged(type: 'sketchStatusChanged', callback?: AsyncCallback): void; } /** @@ -12303,1062 +14920,1427 @@ declare namespace camera { */ interface PhotoOutput extends CameraOutput { /** - * Start capture output. + * Start capture output. + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 10 + */ + /** + * Start capture output. + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + capture(callback: AsyncCallback): void; + + /** + * Start capture output. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 10 + */ + /** + * Start capture output. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + capture(): Promise; + + /** + * Start capture output. + * + * @param { PhotoCaptureSetting } setting - Photo capture settings. + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 10 + */ + /** + * Start capture output. + * + * @param { PhotoCaptureSetting } setting - Photo capture settings. + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + capture(setting: PhotoCaptureSetting, callback: AsyncCallback): void; + + /** + * Start capture output. + * + * @param { PhotoCaptureSetting } setting - Photo capture settings. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 10 + */ + /** + * Start capture output. + * Remove optional param. + * + * @param { PhotoCaptureSetting } setting - Photo capture settings. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 11 + */ + /** + * Start capture output. + * Remove optional param. + * + * @param { PhotoCaptureSetting } setting - Photo capture settings. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + capture(setting: PhotoCaptureSetting): Promise; + + /** + * @since 20 + * @arkts 1.2 + */ + overload capture { captureWithCallback, captureReturnsPromise, captureWithSettingCallback, captureWithSettingReturnsPromise }; + + /** + * Start capture output. + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + captureWithCallback(callback: AsyncCallback): void; + + /** + * Start capture output. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + captureReturnsPromise(): Promise; + + /** + * Start capture output. + * + * @param { PhotoCaptureSetting } setting - Photo capture settings. + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + captureWithSettingCallback(setting: PhotoCaptureSetting, callback: AsyncCallback): void; + + /** + * Start capture output. + * Remove optional param. + * + * @param { PhotoCaptureSetting } setting - Photo capture settings. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + captureWithSettingReturnsPromise(setting: PhotoCaptureSetting): Promise; + + /** + * Start burst capture. + * + * @param { PhotoCaptureSetting } setting - Photo capture settings. + * @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 } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 + */ + burstCapture(setting: PhotoCaptureSetting): Promise; + + /** + * Confirm capture in Night mode or end burst capture. + * + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 11 + */ + confirmCapture(): void; + + /** + * Confirm if the raw image delivery is supported + * + * @returns { boolean } TRUE if the type of delivery image is support. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 + */ + isRawDeliverySupported(): boolean; + + /** + * Enable raw image image delivery. + * + * @param { boolean } enabled - Target state for raw image delivery. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 + */ + enableRawDelivery(enabled: boolean): void; + + /** + * Confirm if the deferred image delivery supported in the specific device. + * + * @param { DeferredDeliveryImageType } type - Type of delivery image. + * @returns { boolean } TRUE if the type of delivery image is support. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + isDeferredImageDeliverySupported(type: DeferredDeliveryImageType): boolean; + + /** + * Confirm if the deferred image delivery enabled. + * + * @param { DeferredDeliveryImageType } type - Type of delivery image. + * @returns { boolean } TRUE if the type of delivery image is enable. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + isDeferredImageDeliveryEnabled(type: DeferredDeliveryImageType): boolean; + + /** + * Sets the image type for deferred image delivery. + * + * @param { DeferredDeliveryImageType } type - Type of delivery image. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 + */ + deferImageDelivery(type: DeferredDeliveryImageType): void; + + /** + * Check if the depth data delivery is supported. * - * @param { AsyncCallback } callback - Callback used to return the result. + * @returns { boolean } TRUE if the type of delivery image is enabled. + * @throws { BusinessError } 202 - Not System Application. * @throws { BusinessError } 7400104 - Session not running. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ + isDepthDataDeliverySupported(): boolean; + /** - * Start capture output. + * Enable depth data delivery. * - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { boolean } enabled - Target state for depth data delivery. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400104 - Session not running. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - capture(callback: AsyncCallback): void; + enableDepthDataDelivery(enabled: boolean): void; /** - * Start capture output. + * Get supported moving photo video codec types. * - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400104 - Session not running. + * @returns { Array } An array of supported video codec types for moving photo. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 + * @since 13 */ /** - * Start capture output. + * Get supported moving photo video codec types. * - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400104 - Session not running. + * @returns { Array } An array of supported video codec types for moving photo. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ - capture(): Promise; + getSupportedMovingPhotoVideoCodecTypes(): Array; /** - * Start capture output. + * Sets codec type for moving photo, default to AVC. * - * @param { PhotoCaptureSetting } setting - Photo capture settings. - * @param { AsyncCallback } callback - Callback used to return the result. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400104 - Session not running. + * @param { VideoCodecType } codecType - Codec type for moving photo. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 + * @since 13 */ /** - * Start capture output. + * Sets codec type for moving photo, default to AVC. * - * @param { PhotoCaptureSetting } setting - Photo capture settings. - * @param { AsyncCallback } callback - Callback used to return the result. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400104 - Session not running. + * @param { VideoCodecType } codecType - Codec type for moving photo. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ - capture(setting: PhotoCaptureSetting, callback: AsyncCallback): void; + setMovingPhotoVideoCodecType(codecType: VideoCodecType): void; /** - * Start capture output. + * Subscribes photo available event callback. * - * @param { PhotoCaptureSetting } setting - Photo capture settings. - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400104 - Session not running. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'photoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the Photo. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 + * @since 11 */ /** - * Start capture output. - * Remove optional param. + * Registers a listener for full quality chart uploads to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @param { PhotoCaptureSetting } setting - Photo capture settings. - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400104 - Session not running. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'photoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the Photo. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + on(type: 'photoAvailable', callback: AsyncCallback): void; + + /** + * Unsubscribes photo available event callback. + * + * @param { 'photoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the Photo. * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 */ /** - * Start capture output. - * Remove optional param. + * Unsubscribes photo available event callback. * - * @param { PhotoCaptureSetting } setting - Photo capture settings. - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400104 - Session not running. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'photoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the Photo. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ - capture(setting: PhotoCaptureSetting): Promise; + off(type: 'photoAvailable', callback?: AsyncCallback): void; /** - * Start burst capture. + * Subscribes deferred photo proxy available event callback. * - * @param { PhotoCaptureSetting } setting - Photo capture settings. - * @returns { Promise } Promise used to return the result. + * @param { 'deferredPhotoProxyAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the DeferredPhotoProxy. * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400104 - Session not running. - * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - burstCapture(setting: PhotoCaptureSetting): Promise; + on(type: 'deferredPhotoProxyAvailable', callback: AsyncCallback): void; /** - * Confirm capture in Night mode or end burst capture. + * Unsubscribes deferred photo proxy available event callback. * + * @param { 'deferredPhotoProxyAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the DeferredPhotoProxy. * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400104 - Session not running. - * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since 11 */ - confirmCapture(): void; + off(type: 'deferredPhotoProxyAvailable', callback?: AsyncCallback): void; /** - * Confirm if the raw image delivery is supported + * Subscribes to photo asset event callback. * - * @returns { boolean } TRUE if the type of delivery image is support. - * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400104 - Session not running. - * @throws { BusinessError } 7400201 - Camera service fatal error. + *

This API processes deferred photo delivery data by quickly displaying low-quality images to give + * users the impression of faster photo capture, while also generating high-quality images to maintain the + * final output quality. For details about the design specifications, see {@link + * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-camera-shot2see}.

+ * @param { 'photoAssetAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the asset. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} + * @since 12 + */ + /** + * Registers a listener for photoAsset uploads to monitor the upload process. This API + * uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + *

This API processes deferred photo delivery data by quickly displaying low-quality images to give + * users the impression of faster photo capture, while also generating high-quality images to maintain the + * final output quality. For details about the design specifications, see {@link + * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-camera-shot2see}.

+ * @param { 'photoAssetAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the asset. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + on(type: 'photoAssetAvailable', callback: AsyncCallback): void; + + /** + * Unsubscribes photo asset event callback. + * + * @param { 'photoAssetAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the asset. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 12 + */ + /** + * Unsubscribes photo asset event callback. + * + * @param { 'photoAssetAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the asset. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + off(type: 'photoAssetAvailable', callback?: AsyncCallback): void; + + /** + * Check whether to support mirror photo. + * + * @returns { boolean } Is the mirror supported. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 10 + */ + /** + * Check whether to support mirror photo. + * + * @returns { boolean } Is the mirror supported. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ - isRawDeliverySupported(): boolean; + isMirrorSupported(): boolean; /** - * Enable raw image image delivery. + * Enable mirror for photo capture. * - * @param { boolean } enabled - Target state for raw image delivery. - * @throws { BusinessError } 202 - Not System Application. + * @param { boolean } enabled - enable photo mirror if TRUE. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400103 - Session not config. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ - enableRawDelivery(enabled: boolean): void; - /** - * Confirm if the deferred image delivery supported in the specific device. + * Whether to enable moving photo mirroring. + * + * Prior to invoking this interface, it is necessary to determine whether the moving + * photo function is supported through the isMovingPhotoSupported API and whether the + * photo mirroring function is supported through the isMirrorSupported API. * - * @param { DeferredDeliveryImageType } type - Type of delivery image. - * @returns { boolean } TRUE if the type of delivery image is support. - * @throws { BusinessError } 202 - Not System Application. + * @param { boolean } enabled - enable moving photo mirror if TRUE. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400104 - Session not running. + * @throws { BusinessError } 7400103 - Session not config. * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} + * @atomicservice + * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ - isDeferredImageDeliverySupported(type: DeferredDeliveryImageType): boolean; + enableMirror(enabled: boolean): void; + + /** + * Subscribes capture start event callback. + * + * @param { 'captureStart' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the capture ID. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 10 + * @deprecated since 11 + * @useinstead ohos.multimedia.camera.PhotoOutput#captureStartWithInfo + */ + on(type: 'captureStart', callback: AsyncCallback): void; + + /** + * Unsubscribes from capture start event callback. + * + * @param { 'captureStart' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the capture ID. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 10 + * @deprecated since 11 + * @useinstead ohos.multimedia.camera.PhotoOutput#captureStartWithInfo + */ + off(type: 'captureStart', callback?: AsyncCallback): void; /** - * Confirm if the deferred image delivery enabled. + * Subscribes capture start event callback. * - * @param { DeferredDeliveryImageType } type - Type of delivery image. - * @returns { boolean } TRUE if the type of delivery image is enable. - * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400104 - Session not running. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'captureStartWithInfo' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the capture start info. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - isDeferredImageDeliveryEnabled(type: DeferredDeliveryImageType): boolean; - /** - * Sets the image type for deferred image delivery. + * Registers a listener for the start of the photo taking to get the CaptureStartInfo by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @param { DeferredDeliveryImageType } type - Type of delivery image. - * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400104 - Session not running. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'captureStartWithInfo' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the capture start info. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @atomicservice + * @since 19 */ - deferImageDelivery(type: DeferredDeliveryImageType): void; + on(type: 'captureStartWithInfo', callback: AsyncCallback): void; /** - * Check if the depth data delivery is supported. + * Unsubscribes from capture start event callback. * - * @returns { boolean } TRUE if the type of delivery image is enabled. - * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400104 - Session not running. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'captureStartWithInfo' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the capture start info. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - isDepthDataDeliverySupported(): boolean; - /** - * Enable depth data delivery. + * Unsubscribes from capture start event callback. * - * @param { boolean } enabled - Target state for depth data delivery. - * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400104 - Session not running. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'captureStartWithInfo' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the capture start info. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @atomicservice + * @since 19 */ - enableDepthDataDelivery(enabled: boolean): void; + off(type: 'captureStartWithInfo', callback?: AsyncCallback): void; /** - * Get supported moving photo video codec types. + * Subscribes frame shutter event callback. * - * @returns { Array } An array of supported video codec types for moving photo. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'frameShutter' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the frame shutter information. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 13 + * @since 10 */ /** - * Get supported moving photo video codec types. + * Subscribes frame shutter event callback. * - * @returns { Array } An array of supported video codec types for moving photo. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'frameShutter' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the frame shutter information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ - getSupportedMovingPhotoVideoCodecTypes(): Array; + on(type: 'frameShutter', callback: AsyncCallback): void; /** - * Sets codec type for moving photo, default to AVC. + * Unsubscribes from frame shutter event callback. * - * @param { VideoCodecType } codecType - Codec type for moving photo. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'frameShutter' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the frame shutter information. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 13 + * @since 10 */ /** - * Sets codec type for moving photo, default to AVC. + * Unsubscribes from frame shutter event callback. * - * @param { VideoCodecType } codecType - Codec type for moving photo. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'frameShutter' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the frame shutter information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ - setMovingPhotoVideoCodecType(codecType: VideoCodecType): void; + off(type: 'frameShutter', callback?: AsyncCallback): void; /** - * Subscribes photo available event callback. + * Subscribes frame shutter end event callback. * - * @param { 'photoAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the Photo. + * @param { 'frameShutterEnd' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the frame shutter end information. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 11 + * @since 12 */ /** - * Registers a listener for full quality chart uploads to get the result by registering + * Registers a listener for the end of photo exposure capture to get the result by registering * a callback function. This API uses an asynchronous callback to return the result. * * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). + * within the callback method of on(). * - * @param { 'photoAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the Photo. + * @param { 'frameShutterEnd' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the frame shutter end information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ - on(type: 'photoAvailable', callback: AsyncCallback): void; + on(type: 'frameShutterEnd', callback: AsyncCallback): void; /** - * Unsubscribes photo available event callback. + * Unsubscribes from frame shutter end event callback. * - * @param { 'photoAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the Photo. + * @param { 'frameShutterEnd' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the frame shutter end information. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 11 + * @since 12 */ /** - * Unsubscribes photo available event callback. + * Unsubscribes from frame shutter end event callback. * - * @param { 'photoAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the Photo. + * @param { 'frameShutterEnd' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the frame shutter end information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ - off(type: 'photoAvailable', callback?: AsyncCallback): void; + off(type: 'frameShutterEnd', callback?: AsyncCallback): void; /** - * Subscribes deferred photo proxy available event callback. + * Subscribes capture end event callback. * - * @param { 'deferredPhotoProxyAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the DeferredPhotoProxy. - * @throws { BusinessError } 202 - Not System Application. + * @param { 'captureEnd' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the capture end information. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ - on(type: 'deferredPhotoProxyAvailable', callback: AsyncCallback): void; - /** - * Unsubscribes deferred photo proxy available event callback. + * Registers a listener for the end of the photo shoot to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @param { 'deferredPhotoProxyAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the DeferredPhotoProxy. - * @throws { BusinessError } 202 - Not System Application. + * @param { 'captureEnd' } type - Listens to the event, fixed to 'captureEnd', when photoOutput is + * created successfully. This event can be triggered when the photoOutput is created successfully. + * @param { AsyncCallback } callback - Callback used to get the capture end information. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @atomicservice + * @since 19 */ - off(type: 'deferredPhotoProxyAvailable', callback?: AsyncCallback): void; + on(type: 'captureEnd', callback: AsyncCallback): void; /** - * Subscribes to photo asset event callback. + * Unsubscribes from capture end event callback. * - *

This API processes deferred photo delivery data by quickly displaying low-quality images to give - * users the impression of faster photo capture, while also generating high-quality images to maintain the - * final output quality. For details about the design specifications, see {@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-camera-shot2see}.

- * @param { 'photoAssetAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the asset. + * @param { 'captureEnd' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the capture end information. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 + * @since 10 */ /** - * Registers a listener for photoAsset uploads to monitor the upload process. This API - * uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). + * Unsubscribes from capture end event callback. * - *

This API processes deferred photo delivery data by quickly displaying low-quality images to give - * users the impression of faster photo capture, while also generating high-quality images to maintain the - * final output quality. For details about the design specifications, see {@link - * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-camera-shot2see}.

- * @param { 'photoAssetAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the asset. + * @param { 'captureEnd' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the capture end information. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ - on(type: 'photoAssetAvailable', callback: AsyncCallback): void; + off(type: 'captureEnd', callback?: AsyncCallback): void; /** - * Unsubscribes photo asset event callback. + * Subscribes capture ready event callback. After receiving the callback, can proceed to the next capture * - * @param { 'photoAssetAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the asset. + * @param { 'captureReady' } type - Event type. + * @param { AsyncCallback } callback - Callback used to notice capture ready. * @syscap SystemCapability.Multimedia.Camera.Core * @since 12 */ /** - * Unsubscribes photo asset event callback. + * Registers a listener for the next available shot to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @param { 'photoAssetAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the asset. + * @param { 'captureReady' } type - Event type. + * @param { AsyncCallback } callback - Callback used to notice capture ready. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ - off(type: 'photoAssetAvailable', callback?: AsyncCallback): void; + on(type: 'captureReady', callback: AsyncCallback): void; /** - * Check whether to support mirror photo. + * Unsubscribes from capture ready event callback. * - * @returns { boolean } Is the mirror supported. + * @param { 'captureReady' } type - Event type. + * @param { AsyncCallback } callback - Callback used to notice capture ready. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 + * @since 12 */ /** - * Check whether to support mirror photo. + * Unsubscribes from capture ready event callback. * - * @returns { boolean } Is the mirror supported. + * @param { 'captureReady' } type - Event type. + * @param { AsyncCallback } callback - Callback used to notice capture ready. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ - isMirrorSupported(): boolean; + off(type: 'captureReady', callback?: AsyncCallback): void; /** - * Enable mirror for photo capture. + * Subscribes estimated capture duration event callback. * - * @param { boolean } enabled - enable photo mirror if TRUE. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400103 - Session not config. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'estimatedCaptureDuration' } type - Event type. + * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). * @syscap SystemCapability.Multimedia.Camera.Core - * @since 13 + * @since 12 */ /** - * Whether to enable moving photo mirroring. + * Registers a listener for the estimated time to take a picture to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. * - * Prior to invoking this interface, it is necessary to determine whether the moving - * photo function is supported through the isMovingPhotoSupported API and whether the - * photo mirroring function is supported through the isMirrorSupported API. + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @param { boolean } enabled - enable moving photo mirror if TRUE. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400103 - Session not config. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'estimatedCaptureDuration' } type - Event type. + * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ - enableMirror(enabled: boolean): void; + on(type: 'estimatedCaptureDuration', callback: AsyncCallback): void; /** - * Subscribes capture start event callback. + * Unsubscribes from estimated capture duration event callback. * - * @param { 'captureStart' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the capture ID. + * @param { 'estimatedCaptureDuration' } type - Event type. + * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 - * @deprecated since 11 - * @useinstead ohos.multimedia.camera.PhotoOutput#captureStartWithInfo + * @since 12 */ - on(type: 'captureStart', callback: AsyncCallback): void; - /** - * Unsubscribes from capture start event callback. + * Unsubscribes from estimated capture duration event callback. * - * @param { 'captureStart' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the capture ID. + * @param { 'estimatedCaptureDuration' } type - Event type. + * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 - * @deprecated since 11 - * @useinstead ohos.multimedia.camera.PhotoOutput#captureStartWithInfo + * @atomicservice + * @since 19 */ - off(type: 'captureStart', callback?: AsyncCallback): void; + off(type: 'estimatedCaptureDuration', callback?: AsyncCallback): void; /** - * Subscribes capture start event callback. + * Subscribes to error events. * - * @param { 'captureStartWithInfo' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the capture start info. + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the photo output errors. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 11 + * @since 10 */ /** - * Registers a listener for the start of the photo taking to get the CaptureStartInfo by registering + * Registers a listener for errors in the photo output to get the result by registering * a callback function. This API uses an asynchronous callback to return the result. * * Description: Currently, it is not allowed to use off() to unregister the callback * within the callback method of on(). * - * @param { 'captureStartWithInfo' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the capture start info. + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the photo output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ - on(type: 'captureStartWithInfo', callback: AsyncCallback): void; + on(type: 'error', callback: ErrorCallback): void; /** - * Unsubscribes from capture start event callback. + * Unsubscribes from error events. * - * @param { 'captureStartWithInfo' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the capture start info. + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the photo output errors. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 11 + * @since 10 */ /** - * Unsubscribes from capture start event callback. + * Unsubscribes from error events. * - * @param { 'captureStartWithInfo' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the capture start info. + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the photo output errors. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ - off(type: 'captureStartWithInfo', callback?: AsyncCallback): void; + off(type: 'error', callback?: ErrorCallback): void; /** - * Subscribes frame shutter event callback. + * Gets the current preconfig type if you had already call preconfig interface. * - * @param { 'frameShutter' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the frame shutter information. + * @returns { Profile } The current preconfig type. + * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 + * @since 12 */ /** - * Subscribes frame shutter event callback. + * Gets the current preconfig type if you had already call preconfig interface. * - * @param { 'frameShutter' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the frame shutter information. + * @returns { Profile } The current preconfig type. + * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ - on(type: 'frameShutter', callback: AsyncCallback): void; + getActiveProfile(): Profile; /** - * Unsubscribes from frame shutter event callback. + * Checks whether PhotoOutput supports quick thumbnail. + * This method is valid after Session.addInput() and Session.addOutput(photoOutput) are called. * - * @param { 'frameShutter' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the frame shutter information. + * @returns { boolean } Whether quick thumbnail is supported. + * @throws { BusinessError } 7400104 - session is not running. * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi * @since 10 */ /** - * Unsubscribes from frame shutter event callback. + * Checks whether PhotoOutput supports quick thumbnail. + * This method is valid after Session.addInput() and Session.addOutput(photoOutput) are called. * - * @param { 'frameShutter' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the frame shutter information. + * @returns { boolean } Whether quick thumbnail is supported. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400104 - session is not running. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - off(type: 'frameShutter', callback?: AsyncCallback): void; + isQuickThumbnailSupported(): boolean; /** - * Subscribes frame shutter end event callback. + * Enables or disables quick thumbnail. + * The method must be called after Session.addInput() and Session.addOutput(photoOutput) are called. + * To avoid stream reconfiguration and performance loss, + * you are advised to call the method before Session.commitConfig(). * - * @param { 'frameShutterEnd' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the frame shutter end information. + * @param { boolean } enabled - The value TRUE means to enable quick thumbnail, and FALSE means the opposite. + * @throws { BusinessError } 7400104 - session is not running. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 + * @systemapi + * @since 10 */ /** - * Registers a listener for the end of photo exposure capture to get the result by registering - * a callback function. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). + * Enables or disables quick thumbnail. + * The method must be called after Session.addInput() and Session.addOutput(photoOutput) are called. + * To avoid stream reconfiguration and performance loss, + * you are advised to call the method before Session.commitConfig(). * - * @param { 'frameShutterEnd' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the frame shutter end information. + * @param { boolean } enabled - The value TRUE means to enable quick thumbnail, and FALSE means the opposite. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400104 - session is not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} + * @systemapi + * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - on(type: 'frameShutterEnd', callback: AsyncCallback): void; + enableQuickThumbnail(enabled: boolean): void; /** - * Unsubscribes from frame shutter end event callback. + * Subscribes to camera thumbnail events. + * This method is valid only after enableQuickThumbnail(true) is called. * - * @param { 'frameShutterEnd' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the frame shutter end information. + * @param { 'quickThumbnail' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the quick thumbnail. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 + * @systemapi + * @since 10 */ + on(type: 'quickThumbnail', callback: AsyncCallback): void; + /** - * Unsubscribes from frame shutter end event callback. + * Unsubscribes from camera thumbnail events. + * This method is valid only after enableQuickThumbnail(true) is called. * - * @param { 'frameShutterEnd' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the frame shutter end information. + * @param { 'quickThumbnail' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the quick thumbnail. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @systemapi + * @since 10 */ - off(type: 'frameShutterEnd', callback?: AsyncCallback): void; + off(type: 'quickThumbnail', callback?: AsyncCallback): void; /** - * Subscribes capture end event callback. + * Confirm if the auto high quality photo supported. * - * @param { 'captureEnd' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the capture end information. + * @returns { boolean } TRUE if the auto high quality photo is supported. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400104 - session is not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ + isAutoHighQualityPhotoSupported(): boolean; + /** - * Registers a listener for the end of the photo shoot to get the result by registering - * a callback function. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). + * Enable auto high quality photo. * - * @param { 'captureEnd' } type - Listens to the event, fixed to 'captureEnd', when photoOutput is - * created successfully. This event can be triggered when the photoOutput is created successfully. - * @param { AsyncCallback } callback - Callback used to get the capture end information. + * @param { boolean } enabled - Target state for auto high quality photo. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400104 - session is not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - on(type: 'captureEnd', callback: AsyncCallback): void; + enableAutoHighQualityPhoto(enabled: boolean): void; /** - * Unsubscribes from capture end event callback. + * Confirm if the auto cloud image enhancement is supported. * - * @param { 'captureEnd' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the capture end information. + * @returns { boolean } TRUE if the auto cloud image enhancement is supported. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} + * @arkts 1.1&1.2 */ + isAutoCloudImageEnhancementSupported(): boolean; + /** - * Unsubscribes from capture end event callback. + * Enable auto cloud image enhancement * - * @param { 'captureEnd' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the capture end information. + * @param { boolean } enabled - Target state for auto cloud image enhancement. + * @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 - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} + * @systemapi + * @since arkts {'1.1':'13','1.2':'20'} * @arkts 1.1&1.2 */ - off(type: 'captureEnd', callback?: AsyncCallback): void; + enableAutoCloudImageEnhancement(enabled: boolean): void; /** - * Subscribes capture ready event callback. After receiving the callback, can proceed to the next capture + * Confirm if moving photo supported. * - * @param { 'captureReady' } type - Event type. - * @param { AsyncCallback } callback - Callback used to notice capture ready. + * @returns { boolean } TRUE if the moving photo is supported. + * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @since 12 */ /** - * Registers a listener for the next available shot to get the result by registering - * a callback function. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). + * Confirm if moving photo supported. * - * @param { 'captureReady' } type - Event type. - * @param { AsyncCallback } callback - Callback used to notice capture ready. + * @returns { boolean } TRUE if the moving photo is supported. + * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ - on(type: 'captureReady', callback: AsyncCallback): void; + isMovingPhotoSupported(): boolean; /** - * Unsubscribes from capture ready event callback. + * Enable moving photo. * - * @param { 'captureReady' } type - Event type. - * @param { AsyncCallback } callback - Callback used to notice capture ready. + * @permission ohos.permission.MICROPHONE + * @param { boolean } enabled - Target state for moving photo. + * @throws { BusinessError } 201 - permission denied. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @since 12 */ /** - * Unsubscribes from capture ready event callback. + * Enable moving photo. * - * @param { 'captureReady' } type - Event type. - * @param { AsyncCallback } callback - Callback used to notice capture ready. + * @permission ohos.permission.MICROPHONE + * @param { boolean } enabled - Target state for moving photo. + * @throws { BusinessError } 201 - permission denied. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ - off(type: 'captureReady', callback?: AsyncCallback): void; + enableMovingPhoto(enabled: boolean): void; /** - * Subscribes estimated capture duration event callback. + * Gets the photo rotation angle. * - * @param { 'estimatedCaptureDuration' } type - Event type. - * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). + * @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 * @since 12 */ /** - * Registers a listener for the estimated time to take a picture to get the result by registering - * a callback function. This API uses an asynchronous callback to return the result. - * - * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). + * Gets the photo rotation angle. * - * @param { 'estimatedCaptureDuration' } type - Event type. - * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). + * @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 arkts {'1.1':'19','1.2':'20'} * @arkts 1.1&1.2 */ - on(type: 'estimatedCaptureDuration', callback: AsyncCallback): void; + getPhotoRotation(deviceDegree: int): ImageRotation; /** - * Unsubscribes from estimated capture duration event callback. + * Confirm if offline processing is supported. * - * @param { 'estimatedCaptureDuration' } type - Event type. - * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). + * @returns { boolean } TRUE if the type of offline is supported. + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 + * @systemapi + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ + isOfflineSupported(): boolean; + /** - * Unsubscribes from estimated capture duration event callback. + * Enable offline processing. * - * @param { 'estimatedCaptureDuration' } type - Event type. - * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). + * @throws { BusinessError } 202 - Not System Application. + * @throws { BusinessError } 7400104 - session is not running. + * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} + * @systemapi + * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ - off(type: 'estimatedCaptureDuration', callback?: AsyncCallback): void; + enableOffline(): void; /** - * Subscribes to error events. + * Subscribes offline Delivery finished events. + * This method is valid only after enableOffline() is called. * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the photo output errors. + * @param { 'offlineDeliveryFinished' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get offline Delivery finished events. + * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 + * @systemapi + * @since 18 */ + on(type: 'offlineDeliveryFinished', callback: AsyncCallback): void; + /** - * Registers a listener for errors in the photo output to get the result by registering + * Unsubscribes offline Delivery finished events. + * This method is valid only after enableOffline() is called. + * + * @param { 'offlineDeliveryFinished' } type - Event type. + * @param { AsyncCallback} [callback] - Callback used to get offline Delivery finished events. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 18 + */ + off(type: 'offlineDeliveryFinished', callback?: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onPhotoAvailable, onDeferredPhotoProxyAvailable, onPhotoAssetAvailable, onCaptureStartWithInfo, + onFrameShutter, onFrameShutterEnd, onCaptureEnd, onCaptureReady, onEstimatedCaptureDuration, onError, + onQuickThumbnailWithCallbackofImagePixelMap, onOfflineDeliveryFinished }; + + /** + * Registers a listener for full quality chart uploads to get the result by registering * a callback function. This API uses an asynchronous callback to return the result. * * Description: Currently, it is not allowed to use off() to unregister the callback - * within the callback method of on(). + * within the callback method of on(). * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the photo output errors. + * @param { 'photoAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the Photo. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'error', callback: ErrorCallback): void; + onPhotoAvailable(type: 'photoAvailable', callback: AsyncCallback): void; /** - * Unsubscribes from error events. + * Subscribes deferred photo proxy available event callback. * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the photo output errors. + * @param { 'deferredPhotoProxyAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the DeferredPhotoProxy. + * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 + * @systemapi + * @since 20 + * @arkts 1.2 */ + onDeferredPhotoProxyAvailable(type: 'deferredPhotoProxyAvailable', callback: AsyncCallback): void; + /** - * Unsubscribes from error events. + * Registers a listener for photoAsset uploads to monitor the upload process. This API + * uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the photo output errors. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 - */ - off(type: 'error', callback?: ErrorCallback): void; + *

This API processes deferred photo delivery data by quickly displaying low-quality images to give + * users the impression of faster photo capture, while also generating high-quality images to maintain the + * final output quality. For details about the design specifications, see {@link + * https://developer.huawei.com/consumer/en/doc/best-practices/bpta-camera-shot2see}.

+ * @param { 'photoAssetAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the asset. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + onPhotoAssetAvailable(type: 'photoAssetAvailable', callback: AsyncCallback): void; /** - * Gets the current preconfig type if you had already call preconfig interface. + * Registers a listener for the start of the photo taking to get the CaptureStartInfo by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @returns { Profile } The current preconfig type. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'captureStartWithInfo' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the capture start info. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 + * @since 20 + * @arkts 1.2 */ + onCaptureStartWithInfo(type: 'captureStartWithInfo', callback: AsyncCallback): void; + /** - * Gets the current preconfig type if you had already call preconfig interface. + * Subscribes frame shutter event callback. * - * @returns { Profile } The current preconfig type. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'frameShutter' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the frame shutter information. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - getActiveProfile(): Profile; + onFrameShutter(type: 'frameShutter', callback: AsyncCallback): void; /** - * Checks whether PhotoOutput supports quick thumbnail. - * This method is valid after Session.addInput() and Session.addOutput(photoOutput) are called. + * Registers a listener for the end of photo exposure capture to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @returns { boolean } Whether quick thumbnail is supported. - * @throws { BusinessError } 7400104 - session is not running. + * @param { 'frameShutterEnd' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the frame shutter end information. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 10 + * @since 20 + * @arkts 1.2 */ + onFrameShutterEnd(type: 'frameShutterEnd', callback: AsyncCallback): void; + /** - * Checks whether PhotoOutput supports quick thumbnail. - * This method is valid after Session.addInput() and Session.addOutput(photoOutput) are called. + * Registers a listener for the end of the photo shoot to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @returns { boolean } Whether quick thumbnail is supported. - * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400104 - session is not running. + * @param { 'captureEnd' } type - Listens to the event, fixed to 'captureEnd', when photoOutput is + * created successfully. This event can be triggered when the photoOutput is created successfully. + * @param { AsyncCallback } callback - Callback used to get the capture end information. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - isQuickThumbnailSupported(): boolean; + onCaptureEnd(type: 'captureEnd', callback: AsyncCallback): void; /** - * Enables or disables quick thumbnail. - * The method must be called after Session.addInput() and Session.addOutput(photoOutput) are called. - * To avoid stream reconfiguration and performance loss, - * you are advised to call the method before Session.commitConfig(). + * Registers a listener for the next available shot to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @param { boolean } enabled - The value TRUE means to enable quick thumbnail, and FALSE means the opposite. - * @throws { BusinessError } 7400104 - session is not running. + * @param { 'captureReady' } type - Event type. + * @param { AsyncCallback } callback - Callback used to notice capture ready. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 10 + * @since 20 + * @arkts 1.2 */ + onCaptureReady(type: 'captureReady', callback: AsyncCallback): void; + /** - * Enables or disables quick thumbnail. - * The method must be called after Session.addInput() and Session.addOutput(photoOutput) are called. - * To avoid stream reconfiguration and performance loss, - * you are advised to call the method before Session.commitConfig(). + * Registers a listener for the estimated time to take a picture to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @param { boolean } enabled - The value TRUE means to enable quick thumbnail, and FALSE means the opposite. - * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400104 - session is not running. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'estimatedCaptureDuration' } type - Event type. + * @param { AsyncCallback } callback - Callback used to notify the estimated capture duration (in milliseconds). * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - enableQuickThumbnail(enabled: boolean): void; + onEstimatedCaptureDuration(type: 'estimatedCaptureDuration', callback: AsyncCallback): void; /** - * Subscribes to camera thumbnail events. - * This method is valid only after enableQuickThumbnail(true) is called. + * Registers a listener for errors in the photo output to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @param { 'quickThumbnail' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the quick thumbnail. + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the photo output errors. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'quickThumbnail', callback: AsyncCallback): void; + onError(type: 'error', callback: ErrorCallback): void; /** - * Unsubscribes from camera thumbnail events. + * Subscribes to camera thumbnail events. * This method is valid only after enableQuickThumbnail(true) is called. * * @param { 'quickThumbnail' } type - Event type. * @param { AsyncCallback } callback - Callback used to get the quick thumbnail. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 - */ - off(type: 'quickThumbnail', callback?: AsyncCallback): void; - - /** - * Confirm if the auto high quality photo supported. - * - * @returns { boolean } TRUE if the auto high quality photo is supported. - * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400104 - session is not running. - * @throws { BusinessError } 7400201 - Camera service fatal error. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - isAutoHighQualityPhotoSupported(): boolean; + onQuickThumbnailWithCallbackofImagePixelMap(type: 'quickThumbnail', + callback: AsyncCallback): void; /** - * Enable auto high quality photo. + * Subscribes offline Delivery finished events. + * This method is valid only after enableOffline() is called. * - * @param { boolean } enabled - Target state for auto high quality photo. + * @param { 'offlineDeliveryFinished' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get offline Delivery finished events. * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400104 - session is not running. - * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - enableAutoHighQualityPhoto(enabled: boolean): void; + onOfflineDeliveryFinished(type: 'offlineDeliveryFinished', callback: AsyncCallback): void; /** - * Confirm if the auto cloud image enhancement is supported. + * @since 20 + * @arkts 1.2 + */ + overload off { offPhotoAvailable, offDeferredPhotoProxyAvailable, offPhotoAssetAvailable, offCaptureStartWithInfo, + offFrameShutter, offFrameShutterEnd, offCaptureEnd, offCaptureReady, offEstimatedCaptureDuration, offError, + offQuickThumbnailWithCallbackofImagePixelMap, offOfflineDeliveryFinished }; + + /** + * Unsubscribes photo available event callback. * - * @returns { boolean } TRUE if the auto cloud image enhancement is supported. - * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'photoAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the Photo. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - isAutoCloudImageEnhancementSupported(): boolean; + offPhotoAvailable(type: 'photoAvailable', callback?: AsyncCallback): void; /** - * Enable auto cloud image enhancement + * Unsubscribes deferred photo proxy available event callback. * - * @param { boolean } enabled - Target state for auto cloud image enhancement. + * @param { 'deferredPhotoProxyAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the DeferredPhotoProxy. * @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 13 + * @since 20 + * @arkts 1.2 */ - enableAutoCloudImageEnhancement(enabled: boolean): void; + offDeferredPhotoProxyAvailable(type: 'deferredPhotoProxyAvailable', callback?: AsyncCallback): void; /** - * Confirm if moving photo supported. + * Unsubscribes photo asset event callback. * - * @returns { boolean } TRUE if the moving photo is supported. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'photoAssetAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the asset. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 + * @since 20 + * @arkts 1.2 */ + offPhotoAssetAvailable(type: 'photoAssetAvailable', callback?: AsyncCallback): void; + /** - * Confirm if moving photo supported. + * Unsubscribes from capture start event callback. * - * @returns { boolean } TRUE if the moving photo is supported. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'captureStartWithInfo' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the capture start info. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - isMovingPhotoSupported(): boolean; + offCaptureStartWithInfo(type: 'captureStartWithInfo', callback?: AsyncCallback): void; /** - * Enable moving photo. + * Unsubscribes from frame shutter event callback. * - * @permission ohos.permission.MICROPHONE - * @param { boolean } enabled - Target state for moving photo. - * @throws { BusinessError } 201 - permission denied. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'frameShutter' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the frame shutter information. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 + * @since 20 + * @arkts 1.2 */ + offFrameShutter(type: 'frameShutter', callback?: AsyncCallback): void; + /** - * Enable moving photo. + * Unsubscribes from frame shutter end event callback. * - * @permission ohos.permission.MICROPHONE - * @param { boolean } enabled - Target state for moving photo. - * @throws { BusinessError } 201 - permission denied. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'frameShutterEnd' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the frame shutter end information. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - enableMovingPhoto(enabled: boolean): void; + offFrameShutterEnd(type: 'frameShutterEnd', callback?: AsyncCallback): void; /** - * Gets the photo rotation angle. + * Unsubscribes from capture end event callback. * - * @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. + * @param { 'captureEnd' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the capture end information. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 12 + * @since 20 + * @arkts 1.2 */ + offCaptureEnd(type: 'captureEnd', callback?: AsyncCallback): void; + /** - * Gets the photo rotation angle. + * Unsubscribes from capture ready event callback. * - * @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. + * @param { 'captureReady' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to notice capture ready. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - getPhotoRotation(deviceDegree: int): ImageRotation; + offCaptureReady(type: 'captureReady', callback?: AsyncCallback): void; /** - * Confirm if offline processing is supported. + * Unsubscribes from estimated capture duration event callback. * - * @returns { boolean } TRUE if the type of offline is supported. - * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'estimatedCaptureDuration' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to notify the estimated + * capture duration (in milliseconds). * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - isOfflineSupported(): boolean; + offEstimatedCaptureDuration(type: 'estimatedCaptureDuration', callback?: AsyncCallback): void; /** - * Enable offline processing. + * Unsubscribes from error events. * - * @throws { BusinessError } 202 - Not System Application. - * @throws { BusinessError } 7400104 - session is not running. - * @throws { BusinessError } 7400201 - Camera service fatal error. + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the photo output errors. * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - enableOffline(): void; + offError(type: 'error', callback?: ErrorCallback): void; /** - * Subscribes offline Delivery finished events. - * This method is valid only after enableOffline() is called. + * Unsubscribes from camera thumbnail events. + * This method is valid only after enableQuickThumbnail(true) is called. * - * @param { 'offlineDeliveryFinished' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get offline Delivery finished events. - * @throws { BusinessError } 202 - Not System Application. + * @param { 'quickThumbnail' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the quick thumbnail. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'offlineDeliveryFinished', callback: AsyncCallback): void; + offQuickThumbnailWithCallbackofImagePixelMap(type: 'quickThumbnail', callback?: AsyncCallback): void; /** * Unsubscribes offline Delivery finished events. * This method is valid only after enableOffline() is called. * * @param { 'offlineDeliveryFinished' } type - Event type. - * @param { AsyncCallback} callback - Callback used to get offline Delivery finished events. + * @param { AsyncCallback} [callback] - Callback used to get offline Delivery finished events. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - off(type: 'offlineDeliveryFinished', callback?: AsyncCallback): void; + offOfflineDeliveryFinished(type: 'offlineDeliveryFinished', callback?: AsyncCallback): void; } /** @@ -13626,8 +16608,7 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ start(callback: AsyncCallback): void; @@ -13648,11 +16629,40 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ start(): Promise; + /** + * @since 20 + * @arkts 1.2 + */ + overload start { startWithCallback, startReturnsPromise }; + + /** + * Start video output. + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400103 - Session not config. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + startWithCallback(callback: AsyncCallback): void; + + /** + * Start video output. + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400103 - Session not config. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + startReturnsPromise(): Promise; + /** * Stop video output. * @@ -13666,8 +16676,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ stop(callback: AsyncCallback): void; @@ -13684,11 +16693,36 @@ declare namespace camera { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ stop(): Promise; + /** + * @since 20 + * @arkts 1.2 + */ + overload stop { stopWithCallback, stopReturnsPromise }; + + /** + * Stop video output. + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + stopWithCallback(callback: AsyncCallback): void; + + /** + * Stop video output. + * + * @returns { Promise } Promise used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + stopReturnsPromise(): Promise; + /** * Determine whether video mirror is supported. * @@ -13946,12 +16980,11 @@ declare namespace camera { * Subscribes deferred video enhancement info callback. * * @param { 'deferredVideoEnhancementInfo' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. + * @param { AsyncCallback } callback - Callback used to return the result. * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'deferredVideoEnhancementInfo', callback: AsyncCallback): void; @@ -13963,8 +16996,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'deferredVideoEnhancementInfo', callback?: AsyncCallback): void; @@ -13987,8 +17019,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'frameStart', callback: AsyncCallback): void; @@ -14007,8 +17038,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'frameStart', callback?: AsyncCallback): void; @@ -14027,8 +17057,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'frameEnd', callback: AsyncCallback): void; @@ -14041,25 +17070,103 @@ declare namespace camera { * @since 10 */ /** - * Unsubscribes from frame end event callback. + * Unsubscribes from frame end event callback. + * + * @param { 'frameEnd' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + off(type: 'frameEnd', callback?: AsyncCallback): void; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the video output errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 10 + */ + /** + * Registers a listener for errors in the metadata stream to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the video output errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + on(type: 'error', callback: ErrorCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the video output errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 10 + */ + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the video output errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + off(type: 'error', callback?: ErrorCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onDeferredVideoEnhancementInfo, onFrameStart, onFrameEnd, onError }; + + /** + * Subscribes deferred video enhancement info callback. + * + * @param { 'deferredVideoEnhancementInfo' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onDeferredVideoEnhancementInfo(type: 'deferredVideoEnhancementInfo', callback: AsyncCallback): void; + + /** + * Registers a listener for the start of the video recording to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). * - * @param { 'frameEnd' } type - Event type. + * @param { 'frameStart' } type - Event type. * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 + * @arkts 1.2 */ - off(type: 'frameEnd', callback?: AsyncCallback): void; + onFrameStart(type: 'frameStart', callback: AsyncCallback): void; /** - * Subscribes to error events. + * Subscribes frame end event callback. * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the video output errors. + * @param { 'frameEnd' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 + * @since 19 + * @arkts 1.2 */ + onFrameEnd(type: 'frameEnd', callback: AsyncCallback): void; + /** * Registers a listener for errors in the metadata stream to get the result by registering * a callback function. This API uses an asynchronous callback to return the result. @@ -14070,31 +17177,62 @@ declare namespace camera { * @param { 'error' } type - Event type. * @param { ErrorCallback } callback - Callback used to get the video output errors. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 + * @arkts 1.2 */ - on(type: 'error', callback: ErrorCallback): void; + onError(type: 'error', callback: ErrorCallback): void; /** - * Unsubscribes from error events. + * @since 20 + * @arkts 1.2 + */ + overload off { offDeferredVideoEnhancementInfo, offFrameStart, offFrameEnd, offError }; + + /** + * Unsubscribes from deferred video enhancement info callback. * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the video output errors. + * @param { 'deferredVideoEnhancementInfo' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offDeferredVideoEnhancementInfo(type: 'deferredVideoEnhancementInfo', callback?: AsyncCallback): void; + + /** + * Unsubscribes from frame start event callback. + * + * @param { 'frameStart' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + offFrameStart(type: 'frameStart', callback?: AsyncCallback): void; + + /** + * Unsubscribes from frame end event callback. + * + * @param { 'frameEnd' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 */ + offFrameEnd(type: 'frameEnd', callback?: AsyncCallback): void; + /** * Unsubscribes from error events. * * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the video output errors. + * @param { ErrorCallback } [callback] - Callback used to get the video output errors. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - off(type: 'error', callback?: ErrorCallback): void; + offError(type: 'error', callback?: ErrorCallback): void; /** * Gets the current preconfig type if you had already call preconfig interface. @@ -14163,6 +17301,117 @@ declare namespace camera { VIDEO_META_MAKER_INFO = 0 } + /** + * Video capability object + * + * @typedef VideoCapability + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + interface VideoCapability { + /** + * Determine whether BFrame is supported. + * + * @returns { boolean } Is BFrame supported. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + isBFrameSupported(): boolean; + } + + /** + * Movie settings object + * + * @typedef MovieSettings + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + interface MovieSettings { + /** + * Movie codec type. + * + * @type { VideoCodecType } + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + videoCodec: VideoCodecType; + + /** + * Video rotation. + * + * @type { ?ImageRotation } + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + rotation?: ImageRotation; + + /** + * Movie location. + * + * @type { ?Location } + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + location?: Location; + + /** + * Configure whether to enable B-frame, default false. + * + * @type { ?boolean } + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + isBFrameEnabled?: boolean; + } + + /** + * Movie info object + * + * @typedef MovieInfo + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + interface MovieInfo { + /** + * Capture identity value. + * + * @type { int } + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + captureId: int; + + /** + * ID of the photo taken. + * + * @type { ?photoAccessHelper.PhotoAsset } + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.1&1.2 + */ + asset?: photoAccessHelper.PhotoAsset; + } + /** * Metadata object type. * @@ -14557,8 +17806,8 @@ declare namespace camera { /** * Metadata object for face. * - * @typedef MetadataFaceObject * @extends MetadataObject + * @typedef MetadataFaceObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} @@ -14653,8 +17902,8 @@ declare namespace camera { /** * Metadata object for human body. * - * @typedef MetadataHumanBodyObject * @extends MetadataObject + * @typedef MetadataHumanBodyObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} @@ -14666,8 +17915,8 @@ declare namespace camera { /** * Metadata object for cat face. * - * @typedef MetadataCatFaceObject * @extends MetadataObject + * @typedef MetadataCatFaceObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} @@ -14702,8 +17951,8 @@ declare namespace camera { /** * Metadata object for cat body. * - * @typedef MetadataCatBodyObject * @extends MetadataObject + * @typedef MetadataCatBodyObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} @@ -14715,8 +17964,8 @@ declare namespace camera { /** * Metadata object for dog face. * - * @typedef MetadataDogFaceObject * @extends MetadataObject + * @typedef MetadataDogFaceObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} @@ -14751,8 +18000,8 @@ declare namespace camera { /** * Metadata object for dog body. * - * @typedef MetadataDogBodyObject * @extends MetadataObject + * @typedef MetadataDogBodyObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} @@ -14764,8 +18013,8 @@ declare namespace camera { /** * Metadata object for salient detection. * - * @typedef MetadataSalientDetectionObject * @extends MetadataObject + * @typedef MetadataSalientDetectionObject * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi * @since arkts {'1.1':'13','1.2':'20'} @@ -14858,8 +18107,7 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ start(callback: AsyncCallback): void; @@ -14880,11 +18128,40 @@ declare namespace camera { * @throws { BusinessError } 7400201 - Camera service fatal error. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ start(): Promise; + /** + * @since 20 + * @arkts 1.2 + */ + overload start { startWithCallback, startReturnsPromise }; + + /** + * Start output metadata + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @throws { BusinessError } 7400103 - Session not config. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + startWithCallback(callback: AsyncCallback): void; + + /** + * Start output metadata + * + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400103 - Session not config. + * @throws { BusinessError } 7400201 - Camera service fatal error. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + startReturnsPromise(): Promise; + /** * Stop output metadata * @@ -14898,8 +18175,7 @@ declare namespace camera { * @param { AsyncCallback } callback - Callback used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ stop(callback: AsyncCallback): void; @@ -14916,11 +18192,36 @@ declare namespace camera { * @returns { Promise } Promise used to return the result. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ stop(): Promise; + /** + * @since 20 + * @arkts 1.2 + */ + overload stop { stopWithCallback, stopReturnsPromise }; + + /** + * Stop output metadata + * + * @param { AsyncCallback } callback - Callback used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + stopWithCallback(callback: AsyncCallback): void; + + /** + * Stop output metadata + * + * @returns { Promise } Promise used to return the result. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 + */ + stopReturnsPromise(): Promise; + /** * Add metadata object types. * @@ -14970,8 +18271,7 @@ declare namespace camera { * @param { AsyncCallback> } callback - Callback used to get the available metadata objects. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ on(type: 'metadataObjectsAvailable', callback: AsyncCallback>): void; @@ -14990,8 +18290,7 @@ declare namespace camera { * @param { AsyncCallback> } callback - Callback used to get the available metadata objects. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 19 */ off(type: 'metadataObjectsAvailable', callback?: AsyncCallback>): void; @@ -15001,8 +18300,63 @@ declare namespace camera { * @param { 'error' } type - Event type. * @param { ErrorCallback } callback - Callback used to get the video output errors. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 + * @since 10 + */ + /** + * Registers a listener for errors in the video output to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the video output errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + on(type: 'error', callback: ErrorCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the video output errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 10 + */ + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the video output errors. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + off(type: 'error', callback?: ErrorCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onMetadataObjectsAvailable, onError }; + + /** + * Registers a listener for the detected metadata object to get the result by registering + * a callback function. This API uses an asynchronous callback to return the result. + * + * Description: Currently, it is not allowed to use off() to unregister the callback + * within the callback method of on(). + * + * @param { 'metadataObjectsAvailable' } type - Event type. + * @param { AsyncCallback> } callback - Callback used to get the available metadata objects. + * @syscap SystemCapability.Multimedia.Camera.Core + * @since 20 + * @arkts 1.2 */ + onMetadataObjectsAvailable(type: 'metadataObjectsAvailable', callback: AsyncCallback>): void; + /** * Registers a listener for errors in the video output to get the result by registering * a callback function. This API uses an asynchronous callback to return the result. @@ -15013,31 +18367,38 @@ declare namespace camera { * @param { 'error' } type - Event type. * @param { ErrorCallback } callback - Callback used to get the video output errors. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - on(type: 'error', callback: ErrorCallback): void; + onError(type: 'error', callback: ErrorCallback): void; /** - * Unsubscribes from error events. + * @since 20 + * @arkts 1.2 + */ + overload off { offmetadataObjectsAvailable, offError }; + + /** + * Unsubscribes from metadata objects available event callback. * - * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the video output errors. + * @param { 'metadataObjectsAvailable' } type - Event type. + * @param { AsyncCallback> } [callback] - Callback used to get the available metadata objects. * @syscap SystemCapability.Multimedia.Camera.Core - * @since 10 + * @since 20 + * @arkts 1.2 */ + offmetadataObjectsAvailable(type: 'metadataObjectsAvailable', callback?: AsyncCallback>): void; + /** * Unsubscribes from error events. * * @param { 'error' } type - Event type. - * @param { ErrorCallback } callback - Callback used to get the video output errors. + * @param { ErrorCallback } [callback] - Callback used to get the video output errors. * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 + * @arkts 1.2 */ - off(type: 'error', callback?: ErrorCallback): void; + offError(type: 'error', callback?: ErrorCallback): void; } /** @@ -15053,7 +18414,8 @@ declare namespace camera { * @enum { number } * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice - * @since 19 + * @since arkts {'1.1':'19','1.2':'20'} + * @arkts 1.1&1.2 */ enum CameraConcurrentType { /** @@ -15067,7 +18429,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, @@ -15082,7 +18445,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, } @@ -15100,7 +18464,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 { /** @@ -15118,7 +18483,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; @@ -15137,7 +18503,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; @@ -15156,7 +18523,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; @@ -15175,7 +18543,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; } @@ -15320,8 +18689,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'error', callback: ErrorCallback): void; @@ -15333,8 +18701,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'error', callback?: ErrorCallback): void; @@ -15346,8 +18713,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'focusStateChange', callback: AsyncCallback): void; @@ -15359,8 +18725,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'focusStateChange', callback?: AsyncCallback): void; @@ -15372,8 +18737,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'isoInfoChange', callback: AsyncCallback): void; @@ -15385,8 +18749,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'isoInfoChange', callback?: AsyncCallback): void; @@ -15398,8 +18761,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'exposureInfoChange', callback: AsyncCallback): void; @@ -15411,8 +18773,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'exposureInfoChange', callback?: AsyncCallback): void; @@ -15424,8 +18785,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'luminationInfoChange', callback: AsyncCallback): void; @@ -15437,8 +18797,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'luminationInfoChange', callback?: AsyncCallback): void; @@ -15489,8 +18848,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ on(type: 'tryAEInfoChange', callback: AsyncCallback): void; @@ -15502,11 +18860,180 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ off(type: 'tryAEInfoChange', callback?: AsyncCallback): void; + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onError, onFocusStateChange, onIsoInfoChange, onExposureInfoChange, onLuminationInfoChange, + onTryAEInfoChange }; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onError(type: 'error', callback: ErrorCallback): void; + + /** + * Subscribes focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onFocusStateChange(type: 'focusStateChange', callback: AsyncCallback): void; + + /** + * Subscribes ISO info event callback. + * + * @param { 'isoInfoChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the ISO info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onIsoInfoChange(type: 'isoInfoChange', callback: AsyncCallback): void; + + /** + * Subscribes exposure info event callback. + * + * @param { 'exposureInfoChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the exposure info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onExposureInfoChange(type: 'exposureInfoChange', callback: AsyncCallback): void; + + /** + * Subscribes lumination info event callback. + * + * @param { 'luminationInfoChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the lumination info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onLuminationInfoChange(type: 'luminationInfoChange', callback: AsyncCallback): void; + + /** + * Subscribes try AE info event callback. + * + * @param { 'tryAEInfoChange' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the try AE info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onTryAEInfoChange(type: 'tryAEInfoChange', callback: AsyncCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offError, offFocusStateChange, offIsoInfoChange, offExposureInfoChange, offLuminationInfoChange, + offTryAEInfoChange }; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the capture session errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', callback?: ErrorCallback): void; + + /** + * Unsubscribes from focus state change event callback. + * + * @param { 'focusStateChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the focus state change. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offFocusStateChange(type: 'focusStateChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from ISO info event callback. + * + * @param { 'isoInfoChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the ISO info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offIsoInfoChange(type: 'isoInfoChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from exposure info event callback. + * + * @param { 'exposureInfoChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the exposure info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offExposureInfoChange(type: 'exposureInfoChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from lumination info event callback. + * + * @param { 'luminationInfoChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the lumination info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offLuminationInfoChange(type: 'luminationInfoChange', callback?: AsyncCallback): void; + + /** + * Unsubscribes from try AE info event callback. + * + * @param { 'tryAEInfoChange' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the try AE info. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offTryAEInfoChange(type: 'tryAEInfoChange', callback?: AsyncCallback): void; + /** * Gets supported timelapse interval range. * @@ -15837,8 +19364,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'depthDataAvailable', callback: AsyncCallback): void; @@ -15850,8 +19376,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'depthDataAvailable', callback?: AsyncCallback): void; @@ -15863,8 +19388,7 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ on(type: 'error', callback: ErrorCallback): void; @@ -15876,10 +19400,73 @@ declare namespace camera { * @throws { BusinessError } 202 - Not System Application. * @syscap SystemCapability.Multimedia.Camera.Core * @systemapi - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 + * @since 13 */ off(type: 'error', callback?: ErrorCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload on { onDepthDataAvailable, onError }; + + /** + * Subscribes to depth data objects available event callback. + * + * @param { 'depthDataAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the available DepthData objects. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onDepthDataAvailable(type: 'depthDataAvailable', callback: AsyncCallback): void; + + /** + * Subscribes to error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } callback - Callback used to get the video output errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + onError(type: 'error', callback: ErrorCallback): void; + + /** + * @since 20 + * @arkts 1.2 + */ + overload off { offDepthDataAvailable, offError }; + + /** + * Unsubscribes from depth data objects available event callback. + * + * @param { 'depthDataAvailable' } type - Event type. + * @param { AsyncCallback } [callback] - Callback used to get the available DepthData objects. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offDepthDataAvailable(type: 'depthDataAvailable', callback?: AsyncCallback): void; + + /** + * Unsubscribes from error events. + * + * @param { 'error' } type - Event type. + * @param { ErrorCallback } [callback] - Callback used to get the video output errors. + * @throws { BusinessError } 202 - Not System Application. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + offError(type: 'error', callback?: ErrorCallback): void; } /** diff --git a/api/@ohos.multimedia.systemSoundManager.d.ts b/api/@ohos.multimedia.systemSoundManager.d.ts index fa0f9b0402ac00c37b068c6ccb6e91881794ed8c..0400948d77c34a95137bf77263c8a26efaa96ce1 100644 --- a/api/@ohos.multimedia.systemSoundManager.d.ts +++ b/api/@ohos.multimedia.systemSoundManager.d.ts @@ -1188,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; @@ -1207,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; diff --git a/api/@ohos.net.connection.d.ts b/api/@ohos.net.connection.d.ts index c7b58cbc512ceb680bfbbbf84ed2db3fa6635339..704b6a1147f8bf60679beac01e233b1df6494600 100644 --- a/api/@ohos.net.connection.d.ts +++ b/api/@ohos.net.connection.d.ts @@ -1779,13 +1779,13 @@ declare namespace connection { /** * 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 arkts {'1.1':'11','1.2':'20'} @@ -1882,20 +1882,20 @@ declare namespace connection { /** * 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 diff --git a/api/@ohos.net.http.d.ts b/api/@ohos.net.http.d.ts index fbb2c980064be5e97be2fb655c40e10bf2df20fc..7656c2864ec542077779c89f3b05bb7257d68a62 100644 --- a/api/@ohos.net.http.d.ts +++ b/api/@ohos.net.http.d.ts @@ -20,6 +20,9 @@ import type { AsyncCallback, Callback } from './@ohos.base'; import type connection from './@ohos.net.connection'; +/*** if arkts 1.2 */ +import type { RecordData } from './@ohos.base'; +/*** endif */ /** * Provides http related APIs. @@ -192,11 +195,20 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ extraData?: string | Object | ArrayBuffer; + /** + * Additional data of the request. + * extraData can be a string or an Object (API 6) or an ArrayBuffer(API 8). + * @type { ?(string | RecordData | ArrayBuffer) } + * @syscap SystemCapability.Communication.NetStack + * @since 20 + * @arkts 1.2 + */ + extraData?: string | RecordData | ArrayBuffer; + /** * Data type to be returned. If this parameter is set, the system preferentially returns the specified type. * @type {?HttpDataType} @@ -288,11 +300,19 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ header?: Object; + /** + * HTTP request header. default is 'content-type': 'application/json' + * @type {?Record} + * @syscap SystemCapability.Communication.NetStack + * @since 20 + * @arkts 1.2 + */ + header?: Record; + /** * Read timeout period. The default value is 60,000, in ms. * @type {?int} @@ -393,7 +413,7 @@ declare namespace http { 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 @@ -420,7 +440,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 {?int} + * @type {?long} * @syscap SystemCapability.Communication.NetStack * @since 11 */ @@ -428,19 +448,19 @@ 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 {?int} + * @type {?long} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - resumeFrom?: int; + 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 {?int} + * @type {?long} * @syscap SystemCapability.Communication.NetStack * @since 11 */ @@ -448,13 +468,13 @@ 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 {?int} + * @type {?long} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - resumeTo?: int; + resumeTo?: long; /** * Support the application to pass in client certificates, allowing the server to verify the client's identity. @@ -811,7 +831,7 @@ declare namespace http { /** * Enum for Tls version - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetStack * @atomicservice * @since arkts {'1.1':'18','1.2':'20'} @@ -929,11 +949,19 @@ declare namespace http { * @type {?(string | Object | ArrayBuffer)} * @syscap SystemCapability.Communication.NetStack * @crossplatform - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ data?: string | Object | ArrayBuffer; + /** + * This parameter sets a mime part's body content from memory data. + * @type {?(string | RecordData | ArrayBuffer)} + * @syscap SystemCapability.Communication.NetStack + * @since 20 + * @arkts 1.2 + */ + data?: string | RecordData | ArrayBuffer; + /** * This parameter sets a mime part's body content from the file's contents. * This is an alternative to curl_mime_data for setting data to a mime part. @@ -1153,7 +1181,7 @@ declare namespace http { * 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. @@ -1575,7 +1603,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. @@ -1615,7 +1643,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. @@ -1788,7 +1816,7 @@ declare namespace http { * @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. + * 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. @@ -1828,7 +1856,7 @@ declare namespace http { * @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. + * 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. @@ -1869,7 +1897,7 @@ declare namespace http { * @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. + * 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. @@ -1911,7 +1939,7 @@ declare namespace http { * @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. + * 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. @@ -2080,7 +2108,7 @@ 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 { HttpRequestOptions } option - Optional parameters {@link HttpRequestOptions}. + * @param { HttpRequestOptions } options - Optional parameters {@link HttpRequestOptions}. * @param { AsyncCallback } callback - the callback of requestInStream. * @throws { BusinessError } 401 - Parameter error. * @throws { BusinessError } 201 - Permission denied. @@ -2121,7 +2149,7 @@ declare namespace http { * @since arkts {'1.1':'18','1.2':'20'} * @arkts 1.1&1.2 */ - requestInStream(url: string, option: 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. @@ -2831,20 +2859,20 @@ declare namespace http { /** * 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 @@ -3691,20 +3719,20 @@ declare namespace http { /** * 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 @@ -3821,11 +3849,20 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ result: string | Object | ArrayBuffer; + /** + * result can be a string (API 6) or an ArrayBuffer(API 8). Object is deprecated from API 8. + * If {@link HttpRequestOptions#expectDataType} is set, the system preferentially returns this parameter. + * @type {string | RecordData | ArrayBuffer} + * @syscap SystemCapability.Communication.NetStack + * @since 20 + * @arkts 1.2 + */ + result: string | RecordData | ArrayBuffer; + /** * If the resultType is string, you can get result directly. * If the resultType is Object, you can get result such as this: result['key']. @@ -3899,11 +3936,19 @@ declare namespace http { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ header: Object; + /** + * All headers in the response from the server. + * @type {Record} + * @syscap SystemCapability.Communication.NetStack + * @since 20 + * @arkts 1.2 + */ + header: Record; + /** * Cookies returned by the server. * @type {string} @@ -3962,163 +4007,163 @@ declare namespace http { export interface PerformanceTiming { /** * Time taken from startup to DNS resolution completion, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from startup to DNS resolution completion, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - dnsTiming: int; + dnsTiming: double; /** * Time taken from startup to TCP connection completion, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from startup to TCP connection completion, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - tcpTiming: int; + tcpTiming: double; /** * Time taken from startup to TLS connection completion, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from startup to TLS connection completion, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - tlsTiming: int; + tlsTiming: double; /** * Time taken from startup to start sending the first byte, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from startup to start sending the first byte, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - firstSendTiming: int; + firstSendTiming: double; /** * Time taken from startup to receiving the first byte, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from startup to receiving the first byte, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - firstReceiveTiming: int; + firstReceiveTiming: double; /** * Time taken from startup to the completion of the request, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from startup to the completion of the request, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - totalFinishTiming: int; + totalFinishTiming: double; /** * Time taken from startup to completion of all redirection steps, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from startup to completion of all redirection steps, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - redirectTiming: int; + redirectTiming: double; /** * Time taken from HTTP request to header completion, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from HTTP request to header completion, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - responseHeaderTiming: int; + responseHeaderTiming: double; /** * Time taken from HTTP Request to body completion, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from HTTP Request to body completion, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - responseBodyTiming: int; + responseBodyTiming: double; /** * Time taken from HTTP Request to callback to the application, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @since 11 */ /** * Time taken from HTTP Request to callback to the application, in milliseconds. - * @type {int} + * @type {double} * @syscap SystemCapability.Communication.NetStack * @crossplatform * @since arkts {'1.1':'12','1.2':'20'} * @arkts 1.1&1.2 */ - totalTiming: int; + totalTiming: double; } /** diff --git a/api/@ohos.net.networkSecurity.d.ts b/api/@ohos.net.networkSecurity.d.ts index 3db7aabf6d5d8cc41995d6a182bdfd5fb165c644..cd8a03b2c7309fa3c72c6cae6ab672059b63afb2 100644 --- a/api/@ohos.net.networkSecurity.d.ts +++ b/api/@ohos.net.networkSecurity.d.ts @@ -30,7 +30,7 @@ import type { AsyncCallback } from './@ohos.base'; declare namespace networkSecurity { /** * Defines the certificate type. - * @enum {number} + * @enum {int} * @syscap SystemCapability.Communication.NetStack * @since arkts {'1.1':'11','1.2':'20'} * @arkts 1.1&1.2 @@ -139,7 +139,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. diff --git a/api/@ohos.net.sharing.d.ts b/api/@ohos.net.sharing.d.ts index c341206cef817c8b7a1030b59694e7506864724b..01c43106da124ddae3e6529a441bf0ebf0bf51fb 100644 --- a/api/@ohos.net.sharing.d.ts +++ b/api/@ohos.net.sharing.d.ts @@ -511,7 +511,7 @@ declare namespace sharing { /** * 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 arkts {'1.1':'9','1.2':'20'} @@ -586,7 +586,7 @@ declare namespace sharing { /** * 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 arkts {'1.1':'9','1.2':'20'} diff --git a/api/@ohos.net.statistics.d.ts b/api/@ohos.net.statistics.d.ts index e6a4df6f445d0d45a633897a8f9eaad04a47dbf4..84fed33d04044631d44acc2b8085fbbfac8e201b 100644 --- a/api/@ohos.net.statistics.d.ts +++ b/api/@ohos.net.statistics.d.ts @@ -270,7 +270,7 @@ declare namespace statistics { * @throws { BusinessError } 2103005 - Failed to read the system map. * @throws { BusinessError } 2103011 - Failed to create a system map. * @syscap SystemCapability.Communication.NetManager.Core - * @since arkts {'1.1':'15','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ function getUidRxBytes(uid: int, callback: AsyncCallback): void; @@ -285,7 +285,7 @@ declare namespace statistics { * @throws { BusinessError } 2103005 - Failed to read the system map. * @throws { BusinessError } 2103011 - Failed to create a system map. * @syscap SystemCapability.Communication.NetManager.Core - * @since arkts {'1.1':'15','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ function getUidRxBytes(uid: int): Promise; @@ -300,7 +300,7 @@ declare namespace statistics { * @throws { BusinessError } 2103005 - Failed to read the system map. * @throws { BusinessError } 2103011 - Failed to create a system map. * @syscap SystemCapability.Communication.NetManager.Core - * @since arkts {'1.1':'15','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ function getUidTxBytes(uid: int, callback: AsyncCallback): void; @@ -315,7 +315,7 @@ declare namespace statistics { * @throws { BusinessError } 2103005 - Failed to read the system map. * @throws { BusinessError } 2103011 - Failed to create a system map. * @syscap SystemCapability.Communication.NetManager.Core - * @since arkts {'1.1':'15','1.2':'20'} + * @since arkts {'1.1':'10','1.2':'20'} * @arkts 1.1&1.2 */ function getUidTxBytes(uid: int): Promise; diff --git a/api/@ohos.net.webSocket.d.ts b/api/@ohos.net.webSocket.d.ts index e582a5f2edc446444a307ec222ad33fd60c302cd..102539b2f3d036dc2dfbfaf75549d16e7a9710fd 100644 --- a/api/@ohos.net.webSocket.d.ts +++ b/api/@ohos.net.webSocket.d.ts @@ -118,11 +118,19 @@ declare namespace webSocket { * @syscap SystemCapability.Communication.NetStack * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ header?: Object; + /** + * HTTP request header. + * @type {?Record} + * @syscap SystemCapability.Communication.NetStack + * @since 20 + * @arkts 1.2 + */ + header?: Record; + /** * File path for client cert. * @type {?string} diff --git a/api/@ohos.nfc.cardEmulation.d.ts b/api/@ohos.nfc.cardEmulation.d.ts index 7731d7ec91d10398d866bba77a605941a2557b2b..ca3e2d5264743e06d859b88bcfeb559fef65fb14 100644 --- a/api/@ohos.nfc.cardEmulation.d.ts +++ b/api/@ohos.nfc.cardEmulation.d.ts @@ -35,7 +35,8 @@ import type { AbilityInfo } from './bundleManager/AbilityInfo'; * @namespace cardEmulation * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ declare namespace cardEmulation { /** @@ -89,7 +90,8 @@ declare namespace cardEmulation { * @enum { string } * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum CardType { /** @@ -103,7 +105,8 @@ declare namespace cardEmulation { * * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ PAYMENT = 'payment', @@ -118,7 +121,8 @@ declare namespace cardEmulation { * * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ OTHER = 'other' } @@ -155,7 +159,8 @@ declare namespace cardEmulation { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function hasHceCapability(): boolean; @@ -190,7 +195,8 @@ declare namespace cardEmulation { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function isDefaultService(elementName: ElementName, type: CardType): boolean; @@ -204,7 +210,8 @@ declare namespace cardEmulation { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.NFC.CardEmulation * @systemapi Hide this for inner system use. - * @since 11 + * @since arkts {'1.1':'11','1.2':'20'} + * @arkts 1.1&1.2 */ function getPaymentServices(): AbilityInfo[]; @@ -223,7 +230,8 @@ declare namespace cardEmulation { * * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export class HceService { /** @@ -270,7 +278,8 @@ declare namespace cardEmulation { * @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ start(elementName: ElementName, aidList: string[]): void; @@ -315,7 +324,8 @@ declare namespace cardEmulation { * @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ stop(elementName: ElementName): void; @@ -333,29 +343,31 @@ declare namespace cardEmulation { * * @permission ohos.permission.NFC_CARD_EMULATION * @param { 'hceCmd' } type The type to register. - * @param { AsyncCallback } callback Callback used to listen to HCE data that local device received. + * @param { AsyncCallback } callback Callback used to listen to HCE data that local device received. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - Invalid parameter. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - on(type: 'hceCmd', callback: AsyncCallback): void; + on(type: 'hceCmd', callback: AsyncCallback): void; /** * Unsubscribe the event to receive the APDU data. * * @permission ohos.permission.NFC_CARD_EMULATION * @param { 'hceCmd' } type - The type to unregister event. - * @param { AsyncCallback } callback - The callback used to listen for the event. + * @param { AsyncCallback } callback - The callback used to listen for the event. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ - off(type: 'hceCmd', callback?: AsyncCallback): void; + off(type: 'hceCmd', callback?: AsyncCallback): void; /** * Sends a response APDU to the remote device. @@ -390,7 +402,7 @@ declare namespace cardEmulation { * Sends a response APDU to the remote device. * * @permission ohos.permission.NFC_CARD_EMULATION - * @param { number[] } response Indicates the response to send, which is a byte array. + * @param { int[] } response Indicates the response to send, which is a byte array. * @returns { Promise } The void * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -401,9 +413,10 @@ declare namespace cardEmulation { * @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - transmit(response: number[]): Promise; + transmit(response: int[]): Promise; /** * Sends a response APDU to the remote device. @@ -425,7 +438,7 @@ declare namespace cardEmulation { * Sends a response APDU to the remote device. * * @permission ohos.permission.NFC_CARD_EMULATION - * @param { number[] } response Indicates the response to send, which is a byte array. + * @param { int[] } response Indicates the response to send, which is a byte array. * @param { AsyncCallback } callback The callback * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -436,9 +449,10 @@ declare namespace cardEmulation { * @throws { BusinessError } 3100301 - Card emulation running state is abnormal in service. * @syscap SystemCapability.Communication.NFC.CardEmulation * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - transmit(response: number[], callback: AsyncCallback): void; + transmit(response: int[], callback: AsyncCallback): void; } } export default cardEmulation; diff --git a/api/@ohos.nfc.controller.d.ts b/api/@ohos.nfc.controller.d.ts index 63aa9d95448cf681bc66adb63f4ea29072d2fb01..d8695c5e681c5c3e7e4b7d6985dbefab2768438b 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 { /** @@ -46,10 +47,11 @@ declare namespace nfcController { /** * NFC changed states. * - * @enum { number } + * @enum { int } * @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..3399b2b1d570708667d431fe4f0cd5ab7db44bbd 100644 --- a/api/@ohos.nfc.tag.d.ts +++ b/api/@ohos.nfc.tag.d.ts @@ -29,7 +29,9 @@ import { } from './tag/nfctech'; import { NdefMessage as _NdefMessage } from './tag/nfctech'; import { TagSession as _TagSession } from './tag/tagSession'; +/*** if arkts 1.1 */ import type { PacMap } from './ability/dataAbilityHelper'; +/*** endif */ import type rpc from './@ohos.rpc'; import type { AsyncCallback } from './@ohos.base'; import Want from './@ohos.app.ability.Want'; @@ -48,7 +50,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 +67,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 +85,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 +103,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 +121,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 +139,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 +157,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; @@ -166,7 +175,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_FORMATABLE = 7; @@ -183,7 +193,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 +211,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; @@ -210,7 +222,8 @@ declare namespace tag { * @constant * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ const NFC_BARCODE = 10; @@ -224,10 +237,11 @@ declare namespace tag { /** * TNF types definitions, see NFCForum-TS-NDEF_1.0. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum TnfType { /** @@ -241,7 +255,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 */ TNF_EMPTY = 0x0, @@ -256,7 +271,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 */ TNF_WELL_KNOWN = 0x1, @@ -271,7 +287,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 */ TNF_MEDIA = 0x2, @@ -286,7 +303,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 */ TNF_ABSOLUTE_URI = 0x3, @@ -301,7 +319,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 */ TNF_EXT_APP = 0x4, @@ -316,7 +335,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 */ TNF_UNKNOWN = 0x5, @@ -331,7 +351,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 */ TNF_UNCHANGED = 0x6 } @@ -346,10 +367,11 @@ declare namespace tag { /** * NfcForum Type definition. The NDEF tag may use one of them. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum NfcForumType { /** @@ -363,7 +385,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 */ NFC_FORUM_TYPE_1 = 1, @@ -378,7 +401,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 */ NFC_FORUM_TYPE_2 = 2, @@ -393,7 +417,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 */ NFC_FORUM_TYPE_3 = 3, @@ -408,7 +433,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 */ NFC_FORUM_TYPE_4 = 4, @@ -423,7 +449,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 } @@ -441,9 +468,10 @@ 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 RTD_TEXT: number[]; + const RTD_TEXT: int[]; /** * RTD type URI, see NFC Record Type Definition (RTD) Specification. @@ -458,9 +486,10 @@ 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 RTD_URI: number[]; + const RTD_URI: int[]; /** * MifareClassic Type definition @@ -472,10 +501,11 @@ declare namespace tag { /** * MifareClassic Type definition * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum MifareClassicType { /** @@ -489,7 +519,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 */ TYPE_UNKNOWN = 0, @@ -504,7 +535,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 */ TYPE_CLASSIC = 1, @@ -519,7 +551,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 */ TYPE_PLUS = 2, @@ -534,7 +567,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 */ TYPE_PRO = 3 } @@ -549,10 +583,11 @@ declare namespace tag { /** * MifareClassic Tag size. * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum MifareClassicSize { /** @@ -566,7 +601,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 */ MC_SIZE_MINI = 320, @@ -581,7 +617,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 */ MC_SIZE_1K = 1024, @@ -596,7 +633,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 */ MC_SIZE_2K = 2048, @@ -611,7 +649,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 */ MC_SIZE_4K = 4096 } @@ -626,10 +665,11 @@ declare namespace tag { /** * MifareUltralight Type definition * - * @enum { number } + * @enum { int } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ enum MifareUltralightType { /** @@ -643,7 +683,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 */ TYPE_UNKNOWN = 0, @@ -658,7 +699,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 */ TYPE_ULTRALIGHT = 1, @@ -673,7 +715,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 */ TYPE_ULTRALIGHT_C = 2 } @@ -723,7 +766,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getNfcA(tagInfo: TagInfo): NfcATag; @@ -772,7 +816,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getNfcB(tagInfo: TagInfo): NfcBTag; @@ -821,7 +866,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getNfcF(tagInfo: TagInfo): NfcFTag; @@ -870,7 +916,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getNfcV(tagInfo: TagInfo): NfcVTag; @@ -905,7 +952,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getIsoDep(tagInfo: TagInfo): IsoDepTag; @@ -940,7 +988,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getNdef(tagInfo: TagInfo): NdefTag; @@ -975,7 +1024,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getMifareClassic(tagInfo: TagInfo): MifareClassicTag; @@ -1010,7 +1060,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getMifareUltralight(tagInfo: TagInfo): MifareUltralightTag; @@ -1045,7 +1096,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getNdefFormatable(tagInfo: TagInfo): NdefFormatableTag; @@ -1064,7 +1116,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function getBarcodeTag(tagInfo: TagInfo): BarcodeTag; @@ -1093,7 +1146,8 @@ declare namespace tag { * @throws { BusinessError } 801 - Capability not supported. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function getTagInfo(want: Want): TagInfo; @@ -1118,7 +1172,7 @@ declare namespace tag { * * @permission ohos.permission.NFC_TAG * @param { ElementName } elementName - The element name of application, must include the bundleName and abilityName. - * @param { number[] } discTech - The technologies list to set for discovering. From {@link NFC_A} to {@link MIFARE_ULTRALIGHT}. + * @param { int[] } discTech - The technologies list to set for discovering. From {@link NFC_A} to {@link MIFARE_ULTRALIGHT}. * @param { AsyncCallback } callback - The callback to dispatched the TagInfo object for application. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -1130,11 +1184,12 @@ declare namespace tag { * @throws { BusinessError } 3100202 - The element state is invalid. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function registerForegroundDispatch( elementName: ElementName, - discTech: number[], + discTech: int[], callback: AsyncCallback ): void; @@ -1166,7 +1221,8 @@ declare namespace tag { * @throws { BusinessError } 3100201 - The tag running state is abnormal in the service. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function unregisterForegroundDispatch(elementName: ElementName): void; @@ -1194,7 +1250,7 @@ declare namespace tag { * @permission ohos.permission.NFC_TAG * @param { 'readerMode' } type - The callback type to be registered. * @param { ElementName } elementName - The element name of application, must include the bundleName and abilityName. - * @param { number[] } discTech - The technologies list to set for discovering. From {@link NFC_A} to {@link MIFARE_ULTRALIGHT}. + * @param { int[] } discTech - The technologies list to set for discovering. From {@link NFC_A} to {@link MIFARE_ULTRALIGHT}. * @param { AsyncCallback } callback - The callback to dispatched the TagInfo object for application. * @throws { BusinessError } 201 - Permission denied. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: @@ -1206,9 +1262,10 @@ declare namespace tag { * @throws { BusinessError } 3100202 - The element state is invalid. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - function on(type: 'readerMode', elementName: ElementName, discTech: number[], callback: AsyncCallback): void; + function on(type: 'readerMode', elementName: ElementName, discTech: int[], callback: AsyncCallback): void; /** * Disable foreground reader mode settings explicitly. @@ -1244,7 +1301,8 @@ declare namespace tag { * @throws { BusinessError } 3100203 - The off() API can be called only when the on() has been called. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function off(type: 'readerMode', elementName: ElementName, callback?: AsyncCallback): void; @@ -1265,7 +1323,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 { /** @@ -1279,12 +1338,13 @@ declare namespace tag { * The uid of this tag, it. * * @permission ohos.permission.NFC_TAG - * @type { number[] } + * @type { int[] } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - uid: number[]; + uid: int[]; /** * The supported technology list of this tag. @@ -1297,12 +1357,13 @@ declare namespace tag { * The supported technology list of this tag. * * @permission ohos.permission.NFC_TAG - * @type { number[] } + * @type { int[] } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - technology: number[]; + technology: int[]; /** * The extra data for each technology of this tag. @@ -1319,12 +1380,13 @@ declare namespace tag { * The the RF discovery id of this tag. * * @permission ohos.permission.NFC_TAG - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NFC.Tag * @systemapi hide for inner use. - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ - tagRfDiscId: number; + tagRfDiscId: int; /** * The extra data for the technology of this tag. @@ -1333,7 +1395,8 @@ declare namespace tag { * @type { rpc.RemoteObject } * @syscap SystemCapability.Communication.NFC.Tag * @systemapi hide for inner use. - * @since 9 + * @since arkts {'1.1':'9','1.2':'20'} + * @arkts 1.1&1.2 */ remoteTagService: rpc.RemoteObject; @@ -1362,7 +1425,8 @@ declare namespace tag { * @typedef NdefRecord * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export interface NdefRecord { /** @@ -1374,12 +1438,13 @@ declare namespace tag { /** * tnf of NdefRecord * - * @type { number } + * @type { int } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - tnf: number; + tnf: int; /** * RTD type of NdefRecord @@ -1391,12 +1456,13 @@ declare namespace tag { /** * RTD type of NdefRecord * - * @type { number[] } + * @type { int[] } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - rtdType: number[]; + rtdType: int[]; /** * id of NdefRecord @@ -1407,12 +1473,13 @@ declare namespace tag { /** * id of NdefRecord * - * @type { number[] } + * @type { int[] } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - id: number[]; + id: int[]; /** * payload of NdefRecord @@ -1423,12 +1490,13 @@ declare namespace tag { /** * payload of NdefRecord * - * @type { number[] } + * @type { int[] } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - payload: number[]; + payload: int[]; } /** @@ -1444,7 +1512,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 { /** @@ -1470,7 +1539,8 @@ declare namespace tag { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function makeUriRecord(uri: string): NdefRecord; @@ -1499,7 +1569,8 @@ declare namespace tag { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function makeTextRecord(text: string, locale: string): NdefRecord; @@ -1514,7 +1585,8 @@ declare namespace tag { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ function makeApplicationRecord(bundleName: string): NdefRecord; @@ -1535,7 +1607,7 @@ declare namespace tag { * Creates an NDEF record with mime data. * * @param { string } mimeType type of mime data for new an NDEF record. - * @param { number[] } mimeData mime data for new an NDEF record. + * @param { int[] } mimeData mime data for new an NDEF record. * @returns { NdefRecord } The instance of NdefRecord. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -1543,9 +1615,10 @@ declare namespace tag { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - function makeMimeRecord(mimeType: string, mimeData: number[]): NdefRecord; + function makeMimeRecord(mimeType: string, mimeData: int[]): NdefRecord; /** * Creates an NDEF record with external data. @@ -1566,7 +1639,7 @@ declare namespace tag { * * @param { string } domainName - Domain name of issuing organization for the external data. * @param { string } type - Domain specific type of data for the external data. - * @param { number[] } externalData - Data payload of an NDEF record. + * @param { int[] } externalData - Data payload of an NDEF record. * @returns { NdefRecord } The instance of NdefRecord. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -1574,9 +1647,10 @@ declare namespace tag { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - function makeExternalRecord(domainName: string, type: string, externalData: number[]): NdefRecord; + function makeExternalRecord(domainName: string, type: string, externalData: int[]): NdefRecord; /** * Creates an NDEF message with raw bytes. * @@ -1592,7 +1666,7 @@ declare namespace tag { /** * Creates an NDEF message with raw bytes. * - * @param { number[] } data - The raw bytes to parse NDEF message. + * @param { int[] } data - The raw bytes to parse NDEF message. * @returns { NdefMessage } The instance of NdefMessage. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. @@ -1600,9 +1674,10 @@ declare namespace tag { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - function createNdefMessage(data: number[]): NdefMessage; + function createNdefMessage(data: int[]): NdefMessage; /** * Creates an NDEF message with record list. @@ -1627,7 +1702,8 @@ declare namespace tag { *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ function createNdefMessage(ndefRecords: NdefRecord[]): NdefMessage; @@ -1644,16 +1720,17 @@ declare namespace tag { * Parses an NDEF message into raw bytes. * * @param { NdefMessage } ndefMessage - An NDEF message to parse. - * @returns { number[] } Returns the raw bytes of an NDEF message. + * @returns { int[] } Returns the raw bytes of an NDEF message. * @throws { BusinessError } 401 - The parameter check failed. Possible causes: *
1. Mandatory parameters are left unspecified. *
2. Incorrect parameters types. *
3. Parameter verification failed. * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ - function messageToBytes(ndefMessage: NdefMessage): number[]; + function messageToBytes(ndefMessage: NdefMessage): int[]; } /** @@ -1668,7 +1745,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 +1762,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 +1779,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 +1796,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 +1813,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 +1830,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 +1847,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 +1864,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 +1881,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; @@ -1806,7 +1892,8 @@ declare namespace tag { * @typedef { _BarcodeTag } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 18 + * @since arkts {'1.1':'18','1.2':'20'} + * @arkts 1.1&1.2 */ export type BarcodeTag = _BarcodeTag; @@ -1822,7 +1909,8 @@ declare namespace tag { * @typedef { _NdefMessage } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type NdefMessage = _NdefMessage; @@ -1838,7 +1926,8 @@ declare namespace tag { * @typedef { _TagSession } * @syscap SystemCapability.Communication.NFC.Tag * @atomicservice - * @since 12 + * @since arkts {'1.1':'12','1.2':'20'} + * @arkts 1.1&1.2 */ export type TagSession = _TagSession; } diff --git a/api/@ohos.notificationManager.d.ts b/api/@ohos.notificationManager.d.ts index 8761db8051e0deb0a64c2bfe3f1fc43ed068ea5a..eae77ed19eb1ca1ff3c13d0a07192848951973fa 100644 --- a/api/@ohos.notificationManager.d.ts +++ b/api/@ohos.notificationManager.d.ts @@ -1537,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; diff --git a/api/@ohos.pluginComponent.d.ts b/api/@ohos.pluginComponent.d.ts index b0666d852ad2fd587758bbfdd71c7dfc34d22a20..664140e643c2f50909aa8406fce14240bb9df528 100644 --- a/api/@ohos.pluginComponent.d.ts +++ b/api/@ohos.pluginComponent.d.ts @@ -18,9 +18,6 @@ * @kit ArkUI */ -import { AsyncCallback } from './@ohos.base'; -import Want from './@ohos.app.ability.Want'; - /** * Plugin component template property. * @@ -103,7 +100,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.promptAction.d.ts b/api/@ohos.promptAction.d.ts index b34241988724706a04e8b95583090b4f71a32706..479033fba043f247c42d70119cf373a4e7fdfd02 100644 --- a/api/@ohos.promptAction.d.ts +++ b/api/@ohos.promptAction.d.ts @@ -12,29 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - -/*** if arkts 1.1 */ import { AsyncCallback } from './@ohos.base'; -/*** endif */ - -/*** if arkts 1.2 */ -import { ResourceColor, Offset, Dimension, EdgeStyles, EdgeColors,EdgeWidths, BorderRadiuses } from './arkui/component/units'; -import { AsyncCallback, Callback } from './@ohos.base'; -import { BlurStyle, ShadowOptions, ShadowStyle, HoverModeAreaType, Rectangle, TransitionEffect, KeyboardAvoidMode, DismissReason, - BackgroundBlurStyleOptions, BackgroundEffectOptions } from './arkui/component/common'; -import { CustomBuilder } from './arkui/component/builder'; -import { DialogAlignment } from './arkui/component/alertDialog'; -import { DismissDialogAction } from './arkui/component/actionSheet'; -import { BorderStyle,Alignment } from './arkui/component/enums'; -import { Resource } from './global/resource'; -import { LengthMetrics } from './arkui/Graphics'; -/*** endif */ - /** * Define the display mode of all kind of dialog * @@ -42,33 +24,28 @@ import { LengthMetrics } from './arkui/Graphics'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ export enum LevelMode { - /** - * Display above all page levels. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - OVERLAY = 0, - - /** - * Display within the current page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - EMBEDDED = 1, + /** + * Display above all page levels. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + OVERLAY = 0, + /** + * Display within the current page. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + EMBEDDED = 1 } - /** * Define the immersive mode of all kind of dialog * @@ -76,70 +53,60 @@ export enum LevelMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 15 */ export enum ImmersiveMode { - /** - * Mask covering the parent node. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - DEFAULT = 0, - - /** - * Mask extend safe area includes status bar and navigation bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - EXTEND = 1, + /** + * Mask covering the parent node. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + DEFAULT = 0, + /** + * Mask extend safe area includes status bar and navigation bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 15 + */ + EXTEND = 1 } - /** * Defines level order. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 18 */ -export declare class LevelOrder { - /** - * Generate valid level order. - * - * @param { number } order - Clamp order with mininum number -100000 and maximum number 100000. - * @returns { LevelOrder } the order object. - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - static clamp(order: number): LevelOrder; - - /** - * Get the order from LevelOrder object. - * - * @returns { number } the order number. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - getOrder(): number; +export class LevelOrder { + /** + * Generate valid level order. + * + * @param { number } order - Clamp order with mininum number -100000 and maximum number 100000. + * @returns { LevelOrder } the order object. + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + static clamp(order: number): LevelOrder; + /** + * Get the order from LevelOrder object. + * + * @returns { number } the order number. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 18 + */ + getOrder(): number; } - /** * @namespace promptAction * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -156,2371 +123,2054 @@ export declare class LevelOrder { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare namespace promptAction { - /** - * @typedef ShowToastOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * @typedef ShowToastOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * @typedef ShowToastOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - export interface ShowToastOptions { - /** - * Text to display. - * - * @type { string | Resource } + * @typedef ShowToastOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 9 */ /** - * Text to display. - * - * @type { string | Resource } + * @typedef ShowToastOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * Text to display. - * - * @type { string | Resource } + * @typedef ShowToastOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - 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 - * @since 9 - */ - /** - * 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 - * @since 10 + * @since 11 */ - /** - * 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 } + interface ShowToastOptions { + /** + * Text to display. + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 9 + */ + /** + * Text to display. + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * 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 + * @since 9 + */ + /** + * 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 + * @since 10 + */ + /** + * 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 + * @since 9 + */ + /** + * The distance between toast dialog box and the bottom of screen. + * + * @type { ?(string | number) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * 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 + * @since 11 + */ + /** + * 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 display 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 arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - duration?: number; - /** - * The distance between toast dialog box and the bottom of screen. - * - * @type { ?(string | number) } + * 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 + * @since 11 + */ + /** + * 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 + * @since 11 + */ + /** + * 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 * @since 9 */ /** - * The distance between toast dialog box and the bottom of screen. - * - * @type { ?(string | number) } + * @typedef Button * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 10 */ /** - * The distance between toast dialog box and the bottom of screen. - * - * @type { ?(string | number) } + * @typedef Button * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - bottom?: string | number; - - /** - * Determine the show mode of the toast. - * - * @type { ?ToastShowMode } - * @default ToastShowMode.DEFAULT - * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 11 */ - /** - * Determine the show mode of the toast. - * - * @type { ?ToastShowMode } - * @default ToastShowMode.DEFAULT - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - showMode?: ToastShowMode; - /** - * Defines the toast alignment of the screen. - * - * @type { ?Alignment } + interface Button { + /** + * The text displayed in the button. + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 9 + */ + /** + * The text displayed in the button. + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * 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 + * @since 9 + */ + /** + * The foreground color of button. + * + * @type { string | Resource } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * 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 12 + */ + primary?: boolean; + } + /** + * @typedef ShowDialogSuccessResponse * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ - alignment?: Alignment; /** - * Defines the toast offset. - * - * @type { ?Offset } + * @typedef ShowDialogSuccessResponse * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ - offset?: Offset; /** - * Background color of toast. - * - * @type { ?ResourceColor } + * @typedef ShowDialogSuccessResponse * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - backgroundColor?: ResourceColor; - /** - * Text color of toast. - * - * @type { ?ResourceColor } + interface ShowDialogSuccessResponse { + /** + * Index of the selected button, starting from 0. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 9 + */ + /** + * Index of the selected button, starting from 0. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * 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 arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 9 */ - textColor?: ResourceColor; /** - * Background blur Style of toast. - * - * @type { ?BlurStyle } + * @typedef ShowDialogOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 10 */ - backgroundBlurStyle?: BlurStyle; /** - * Shadow of toast. - * - * @type { ?(ShadowOptions | ShadowStyle) } + * @typedef ShowDialogOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - shadow?: ShadowOptions | ShadowStyle; - - /** - * Define whether to respond to the hover mode. - * - * @type { ?boolean } - * @default false + interface ShowDialogOptions { + /** + * Title of the text to display. + * + * @type { ?(string | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @since 9 + */ + /** + * Title of the text to display. + * + * @type { ?(string | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * 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 + * @since 9 + */ + /** + * Text body. + * + * @type { ?(string | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @since 10 + */ + /** + * 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'}. + * One to three buttons are supported. + * The first button is of the positiveButton type, the second is of the negativeButton type, and the third is of the neutralButton type. + * + * @type { ?Array