diff --git a/.gitattributes b/.gitattributes index 51c63e295e0232f7095a8ee8e03713837e37f419..e723e1197d0db7c523e27d00cc64d13e847318fb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,3 +13,6 @@ *.so filter=lfs diff=lfs merge=lfs -text *.bin filter=lfs diff=lfs merge=lfs -text *.dll filter=lfs diff=lfs merge=lfs -text +OpenHarmony_Icons.zip filter=lfs diff=lfs merge=lfs -text +zip filter=lfs diff=lfs merge=lfs -text +figures/OpenHarmony_Icons.zip filter=lfs diff=lfs merge=lfs -text diff --git a/en/application-dev/application-models/access-dataability.md b/en/application-dev/application-models/access-dataability.md index 24dc9305f194a61c974c63db224f2e7727689f5f..b32d38354e7e67fb8757c022fc6e65c737bb297e 100644 --- a/en/application-dev/application-models/access-dataability.md +++ b/en/application-dev/application-models/access-dataability.md @@ -11,7 +11,7 @@ The basic dependency packages include: - @ohos.data.dataAbility -- @ohos.data.rdb +- @ohos.data.relationalStore The sample code for accessing a DataAbility is as follows: @@ -23,7 +23,7 @@ The sample code for accessing a DataAbility is as follows: // Different from the URI defined in the config.json file, the URI passed in the parameter has an extra slash (/), three slashes in total. import featureAbility from '@ohos.ability.featureAbility' import ohos_data_ability from '@ohos.data.dataAbility' - import ohos_data_rdb from '@ohos.data.rdb' + import relationalStore from '@ohos.data.relationalStore' let urivar = "dataability:///com.ix.DataAbility" let DAHelper = featureAbility.acquireDataAbilityHelper(urivar); diff --git a/en/application-dev/application-models/accessibilityextensionability.md b/en/application-dev/application-models/accessibilityextensionability.md index c14b4b95921f8adef52c83b20253d26b774b16fa..42968456fe88c836e5befe9c096eb2f3892729e1 100644 --- a/en/application-dev/application-models/accessibilityextensionability.md +++ b/en/application-dev/application-models/accessibilityextensionability.md @@ -1,4 +1,4 @@ -# AccessibilityExtensionAbility Development +# AccessibilityExtensionAbility The **AccessibilityExtensionAbility** module provides accessibility extension capabilities based on the **ExtensionAbility** framework. You can develop your accessibility applications by applying the **AccessibilityExtensionAbility** template to enhance usability. @@ -10,14 +10,6 @@ The **AccessibilityExtensionAbility** module provides accessibility extension ca > > Model: stage -This document is organized as follows: - -- [AccessibilityExtensionAbility Overview](#accessibilityextensionability-overview) -- [Creating an Accessibility Extension Service](#creating-an-accessibility-extension-service) -- [Processing an Accessibility Event](#processing-an-accessibility-event) -- [Declaring Capabilities of Accessibility Extension Services](#declaring-capabilities-of-accessibility-extension-services) -- [Enabling a Custom Accessibility Extension Service](#enabling-a-custom-accessibility-extension-service) - ## AccessibilityExtensionAbility Overview Accessibility is about giving equal access to everyone so that they can access and use information equally and conveniently under any circumstances. It helps narrow the digital divide between people of different classes, regions, ages, and health status in terms of information understanding, information exchange, and information utilization, so that they can participate in social life more conveniently and enjoy the benefits of technological advances. diff --git a/en/application-dev/application-models/application-context-fa.md b/en/application-dev/application-models/application-context-fa.md index 9f68b42a873782c9fd1693c73724354cbf347ced..7d39fb17878bb8f261eded88ae82faaff6ecd5dd 100644 --- a/en/application-dev/application-models/application-context-fa.md +++ b/en/application-dev/application-models/application-context-fa.md @@ -48,13 +48,13 @@ For details about the APIs, see [API Reference](../reference/apis/js-apis-inner- ```ts import featureAbility from '@ohos.ability.featureAbility' - import bundle from '@ohos.bundle'; + import bundleManager from '@ohos.bundle.bundleManager'; export default { onCreate() { // Obtain the context and call related APIs. let context = featureAbility.getContext(); - context.setDisplayOrientation(bundle.DisplayOrientation.LANDSCAPE).then(() => { + context.setDisplayOrientation(bundleManager.DisplayOrientation.LANDSCAPE).then(() => { console.info("Set display orientation.") }) console.info('Application onCreate') diff --git a/en/application-dev/application-models/application-context-stage.md b/en/application-dev/application-models/application-context-stage.md index 2063eee286c25e360a1700d3e1771d865b875f1c..8c26d7fbb70a19db0ab07ada99f4df8cc0b290df 100644 --- a/en/application-dev/application-models/application-context-stage.md +++ b/en/application-dev/application-models/application-context-stage.md @@ -1,16 +1,19 @@ # Context (Stage Model) + ## Overview -[Context](../reference/apis/js-apis-inner-application-context.md) is the context of an object in an application. It provides basic information about the application, for example, **resourceManager**, **applicationInfo**, **dir** (application development path), and **area** (encrypted level). It also provides basic methods such as **createBundleContext()** and **getApplicationContext()**. The UIAbility component and ExtensionAbility derived class components have their own **Context** classes, for example, the base class **Context**, **ApplicationContext**, **AbilityStageContext**, **UIAbilityContext**, **ExtensionContext**, and **ServiceExtensionContext**. +[Context](../reference/apis/js-apis-inner-application-context.md) is the context of an object in an application. It provides basic information about the application, for example, **resourceManager**, **applicationInfo**, **dir** (application file path), and **area** (encryption level). It also provides basic methods such as **createBundleContext()** and **getApplicationContext()**. The UIAbility component and ExtensionAbility derived class components have their own **Context** classes, for example, the base class **Context**, **ApplicationContext**, **AbilityStageContext**, **UIAbilityContext**, **ExtensionContext**, and **ServiceExtensionContext**. + +- The figure below illustrates the inheritance relationship of contexts. -- The figure below illustrates the inheritance relationship of contexts. ![context-inheritance](figures/context-inheritance.png) -- The figure below illustrates the holding relationship of contexts. - ![context-holding](figures/context-holding.png) +- The figure below illustrates the holding relationship of contexts. -The following describes the information provided by different contexts. + ![context-holding](figures/context-holding.png) + +- The following describes the information provided by different contexts. - [UIAbilityContext](../reference/apis/js-apis-inner-application-uiAbilityContext.md): Each UIAbility has the **Context** attribute, which provides APIs to operate an application component, obtain the application component configuration, and more. ```ts @@ -67,79 +70,81 @@ The following describes the information provided by different contexts. This topic describes how to use the context in the following scenarios: -- [Obtaining the Application Development Path](#obtaining-the-application-development-path) +- [Obtaining Application File Paths](#obtaining-application-file-paths) - [Obtaining and Modifying Encryption Levels](#obtaining-and-modifying-encryption-levels) - [Creating Context of Another Application or Module](#creating-context-of-another-application-or-module) - [Subscribing to UIAbility Lifecycle Changes in a Process](#subscribing-to-uiability-lifecycle-changes-in-a-process) -### Obtaining the Application Development Path +### Obtaining Application File Paths -The following table describes the application development paths obtained from context. +The base class [Context](../reference/apis/js-apis-inner-application-context.md) provides the capability of obtaining application file paths. **ApplicationContext**, **AbilityStageContext**, **UIAbilityContext**, and **ExtensionContext** inherit this capability. The application file paths are a type of application sandbox paths. For details, see [Application Sandbox Directory](../file-management/app-sandbox-directory.md). -**Table 1** Application development paths +The application file paths obtained by the preceding contexts are different. -| Name| Type| Readable| Writable| Description| -| -------- | -------- | -------- | -------- | -------- | -| bundleCodeDir | string | Yes | No | Path for storing the application's installation package, that is, installation directory of the application on the internal storage. | -| cacheDir | string | Yes| No| Path for storing the cache files, that is, cache directory of the application on the internal storage.
It is the content of **Storage** of an application under **Settings > Apps & services > Apps**.| -| filesDir | string | Yes | No | Path for storing the common files, that is, file directory of the application on the internal storage.
Files in this directory may be synchronized to other directories during application migration or backup.| -| preferencesDir | string | Yes | Yes | Path for storing the preference files, that is, preferences directory of the application. | -| tempDir | string | Yes | No | Path for storing the temporary files.
Files in this directory are deleted after the application is uninstalled.| -| databaseDir | string | Yes | No | Path for storing the application's database, that is, storage directory of the local database. | -| distributedFilesDir | string | Yes| No| Path for storing the distributed files.| +- The application file path obtained through **ApplicationContext** is at the application level. This path is recommended for storing global application information, and the files in the path will be deleted when the application is uninstalled. -The capability of obtaining the application development path is provided by the base class **Context**. This capability is also provided by **ApplicationContext**, **AbilityStageContext**, **UIAbilityContext**, and **ExtensionContext**. However, the paths obtained from different contexts may differ, as shown below. - -**Figure 1** Application development paths obtained from context - -![context-dir](figures/context-dir.png) - -- Obtain the application-level path through **ApplicationContext**. It is recommended that global application information be stored in this path. Files stored in this path will be deleted only when the application is uninstalled. - | Name| Path| - | -------- | -------- | - | bundleCodeDir | {Path prefix}/el1/bundle/| - | cacheDir | {Path prefix}/{Encryption level}/base/cache/| - | filesDir | {Path prefix}/{Encryption level}/base/files/| - | preferencesDir | {Path prefix}/{Encryption level}/base/preferences/| - | tempDir | {Path prefix}/{Encryption level}/base/temp/| - | databaseDir | {Path prefix}/{Encryption level}/database/| - | distributedFilesDir | {Path prefix}/el2/distributedFiles/| - -- Obtain the HAP level path through **AbilityStageContext**, **UIAbilityContext**, and **ExtensionContext**. It is recommended that the HAP information be stored in this path. The file content stored in this path will be deleted when the HAP is uninstalled. The file content in the application-level path will be deleted only after all the HAPs of the application are uninstalled. - | Name| Path| + | Name| Path| | -------- | -------- | - | bundleCodeDir | {Path prefix}/el1/bundle/| - | cacheDir | {Path prefix}/{Encryption level}/base/**haps/{moduleName}**/cache/| - | filesDir | {Path prefix}/{Encryption level}/base/**haps/{moduleName}**/files/| - | preferencesDir | {Path prefix}/{Encryption level}/base/**haps/{moduleName}**/preferences/| - | tempDir | {Path prefix}/{Encryption level}/base/**haps/{moduleName}**/temp/| - | databaseDir | {Path prefix}/{Encryption level}/database/**{moduleName}**/| - | distributedFilesDir | {Path prefix}/el2/distributedFiles/**{moduleName}**/| + | bundleCodeDir | /el1/bundle/| + | cacheDir | //base/cache/| + | filesDir | //base/files/| + | preferencesDir | //base/preferences/| + | tempDir | //base/temp/| + | databaseDir | //database/| + | distributedFilesDir | /el2/distributedFiles/| + + The sample code is as follows: + + ```ts + import UIAbility from '@ohos.app.ability.UIAbility'; + + export default class EntryAbility extends UIAbility { + onCreate(want, launchParam) { + let applicationContext = this.context.getApplicationContext(); + let cacheDir = applicationContext.cacheDir; + let tempDir = applicationContext.tempDir; + let filesDir = applicationContext.filesDir; + let databaseDir = applicationContext.databaseDir; + let bundleCodeDir = applicationContext.bundleCodeDir; + let distributedFilesDir = applicationContext.distributedFilesDir; + let preferencesDir = applicationContext.preferencesDir; + ... + } + } + ``` -The sample code for obtaining the application development paths is as follows: +- The application file path obtained through **AbilityStageContext**, **UIAbilityContext**, or **ExtensionContext** is at the HAP level. This path is recommended for storing HAP-related information, and the files in this path are deleted when the HAP is uninstalled. However, the deletion does not affect the files in the application-level path unless all HAPs of the application are uninstalled. + | Name| Path| + | -------- | -------- | + | bundleCodeDir | /el1/bundle/| + | cacheDir | //base/**haps/\**/cache/| + | filesDir | //base/**haps/\**/files/| + | preferencesDir | //base/**haps/\**/preferences/| + | tempDir | //base/**haps/\**/temp/| + | databaseDir | //database/**\**/| + | distributedFilesDir | /el2/distributedFiles/**\**/| -```ts -import UIAbility from '@ohos.app.ability.UIAbility'; + The sample code is as follows: -export default class EntryAbility extends UIAbility { - onCreate(want, launchParam) { - let cacheDir = this.context.cacheDir; - let tempDir = this.context.tempDir; - let filesDir = this.context.filesDir; - let databaseDir = this.context.databaseDir; - let bundleCodeDir = this.context.bundleCodeDir; - let distributedFilesDir = this.context.distributedFilesDir; - let preferencesDir = this.context.preferencesDir; - ... + ```ts + import UIAbility from '@ohos.app.ability.UIAbility'; + + export default class EntryAbility extends UIAbility { + onCreate(want, launchParam) { + let cacheDir = this.context.cacheDir; + let tempDir = this.context.tempDir; + let filesDir = this.context.filesDir; + let databaseDir = this.context.databaseDir; + let bundleCodeDir = this.context.bundleCodeDir; + let distributedFilesDir = this.context.distributedFilesDir; + let preferencesDir = this.context.preferencesDir; + ... + } } -} -``` + ``` -> **NOTE** -> -> The sample code obtains the sandbox path of the application development path. The absolute path can be obtained by running the **find / -name ** command in the hdc shell after file creation or modification. ### Obtaining and Modifying Encryption Levels @@ -153,22 +158,23 @@ In practice, you need to select a proper encryption level based on scenario-spec > > - AreaMode.EL2: user-level encryption. Directories with this encryption level are accessible only after the device is powered on and the password is entered (for the first time). -You can obtain and set the encryption level by reading and writing the [area attribute in Context](../reference/apis/js-apis-inner-application-context.md). +You can obtain and set the encryption level by reading and writing the **area** attribute in [Context](../reference/apis/js-apis-inner-application-context.md). ```ts import UIAbility from '@ohos.app.ability.UIAbility'; +import contextConstant from '@ohos.app.ability.contextConstant'; export default class EntryAbility extends UIAbility { onCreate(want, launchParam) { // Before storing common information, switch the encryption level to EL1. - if (this.context.area === 1) {// Obtain the area. - this.context.area = 0; // Modify the area. + if (this.context.area === contextConstant.AreaMode.EL2) { // Obtain the area. + this.context.area = contextConstant.AreaMode.EL1; // Modify the area. } // Store common information. // Before storing sensitive information, switch the encryption level to EL2. - if (this.context.area === 0) { // Obtain the area. - this.context.area = 1; // Modify the area. + if (this.context.area === contextConstant.AreaMode.EL1) { // Obtain the area. + this.context.area = contextConstant.AreaMode.EL2; // Modify the area. } // Store sensitive information. } @@ -178,7 +184,7 @@ export default class EntryAbility extends UIAbility { ### Creating Context of Another Application or Module -The base class **Context** provides [createBundleContext(bundleName:string)](../reference/apis/js-apis-inner-application-context.md#contextcreatebundlecontext), [createModuleContext(moduleName:string)](../reference/apis/js-apis-inner-application-context.md#contextcreatemodulecontext), and [createModuleContext(bundleName:string, moduleName:string)](../reference/apis/js-apis-inner-application-context.md#contextcreatemodulecontext-1) to create the context of other applications or modules, so as to obtain the resource information, for example, [obtaining the application development paths](#obtaining-the-application-development-path) of other modules. +The base class **Context** provides [createBundleContext(bundleName:string)](../reference/apis/js-apis-inner-application-context.md#contextcreatebundlecontext), [createModuleContext(moduleName:string)](../reference/apis/js-apis-inner-application-context.md#contextcreatemodulecontext), and [createModuleContext(bundleName:string, moduleName:string)](../reference/apis/js-apis-inner-application-context.md#contextcreatemodulecontext-1) to create the context of other applications or modules, so as to obtain the resource information, for example, [obtaining application file paths](#obtaining-application-development-paths) of other modules. - Call **createBundleContext(bundleName:string)** to create the context of another application. > **NOTE** @@ -188,9 +194,9 @@ The base class **Context** provides [createBundleContext(bundleName:string)](../ > - Request the **ohos.permission.GET_BUNDLE_INFO_PRIVILEGED** permission. For details, see [Declaring Permissions in the Configuration File](../security/accesstoken-guidelines.md#declaring-permissions-in-the-configuration-file). > > - This is a system API and cannot be called by third-party applications. - + For example, application information displayed on the home screen includes the application name and icon. The home screen application calls the foregoing method to obtain the context information, so as to obtain the resource information including the application name and icon. - + ```ts import UIAbility from '@ohos.app.ability.UIAbility'; @@ -203,7 +209,7 @@ The base class **Context** provides [createBundleContext(bundleName:string)](../ } } ``` - + - Call **createModuleContext(bundleName:string, moduleName:string)** to obtain the context of a specified module of another application. After obtaining the context, you can obtain the resource information of that module. > **NOTE** > diff --git a/en/application-dev/application-models/arkts-ui-widget-working-principles.md b/en/application-dev/application-models/arkts-ui-widget-working-principles.md index a0edb6c6c68d9ada32cd3ff34f5117d5cc012ed6..b1b09dc409380da8e530f571b2e5711ec63edd10 100644 --- a/en/application-dev/application-models/arkts-ui-widget-working-principles.md +++ b/en/application-dev/application-models/arkts-ui-widget-working-principles.md @@ -3,42 +3,45 @@ ## Implementation Principles - **Figure 1** ArkTS widget implementation principles +**Figure 1** ArkTS widget implementation principles + ![WidgetPrinciple](figures/WidgetPrinciple.png) - Widget host: an application that displays the widget content and controls the widget location. Only the system application can function as a widget host. - Widget provider: an application that provides the widget content to display and controls how widget components are laid out and how they interact with users. -- Widget Manager: a resident agent that manages widgets in the system. It provides the [formProvider](../reference/apis/js-apis-app-form-formProvider.md) and [formHost](../reference/apis/js-apis-app-form-formHost.md) APIs as well as widget management, usage, and periodic updates. +- Widget Manager: a resident agent that manages widgets in the system. It provides the [formProvider](../reference/apis/js-apis-app-form-formProvider.md) and [formHost](../reference/apis/js-apis-app-form-formHost.md) APIs as well as the APIs for widget management, usage, and periodic updates. - Widget rendering service: a service that manages widget rendering instances. Widget rendering instances are bound to the [widget components](../reference/arkui-ts/ts-basic-components-formcomponent.md) on the widget host on a one-to-one basis. The widget rendering service runs the widget page code **widgets.abc** for rendering, and sends the rendered data to the corresponding widget component on the widget host. **Figure 2** Working principles of the ArkTS widget rendering service ![WidgetRender](figures/WidgetRender.png) -Unlike JS widgets, ArkTS widgets support logic code running. To avoid potential ArkTS widget issues from affecting the use of applications, the widget page code **widgets.abc** is executed by the widget rendering service, which is managed by the Widget Manager. Each widget component of a widget host corresponds to a rendering instance in the widget rendering service. Rendering instances of an application provider run in the same virtual machine operating environment, and rendering instances of different application providers run in different virtual machine operating environments. In this way, the resources and state data are isolated between widgets of different application providers. During development, pay attention to the use of the [globalThis](uiability-data-sync-with-ui.md#using-globalthis-between-uiability-and-page) object. Use one **globalThis** object for widgets by the same application provider, and different **globalThis** objects for widgets by different application providers. +Unlike JS widgets, ArkTS widgets support logic code running. The widget page code **widgets.abc** is executed by the widget rendering service, which is managed by the Widget Manager. Each widget component of a widget host corresponds to a rendering instance in the widget rendering service. Rendering instances of a widget provider run in the same virtual machine operating environment, and rendering instances of different widget providers run in different virtual machine operating environments. In this way, the resources and state data are isolated between widgets of different widget providers. During development, pay attention to the use of the [globalThis](uiability-data-sync-with-ui.md#using-globalthis-between-uiability-and-page) object. Use one **globalThis** object for widgets from the same widget provider, and different **globalThis** objects for widgets from different widget providers. ## Advantages of ArkTS Widgets -As a quick entry to applications, ArkTS widgets have the following advantages over JS widgets: +As a quick entry to applications, ArkTS widgets outperform JS widgets in the following aspects: - Improved development experience and efficiency, thanks to the unified development paradigm + ArkTS widgets share the same declarative UI development framework as application pages. This means that the page layouts can be directly reused in widgets, improving development experience and efficiency. - - **Figure 3** Comparison of widget project structures + + **Figure 3** Comparison of widget project structures + ![WidgetProject](figures/WidgetProject.png) - + - More widget features - - Animation: The ArkTS widget supports the [attribute animation](../reference/arkui-ts/ts-animatorproperty.md) and [explicit animation](../reference/arkui-ts/ts-explicit-animation.md) capabilities, which can be leveraged to deliver a more engaging experience. - - Custom drawing: The ArkTS widget allows you to draw graphics with the [Canvas](../reference/arkui-ts/ts-components-canvas-canvas.md) component to present information more vividly. - - Logic code execution: The capability to run logic code in widgets means that service logic can be self-closed in widgets, expanding the service application scenarios of widgets. + - Animation: ArkTS widgets support the [attribute animation](../reference/arkui-ts/ts-animatorproperty.md) and [explicit animation](../reference/arkui-ts/ts-explicit-animation.md) capabilities, which can be leveraged to deliver a more engaging experience. + - Custom drawing: ArkTS widgets allow you to draw graphics with the [\](../reference/arkui-ts/ts-components-canvas-canvas.md) component to present information more vividly. + - Logic code execution: The capability to run logic code in widgets means that service logic can be self-closed in widgets, expanding the use cases of widgets. ## Constraints on ArkTS Widgets -Compared with JS widgets, ArkTS widgets provide more capabilities, but they are also more prone to malicious behavior. The ArkTS widget is displayed in the widget host, which is usually the home screen. To ensure user experience and power consumption, the ArkTS widget capability is restricted as follows: +Compared with JS widgets, ArkTS widgets provide more capabilities, but they are also more prone to malicious behavior. To account for the impact on the widget host – typically the home screen, ArkTS widgets are subject to the following restrictions: - The .so file cannot be loaded. @@ -46,12 +49,14 @@ Compared with JS widgets, ArkTS widgets provide more capabilities, but they are - Only [partial](arkts-ui-widget-page-overview.md) components, events, animations, data management, state management, and API capabilities of the declarative paradigm are supported. -- The event processing of the widget is independent of that of the widget host. It is recommended that you do not use the left and right sliding components when the widget host supports left and right swipes to prevent gesture conflicts. +- The event processing of the widget is independent of that of the widget host. To prevent gesture conflicts, avoid using swipers in the widget when the widget host supports left and right swipes. -The following features are coming to ArkTS widgets in later versions: +In addition, ArkTS widgets do not support the following features: -- Breakpoint debugging - -- import statements +- Importing modules - Instant preview + +- Breakpoint debugging. + +- Hot reload diff --git a/en/application-dev/application-models/connect-serviceability.md b/en/application-dev/application-models/connect-serviceability.md index ac2acb898a3bd7ef905b8a33dc10f7980ce74548..15f98d123ad241646cc423a512ab49e6dccf5c50 100644 --- a/en/application-dev/application-models/connect-serviceability.md +++ b/en/application-dev/application-models/connect-serviceability.md @@ -16,14 +16,14 @@ The following sample code enables the PageAbility to create connection callback ```ts import rpc from "@ohos.rpc" -import prompt from '@system.prompt' +import promptAction from '@ohos.promptAction' import featureAbility from '@ohos.ability.featureAbility' let option = { onConnect: function onConnectCallback(element, proxy) { console.info(`onConnectLocalService onConnectDone`) if (proxy === null) { - prompt.showToast({ + promptAction.showToast({ message: "Connect service failed" }) return @@ -33,19 +33,19 @@ let option = { let option = new rpc.MessageOption() data.writeInterfaceToken("connect.test.token") proxy.sendRequest(0, data, reply, option) - prompt.showToast({ + promptAction.showToast({ message: "Connect service success" }) }, onDisconnect: function onDisconnectCallback(element) { console.info(`onConnectLocalService onDisconnectDone element:${element}`) - prompt.showToast({ + promptAction.showToast({ message: "Disconnect service success" }) }, onFailed: function onFailedCallback(code) { console.info(`onConnectLocalService onFailed errCode:${code}`) - prompt.showToast({ + promptAction.showToast({ message: "Connect local service onFailed" }) } diff --git a/en/application-dev/application-models/create-dataability.md b/en/application-dev/application-models/create-dataability.md index 488b0593dbdc23bc1e6ea30c17f9165a92c79f20..f7eceab4da4711b15bd94bb0d61ef99c62521286 100644 --- a/en/application-dev/application-models/create-dataability.md +++ b/en/application-dev/application-models/create-dataability.md @@ -9,18 +9,18 @@ The following sample code shows how to create a DataAbility: ```ts import featureAbility from '@ohos.ability.featureAbility' import dataAbility from '@ohos.data.dataAbility' -import dataRdb from '@ohos.data.rdb' +import relationalStore from '@ohos.data.relationalStore' const TABLE_NAME = 'book' const STORE_CONFIG = { name: 'book.db' } const SQL_CREATE_TABLE = 'CREATE TABLE IF NOT EXISTS book(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, introduction TEXT NOT NULL)' -let rdbStore: dataRdb.RdbStore = undefined +let rdbStore: relationalStore.RdbStore = undefined export default { onInitialized(abilityInfo) { console.info('DataAbility onInitialized, abilityInfo:' + abilityInfo.bundleName) let context = featureAbility.getContext() - dataRdb.getRdbStore(context, STORE_CONFIG, 1, (err, store) => { + relationalStore.getRdbStore(context, STORE_CONFIG, (err, store) => { console.info('DataAbility getRdbStore callback') store.executeSql(SQL_CREATE_TABLE, []) rdbStore = store diff --git a/en/application-dev/application-models/figures/WidgetPrinciple.png b/en/application-dev/application-models/figures/WidgetPrinciple.png index 588975d0095de58d0d220809ba77aec541a64984..68ca315394fe2cb5bd2580ca6df38b9940ac1349 100644 Binary files a/en/application-dev/application-models/figures/WidgetPrinciple.png and b/en/application-dev/application-models/figures/WidgetPrinciple.png differ diff --git a/en/application-dev/application-models/figures/WidgetProject.png b/en/application-dev/application-models/figures/WidgetProject.png index 788bb3ac63ca5727527bd104f76689f762b7b33d..299eed75fc1edfd9557e0fe743facb0e9c8d94b2 100644 Binary files a/en/application-dev/application-models/figures/WidgetProject.png and b/en/application-dev/application-models/figures/WidgetProject.png differ diff --git a/en/application-dev/application-models/figures/WidgetRender.png b/en/application-dev/application-models/figures/WidgetRender.png index 228128b143995fec75c71c4172e3d90ca15177f6..0f46bd74b0e48ac0c9f947d96d5e147786f547c0 100644 Binary files a/en/application-dev/application-models/figures/WidgetRender.png and b/en/application-dev/application-models/figures/WidgetRender.png differ diff --git a/en/application-dev/application-models/mission-set-icon-name-for-task-snapshot.md b/en/application-dev/application-models/mission-set-icon-name-for-task-snapshot.md index a5da1eeaa1d232b943f388b714b5a06f10d77be0..d758de4763e2933d09b7bcb8750f502d0c593800 100644 --- a/en/application-dev/application-models/mission-set-icon-name-for-task-snapshot.md +++ b/en/application-dev/application-models/mission-set-icon-name-for-task-snapshot.md @@ -17,11 +17,13 @@ This document describes the following operations: ## Setting a Mission Snapshot Icon (for System Applications Only) -Call [UIAbilityContext.setMissionIcon()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextsetmissionicon) to set the icon of a mission snapshot. The icon is an object of the [PixelMap](../reference/apis/js-apis-image.md#pixelmap7) type. For details about how to obtain the context, see [Obtaining the Context of UIAbility](uiability-usage.md#obtaining-the-context-of-uiability). +Call [UIAbilityContext.setMissionIcon()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextsetmissionicon) to set the icon of a mission snapshot. For details about how to obtain the context, see [Obtaining the Context of UIAbility](uiability-usage.md#obtaining-the-context-of-uiability). For details about how to obtain the PixelMap information in the example, see [Image Decoding](../media/image-decoding.md). + ```ts -let imagePixelMap: PixelMap = undefined; // Obtain the PixelMap information. +let context = ...; // UIAbilityContext +let pixelMap: PixelMap =...; // PixelMap information of the image. -context.setMissionIcon(imagePixelMap, (err) => { +context.setMissionIcon(pixelMap, (err) => { if (err.code) { console.error(`Failed to set mission icon. Code is ${err.code}, message is ${err.message}`); } @@ -31,7 +33,6 @@ context.setMissionIcon(imagePixelMap, (err) => { The display effect is shown below. Figure 2 Mission snapshot icon - ![](figures/mission-set-task-snapshot-icon.png) ## Setting a Mission Snapshot Name @@ -39,7 +40,9 @@ Figure 2 Mission snapshot icon Call [UIAbilityContext.setMissionLabel()](../reference/apis/js-apis-inner-application-uiAbilityContext.md#uiabilitycontextsetmissionlabel) to set the name of a mission snapshot. ```ts -this.context.setMissionLabel('test').then(() => { +let context = ...; // UIAbilityContext + +context.setMissionLabel('test').then(() => { console.info('Succeeded in seting mission label.'); }).catch((err) => { console.error(`Failed to set mission label. Code is ${err.code}, message is ${err.message}`); @@ -49,5 +52,4 @@ this.context.setMissionLabel('test').then(() => { The display effect is shown below. Figure 3 Mission snapshot name - ![](figures/mission-set-task-snapshot-label.png) diff --git a/en/application-dev/application-models/process-model-stage.md b/en/application-dev/application-models/process-model-stage.md index cf758d94636773dfd190366d0e215de655902abd..f8e78ed82a707c61603e73fc08b7287aac6abff0 100644 --- a/en/application-dev/application-models/process-model-stage.md +++ b/en/application-dev/application-models/process-model-stage.md @@ -5,12 +5,11 @@ The OpenHarmony process model is shown below. - All UIAbility, ServiceExtensionAbility, and DataShareExtensionAbility components of an application (with the same bundle name) run in an independent process, which is **Main process** in green in the figure. - -- The ExtensionAbility components of the same type (except ServiceExtensionAbility and DataShareExtensionAbility) of an application (with the same bundle name) run in an independent process, which is **FormExtensionAbility process**, **InputMethodExtensionAbility process**, and other **ExtensionAbility process** in blue in the figure. - +- All ExtensionAbility components of the same type (except ServiceExtensionAbility and DataShareExtensionAbility) of an application (with the same bundle name) run in an independent process, which is **FormExtensionAbility process**, **InputMethodExtensionAbility process**, and other **ExtensionAbility process** in blue in the figure. - WebView has an independent rendering process, which is **Render process** in yellow in the figure. - **Figure 1** Process model +**Figure 1** Process model + ![process-model](figures/process-model.png) > NOTE @@ -20,7 +19,8 @@ The OpenHarmony process model is shown below. A system application can apply for multi-process permissions (as shown in the following figure) and configure a custom process for an HAP. UIAbility, DataShareExtensionAbility, and ServiceExtensionAbility in the HAP run in the custom process. Different HAPs run in different processes by configuring different process names. -**Figure 2** Multi-process +**Figure 2** Multi-process + ![multi-process](figures/multi-process.png) diff --git a/en/application-dev/application-models/thread-model-stage.md b/en/application-dev/application-models/thread-model-stage.md index 2b1f855980a14eeba89a18184c69d46eebaea6ac..cc9cf2a3548f4719d116b317e80d7b0ecc0e8769 100644 --- a/en/application-dev/application-models/thread-model-stage.md +++ b/en/application-dev/application-models/thread-model-stage.md @@ -4,19 +4,18 @@ For an OpenHarmony application, each process has a main thread to provide the fo - Draw the UI. - Manage the ArkTS engine instance of the main thread so that multiple UIAbility components can run on it. -- Manage ArkTS engine instances of other threads (such as the worker thread), for example, starting and terminating other threads. +- Manage ArkTS engine instances of other threads, for example, starting and terminating other threads. - Distribute interaction events. - Process application code callbacks (event processing and lifecycle management). - Receive messages sent by the worker thread. In addition to the main thread, there is an independent thread, named worker. The worker thread is mainly used to perform time-consuming operations. The worker thread is created in the main thread and is independent from the main thread. It cannot directly operate the UI. A maximum of seven worker threads can be created. - ![thread-model-stage](figures/thread-model-stage.png) Based on the OpenHarmony thread model, different services run on different threads. Service interaction requires inter-thread communication. In the same process, threads can communicate with each other in Emitter or Worker mode. Emitter is mainly used for event synchronization between threads, and Worker is mainly used to execute time-consuming tasks. > **NOTE** -> +> > - The stage model provides only the main thread and worker thread. Emitter is mainly used for event synchronization within the worker thread or between the main thread and worker thread. > - The UIAbility and UI are in the main thread. For details about data synchronization between them, see [Data Synchronization Between UIAbility and UI](uiability-data-sync-with-ui.md). > - To view thread information about an application process, run the **hdc shell** command to enter the shell CLI of the device, and then run the **ps -p ** -T command**, where ** indicates the [process ID](process-model-stage.md) of the application. diff --git a/en/application-dev/application-models/widget-development-fa.md b/en/application-dev/application-models/widget-development-fa.md index 3aa1a9fd29495b36a02d155e5d2ad48e94bce5ad..5405cf30050269a97039bc2e9d898da7b5ee1dc8 100644 --- a/en/application-dev/application-models/widget-development-fa.md +++ b/en/application-dev/application-models/widget-development-fa.md @@ -115,7 +115,7 @@ To create a widget in the FA model, implement the widget lifecycle callbacks. Ge import formBindingData from '@ohos.app.form.formBindingData'; import formInfo from '@ohos.app.form.formInfo'; import formProvider from '@ohos.app.form.formProvider'; - import dataStorage from '@ohos.data.storage'; + import dataPreferences from '@ohos.data.preferences'; ``` 2. Implement the widget lifecycle callbacks in **form.ts**. @@ -265,7 +265,7 @@ async function storeFormInfo(formId: string, formName: string, tempFlag: boolean "updateCount": 0 }; try { - const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); + const storage = await dataPreferences.getPreferences(this.context, DATA_STORAGE_PATH); // Put the widget information. await storage.put(formId, JSON.stringify(formInfo)); console.info(`storeFormInfo, put form info successfully, formId: ${formId}`); @@ -303,7 +303,7 @@ You should override **onDestroy** to implement widget data deletion. const DATA_STORAGE_PATH = "/data/storage/el2/base/haps/form_store"; async function deleteFormInfo(formId: string) { try { - const storage = await dataStorage.getStorage(DATA_STORAGE_PATH); + const storage = await dataPreferences.getPreferences(this.context, DATA_STORAGE_PATH); // Delete the widget information. await storage.delete(formId); console.info(`deleteFormInfo, del form info successfully, formId: ${formId}`); diff --git a/en/application-dev/faqs/Readme-EN.md b/en/application-dev/faqs/Readme-EN.md index 195bfc2294b5ba41c00d20bf5b7dec7938248c90..f8be4624e327beb9af4c69ec3ef077e8193149f8 100644 --- a/en/application-dev/faqs/Readme-EN.md +++ b/en/application-dev/faqs/Readme-EN.md @@ -27,4 +27,5 @@ - [Startup Development](faqs-startup.md) - [Distributed Device Development](faqs-distributed-device-profile.md) - [SDK Usage](faqs-sdk.md) +- [Compiler Runtime](faqs-compiler-runtime.md) - [Usage of Third- and Fourth-Party Libraries](faqs-third-fourth-party-library.md) \ No newline at end of file diff --git a/en/application-dev/faqs/faqs-ability-access-control.md b/en/application-dev/faqs/faqs-ability-access-control.md index 51b3310de190a521b47471d607134c014a79be8c..ab1786a5676957768211fb4884d4d5d42d2018a3 100644 --- a/en/application-dev/faqs/faqs-ability-access-control.md +++ b/en/application-dev/faqs/faqs-ability-access-control.md @@ -1,7 +1,50 @@ -# Ability Access Control Development +# Application Access Control Development ## Can the app listen for the permission change after its permission is modified in Settings? Applicable to: OpenHarmony 3.1 Beta 5 (API version 9) Third-party apps cannot listen for the permission change. + +## Why is there no pop-up window displayed when an app applies for the **ohos.permission.LOCATION** permission? + +Applicable to: OpenHarmony 3.2 Release (API version 9) + +Applications developed using SDKs earlier than API version 9 can directly apply for the **ohos.permission.LOCATION** permission. +For the applications developed using the SDK of API version 9 or later, you need to apply for **ohos.permission.APPROXIMATELY_LOCATION** and then **ohos.permission.LOCATION**. + +**References** + +[Application Permission List](../security/permission-list.md#ohospermissionlocation) + +## What can I do to prevent the application from crashing when the application is started again after the user denies the permission requested? + +Applicable to: OpenHarmony SDK 3.2 Beta5 + +**Possible Causes** + +- If the permission required by a service is rejected by the user, the system directly returns the result and will no longer display a dialog box to request the permission. +- If related judgment is not performed after the permission is requested, the application will be rejected due to lack of the corresponding permission when accessing the target object under permission control, and terminated unexpectedly. + +**Solution** + +1. Before allowing an application to call an API protected by certain permission, verify whether the application has the permission. If the application has the permission, the application can call the API. Otherwise, a dialog box is dipslayed to ask user authorization. + +2. If the user rejects to grant the permission, ensure that other functions irrelevant to this permission are not affected. + +3. When this service is triggered again by the user or to implement a service function, on-screen message shall be provided to guide the user to grant the permission in **Settings**. + +**References** + +[Access Control (Permission) Overview](../security/accesstoken-overview.md) + +## What are the differences between **extensionAbilities** and **requestPermissions** in the **module.json5** file? + +Applicable to: OpenHarmony SDK 3.2 Beta5 + +- **requestPermissions**: specifies all the permissions required by an application for running. The permissions take effect only after being configured (declared) in the **module.json5** file. +- **extensionAbilitie.permissions**: specifies the permissions customized by the ExtensionAbility component. These permissions are required when an application needs to access the ExtensionAbility component. **extensionAbilitie.permissions** is used for permission verification only. + +**References** + +[module.json5 Configuration File](../quick-start/module-configuration-file.md) diff --git a/en/application-dev/faqs/faqs-compiler-runtime.md b/en/application-dev/faqs/faqs-compiler-runtime.md new file mode 100644 index 0000000000000000000000000000000000000000..b706212b5f008e00a033803fdd39bae1e78fa7bd --- /dev/null +++ b/en/application-dev/faqs/faqs-compiler-runtime.md @@ -0,0 +1,17 @@ +# Compiler Runtime + +## What if a crash occurs when I obtain a string in JSON format from rawfile, convert the string into an object, and call the instance method? + +Applicable to: OpenHarmony 3.2 Beta (API version 9) + +**Symptom** + +"jscrash happened in xxxxxxxxx" is displayed, and the crash log contains "Error message: Unexpected Object in JSON". + +**Solution** + +The prototype of the object obtained by parsing the string in JSON format is object. The prototype chain does not contain the instance method. Therefore, the object cannot be called. + +To solve this problem, use either of the following methods: +1. Add the prototype to the parsed object. +2. Change the instance method to a static method and call it through the class name. diff --git a/en/application-dev/faqs/faqs-distributed-data-management.md b/en/application-dev/faqs/faqs-distributed-data-management.md index c44b7b254ae85280e00430621845dd82d7e2fca6..535ea1032f640b0b227c444f8422dbd8bd39c385 100644 --- a/en/application-dev/faqs/faqs-distributed-data-management.md +++ b/en/application-dev/faqs/faqs-distributed-data-management.md @@ -25,8 +25,6 @@ An error is reported when the **TRUNCATE TABLE** statement is used to clear tabl The RDB store uses SQLite and does not support the **TRUNCATE TABLE** statement. To clear a table in an RDB store, use the **DELETE** statement, for example, **DELETE FROM sqlite\_sequence WHERE name = 'table\_name'**. - - ## What data types does an RDB store support? Applicable to: OpenHarmony SDK 3.0 or later, API version 9 stage model @@ -35,13 +33,43 @@ Applicable to: OpenHarmony SDK 3.0 or later, API version 9 stage model An RDB store supports data of the number, string, and Boolean types. The number type supports data of the Double, Long, Float, Int, or Int64 type, with a maximum precision of 17 decimal digits. -## How do I save pixel map data to a database? +## How do I persist application data? Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) -**Symptom** +**Solution** + +You can use the **PersistentStorage** class to implement application data persistence. You can link the persistent data with specific tags to **AppStorage**, and invoke **AppStorage** APIs to access the persistent data. Persistent data is stored in a local XML file in **/data/app/el2/100/base//haps//files/persistent\_storage**. + +Example: + +``` +AppStorage.Link('varA') +PersistentStorage.PersistProp("varA", "111"); +@Entry +@Component +struct Index { + @StorageLink('varA') varA: string = '' + build() { + Column() { + Text('varA: ' + this.varA).fontSize(20) + Button('Set').width(100).height(100).onClick(() => { + this.varA += '333' + }) + } + .width('100%') + .height('100%') + } +} +``` + +**Reference** + +[Persistent Data Management\(OpenHarmony\)](../quick-start/arkts-persiststorage.md) + +## How do I save pixel map data to a database? -Pixel map data fails to be stored. +Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) **Solution** @@ -55,6 +83,10 @@ Convert the pixel map data into an **ArrayBuffer** and save the **ArrayBuffer** Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) +**Symptom** + +Problem of obtaining RDB store files. + **Solution** The RDB store files are stored in **/data/app/el2/100/database/*Bundle_name*/entry/rdb/**. You can use the hdc command to copy the file from the directory and use a SQLite tool to open the file. @@ -69,6 +101,10 @@ Example: Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) +**Symptom** + +I do not know whether I need to design a lock mechanism for databases in development. + **Solution** The distributed data service (DDS), RDB store, and preferences provided OpenHarmony have a lock mechanism. You do not need to bother with the lock mechanism during the development. @@ -97,5 +133,26 @@ In API version 8, large text files cannot be saved in RDB stores. **Solution** In versions earlier than API version 9, the maximum length of a text file is 1024 bytes. If the text file exceeds 1024 bytes, it cannot be saved. - The limit on the text file size has been removed since API9 version. + +## What if **undefined** is returned by **Preferences.get** after **Preferences.put()** is successfully called? + +Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) + +**Symptom** + +Data is successfully saved using **preferences**, but fails to be obtained. + +**Solution** + +1. After **put()** is performed, use **flush()** to persist the data. + +2. Wait until the **flush()** asynchronous operation is complete, and call **get()**. + +## Can I specify the in-memory database mode when using an RDB store? + +Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) + +**Solution** + +RDB stores use SQLite. The default in-memory database mode is file, which cannot be modified. diff --git a/en/application-dev/faqs/faqs-file-management.md b/en/application-dev/faqs/faqs-file-management.md index 85763b7eb00f9b8805786e80c208ea4059e8bb0e..cde6bc923758c8a4bbae471b768bf7dcf4d5a2c4 100644 --- a/en/application-dev/faqs/faqs-file-management.md +++ b/en/application-dev/faqs/faqs-file-management.md @@ -2,7 +2,7 @@ ## How do I obtain the path of system screenshots? -Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) +Applicable to: OpenHarmony 3.2 Beta5 (API version 9) **Solution** @@ -10,7 +10,7 @@ The screenshots are stored in **/storage/media/100/local/files/Pictures/Screensh ## How do I change the permissions on a directory to read/write on a device? -Applicable to: OpenHarmony 3.2 Beta 5 (API version 9) +Applicable to: OpenHarmony 3.2 Beta5 (API version 9) **Symptom** @@ -19,3 +19,94 @@ When the hdc command is used to send a file to a device, "permission denied" is **Solution** Run the **hdc shell mount -o remount,rw /** command to grant the read/write permissions. + +## What is the best way to create a file if the file to open does not exist? + +Applicable to: OpenHarmony 3.2 (API version 9) + +**Solution** + +Use **fs.open(path: string, mode?: number)** with **mode** set to **fs.OpenMode.CREATE**. **fs.OpenMode.CREATE** creates a file if it does not exist. + +## How do I solve the problem of garbled Chinese characters in a file? + +Applicable to: OpenHarmony 3.2 (API version 9) + +**Solution** + +After the buffer data of the file content is read, use **TextDecoder** of @ohos.util to decode the file content. + +``` +let filePath = getContext(this).filesDir + "/test0.txt"; +let stream = fs.createStreamSync(filePath, "r+"); +let buffer = new ArrayBuffer(4096) +let readOut = stream.readSync(buffer); +let textDecoder = util.TextDecoder.create('utf-8', { ignoreBOM: true }) +let readString = textDecoder.decodeWithStream(new Uint8Array(buffer), { stream: false }); +console.log ("File content read: "+ readString); +``` + +## Why is an error reported when **fs.copyFile** is used to copy a **datashare://** file opened by **fs.open()**? + +Applicable to: OpenHarmony 3.2 (API version 9) + +**Solution** + +**fs.copyFile** does not support URIs. You can use **fs.open()** to obtain the URI, obtain the file descriptor (FD) based on the URI, and then use **fs.copyFile** to copy the file based on the FD. + +``` +let file = fs.openSync("datashare://...") +fs.copyFile(file.fd, 'dstPath', 0).then(() => { + console.info('copyFile success') +}).catch((err) => { + console.info("copy file failed with error message: " + err.message + ", error code: " + err.code); +}) +``` + +## How do I modify the specified content of a JSON file in the sandbox? + +Applicable to: OpenHarmony 3.2 (API version 9) + +**Solution** + +Perform the following steps: + +1. Use **fs.openSyn** to obtain the FD of the JSON file. + +``` +import fs from '@ohos.file.fs'; +let sanFile = fs.open(basePath, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE); +let fd = sanFile.fd; +``` + +2. Use **fs.readSync** to read the file content. + +``` +let content = fs.readSync(basePath); +``` + +3. Modify the file content. + +``` +obj.name = 'new name'; +``` + +4. Write the JSON file again. + +``` +fs.writeSync(file.fd, JSON.stringify(obj)); +``` + +For more information, see [@ohos.file.fs](../reference/apis/js-apis-file-fs.md). + +## What is the actual path corresponding to the file path obtained through the FileAccess module? + +Applicable to: OpenHarmony 3.2 (API version 9, stage model) + +**Solution** + +The files are stored in the **/storage/media/100/local/files** directory. The specific file path varies with the file type and source. To obtain the actual file path, run the following command in the **/storage/media/100/local/files** directory: + +**-name \[filename\]** + +For more information, see [Uploading and Downloading an Application File](../file-management/app-file-upload-download.md). diff --git a/en/application-dev/file-management/Readme-EN.md b/en/application-dev/file-management/Readme-EN.md index e96bf81837a170a61796100c3f1e0080687f39ec..f512a935bae109a31ae3ea1b530608c5dadf6864 100644 --- a/en/application-dev/file-management/Readme-EN.md +++ b/en/application-dev/file-management/Readme-EN.md @@ -10,6 +10,10 @@ - [Obtaining Application and File System Space Statistics](app-fs-space-statistics.md) - [Sending Files to an Application Sandbox](send-file-to-app-sandbox.md) - [Sharing an Application File](share-app-file.md) + - Application Data Backup and Restoration + - [Application Data Backup and Restoration Overview](app-file-backup-overview.md) + - [Backing Up and Restoring Application Access Data](app-file-backup-extension.md) + - [Backing Up and Restoring Application-triggered Data (for System Applications Only)](app-file-backup.md) - User File - [User File Overview](user-file-overview.md) - Selecting and Saving User Files (FilePicker) diff --git a/en/application-dev/file-management/app-file-backup-extension.md b/en/application-dev/file-management/app-file-backup-extension.md new file mode 100644 index 0000000000000000000000000000000000000000..3ba491045e1dc665bbc13d9edb9431e79e7809a6 --- /dev/null +++ b/en/application-dev/file-management/app-file-backup-extension.md @@ -0,0 +1,80 @@ +# Backing Up and Restoring Application Access Data + +You can use BackupExtensionAbility to implement backup and restoration of application access data. + +BackupExtensionAbility is a class derived from the [ExtensionAbility](../application-models/extensionability-overview.md) component in [Stage Model](../../application-dev/application-models/stage-model-development-overview.md). You can modify the configuration file to customize the behavior of the backup and restoration framework, including whether backup and restoration are allowed and which files are backed up. + +## Constraints +- The paths of all files and directories to be backed up cannot exceed 4095 bytes. Otherwise, undefined behavior may occur. +- If a directory needs to be backed up, the application process must have the permission to read the directory and all its subdirectories (**r** in DAC). Otherwise, the backup fails. +- If a file needs to be backed up, the application process must have the permission to search for its grandparent directory of the file (**x** in DAC). Otherwise, the backup fails. + +## How to Develop + +1. Add the **extensionAbilities** configuration in the application's **module.json5** file. + + Add **extensionAbilities**, set **type** to **backup**, and add **name: ohos.extension.backup** to **[metadata]**(../../application-dev/reference/apis/js-apis-bundleManager-metadata.md). + + BackupExtensionAbility configuration example: + + ```json + { + "extensionAbilities": [ + { + "description": "$string:ServiceExtAbility", + "icon": "$media:icon", + "name": "BackupExtensionAbility", + "type": "backup", + "visible": true, + "metadata": [ + { + "name": "ohos.extension.backup", + "resource": "$profile:backup_config" + } + ], + "srcEntrance": "", + } + ] + } + ``` + +2. Add a metadata resource configuration file. + + The metadata resource configuration file defines the files to be transferred during backup and restoration. The file name must be the same as the value of **resource** under **metadata** in the **module.json5** file. This file is stored in the **Profile** folder. + + Metadata resource configuration file example: + + ```json + { + "allowToBackupRestore": true, + "includes": [ + "/data/storage/el2/base/files/users/*/*.json" + ], + "excludes": [ + "/data/storage/el2/base/files/users/*/hidden.json" + ], + } + ``` + +### Description of the Metadata Resource Configuration File + +| Name | Type | Mandatory| Description | +| -------------------- | ---------- | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| allowToBackupRestore | Boolean | Yes | Whether to allow backup and restoration. The default value is **false**. | +| includes | String array| No | Files and directories to be backed up in the application sandbox.
Each item in the array is a pattern string, which can contain shell-style wildcards such as *****, **?**, and **[**.
The pattern string that does not start with a slash (/) indicates a relative path relative to the root path.
If **includes** is configured, the backup and restoration framework uses the pattern strings configured. Otherwise, the backup and restoration framework uses the **includes** default value (see the following code segment).| +| excludes | String array| No | Exception items in **includes** that do not need to be backed up. The value is in the same format as **includes**.
If **excludes** is configured, the backup and restoration framework uses the pattern strings configured. Otherwise, the backup and restoration framework uses an empty array as the default value. | + +**includes** default value: + +```json +{ + "includes": [ + "data/storage/el2/database/", + "data/storage/el2/base/files/", + "data/storage/el2/base/preferences/", + "data/storage/el2/base/haps/*/database/", + "data/storage/el2/base/haps/*/base/files/", + "data/storage/el2/base/haps/*/base/preferences/", + ] +} +``` diff --git a/en/application-dev/file-management/app-file-backup-overview.md b/en/application-dev/file-management/app-file-backup-overview.md new file mode 100644 index 0000000000000000000000000000000000000000..c18cf73bfd407bd7f626edda73cc3b815de6155a --- /dev/null +++ b/en/application-dev/file-management/app-file-backup-overview.md @@ -0,0 +1,15 @@ +# Application Data Backup and Restoration Overview + +Application data, such as the configuration and service data, is generated when an application is used. To ensure that user data will not be lost due to operations, such as application updates and hopping, applications need to access data backup and restoration. + +Before development, you need to understand the ExtensionAbility component. For details, see [ExtensionAbility Component Overview](../application-models/extensionability-overview.md). + +BackupExtensionAbility is a class derived from ExtensionAbility in the stage model. It provides the capabilities of backing up and restoring application data. It is an extended component without the UI. It runs when a backup or restoration task starts and exits when the task is complete. + +The implementation includes the following: + +- [Backup and restoration of application access data](app-file-backup-extension.md): All applications can access data backup and restoration. After accessed, the application can modify the configuration file to customize the behavior of the backup and restoration framework, including whether to allow backup and restoration and specifying the data to be backed up. + + Applications can perform backup and restoration configurations, but not trigger data backup and restoration. + +- [Backup and restoration of application-triggered data](app-file-backup.md): Only system applications can trigger data backup and restoration. After data backup or restoration is triggered, the backup and restoration framework checks whether each application has accessed data backup and restoration. If yes, the backup and restore framework backs up or restores data based on the application's configuration file. diff --git a/en/application-dev/file-management/app-file-backup.md b/en/application-dev/file-management/app-file-backup.md new file mode 100644 index 0000000000000000000000000000000000000000..991e228e680ad4a0b7e1e23636df52f3996b8452 --- /dev/null +++ b/en/application-dev/file-management/app-file-backup.md @@ -0,0 +1,358 @@ +# Backing Up and Restoring Application-triggered Data (for System Applications Only) + +The backup and restoration module provides a complete data backup and restoration solution for application data, user data, and system services on devices. You can implement data backup or restoration for applications by performing the following operations: + +- [Obtaining the capability file](#obtaining-the-capability-file): Obtain the capability file of all applications of the system user. The capability file is indispensable for data backup and restoration. + +- [Backing up application data](#backing-up-application-data): Select the application data to be backed up based on the application information provided by the capability file, and back up the data. + +- [Restoring application data](#restoring-application-data): Select the application data to be restored based on the application information provided in the capability file and restore the data. + +- [Installing the application during data restoration](#installing-the-application-during-data-restoration): Install the application if the application has not been installed. As an extended function of application data restoration, this function allows the application to be installed on the device before data restoration. + +## How to Develop + +For details about the APIs to be used, see [Backup and Restoration](../reference/apis/js-apis-file-backup.md). + +Before using the APIs, you need to: + +1. Apply for the ohos.permission.BACKUP permission. For details, see [Apply for permissions](../security/accesstoken-guidelines.md). + +2. Import **@ohos.file.backup**. + + ```js + import backup from '@ohos.file.backup'; + ``` + +## Obtaining the Capability File + +Obtain the application capability file of the current system user. This file is indispensable for application data backup and restoration. + +This file contains the device type and version and basic application information, such as the application name, application data size, application version, whether to allow backup and restoration, and whether to install the application during restoration. + +Use **backup.getLocalCapabilities()** to obtain the capability file. + + ```js + import fs from '@ohos.file.fs'; + async function getLocalCapabilities() { + try { + let fileData = await backup.getLocalCapabilities(); + console.info('getLocalCapabilities success'); + let fpath = await globalThis.context.filesDir + '/localCapabilities.json'; + fs.copyFileSync(fileData.fd, fpath); + fs.closeSync(fileData.fd); + } catch (err) { + console.error('getLocalCapabilities failed with err: ' + err); + } + } + ``` + + **Capability file example** + | Name | Type| Mandatory| Description | + | -------------- | -------- | ---- | ---------------------- | + | bundleInfos | Array | Yes | Application information. | + | allToBackup | Boolean | Yes | Whether to allow backup and restoration. | + | extensionName | String | Yes | Extension name of the application. | + | name | String | Yes | Bundle name of the application. | + | needToInstall | Boolean | Yes | Whether to install the application during data restoration.| + | spaceOccupied | Number | Yes | Space occupied by the application data.| + | versionCode | Number | Yes | Application version number. | + | versionName | String | Yes | Application version name. | + | deviceType | String | Yes | Type of the device. | + | systemFullName | String | Yes | Device version. | + + ```json + { + "bundleInfos" :[{ + "allToBackup" : true, + "extensionName" : "BackupExtensionAbility", + "name" : "com.example.hiworld", + "needToInstall" : false, + "spaceOccupied" : 0, + "versionCode" : 1000000, + "versionName" : "1.0.0" + }], + "deviceType" : "default", + "systemFullName" : "OpenHarmony-4.0.0.0" + } + ``` + +## Backing Up Application Data + +You need to select the application data to be backed up based on the application information provided by the capability file. + +The Backup & Restore service packages the application data into a file. The file handle is returned by the [onFileReady](../reference/apis/js-apis-file-backup.md#onfileready) callback registered when the instance is created. + +You can save the file to a local directory as required. + +**Example** + + ```ts + import fs from '@ohos.file.fs'; + // Create a SessionBackup instance for data backup. + let g_session; + function createSessionBackup() { + let sessionBackup = new backup.SessionBackup({ + onFileReady: async (err, file) => { + if (err) { + console.info('onFileReady err: ' + err); + } + try { + let bundlePath = await globalThis.context.filesDir + '/' + file.bundleName; + if (!fs.accessSync(bundlePath)) { + fs.mkdirSync(bundlePath); + } + fs.copyFileSync(file.fd, bundlePath + `/${file.uri}`); + fs.closeSync(file.fd); + console.info('onFileReady success'); + } catch (e) { + console.error('onFileReady failed with err: ' + e); + } + }, + onBundleBegin: (err, bundleName) => { + if (err) { + console.info('onBundleBegin err: ' + err); + } else { + console.info('onBundleBegin bundleName: ' + bundleName); + } + }, + onBundleEnd: (err, bundleName) => { + if (err) { + console.info('onBundleEnd err: ' + err); + } else { + console.info('onBundleEnd bundleName: ' + bundleName); + } + }, + onAllBundlesEnd: (err) => { + if (err) { + console.info('onAllBundlesEnd err: ' + err); + } else { + console.info('onAllBundlesEnd'); + } + }, + onBackupServiceDied: () => { + console.info('onBackupServiceDied'); + }, + }); + return sessionBackup; + } + + async function sessionBackup () + { + g_session = createSessionBackup(); + // Select the application to be backed up based on the capability file obtained by backup.getLocalCapabilities(). + // You can also back up data based on the application bundle name. + const backupApps = [ + "com.example.hiworld", + ] + await g_session.appendBundles(backupApps); + console.info('appendBundles success'); + } + ``` + +## Restoring Application Data + +You can select the application data to be restored based on the application information provided by the capability file. + +During the restoration, the Backup and Restore service returns the file handle of the application data to be restored in the [onFileReady](../reference/apis/js-apis-file-backup.md#onfileready) callback registered when the instance is created based on the [getFileHandle](../reference/apis/js-apis-file-backup.md#getfilehandle) called. Then, the data to be restored is written to the file handle based on the [uri](../reference/apis/js-apis-file-backup.md#filemeta) returned. After the data is written, use [publishFile()](../reference/apis/js-apis-file-backup.md#publishfile) to notify the service that the data write is complete. + +When all the data of the application is ready, the service starts to restore the application data. + +**Example** + + ```ts + import fs from '@ohos.file.fs'; + // Create a SessionRestore instance for data restoration. + let g_session; + async function publishFile(file) + { + await g_session.publishFile({ + bundleName: file.bundleName, + uri: file.uri + }); + } + function createSessionRestore() { + let sessionRestore = new backup.SessionRestore({ + onFileReady: (err, file) => { + if (err) { + console.info('onFileReady err: ' + err); + } + // Set bundlePath based on the actual situation. + let bundlePath; + if (!fs.accessSync(bundlePath)) { + console.info('onFileReady bundlePath err : ' + bundlePath); + } + fs.copyFileSync(bundlePath, file.fd); + fs.closeSync(file.fd); + // After the data is transferred, notify the server that the file is ready. + publishFile(file); + console.info('onFileReady success'); + }, + onBundleBegin: (err, bundleName) => { + if (err) { + console.error('onBundleBegin failed with err: ' + err); + } + console.info('onBundleBegin success'); + }, + onBundleEnd: (err, bundleName) => { + if (err) { + console.error('onBundleEnd failed with err: ' + err); + } + console.info('onBundleEnd success'); + }, + onAllBundlesEnd: (err) => { + if (err) { + console.error('onAllBundlesEnd failed with err: ' + err); + } + console.info('onAllBundlesEnd success'); + }, + onBackupServiceDied: () => { + console.info('service died'); + } + }); + return sessionRestore; + } + + async function restore () + { + g_session = createSessionRestore(); + const backupApps = [ + "com.example.hiworld", + ] + // You can obtain the capability file based on actual situation. The following is an example only. + // You can also construct a capability file as required. + let fileData = await backup.getLocalCapabilities(); + await g_session.appendBundles(fileData.fd, backupApps); + console.info('appendBundles success'); + // After the application to be restored is added, call getFileHandle() to obtain the handle of the application file to be restored based on the application name. + // The number of application data files to be restored varies depending on the number of backup files. The following is only an example. + await g_session.getFileHandle({ + bundleName: restoreApps[0], + uri: "manage.json" + }); + await g_session.getFileHandle({ + bundleName: restoreApps[0], + uri: "1.tar" + }); + console.info('getFileHandle success'); + } + ``` + +## Installing the Application During Data Restoration + +You can enable the application to be installed before application data restoration. To achieve this purpose, the value of **needToInstall** in **bundleInfos** in the [capability file](#obtaining-the-capability-file) must be **true**. + +> **NOTE** +> - [Application data backup](#backing-up-application-data) does not support backup of the application installation package. Therefore, you need to obtain the application installation package. +> - To obtain the file handle of the application installation package, call [getFileHandle()](../reference/apis/js-apis-file-backup.md#getfilehandle) with **FileMeta.uri** set to **/data/storage/el2/restore/bundle.hap**. The file handle of the application installation package is returned through the **onFileReady()** callback registered when the instance is created. The returned **File.uri** is **data/storage/el2/restore/bundle.hap**. + +**Example** + + ```ts + import fs from '@ohos.file.fs'; + // Create a SessionRestore instance for data restoration. + let g_session; + async function publishFile(file) + { + await g_session.publishFile({ + bundleName: file.bundleName, + uri: file.uri + }); + } + function createSessionRestore() { + let sessionRestore = new backup.SessionRestore({ + onFileReady: (err, file) => { + if (err) { + console.info('onFileReady err: ' + err); + } + let bundlePath; + if( file.uri == "/data/storage/el2/restore/bundle.hap" ) + { + // Set the path of the application installation package based on actual situation. + } else { + // Set bundlePath based on the actual situation. + } + if (!fs.accessSync(bundlePath)) { + console.info('onFileReady bundlePath err : ' + bundlePath); + } + fs.copyFileSync(bundlePath, file.fd); + fs.closeSync(file.fd); + // After the data is transferred, notify the server that the file is ready. + publishFile(file); + console.info('onFileReady success'); + }, + onBundleBegin: (err, bundleName) => { + if (err) { + console.error('onBundleBegin failed with err: ' + err); + } + console.info('onBundleBegin success'); + }, + onBundleEnd: (err, bundleName) => { + if (err) { + console.error('onBundleEnd failed with err: ' + err); + } + console.info('onBundleEnd success'); + }, + onAllBundlesEnd: (err) => { + if (err) { + console.error('onAllBundlesEnd failed with err: ' + err); + } + console.info('onAllBundlesEnd success'); + }, + onBackupServiceDied: () => { + console.info('service died'); + } + }); + return sessionRestore; + } + + async function restore () + { + g_session = createSessionRestore(); + const backupApps = [ + "com.example.hiworld", + ] + let fpath = await globalThis.context.filesDir + '/localCapabilities.json'; + let file = fs.openSync(fpath, fileIO.OpenMode.CREATE | fileIO.OpenMode.READ_WRITE); + let content = "{\"bundleInfos\" :[{\"allToBackup\" : false,\"extensionName\" : \"\"," + + "\"name\" : \"cn.openharmony.inputmethodchoosedialog\",\"needToInstall\" : true,\"spaceOccupied\" : 0," + + "\"versionCode\" : 1000000,\"versionName\" : \"1.0.0\"}],\"deviceType\" : \"default\",\"systemFullName\" : \"OpenHarmony-4.0.6.2(Canary1)\"}"; + fs.writeSync(file.fd, content); + fs.fsyncSync(file.fd); + await g_session.appendBundles(file.fd, backupApps); + console.info('appendBundles success'); + + // Obtain the file handle of the application to be installed. + await g_session.getFileHandle({ + bundleName: restoreApps[0], + uri: "/data/storage/el2/restore/bundle.hap" + }); + + await g_session.getFileHandle({ + bundleName: restoreApps[0], + uri: "manage.json" + }); + await g_session.getFileHandle({ + bundleName: restoreApps[0], + uri: "1.tar" + }); + console.info('getFileHandle success'); + } + ``` + + **Capability file example** + ```json + { + "bundleInfos" :[{ + "allToBackup" : true, + "extensionName" : "BackupExtensionAbility", + "name" : "com.example.hiworld", + "needToInstall" : true, + "spaceOccupied" : 0, + "versionCode" : 1000000, + "versionName" : "1.0.0" + }], + "deviceType" : "default", + "systemFullName" : "OpenHarmony-4.0.0.0" + } + ``` diff --git a/en/application-dev/file-management/save-user-file.md b/en/application-dev/file-management/save-user-file.md index d1ca80444deffa2bad38f01442e0135e20ac67c3..db6ad37908be0a1fe1dd00e36c4553830bf03c72 100644 --- a/en/application-dev/file-management/save-user-file.md +++ b/en/application-dev/file-management/save-user-file.md @@ -7,10 +7,11 @@ The operations for saving images, audio or video clips, and documents are simila ## Saving Images or Video Files -1. Import the **FilePicker** module. +1. Import the **picker** module and **fs** module. ```ts import picker from '@ohos.file.picker'; + import fs from '@ohos.file.fs'; ``` 2. Create a **photoSaveOptions** instance. @@ -20,27 +21,43 @@ The operations for saving images, audio or video clips, and documents are simila photoSaveOptions.newFileNames = ["PhotoViewPicker01.jpg"]; // (Optional) Set the names of the files to save. ``` -3. Create a **photoViewPicker** instance and call [save()](../reference/apis/js-apis-file-picker.md#save) to open the **FilePicker** page to save the files. - After the user selects the target folder, the file saving operation is complete. After the files are saved successfully, the URIs of the files saved are returned. +3. Create a **photoViewPicker** instance and call [save()](../reference/apis/js-apis-file-picker.md#save) to open the **FilePicker** page to save the files. After the user selects the target folder, the file saving operation is complete. After the files are saved successfully, the URIs of the files saved are returned. + +
The permission on the URIs returned by **save()** is read/write. Further file operations can be performed based on the URIs in the result set. Note that the URI cannot be directly used in the **picker** callback to open a file. You need to define a global variable to save the URI and use a button to trigger file opening. ```ts + let URI = null; const photoViewPicker = new picker.PhotoViewPicker(); - photoViewPicker.save(photoSaveOptions) - .then(async (photoSaveResult) => { - let uri = photoSaveResult[0]; - // Perform operations on the files based on the file URIs obtained. - }) - .catch((err) => { - console.error(`Invoke documentPicker.select failed, code is ${err.code}, message is ${err.message}`); - }) + photoViewPicker.save(photoSaveOptions).then((photoSaveResult) => { + URI = photoSaveResult[0]; + console.info('photoViewPicker.save to file succeed and URI is:' + URI); + }).catch((err) => { + console.error(`Invoke photoViewPicker.save failed, code is ${err.code}, message is ${err.message}`); + }) + ``` + +4. Use a button to trigger invocation of other functions. Use [fs.openSync()](../reference/apis/js-apis-file-fs.md#fsopensync) to open the file based on the URI and obtain the FD. Note that the **mode** parameter of **fs.openSync()** must be **fs.OpenMode.READ_WRITE**. + + ```ts + let file = fs.openSync(URI, fs.OpenMode.READ_WRITE); + console.info('file fd: ' + file.fd); + ``` + +5. Use [fs.writeSync()](../reference/apis/js-apis-file-fs.md#writesync) to edit the file based on the FD, and then close the FD. + + ```ts + let writeLen = fs.writeSync(file.fd, 'hello, world'); + console.info('write data to file succeed and size is:' + writeLen); + fs.closeSync(file); ``` ## Saving Documents -1. Import the **FilePicker** module. +1. Import the **picker** module and **fs** module. ```ts import picker from '@ohos.file.picker'; + import fs from '@ohos.file.fs'; ``` 2. Create a **documentSaveOptions** instance. @@ -50,31 +67,43 @@ The operations for saving images, audio or video clips, and documents are simila documentSaveOptions.newFileNames = ["DocumentViewPicker01.txt"]; // (Optional) Set the names of the documents to save. ``` -3. Create a **documentViewPicker** instance, and call [save()](../reference/apis/js-apis-file-picker.md#save-3) to open the **FilePicker** page to save the documents. - After the user selects the target folder, the file saving operation is complete. After the files are saved successfully, the URIs of the files saved are returned. - - > **NOTE** - > - > Currently, **DocumentSelectOptions** is not configurable. By default, all types of user files are selected. +3. Create a **documentViewPicker** instance, and call [save()](../reference/apis/js-apis-file-picker.md#save-3) to open the **FilePicker** page to save the documents. After the user selects the target folder, the file saving operation is complete. After the files are saved successfully, the URIs of the files saved are returned. + + The permission on the URIs returned by **save()** is read/write. Further file operations can be performed based on the URIs in the result set. Note that the URI cannot be directly used in the **picker** callback to open a file. You need to define a global variable to save the URI and use a button to trigger file opening. ```ts + let URI = null; const documentViewPicker = new picker.DocumentViewPicker(); // Create a documentViewPicker instance. - documentViewPicker.save(documentSaveOptions) - .then(async (documentSaveResult) => { - let uri = documentSaveResult[0]; - // For example, write data to the documents based on the obtained URIs. - }) - .catch((err) => { - console.error(`Invoke documentPicker.save failed, code is ${err.code}, message is ${err.message}`); - }) + documentViewPicker.save(documentSaveOptions).then((documentSaveResult) => { + URI = documentSaveResult[0]; + console.info('documentViewPicker.save to file succeed and URI is:' + URI); + }).catch((err) => { + console.error(`Invoke documentViewPicker.save failed, code is ${err.code}, message is ${err.message}`); + }) + ``` + +4. Use a button to trigger invocation of other functions. Use [fs.openSync()](../reference/apis/js-apis-file-fs.md#fsopensync) to open the file based on the URI and obtain the FD. Note that the **mode** parameter of **fs.openSync()** must be **fs.OpenMode.READ_WRITE**. + + ```ts + let file = fs.openSync(URI, fs.OpenMode.READ_WRITE); + console.info('file fd: ' + file.fd); + ``` + +5. Use [fs.writeSync()](../reference/apis/js-apis-file-fs.md#writesync) to edit the file based on the FD, and then close the FD. + + ```ts + let writeLen = fs.writeSync(file.fd, 'hello, world'); + console.info('write data to file succeed and size is:' + writeLen); + fs.closeSync(file); ``` ## Saving Audio Files -1. Import the **FilePicker** module. +1. Import the **picker** module and **fs** module. ```ts import picker from '@ohos.file.picker'; + import fs from '@ohos.file.fs'; ``` 2. Create an **audioSaveOptions** instance. @@ -84,20 +113,33 @@ The operations for saving images, audio or video clips, and documents are simila audioSaveOptions.newFileNames = ['AudioViewPicker01.mp3']; // (Optional) Set the names of the files to save. ``` -3. Create an **audioViewPicker** instance, and call [save()](../reference/apis/js-apis-file-picker.md#save-6) to open the **FilePicker** page to save the files. - After the user selects the target folder, the file saving operation is complete. After the files are saved successfully, the URIs of the files saved are returned. - > **NOTE** - > - > Currently, **AudioSelectOptions** is not configurable. By default, all types of user files are selected. - +3. Create an **audioViewPicker** instance, and call [save()](../reference/apis/js-apis-file-picker.md#save-6) to open the **FilePicker** page to save the files. After the user selects the target folder, the file saving operation is complete. After the files are saved successfully, the URIs of the files saved are returned. + + The permission on the URIs returned by **save()** is read/write. Further file operations can be performed based on the URIs in the result set. Note that the URI cannot be directly used in the **picker** callback to open a file. You need to define a global variable to save the URI and use a button to trigger file opening. + ```ts + let URI = null; const audioViewPicker = new picker.AudioViewPicker(); - audioViewPicker.save(audioSaveOptions) - .then((audioSelectResult) => { - let uri = audioSelectResult[0]; - // Perform operations on the audio files based on the file URIs. - }) - .catch((err) => { - console.error(`Invoke audioPicker.select failed, code is ${err.code}, message is ${err.message}`); - }) + audioViewPicker.save(audioSaveOptions).then((audioSelectResult) => { + URI = audioSelectResult[0]; + console.info('audioViewPicker.save to file succeed and URI is:' + URI); + }).catch((err) => { + console.error(`Invoke audioViewPicker.save failed, code is ${err.code}, message is ${err.message}`); + }) + ``` + +4. Use a button to trigger invocation of other functions. Use [fs.openSync()](../reference/apis/js-apis-file-fs.md#fsopensync) to open the file based on the URI and obtain the FD. Note that the **mode** parameter of **fs.openSync()** must be **fs.OpenMode.READ_WRITE**. + + ```ts + let file = fs.openSync(URI, fs.OpenMode.READ_WRITE); + console.info('file fd: ' + file.fd); + ``` + +5. Use [fs.writeSync](../reference/apis/js-apis-file-fs.md#writesync) to edit the file based on the FD, and then close the FD. + + ```ts + let writeLen = fs.writeSync(file.fd, 'hello, world'); + console.info('write data to file succeed and size is:' + writeLen); + fs.closeSync(file); ``` + diff --git a/en/application-dev/file-management/select-user-file.md b/en/application-dev/file-management/select-user-file.md index d339f27e9c1e09cdc77094610619e933816a55f8..853aae60d7e73fa4238e388eefb19ded0ca59b1d 100644 --- a/en/application-dev/file-management/select-user-file.md +++ b/en/application-dev/file-management/select-user-file.md @@ -1,6 +1,6 @@ # Selecting User Files -If your application needs to support share and saving of user files (such as images and videos) by users, you can use the [FilePicker](../reference/apis/js-apis-file-picker.md) prebuilt in OpenHarmony to implement selecting and saving of user files. +If your application needs to support share and saving of user files (such as images and videos), you can use OpenHarmony [FilePicker](../reference/apis/js-apis-file-picker.md) to implement selection and saving of user files. The **FilePicker** provides the following interfaces by file type: @@ -12,10 +12,11 @@ The **FilePicker** provides the following interfaces by file type: ## Selecting Images or Video Files -1. Import the **FilePicker** module. +1. Import the **picker** module and **fs** module. ```ts import picker from '@ohos.file.picker'; + import fs from '@ohos.file.fs'; ``` 2. Create a **photoSelectOptions** instance. @@ -32,41 +33,44 @@ The **FilePicker** provides the following interfaces by file type: photoSelectOptions.maxSelectNumber = 5; // Set the maximum number of images to select. ``` -4. Create a **photoPicker** instance and call [select()](../reference/apis/js-apis-file-picker.md#select) to open the **FilePicker** page for the user to select files. - - Use [PhotoSelectResult](../reference/apis/js-apis-file-picker.md#photoselectresult) to return a result set. Further operations on the selected files can be performed based on the file URIs in the result set. +4. Create a **photoPicker** instance and call [select()](../reference/apis/js-apis-file-picker.md#select) to open the **FilePicker** page for the user to select files. After the files are selected, [PhotoSelectResult](../reference/apis/js-apis-file-picker.md#photoselectresult) is returned. + +
The permission on the URIs returned by **select()** is read-only. Further file operations can be performed based on the URIs in the **PhotoSelectResult**. Note that the URI cannot be directly used in the **picker** callback to open a file. You need to define a global variable to save the URI and use a button to trigger file opening. ```ts - let uri = null; - const photoPicker = new picker.PhotoViewPicker(); - photoPicker.select(photoSelectOptions).then((photoSelectResult) => { - uri = photoSelectResult.photoUris[0]; + let URI = null; + const photoViewPicker = new picker.PhotoViewPicker(); + photoViewPicker.select(photoSelectOptions).then((photoSelectResult) => { + URI = photoSelectResult.photoUris[0]; + console.info('photoViewPicker.select to file succeed and URI is:' + URI); }).catch((err) => { - console.error(`Invoke photoPicker.select failed, code is ${err.code}, message is ${err.message}`); + console.error(`Invoke photoViewPicker.select failed, code is ${err.code}, message is ${err.message}`); }) ``` -5. After the GUI is returned from FilePicker, use [**fs.openSync**](../reference/apis/js-apis-file-fs.md#fsopensync) to open the file based on the URI and obtain the FD. +5. Use a button to trigger invocation of other functions. Use [fs.openSync()](../reference/apis/js-apis-file-fs.md#fsopensync) to open the file based on the URI and obtain the FD. Note that the **mode** parameter of **fs.openSync()** must be **fs.OpenMode.READ_ONLY**. ```ts - let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); + let file = fs.openSync(URI, fs.OpenMode.READ_ONLY); console.info('file fd: ' + file.fd); ``` -6. Use [fs.writeSync](../reference/apis/js-apis-file-fs.md#writesync) to write data to the file based on the FD, and then close the FD. +6. Use [fs.readSync()](../reference/apis/js-apis-file-fs.md#readsync) to read the file data based on the FD. After the data is read, close the FD. ```ts - let writeLen = fs.writeSync(file.fd, 'hello, world'); - console.info('write data to file succeed and size is:' + writeLen); + let buffer = new ArrayBuffer(4096); + let readLen = fs.readSync(file.fd, buffer); + console.info('readSync data to file succeed and buffer size is:' + readLen); fs.closeSync(file); ``` ## Selecting Documents -1. Import the **FilePicker** module. +1. Import the **picker** module and **fs** module. ```ts import picker from '@ohos.file.picker'; + import fs from '@ohos.file.fs'; ``` 2. Create a **documentSelectOptions** instance. @@ -75,23 +79,24 @@ The **FilePicker** provides the following interfaces by file type: const documentSelectOptions = new picker.DocumentSelectOptions(); ``` -3. Create a **documentViewPicker** instance, and call [**select()**](../reference/apis/js-apis-file-picker.md#select-3) to open the **FilePicker** page for the user to select documents. - - After the documents are selected successfully, a result set containing the file URIs is returned. Further operations can be performed on the documents based on the file URIs. - - For example, you can use [file management APIs](../reference/apis/js-apis-file-fs.md) to obtain file attribute information, such as the file size, access time, and last modification time, based on the URI. If you need to obtain the file name, use [startAbilityForResult](../../application-dev/application-models/uiability-intra-device-interaction.md). +3. Create a **documentViewPicker** instance, and call [**select()**](../reference/apis/js-apis-file-picker.md#select-3) to open the **FilePicker** page for the user to select documents. After the documents are selected, a result set containing the file URIs is returned. + +
The permission on the URIs returned by **select()** is read-only. Further file operations can be performed based on the URIs in the result set. Note that the URI cannot be directly used in the **picker** callback to open a file. You need to define a global variable to save the URI and use a button to trigger file opening. + +
For example, you can use [file management APIs](../reference/apis/js-apis-file-fs.md) to obtain file attribute information, such as the file size, access time, and last modification time, based on the URI. If you need to obtain the file name, use [startAbilityForResult](../../application-dev/application-models/uiability-intra-device-interaction.md). > **NOTE** > > Currently, **DocumentSelectOptions** is not configurable. By default, all types of user files are selected. ```ts - let uri = null; + let URI = null; const documentViewPicker = new picker.DocumentViewPicker(); // Create a documentViewPicker instance. documentViewPicker.select(documentSelectOptions).then((documentSelectResult) => { - uri = documentSelectResult[0]; + URI = documentSelectResult[0]; + console.info('documentViewPicker.select to file succeed and URI is:' + URI); }).catch((err) => { - console.error(`Invoke documentPicker.select failed, code is ${err.code}, message is ${err.message}`); + console.error(`Invoke documentViewPicker.select failed, code is ${err.code}, message is ${err.message}`); }) ``` @@ -109,7 +114,7 @@ The **FilePicker** provides the following interfaces by file type: try { let result = await context.startAbilityForResult(config, {windowMode: 1}); if (result.resultCode !== 0) { - console.error(`DocumentPicker.select failed, code is ${result.resultCode}, message is ${result.want.parameters.message}`); + console.error(`documentViewPicker.select failed, code is ${result.resultCode}, message is ${result.want.parameters.message}`); return; } // Obtain the URI of the document. @@ -117,34 +122,34 @@ The **FilePicker** provides the following interfaces by file type: // Obtain the name of the document. let file_name_list = result.want.parameters.file_name_list; } catch (err) { - console.error(`Invoke documentPicker.select failed, code is ${err.code}, message is ${err.message}`); + console.error(`Invoke documentViewPicker.select failed, code is ${err.code}, message is ${err.message}`); } ``` -4. After the GUI is returned from FilePicker, use [**fs.openSync**](../reference/apis/js-apis-file-fs.md#fsopensync) to open the file based on the URI and obtain the FD. +4. Use a button to trigger invocation of other functions. Use [fs.openSync()](../reference/apis/js-apis-file-fs.md#fsopensync) to open the file based on the URI and obtain the FD. Note that the **mode** parameter of **fs.openSync()** must be **fs.OpenMode.READ_ONLY**. ```ts - let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); + let file = fs.openSync(URI, fs.OpenMode.READ_ONLY); console.info('file fd: ' + file.fd); ``` -5. Use [fs.readSync](../reference/apis/js-apis-file-fs.md#readsync) to read data from the file based on the FD, and then close the FD. +5. Use [fs.readSync()](../reference/apis/js-apis-file-fs.md#readsync) to read the file data based on the FD. After the data is read, close the FD. ```ts - let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); - let buf = new ArrayBuffer(4096); - let num = fs.readSync(file.fd, buf); - console.info('read data to file succeed and size is:' + num); + let buffer = new ArrayBuffer(4096); + let readLen = fs.readSync(file.fd, buffer); + console.info('readSync data to file succeed and buffer size is:' + readLen); fs.closeSync(file); ``` ## Selecting an Audio File -1. Import the **FilePicker** module. +1. Import the **picker** module and **fs** module. ```ts import picker from '@ohos.file.picker'; + import fs from '@ohos.file.fs'; ``` 2. Create an **audioSelectOptions** instance. @@ -153,37 +158,39 @@ The **FilePicker** provides the following interfaces by file type: const audioSelectOptions = new picker.AudioSelectOptions(); ``` -3. Create an **audioViewPicker** instance, and call [**select()**](../reference/apis/js-apis-file-picker.md#select-6) to open the **FilePicker** page for the user to select audio files. - - After the files are selected successfully, a result set containing the URIs of the audio files selected is returned. Further operations can be performed on the documents based on the file URIs. - - For example, use the [file management interface](../reference/apis/js-apis-file-fs.md) to obtain the file handle (FD) of the audio clip based on the URI, and then develop the audio playback function based on the media service. For details, see [Audio Playback Development](../media/audio-playback-overview.md). +3. Create an **audioViewPicker** instance, and call [**select()**](../reference/apis/js-apis-file-picker.md#select-6) to open the **FilePicker** page for the user to select audio files. After the files are selected, a result set containing the URIs of the audio files selected is returned. + +
The permission on the URIs returned by **select()** is read-only. Further file operations can be performed based on the URIs in the result set. Note that the URI cannot be directly used in the **picker** callback to open a file. You need to define a global variable to save the URI and use a button to trigger file opening. + +
For example, use the [file management interface](../reference/apis/js-apis-file-fs.md) to obtain the file handle (FD) of the audio clip based on the URI, and then develop the audio playback function based on the media service. For details, see [Audio Playback Development](../media/audio-playback-overview.md). > **NOTE** > > Currently, **AudioSelectOptions** is not configurable. By default, all types of user files are selected. ```ts - let uri = null; + let URI = null; const audioViewPicker = new picker.AudioViewPicker(); audioViewPicker.select(audioSelectOptions).then(audioSelectResult => { - uri = audioSelectOptions[0]; + URI = audioSelectOptions[0]; + console.info('audioViewPicker.select to file succeed and URI is:' + URI); }).catch((err) => { - console.error(`Invoke audioPicker.select failed, code is ${err.code}, message is ${err.message}`); + console.error(`Invoke audioViewPicker.select failed, code is ${err.code}, message is ${err.message}`); }) ``` -4. After the GUI is returned from FilePicker, use [**fs.openSync**](../reference/apis/js-apis-file-fs.md#fsopensync) to open the file based on the URI and obtain the FD. +4. Use a button to trigger invocation of other functions. Use [fs.openSync()](../reference/apis/js-apis-file-fs.md#fsopensync) to open the file based on the URI and obtain the FD. Note that the **mode** parameter of **fs.openSync()** must be **fs.OpenMode.READ_ONLY**. ```ts - let file = fs.openSync(uri, fs.OpenMode.READ_WRITE); + let file = fs.openSync(URI, fs.OpenMode.READ_ONLY); console.info('file fd: ' + file.fd); ``` -5. Use [fs.writeSync](../reference/apis/js-apis-file-fs.md#writesync) to write data to the file based on the FD, and then close the FD. +5. Use [fs.readSync()](../reference/apis/js-apis-file-fs.md#readsync) to read the file data based on the FD. After the data is read, close the FD. ```ts - let writeLen = fs.writeSync(file.fd, 'hello, world'); - console.info('write data to file succeed and size is:' + writeLen); + let buffer = new ArrayBuffer(4096); + let readLen = fs.readSync(file.fd, buffer); + console.info('readSync data to file succeed and buffer size is:' + readLen); fs.closeSync(file); ``` diff --git a/en/application-dev/quick-start/start-with-ets-stage.md b/en/application-dev/quick-start/start-with-ets-stage.md index 978ffd47a206abc5f5b3e047a8d7f3dcc0e599e9..fb8593d555aec31c44e7a6658f6a68f2ab99dccb 100644 --- a/en/application-dev/quick-start/start-with-ets-stage.md +++ b/en/application-dev/quick-start/start-with-ets-stage.md @@ -37,14 +37,14 @@ - **AppScope** > **app.json5**: global configuration of your application. - **entry**: OpenHarmony project module, which can be built into an OpenHarmony Ability Package ([HAP](../../glossary.md#hap)). -- **oh_modules**: third-party library dependency information. For details about how to adapt a historical npm project to ohpm, see [Manually Migrating Historical Projects](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/project_overview-0000001053822398-V3#section108143331212). - **src > main > ets**: a collection of ArkTS source code. - **src > main > ets > entryability**: entry to your application/service. - **src > main > ets > pages**: pages included in your application/service. - **src > main > resources**: a collection of resource files used by your application/service, such as graphics, multimedia, character strings, and layout files. For details about resource files, see [Resource Categories and Access](resource-categories-and-access.md#resource-categories). - **src > main > module.json5**: module configuration file. This file describes the global configuration information of the application/service, the device-specific configuration information, and the configuration information of the HAP file. For details, see [module.json5 Configuration File](module-configuration-file.md). - **build-profile.json5**: current module information and build configuration options, including **buildOption** and **targets**. Under **targets**, you can set **runtimeOS** to **HarmonyOS** (default) or **OpenHarmony**, depending on the OS of your application. -- **hvigorfile.ts**: module-level build script. You can customize related tasks and code implementation. + - **hvigorfile.ts**: module-level build script. You can customize related tasks and code implementation. +- **oh_modules**: third-party library dependency information. For details about how to adapt a historical npm project to ohpm, see [Manually Migrating Historical Projects](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/project_overview-0000001053822398-V3#section108143331212). - **build-profile.json5**: application-level configuration information, including the signature and product configuration. - **hvigorfile.ts**: application-level build script. diff --git a/en/application-dev/reference/apis/js-apis-data-relationalStore.md b/en/application-dev/reference/apis/js-apis-data-relationalStore.md index 126dff90c4a6d06dfe675668409cf4d4d9573fa6..86d90ffdca37bf425b92aaae856e79fe82283f4b 100644 --- a/en/application-dev/reference/apis/js-apis-data-relationalStore.md +++ b/en/application-dev/reference/apis/js-apis-data-relationalStore.md @@ -2076,8 +2076,17 @@ store.query(predicates, ["ID", "NAME", "AGE", "SALARY", "CODES"], function (err, console.error(`Query failed, code is ${err.code},message is ${err.message}`); return; } - console.info(`ResultSet column names: ${resultSet.columnNames}`); - console.info(`ResultSet column count: ${resultSet.columnCount}`); + console.info(`ResultSet column names: ${resultSet.columnNames}, column count: ${resultSet.columnCount}`); + // resultSet is a cursor of a data set. By default, the cursor points to the -1st record. Valid data starts from 0. + while(resultSet.goToNextRow()) { + const id = resultSet.getLong(resultSet.getColumnIndex("ID")); + const name = resultSet.getString(resultSet.getColumnIndex("NAME")); + const age = resultSet.getLong(resultSet.getColumnIndex("AGE")); + const salary = resultSet.getDouble(resultSet.getColumnIndex("SALARY")); + console.info(`id=${id}, name=${name}, age=${age}, salary=${salary}`); + } + // Release the dataset memory. + resultSet.close(); }) ``` @@ -2117,8 +2126,17 @@ let predicates = new relationalStore.RdbPredicates("EMPLOYEE"); predicates.equalTo("NAME", "Rose"); let promise = store.query(predicates, ["ID", "NAME", "AGE", "SALARY", "CODES"]); promise.then((resultSet) => { - console.info(`ResultSet column names: ${resultSet.columnNames}`); - console.info(`ResultSet column count: ${resultSet.columnCount}`); + console.info(`ResultSet column names: ${resultSet.columnNames}, column count: ${resultSet.columnCount}`); + // resultSet is a cursor of a data set. By default, the cursor points to the -1st record. Valid data starts from 0. + while(resultSet.goToNextRow()) { + const id = resultSet.getLong(resultSet.getColumnIndex("ID")); + const name = resultSet.getString(resultSet.getColumnIndex("NAME")); + const age = resultSet.getLong(resultSet.getColumnIndex("AGE")); + const salary = resultSet.getDouble(resultSet.getColumnIndex("SALARY")); + console.info(`id=${id}, name=${name}, age=${age}, salary=${salary}`); + } + // Release the dataset memory. + resultSet.close(); }).catch((err) => { console.error(`Query failed, code is ${err.code},message is ${err.message}`); }) @@ -2164,8 +2182,17 @@ store.query("EMPLOYEE", predicates, ["ID", "NAME", "AGE", "SALARY", "CODES"], fu console.error(`Query failed, code is ${err.code},message is ${err.message}`); return; } - console.info(`ResultSet column names: ${resultSet.columnNames}`); - console.info(`ResultSet column count: ${resultSet.columnCount}`); + console.info(`ResultSet column names: ${resultSet.columnNames}, column count: ${resultSet.columnCount}`); + // resultSet is a cursor of a data set. By default, the cursor points to the -1st record. Valid data starts from 0. + while(resultSet.goToNextRow()) { + const id = resultSet.getLong(resultSet.getColumnIndex("ID")); + const name = resultSet.getString(resultSet.getColumnIndex("NAME")); + const age = resultSet.getLong(resultSet.getColumnIndex("AGE")); + const salary = resultSet.getDouble(resultSet.getColumnIndex("SALARY")); + console.info(`id=${id}, name=${name}, age=${age}, salary=${salary}`); + } + // Release the dataset memory. + resultSet.close(); }) ``` @@ -2211,8 +2238,17 @@ let predicates = new dataSharePredicates.DataSharePredicates(); predicates.equalTo("NAME", "Rose"); let promise = store.query("EMPLOYEE", predicates, ["ID", "NAME", "AGE", "SALARY", "CODES"]); promise.then((resultSet) => { - console.info(`ResultSet column names: ${resultSet.columnNames}`); - console.info(`ResultSet column count: ${resultSet.columnCount}`); + console.info(`ResultSet column names: ${resultSet.columnNames}, column count: ${resultSet.columnCount}`); + // resultSet is a cursor of a data set. By default, the cursor points to the -1st record. Valid data starts from 0. + while(resultSet.goToNextRow()) { + const id = resultSet.getLong(resultSet.getColumnIndex("ID")); + const name = resultSet.getString(resultSet.getColumnIndex("NAME")); + const age = resultSet.getLong(resultSet.getColumnIndex("AGE")); + const salary = resultSet.getDouble(resultSet.getColumnIndex("SALARY")); + console.info(`id=${id}, name=${name}, age=${age}, salary=${salary}`); + } + // Release the dataset memory. + resultSet.close(); }).catch((err) => { console.error(`Query failed, code is ${err.code},message is ${err.message}`); }) @@ -2273,8 +2309,17 @@ store.remoteQuery(deviceId, "EMPLOYEE", predicates, ["ID", "NAME", "AGE", "SALAR console.error(`Failed to remoteQuery, code is ${err.code},message is ${err.message}`); return; } - console.info(`ResultSet column names: ${resultSet.columnNames}`); - console.info(`ResultSet column count: ${resultSet.columnCount}`); + console.info(`ResultSet column names: ${resultSet.columnNames}, column count: ${resultSet.columnCount}`); + // resultSet is a cursor of a data set. By default, the cursor points to the -1st record. Valid data starts from 0. + while(resultSet.goToNextRow()) { + const id = resultSet.getLong(resultSet.getColumnIndex("ID")); + const name = resultSet.getString(resultSet.getColumnIndex("NAME")); + const age = resultSet.getLong(resultSet.getColumnIndex("AGE")); + const salary = resultSet.getDouble(resultSet.getColumnIndex("SALARY")); + console.info(`id=${id}, name=${name}, age=${age}, salary=${salary}`); + } + // Release the dataset memory. + resultSet.close(); } ) ``` @@ -2335,8 +2380,17 @@ let predicates = new relationalStore.RdbPredicates('EMPLOYEE'); predicates.greaterThan("id", 0); let promise = store.remoteQuery(deviceId, "EMPLOYEE", predicates, ["ID", "NAME", "AGE", "SALARY", "CODES"]); promise.then((resultSet) => { - console.info(`ResultSet column names: ${resultSet.columnNames}`); - console.info(`ResultSet column count: ${resultSet.columnCount}`); + console.info(`ResultSet column names: ${resultSet.columnNames}, column count: ${resultSet.columnCount}`); + // resultSet is a cursor of a data set. By default, the cursor points to the -1st record. Valid data starts from 0. + while(resultSet.goToNextRow()) { + const id = resultSet.getLong(resultSet.getColumnIndex("ID")); + const name = resultSet.getString(resultSet.getColumnIndex("NAME")); + const age = resultSet.getLong(resultSet.getColumnIndex("AGE")); + const salary = resultSet.getDouble(resultSet.getColumnIndex("SALARY")); + console.info(`id=${id}, name=${name}, age=${age}, salary=${salary}`); + } + // Release the dataset memory. + resultSet.close(); }).catch((err) => { console.error(`Failed to remoteQuery, code is ${err.code},message is ${err.message}`); }) @@ -2374,8 +2428,17 @@ store.querySql("SELECT * FROM EMPLOYEE CROSS JOIN BOOK WHERE BOOK.NAME = ?", ['s console.error(`Query failed, code is ${err.code},message is ${err.message}`); return; } - console.info(`ResultSet column names: ${resultSet.columnNames}`); - console.info(`ResultSet column count: ${resultSet.columnCount}`); + console.info(`ResultSet column names: ${resultSet.columnNames}, column count: ${resultSet.columnCount}`); + // resultSet is a cursor of a data set. By default, the cursor points to the -1st record. Valid data starts from 0. + while(resultSet.goToNextRow()) { + const id = resultSet.getLong(resultSet.getColumnIndex("ID")); + const name = resultSet.getString(resultSet.getColumnIndex("NAME")); + const age = resultSet.getLong(resultSet.getColumnIndex("AGE")); + const salary = resultSet.getDouble(resultSet.getColumnIndex("SALARY")); + console.info(`id=${id}, name=${name}, age=${age}, salary=${salary}`); + } + // Release the dataset memory. + resultSet.close(); }) ``` @@ -2413,8 +2476,17 @@ For details about the error codes, see [RDB Error Codes](../errorcodes/errorcode ```js let promise = store.querySql("SELECT * FROM EMPLOYEE CROSS JOIN BOOK WHERE BOOK.NAME = 'sanguo'"); promise.then((resultSet) => { - console.info(`ResultSet column names: ${resultSet.columnNames}`); - console.info(`ResultSet column count: ${resultSet.columnCount}`); + console.info(`ResultSet column names: ${resultSet.columnNames}, column count: ${resultSet.columnCount}`); + // resultSet is a cursor of a data set. By default, the cursor points to the -1st record. Valid data starts from 0. + while(resultSet.goToNextRow()) { + const id = resultSet.getLong(resultSet.getColumnIndex("ID")); + const name = resultSet.getString(resultSet.getColumnIndex("NAME")); + const age = resultSet.getLong(resultSet.getColumnIndex("AGE")); + const salary = resultSet.getDouble(resultSet.getColumnIndex("SALARY")); + console.info(`id=${id}, name=${name}, age=${age}, salary=${salary}`); + } + // Release the dataset memory. + resultSet.close(); }).catch((err) => { console.error(`Query failed, code is ${err.code},message is ${err.message}`); }) diff --git a/en/application-dev/reference/apis/js-apis-distributedMissionManager.md b/en/application-dev/reference/apis/js-apis-distributedMissionManager.md index 506b940eae2f206b9a1bb5a10a39350abcd99753..93e460019144b0e321b1f39b4c41a37f9c908d37 100644 --- a/en/application-dev/reference/apis/js-apis-distributedMissionManager.md +++ b/en/application-dev/reference/apis/js-apis-distributedMissionManager.md @@ -368,8 +368,8 @@ Continues a mission on a remote device. This API uses an asynchronous callback t | Name | Type | Mandatory | Description | | --------- | --------------------------------------- | ---- | ----- | -| parameter | [ContinueDeviceInfo](#js-apis-inner-application-continueDeviceInfo.md) | Yes | Parameters required for mission continuation.| -| options | [ContinueCallback](#js-apis-inner-application-continueCallback.md) | Yes | Callback invoked when the mission continuation is complete.| +| parameter | [ContinueDeviceInfo](js-apis-inner-application-continueDeviceInfo.md) | Yes | Parameters required for mission continuation.| +| options | [ContinueCallback](js-apis-inner-application-continueCallback.md) | Yes | Callback invoked when the mission continuation is complete.| | callback | AsyncCallback<void> | Yes | Callback used to return the result.| **Error codes** @@ -426,8 +426,8 @@ Continues a mission on a remote device. This API uses a promise to return the re | Name | Type | Mandatory | Description | | --------- | --------------------------------------- | ---- | ----- | -| parameter | [ContinueDeviceInfo](#js-apis-inner-application-continueDeviceInfo.md) | Yes | Parameters required for mission continuation.| -| options | [ContinueCallback](#js-apis-inner-application-continueCallback.md) | Yes | Callback invoked when the mission continuation is complete.| +| parameter | [ContinueDeviceInfo](js-apis-inner-application-continueDeviceInfo.md) | Yes | Parameters required for mission continuation.| +| options | [ContinueCallback](js-apis-inner-application-continueCallback.md) | Yes | Callback invoked when the mission continuation is complete.| **Return value** @@ -475,6 +475,171 @@ For details about the error codes, see [Distributed Scheduler Error Codes](../er } ``` +## distributedMissionManager.continueMission10+ + +continueMission(parameter: ContinueMissionInfo, callback: AsyncCallback<void>): void; + +Continues a mission on a remote device, with the bundle name specified. This API uses an asynchronous callback to return the result. + +**Required permissions**: ohos.permission.MANAGE_MISSIONS and ohos.permission.DISTRIBUTED_DATASYNC + +**System capability**: SystemCapability.Ability.AbilityRuntime.Mission + +**Parameters** + +| Name | Type | Mandatory | Description | +| --------- | --------------------------------------- | ---- | ----- | +| parameter | [ContinueMissionInfo](./js-apis-inner-application-continueMissionInfo.md) | Yes | Parameters required for mission continuation.| +| callback | AsyncCallback<void> | Yes | Callback invoked when the mission continuation is complete.| + +**Error codes** + +For details about the error codes, see [Distributed Scheduler Error Codes](../errorcodes/errorcode-DistributedSchedule.md). + +| ID| Error Message| +| ------- | -------------------------------------------- | +| 16300501 | The system ability work abnormally. | +| 16300503 | The application is not installed on the remote end and installation-free is not supported. | +| 16300504 | The application is not installed on the remote end but installation-free is supported, try again with freeInstall flag. | +| 16300505 | The operation device must be the device where the application to be continued is located or the target device to be continued. | +| 16300506 | The local continuation task is already in progress. | +| 16300507 | Failed to get the missionInfo of the specified bundle name. | + +**Example** + + ```ts + var parameter = { + srcDeviceId: "", + dstDeviceId: "", + bundleName: "ohos.test.continueapp", + wantParam: {"key": "value"} + }; + try { + distributedMissionManager.continueMission(parameter, (error) => { + if (error.code != 0) { + console.error('continueMission failed, cause: ' + JSON.stringify(error)) + } + console.info('continueMission finished') + }) + } catch (error) { + console.error('continueMission failed, cause: ' + JSON.stringify(error)) + } + ``` + +## distributedMissionManager.continueMission10+ + +continueMission(parameter: ContinueMissionInfo): Promise<void> + +Continues a mission on a remote device, with the bundle name specified. This API uses a promise to return the result. + +**Required permissions**: ohos.permission.MANAGE_MISSIONS and ohos.permission.DISTRIBUTED_DATASYNC + +**System capability**: SystemCapability.Ability.AbilityRuntime.Mission + +**Parameters** + +| Name | Type | Mandatory | Description | +| --------- | --------------------------------------- | ---- | ----- | +| parameter | [ContinueMissionInfo](./js-apis-inner-application-continueMissionInfo.md) | Yes | Parameters required for mission continuation.| + +**Return value** + +| Type | Description | +| ------------------- | ---------------- | +| Promise<void> | Promise used to return the result.| + +**Error codes** + +For details about the error codes, see [Distributed Scheduler Error Codes](../errorcodes/errorcode-DistributedSchedule.md). + +| ID| Error Message| +| ------- | -------------------------------------------- | +| 16300501 | The system ability work abnormally. | +| 16300503 | The application is not installed on the remote end and installation-free is not supported. | +| 16300504 | The application is not installed on the remote end but installation-free is supported, try again with freeInstall flag. | +| 16300505 | The operation device must be the device where the application to be continued is located or the target device to be continued. | +| 16300506 | The local continuation task is already in progress. | +| 16300507 | Failed to get the missionInfo of the specified bundle name. | + +**Example** + + ```ts + var parameter = { + srcDeviceId: "", + dstDeviceId: "", + bundleName: "ohos.test.continueapp", + wantParam: {"key": "value"} + }; + try { + distributedMissionManager.continueMission(parameter) + .then(data => { + console.info('continueMission finished, ' + JSON.stringify(data)); + }).catch(error => { + console.error('continueMission failed, cause: ' + JSON.stringify(error)); + }) + } catch (error) { + console.error('continueMission failed, cause: ' + JSON.stringify(error)) + } + ``` + +## distributedMissionManager.on('continueStateChange')10+ + +on(type: 'continueStateChange', callback: Callback<{ state: ContinueState, info: ContinuableInfo }>): void + +Registers a listener for the mission continuation state of the current application. + +**Required permissions**: ohos.permission.MANAGE_MISSIONS + +**System capability**: SystemCapability.Ability.AbilityRuntime.Mission + +**Parameters** + +| Name | Type | Mandatory | Description | +| --------- | ---------------------------------------- | ---- | -------- | +| type | string | Yes | Type of the listener. The value is fixed at **'continueStateChange'**. | +| callback | Callback<{ state: [ContinueState](#continuestate10), info: [ContinuableInfo](./js-apis-inner-application-continuableInfo.md) }> | Yes | Callback used to return the mission continuation state and information. | + +**Example** + +```js + try { + distributedMissionManager.on('continueStateChange', (data) => { + console.info("continueStateChange on:" + JSON.stringify(data)); + }); + } catch (err) { + console.error("continueStateChange errCode:" + err.code + ",errMessage:" + err.message); + } + ``` + +## distributedMissionManager.off('continueStateChange')10+ + +off(type: 'continueStateChange', callback?: Callback<{ state: ContinueState, info: ContinuableInfo }>): void + +Deregisters a listener for the mission continuation state of the current application. + +**Required permissions**: ohos.permission.MANAGE_MISSIONS + +**System capability**: SystemCapability.Ability.AbilityRuntime.Mission + +**Parameters** + +| Name | Type | Mandatory | Description | +| --------- | ---------------------------------------- | ---- | -------- | +| type | string | Yes | Type of the listener. The value is fixed at **'continueStateChange'**. | +| callback | Callback<{ state: [ContinueState](#continuestate10), info: [ContinuableInfo](./js-apis-inner-application-continuableInfo.md) }> | No | Callback used for the listener to be deregistered. | + +**Example** + +```js + try { + distributedMissionManager.off('continueStateChange', (data) => { + console.info("continueStateChange on:" + JSON.stringify(data)); + }); + } catch (err) { + console.error("continueStateChange errCode:" + err.code + ",errMessage:" + err.message); + } + ``` + ## MissionCallback Defines the callbacks that can be registered as a mission status listener. @@ -514,3 +679,14 @@ Defines the parameters required for registering a listener. | Name | Type | Readable | Writable | Description | | -------- | ------ | ---- | ---- | ------- | | deviceId | string | Yes | Yes | Device ID.| + +## ContinueState10+ + +Enumerates the mission continuation states. + +**System capability**: SystemCapability.Ability.AbilityRuntime.Mission + +| Name | Value | Description | +| ------------- | --------- | ------------------------------------------------------------ | +| ACTIVE | 0 | Mission continuation is activated for the current application. | +| INACTIVE | 1 | Mission continuation is not activated for the current application. | diff --git a/en/application-dev/reference/apis/js-apis-inner-ability-dataAbilityHelper.md b/en/application-dev/reference/apis/js-apis-inner-ability-dataAbilityHelper.md index f2569456cc3430e9a72189e6a6fe5b3ce06ea8a3..9cb2eb5e2190576b5d53d7cb001c1582dc60fbc8 100644 --- a/en/application-dev/reference/apis/js-apis-inner-ability-dataAbilityHelper.md +++ b/en/application-dev/reference/apis/js-apis-inner-ability-dataAbilityHelper.md @@ -18,7 +18,7 @@ import ability from '@ohos.ability.ability'; Import the following modules based on the actual situation before using the current module: ```ts import ohos_data_ability from '@ohos.data.dataAbility'; -import ohos_data_rdb from '@ohos.data.rdb'; +import relationalStore from '@ohos.data.relationalStore' ``` ## DataAbilityHelper.openFile @@ -1007,4 +1007,4 @@ dataAbilityHelper.executeBatch('dataability:///com.example.jsapidemo.UserDataAbi | Name| Type| Mandatory| Description| | ------ | ------ | ------ | ------ | -| [key: string] | number \| string \| boolean \| Array\ \| null | Yes| Data stored in key-value pairs.| \ No newline at end of file +| [key: string] | number \| string \| boolean \| Array\ \| null | Yes| Data stored in key-value pairs.| diff --git a/en/application-dev/reference/apis/js-apis-inner-application-continuableInfo.md b/en/application-dev/reference/apis/js-apis-inner-application-continuableInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..f82aebadfdc9a1cc8e9acd4334a32e4ca58ec048 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-inner-application-continuableInfo.md @@ -0,0 +1,35 @@ +# ContinuableInfo + +The **ContinuableInfo** module provides the mission continuation information to be returned when the listener for listening for the mission continuation state is registered. For details about the registration, see [on('continueStateChange')](js-apis-distributedMissionManager.md#distributedmissionmanageroncontinuestatechange10). + +> **NOTE** +> +> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> The APIs provided by this module are system APIs. + +## Modules to Import + +```ts +import distributedMissionManager from '@ohos.distributedMissionManager'; +``` + +**System capability**: SystemCapability.Ability.AbilityRuntime.Mission + +| Name | Type | Readable | Writable | Description | +| -------- | ------ | ---- | ---- | ------- | +| srcDeviceId | string | Yes | Yes | ID of the source device.| +| bundleName | string | Yes | Yes | Name of the bundle to which the mission belongs.| + +**Example** + +```js + import distributedMissionManager from '@ohos.distributedMissionManager'; + + try { + distributedMissionManager.on('continueStateChange', (data) => { + console.info("continueStateChange on:" + JSON.stringify(data)); + }); + } catch (err) { + console.error("continueStateChange errCode:" + err.code + ",errMessage:" + err.message); + } + ``` diff --git a/en/application-dev/reference/apis/js-apis-inner-application-continueMissionInfo.md b/en/application-dev/reference/apis/js-apis-inner-application-continueMissionInfo.md new file mode 100644 index 0000000000000000000000000000000000000000..40b6e6f28b9bc6dddd2abbc5ace156662a7e9784 --- /dev/null +++ b/en/application-dev/reference/apis/js-apis-inner-application-continueMissionInfo.md @@ -0,0 +1,46 @@ +# ContinueMissionInfo + +The **ContinueMissionInfo** module defines the parameters required for initiating mission continuation with the bundle name specified. For details about mission continuation, see [continueMission](js-apis-distributedMissionManager.md#distributedmissionmanagercontinuemission10). + +> **NOTE** +> +> The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version. +> The APIs provided by this module are system APIs. + +## Modules to Import + +```ts +import distributedMissionManager from '@ohos.distributedMissionManager'; +``` + +**System capability**: SystemCapability.Ability.AbilityRuntime.Mission + +| Name | Type | Readable | Writable | Description | +| -------- | ------ | ---- | ---- | ------- | +| srcDeviceId | string | Yes | Yes | ID of the source device.| +| dstDeviceId | string | Yes | Yes | ID of the target device.| +| bundleName | string | Yes | Yes | Name of the bundle to which the mission belongs.| +| wantParam | {[key: string]: any} | Yes | Yes | Extended parameters.| + +**Example** + + ```ts + import distributedMissionManager from '@ohos.distributedMissionManager'; + + var parameter = { + srcDeviceId: "", + dstDeviceId: "", + bundleName: "ohos.test.continueapp", + wantParam: {"key": "value"} + }; + try { + distributedMissionManager.continueMission(parameter, (error) => { + if (error.code != 0) { + console.error('continueMission failed, cause: ' + JSON.stringify(error)) + } + console.info('continueMission finished') + }) + } catch (error) { + console.error('continueMission failed, cause: ' + JSON.stringify(error)) + } + ``` diff --git a/en/application-dev/reference/apis/js-apis-installer.md b/en/application-dev/reference/apis/js-apis-installer.md index a10b567a9c0b4bbfebbbc6fc08514f6831db4906..803c42f309010e868f91aba9c62faccc467555bc 100644 --- a/en/application-dev/reference/apis/js-apis-installer.md +++ b/en/application-dev/reference/apis/js-apis-installer.md @@ -93,7 +93,15 @@ Installs a bundle. This API uses an asynchronous callback to return the result. **System API**: This is a system API. -**Required permissions**: ohos.permission.INSTALL_BUNDLE +**Required permissions**: ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE10+ + +> **NOTE** +> +> Since API version 10, this API can be called with the **ohos.permission.INSTALL_ENTERPRISE_BUNDLE** permission. +> +> To install an enterprise application, you must have the **ohos.permission.INSTALL_ENTERPRISE_BUNDLE** permission. +> +> To install a common application, you must have the **ohos.permission.INSTALL_BUNDLE** permission. **System capability**: SystemCapability.BundleManager.BundleFramework.Core @@ -162,7 +170,15 @@ Installs a bundle. This API uses an asynchronous callback to return the result. **System API**: This is a system API. -**Required permissions**: ohos.permission.INSTALL_BUNDLE +**Required permissions**: ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE10+ + +> **NOTE** +> +> Since API version 10, this API can be called with the **ohos.permission.INSTALL_ENTERPRISE_BUNDLE** permission. +> +> To install an enterprise application, you must have the **ohos.permission.INSTALL_ENTERPRISE_BUNDLE** permission. +> +> To install a common application, you must have the **ohos.permission.INSTALL_BUNDLE** permission. **System capability**: SystemCapability.BundleManager.BundleFramework.Core @@ -226,7 +242,15 @@ Installs a bundle. This API uses a promise to return the result. **System API**: This is a system API. -**Required permissions**: ohos.permission.INSTALL_BUNDLE +**Required permissions**: ohos.permission.INSTALL_BUNDLE or ohos.permission.INSTALL_ENTERPRISE_BUNDLE10+ + +> **NOTE** +> +> Since API version 10, this API can be called with the **ohos.permission.INSTALL_ENTERPRISE_BUNDLE** permission. +> +> To install an enterprise application, you must have the **ohos.permission.INSTALL_ENTERPRISE_BUNDLE** permission. +> +> To install a common application, you must have the **ohos.permission.INSTALL_BUNDLE** permission. **System capability**: SystemCapability.BundleManager.BundleFramework.Core diff --git a/en/application-dev/reference/apis/js-apis-media.md b/en/application-dev/reference/apis/js-apis-media.md index 7616a34520de90becc362cb12b6ba27ee8be0b49..4f290e8cc883e736d7aeacd4bebd26940c699217 100644 --- a/en/application-dev/reference/apis/js-apis-media.md +++ b/en/application-dev/reference/apis/js-apis-media.md @@ -368,6 +368,7 @@ For details about the audio and video playback demo, see [Audio Playback](../../ | videoScaleType9+ | [VideoScaleType](#videoscaletype9) | Yes | Yes | Video scaling type. The default value is **VIDEO_SCALE_TYPE_FIT_CROP**. It is a dynamic attribute
and can be set only when the AVPlayer is in the prepared, playing, paused, or completed state.| | audioInterruptMode9+ | [audio.InterruptMode](js-apis-audio.md#interruptmode9) | Yes | Yes | Audio interruption mode. The default value is **SHARE_MODE**. It is a dynamic attribute
and can be set only when the AVPlayer is in the prepared, playing, paused, or completed state.| | audioRendererInfo10+ | [audio.AudioRendererInfo](js-apis-audio.md#audiorendererinfo8) | Yes | Yes | Audio renderer information. The default value of **contentType** is **CONTENT_TYPE_MUSIC**, and the default value of **streamUsage** is **STREAM_USAGE_MEDIA**.
It can be set only when the AVPlayer is in the initialized state.| +| audioEffectMode10+ | [audio.AudioEffectMode](js-apis-audio.md#audioeffectmode10) | Yes | Yes | Audio effect mode. The audio effect mode is a dynamic attribute and is restored to the default value **EFFECT_DEFAULT** when **contentType** and **streamUsage** of **audioRendererInfo** are changed. It can be set only when the AVPlayer is in the prepared, playing, paused, or completed state.| | state9+ | [AVPlayerState](#avplayerstate9) | Yes | No | AVPlayer state. It can be used as a query parameter when the AVPlayer is in any state. | | currentTime9+ | number | Yes | No | Current video playback position, in ms. It can be used as a query parameter when the AVPlayer is in the prepared, playing, paused, or completed state.
The value **-1** indicates an invalid value.
In live mode, **-1** is returned by default.| | duration9+ | number | Yes | No | Video duration, in ms. It can be used as a query parameter when the AVPlayer is in the prepared, playing, paused, or completed state.
The value **-1** indicates an invalid value.
In live mode, **-1** is returned by default.| @@ -1018,7 +1019,7 @@ Selects an audio track. This API can be called only when the AVPlayer is in the ```js let index = 2 -avPlayer.setBitrate(index) +avPlayer.selectTrack(index) ``` ### deselectTrack10+ @@ -1071,7 +1072,7 @@ For details about the error codes, see [Media Error Codes](../errorcodes/errorco let mediaType = media.MediaType.MEDIA_TYPE_AUD; let trackIndex = null; -avPlayer.getCurrentTrack(mediaType (err, index) => { +avPlayer.getCurrentTrack(mediaType, (err, index) => { if (err == null) { console.info('getCurrentTrack success'); trackIndex = index; diff --git a/en/application-dev/reference/apis/js-apis-rpc.md b/en/application-dev/reference/apis/js-apis-rpc.md index e444fd018a529d7c2901c25ed1b6b24630eb54d9..4e2f4ed96e608f1f91cca03faea5188893be128f 100644 --- a/en/application-dev/reference/apis/js-apis-rpc.md +++ b/en/application-dev/reference/apis/js-apis-rpc.md @@ -45,9 +45,9 @@ During RPC or IPC, the sender can use the **write()** method provided by **Messa ### create -static create(): MessageSequence + static create(): MessageSequence -Creates a **MessageSequence** object. This API is a static method. + Creates a **MessageSequence** object. This API is a static method. **System capability**: SystemCapability.Communication.IPC.Core @@ -2397,7 +2397,7 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -2415,10 +2415,10 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -4860,7 +4860,7 @@ Reads the exception information from this **MessageParcel** object. ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -4878,10 +4878,10 @@ Reads the exception information from this **MessageParcel** object. "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -5452,6 +5452,7 @@ Marshals this **Parcelable** object into a **MessageSequence** object. | Type | Description | | ------- | -------------------------------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| + **Example** ```ts @@ -5557,6 +5558,7 @@ Marshals the sequenceable object into a **MessageParcel** object. | Type | Description | | ------- | -------------------------------- | | boolean | Returns **true** if the operation is successful; returns **false** otherwise.| + **Example** ```ts @@ -5673,7 +5675,7 @@ Obtains a proxy or remote object. This API must be implemented by its derived cl ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -5691,10 +5693,10 @@ Obtains a proxy or remote object. This API must be implemented by its derived cl "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -6117,7 +6119,7 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -6135,10 +6137,10 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -6193,7 +6195,7 @@ Sends a **MessageSequence** message to the remote process in synchronous or asyn ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -6211,10 +6213,10 @@ Sends a **MessageSequence** message to the remote process in synchronous or asyn "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -6277,7 +6279,7 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -6295,10 +6297,10 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -6354,7 +6356,7 @@ Sends a **MessageSequence** message to the remote process in synchronous or asyn ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -6385,10 +6387,10 @@ Sends a **MessageSequence** message to the remote process in synchronous or asyn result.data.reclaim(); result.reply.reclaim(); } - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -6435,7 +6437,7 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -6466,10 +6468,10 @@ Sends a **MessageParcel** message to the remote process in synchronous or asynch result.data.reclaim(); result.reply.reclaim(); } - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -6519,7 +6521,7 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -6537,10 +6539,10 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -6585,7 +6587,7 @@ Obtains the **LocalInterface** object of an interface token. ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -6603,10 +6605,10 @@ Obtains the **LocalInterface** object of an interface token. "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -6647,7 +6649,7 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -6665,10 +6667,10 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -6689,7 +6691,7 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode } ``` -### addDeathRecippient(deprecated) +### addDeathRecipient(deprecated) >This API is no longer maintained since API version 9. You are advised to use [registerDeathRecipient](#registerdeathrecipient9). @@ -6719,7 +6721,7 @@ Adds a callback for receiving the death notifications of the remote object, incl ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -6737,14 +6739,14 @@ Adds a callback for receiving the death notifications of the remote object, incl "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` - The proxy object in the **onConnect** callback can be assigned a value only after the ability is connected asynchronously. Then, **addDeathRecippient()** of the proxy object is called to add a callback for receiving the death notification of the remove object. + The proxy object in the **onConnect** callback can be assigned a value only after the ability is connected asynchronously. Then, **addDeathRecipient()** of the proxy object is called to add a callback for receiving the death notification of the remove object. ```ts class MyDeathRecipient { @@ -6786,7 +6788,7 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -6804,10 +6806,10 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -6859,7 +6861,7 @@ Removes the callback used to receive death notifications of the remote object. ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -6877,10 +6879,10 @@ Removes the callback used to receive death notifications of the remote object. "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -6927,7 +6929,7 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -6945,10 +6947,10 @@ For details about the error codes, see [RPC Error Codes](../errorcodes/errorcode "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` The proxy object in the **onConnect** callback can be assigned a value only after the ability is connected asynchronously. Then, **getDescriptor()** of the proxy object is called to obtain the interface descriptor of the object. @@ -6986,7 +6988,7 @@ Obtains the interface descriptor of this proxy object. ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -7004,10 +7006,10 @@ Obtains the interface descriptor of this proxy object. "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -7039,7 +7041,7 @@ Checks whether the **RemoteObject** is dead. ```ts // Import @ohos.ability.featureAbility only for the application developed based on the FA model. // import FA from "@ohos.ability.featureAbility"; - + let proxy; let connect = { onConnect: function(elementName, remoteProxy) { @@ -7057,10 +7059,10 @@ Checks whether the **RemoteObject** is dead. "bundleName": "com.ohos.server", "abilityName": "com.ohos.server.EntryAbility", }; - + // Use this method to connect to the ability for the FA model. // FA.connectAbility(want,connect); - + globalThis.context.connectServiceExtensionAbility(want, connect); ``` @@ -7095,9 +7097,9 @@ A constructor used to create a **MessageOption** object. **Parameters** - | Name | Type | Mandatory| Description | - | --------- | ------ | ---- | -------------------------------------- | - | syncFlags | number | No | Call flag, which can be synchronous or asynchronous. The default value is **synchronous**.| +| Name| Type | Mandatory| Description | +| ------ | ------- | ---- | -------------------------------------- | +| async | boolean | No | Call flag, which can be synchronous or asynchronous. The default value is **synchronous**.| **Example** @@ -7146,7 +7148,7 @@ Checks whether **SendMessageRequest** is called synchronously or asynchronously. | Type | Description | | ------- | ---------------------------------------- | - | boolean | Returns **true** if **SendMessageRequest** is called synchronously; returns **false** if **SendMessageRequest** is called asynchronously.| + | boolean | Returns **true** if **SendMessageRequest** is called asynchronously; returns **false** if it is called synchronously.| **Example** @@ -7825,7 +7827,7 @@ Sends a **MessageSequence** message to the remote process in synchronous or asyn | Type | Description | | ---------------------------- | --------------------------------------------- | - | Promise<RequestResult> | Promise used to return the **sendRequestResult** object.| + | Promise<RequestResult> | Promise used to return the **RequestResult** instance. | **Example** @@ -9101,29 +9103,30 @@ Reads data from the shared file associated with this **Ashmem** object. ```ts import Ability from '@ohos.app.ability.UIAbility'; + export default class MainAbility extends Ability { - onCreate(want, launchParam) { - console.log("[Demo] MainAbility onCreate"); - globalThis.context = this.context; - } - onDestroy() { - console.log("[Demo] MainAbility onDestroy"); - } - onWindowStageCreate(windowStage) { - // Main window is created, set main page for this ability - console.log("[Demo] MainAbility onWindowStageCreate"); - } - onWindowStageDestroy() { - // Main window is destroyed, release UI related resources - console.log("[Demo] MainAbility onWindowStageDestroy"); - } - onForeground() { - // Ability has brought to foreground - console.log("[Demo] MainAbility onForeground"); - } - onBackground() { - // Ability has back to background - console.log("[Demo] MainAbility onBackground"); - } + onCreate(want, launchParam) { + console.log("[Demo] MainAbility onCreate"); + globalThis.context = this.context; + } + onDestroy() { + console.log("[Demo] MainAbility onDestroy"); + } + onWindowStageCreate(windowStage) { + // Main window is created, set main page for this ability + console.log("[Demo] MainAbility onWindowStageCreate"); + } + onWindowStageDestroy() { + // Main window is destroyed, release UI related resources + console.log("[Demo] MainAbility onWindowStageDestroy"); + } + onForeground() { + // Ability has brought to foreground + console.log("[Demo] MainAbility onForeground"); + } + onBackground() { + // Ability has back to background + console.log("[Demo] MainAbility onBackground"); + } }; ``` diff --git a/en/application-dev/reference/apis/js-apis-window.md b/en/application-dev/reference/apis/js-apis-window.md index 726f05fc58a6ef1f82cb1955d24388fc17f48ebd..754fdb63586951cee479d2246be721ad053f1c56 100644 --- a/en/application-dev/reference/apis/js-apis-window.md +++ b/en/application-dev/reference/apis/js-apis-window.md @@ -236,7 +236,7 @@ Describes the window properties. | dimBehindValue(deprecated) | number | Yes | Yes | Dimness of the window that is not on top. The value ranges from 0 to 1. The value **1** indicates the maximum dimness.
**NOTE**
This property is supported since API version 7 and deprecated since API version 9.
| | isKeepScreenOn | boolean | Yes | Yes | Whether the screen is always on. The default value is **false**. The value **true** means that the screen is always on, and **false** means the opposite.| | isPrivacyMode7+ | boolean | Yes | Yes | Whether the window is in privacy mode. The default value is **false**. The value **true** means that the window is in privacy mode, and **false** means the opposite.| -| isRoundCorner(deprecated) | boolean | Yes | Yes | Whether the window has rounded corners. The default value is **false**. The value **true** means that the window has rounded corners, and **false** means the opposite.
**NOTE**
This property is supported since API version 7 and deprecated since API version 9.
| +| isRoundCorner(deprecated) | boolean | Yes | Yes | Whether the window has rounded corners. The default value is **false**. The value **true** means that the window has rounded corners, and **false** means the opposite.
**NOTE**
This property is supported since API version 7 and deprecated since API version 9.
| | isTransparent7+ | boolean | Yes | Yes | Whether the window is transparent. The default value is **false**. The value **true** means that the window is transparent, and **false** means the opposite.| | id9+ | number | Yes | No | Window ID. The default value is **0.0**. | @@ -2418,6 +2418,53 @@ try { } ``` +### getUIContext10+ + +getUIContext(): UIContext + +Obtain a **UIContext** instance. + +**Model restriction**: This API can be used only in the stage model. + +**System capability**: SystemCapability.WindowManager.WindowManager.Core + +**Return value** + +| Type | Description | +| ---------- | ---------------------- | +| [UIContext](./js-apis-arkui-UIContext.md#uicontext) | **UIContext** instance obtained.| + +**Example** + +```ts +import UIAbility from '@ohos.app.ability.UIAbility'; + +export default class EntryAbility extends UIAbility { + onWindowStageCreate(windowStage) { + // Load content for the main window. + windowStage.loadContent("pages/page2", (err) => { + if (err.code) { + console.error('Failed to load the content. Cause:' + JSON.stringify(err)); + return; + } + console.info('Succeeded in loading the content.'); + }); + // Obtain the main window. + let windowClass = null; + windowStage.getMainWindow((err, data) => { + if (err.code) { + console.error('Failed to obtain the main window. Cause: ' + JSON.stringify(err)); + return; + } + windowClass = data; + console.info('Succeeded in obtaining the main window. Data: ' + JSON.stringify(data)); + // Obtain a UIContext instance. + globalThis.uiContext = windowClass.getUIContext(); + }) + } +}; +``` + ### setUIContent9+ setUIContent(path: string, callback: AsyncCallback<void>): void @@ -7439,3 +7486,5 @@ controller.animationForHidden = (context : window.TransitionContext) => { console.info('complete transition end'); }; ``` + + \ No newline at end of file diff --git a/en/application-dev/reference/apis/js-apis-zlib.md b/en/application-dev/reference/apis/js-apis-zlib.md index 29a08b65aba9d945cfcdf2bbdf897a4527e40c38..17cecd628287a774ab6070bbc0d40528bb7c108d 100644 --- a/en/application-dev/reference/apis/js-apis-zlib.md +++ b/en/application-dev/reference/apis/js-apis-zlib.md @@ -235,7 +235,7 @@ Decompresses a file. This API uses an asynchronous callback to return the result | Name | Type | Mandatory| Description | | ----------------------- | ------------------- | ---- | ------------------------------------------------------------ | -| inFile | string | Yes | Path of the file to decompress. The path must be an application sandbox path, which can be obtained from the context. For details about the context, see [FA Model](js-apis-inner-app-context.md) and [Stage Model](js-apis-inner-application-context.md).| +| inFile | string | Yes | Path of the file to decompress. The file name extension must be .zip. The path must be an application sandbox path, which can be obtained from the context. For details about the context, see [FA Model](js-apis-inner-app-context.md) and [Stage Model](js-apis-inner-application-context.md).| | outFile | string | Yes | Path of the decompressed file. The path must exist in the system. Otherwise, the decompression fails. The path must be an application sandbox path, which can be obtained from the context. For details about the context, see [FA Model](js-apis-inner-app-context.md) and [Stage Model](js-apis-inner-application-context.md).| | options | [Options](#options) | Yes | Decompression parameters. | | AsyncCallback<**void**> | callback | No | Callback used to return the result. If the operation is successful, **null** is returned; otherwise, a specific error code is returned. | @@ -287,7 +287,7 @@ Decompresses a file. This API uses a promise to return the result. | Name | Type | Mandatory| Description | | ------- | ------------------- | ---- | ------------------------------------------------------------ | -| inFile | string | Yes | Path of the file to decompress. The path must be an application sandbox path, which can be obtained from the context. For details about the context, see [FA Model](js-apis-inner-app-context.md) and [Stage Model](js-apis-inner-application-context.md).| +| inFile | string | Yes | Path of the file to decompress. The file name extension must be .zip. The path must be an application sandbox path, which can be obtained from the context. For details about the context, see [FA Model](js-apis-inner-app-context.md) and [Stage Model](js-apis-inner-application-context.md).| | outFile | string | Yes | Path of the decompressed file. The path must exist in the system. Otherwise, the decompression fails. The path must be an application sandbox path, which can be obtained from the context. For details about the context, see [FA Model](js-apis-inner-app-context.md) and [Stage Model](js-apis-inner-application-context.md).| | options | [Options](#options) | Yes | Decompression parameters. | diff --git a/en/application-dev/reference/arkui-ts/Readme-EN.md b/en/application-dev/reference/arkui-ts/Readme-EN.md index d937a73a45b5f54e51e2b46952c860c9e69cd95e..f2b75b5ee72085cc451b147a50d909edf44964a1 100644 --- a/en/application-dev/reference/arkui-ts/Readme-EN.md +++ b/en/application-dev/reference/arkui-ts/Readme-EN.md @@ -33,19 +33,21 @@ - [Gradient Color](ts-universal-attributes-gradient-color.md) - [Popup Control](ts-universal-attributes-popup.md) - [Menu Control](ts-universal-attributes-menu.md) - - [Click Control](ts-universal-attributes-click.md) - [Focus Control](ts-universal-attributes-focus.md) - [Hover Effect](ts-universal-attributes-hover-effect.md) - [Component ID](ts-universal-attributes-component-id.md) - - [Touch Target](ts-universal-attributes-touch-target.md) - [Polymorphic Style](ts-universal-attributes-polymorphic-style.md) - - [Hit Test Control](ts-universal-attributes-hit-test-behavior.md) - - [Background Blur](ts-universal-attributes-backgroundBlurStyle.md) - [restoreId](ts-universal-attributes-restoreId.md) - [Foreground Color](ts-universal-attributes-foreground-color.md) - - [Spherical Effect](ts-universal-attributes-sphericalEffect.md) - - [Light Up Effect](ts-universal-attributes-lightUpEffect.md) - - [Pixel Stretch Effect](ts-universal-attributes-pixelStretchEffect.md) + - [Click Effect](ts-universal-attributes-click-effect.md) + - Touch Interactions + - [Click Control](ts-universal-attributes-click.md) + - [Touch Target](ts-universal-attributes-touch-target.md) + - [Hit Test Control](ts-universal-attributes-hit-test-behavior.md) + - Touch Interactions + - [Modal Transition](ts-universal-attributes-modal-transition.md) + - [Sheet Transition](ts-universal-attributes-sheet-transition.md) + - [Obscuring](ts-universal-attributes-obscured.md) - [Universal Text Attributes](ts-universal-attributes-text-style.md) - Gesture Handling - [Gesture Binding Methods](ts-gesture-settings.md) @@ -146,12 +148,13 @@ - Canvas Components - [Canvas](ts-components-canvas-canvas.md) - [CanvasGradient](ts-components-canvas-canvasgradient.md) + - [CanvasPattern](ts-components-canvas-canvaspattern.md) - [CanvasRenderingContext2D](ts-canvasrenderingcontext2d.md) - [ImageBitmap](ts-components-canvas-imagebitmap.md) - [ImageData](ts-components-canvas-imagedata.md) + - [Matrix2D](ts-components-canvas-matrix2d.md) - [OffscreenCanvasRenderingContext2D](ts-offscreencanvasrenderingcontext2d.md) - [Path2D](ts-components-canvas-path2d.md) - - [Lottie](ts-components-canvas-lottie.md) - Animation - [AnimatorProperty](ts-animatorproperty.md) - [Explicit Animatio](ts-explicit-animation.md) diff --git a/en/application-dev/reference/arkui-ts/figures/ImageSmoothingQualityDemo.jpeg b/en/application-dev/reference/arkui-ts/figures/ImageSmoothingQualityDemo.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..01ae362e6ae3e7df6dbd029ceed14e6838720e16 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/ImageSmoothingQualityDemo.jpeg differ diff --git a/en/application-dev/reference/arkui-ts/figures/canvas_pattern.gif b/en/application-dev/reference/arkui-ts/figures/canvas_pattern.gif new file mode 100644 index 0000000000000000000000000000000000000000..98acc8dbefc1e6e93a7679e0787d2be007943668 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/canvas_pattern.gif differ diff --git a/en/application-dev/reference/arkui-ts/figures/clickeffect.gif b/en/application-dev/reference/arkui-ts/figures/clickeffect.gif new file mode 100644 index 0000000000000000000000000000000000000000..23e3badd67fa6db5f1ca5676df81bc145e2ebdfb Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/clickeffect.gif differ diff --git a/en/application-dev/reference/arkui-ts/figures/directionDemo.jpeg b/en/application-dev/reference/arkui-ts/figures/directionDemo.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..0d98af05dcd866c23dcc9a15298b4fd67048504a Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/directionDemo.jpeg differ diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_canvas_height.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_canvas_height.png new file mode 100644 index 0000000000000000000000000000000000000000..589059ee8bf53b736cdadfc79ee44bbfd9d3db02 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_canvas_height.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/en-us_image_canvas_width.png b/en/application-dev/reference/arkui-ts/figures/en-us_image_canvas_width.png new file mode 100644 index 0000000000000000000000000000000000000000..c9d63dc6b6ff97b2b0ff3ae4599b787db8dd096f Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/en-us_image_canvas_width.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/filterDemo.jpeg b/en/application-dev/reference/arkui-ts/figures/filterDemo.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..4f3321de2bd30afc4f4fa369d769aab4bb5d20a3 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/filterDemo.jpeg differ diff --git a/en/application-dev/reference/arkui-ts/figures/obscured.png b/en/application-dev/reference/arkui-ts/figures/obscured.png new file mode 100644 index 0000000000000000000000000000000000000000..6cb469730fae3b5df6c5b252bb7bbc050c958fe2 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/obscured.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/offscreen_canvas.png b/en/application-dev/reference/arkui-ts/figures/offscreen_canvas.png new file mode 100644 index 0000000000000000000000000000000000000000..6408dcb81dc4e02287e5bf7b714534a4a48de12a Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/offscreen_canvas.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/offscreen_canvas_height.png b/en/application-dev/reference/arkui-ts/figures/offscreen_canvas_height.png new file mode 100644 index 0000000000000000000000000000000000000000..69818ec80dd321547d5dfc97333409512f1e83d3 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/offscreen_canvas_height.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/offscreen_canvas_transferToImageBitmap.png b/en/application-dev/reference/arkui-ts/figures/offscreen_canvas_transferToImageBitmap.png new file mode 100644 index 0000000000000000000000000000000000000000..774081139d8c0e38406966a718b394584ded9b01 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/offscreen_canvas_transferToImageBitmap.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/offscreen_canvas_width.png b/en/application-dev/reference/arkui-ts/figures/offscreen_canvas_width.png new file mode 100644 index 0000000000000000000000000000000000000000..d920c43bb9215e144b1bf5ac4362999a41da22c0 Binary files /dev/null and b/en/application-dev/reference/arkui-ts/figures/offscreen_canvas_width.png differ diff --git a/en/application-dev/reference/arkui-ts/figures/size.png b/en/application-dev/reference/arkui-ts/figures/size.png index 5170abe9fb68747018cecc57e27df68806bafac4..b89a721447db8981ebe3fb34bccbfd939dd1f91e 100644 Binary files a/en/application-dev/reference/arkui-ts/figures/size.png and b/en/application-dev/reference/arkui-ts/figures/size.png differ diff --git a/en/application-dev/reference/arkui-ts/ts-appendix-enums.md b/en/application-dev/reference/arkui-ts/ts-appendix-enums.md index bf4d48665a378934f14c413db9408fa09fb5705f..35b8c458af2de6981fb47703039e07ee47b3a6b1 100644 --- a/en/application-dev/reference/arkui-ts/ts-appendix-enums.md +++ b/en/application-dev/reference/arkui-ts/ts-appendix-enums.md @@ -1,113 +1,117 @@ # Enums +>**NOTE** +> +>The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. + ## Color Since API version 9, this API is supported in ArkTS widgets. -| Color | Value | Illustration | -| ------------------------ | -------- | ------------------------------------------------------------ | -| Black | 0x000000 | ![en-us_image_0000001219864153](figures/en-us_image_0000001219864153.png) | -| Blue | 0x0000ff | ![en-us_image_0000001174104404](figures/en-us_image_0000001174104404.png) | -| Brown | 0xa52a2a | ![en-us_image_0000001219744201](figures/en-us_image_0000001219744201.png) | -| Gray | 0x808080 | ![en-us_image_0000001174264376](figures/en-us_image_0000001174264376.png) | -| Grey | 0x808080 | ![en-us_image_0000001174264376](figures/en-us_image_0000001174264376.png) | -| Green | 0x008000 | ![en-us_image_0000001174422914](figures/en-us_image_0000001174422914.png) | -| Orange | 0xffa500 | ![en-us_image_0000001219662661](figures/en-us_image_0000001219662661.png) | -| Pink | 0xffc0cb | ![en-us_image_0000001219662663](figures/en-us_image_0000001219662663.png) | -| Red | 0xff0000 | ![en-us_image_0000001219662665](figures/en-us_image_0000001219662665.png) | -| White | 0xffffff | ![en-us_image_0000001174582866](figures/en-us_image_0000001174582866.png) | -| Yellow | 0xffff00 | ![en-us_image_0000001174582864](figures/en-us_image_0000001174582864.png) | -| Transparent9+ | rgba(0,0,0,0) | Transparent | +| Color | Value | Illustration | +| ------------------------ | ------------- | ---------------------------------------- | +| Black | 0x000000 | ![en-us_image_0000001219864153](figures/en-us_image_0000001219864153.png) | +| Blue | 0x0000ff | ![en-us_image_0000001174104404](figures/en-us_image_0000001174104404.png) | +| Brown | 0xa52a2a | ![en-us_image_0000001219744201](figures/en-us_image_0000001219744201.png) | +| Gray | 0x808080 | ![en-us_image_0000001174264376](figures/en-us_image_0000001174264376.png) | +| Grey | 0x808080 | ![en-us_image_0000001174264376](figures/en-us_image_0000001174264376.png) | +| Green | 0x008000 | ![en-us_image_0000001174422914](figures/en-us_image_0000001174422914.png) | +| Orange | 0xffa500 | ![en-us_image_0000001219662661](figures/en-us_image_0000001219662661.png) | +| Pink | 0xffc0cb | ![en-us_image_0000001219662663](figures/en-us_image_0000001219662663.png) | +| Red | 0xff0000 | ![en-us_image_0000001219662665](figures/en-us_image_0000001219662665.png) | +| White | 0xffffff | ![en-us_image_0000001174582866](figures/en-us_image_0000001174582866.png) | +| Yellow | 0xffff00 | ![en-us_image_0000001174582864](figures/en-us_image_0000001174582864.png) | +| Transparent9+ | rgba(0,0,0,0) | Transparent | ## ImageFit Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| --------- | ------------------------------------------------------------ | +| Name | Description | +| --------- | ------------------------------- | | Contain | The image is scaled with its aspect ratio retained for the content to be completely displayed within the display boundaries. | | Cover | The image is scaled with its aspect ratio retained for both sides to be greater than or equal to the display boundaries.| -| Auto | The image is scaled automatically to fit the display area. | -| Fill | The image is scaled to fill the display area, and its aspect ratio is not retained. | -| ScaleDown | The image is displayed with its aspect ratio retained, in a size smaller than or equal to the original size. | -| None | The original size is retained. | +| Auto | The image is scaled automatically to fit the display area. | +| Fill | The image is scaled to fill the display area, and its aspect ratio is not retained. | +| ScaleDown | The image is displayed with its aspect ratio retained, in a size smaller than or equal to the original size. | +| None | The original size is retained. | ## BorderStyle Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ------ | ----------------------------------------------- | +| Name | Description | +| ------ | ----------------------------- | | Dotted | Dotted border. The radius of a dot is half of **borderWidth**.| -| Dashed | Dashed border. | -| Solid | Solid border. | +| Dashed | Dashed border. | +| Solid | Solid border. | ## LineJoinStyle Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ----- | -------------------- | +| Name | Description | +| ----- | ---------- | | Bevel | Bevel is used to connect paths.| | Miter | Miter is used to connect paths.| | Round | Round is used to connect paths.| ## TouchType -| Name | Description | -| ------ | ------------------------------ | -| Down | A finger is pressed. | -| Up | A finger is lifted. | +| Name | Description | +| ------ | --------------- | +| Down | A finger is pressed. | +| Up | A finger is lifted. | | Move | A finger moves on the screen in pressed state.| -| Cancel | A touch event is canceled. | +| Cancel | A touch event is canceled. | ## MouseButton -| Name | Description | -| ------- | ---------------- | -| Left | Left button on the mouse. | -| Right | Right button on the mouse. | -| Middle | Middle button on the mouse. | +| Name | Description | +| ------- | -------- | +| Left | Left button on the mouse. | +| Right | Right button on the mouse. | +| Middle | Middle button on the mouse. | | Back | Back button on the left of the mouse.| | Forward | Forward button on the left of the mouse.| -| None | No button. | +| None | No button. | ## MouseAction -| Name | Description | -| ------- | -------------- | +| Name | Description | +| ------- | ------- | | Press | The mouse button is pressed.| | Release | The mouse button is released.| -| Move | The mouse cursor moves. | -| Hover | The mouse pointer is hovered on an element. | +| Move | The mouse cursor moves. | +| Hover | The mouse pointer is hovered on an element. | ## Curve Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ------------------- | ------------------------------------------------------------ | -| Linear | The animation speed keeps unchanged. | +| Name | Description | +| ------------------- | ---------------------------------------- | +| Linear | The animation speed keeps unchanged. | | Ease | The animation starts slowly, accelerates, and then slows down towards the end. The cubic-bezier curve (0.25, 0.1, 0.25, 1.0) is used.| -| EaseIn | The animation starts at a low speed and then picks up speed until the end. The cubic-bezier curve (0.42, 0.0, 1.0, 1.0) is used. | -| EaseOut | The animation ends at a low speed. The cubic-bezier curve (0.0, 0.0, 0.58, 1.0) is used. | +| EaseIn | The animation starts at a low speed and then picks up speed until the end. The cubic-bezier curve (0.42, 0.0, 1.0, 1.0) is used.| +| EaseOut | The animation ends at a low speed. The cubic-bezier curve (0.0, 0.0, 0.58, 1.0) is used.| | EaseInOut | The animation starts and ends at a low speed. The cubic-bezier curve (0.42, 0.0, 0.58, 1.0) is used.| -| FastOutSlowIn | The animation uses the standard cubic-bezier curve (0.4, 0.0, 0.2, 1.0). | -| LinearOutSlowIn | The animation uses the deceleration cubic-bezier curve (0.0, 0.0, 0.2, 1.0). | -| FastOutLinearIn | The animation uses the acceleration cubic-bezier curve (0.4, 0.0, 1.0, 1.0). | -| ExtremeDeceleration | The animation uses the extreme deceleration cubic-bezier curve (0.0, 0.0, 0.0, 1.0). | -| Sharp | The animation uses the sharp cubic-bezier curve (0.33, 0.0, 0.67, 1.0). | -| Rhythm | The animation uses the rhythm cubic-bezier curve (0.7, 0.0, 0.2, 1.0). | -| Smooth | The animation uses the smooth cubic-bezier curve (0.4, 0.0, 0.4, 1.0). | -| Friction | The animation uses the friction cubic-bezier curve (0.2, 0.0, 0.2, 1.0). | +| FastOutSlowIn | The animation uses the standard cubic-bezier curve (0.4, 0.0, 0.2, 1.0). | +| LinearOutSlowIn | The animation uses the deceleration cubic-bezier curve (0.0, 0.0, 0.2, 1.0). | +| FastOutLinearIn | The animation uses the acceleration cubic-bezier curve (0.4, 0.0, 1.0, 1.0). | +| ExtremeDeceleration | The animation uses the extreme deceleration cubic-bezier curve (0.0, 0.0, 0.0, 1.0). | +| Sharp | The animation uses the sharp cubic-bezier curve (0.33, 0.0, 0.67, 1.0).| +| Rhythm | The animation uses the rhythm cubic-bezier curve (0.7, 0.0, 0.2, 1.0). | +| Smooth | The animation uses the smooth cubic-bezier curve (0.4, 0.0, 0.4, 1.0). | +| Friction | The animation uses the friction cubic-bezier curve (0.2, 0.0, 0.2, 1.0). | ## AnimationStatus Since API version 10, this API is supported in ArkTS widgets. -| Name | Description | -| ------- | ------------------ | -| Initial | The animation is in the initial state. | +| Name | Description | +| ------- | --------- | +| Initial | The animation is in the initial state. | | Running | The animation is being played.| | Paused | The animation is paused.| | Stopped | The animation is stopped.| @@ -116,10 +120,10 @@ Since API version 10, this API is supported in ArkTS widgets. Since API version 10, this API is supported in ArkTS widgets. -| Name | Description | -| --------- | ------------------------------------------------------------ | -| None | Before execution, the animation does not apply any styles to the target component. After execution, the animation restores the target component to its default state.| -| Forwards | The target component retains the state set by the last keyframe encountered during execution of the animation. | +| Name | Description | +| --------- | ---------------------------------------- | +| None | Before execution, the animation does not apply any styles to the target component. After execution, the animation restores the target component to its default state. | +| Forwards | The target component retains the state set by the last keyframe encountered during execution of the animation. | | Backwards | The animation applies the values defined in the first relevant keyframe once it is applied to the target component, and retains the values during the period set by **delay**. The first relevant keyframe depends on the value of **playMode**. If **playMode** is **Normal** or **Alternate**, the first relevant keyframe is in the **from** state. If **playMode** is **Reverse** or **AlternateReverse**, the first relevant keyframe is in the **to** state.| | Both | The animation follows the rules for both **Forwards** and **Backwards**, extending the animation attributes in both directions.| @@ -127,140 +131,140 @@ Since API version 10, this API is supported in ArkTS widgets. Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ---------------- | ------------------------------------------------------------ | -| Normal | The animation is played forwards. | -| Reverse | The animation is played backwards. | +| Name | Description | +| ---------------- | ---------------------------------------- | +| Normal | The animation is played forwards. | +| Reverse | The animation is played backwards. | | Alternate | The animation is played forwards for an odd number of times (1, 3, 5...) and backwards for an even number of times (2, 4, 6...).| | AlternateReverse | The animation is played backwards for an odd number of times (1, 3, 5...) and forwards for an even number of times (2, 4, 6...).| ## KeyType -| Name| Description | -| ---- | ---------- | +| Name | Description | +| ---- | ----- | | Down | The key is pressed.| | Up | The key is released.| ## KeySource -| Name | Description | -| -------- | -------------------- | -| Unknown | Unknown input device. | +| Name | Description | +| -------- | ---------- | +| Unknown | Unknown input device. | | Keyboard | The input device is a keyboard.| ## Edge -| Name | Description | -| -------- | ---------------------- | -| Top | Top edge in the vertical direction.
Since API version 9, this API is supported in ArkTS widgets.| -| Center(deprecated) | Center position in the vertical direction.
This API is deprecated since API version 9.| -| Bottom | Bottom edge in the vertical direction.
Since API version 9, this API is supported in ArkTS widgets.| -| Baseline(deprecated) | Text baseline position in the cross axis direction.
This API is deprecated since API version 9.| -| Start | Start position in the horizontal direction.
Since API version 9, this API is supported in ArkTS widgets.| -| Middle(deprecated) | Center position in the horizontal direction.
This API is deprecated since API version 9.| -| End | End position in the horizontal direction.
Since API version 9, this API is supported in ArkTS widgets.| +| Name | Description | +| -------------------------------- | ---------------------------------------- | +| Top | Top edge in the vertical direction.
Since API version 9, this API is supported in ArkTS widgets.| +| Center(deprecated) | Center position in the vertical direction.
This API is deprecated since API version 9. | +| Bottom | Bottom edge in the vertical direction.
Since API version 9, this API is supported in ArkTS widgets.| +| Baseline(deprecated) | Text baseline position in the cross axis direction.
This API is deprecated since API version 9. | +| Start | Start position in the horizontal direction.
Since API version 9, this API is supported in ArkTS widgets.| +| Middle(deprecated) | Center position in the horizontal direction.
This API is deprecated since API version 9. | +| End | End position in the horizontal direction.
Since API version 9, this API is supported in ArkTS widgets.| ## Week -| Name | Description | -| -------- | ---------------------- | -| Mon | Monday. | -| Tue | Tuesday. | -| Wed | Wednesday. | -| Thur | Thursday. | -| Fri | Friday. | -| Sat | Saturday. | -| Sun | Sunday. | +| Name | Description | +| ---- | ---- | +| Mon | Monday. | +| Tue | Tuesday. | +| Wed | Wednesday. | +| Thur | Thursday. | +| Fri | Friday. | +| Sat | Saturday. | +| Sun | Sunday. | ## Direction Since API version 9, this API is supported in ArkTS widgets. -| Name| Description | -| ---- | ---------------------- | -| Ltr | Components are arranged from left to right. | -| Rtl | Components are arranged from right to left. | +| Name | Description | +| ---- | ----------- | +| Ltr | Components are arranged from left to right. | +| Rtl | Components are arranged from right to left. | | Auto | The default layout direction is used.| ## BarState Since API version 9, this API is supported in ArkTS widgets. -| Name| Description | -| ---- | -------------------------------- | -| Off | Not displayed. | -| On | Always displayed. | +| Name | Description | +| ---- | ------------------ | +| Off | Not displayed. | +| On | Always displayed. | | Auto | Displayed when the screen is touched and hidden after 2s.| ## EdgeEffect Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ------ | ------------------------------------------------------------ | +| Name | Description | +| ------ | ---------------------------------------- | | Spring | Spring effect. When at one of the edges, the component can move beyond the bounds through touches, and produces a bounce effect when the user releases their finger.| | Fade | Fade effect. When at one of the edges, the component produces a fade effect. | -| None | No effect when the component is at one of the edges. | +| None | No effect when the component is at one of the edges. | ## Alignment Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ----------- | ---------------- | -| TopStart | Top start. | -| Top | Horizontally centered on the top. | -| TopEnd | Top end. | +| Name | Description | +| ----------- | -------- | +| TopStart | Top start. | +| Top | Horizontally centered on the top. | +| TopEnd | Top end. | | Start | Vertically centered start.| | Center | Horizontally and vertically centered.| -| End | Vertically centered end. | -| BottomStart | Bottom start. | -| Bottom | Horizontally centered on the bottom. | -| BottomEnd | Bottom end. | +| End | Vertically centered end. | +| BottomStart | Bottom start. | +| Bottom | Horizontally centered on the bottom. | +| BottomEnd | Bottom end. | ## TransitionType Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ------ | -------------------------------------------------- | +| Name | Description | +| ------ | ------------------------------ | | All | The transition takes effect in all scenarios.| | Insert | The transition takes effect when a component is inserted or displayed.| | Delete | The transition takes effect when a component is deleted or hidden.| ## RelateType -| Name | Description | -| ------ | ------------------------------- | -| FILL | The current child component is scaled to fill the parent component. | -| FIT | The current child component is scaled to adapt to the parent component. | +| Name | Description | +| ---- | -------------- | +| FILL | The current child component is scaled to fill the parent component.| +| FIT | The current child component is scaled to adapt to the parent component.| ## Visibility Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ------- | -------------------------------- | -| Hidden | The component is hidden, and a placeholder is used for it in the layout. | -| Visible | The component is visible. | +| Name | Description | +| ------- | ---------------- | +| Hidden | The component is hidden, and a placeholder is used for it in the layout. | +| Visible | The component is visible. | | None | The component is hidden. It is not involved in the layout, and no placeholder is used for it.| ## LineCapStyle Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ------ | -------------------- | -| Butt | The ends of the line are squared off, and the line does not extend beyond its two endpoints.| -| Round | The line is extended at the endpoints by a half circle whose diameter is equal to the line width.| +| Name | Description | +| ------ | ----------------------------- | +| Butt | The ends of the line are squared off, and the line does not extend beyond its two endpoints. | +| Round | The line is extended at the endpoints by a half circle whose diameter is equal to the line width. | | Square | The line is extended at the endpoints by a rectangle whose width is equal to half the line width and height equal to the line width.| ## Axis Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ---------- | ------------ | +| Name | Description | +| ---------- | ------ | | Vertical | Vertical direction.| | Horizontal | Horizontal direction.| @@ -268,21 +272,21 @@ Since API version 9, this API is supported in ArkTS widgets. Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ------ | ------------------------ | +| Name | Description | +| ------ | ------------ | | Start | Aligned with the start edge in the same direction as the language in use.| | Center | Aligned with the center. This is the default alignment mode.| -| End | Aligned with the end edge in the same direction as the language in use. | +| End | Aligned with the end edge in the same direction as the language in use. | ## FlexAlign Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ------------ | ------------------------------------------------------------ | -| Start | The child components are aligned with the start edge of the main axis. The first component is aligned with the main-start, and subsequent components are aligned with the previous one.| -| Center | The child components are aligned in the center of the main axis. The space between the first component and the main-start is the same as that between the last component and the main-end.| -| End | The child components are aligned with the end edge of the main axis. The last component is aligned with the main-end, and other components are aligned with the next one.| +| Name | Description | +| ------------ | ---------------------------------------- | +| Start | The child components are aligned with the start edge of the main axis. The first component is aligned with the main-start, and subsequent components are aligned with the previous one. | +| Center | The child components are aligned in the center of the main axis. The space between the first component and the main-start is the same as that between the last component and the main-end. | +| End | The child components are aligned with the end edge of the main axis. The last component is aligned with the main-end, and other components are aligned with the next one. | | SpaceBetween | The child components are evenly distributed along the main axis. The space between any two adjacent components is the same. The first component is aligned with the main-start, the last component is aligned with the main-end, and the remaining components are distributed so that the space between any two adjacent components is the same.| | SpaceAround | The child components are evenly distributed along the main axis. The space between any two adjacent components is the same. The space between the first component and main-start, and that between the last component and cross-main are both half the size of the space between two adjacent components.| | SpaceEvenly | The child components are evenly distributed along the main axis. The space between the first component and main-start, the space between the last component and main-end, and the space between any two adjacent components are the same.| @@ -291,96 +295,96 @@ Since API version 9, this API is supported in ArkTS widgets. Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| -------- | ------------------------------------------------------------ | -| Auto | The default configuration of the flex container is used. | -| Start | The items in the flex container are aligned with the cross-start edge. | -| Center | The items in the flex container are centered along the cross axis. | -| End | The items in the flex container are aligned with the cross-end edge. | +| Name | Description | +| -------- | ---------------------------------------- | +| Auto | The default configuration of the flex container is used. | +| Start | The items in the flex container are aligned with the cross-start edge. | +| Center | The items in the flex container are centered along the cross axis. | +| End | The items in the flex container are aligned with the cross-end edge. | | Stretch | The items in the flex container are stretched and padded along the cross axis. If the flex container has the **Wrap** attribute set to **FlexWrap.Wrap** or **FlexWrap.WrapReverse**, the items are stretched to the cross size of the widest element on the current row or column. In other cases, the items with no size set are stretched to the container size.| -| Baseline | The items in the flex container are aligned in such a manner that their text baselines are aligned along the cross axis. | +| Baseline | The items in the flex container are aligned in such a manner that their text baselines are aligned along the cross axis. | ## FlexDirection Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ------------- | ------------------------------ | -| Row | The child components are arranged in the same direction as the main axis runs along the rows.| -| RowReverse | The child components are arranged opposite to the **Row** direction. | -| Column | The child components are arranged in the same direction as the main axis runs down the columns.| -| ColumnReverse | The child components are arranged opposite to the **Column** direction. | +| Name | Description | +| ------------- | ---------------- | +| Row | The child components are arranged in the same direction as the main axis runs along the rows. | +| RowReverse | The child components are arranged opposite to the **Row** direction. | +| Column | The child components are arranged in the same direction as the main axis runs down the columns. | +| ColumnReverse | The child components are arranged opposite to the **Column** direction.| ## FlexWrap Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ----------- | ------------------------------------------------- | -| NoWrap | The child components in the flex container are arranged in a single line, and they cannot overflow. | -| Wrap | The child components in the flex container are arranged in multiple lines, and they may overflow. | +| Name | Description | +| ----------- | --------------------------- | +| NoWrap | The child components in the flex container are arranged in a single line, and they cannot overflow. | +| Wrap | The child components in the flex container are arranged in multiple lines, and they may overflow. | | WrapReverse | The child components in the flex container are reversely arranged in multiple lines, and they may overflow.| ## VerticalAlign Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ------ | ------------------------ | -| Top | Top aligned. | +| Name | Description | +| ------ | ------------ | +| Top | Top aligned. | | Center | Center aligned. This is the default alignment mode.| -| Bottom | Bottom aligned. | +| Bottom | Bottom aligned. | ## ImageRepeat Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| -------- | -------------------------- | +| Name | Description | +| -------- | ------------- | | X | The image is repeatedly drawn only along the horizontal axis.| | Y | The image is repeatedly drawn only along the vertical axis.| -| XY | The image is repeatedly drawn along both axes. | -| NoRepeat | The image is not repeatedly drawn. | +| XY | The image is repeatedly drawn along both axes. | +| NoRepeat | The image is not repeatedly drawn. | ## ImageSize Since API version 9, this API is supported in ArkTS widgets. -| Type | Description | -| ------- | ------------------------------------------------------------ | +| Type | Description | +| ------- | ----------------------------------- | | Cover | Default value. The image is scaled with its aspect ratio retained for both sides to be greater than or equal to the display boundaries.| -| Contain | The image is scaled with its aspect ratio retained for the content to be completely displayed within the display boundaries. | -| Auto | The original image aspect ratio is retained. | +| Contain | The image is scaled with its aspect ratio retained for the content to be completely displayed within the display boundaries. | +| Auto | The original image aspect ratio is retained. | ## GradientDirection Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ----------- | ---------- | +| Name | Description | +| ----------- | ----- | | Left | The gradient direction is from right to left.| | Top | The gradient direction is from bottom to top.| | Right | The gradient direction is from left to right.| | Bottom | The gradient direction is from top to bottom.| -| LeftTop | The gradient direction is upper left. | -| LeftBottom | The gradient direction is lower left. | -| RightTop | The gradient direction is upper right. | -| RightBottom | The gradient direction is lower right. | -| None | No gradient. | +| LeftTop | The gradient direction is upper left. | +| LeftBottom | The gradient direction is lower left. | +| RightTop | The gradient direction is upper right. | +| RightBottom | The gradient direction is lower right. | +| None | No gradient. | ## SharedTransitionEffectType -| Name | Description | -| ----------- | ---------- | -| Static | The element position remains unchanged on the target page, and transition opacity can be configured. Currently, this effect is only valid in redirecting to the target page.| -| Exchange | The element is relocated and scaled properly on the target page.| +| Name | Description | +| -------- | ---------------------------------------- | +| Static | The element position remains unchanged on the target page, and transition opacity can be configured. Currently, this effect is only valid in redirecting to the target page.| +| Exchange | The element is relocated and scaled properly on the target page. | ## FontStyle Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ------ | ---------------- | +| Name | Description | +| ------ | -------- | | Normal | Standard font style.| | Italic | Italic font style.| @@ -388,151 +392,168 @@ Since API version 9, this API is supported in ArkTS widgets. Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ------- | -------------- | -| Lighter | The font weight is lighter. | +| Name | Description | +| ------- | ------- | +| Lighter | The font weight is lighter. | | Normal | The font weight is normal.| | Regular | The font weight is regular.| | Medium | The font weight is medium.| -| Bold | The font weight is bold. | -| Bolder | The font weight is bolder. | +| Bold | The font weight is bold. | +| Bolder | The font weight is bolder. | ## TextAlign Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| --------------------- | -------------- | +| Name | Description | +| --------------------- | ------- | | Start | Aligned with the start.| | Center | Horizontally centered.| | End | Aligned with the end.| -| Justify10+ | Aligned with both margins. | +| JUSTIFY10+ | Aligned with both margins. | ## TextOverflow Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| --------------------- | -------------------------------------- | -| None | Extra-long text is clipped. | -| Clip | Extra-long text is clipped. | +| Name | Description | +| --------------------- | ------------------- | +| None | Extra-long text is clipped. | +| Clip | Extra-long text is clipped. | | Ellipsis | An ellipsis (...) is used to represent text overflow.| -| Marquee10+ | Text continuously scrolls when text overflow occurs. | +| MARQUEE10+ | Text continuously scrolls when text overflow occurs. | ## TextDecorationType Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ----------- | ------------------ | -| Underline | Line under the text. | +| Name | Description | +| ----------- | --------- | +| Underline | Line under the text. | | LineThrough | Line through the text.| -| Overline | Line over the text. | +| Overline | Line over the text. | | None | No decorative lines.| ## TextCase Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| --------- | -------------------- | +| Name | Description | +| --------- | ---------- | | Normal | The original case of the text is retained.| -| LowerCase | All letters in the text are in lowercase. | -| UpperCase | All letters in the text are in uppercase. | +| LowerCase | All letters in the text are in lowercase. | +| UpperCase | All letters in the text are in uppercase. | ## ResponseType8+ -| Name | Description | -| ---------- | -------------------------- | -| LongPress | The menu is displayed when the component is long-pressed. | +| Name | Description | +| ---------- | ------------- | +| LongPress | The menu is displayed when the component is long-pressed. | | RightClick | The menu is displayed when the component is right-clicked.| ## HoverEffect8+ -| Name | Description | -| --------- | ---------------------------- | +| Name | Description | +| --------- | -------------- | | Auto | Default hover effect.| -| Scale | Scale effect. | -| Highlight | Background fade-in and fade-out effect. | -| None | No effect. | +| Scale | Scale effect. | +| Highlight | Background fade-in and fade-out effect. | +| None | No effect. | ## Placement8+ -| Name | Description | -| ------------- | ------------------------------------------------------------ | -| Left | The popup is on the left of the component, vertically aligned with the component on the left. | -| Right | The popup is on the right of the component, vertically aligned with the component on the right. | -| Top | The popup is at the top of the component, horizontally aligned with the component at the top. | -| Bottom | The popup is at the bottom of the component, horizontally aligned with the component at the bottom. | +| Name | Description | +| ------------- | -------------------------------------- | +| Left | The popup is on the left of the component, vertically aligned with the component on the left. | +| Right | The popup is on the right of the component, vertically aligned with the component on the right. | +| Top | The popup is at the top of the component, horizontally aligned with the component at the top. | +| Bottom | The popup is at the bottom of the component, horizontally aligned with the component at the bottom. | | TopLeft | The popup is at the top of the component and, since API version 9, aligned with the left of the component.| | TopRight | The popup is at the top of the component and, since API version 9, aligned with the right of the component.| | BottomLeft | The popup is at the bottom of the component and, since API version 9, aligned with the left of the component.| | BottomRight | The popup is at the bottom of the component and, since API version 9, aligned with the right of the component.| -| LeftTop9+ | The popup is on the left of the component and aligned with the top of the component. | -| LeftBottom9+ | The popup is on the left of the component and aligned with the bottom of the component. | -| RightTop9+ | The popup is on the right of the component and aligned with the top of the component. | -| RightBottom9+ | The popup is on the right of the component and aligned with the bottom of the component. | +| LeftTop9+ | The popup is on the left of the component and aligned with the top of the component. | +| LeftBottom9+ | The popup is on the left of the component and aligned with the bottom of the component. | +| RightTop9+ | The popup is on the right of the component and aligned with the top of the component. | +| RightBottom9+ | The popup is on the right of the component and aligned with the bottom of the component. | ## CopyOptions9+ Since API version 9, this API is supported in ArkTS widgets. -| Name | Description | -| ----------- | -------------------- | -| None | Copy is not allowed. | +| Name | Description | +| ----------- | -------- | +| None | Copy is not allowed. | | InApp | Intra-application copy is allowed.| | LocalDevice | Intra-device copy is allowed.| ## HitTestMode9+ -| Name | Description | -| ----------- | -------------------- | -| Default | Both the node and its child node respond to the hit test of a touch event, but its sibling node is blocked from the hit test. | -| Block | The node responds to the hit test of a touch event, but its child node and sibling node are blocked from the hit test. | +| Name | Description | +| ----------- | ---------------------------------------- | +| Default | Both the node and its child node respond to the hit test of a touch event, but its sibling node is blocked from the hit test.| +| Block | The node responds to the hit test of a touch event, but its child node and sibling node are blocked from the hit test.| | Transparent | Both the node and its child node respond to the hit test of a touch event, and its sibling node is also considered during the hit test.| -| None | The node does not respond to the hit test of a touch event, but its child node and sibling node are considered during the hit test.| +| None | The node does not respond to the hit test of a touch event, but its child node and sibling node are considered during the hit test. | ## BlurStyle9+ This API is supported in ArkTS widgets. -| Name| Description| -| ------- | ---------- | -| Thin | Thin material. | -| Regular | Regular material. | -| Thick | Thick material. | -| BackgroundThin | Material that creates the minimum depth of field effect.| -| BackgroundRegular | Material that creates a medium shallow depth of field effect.| -| BackgroundThick | Material that creates a high shallow depth of field effect.| -| BackgroundUltraThick | Material that creates the maximum depth of field effect.| +| Name | Description | +| -------------------- | --------- | +| Thin | Thin material. | +| Regular | Regular material.| +| Thick | Thick material. | +| BACKGROUND_THIN | Material that creates the minimum depth of field effect. | +| BACKGROUND_REGULAR | Material that creates a medium shallow depth of field effect. | +| BACKGROUND_THICK | Material that creates a high shallow depth of field effect. | +| BACKGROUND_ULTRA_THICK | Material that creates the maximum depth of field effect. | ## ThemeColorMode10+ -| Name | Description | -| ------- | ---------- | -| System | Following the system color mode.| -| Light | Light color mode.| -| Dark | Dark color mode.| +| Name | Description | +| ------ | ---------- | +| SYSTEM | Following the system color mode.| +| LIGHT | Light color mode. | +| DARK | Dark color mode. | ## AdaptiveColor10+ -| Name | Description | -| ------- | ----------- | -| Default | Adaptive color mode is not used. The default color is used as the mask color.| -| Average | Adaptive color mode is used. The average color value of the color picking area is used as the mask color.| +| Name | Description | +| ------- | ------------------------- | +| DEFAULT | Adaptive color mode is not used. The default color is used as the mask color. | +| AVERAGE | Adaptive color mode is used. The average color value of the color picking area is used as the mask color.| ## TextHeightAdaptivePolicy10+ -| Name | Description | -| ----------------------- | ------------------------------------------------ | -| MAX_LINES_FIRST | Prioritize the **maxLines** settings. | -| MIN_FONT_SIZE_FIRST | Prioritize the **minFontSize** settings. | +| Name | Description | +| ----------------------- | ------------------------ | +| MAX_LINES_FIRST | Prioritize the **maxLines** settings.| +| MIN_FONT_SIZE_FIRST | Prioritize the **minFontSize** settings. | | LAYOUT_CONSTRAINT_FIRST | Prioritize the layout constraint settings in terms of height.| +## ObscuredReasons10+ + +This API is supported in ArkTS widgets. + +| Name | Description | +| ----------- | ------------------------ | +| PLACEHOLDER | The content is replaced by a placeholder.| + ## TransitionEdge10+ -| Name| Description| -| -------- | -------- | -| TOP | Top edge of the window.| + +| Name | Description | +| ------ | ------ | +| TOP | Top edge of the window.| | BOTTOM | Bottom edge of the window.| -| START | Left edge of the window.| -| END | Right edge of the window.| +| START | Left edge of the window.| +| END | Right edge of the window.| + +## ClickEffectLevel10+ + +| Name | Description | Animation Settings | Default Zoom Ratio | +| ------ | --------------------------------- | --------------------------------- | --------------------------------- | +| LIGHT | Small area (light)| Spring effect, with stiffness of 410, damping of 38, and initial velocity of 1.| 90% | +| MIDDLE | Medium area (stable)| Spring effect, with stiffness of 350, damping of 35, and initial velocity of 0.5.| 95% | +| HEAVY | Large area (heavy)| Spring effect, with stiffness of 240, damping of 28, and initial velocity of 0.| 95% | diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-datapanel.md b/en/application-dev/reference/arkui-ts/ts-basic-components-datapanel.md index 3a56d0d8d44bc724a4290556f25d3366e5e7c339..e3681f6afdac7edc34bed701c1905c30857480d8 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-datapanel.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-datapanel.md @@ -48,7 +48,7 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the | ------------- | ------- | ---- | -------- | | closeEffect | boolean | Yes| Whether to disable the rotation and shadow effects for the component.
Default value: **false**
**NOTE**
This attribute enables or disables the shadow effect only when **trackShadow** is not set.
The shadow effect enabled through this attribute is in the default style.| | valueColors10+ | Array<[ResourceColor](ts-types.md#resourcecolor) \| [LinearGradient](#lineargradient10)> | Yes| Array of data segment colors. A value of the **ResourceColor** type indicates a solid color, and A value of the **LinearGradient** type indicates a color gradient.| -| trackBackgroundColor10+ | [ResourceColor](ts-types.md#resourcecolor) | Yes| Background color.
Default value: **'#081824'**| +| trackBackgroundColor10+ | [ResourceColor](ts-types.md#resourcecolor) | Yes| Background color.
The value is in hexadecimal ARGB notation. The first two digits indicate opacity.
Default value: **'#08182431'**| | strokeWidth10+ | [Length](ts-types.md#Length) | Yes| Stroke width of the border.
Default value: **24**
Unit: vp
**NOTE**
A value less than 0 evaluates to the default value.
This attribute does not take effect when the data panel type is **DataPanelType.Line**.| | trackShadow10+ | [DataPanelShadowOption](#datapanelshadowoption10) | Yes| Shadow style.
**NOTE**
If this attribute is set to **null**, the shadow effect is disabled.| diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-gauge.md b/en/application-dev/reference/arkui-ts/ts-basic-components-gauge.md index 2fe773177813164169dc35eddeba176a95fa4f89..6cf611c47dfd4d3d08b3124ec50e38b0ca1a4da7 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-gauge.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-gauge.md @@ -23,9 +23,9 @@ Since API version 9, this API is supported in ArkTS widgets. | Name| Type| Mandatory| Description| | -------- | -------- | -------- | -------- | -| value | number | Yes| Current value of the chart, that is, the position to which the pointer points in the chart. It is used as the initial value of the chart when the component is created.| +| value | number | Yes| Current value of the chart, that is, the position to which the pointer points in the chart. It is used as the initial value of the chart when the component is created.
**NOTE**
If the value is not within the range defined by the **min** and **max** parameters, the value of **min** is used.| | min | number | No| Minimum value of the current data segment.
Default value: **0**| -| max | number | No| Maximum value of the current data segment.
Default value: **100**| +| max | number | No| Maximum value of the current data segment.
Default value: **100**
**NOTE**
If the value of **max** is less than that of **min**, the default values **0** and **100** are used.
The values of **max** and **min** can be negative numbers.| ## Attributes @@ -36,8 +36,8 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the | value | number | Value of the chart. It can be dynamically changed.
Default value: **0**
Since API version 9, this API is supported in ArkTS widgets.| | startAngle | number | Start angle of the chart. The value **0** indicates 0 degrees, and a positive value indicates the clockwise direction.
Default value: **0**
Since API version 9, this API is supported in ArkTS widgets.| | endAngle | number | End angle of the chart. The value **0** indicates 0 degrees, and a positive value indicates the clockwise direction.
Default value: **360**
Since API version 9, this API is supported in ArkTS widgets.| -| colors | Array<[ColorStop](#colorstop)> | Colors of the chart. Colors can be set for individual segments.
Since API version 9, this API is supported in ArkTS widgets.| -| strokeWidth | Length | Stroke width of the chart.
Since API version 9, this API is supported in ArkTS widgets.| +| colors | Array<[ColorStop](#colorstop)> | Colors of the chart. Colors can be set for individual segments.
Default value: **Color.Black**
Since API version 9, this API is supported in ArkTS widgets.| +| strokeWidth | Length | Stroke width of the chart.
Default value: **4**
Unit: vp
Since API version 9, this API is supported in ArkTS widgets.
**NOTE**
A value less than 0 evaluates to the default value.
The value cannot be in percentage.| ## ColorStop @@ -47,7 +47,7 @@ Since API version 9, this API is supported in ArkTS widgets. | Name | Type | Description | | --------- | -------------------- | ------------------------------------------------------------ | -| ColorStop | [[ResourceColor](ts-types.md#resourcecolor), number] | Type of the gradient stop. The first parameter indicates the color value. If it is set to a non-color value, the black color is used. The second parameter indicates the color weight. If it is set to a negative number or a non-numeric value, the color weight is 0, which means that the color is not displayed.| +| ColorStop | [[ResourceColor](ts-types.md#resourcecolor), number] | Type of the gradient stop. The first parameter indicates the color value. If it is set to a non-color value, the black color is used. The second parameter indicates the color weight. If it is set to a negative number or a non-numeric value, the color weight is 0.| ## Example diff --git a/en/application-dev/reference/arkui-ts/ts-basic-components-imageanimator.md b/en/application-dev/reference/arkui-ts/ts-basic-components-imageanimator.md index 7cb0815a89199adfcc7d07a93df95595c20ce53d..d3c71096b7b39b2418be797a5d062d4b48488416 100644 --- a/en/application-dev/reference/arkui-ts/ts-basic-components-imageanimator.md +++ b/en/application-dev/reference/arkui-ts/ts-basic-components-imageanimator.md @@ -17,31 +17,33 @@ Not supported ImageAnimator() +Since API version 10, this API is supported in ArkTS widgets. + ## Attributes In addition to the [universal attributes](ts-universal-attributes-size.md), the following attributes are supported. | Name | Type |Description | | ---------- | ----------------------- |-------- | -| images | Array<[ImageFrameInfo](#imageframeinfo)> | Image frame information. The information of each frame includes the image path, image size, image position, and image playback duration. For details, see **ImageFrameInfo**.
Default value: **[]**
**NOTE**
Dynamic update is not supported.| -| state | [AnimationStatus](ts-appendix-enums.md#animationstatus) | Playback status of the animation. The default status is **Initial**.
Default value: **AnimationStatus.Initial**| -| duration | number | Playback duration, in ms. The default duration is 1000 ms. When the duration is **0**, no image is played. The value change takes effect only at the beginning of the next cycle. When a separate duration is set in **images**, the setting of this attribute is invalid.
Default value: **1000**| -| reverse | boolean | Playback sequence. The value **false** indicates that images are played from the first one to the last one, and **true** indicates that images are played from the last one to the first one.
Default value: **false**| -| fixedSize | boolean | Whether the image size is the same as the component size.
**true**: The image size is the same as the component size. In this case, the width, height, top, and left attributes of the image are invalid.
**false**: The width, height, top, and left attributes of each image must be set separately.
Default value: **true**| -| preDecode(deprecated) | number | Number of pre-decoded images. The value **2** indicates that two images following the currently playing page will be pre-decoded to improve performance.
This API is deprecated since API version 9.
Default value: **0**| -| fillMode | [FillMode](ts-appendix-enums.md#fillmode) | Status before and after the animation starts. For details about the options, see **FillMode**.
Default value: **FillMode.Forwards**| -| iterations | number | Number of times that the animation is played. By default, the animation is played once. The value **-1** indicates that the animation is played for an unlimited number of times.
Default value: **1**| +| images | Array<[ImageFrameInfo](#imageframeinfo)> | Image frame information. The information of each frame includes the image path, image size, image position, and image playback duration. For details, see **ImageFrameInfo**.
Default value: **[]**
**NOTE**
Dynamic update is not supported.
Since API version 10, this API is supported in ArkTS widgets.| +| state | [AnimationStatus](ts-appendix-enums.md#animationstatus) | Playback status of the animation. The default status is **Initial**.
Default value: **AnimationStatus.Initial**
Since API version 10, this API is supported in ArkTS widgets.| +| duration | number | Playback duration, in ms. The default duration is 1000 ms. When the duration is **0**, no image is played. The value change takes effect only at the beginning of the next cycle. When a separate duration is set in **images**, the setting of this attribute is invalid.
Default value: **1000**
Since API version 10, this API is supported in ArkTS widgets.| +| reverse | boolean | Playback sequence. The value **false** indicates that images are played from the first one to the last one, and **true** indicates that images are played from the last one to the first one.
Default value: **false**
Since API version 10, this API is supported in ArkTS widgets.| +| fixedSize | boolean | Whether the image size is the same as the component size.
**true**: The image size is the same as the component size. In this case, the width, height, top, and left attributes of the image are invalid.
**false**: The width, height, top, and left attributes of each image must be set separately.
Default value: **true**
Since API version 10, this API is supported in ArkTS widgets.| +| preDecode(deprecated) | number | Number of pre-decoded images. The value **2** indicates that two images following the currently playing page will be pre-decoded to improve performance.
This API is deprecated since API version 9.
Default value: **0** | +| fillMode | [FillMode](ts-appendix-enums.md#fillmode) | Status before and after the animation starts. For details about the options, see **FillMode**.
Default value: **FillMode.Forwards**
Since API version 10, this API is supported in ArkTS widgets.| +| iterations | number | Number of times that the animation is played. By default, the animation is played once. The value **-1** indicates that the animation is played for an unlimited number of times.
Default value: **1** | ## ImageFrameInfo | Name | Type | Mandatory| Description| | -------- | -------------- | -------- | -------- | -| src | string \| [Resource](ts-types.md#resource)9+ | Yes | Image path. The image format can be .svg, .png, or .jpg. Since API version 9, this attribute accepts paths of the [Resource](ts-types.md#resource) type.| -| width | number \| string | No | Image width.
Default value: **0** | -| height | number \| string | No | Image height.
Default value: **0** | -| top | number \| string | No | Vertical coordinate of the image relative to the upper left corner of the widget
Default value: **0** | -| left | number \| string | No | Horizontal coordinate of the image relative to the upper left corner of the widget
Default value: **0** | -| duration | number | No | Playback duration of each image frame, in milliseconds.
Default value: **0** | +| src | string \| [Resource](ts-types.md#resource)9+ | Yes | Image path. The image format can be .svg, .png, or .jpg. Since API version 9, this attribute accepts paths of the [Resource](ts-types.md#resource) type.
Since API version 10, this API is supported in ArkTS widgets.| +| width | number \| string | No | Image width.
Default value: **0**
Since API version 10, this API is supported in ArkTS widgets. | +| height | number \| string | No | Image height.
Default value: **0**
Since API version 10, this API is supported in ArkTS widgets. | +| top | number \| string | No | Vertical coordinate of the image relative to the upper left corner of the widget
Default value: **0**
Since API version 10, this API is supported in ArkTS widgets. | +| left | number \| string | No | Horizontal coordinate of the image relative to the upper left corner of the widget
Default value: **0**
Since API version 10, this API is supported in ArkTS widgets. | +| duration | number | No | Playback duration of each image frame, in milliseconds.
Default value: **0** | ## Events @@ -49,11 +51,11 @@ In addition to the [universal events](ts-universal-events-click.md), the followi | Name| Description| | -------- | -------- | -| onStart(event: () => void) | Triggered when the animation starts to play.| -| onPause(event: () => void) | Triggered when the animation playback is paused.| -| onRepeat(event: () => void) | Triggered when the animation playback is repeated.| -| onCancel(event: () => void) | Triggered when the animation playback is canceled.| -| onFinish(event: () => void) | Triggered when the animation playback is complete.| +| onStart(event: () => void) | Triggered when the animation starts to play.
Since API version 10, this API is supported in ArkTS widgets.| +| onPause(event: () => void) | Triggered when the animation playback is paused.
Since API version 10, this API is supported in ArkTS widgets.| +| onRepeat(event: () => void) | Triggered when the animation playback is repeated. | +| onCancel(event: () => void) | Triggered when the animation playback is canceled.
Since API version 10, this API is supported in ArkTS widgets.| +| onFinish(event: () => void) | Triggered when the animation playback is complete.
Since API version 10, this API is supported in ArkTS widgets.| ## Example diff --git a/en/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md b/en/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md index 6f899761e3609c2ee9a91fa2e9d8d2d04d105ee0..7f0b8291246271cef1d8b9e82394004c051cf491 100644 --- a/en/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md +++ b/en/application-dev/reference/arkui-ts/ts-canvasrenderingcontext2d.md @@ -10,15 +10,15 @@ Use **RenderingContext** to draw rectangles, text, images, and other objects on ## APIs -CanvasRenderingContext2D(setting: RenderingContextSetting) +CanvasRenderingContext2D(settings?: RenderingContextSettings) Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Description | -| ------- | ---------------------------------------- | ---- | ---------------------------------------- | -| setting | [RenderingContextSettings](#renderingcontextsettings) | Yes | See [RenderingContextSettings](#renderingcontextsettings).| +| Name | Type | Mandatory | Description | +| -------- | ---------------------------------------- | ---- | ---------------------------------------- | +| settings | [RenderingContextSettings](#renderingcontextsettings) | No | See [RenderingContextSettings](#renderingcontextsettings).| ### RenderingContextSettings @@ -38,25 +38,30 @@ Since API version 9, this API is supported in ArkTS widgets. ## Attributes -| Name | Type | Description | -| ----------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| [fillStyle](#fillstyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](#canvaspattern) | Style to fill an area.
- When the type is string, this attribute indicates the color of the fill area.
- When the type is number, this attribute indicates the color of the fill area.
- When the type is **CanvasGradient**, this attribute indicates a gradient object, which is created using the **[createLinearGradient](#createlineargradient)** API.
- When the type is **CanvasPattern**, this attribute indicates a pattern, which is created using the **[createPattern](#createpattern)** API.
Since API version 9, this API is supported in ArkTS widgets.| -| [lineWidth](#linewidth) | number | Line width. | -| [strokeStyle](#strokestyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](#canvaspattern) | Stroke style.
- When the type is string, this attribute indicates the stroke color.
- When the type is number, this attribute indicates the stroke color.
- When the type is **CanvasGradient**, this attribute indicates a gradient object, which is created using the **[createLinearGradient](#createlineargradient)** API.
- When the type is **CanvasPattern**, this attribute indicates a pattern, which is created using the **[createPattern](#createpattern)** API.
Since API version 9, this API is supported in ArkTS widgets.| -| [lineCap](#linecap) | CanvasLineCap | Style of the line endpoints. The options are as follows:
- **'butt'**: The endpoints of the line are squared off.
- **'round'**: The endpoints of the line are rounded.
- **'square'**: The endpoints of the line are squared off by adding a box with an equal width and half the height of the line's thickness.
Default value: **'butt'**
Since API version 9, this API is supported in ArkTS widgets.| -| [lineJoin](#linejoin) | CanvasLineJoin | Style of the shape used to join line segments. The options are as follows:
- **'round'**: The shape used to join line segments is a sector, whose radius at the rounded corner is equal to the line width.
- **'bevel'**: The shape used to join line segments is a triangle. The rectangular corner of each line is independent.
- **'miter'**: The shape used to join line segments has a mitered corner by extending the outside edges of the lines until they meet. You can view the effect of this attribute in **miterLimit**.
Default value: **'miter'**
Since API version 9, this API is supported in ArkTS widgets.| -| [miterLimit](#miterlimit) | number | Maximum miter length. The miter length is the distance between the inner corner and the outer corner where two lines meet.
Default value: **10**
Since API version 9, this API is supported in ArkTS widgets.| -| [font](#font) | string | Font style.
Syntax: ctx.font='font-size font-family'
- (Optional) **font-size**: font size and row height. The unit can only be pixels.
- (Optional) **font-family**: font family.
Syntax: ctx.font='font-style font-weight font-size font-family'
- (Optional) **font-style**: font style. Available values are **'normal'** and **'italic'**.
- (Optional) **font-weight**: font weight. Available values are as follows: **'normal'**, **'bold'**, **'bolder'**, **'lighter'**, **'100'**, **'200'**, **'300'**, **'400'**, **'500'**, **'600'**, **'700'**, **'800'**, **'900'**.
- (Optional) **font-size**: font size and row height. The unit can only be pixels.
- (Optional) **font-family**: font family. Available values are **'sans-serif'**, **'serif'**, and **'monospace'**.
Default value: **'normal normal 14px sans-serif'**
Since API version 9, this API is supported in ArkTS widgets.| -| [textAlign](#textalign) | CanvasTextAlign | Text alignment mode. Available values are as follows:
- **'left'**: The text is left-aligned.
- **'right'**: The text is right-aligned.
- **'center'**: The text is center-aligned.
- **'start'**: The text is aligned with the start bound.
- **'end'**: The text is aligned with the end bound.
In the **ltr** layout mode, the value **'start'** equals **'left'**. In the **rtl** layout mode, the value **'start'** equals **'right'**.
Default value: **'left'**
Since API version 9, this API is supported in ArkTS widgets.| -| [textBaseline](#textbaseline) | CanvasTextBaseline | Horizontal alignment mode of text. Available values are as follows:
- **'alphabetic'**: The text baseline is the normal alphabetic baseline.
- **'top'**: The text baseline is on the top of the text bounding box.
- **'hanging'**: The text baseline is a hanging baseline over the text.
- **'middle'**: The text baseline is in the middle of the text bounding box.
**'ideographic'**: The text baseline is the ideographic baseline. If a character exceeds the alphabetic baseline, the ideographic baseline is located at the bottom of the excess character.
- **'bottom'**: The text baseline is at the bottom of the text bounding box. Its difference from the ideographic baseline is that the ideographic baseline does not consider letters in the next line.
Default value: **'alphabetic'**
Since API version 9, this API is supported in ArkTS widgets.| -| [globalAlpha](#globalalpha) | number | Opacity.
**0.0**: completely transparent.
**1.0**: completely opaque.
Since API version 9, this API is supported in ArkTS widgets.| -| [lineDashOffset](#linedashoffset) | number | Offset of the dashed line. The precision is float.
Default value: **0.0**
Since API version 9, this API is supported in ArkTS widgets.| -| [globalCompositeOperation](#globalcompositeoperation) | string | Composition operation type. Available values are as follows: **'source-over'**, **'source-atop'**, **'source-in'**, **'source-out'**, **'destination-over'**, **'destination-atop'**, **'destination-in'**, **'destination-out'**, **'lighter'**, **'copy'**, and **'xor'**.
Default value: **'source-over'**
Since API version 9, this API is supported in ArkTS widgets.| -| [shadowBlur](#shadowblur) | number | Blur level during shadow drawing. A larger value indicates a more blurred effect. The precision is float.
Default value: **0.0**
Since API version 9, this API is supported in ArkTS widgets.| -| [shadowColor](#shadowcolor) | string | Shadow color.
Since API version 9, this API is supported in ArkTS widgets.| -| [shadowOffsetX](#shadowoffsetx) | number | X-axis shadow offset relative to the original object.
Since API version 9, this API is supported in ArkTS widgets.| -| [shadowOffsetY](#shadowoffsety) | number | Y-axis shadow offset relative to the original object.
Since API version 9, this API is supported in ArkTS widgets.| -| [imageSmoothingEnabled](#imagesmoothingenabled) | boolean | Whether to adjust the image smoothness during image drawing. The value **true** means to enable this feature, and **false** means the opposite.
Default value: **true**
Since API version 9, this API is supported in ArkTS widgets.| +| Name | Type | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| [fillStyle](#fillstyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | Style to fill an area.
- When the type is string, this attribute indicates the color of the fill area.
- When the type is number, this attribute indicates the color of the fill area.
- When the type is **CanvasGradient**, this attribute indicates a gradient object, which is created using the **[createLinearGradient](#createlineargradient)** API.
- When the type is **CanvasPattern**, this attribute indicates a pattern, which is created using the **[createPattern](#createpattern)** API.
Since API version 9, this API is supported in ArkTS widgets.| +| [lineWidth](#linewidth) | number | Line width. | +| [strokeStyle](#strokestyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | Stroke style.
- When the type is string, this attribute indicates the stroke color.
- When the type is number, this attribute indicates the stroke color.
- When the type is **CanvasGradient**, this attribute indicates a gradient object, which is created using the **[createLinearGradient](#createlineargradient)** API.
- When the type is **CanvasPattern**, this attribute indicates a pattern, which is created using the **[createPattern](#createpattern)** API.
Since API version 9, this API is supported in ArkTS widgets.| +| [lineCap](#linecap) | CanvasLineCap | Style of the line endpoints. The options are as follows:
- **'butt'**: The endpoints of the line are squared off.
- **'round'**: The endpoints of the line are rounded.
- **'square'**: The endpoints of the line are squared off by adding a box with an equal width and half the height of the line's thickness.
Default value: **'butt'**
Since API version 9, this API is supported in ArkTS widgets.| +| [lineJoin](#linejoin) | CanvasLineJoin | Style of the shape used to join line segments. The options are as follows:
- **'round'**: The shape used to join line segments is a sector, whose radius at the rounded corner is equal to the line width.
- **'bevel'**: The shape used to join line segments is a triangle. The rectangular corner of each line is independent.
- **'miter'**: The shape used to join line segments has a mitered corner by extending the outside edges of the lines until they meet. You can view the effect of this attribute in **miterLimit**.
Default value: **'miter'**
Since API version 9, this API is supported in ArkTS widgets.| +| [miterLimit](#miterlimit) | number | Maximum miter length. The miter length is the distance between the inner corner and the outer corner where two lines meet.
Default value: **10**
Since API version 9, this API is supported in ArkTS widgets.| +| [font](#font) | string | Font style.
Syntax: ctx.font='font-size font-family'
- (Optional) **font-size**: font size and row height. The unit can only be pixels.
- (Optional) **font-family**: font family.
Syntax: ctx.font='font-style font-weight font-size font-family'
- (Optional) **font-style**: font style. Available values are **'normal'** and **'italic'**.
- (Optional) **font-weight**: font weight. Available values are as follows: **'normal'**, **'bold'**, **'bolder'**, **'lighter'**, **'100'**, **'200'**, **'300'**, **'400'**, **'500'**, **'600'**, **'700'**, **'800'**, **'900'**.
- (Optional) **font-size**: font size and row height. The unit must be specified and can only be px or vp.
- (Optional) **font-family**: font family. Available values are **'sans-serif'**, **'serif'**, and **'monospace'**.
Default value: **'normal normal 14px sans-serif'**
Since API version 9, this API is supported in ArkTS widgets.| +| [textAlign](#textalign) | CanvasTextAlign | Text alignment mode. Available values are as follows:
- **'left'**: The text is left-aligned.
- **'right'**: The text is right-aligned.
- **'center'**: The text is center-aligned.
- **'start'**: The text is aligned with the start bound.
- **'end'**: The text is aligned with the end bound.
In the **ltr** layout mode, the value **'start'** equals **'left'**. In the **rtl** layout mode, the value **'start'** equals **'right'**.
Default value: **'left'**
Since API version 9, this API is supported in ArkTS widgets.| +| [textBaseline](#textbaseline) | CanvasTextBaseline | Horizontal alignment mode of text. Available values are as follows:
- **'alphabetic'**: The text baseline is the normal alphabetic baseline.
- **'top'**: The text baseline is on the top of the text bounding box.
- **'hanging'**: The text baseline is a hanging baseline over the text.
- **'middle'**: The text baseline is in the middle of the text bounding box.
**'ideographic'**: The text baseline is the ideographic baseline. If a character exceeds the alphabetic baseline, the ideographic baseline is located at the bottom of the excess character.
- **'bottom'**: The text baseline is at the bottom of the text bounding box. Its difference from the ideographic baseline is that the ideographic baseline does not consider letters in the next line.
Default value: **'alphabetic'**
Since API version 9, this API is supported in ArkTS widgets.| +| [globalAlpha](#globalalpha) | number | Opacity.
**0.0**: completely transparent.
**1.0**: completely opaque.
Since API version 9, this API is supported in ArkTS widgets.| +| [lineDashOffset](#linedashoffset) | number | Offset of the dashed line. The precision is float.
Default value: **0.0**
Since API version 9, this API is supported in ArkTS widgets.| +| [globalCompositeOperation](#globalcompositeoperation) | string | Composition operation type. Available values are as follows: **'source-over'**, **'source-atop'**, **'source-in'**, **'source-out'**, **'destination-over'**, **'destination-atop'**, **'destination-in'**, **'destination-out'**, **'lighter'**, **'copy'**, and **'xor'**.
Default value: **'source-over'**
Since API version 9, this API is supported in ArkTS widgets.| +| [shadowBlur](#shadowblur) | number | Blur level during shadow drawing. A larger value indicates a more blurred effect. The precision is float.
Default value: **0.0**
Since API version 9, this API is supported in ArkTS widgets.| +| [shadowColor](#shadowcolor) | string | Shadow color.
Since API version 9, this API is supported in ArkTS widgets.| +| [shadowOffsetX](#shadowoffsetx) | number | X-axis shadow offset relative to the original object.
Since API version 9, this API is supported in ArkTS widgets.| +| [shadowOffsetY](#shadowoffsety) | number | Y-axis shadow offset relative to the original object.
Since API version 9, this API is supported in ArkTS widgets.| +| [imageSmoothingEnabled](#imagesmoothingenabled) | boolean | Whether to adjust the image smoothness during image drawing. The value **true** means to enable this feature, and **false** means the opposite.
Default value: **true**
Since API version 9, this API is supported in ArkTS widgets.| +| [height](#height) | number | Component height.
Unit: vp
Since API version 9, this API is supported in ArkTS widgets.| +| [width](#width) | number | Component width.
Unit: vp
Since API version 9, this API is supported in ArkTS widgets.| +| [imageSmoothingQuality](#imagesmoothingquality) | ImageSmoothingQuality | Quality of image smoothing. This attribute works only when **imageSmoothingEnabled** is set to **true**. Available values are as follows:
- **'low'**: low quality.
- **'medium'**: medium quality.
- **'high'**: high quality.
Default value: **'low'**
Since API version 9, this API is supported in ArkTS widgets.| +| [direction](#direction) | CanvasDirection | Text direction used for drawing text. Available values are as follows:
- **'inherit'**: The text direction is inherited from the **\** component.
- **'ltr'**: The text direction is from left to right.
- **'rtl'**: The text direction is from right to left.
Default value: **'inherit'**
Since API version 9, this API is supported in ArkTS widgets.| +| [filter](#filter) | string | Filter effect. Available values are as follows:
- **'none'**: no filter effect.
- **'blur'**: applies the Gaussian blur for the image.
- **'brightness'**: applies a linear multiplication to the image to make it look brighter or darker.
- **'contrast'**: adjusts the image contrast.
- **'grayscale'**: converts the image to a grayscale image.
- **'hue-rotate'**: applies hue rotation to the image.
- **'invert'**: inverts the input image.
- **'opacity'**: sets the opacity of the image.
- **'saturate'**: sets the saturation of the image.
- **'sepia'**: converts the image to dark brown.
Default value: **'none'**
Since API version 9, this API is supported in ArkTS widgets.| > **NOTE** > @@ -652,6 +657,68 @@ struct ImageSmoothingEnabled { ![en-us_image_0000001211898472](figures/en-us_image_0000001211898472.png) +### height + +```ts +// xxx.ets +@Entry +@Component +struct HeightExample { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + let h = this.context.height + let w = this.context.width + this.context.fillRect(0, 0, 300, h/2) + }) + } + .width('100%') + .height('100%') + } +} +``` + +![en-us_image_canvas_height](figures/en-us_image_canvas_height.png) + + +### width + +```ts +// xxx.ets +@Entry +@Component +struct WidthExample { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width(300) + .height(300) + .backgroundColor('#ffff00') + .onReady(() => { + let h = this.context.height + let w = this.context.width + this.context.fillRect(0, 0, w/2, 300) + }) + } + .width('100%') + .height('100%') + } +} +``` + +![en-us_image_canvas_width](figures/en-us_image_canvas_width.png) + + ## Methods @@ -805,12 +872,12 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory| Default Value| Description | -| -------- | ------ | ---- | ------ | ----------------------------- | -| text | string | Yes | '' | Text to draw. | -| x | number | Yes | 0 | X-coordinate of the lower left corner of the text.| -| y | number | Yes | 0 | Y-coordinate of the lower left corner of the text.| -| maxWidth | number | No | - | Maximum width allowed for the text. | +| Name | Type | Mandatory | Default Value | Description | +| -------- | ------ | ---- | ---- | --------------- | +| text | string | Yes | '' | Text to draw. | +| x | number | Yes | 0 | X-coordinate of the lower left corner of the text.| +| y | number | Yes | 0 | Y-coordinate of the lower left corner of the text.| +| maxWidth | number | No | - | Maximum width allowed for the text. | **Example** @@ -852,12 +919,12 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory| Default Value| Description | -| -------- | ------ | ---- | ------ | ----------------------------- | -| text | string | Yes | '' | Text to draw. | -| x | number | Yes | 0 | X-coordinate of the lower left corner of the text.| -| y | number | Yes | 0 | Y-coordinate of the lower left corner of the text.| -| maxWidth | number | No | - | Maximum width of the text to be drawn. | +| Name | Type | Mandatory | Default Value | Description | +| -------- | ------ | ---- | ---- | --------------- | +| text | string | Yes | '' | Text to draw. | +| x | number | Yes | 0 | X-coordinate of the lower left corner of the text.| +| y | number | Yes | 0 | Y-coordinate of the lower left corner of the text.| +| maxWidth | number | No | - | Maximum width of the text to be drawn. | **Example** @@ -899,14 +966,14 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name| Type | Mandatory| Default Value| Description | -| ---- | ------ | ---- | ------ | -------------------- | -| text | string | Yes | '' | Text to be measured.| +| Name | Type | Mandatory | Default Value | Description | +| ---- | ------ | ---- | ---- | ---------- | +| text | string | Yes | '' | Text to be measured.| **Return value** -| Type | Description | -| ----------- | ------------------------------------------------------------ | +| Type | Description | +| ----------- | ---------------------------------------- | | TextMetrics | **TextMetrics** object.
Since API version 9, this API is supported in ArkTS widgets.| **TextMetrics** @@ -1197,16 +1264,16 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory| Description | -| ---------- | -------------------------------------------------- | ---- | ------------------------------------------------------------ | -| image | [ImageBitmap](ts-components-canvas-imagebitmap.md) | Yes | Source image. For details, see **ImageBitmap**. | -| repetition | string | Yes | Repetition mode. The value can be **'repeat'**, **'repeat-x'**, **'repeat-y'**, **'no-repeat'**, **'clamp'**, or **'mirror'**.
Default value: **''**| +| Name | Type | Mandatory | Description | +| ---------- | ---------------------------------------- | ---- | ---------------------------------------- | +| image | [ImageBitmap](ts-components-canvas-imagebitmap.md) | Yes | Source image. For details, see **ImageBitmap**. | +| repetition | string | Yes | Repetition mode. The value can be **'repeat'**, **'repeat-x'**, **'repeat-y'**, **'no-repeat'**, **'clamp'**, or **'mirror'**.
Default value: **''**| **Return value** -| Type | Description | -| ------------------------------- | ----------------------- | -| [CanvasPattern](#canvaspattern) | Created pattern for image filling based on a specified source image and repetition mode.| +| Type | Description | +| ---------------------------------------- | ----------------------- | +| [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | Created pattern for image filling based on a specified source image and repetition mode.| **Example** @@ -1449,16 +1516,16 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | -| ---------------- | ------- | ---- | ----- | ----------------- | -| x | number | Yes | 0 | X-coordinate of the ellipse center. | -| y | number | Yes | 0 | Y-coordinate of the ellipse center. | -| radiusX | number | Yes | 0 | Ellipse radius on the x-axis. | -| radiusY | number | Yes | 0 | Ellipse radius on the y-axis. | -| rotation | number | Yes | 0 | Rotation angle of the ellipse. The unit is radian. | -| startAngle | number | Yes | 0 | Angle of the start point for drawing the ellipse. The unit is radian.| -| endAngle | number | Yes | 0 | Angle of the end point for drawing the ellipse. The unit is radian.| -| counterclockwise | boolean | No | false | Whether to draw the ellipse in the counterclockwise direction.
**true**: Draw the arc counterclockwise.
**false**: Draw the arc clockwise. | +| Name | Type | Mandatory | Default Value | Description | +| ---------------- | ------- | ---- | ----- | ---------------------------------------- | +| x | number | Yes | 0 | X-coordinate of the ellipse center. | +| y | number | Yes | 0 | Y-coordinate of the ellipse center. | +| radiusX | number | Yes | 0 | Ellipse radius on the x-axis. | +| radiusY | number | Yes | 0 | Ellipse radius on the y-axis. | +| rotation | number | Yes | 0 | Rotation angle of the ellipse. The unit is radian. | +| startAngle | number | Yes | 0 | Angle of the start point for drawing the ellipse. The unit is radian. | +| endAngle | number | Yes | 0 | Angle of the end point for drawing the ellipse. The unit is radian. | +| counterclockwise | boolean | No | false | Whether to draw the ellipse in the counterclockwise direction.
**true**: Draw the arc counterclockwise.
**false**: Draw the arc clockwise.| **Example** @@ -1739,15 +1806,76 @@ Since API version 9, this API is supported in ArkTS widgets. filter(filter: string): void -Provides filter effects. This API is a void API. +Provides filter effects. Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | -| ------ | ------ | ---- | ---- | ------------ | -| filter | string | Yes | - | Filter functions.| +| Name | Type | Mandatory | Default Value | Description | +| ------ | ------ | ---- | ---- | ---------------------------------------- | +| filter | string | Yes | - | Filter functions. Available values are as follows:
- **'none'**: no filter effect.
- **'blur'**: applies the Gaussian blur for the image.
- **'brightness'**: applies a linear multiplication to the image to make it look brighter or darker.
- **'contrast'**: adjusts the image contrast.
- **'grayscale'**: converts the image to a grayscale image.
- **'hue-rotate'**: applies hue rotation to the image.
- **'invert'**: inverts the input image.
- **'opacity'**: sets the opacity of the image.
- **'saturate'**: sets the saturation of the image.
- **'sepia'**: converts the image to dark brown.
Default value: **'none'**| + +**Example** +```ts + // xxx.ets + @Entry + @Component + struct FilterDemo { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private img:ImageBitmap = new ImageBitmap("common/images/example.jpg"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.context + let img = this.img + + ctx.drawImage(img, 0, 0, 100, 100); + + ctx.filter = 'grayscale(50%)'; + ctx.drawImage(img, 100, 0, 100, 100); + + ctx.filter = 'sepia(60%)'; + ctx.drawImage(img, 200, 0, 100, 100); + + ctx.filter = 'saturate(30%)'; + ctx.drawImage(img, 0, 100, 100, 100); + + ctx.filter = 'hue-rotate(90degree)'; + ctx.drawImage(img, 100, 100, 100, 100); + + ctx.filter = 'invert(100%)'; + ctx.drawImage(img, 200, 100, 100, 100); + + ctx.filter = 'opacity(25%)'; + ctx.drawImage(img, 0, 200, 100, 100); + + ctx.filter = 'brightness(0.4)'; + ctx.drawImage(img, 100, 200, 100, 100); + + ctx.filter = 'contrast(200%)'; + ctx.drawImage(img, 200, 200, 100, 100); + + ctx.filter = 'blur(5px)'; + ctx.drawImage(img, 0, 300, 100, 100); + + let result = ctx.toDataURL() + console.info(result) + }) + } + .width('100%') + .height('100%') + } + } +``` + +![filterDemo](figures/filterDemo.jpeg) ### getTransform @@ -1758,6 +1886,12 @@ Obtains the current transformation matrix being applied to the context. This API Since API version 9, this API is supported in ArkTS widgets. +**Return value** + +| Type | Description | +| ---------------------------------------- | ----- | +| [Matrix2D](ts-components-canvas-matrix2d.md#Matrix2D) | **Matrix2D** object.| + ### resetTransform @@ -1772,10 +1906,42 @@ Since API version 9, this API is supported in ArkTS widgets. direction(direction: CanvasDirection): void -Sets the current text direction used to draw text. This API is a void API. +Sets the current text direction used to draw text. Since API version 9, this API is supported in ArkTS widgets. +**Example** +```ts + // xxx.ets + @Entry + @Component + struct DirectionDemo { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.context + ctx.font = '48px serif'; + ctx.textAlign = 'start' + ctx.fillText("Hi ltr!", 200, 50); + + ctx.direction = "rtl"; + ctx.fillText("Hi rtl!", 200, 100); + }) + } + .width('100%') + .height('100%') + } + } +``` + +![directionDemo](figures/directionDemo.jpeg) ### rotate @@ -1982,6 +2148,7 @@ Since API version 9, this API is supported in ArkTS widgets. ![en-us_image_0000001256858395](figures/en-us_image_0000001256858395.png) +### setTransform setTransform(transform?: Matrix2D): void @@ -1989,6 +2156,11 @@ Resets the current transformation to the identity matrix, and then creates a new Since API version 9, this API is supported in ArkTS widgets. +**Parameters** + +| Name | Type | Mandatory | Default Value | Description | +| --------- | ---------------------------------------- | ---- | ---- | ----- | +| transform | [Matrix2D](ts-components-canvas-matrix2d.md#Matrix2D) | No | null | Transformation matrix.| ### translate @@ -2207,9 +2379,9 @@ Since API version 9, this API is supported in ArkTS widgets. ### putImageData -putImageData(imageData: ImageData, dx: number, dy: number): void +putImageData(imageData: ImageData, dx: number | string, dy: number | string): void -putImageData(imageData: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void +putImageData(imageData: ImageData, dx: number | string, dy: number | string, dirtyX: number | string, dirtyY: number | string, dirtyWidth: number | string, dirtyHeight: number | string): void Puts an **[ImageData](ts-components-canvas-imagedata.md)** object onto a rectangular area on the canvas. @@ -2220,12 +2392,12 @@ Since API version 9, this API is supported in ArkTS widgets. | Name | Type | Mandatory | Default Value | Description | | ----------- | ---------------------------------------- | ---- | ------------ | ----------------------------- | | imagedata | [ImageData](ts-components-canvas-imagedata.md) | Yes | null | **ImageData** object with pixels to put onto the canvas. | -| dx | number | Yes | 0 | X-axis offset of the rectangular area on the canvas. | -| dy | number | Yes | 0 | Y-axis offset of the rectangular area on the canvas. | -| dirtyX | number | No | 0 | X-axis offset of the upper left corner of the rectangular area relative to that of the source image.| -| dirtyY | number | No | 0 | Y-axis offset of the upper left corner of the rectangular area relative to that of the source image.| -| dirtyWidth | number | No | Width of the **ImageData** object| Width of the rectangular area to crop the source image. | -| dirtyHeight | number | No | Height of the **ImageData** object| Height of the rectangular area to crop the source image. | +| dx | number \| string10+ | Yes | 0 | X-axis offset of the rectangular area on the canvas. | +| dy | number \| string10+ | Yes | 0 | Y-axis offset of the rectangular area on the canvas. | +| dirtyX | number \| string10+ | No | 0 | X-axis offset of the upper left corner of the rectangular area relative to that of the source image.| +| dirtyY | number \| string10+ | No | 0 | Y-axis offset of the upper left corner of the rectangular area relative to that of the source image.| +| dirtyWidth | number \| string10+ | No | Width of the **ImageData** object| Width of the rectangular area to crop the source image. | +| dirtyHeight | number \| string10+ | No | Height of the **ImageData** object| Height of the rectangular area to crop the source image. | **Example** @@ -2370,7 +2542,7 @@ Since API version 9, this API is supported in ArkTS widgets. imageSmoothingQuality(quality: imageSmoothingQuality) -Sets the quality of image smoothing. This API is a void API. +Sets the quality of image smoothing. Since API version 9, this API is supported in ArkTS widgets. @@ -2378,9 +2550,38 @@ Since API version 9, this API is supported in ArkTS widgets. | Name | Type | Description | | ------- | --------------------- | ---------------------------------------- | -| quality | imageSmoothingQuality | The options are as follows: '**low'**, **'medium'**, and **'high'**.| +| quality | imageSmoothingQuality | Quality of image smoothing.
- **'low'**: low quality.
- **'medium'**: medium quality.
- **'high'**: high quality.| +**Example** +```ts + // xxx.ets + @Entry + @Component + struct ImageSmoothingQualityDemo { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private img:ImageBitmap = new ImageBitmap("common/images/example.jpg"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let ctx = this.context + ctx.imageSmoothingEnabled = true + ctx.imageSmoothingQuality = 'high' + ctx.drawImage(this.img, 0, 0, 400, 200) + }) + } + .width('100%') + .height('100%') + } + } +``` +![ImageSmoothingQualityDemo](figures/ImageSmoothingQualityDemo.jpeg) ### transferFromImageBitmap @@ -2673,11 +2874,11 @@ Creates a conic gradient. **Parameters** -| Name | Type | Mandatory| Default Value| Description | -| ---------- | ------ | ---- | ------ | ------------------------------------------------------------ | -| startAngle | number | Yes | 0 | Angle at which the gradient starts, in radians. The angle measurement starts horizontally from the right side of the center and moves clockwise.| -| x | number | Yes | 0 | X-coordinate of the center of the conic gradient, in vp. | -| y | number | Yes | 0 | Y-coordinate of the center of the conic gradient, in vp. | +| Name | Type | Mandatory | Default Value | Description | +| ---------- | ------ | ---- | ---- | ----------------------------------- | +| startAngle | number | Yes | 0 | Angle at which the gradient starts, in radians. The angle measurement starts horizontally from the right side of the center and moves clockwise.| +| x | number | Yes | 0 | X-coordinate of the center of the conic gradient, in vp. | +| y | number | Yes | 0 | X-coordinate of the center of the conic gradient, in vp. | **Example** @@ -2711,9 +2912,3 @@ struct CanvasExample { ``` ![en-us_image_0000001239032419](figures/en-us_image_0000001239032420.png) - -## CanvasPattern - -Defines an object created using the **[createPattern](#createpattern)** API. - -Since API version 9, this API is supported in ArkTS widgets. diff --git a/en/application-dev/reference/arkui-ts/ts-components-canvas-canvaspattern.md b/en/application-dev/reference/arkui-ts/ts-components-canvas-canvaspattern.md new file mode 100644 index 0000000000000000000000000000000000000000..1f8db24177ef3ea58305d278751cb588f3a90cc0 --- /dev/null +++ b/en/application-dev/reference/arkui-ts/ts-components-canvas-canvaspattern.md @@ -0,0 +1,72 @@ +# CanvasPattern + +**CanvasPattern** represents an object, created by the [createPattern](ts-canvasrenderingcontext2d.md#createpattern) API, describing an image filling pattern based on the image and repetition mode. + +> **NOTE** +> +> The APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version. + +## Methods + +### setTransform + +setTransform(transform?: Matrix2D): void + +Uses a **Matrix2D** object as a parameter to perform matrix transformation on the current **CanvasPattern** object. + +Since API version 9, this API is supported in ArkTS widgets. + +**Parameters** + +| Name | Type | Mandatory| Default Value| Description | +| --------- | ----------------------------------------------------- | ---- | ------ | ---------- | +| transform | [Matrix2D](ts-components-canvas-matrix2d.md#Matrix2D) | No | null | Transformation matrix.| + +**Example** + +```ts +// xxx.ets +@Entry +@Component +struct CanvasPatternPage { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private matrix: Matrix2D = new Matrix2D() + private img: ImageBitmap = new ImageBitmap("common/pattern.jpg") + private pattern : CanvasPattern + + build() { + Column() { + Button("Click to set transform") + .onClick(() => { + this.matrix.scaleY = 1 + this.matrix.scaleX = 1 + this.matrix.translateX = 50 + this.matrix.translateY = 200 + this.pattern.setTransform(this.matrix) + this.context.fillRect(0, 0, 480, 720) + }) + .width("45%") + .margin("5px") + Canvas(this.context) + .width('100%') + .height('80%') + .backgroundColor('#FFFFFF') + .onReady(() => { + this.pattern = this.context.createPattern(this.img, 'no-repeat') + this.context.fillStyle = this.pattern + this.matrix.scaleY = 0.5 + this.matrix.scaleX = 0.5 + this.matrix.translateX = 50 + this.matrix.translateY = 50 + this.pattern.setTransform(this.matrix) + this.context.fillRect(0, 0, 480, 720) + }) + } + .width('100%') + .height('100%') + } +} +``` + +![CanvasPattern](./figures/canvas_pattern.gif) diff --git a/en/application-dev/reference/arkui-ts/ts-components-canvas-imagebitmap.md b/en/application-dev/reference/arkui-ts/ts-components-canvas-imagebitmap.md index d6bc06bd61f2de584dc111bdc51a46ea44a94778..cdaa515a7bafb897390e0ec555b07e9937d89d18 100644 --- a/en/application-dev/reference/arkui-ts/ts-components-canvas-imagebitmap.md +++ b/en/application-dev/reference/arkui-ts/ts-components-canvas-imagebitmap.md @@ -65,6 +65,6 @@ Since API version 9, this API is supported in ArkTS widgets. close() -Releases all graphics resources associated with this **ImageBitmap** object. This API is a void API. +Releases all graphics resources associated with this **ImageBitmap** object and sets its width and height to **0**. Since API version 9, this API is supported in ArkTS widgets. diff --git a/en/application-dev/reference/arkui-ts/ts-components-canvas-lottie.md b/en/application-dev/reference/arkui-ts/ts-components-canvas-lottie.md deleted file mode 100644 index 58cefdf784cd120789a842d5ec794258dd89ed2a..0000000000000000000000000000000000000000 --- a/en/application-dev/reference/arkui-ts/ts-components-canvas-lottie.md +++ /dev/null @@ -1,611 +0,0 @@ -# Lottie - -**Lottie** allows you to implement animation-specific operations. - -> **NOTE** -> -> The APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version. - - - -## Modules to Import - -``` -import lottie from '@ohos/lottieETS' -``` - -> **NOTE** -> -> To use **Lottie**, download it first by running the **ohpm install @ohos/lottieETS** command in the Terminal window. - - -## lottie.loadAnimation - -loadAnimation( - -path: string, container: object, render: string, loop: boolean, autoplay: boolean, name: string ): AnimationItem - -Loads an animation. Before calling this API, declare the **Animator('__lottie_ets')** object and make sure the canvas layout is complete. This API can be used together with the lifecycle callback **onReady()** of the **Canvas** component. - -**Parameters** - -| Name | Type | Mandatory | Description | -| -------------- | --------------------------- | ---- | ---------------------------------------- | -| path | string | Yes | Path of the animation resource file in the HAP file. The resource file must be in JSON format. Example: **path: "common/lottie/data.json"**| -| container | object | Yes | Canvas drawing context. A **CanvasRenderingContext2D** object must be declared in advance.| -| render | string | Yes | Rendering type. The value can only be **"canvas"**. | -| loop | boolean \| number | No | If the value is of the Boolean type, this parameter indicates whether to repeat the animation cyclically after the animation ends. If the value is of the number type and is greater than or equal to 1, this parameter indicates the number of times the animation plays.
Default value: **true**| -| autoplay | boolean | No | Whether to automatically play the animation
Default value: **true** | -| name | string | No | Custom animation name. In later versions, the name can be used to reference and control the animation.
Default value: **""** | -| initialSegment | [number, number] | No | Start frame and end frame of the animation, respectively. | - - -## lottie.destroy - -destroy(name: string): void - -Destroys the animation. This API must be called when a page exits. This API can be used together with a lifecycle callback of the **Canvas** component, for example, **onDisappear()** and **onPageHide()**. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ---- | ------ | ---- | ---------------------------------------- | -| name | string | Yes | Name of the animation to destroy, which is the same as the **name** in the **loadAnimation** API. By default, all animations are destroyed.| - -**Example** - ```ts - // xxx.ets - import lottie from '@ohos/lottieETS' - - @Entry - @Component - struct Index { - private controller: CanvasRenderingContext2D = new CanvasRenderingContext2D() - private animateName: string = "animate" - private animatePath: string = "common/lottie/data.json" - private animateItem: any = null - - onPageHide(): void { - console.log('onPageHide') - lottie.destroy() - } - - build() { - Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { - Canvas(this.controller) - .width('30%') - .height('20%') - .backgroundColor('#0D9FFB') - .onReady(() => { - console.log('canvas onAppear'); - this.animateItem = lottie.loadAnimation({ - container: this.controller, - renderer: 'canvas', - loop: true, - autoplay: true, - name: this.animateName, - path: this.animatePath, - }) - }) - - Animator('__lottie_ets') // declare Animator('__lottie_ets') when use lottie - Button('load animation') - .onClick(() => { - if (this.animateItem != null) { - this.animateItem.destroy() - this.animateItem = null - } - this.animateItem = lottie.loadAnimation({ - container: this.controller, - renderer: 'canvas', - loop: true, - autoplay: true, - name: this.animateName, - path: this.animatePath, - initialSegment: [10, 50], - }) - }) - - Button('destroy animation') - .onClick(() => { - lottie.destroy(this.animateName) - this.animateItem = null - }) - } - .width('100%') - .height('100%') - } - } - ``` - - ![en-us_image_0000001194352468](figures/en-us_image_0000001194352468.gif) - - -## lottie.play - -play(name: string): void - -Plays a specified animation. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ---- | ------ | ---- | ---------------------------------------- | -| name | string | Yes | Name of the animation to play, which is the same as the **name** in the **loadAnimation** API. By default, all animations are played.| - -**Example** - - ```ts - lottie.play(this.animateName) - ``` - - -## lottie.pause - -pause(name: string): void - -Pauses a specified animation. The next time **lottie.play()** is called, the animation starts from the current frame. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ---- | ------ | ---- | ---------------------------------------- | -| name | string | Yes | Name of the animation to pause, which is the same as the **name** in the **loadAnimation** API. By default, all animations are paused.| - -**Example** - - ```ts - lottie.pause(this.animateName) - ``` - - -## lottie.togglePause - -togglePause(name: string): void - -Pauses or plays a specified animation. This API is equivalent to the switching between **lottie.play()** and **lottie.pause()**. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ---- | ------ | ---- | ---------------------------------------- | -| name | string | Yes | Name of the target animation, which is the same as the **name** in the **loadAnimation** API. By default, all animations are paused or played.| - -**Example** - - ```ts - lottie.togglePause(this.animateName) - ``` - - -## lottie.stop - -stop(name: string): void - -Stops the specified animation. The next time **lottie.play()** is called, the animation starts from the first frame. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ---- | ------ | ---- | ---------------------------------------- | -| name | string | Yes | Name of the target animation, which is the same as the **name** in the **loadAnimation** API. By default, all animations are stopped.| - -**Example** - - ```ts - lottie.stop(this.animateName) - ``` - - -## lottie.setSpeed - -setSpeed(speed: number, name: string): void - -Sets the playback speed of the specified animation. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ----- | ------ | ---- | ---------------------------------------- | -| speed | number | Yes | Playback speed. The value is a floating-point number. If the value is greater than 0, the animation plays in forward direction. If the value is less than 0, the animation plays in reversed direction. If the value is **0**, the animation is paused. If the value is **1.0** or **-1.0**, the animation plays at the normal speed.| -| name | string | Yes | Name of the target animation, which is the same as the **name** in the **loadAnimation** API. By default, all animations are set.| - -**Example** - - ```ts - lottie.setSpeed(5, this.animateName) - ``` - - -## lottie.setDirection - -setDirection(direction: AnimationDirection, name: string): void - -Sets the direction in which the specified animation plays. - -**Parameters** - -| Name | Type | Mandatory | Description | -| --------- | ------------------ | ---- | ---------------------------------------- | -| direction | AnimationDirection | Yes | Direction in which the animation plays. **1**: forwards; **-1**: backwards. When set to play backwards, the animation plays from the current playback progress to the first frame. When this setting is combined with **loop** being set to **true**, the animation plays backwards continuously. When the value of **speed** is less than 0, the animation also plays backwards.
AnimationDirection: 1 \| -1 | -| name | string | Yes | Name of the target animation, which is the same as the **name** in the **loadAnimation** API. By default, all animations are set.| - -**Example** - - ```ts - lottie.setDirection(-1, this.animateName) - ``` - - -## AnimationItem - -Defines an **AnimationItem** object, which is returned by the **loadAnimation** API and has attributes and APIs. The attributes are described as follows: - -| Name | Type | Description | -| ----------------- | ---------------------------------------- | ---------------------------------------- | -| name | string | Animation name. | -| isLoaded | boolean | Whether the animation is loaded. | -| currentFrame | number | Frame that is being played. The default precision is a floating-point number greater than or equal to 0.0. After **setSubframe(false)** is called, the value is a positive integer without decimal points.| -| currentRawFrame | number | Number of frames that are being played. The precision is a floating point number greater than or equal to 0.0. | -| firstFrame | number | First frame of the animation segment that is being played. | -| totalFrames | number | Total number of frames in the animation segment that is being played. | -| frameRate | number | Frame rate (frame/s). | -| frameMult | number | Frame rate (frame/ms). | -| playSpeed | number | Playback speed. The value is a floating-point number. If the value is greater than 0, the animation plays forward. If the value is less than 0, the animation plays backward. If the value is **0**, the animation is paused. If the value is **1.0** or **-1.0**, the animation plays at the normal speed.| -| playDirection | number | Playback direction.
**1**: forward.
**-1**: backward. | -| playCount | number | Number of times the animation plays. | -| isPaused | boolean | Whether the current animation is paused. The value **true** means that the animation is paused. | -| autoplay | boolean | Whether to automatically play the animation upon completion of the loading. The value **false** means that the **play()** API needs to be called to start playing.| -| loop | boolean \| number | If the value is of the Boolean type, this parameter indicates whether to repeat the animation cyclically after the animation ends. If the value is of the number type and is greater than or equal to 1, this parameter indicates the number of times the animation plays. | -| renderer | any | Animation rendering object, which depends on the rendering type. | -| animationID | string | Animation ID. | -| timeCompleted | number | Number of frames that are played for an animation sequence. The value is affected by the setting of **AnimationSegment** and is the same as the value of **totalFrames**.| -| segmentPos | number | ID of the current animation segment. The value is a positive integer greater than or equal to 0. | -| isSubframeEnabled | boolean | Whether the precision of **currentFrame** is a floating point number. | -| segments | AnimationSegment \| AnimationSegment[] | Current segment of the animation. | - - -## AnimationItem.play - -play(name?: string): void - -Plays an animation. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ---- | ------ | ---- | --------------- | -| name | string | No | Name of the target animation.
Default value: **""** | - -**Example** - - ```ts - this.animateItem.play() - ``` - - -## AnimationItem.destroy - -destroy(name?: string): void - -Destroys an animation. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ---- | ------ | ---- | --------------- | -| name | string | No | Name of the target animation. By default, the value is null.| - -**Example** - - ```ts - this.animateItem.destroy() - ``` - - -## AnimationItem.pause - -pause(name?: string): void - -Pauses an animation. When the **play** API is called next time, the animation is played from the current frame. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ---- | ------ | ---- | --------------- | -| name | string | No | Name of the target animation. By default, the value is null.| - -**Example** - - ```ts - this.animateItem.pause() - ``` - - -## AnimationItem.togglePause - -togglePause(name?: string): void - -Pauses or plays an animation. This API is equivalent to the switching between **play** and **pause**. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ---- | ------ | ---- | --------------- | -| name | string | No | Name of the target animation. By default, the value is null.| - -**Example** - - ```ts - this.animateItem.togglePause() - ``` - - -## AnimationItem.stop - -stop(name?: string): void - -Stops an animation. When the **play** API is called next time, the animation is played from the first frame. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ---- | ------ | ---- | --------------- | -| name | string | No | Name of the target animation. By default, the value is null.| - -**Example** - - ```ts - this.animateItem.stop() - ``` - - -## AnimationItem.setSpeed - -setSpeed(speed: number): void - -Sets the playback speed of an animation. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ----- | ------ | ---- | ---------------------------------------- | -| speed | number | Yes | Playback speed. The value is a floating-point number. If the value is greater than 0, the animation plays forward. If the value is less than 0, the animation plays backward. If the value is 0, the animation is paused. If the value is **1.0** or **-1.0**, the animation plays at the normal speed.| - -**Example** - - ```ts - this.animateItem.setSpeed(5); - ``` - - -## AnimationItem.setDirection - -setDirection(direction: AnimationDirection): void - -Sets the playback direction of an animation. - -**Parameters** - -| Name | Type | Mandatory | Description | -| --------- | ------------------ | ---- | ---------------------------------------- | -| direction | AnimationDirection | Yes | Direction in which the animation plays. **1**: forwards; **-1**: backwards. When set to play backwards, the animation plays from the current playback progress to the first frame. When this setting is combined with **loop** being set to **true**, the animation plays backwards continuously. When the value of **speed** is less than 0, the animation also plays backwards.
AnimationDirection: 1 \| -1.| - -**Example** - - ```ts - this.animateItem.setDirection(-1) - ``` - - -## AnimationItem.goToAndStop - -goToAndStop(value: number, isFrame?: boolean): void - -Sets the animation to stop at the specified frame or time. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ------- | ------- | ---- | ---------------------------------------- | -| value | number | Yes | Frame ID (greater than or equal to 0) or time progress (ms) at which the animation will stop. | -| isFrame | boolean | No | Whether to set the animation to stop at the specified frame. The value **true** means to set the animation to stop at the specified frame, and **false** means to set the animation to stop at the specified time progress.
Default value: **false**| -| name | string | No | Name of the target animation. By default, the value is null. | - -**Example** - - ```ts - // Set the animation to stop at the specified frame. - this.animateItem.goToAndStop(25, true) - // Set the animation to stop at the specified time progress. - this.animateItem.goToAndStop(300, false, this.animateName) - ``` - - -## AnimationItem.goToAndPlay - -goToAndPlay(value: number, isFrame: boolean, name?: string): void - -Sets the animation to start from the specified frame or time progress. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ------- | ------- | ---- | ---------------------------------------- | -| value | number | Yes | Frame ID (greater than or equal to 0) or time progress (ms) at which the animation will start. | -| isFrame | boolean | Yes | Whether to set the animation to start from the specified frame. The value **true** means to set the animation to start from the specified frame, and **false** means to set the animation to start from the specified time progress.
Default value: **false**| -| name | string | No | Name of the target animation.
Default value: **""** | - -**Example** - - ```ts - // Set the animation to stop at the specified frame. - this.animateItem.goToAndPlay(25, true) - // Set the animation to stop at the specified time progress. - this.animateItem.goToAndPlay(300, false, this.animateName) - ``` - - -## AnimationItem.playSegments - -playSegments(segments: AnimationSegment | AnimationSegment[], forceFlag: boolean): void - -Sets the animation to play only the specified segment. - -**Parameters** - -| Name | Type | Mandatory | Description | -| --------- | ---------------------------------------- | ---- | ---------------------------------------- | -| segments | AnimationSegment = [number, number] \| AnimationSegment[] | Yes | Segment or segment list.
If all segments in the segment list are played, only the last segment is played in the next cycle.| -| forceFlag | boolean | Yes | Whether the settings take effect immediately. The value **true** means the settings take effect immediately, and **false** means the settings take effect until the current cycle of playback is completed. | - -**Example** - - ```ts - // Set the animation to play the specified segment. - this.animateItem.playSegments([10, 20], false) - // Set the animation to play the specified segment list. - this.animateItem.playSegments([[0, 5], [20, 30]], true) - ``` - - -## AnimationItem.resetSegments - -resetSegments(forceFlag: boolean): void - -Resets the settings configured by the **playSegments** API to play all the frames. - -**Parameters** - -| Name | Type | Mandatory | Description | -| --------- | ------- | ---- | ------------------------------ | -| forceFlag | boolean | Yes | Whether the settings take effect immediately. The value **true** means the settings take effect immediately, and **false** means the settings take effect until the current cycle of playback is completed.| - -**Example** - - ```ts - this.animateItem.resetSegments(true) - ``` - - -## AnimationItem.resize - -resize(): void - -Resizes the animation layout. - -**Example** - - ```ts - this.animateItem.resize() - ``` - - -## AnimationItem.setSubframe - -setSubframe(useSubFrame: boolean): void - -Sets the precision of the **currentFrame** attribute to display floating-point numbers. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ------------ | ------- | ---- | ---------------------------------------- | -| useSubFrames | boolean | Yes | Whether the **currentFrame** attribute displays floating-point numbers. By default, the attribute displays floating-point numbers.
**true**: The **currentFrame** attribute displays floating-point numbers.
**false**: The **currentFrame** attribute displays an integer and does not display floating-point numbers.| - -**Example** - - ```ts - this.animateItem.setSubframe(false) - ``` - - -## AnimationItem.getDuration - -getDuration(inFrames?: boolean): void - -Obtains the duration (irrelevant to the playback speed) or number of frames for playing an animation sequence. The settings are related to the input parameter **initialSegment** of the **Lottie.loadAnimation** API. - -**Parameters** - -| Name | Type | Mandatory | Description | -| -------- | ------- | ---- | ---------------------------------------- | -| inFrames | boolean | No | Whether to obtain the duration or number of frames.
**true**: number of frames.
**false**: duration, in ms.
Default value: **false**| - -**Example** - - ```ts - this.animateItem.getDuration(true) - ``` - - -## AnimationItem.addEventListener - -addEventListener<T = any>(name: AnimationEventName, callback: AnimationEventCallback<T>): () => void - -Adds an event listener. After the event is complete, the specified callback is triggered. This API returns the function object that can delete the event listener. - -**Parameters** - -| Name | Type | Mandatory | Description | -| -------- | ------------------------------- | ---- | ---------------------------------------- | -| name | AnimationEventName | Yes | Animation event type. The available options are as follows:
'enterFrame', 'loopComplete', 'complete', 'segmentStart', 'destroy', 'config_ready', 'data_ready', 'DOMLoaded', 'error', 'data_failed', 'loaded_images'| -| callback | AnimationEventCallback<T> | Yes | Custom callback. | - -**Example** - - ```ts - private callbackItem: any = function() { - console.log("grunt loopComplete") - } - let delFunction = this.animateItem.addEventListener('loopComplete', this.animateName) - - // Delete the event listener. - delFunction() - ``` - - -## AnimationItem.removeEventListener - -removeEventListener<T = any>(name: AnimationEventName, callback?: AnimationEventCallback<T>): void - -Removes an event listener. - -**Parameters** - -| Name | Type | Mandatory | Description | -| -------- | ------------------------------- | ---- | ---------------------------------------- | -| name | AnimationEventName | Yes | Animation event type. The available options are as follows:
'enterFrame', 'loopComplete', 'complete', 'segmentStart', 'destroy', 'config_ready', 'data_ready', 'DOMLoaded', 'error', 'data_failed', 'loaded_images'| -| callback | AnimationEventCallback<T> | No | Custom callback. By default, the value is null, meaning that all callbacks of the event will be removed. | - -**Example** - - ```ts - this.animateItem.removeEventListener('loopComplete', this.animateName) - ``` - - -## AnimationItem.triggerEvent - -triggerEvent<T = any>(name: AnimationEventName, args: T): void - -Directly triggers all configured callbacks of a specified event. - -**Parameters** - -| Name | Type | Mandatory | Description | -| ---- | ------------------ | ---- | --------- | -| name | AnimationEventName | Yes | Animation event type. | -| args | any | Yes | Custom callback parameters.| - -**Example** - - ```ts - private triggerCallBack: any = function(item) { - console.log("trigger loopComplete, name:" + item.name) - } - - this.animateItem.addEventListener('loopComplete', this.triggerCallBack) - this.animateItem.triggerEvent('loopComplete', this.animateItem) - this.animateItem.removeEventListener('loopComplete', this.triggerCallBack) - ``` diff --git a/en/application-dev/reference/arkui-ts/ts-components-canvas-matrix2d.md b/en/application-dev/reference/arkui-ts/ts-components-canvas-matrix2d.md new file mode 100644 index 0000000000000000000000000000000000000000..4099142bfb7494bdc335036322eb67f7bb3127a7 --- /dev/null +++ b/en/application-dev/reference/arkui-ts/ts-components-canvas-matrix2d.md @@ -0,0 +1,601 @@ +# Matrix2D + +**Matrix2D** allows you to perform matrix transformation, such as scaling, rotating, and translating. + +> **NOTE** +> +> The APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version. + +## APIs + +Matrix2D() + +Since API version 9, this API is supported in ArkTS widgets. + +## Attributes + +| Name | Type | Description | +| ------------------------- | ------ | ------------------------------------------------------------ | +| [scaleX](#scalex) | number | Horizontal scale factor. Since API version 9, this API is supported in ArkTS widgets.| +| [scaleY](#scaley) | number | Vertical scale factor. Since API version 9, this API is supported in ArkTS widgets.| +| [rotateX](#rotatex) | number | Horizontal tilt coefficient. Since API version 9, this API is supported in ArkTS widgets.| +| [rotateY](#rotatey) | number | Vertical tilt coefficient. Since API version 9, this API is supported in ArkTS widgets.| +| [translateX](#translatex) | number | Horizontal translation distance, in vp. Since API version 9, this API is supported in ArkTS widgets.| +| [translateY](#translatey) | number | Vertical translation distance, in vp. Since API version 9, this API is supported in ArkTS widgets.| + +> **NOTE** +> +> You can use the [px2vp](ts-pixel-units.md) API to convert the unit. + +### scaleX + +```ts +// xxx.ets +@Entry +@Component +struct Matrix2DScaleX { + @State message: string = 'Matrix2D ScaleX' + + printMatrix(title, matrix) { + console.log(title) + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + + ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") + } + build() { + Row() { + Column() { + Text(this.message) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Button("Set scaleX") + .onClick(() => { + var matrix : Matrix2D = new Matrix2D() + matrix.scaleX = 1 + this.printMatrix(this.message, matrix) + }) + } + .width('100%') + } + .height('100%') + } +} +``` + +### scaleY + +```ts +// xxx.ets +@Entry +@Component +struct Matrix2DScaleY { + @State message: string = 'Matrix2D ScaleY' + + printMatrix(title, matrix) { + console.log(title) + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + + ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") + } + build() { + Row() { + Column() { + Text(this.message) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Button("Set scaleY") + .onClick(() => { + var matrix : Matrix2D = new Matrix2D() + matrix.scaleY = 1 + this.printMatrix(this.message, matrix) + }) + } + .width('100%') + } + .height('100%') + } +} +``` + +### rotateX + +```ts +// xxx.ets +@Entry +@Component +struct Matrix2DRotateX { + @State message: string = 'Matrix2D RotateX' + + printMatrix(title, matrix) { + console.log(title) + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + + ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") + } + build() { + Row() { + Column() { + Text(this.message) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Button("Set rotateX") + .onClick(() => { + var matrix : Matrix2D = new Matrix2D() + matrix.rotateX = Math.sin(45 / Math.PI) + this.printMatrix(this.message, matrix) + }) + } + .width('100%') + } + .height('100%') + } +} +``` + +### rotateY + +```ts +// xxx.ets +@Entry +@Component +struct Matrix2DRotateY { + @State message: string = 'Matrix2D RotateY' + + printMatrix(title, matrix) { + console.log(title) + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + + ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") + } + build() { + Row() { + Column() { + Text(this.message) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Button("Set rotateY") + .onClick(() => { + var matrix : Matrix2D = new Matrix2D() + matrix.rotateY = Math.cos(45 / Math.PI) + this.printMatrix(this.message, matrix) + }) + } + .width('100%') + } + .height('100%') + } +} +``` + +### translateX + +```ts +// xxx.ets +@Entry +@Component +struct Matrix2DTranslateX { + @State message: string = 'Matrix2D TranslateX' + + printMatrix(title, matrix) { + console.log(title) + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + + ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") + } + build() { + Row() { + Column() { + Text(this.message) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Button("Set translateX") + .onClick(() => { + var matrix : Matrix2D = new Matrix2D() + matrix.translateX = 10 + this.printMatrix(this.message, matrix) + }) + } + .width('100%') + } + .height('100%') + } +} +``` + +### translateY + +```ts +// xxx.ets +@Entry +@Component +struct Matrix2DTranslateY { + @State message: string = 'Matrix2D TranslateY' + + printMatrix(title, matrix) { + console.log(title) + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + + ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") + } + build() { + Row() { + Column() { + Text(this.message) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Button("Set translateY") + .onClick(() => { + var matrix : Matrix2D = new Matrix2D() + matrix.translateY = 10 + this.printMatrix(this.message, matrix) + }) + } + .width('100%') + } + .height('100%') + } +} +``` + +## Methods + +### identity + +identity(): Matrix2D + +Creates an identity matrix. + +Since API version 9, this API is supported in ArkTS widgets. + +**Return value** + +| Type | Description | +| --------------------- | ---------- | +| [Matrix2D](#matrix2d) | Identity matrix.| + +**Example** + +```ts +// xxx.ets +@Entry +@Component +struct Matrix2DIdentity { + @State message: string = 'Matrix2D Identity' + + printMatrix(title, matrix) { + console.log(title) + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + + ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") + } + build() { + Row() { + Column() { + Text(this.message) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Button("matrix identity") + .onClick(() => { + var matrix : Matrix2D = new Matrix2D() + matrix = matrix.identity() + this.printMatrix(this.message, matrix) + }) + } + .width('100%') + } + .height('100%') + } +} +``` + +### invert + +invert(): Matrix2D + +Obtains an inverse of this matrix. + +Since API version 9, this API is supported in ArkTS widgets. + +**Return value** + +| Type | Description | +| --------------------- | ------------ | +| [Matrix2D](#matrix2d) | Inverse of the current matrix.| + +**Example** + +```ts +// xxx.ets +@Entry +@Component +struct Matrix2DInvert { + @State message: string = 'Matrix2D Invert' + + printMatrix(title, matrix) { + console.log(title) + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + + ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") + } + build() { + Row() { + Column() { + Text(this.message) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Button("matrix invert") + .onClick(() => { + var matrix : Matrix2D = new Matrix2D() + matrix.scaleX = 2 + matrix.scaleY = 1 + matrix.rotateX = 0 + matrix.rotateY = 0 + matrix.translateX = 10 + matrix.translateY = 20 + matrix.invert() + this.printMatrix(this.message, matrix) + }) + } + .width('100%') + } + .height('100%') + } +} +``` + +### multiply(deprecated) + +multiply(other?: Matrix2D): Matrix2D + +Multiplies this matrix by the target matrix. + +Since API version 9, this API is supported in ArkTS widgets. This API is a null API. + +This API is deprecated since API version 10. + +**Parameters** + +| Parameter | Type | Mandatory| Default Value| Description | +| ----- | -------- | ---- | ------ | ---------- | +| other | Matrix2D | No | null | Target matrix.| + +**Return value** + +| Type | Description | +| --------------------- | -------------- | +| [Matrix2D](#matrix2d) | Matrix of the multiplication result.| + +**Example** + +```ts +// xxx.ets +@Entry +@Component +struct Matrix2DMultiply { + @State message: string = 'Matrix2D Multiply' + + printMatrix(title, matrix) { + console.log(title) + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + + ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") + } + build() { + Row() { + Column() { + Text(this.message) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Button("matrix multiply") + .onClick(() => { + var matrix : Matrix2D = new Matrix2D() + matrix.scaleX = 1 + matrix.scaleY = 1 + matrix.rotateX = 0 + matrix.rotateY = 0 + matrix.translateX = 0 + matrix.translateY = 0 + var other: Matrix2D = new Matrix2D() + other.scaleX = 2 + other.scaleY = 2 + other.rotateX = 0 + other.rotateY = 0 + other.translateX = 10 + other.translateY = 10 + other.multiply(other) + this.printMatrix(this.message, matrix) + }) + } + .width('100%') + } + .height('100%') + } +} +``` + +### rotate10+ + +rotate(degree: number, rx?: number, ry?: number): Matrix2D + +Performs a right multiplication rotation operation on this matrix, with the specified rotation point as the transform origin. + +Since API version 10, this API is supported in ArkTS widgets. + +**Parameters** + +| Parameter | Type | Mandatory| Default Value| Description | +| ------ | ------ | ---- | ------ | ------------------------------------------------------------ | +| degree | number | Yes | 0 | Rotation angle, in radians. A positive angle denotes a clockwise rotation. You can use **Math.PI& / 180** to convert the angle to a radian value.| +| rx | number | No | 0 | Horizontal coordinate (in vp) of the rotation point. | +| ry | number | No | 0 | Vertical coordinate (in vp) of the rotation point. | + +**Return value** + +| Type | Description | +| --------------------- | -------------------- | +| [Matrix2D](#matrix2d) | Matrix of the rotation result.| + +**Example** + +```ts +// xxx.ets +@Entry +@Component +struct Matrix2DRotate { + @State message: string = 'Matrix2D Rotate' + + printMatrix(title, matrix) { + console.log(title) + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + + ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") + } + build() { + Row() { + Column() { + Text(this.message) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Button("matrix rotate") + .onClick(() => { + var matrix : Matrix2D = new Matrix2D() + matrix.scaleX = 1 + matrix.scaleY = 1 + matrix.rotateX = 0 + matrix.rotateY = 0 + matrix.translateX = 0 + matrix.translateY = 0 + matrix.rotate(90 / Math.PI, 10, 10) + this.printMatrix(this.message, matrix) + }) + } + .width('100%') + } + .height('100%') + } +} +``` + +### translate + +translate(tx?: number, ty?: number): Matrix2D + +Performs a left multiplication translation operation on this matrix. + +Since API version 9, this API is supported in ArkTS widgets. + +**Parameters** + +| Parameter| Type | Mandatory| Default Value| Description | +| ---- | ------ | ---- | ------ | ---------------------------- | +| tx | number | No | 0 | Horizontal translation distance, in vp.| +| ty | number | No | 0 | Vertical translation distance, in vp.| + +**Return value** + +| Type | Description | +| --------------------- | -------------------- | +| [Matrix2D](#matrix2d) | Matrix of the translation result.| + +**Example** + +```ts +// xxx.ets +@Entry +@Component +struct Matrix2DTranslate { + @State message: string = 'Matrix2D Translate' + + printMatrix(title, matrix) { + console.log(title) + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + + ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") + } + build() { + Row() { + Column() { + Text(this.message) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Button("matrix translate") + .onClick(() => { + var matrix : Matrix2D = new Matrix2D() + matrix.scaleX = 1 + matrix.scaleY = 1 + matrix.rotateX = 0 + matrix.rotateY = 0 + matrix.translateX = 0 + matrix.translateY = 0 + matrix.translate(100, 100) + this.printMatrix(this.message, matrix) + }) + } + .width('100%') + } + .height('100%') + } +} +``` + +### scale + +scale(sx?: number, sy?: number): Matrix2D + +Performs a right multiplication scaling operation on this matrix. + +Since API version 9, this API is supported in ArkTS widgets. + +**Parameters** + +| Parameter| Type | Mandatory| Default Value| Description | +| ---- | ------ | ---- | ------ | ------------------ | +| sx | number | No | 1 | Horizontal scale factor.| +| sy | number | No | 1 | Vertical scale factor.| + +**Return value** + +| Type | Description | +| --------------------- | ------------------ | +| [Matrix2D](#matrix2d) | Matrix of the scale result.| + +**Example** + +```ts +// xxx.ets +@Entry +@Component +struct Matrix2DScale { + @State message: string = 'Matrix2D Scale' + + printMatrix(title, matrix) { + console.log(title) + console.log("Matrix [scaleX = " + matrix.scaleX + ", scaleY = " + matrix.scaleY + + ", rotateX = " + matrix.rotateX + ", rotateY = " + matrix.rotateY + + ", translateX = " + matrix.translateX + ", translateY = " + matrix.translateY + "]") + } + build() { + Row() { + Column() { + Text(this.message) + .fontSize(20) + .fontWeight(FontWeight.Bold) + Button("matrix scale") + .onClick(() => { + var matrix : Matrix2D = new Matrix2D() + matrix.scaleX = 1 + matrix.scaleY = 1 + matrix.rotateX = 0 + matrix.rotateY = 0 + matrix.translateX = 0 + matrix.translateY = 0 + matrix.scale(0.5, 0.5) + this.printMatrix(this.message, matrix) + }) + } + .width('100%') + } + .height('100%') + } +} +``` diff --git a/en/application-dev/reference/arkui-ts/ts-components-offscreencanvas.md b/en/application-dev/reference/arkui-ts/ts-components-offscreencanvas.md new file mode 100644 index 0000000000000000000000000000000000000000..71009d767f23d99fc89b24061b46579e4c9b050a --- /dev/null +++ b/en/application-dev/reference/arkui-ts/ts-components-offscreencanvas.md @@ -0,0 +1,231 @@ +# OffscreenCanvas + +**OffscreenCanvas** provides an offscreen canvas for drawing. + +When using [Canvas](ts-components-canvas-canvas.md) or [Canvas API](ts-canvasrenderingcontext2d.md), rendering, animations, and user interactions generally occur on the main thread of an application. The computation relating to canvas animations and rendering may affect application performance. **OffscreenCanvas** allows for rendering off the screen. This means that some tasks can be run in a separate thread to reduce the load on the main thread. + +> **NOTE** +> +> The APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version. + +## Child Components + +Not supported + +## APIs + +OffscreenCanvas(width: number, height: number) + +Since API version 9, this API is supported in ArkTS widgets. + +**Parameters** + +| Name| Type| Mandatory| Default Value| Description | +| ------ | -------- | ---- | ------ | ------------------------------------- | +| width | number | Yes | 0 | Width of the offscreen canvas, in vp.| +| height | number | Yes | 0 | Height of the offscreen canvas, in vp.| + +## Attributes + +In addition to the [universal attributes](ts-universal-attributes-size.md), the following attributes are supported. + +| Name | Type | Default Value| Description | +| ------ | ------ | ------ | ------------------------------------------------------------ | +| width | number | 0 | Width of the offscreen canvas, in vp. Since API version 9, this API is supported in ArkTS widgets.| +| height | number | 0 | Height of the offscreen canvas, in vp. Since API version 9, this API is supported in ArkTS widgets.| + +### width + +```ts +// xxx.ets +@Entry +@Component +struct OffscreenCanvasPage { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offCanvas: OffscreenCanvas = new OffscreenCanvas(200, 300) + + build() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Start }) { + Column() { + Canvas(this.context) + .width('100%') + .height('100%') + .borderWidth(5) + .borderColor('#00FF00') + .backgroundColor('#FFFFFF') + .onReady(() => { + var offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = '#CDCDCD' + offContext.fillRect(0, 0, this.offCanvas.width, 150) + var image = this.offCanvas.transferToImageBitmap() + this.context.setTransform(1, 0, 0, 1, 50, 200) + this.context.transferFromImageBitmap(image) + }) + } + }.width('100%').height('100%') + } +} +``` + +![en-us_image_0000001194032666](figures/offscreen_canvas_width.png) + +### height + +```ts +// xxx.ets +@Entry +@Component +struct OffscreenCanvasPage { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offCanvas: OffscreenCanvas = new OffscreenCanvas(200, 300) + + build() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Start }) { + Column() { + Canvas(this.context) + .width('100%') + .height('100%') + .borderWidth(5) + .borderColor('#00FF00') + .backgroundColor('#FFFFFF') + .onReady(() => { + var offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = '#CDCDCD' + offContext.fillRect(0, 0, 100, this.offCanvas.height) + var image = this.offCanvas.transferToImageBitmap() + this.context.setTransform(1, 0, 0, 1, 50, 200) + this.context.transferFromImageBitmap(image) + }) + } + }.width('100%').height('100%') + } +} +``` + +![en-us_image_0000001194032666](figures/offscreen_canvas_height.png) + +## Methods + +### transferToImageBitmap + +transferToImageBitmap(): ImageBitmap + +Creates an **ImageBitmap** object from the most recently rendered image of the offscreen canvas. + +Since API version 9, this API is supported in ArkTS widgets. + +**Return value** + +| Type | Description | +| -------------------------------------------------- | ----------------------- | +| [ImageBitmap](ts-components-canvas-imagebitmap.md) | **ImageBitmap** object created.| + +**Example** + +```ts +// xxx.ets +@Entry +@Component +struct OffscreenCanvasPage { + private settings: RenderingContextSettings = new RenderingContextSettings(true) + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings) + private offCanvas: OffscreenCanvas = new OffscreenCanvas(300, 500) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .borderWidth(5) + .borderColor('#00FF00') + .backgroundColor('#FFFFFF') + .onReady(() => { + var offContext = this.offCanvas.getContext("2d", this.settings) + offContext.fillStyle = '#CDCDCD' + offContext.fillRect(0, 0, 300, 500) + offContext.fillStyle = '#000000' + offContext.font = '70px serif bold' + offContext.fillText("Offscreen : Hello World!", 20, 60) + var image = this.offCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } +} +``` + +![zh-cn_image_0000001194032666](figures/offscreen_canvas_transferToImageBitmap.png) + +### getContext10+ + +getContext(contextType: "2d", option?: RenderingContextSettings): OffscreenCanvasRenderingContext2D + +Obtains the drawing context of the offscreen canvas. + +**Parameters** + +| Name | Type | Mandatory| Default Value| Description | +| ----------- | ------------------------------------------------------------ | ---- | ------ | ------------------------------------------------------------ | +| contextType | string | Yes | "2d" | Type of the drawing context of the offscreen canvas. | +| option | [RenderingContextSettings](ts-canvasrenderingcontext2d.md#renderingcontextsettings) | No | - | For details, see [RenderingContextSettings](ts-canvasrenderingcontext2d.md#renderingcontextsettings).| + +**Return value** + +| Type | Description | +| ------------------------------------------------------------ | --------------------------------- | +| [OffscreenCanvasRenderingContext2D](ts-offscreencanvasrenderingcontext2d.md) | Drawing context of the offscreen canvas.| + +**Example** + +```ts +@Entry +@Component +struct OffscreenCanvasExamplePage { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offscreenCanvas: OffscreenCanvas = new OffscreenCanvas(600, 800) + + build() { + Flex({ direction: FlexDirection.Row, alignItems: ItemAlign.Start, justifyContent: FlexAlign.Start }) { + Column() { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#FFFFFF') + .onReady(() => { + var offContext = this.offscreenCanvas.getContext("2d", this.settings) + offContext.font = '70px sans-serif' + offContext.fillText("Offscreen : Hello World!", 20, 60) + offContext.fillStyle = "#0000ff" + offContext.fillRect(230, 350, 50, 50) + offContext.fillStyle = "#EE0077" + offContext.translate(70, 70) + offContext.fillRect(230, 350, 50, 50) + offContext.fillStyle = "#77EE0077" + offContext.translate(-70, -70) + offContext.fillStyle = "#00ffff" + offContext.rotate(45 * Math.PI / 180); + offContext.fillRect(180, 120, 50, 50); + offContext.rotate(-45 * Math.PI / 180); + offContext.beginPath() + offContext.moveTo(10, 150) + offContext.bezierCurveTo(20, 100, 200, 100, 200, 20) + offContext.stroke() + offContext.fillStyle = '#FF00FF' + offContext.fillRect(100, 100, 60, 60) + var imageData = this.offscreenCanvas.transferToImageBitmap() + this.context.transferFromImageBitmap(imageData) + }) + }.width('100%').height('100%') + } + .width('100%') + .height('100%') + } +} +``` + +![en-us_image_0000001194032666](figures/offscreen_canvas.png) diff --git a/en/application-dev/reference/arkui-ts/ts-container-gridrow.md b/en/application-dev/reference/arkui-ts/ts-container-gridrow.md index aa0a7d654527ca5e079636ec370d88139a51fc2e..8d225a3aa65a057ae5e7a2a07990c98edfc5fba2 100644 --- a/en/application-dev/reference/arkui-ts/ts-container-gridrow.md +++ b/en/application-dev/reference/arkui-ts/ts-container-gridrow.md @@ -130,7 +130,7 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the | Name | Type | Description | | ----------------------- | ----------------------------------- | ------------------------------------------- | -| alignItems10+ | [ItemAlign](ts-appendix-enums.md#itemalign) | Alignment mode of the **\** cross axis.
Default value: **ItemAlign.Start**
**NOTE**
In **ItemAlign**, only the enumerated values **Start**, **Center**, **End**, and **Stretch** are supported.
The alignment mode of the **\** component can also be set using **alignSelf([ItemAlign](ts-appendix-enums.md#itemalign))**. If both of the preceding methods are used, the setting of **alignSelf(ItemAlign)** prevails.
Since API version 10, this API is supported in ArkTS widgets.| +| alignItems10+ | ItemAlign | Alignment mode of the **\** cross axis.
Default value: **ItemAlign.Start**
**NOTE**
**ItemAlign** supports the following enums: **ItemAlign.Start**, **ItemAlign.Center**, **ItemAlign.End**, and **ItemAlign.Stretch**.
The alignment mode of the **\** component can also be set using **alignSelf([ItemAlign](ts-appendix-enums.md#itemalign))**. If both of the preceding methods are used, the setting of **alignSelf(ItemAlign)** prevails.
Since API version 10, this API is supported in ArkTS widgets.| ## Events diff --git a/en/application-dev/reference/arkui-ts/ts-container-scroll.md b/en/application-dev/reference/arkui-ts/ts-container-scroll.md index e56281bb9e1915186abcc64e4a9911a99aea18d7..8fd15ac0a038142180ee2705ee4b6026ba6ac5e9 100644 --- a/en/application-dev/reference/arkui-ts/ts-container-scroll.md +++ b/en/application-dev/reference/arkui-ts/ts-container-scroll.md @@ -42,18 +42,18 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the | Horizontal | Only horizontal scrolling is supported. | | Vertical | Only vertical scrolling is supported. | | None | Scrolling is disabled. | -| Free(deprecated) | Vertical or horizontal scrolling is supported.
This API is deprecated since API version 9.| +| Free(deprecated) | Vertical or horizontal scrolling is supported.
This API is deprecated since API version 9. | ## Events -| Name | Description | +| Name | Description | | ------------------------------------------------------------ | ------------------------------------------------------------ | -| onScrollFrameBegin9+(event: (offset: number, state: ScrollState) => { offsetRemain }) | Triggered when each frame scrolling starts. The input parameters indicate the amount by which the **\** component will scroll. The event handler then works out the amount by which the component needs to scroll based on the real-world situation and returns the result.
\- **offset**: amount to scroll by.
\- **state**: current scrolling status.
- **offsetRemain**: actual amount by which the component scrolls.
**NOTE**
1. This event is triggered when scrolling is started by the **\** component or other input settings, such as keyboard and mouse operations.
2. This event is not triggered when the controller API is called.
3. No out-of-bounds bounce effect is triggered.
**NOTE**
The value of **offsetRemain** can be a negative value.
If the **onScrollFrameBegine** event and **scrollBy** method are used to implement nested scrolling, set the **edgeEffect** attribute of the scrollable child component to **None**. For example, if a **\** is nested in the **\** component, **edgeEffect** of the **\** must be set to **EdgeEffect.None**.| -| onScroll(event: (xOffset: number, yOffset: number) => void) | Triggered to return the horizontal and vertical offsets during scrolling when the specified scroll event occurs.
**NOTE**
1. This event is triggered when scrolling is started by the **\** component or other input settings, such as keyboard and mouse operations.
2. This event is triggered when the controller API is called.
3. The out-of-bounds bounce effect is triggered.| -| onScrollEdge(event: (side: Edge) => void) | Triggered when scrolling reaches the edge.
**NOTE**
1. This event is triggered when scrolling reaches the edge after being started by the **\** component or other input settings, such as keyboard and mouse operations.
2. This event is triggered when the controller API is called.
3. The out-of-bounds bounce effect is triggered.| -| onScrollEnd(deprecated) (event: () => void) | Triggered when scrolling stops.
This event is deprecated since API version 9. Use the **onScrollStop** event instead.
**NOTE**
1. This event is triggered when scrolling is stopped by the **\** component or other input settings, such as keyboard and mouse operations.
2. This event is triggered when the controller API is called, accompanied by a transition animation.| -| onScrollStart9+(event: () => void) | Triggered when scrolling starts and is initiated by the user's finger dragging the **\** component or its scrollbar. This event is also triggered when the animation contained in the scrolling triggered by [Scroller](#scroller) starts.
**NOTE**
1. This event is triggered when scrolling is started by the **\** component or other input settings, such as keyboard and mouse operations.
2. This event is triggered when the controller API is called, accompanied by a transition animation.| -| onScrollStop9+(event: () => void) | Triggered when scrolling stops after the user's finger leaves the screen. This event is also triggered when the animation contained in the scrolling triggered by [Scroller](#scroller) stops.
**NOTE**
1. This event is triggered when scrolling is stopped by the **\** component or other input settings, such as keyboard and mouse operations.
2. This event is triggered when the controller API is called, accompanied by a transition animation.| +| onScrollFrameBegin9+(event: (offset: number, state: ScrollState) => { offsetRemain }) | Triggered when each frame scrolling starts. The input parameters indicate the amount by which the **\** component will scroll. The event handler then works out the amount by which the component needs to scroll based on the real-world situation and returns the result.
\- **offset**: amount to scroll by.
\- **state**: current scrolling status.
- **offsetRemain**: actual amount by which the component scrolls.
**NOTE**
1. This event is triggered when scrolling is started by the **\** component or other input settings, such as keyboard and mouse operations.
2. This event is not triggered when the controller API is called.
3. This event does not support the out-of-bounds bounce effect.
**NOTE**
The value of **offsetRemain** can be a negative value.
If the **onScrollFrameBegine** event and **scrollBy** method are used to implement nested scrolling, set the **edgeEffect** attribute of the scrollable child component to **None**. For example, if a **\** is nested in the **\** component, **edgeEffect** of the **\** must be set to **EdgeEffect.None**. | +| onScroll(event: (xOffset: number, yOffset: number) => void) | Triggered to return the horizontal and vertical offsets during scrolling when the specified scroll event occurs.
**NOTE**
1. This event is triggered when scrolling is started by the **\** component or other input settings, such as keyboard and mouse operations.
2. This event is triggered when the controller API is called.
3. This event supports the out-of-bounds bounce effect. | +| onScrollEdge(event: (side: Edge) => void) | Triggered when scrolling reaches the edge.
**NOTE**
1. This event is triggered when scrolling reaches the edge after being started by the **\** component or other input settings, such as keyboard and mouse operations.
2. This event is triggered when the controller API is called.
3. This event supports the out-of-bounds bounce effect. | +| onScrollEnd(deprecated) (event: () => void) | Triggered when scrolling stops.
This event is deprecated since API version 9. Use the **onScrollStop** event instead.
**NOTE**
1. This event is triggered when scrolling is stopped by the **\** component or other input settings, such as keyboard and mouse operations.
2. This event is triggered when the controller API is called, accompanied by a transition animation. | +| onScrollStart9+(event: () => void) | Triggered when scrolling starts and is initiated by the user's finger dragging the **\** component or its scrollbar. This event is also triggered when the animation contained in the scrolling triggered by [Scroller](#scroller) starts.
**NOTE**
1. This event is triggered when scrolling is started by the **\** component or other input settings, such as keyboard and mouse operations.
2. This event is triggered when the controller API is called, accompanied by a transition animation. | +| onScrollStop9+(event: () => void) | Triggered when scrolling stops after the user's finger leaves the screen. This event is also triggered when the animation contained in the scrolling triggered by [Scroller](#scroller) stops.
**NOTE**
1. This event is triggered when scrolling is stopped by the **\** component or other input settings, such as keyboard and mouse operations.
2. This event is triggered when the controller API is called, accompanied by a transition animation. | > **NOTE** > @@ -131,22 +131,24 @@ Obtains the scrolling offset. ### scrollToIndex -scrollToIndex(value: number): void - +scrollToIndex(value: number, smooth?: boolean, align?: ScrollAlign): void Scrolls to the item with the specified index. +When **smooth** is set to **true**, all passed items are loaded and counted in layout calculation. This may result in performance issues if a large number of items are involved. + > **NOTE** > -> Only the **\**, **\**, and **\** components are supported. +> This API only works for the **\**, **\**, and **\** components. **Parameters** -| Name| Type| Mandatory| Description | -| ------ | -------- | ---- | ---------------------------------- | -| value | number | Yes | Index of the item to be scrolled to in the list.| - +| Name | Type| Mandatory| Description | +| --------------------- | -------- | ---- | ------------------------------------------------------------ | +| value | number | Yes | Index of the item to be scrolled to in the list. | +| smooth10+ | boolean | No | Whether to enable the smooth animation for scrolling to the item with the specified index. The value **true** means to enable that the smooth animation, and **false** means the opposite.
Default value: **false**
**NOTE**
Currently, only the **\** component supports this parameter.| +| align10+ | [ScrollAlign](#scrollalign10) | No | How the list item to scroll to is aligned with the list.
Default value: **ScrollAlign.START**
**NOTE**
Currently, only the **\** component supports this parameter.| ### scrollBy9+ @@ -158,7 +160,7 @@ Scrolls by the specified amount. > **NOTE** > -> Only the **\**, **\**, **\**, and **\** components are supported. +> This API only works for the **\**, **\**, **\**, and **\** components. **Parameters** @@ -167,6 +169,14 @@ Scrolls by the specified amount. | dx | Length | Yes | Amount to scroll by in the horizontal direction. The percentage format is not supported.| | dy | Length | Yes | Amount to scroll by in the vertical direction. The percentage format is not supported.| +## ScrollAlign10+ + +| Name | Description | +| ------ | ------------------------------ | +| START | The start edge of the list item is flush with the start edge of the list. | +| CENTER | The list item is centered along the main axis of the list. | +| END | The end edge of the list item is flush with the end edge of the list.| +| AUTO | The list item is automatically aligned.
If the list item is fully contained within the display area, no adjustment is performed. Otherwise, the list item is aligned so that its start or end edge is flush with the start or end edge of the list, whichever requires a shorter scrolling distance.| ## Example ### Example 1 diff --git a/en/application-dev/reference/arkui-ts/ts-container-sidebarcontainer.md b/en/application-dev/reference/arkui-ts/ts-container-sidebarcontainer.md index c095761bafda868074d0c4dc1a2ccb8a55829ddf..52fbd9e3d32589538b10f699b209a7f00c9dc5fb 100644 --- a/en/application-dev/reference/arkui-ts/ts-container-sidebarcontainer.md +++ b/en/application-dev/reference/arkui-ts/ts-container-sidebarcontainer.md @@ -44,7 +44,7 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the | showSideBar | boolean | Whether to display the sidebar.
Default value: **true**
Since API version 10, this attribute supports [$$](../../quick-start/arkts-two-way-sync.md) for two-way binding of variables.| | controlButton | [ButtonStyle](#buttonstyle) | Attributes of the sidebar control button.| | showControlButton | boolean | Whether to display the sidebar control button.
Default value: **true**| -| sideBarWidth | number \| [Length](ts-types.md#length)9+ | Width of the sidebar.
Default value: **200**
Unit: vp
**NOTE**
A value less than 0 evaluates to the default value.
The value must comply with the width constraints. If it is not within the valid range, the value closest to the set one is used.
When set, the width of the sidebar takes precedence over that of the sidebar child components. If it is not set, however, the width of the sidebar child component takes precedence.| +| sideBarWidth | number \| [Length](ts-types.md#length)9+ | Width of the sidebar.
Default value: **200**
Unit: vp
**NOTE**
A value less than 0 evaluates to the default value.
The value must comply with the width constraints. If it is not within the valid range, the value closest to the set one is used.
The width of the sidebar, whether it is specified or kept at the default, takes precedence over that of the sidebar child components.| | minSideBarWidth | number \| [Length](ts-types.md#length)9+ | Minimum width of the sidebar.
Default value: **200**, in vp
**NOTE**
A value less than 0 evaluates to the default value.
The value cannot exceed the width of the sidebar container itself. Otherwise, the width of the sidebar container itself is used.
When set, the minimum width of the sidebar takes precedence over that of the sidebar child components. If it is not set, however, the minimum width of the sidebar child component takes precedence.| | maxSideBarWidth | number \| [Length](ts-types.md#length)9+ | Maximum width of the sidebar.
Default value: **280**, in vp
**NOTE**
A value less than 0 evaluates to the default value.
The value cannot exceed the width of the sidebar container itself. Otherwise, the width of the sidebar container itself is used.
When set, the maximum width of the sidebar takes precedence over that of the sidebar child components. If it is not set, however, the maximum width of the sidebar child component takes precedence.| | autoHide9+ | boolean | Whether to automatically hide the sidebar when it is dragged to be smaller than the minimum width.
Default value: **true**
**NOTE**
The value is subject to the **minSideBarWidth** attribute method. If it is not set in **minSideBarWidth**, the default value is used.
Whether the sidebar should be hidden is determined when it is being dragged. When its width is less than the minimum width, the damping effect is required to trigger hiding (a distance out of range).| diff --git a/en/application-dev/reference/arkui-ts/ts-container-swiper.md b/en/application-dev/reference/arkui-ts/ts-container-swiper.md index 6900431ed2d867680b5f6135325a1c6565b9a430..8219faa65966b92064528a5068d5870ad757e769 100644 --- a/en/application-dev/reference/arkui-ts/ts-container-swiper.md +++ b/en/application-dev/reference/arkui-ts/ts-container-swiper.md @@ -45,18 +45,19 @@ In addition to the [universal attributes](ts-universal-attributes-size.md), the | cachedCount8+ | number | Number of child components to be cached.
Default value: **1**
**NOTE**
**cachedCount** has caching optimized. You are advised not to use it together with [LazyForEach](../../quick-start/arkts-rendering-control-lazyforeach.md).| | disableSwipe8+ | boolean | Whether to disable the swipe feature.
Default value: **false** | | curve8+ | [Curve](ts-appendix-enums.md#curve) \| string | Animation curve. The ease-in/ease-out curve is used by default. For details about common curves, see [Curve](ts-appendix-enums.md#curve). You can also create custom curves (interpolation curve objects) by using the API provided by the [interpolation calculation](../apis/js-apis-curve.md) module.
Default value: **Curve.Linear**| -| indicatorStyle8+ | {
left?: [Length](ts-types.md#length),
top?: [Length](ts-types.md#length),
right?: [Length](ts-types.md#length),
bottom?: [Length](ts-types.md#length),
size?: [Length](ts-types.md#length),
mask?: boolean,
color?: [ResourceColor](ts-types.md),
selectedColor?: [ResourceColor](ts-types.md)
} | Style of the navigation point indicator.
\- **left**: distance between the navigation point indicator and the left edge of the **\** component.
\- **top**: distance between the navigation point indicator and the top edge of the **\** component.
\- **right**: distance between the navigation point indicator and the right edge of the **\** component.
\- **bottom**: distance between the navigation point indicator and the bottom edge of the **\** component.
\- **size**: diameter of the navigation point indicator.
\- **mask**: whether to enable the mask for the navigation point indicator.
\- **color**: color of the navigation point indicator.
\- **selectedColor**: color of the selected navigation dot.| -| displayCount8+ | number \| string | Number of elements to display per page.
Default value: **1**
**NOTE**
If the value is of the string type, it can only be **'auto'**, whose display effect is the same as that of **SwiperDisplayMode.AutoLinear**.
If the value is of the number type, child components stretch (shrink) on the main axis after the swiper width [deducting the result of itemSpace x (displayCount – 1)] is evenly distributed among them on the main axis.| +| indicatorStyle(deprecated) | {
left?: [Length](ts-types.md#length),
top?: [Length](ts-types.md#length),
right?: [Length](ts-types.md#length),
bottom?: [Length](ts-types.md#length),
size?: [Length](ts-types.md#length),
mask?: boolean,
color?: [ResourceColor](ts-types.md),
selectedColor?: [ResourceColor](ts-types.md)
} | Style of the navigation point indicator.
\- **left**: distance between the navigation point indicator and the left edge of the **\** component.
\- **top**: distance between the navigation point indicator and the top edge of the **\** component.
\- **right**: distance between the navigation point indicator and the right edge of the **\** component.
\- **bottom**: distance between the navigation point indicator and the bottom edge of the **\** component.
\- **size**: diameter of the navigation point indicator. The value cannot be in percentage. Default value: **6vp**
\- **mask**: whether to enable the mask for the navigation point indicator.
\- **color**: color of the navigation point indicator.
\- **selectedColor**: color of the selected navigation dot.
This API is supported since API version 8 and is deprecated since API version 9. You are advised to use [indicator](#indicator10) instead.| +| displayCount8+ | number \| string | Number of elements to display per page.
Default value: **1**
**NOTE**
If the value is of the string type, it can only be **'auto'**, whose display effect is the same as that of **SwiperDisplayMode.AutoLinear**.
If the value is of the number type, child components stretch (shrink) on the main axis after the swiper width [deducting the result of itemSpace x (displayCount – 1)] is evenly distributed among them on the main axis.| | effectMode8+ | [EdgeEffect](ts-appendix-enums.md#edgeeffect) | Swipe effect. For details, see **EdgeEffect**.
Default value: **EdgeEffect.Spring**
**NOTE**
The spring effect does not take effect when the controller API is called.| -| nextMargin10+ |
[Length](ts-types.md#length)
| Next margin, used to reveal a small part of the next item.
Default value: **0**
**NOTE**
This parameter is valid only when **SwiperDisplayMode** is set to **STRETCH**. If **cachedCount** is set to a value less than or equal to 0, a small part of the next item is displayed, but child components cannot be loaded. | -| prevMargin10+ |
[Length](ts-types.md#length)
| Previous margin, used to reveal a small part of the previous item.
Default value: **0**
**NOTE**
This parameter is valid only when **SwiperDisplayMode** is set to **STRETCH**. If **cachedCount** is set to a value less than or equal to 0, a small part of the previous item is displayed, but child components cannot be loaded. | +| displayArrow10+ | value:[ArrowStyle](#arrowstyle10) \| boolean,
isHoverShow?: boolean | Arrow style of the navigation point indicator.
Default value: **false**
**isHoverShow**: whether to show the arrow when the mouse pointer hovers over the navigation point indicator.| ## SwiperDisplayMode | Name| Description| | ----------- | ------------------------------------------ | -| Stretch | The slide width of the **\** component is equal to the width of the component.| -| AutoLinear | The slide width of the **\** component is equal to that of the child component with the maximum width.| +| Stretch(deprecated) | The slide width of the **\** component is equal to the width of the component.
This API is deprecated since API version 10. You are advised to use **STRETCH** instead.| +| AutoLinear(deprecated) | The slide width of the **\** component is equal to that of the child component with the maximum width.
This API is deprecated since API version 10. You are advised to use **AUTO_LINEAR** instead.| +| STRETCH10+ | The slide width of the **\** component is equal to the width of the component.| +| AUTO_LINEAR10+ | The slide width of the **\** component is equal to that of the child component with the maximum width.| ## SwiperController @@ -92,10 +93,10 @@ Sets the distance between the navigation point indicator and the **\** c | Name| Type| Mandatory.| Description | | ------ | -------- | ------ | ------------------------------------ | -| left | [Length](ts-types.md#length) | No | Distance between the navigation point indicator and the left edge of the **\** component.| -| top | [Length](ts-types.md#length) | No | Distance between the navigation point indicator and the top edge of the **\** component.| -| right | [Length](ts-types.md#length) | No | Distance between the navigation point indicator and the right edge of the **\** component.| -| bottom | [Length](ts-types.md#length) | No | Distance between the navigation point indicator and the bottom edge of the **\** component.| +| left | [Length](ts-types.md#length) | No | Distance between the navigation point indicator and the left edge of the **\** component.
Default value: **0**
Unit: vp| +| top | [Length](ts-types.md#length) | No | Distance between the navigation point indicator and the top edge of the **\** component.
Default value: **0**
Unit: vp| +| right | [Length](ts-types.md#length) | No | Distance between the navigation point indicator and the right edge of the **\** component.
Default value: **0**
Unit: vp| +| bottom | [Length](ts-types.md#length) | No | Distance between the navigation point indicator and the bottom edge of the **\** component.
Default value: **0**
Unit: vp| ### DotIndicator @@ -122,6 +123,20 @@ Defines the navigation point indicator of the digit style, which inherits attrib | digitFont | {
size?:[Length](ts-types.md#length)
weight?:number \| [FontWeight](ts-appendix-enums.md#fontweight) \| string
} | No | Font style of the navigation point indicator of the digit style.
\- **size**: font size.
Default value: **14vp**
\- **weight**: font weight.| | selectedDigitFont | {
size?:[Length](ts-types.md#length)
weight?:number \| [FontWeight](ts-appendix-enums.md#fontweight) \| string
} | No | Font style of the selected indicator digit.
\- **size**: font size.
Default value: **14vp**
\- **weight**: font weight.| +### ArrowStyle10+ +Describes the left and right arrow attributes. + +| Name | Type| Mandatory.| Description| +| ------------- | -------- | ------ | -------- | +| isShowBackground | boolean | No| Whether to show the background for the arrow.
Default value: **false**| +| isSidebarMiddle | boolean | No| Whether the arrow is centered on both sides of the content area.
Default value: **false** (the arrow is shown on either side of the navigation point indicator)| +| backgroundSize | [Length](ts-types.md#length) | No| Size of the background.
Default value: **24vp**| +| backgroundColor | [ResourceColor](ts-types.md#resourcecolor) | No| Color of the background.
Default value: **'\#19182431'**| +| arrowSize | [Length](ts-types.md#length) | No| Size of the arrow.
Default value: **18vp**| +| arrowColor | [ResourceColor](ts-types.md#resourcecolor) | No| Color of the arrow.
Default value: **\#182431**| + + + ## Events In addition to the [universal events](ts-universal-events-click.md), the following events are supported. diff --git a/en/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md b/en/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md index f513d46ae5849a33ed8c1eb8c4b7255e4c8403cf..1ba996fc0ef670359687c3e94bb6cadf704f92c5 100644 --- a/en/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md +++ b/en/application-dev/reference/arkui-ts/ts-offscreencanvasrenderingcontext2d.md @@ -3,47 +3,50 @@ Use **OffscreenCanvasRenderingContext2D** to draw rectangles, images, and text offscreen onto a canvas. Drawing offscreen onto a canvas is a process where content to draw onto the canvas is first drawn in the buffer, and then converted into a picture, and finally the picture is drawn on the canvas. This process increases the drawing efficiency. > **NOTE** -> +> > The APIs of this module are supported since API version 8. Updates will be marked with a superscript to indicate their earliest API version. ## APIs -OffscreenCanvasRenderingContext2D(width: number, height: number, setting: RenderingContextSettings) +OffscreenCanvasRenderingContext2D(width: number, height: number, settings?: RenderingContextSettings) Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory| Description | -| ------- | ------------------------------------------------------------ | ---- | ------------------------------------ | -| width | number | Yes | Width of the offscreen canvas. | -| height | number | Yes | Height of the offscreen canvas. | -| setting | [RenderingContextSettings](ts-canvasrenderingcontext2d.md#renderingcontextsettings) | Yes | See RenderingContextSettings.| +| Name | Type | Mandatory | Description | +| -------- | ---------------------------------------- | ---- | ------------------------------ | +| width | number | Yes | Width of the offscreen canvas. | +| height | number | Yes | Height of the offscreen canvas. | +| settings | [RenderingContextSettings](ts-canvasrenderingcontext2d.md#renderingcontextsettings) | No | See RenderingContextSettings.| ## Attributes -| Name | Type | Description | -| ----------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | -| [fillStyle](#fillstyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](#canvaspattern) | Style to fill an area.
- When the type is **string**, this attribute indicates the color of the filling area.
- When the type is **number**, this attribute indicates the color of the filling area.
- When the type is **CanvasGradient**, this attribute indicates a gradient object, which is created using the **[createLinearGradient](#createlineargradient)** API.
- When the type is **CanvasPattern**, this attribute indicates a pattern, which is created using the **[createPattern](#createpattern)** API.
Since API version 9, this API is supported in ArkTS widgets.| -| [lineWidth](#linewidth) | number | Line width.
Since API version 9, this API is supported in ArkTS widgets.| -| [strokeStyle](#strokestyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](#canvaspattern) | Stroke style.
- When the type is **string**, this attribute indicates the stroke color.
- When the type is **number**, this attribute indicates the stroke color.
- When the type is **CanvasGradient**, this attribute indicates a gradient object, which is created using the **[createLinearGradient](#createlineargradient)** API.
- When the type is **CanvasPattern**, this attribute indicates a pattern, which is created using the **[createPattern](#createpattern)** API.
Since API version 9, this API is supported in ArkTS widgets.| -| [lineCap](#linecap) | CanvasLineCap | Style of the line endpoints. The options are as follows:
- **butt**: The endpoints of the line are squared off.
- **round**: The endpoints of the line are rounded.
- **square**: The endpoints of the line are squared off, and each endpoint has added a rectangle whose length is the same as the line thickness and whose width is half of the line thickness.
- Default value: **'butt'**
Since API version 9, this API is supported in ArkTS widgets.| -| [lineJoin](#linejoin) | CanvasLineJoin | Style of the shape used to join line segments. The options are as follows:
- **round**: The intersection is a sector, whose radius at the rounded corner is equal to the line width.
- **bevel**: The intersection is a triangle. The rectangular corner of each line is independent.
- **miter**: The intersection has a miter corner by extending the outside edges of the lines until they meet. You can view the effect of this attribute in **miterLimit**.
- Default value: **'miter'**
Since API version 9, this API is supported in ArkTS widgets.| -| [miterLimit](#miterlimit) | number | Maximum miter length. The miter length is the distance between the inner corner and the outer corner where two lines meet.
- Default value: **10**
Since API version 9, this API is supported in ArkTS widgets.| -| [font](#font) | string | Font style.
Syntax: ctx.font='font-size font-family'
- (Optional) **font-size**: font size and row height. The unit can only be pixels.
(Optional) **font-family**: font family.
Syntax: ctx.font='font-style font-weight font-size font-family'
- (Optional) **font-style**: font style. Available values are **normal** and **italic**.
- (Optional) **font-weight**: font weight. Available values are as follows: **normal**, **bold**, **bolder**, **lighter**, **100**, **200**, **300**, **400**, **500**, **600**, **700**, **800**, **900**.
- (Optional) **font-size**: font size and row height. The unit can only be pixels.
- (Optional) **font-family**: font family. Available values are **sans-serif**, **serif**, and **monospace**.
Default value: **'normal normal 14px sans-serif'**
Since API version 9, this API is supported in ArkTS widgets.| -| [textAlign](#textalign) | CanvasTextAlign | Text alignment mode. Available values are as follows:
- **left**: The text is left-aligned.
- **right**: The text is right-aligned.
- **center**: The text is center-aligned.
- **start**: The text is aligned with the start bound.
- **end**: The text is aligned with the end bound.
**NOTE**

In the **ltr** layout mode, the value **'start'** equals **'left'**. In the **rtl** layout mode, the value **'start'** equals **'right'**.
- Default value: **'left'**
Since API version 9, this API is supported in ArkTS widgets.| -| [textBaseline](#textbaseline) | CanvasTextBaseline | Horizontal alignment mode of text. Available values are as follows:
- **alphabetic**: The text baseline is the normal alphabetic baseline.
- **top**: The text baseline is on the top of the text bounding box.
- **hanging**: The text baseline is a hanging baseline over the text.
- **middle**: The text baseline is in the middle of the text bounding box.
**'ideographic'**: The text baseline is the ideographic baseline. If a character exceeds the alphabetic baseline, the ideographic baseline is located at the bottom of the excess character.
- **bottom**: The text baseline is at the bottom of the text bounding box. Its difference from the ideographic baseline is that the ideographic baseline does not consider letters in the next line.
- Default value: **'alphabetic'**
Since API version 9, this API is supported in ArkTS widgets.| -| [globalAlpha](#globalalpha) | number | Opacity.
**0.0**: completely transparent.
**1.0**: completely opaque. | -| [lineDashOffset](#linedashoffset) | number | Offset of the dashed line. The precision is float.
- Default value: **0.0**
Since API version 9, this API is supported in ArkTS widgets.| -| [globalCompositeOperation](#globalcompositeoperation) | string | Composition operation type. Available values are as follows: **'source-over'**, **'source-atop'**, **'source-in'**, **'source-out'**, **'destination-over'**, **'destination-atop'**, **'destination-in'**, **'destination-out'**, **'lighter'**, **'copy'**, and **'xor'**.
- Default value: **'source-over'**
Since API version 9, this API is supported in ArkTS widgets.| -| [shadowBlur](#shadowblur) | number | Blur level during shadow drawing. A larger value indicates a more blurred effect. The precision is float.
- Default value: **0.0**
Since API version 9, this API is supported in ArkTS widgets.| -| [shadowColor](#shadowcolor) | string | Shadow color.
Since API version 9, this API is supported in ArkTS widgets.| -| [shadowOffsetX](#shadowoffsetx) | number | X-axis shadow offset relative to the original object.
Since API version 9, this API is supported in ArkTS widgets.| -| [shadowOffsetY](#shadowoffsety) | number | Y-axis shadow offset relative to the original object.
Since API version 9, this API is supported in ArkTS widgets.| -| [imageSmoothingEnabled](#imagesmoothingenabled) | boolean | Whether to adjust the image smoothness during image drawing. The value **true** means to enable this feature, and **false** means the opposite.
- Default value: **true**
Since API version 9, this API is supported in ArkTS widgets.| +| Name | Type | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| [fillStyle](#fillstyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | Style to fill an area.
- When the type is **string**, this attribute indicates the color of the filling area.
- When the type is **number**, this attribute indicates the color of the filling area.
- When the type is **CanvasGradient**, this attribute indicates a gradient object, which is created using the **[createLinearGradient](#createlineargradient)** API.
- When the type is **CanvasPattern**, this attribute indicates a pattern, which is created using the **[createPattern](#createpattern)** API.
Since API version 9, this API is supported in ArkTS widgets.| +| [lineWidth](#linewidth) | number | Line width.
Since API version 9, this API is supported in ArkTS widgets.| +| [strokeStyle](#strokestyle) | string \|number10+ \|[CanvasGradient](ts-components-canvas-canvasgradient.md) \| [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | Stroke style.
- When the type is **string**, this attribute indicates the stroke color.
- When the type is **number**, this attribute indicates the stroke color.
- When the type is **CanvasGradient**, this attribute indicates a gradient object, which is created using the **[createLinearGradient](#createlineargradient)** API.
- When the type is **CanvasPattern**, this attribute indicates a pattern, which is created using the **[createPattern](#createpattern)** API.
Since API version 9, this API is supported in ArkTS widgets.| +| [lineCap](#linecap) | CanvasLineCap | Style of the line endpoints. The options are as follows:
- **butt**: The endpoints of the line are squared off.
- **round**: The endpoints of the line are rounded.
- **square**: The endpoints of the line are squared off, and each endpoint has added a rectangle whose length is the same as the line thickness and whose width is half of the line thickness.
- Default value: **'butt'**
Since API version 9, this API is supported in ArkTS widgets.| +| [lineJoin](#linejoin) | CanvasLineJoin | Style of the shape used to join line segments. The options are as follows:
- **round**: The intersection is a sector, whose radius at the rounded corner is equal to the line width.
- **bevel**: The intersection is a triangle. The rectangular corner of each line is independent.
- **miter**: The intersection has a miter corner by extending the outside edges of the lines until they meet. You can view the effect of this attribute in **miterLimit**.
- Default value: **'miter'**
Since API version 9, this API is supported in ArkTS widgets.| +| [miterLimit](#miterlimit) | number | Maximum miter length. The miter length is the distance between the inner corner and the outer corner where two lines meet.
- Default value: **10**
Since API version 9, this API is supported in ArkTS widgets.| +| [font](#font) | string | Font style.
Syntax: ctx.font='font-size font-family'
- (Optional) **font-size**: font size and row height. The unit can only be pixels.
(Optional) **font-family**: font family.
Syntax: ctx.font='font-style font-weight font-size font-family'
- (Optional) **font-style**: font style. Available values are **normal** and **italic**.
- (Optional) **font-weight**: font weight. Available values are as follows: **normal**, **bold**, **bolder**, **lighter**, **100**, **200**, **300**, **400**, **500**, **600**, **700**, **800**, **900**.
- (Optional) **font-size**: font size and line height. The unit must be specified and can only be px or vp.
- (Optional) **font-family**: font family. Available values are **sans-serif**, **serif**, and **monospace**.
Default value: **'normal normal 14px sans-serif'**
Since API version 9, this API is supported in ArkTS widgets.| +| [textAlign](#textalign) | CanvasTextAlign | Text alignment mode. Available values are as follows:
- **left**: The text is left-aligned.
- **right**: The text is right-aligned.
- **center**: The text is center-aligned.
- **start**: The text is aligned with the start bound.
- **end**: The text is aligned with the end bound.
**NOTE**

In the **ltr** layout mode, the value **'start'** equals **'left'**. In the **rtl** layout mode, the value **'start'** equals **'right'**.
- Default value: **'left'**
Since API version 9, this API is supported in ArkTS widgets.| +| [textBaseline](#textbaseline) | CanvasTextBaseline | Horizontal alignment mode of text. Available values are as follows:
- **alphabetic**: The text baseline is the normal alphabetic baseline.
- **top**: The text baseline is on the top of the text bounding box.
- **hanging**: The text baseline is a hanging baseline over the text.
- **middle**: The text baseline is in the middle of the text bounding box.
**'ideographic'**: The text baseline is the ideographic baseline. If a character exceeds the alphabetic baseline, the ideographic baseline is located at the bottom of the excess character.
- **bottom**: The text baseline is at the bottom of the text bounding box. Its difference from the ideographic baseline is that the ideographic baseline does not consider letters in the next line.
- Default value: **'alphabetic'**
Since API version 9, this API is supported in ArkTS widgets.| +| [globalAlpha](#globalalpha) | number | Opacity.
**0.0**: completely transparent.
**1.0**: completely opaque. | +| [lineDashOffset](#linedashoffset) | number | Offset of the dashed line. The precision is float.
- Default value: **0.0**
Since API version 9, this API is supported in ArkTS widgets.| +| [globalCompositeOperation](#globalcompositeoperation) | string | Composition operation type. Available values are as follows: **'source-over'**, **'source-atop'**, **'source-in'**, **'source-out'**, **'destination-over'**, **'destination-atop'**, **'destination-in'**, **'destination-out'**, **'lighter'**, **'copy'**, and **'xor'**.
- Default value: **'source-over'**
Since API version 9, this API is supported in ArkTS widgets.| +| [shadowBlur](#shadowblur) | number | Blur level during shadow drawing. A larger value indicates a more blurred effect. The precision is float.
- Default value: **0.0**
Since API version 9, this API is supported in ArkTS widgets.| +| [shadowColor](#shadowcolor) | string | Shadow color.
Since API version 9, this API is supported in ArkTS widgets.| +| [shadowOffsetX](#shadowoffsetx) | number | X-axis shadow offset relative to the original object.
Since API version 9, this API is supported in ArkTS widgets.| +| [shadowOffsetY](#shadowoffsety) | number | Y-axis shadow offset relative to the original object.
Since API version 9, this API is supported in ArkTS widgets.| +| [imageSmoothingEnabled](#imagesmoothingenabled) | boolean | Whether to adjust the image smoothness during image drawing. The value **true** means to enable this feature, and **false** means the opposite.
- Default value: **true**
Since API version 9, this API is supported in ArkTS widgets.| +| [imageSmoothingQuality](#imagesmoothingquality) | ImageSmoothingQuality | Quality of image smoothing. This attribute works only when **imageSmoothingEnabled** is set to **true**. Available values are as follows:
- **'low'**: low quality.
- **'medium'**: medium quality.
- **'high'**: high quality.
Default value: **'low'**
Since API version 9, this API is supported in ArkTS widgets.| +| [direction](#direction) | CanvasDirection | Text direction used for drawing text. Available values are as follows:
- **'inherit'**: The text direction is inherited from the **\** component.
- **'ltr'**: The text direction is from left to right.
- **'rtl'**: The text direction is from right to left.
Default value: **'inherit'**
Since API version 9, this API is supported in ArkTS widgets.| +| [filter](#filter) | string | Filter effect. Available values are as follows:
- **'none'**: no filter effect.
- **'blur'**: applies the Gaussian blur for the image.
- **'brightness'**: applies a linear multiplication to the image to make it look brighter or darker.
- **'contrast'**: adjusts the image contrast.
- **'grayscale'**: converts the image to a grayscale image.
- **'hue-rotate'**: applies hue rotation to the image.
- **'invert'**: inverts the input image.
- **'opacity'**: sets the opacity of the image.
- **'saturate'**: sets the saturation of the image.
- **'sepia'**: converts the image to dark brown.
Default value: **'none'**
Since API version 9, this API is supported in ArkTS widgets.| > **NOTE** > For **fillStyle**, **shadowColor**, and **strokeStyle**, the value format of the string type is 'rgb(255, 255, 255)', 'rgba(255, 255, 255, 1.0)', '\#FFFFFF'. @@ -706,7 +709,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ------ | ------ | ---- | ---- | ------------- | | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle.| | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle.| @@ -755,7 +758,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ------ | ------ | ---- | ---- | ------------ | | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle.| | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle.| @@ -804,7 +807,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ------ | ------ | ---- | ---- | ------------- | | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle.| | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle.| @@ -855,7 +858,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | -------- | ------ | ---- | ---- | --------------- | | text | string | Yes | "" | Text to draw. | | x | number | Yes | 0 | X-coordinate of the lower left corner of the text.| @@ -905,7 +908,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | -------- | ------ | ---- | ---- | --------------- | | text | string | Yes | "" | Text to draw. | | x | number | Yes | 0 | X-coordinate of the lower left corner of the text.| @@ -955,14 +958,14 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | ---------- | | text | string | Yes | "" | Text to be measured.| **Return value** -| Type | Description | -| ----------- | ------------------------------------------------------------ | +| Type | Description | +| ----------- | ---------------------------------------- | | TextMetrics | **TextMetrics** object.
Since API version 9, this API is supported in ArkTS widgets.| **TextMetrics** attributes @@ -1027,7 +1030,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ---------------------------------------- | ---- | ---- | ------------ | | path | [Path2D](ts-components-canvas-path2d.md) | No | null | A **Path2D** path to draw.| @@ -1123,7 +1126,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | --------- | | x | number | Yes | 0 | X-coordinate of the target position.| | y | number | Yes | 0 | Y-coordinate of the target position.| @@ -1173,7 +1176,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | --------- | | x | number | Yes | 0 | X-coordinate of the target position.| | y | number | Yes | 0 | Y-coordinate of the target position.| @@ -1268,16 +1271,16 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---------- | ---------------------------------------- | ---- | ---- | ---------------------------------------- | | image | [ImageBitmap](ts-components-canvas-imagebitmap.md) | Yes | null | Source image. For details, see **ImageBitmap**. | | repetition | string | Yes | "" | Repetition mode. The value can be **'repeat'**, **'repeat-x'**, **'repeat-y'**, **'no-repeat'**, **'clamp'**, or **'mirror'**.| **Return value** -| Type | Description | -| ------------------------------- | ----------------------- | -| [CanvasPattern](#canvaspattern) | Created pattern for image filling based on a specified source image and repetition mode.| +| Type | Description | +| ---------------------------------------- | ----------------------- | +| [CanvasPattern](ts-components-canvas-canvaspattern.md#canvaspattern) | Created pattern for image filling based on a specified source image and repetition mode.| **Example** @@ -1324,7 +1327,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | -------------- | | cp1x | number | Yes | 0 | X-coordinate of the first parameter of the bezier curve.| | cp1y | number | Yes | 0 | Y-coordinate of the first parameter of the bezier curve.| @@ -1378,7 +1381,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | ----------- | | cpx | number | Yes | 0 | X-coordinate of the bezier curve parameter.| | cpy | number | Yes | 0 | Y-coordinate of the bezier curve parameter.| @@ -1430,7 +1433,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---------------- | ------- | ---- | ----- | ---------- | | x | number | Yes | 0 | X-coordinate of the center point of the arc.| | y | number | Yes | 0 | Y-coordinate of the center point of the arc.| @@ -1483,7 +1486,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ------ | ------ | ---- | ---- | --------------- | | x1 | number | Yes | 0 | X-coordinate of the first point on the arc.| | y1 | number | Yes | 0 | Y-coordinate of the first point on the arc.| @@ -1535,16 +1538,16 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | -| ---------------- | ------- | ---- | ----- | ----------------- | -| x | number | Yes | 0 | X-coordinate of the ellipse center. | -| y | number | Yes | 0 | Y-coordinate of the ellipse center. | -| radiusX | number | Yes | 0 | Ellipse radius on the x-axis. | -| radiusY | number | Yes | 0 | Ellipse radius on the y-axis. | -| rotation | number | Yes | 0 | Rotation angle of the ellipse. The unit is radian. | -| startAngle | number | Yes | 0 | Angle of the start point for drawing the ellipse. The unit is radian.| -| endAngle | number | Yes | 0 | Angle of the end point for drawing the ellipse. The unit is radian.| -| counterclockwise | boolean | No | false | Whether to draw the ellipse counterclockwise.
**true**: Draw the ellipse counterclockwise.
**false**: Draw the ellipse clockwise. | +| Name | Type | Mandatory | Default Value | Description | +| ---------------- | ------- | ---- | ----- | ---------------------------------------- | +| x | number | Yes | 0 | X-coordinate of the ellipse center. | +| y | number | Yes | 0 | Y-coordinate of the ellipse center. | +| radiusX | number | Yes | 0 | Ellipse radius on the x-axis. | +| radiusY | number | Yes | 0 | Ellipse radius on the y-axis. | +| rotation | number | Yes | 0 | Rotation angle of the ellipse. The unit is radian. | +| startAngle | number | Yes | 0 | Angle of the start point for drawing the ellipse. The unit is radian. | +| endAngle | number | Yes | 0 | Angle of the end point for drawing the ellipse. The unit is radian. | +| counterclockwise | boolean | No | false | Whether to draw the ellipse counterclockwise.
**true**: Draw the ellipse counterclockwise.
**false**: Draw the ellipse clockwise.| **Example** @@ -1589,7 +1592,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | ------------- | | x | number | Yes | 0 | X-coordinate of the upper left corner of the rectangle.| | y | number | Yes | 0 | Y-coordinate of the upper left corner of the rectangle.| @@ -1639,7 +1642,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | -------- | -------------- | ---- | --------- | ---------------------------------------- | | fillRule | CanvasFillRule | No | "nonzero" | Rule by which to determine whether a point is inside or outside the area to fill.
The options are **"nonzero"** and **"evenodd"**.| @@ -1682,7 +1685,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | -------- | -------------- | ---- | --------- | ---------------------------------------- | | path | Path2D | Yes | | A **Path2D** path to fill. | | fillRule | CanvasFillRule | No | "nonzero" | Rule by which to determine whether a point is inside or outside the area to fill.
The options are **"nonzero"** and **"evenodd"**.| @@ -1741,7 +1744,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | -------- | -------------- | ---- | --------- | ---------------------------------------- | | fillRule | CanvasFillRule | No | "nonzero" | Rule by which to determine whether a point is inside or outside the area to clip.
The options are **"nonzero"** and **"evenodd"**.| @@ -1789,9 +1792,9 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | -------- | -------------- | ---- | --------- | ---------------------------------------- | -| path | Path2D | Yes | | A **Path2D** path to clip.| +| path | Path2D | Yes | | A **Path2D** path to clip. | | fillRule | CanvasFillRule | No | "nonzero" | Rule by which to determine whether a point is inside or outside the area to clip.
The options are **"nonzero"** and **"evenodd"**.| **Example** @@ -1841,15 +1844,77 @@ Since API version 9, this API is supported in ArkTS widgets. filter(filter: string): void -Sets a filter for the image on the canvas. This API is a void API. +Sets a filter for the image on the canvas. Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | -| ------ | ------ | ---- | ---- | ------------ | -| filter | string | Yes | - | Functions that accept various filter effects.| +| Name | Type | Mandatory | Default Value | Description | +| ------ | ------ | ---- | ---- | ---------------------------------------- | +| filter | string | Yes | - | Functions that accept various filter effects. Available values are as follows:
- **'none'**: no filter effect.
- **'blur'**: applies the Gaussian blur for the image.
- **'brightness'**: applies a linear multiplication to the image to make it look brighter or darker.
- **'contrast'**: adjusts the image contrast.
- **'grayscale'**: converts the image to a grayscale image.
- **'hue-rotate'**: applies hue rotation to the image.
- **'invert'**: inverts the input image.
- **'opacity'**: sets the opacity of the image.
- **'saturate'**: sets the saturation of the image.
- **'sepia'**: converts the image to dark brown.
Default value: **'none'**| + +**Example** +```ts + // xxx.ets + @Entry + @Component + struct FilterDemoOff { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(600, 600, this.settings) + private img:ImageBitmap = new ImageBitmap("common/images/example.jpg"); + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offctx = this.offContext + let img = this.img + + offctx.drawImage(img, 0, 0, 100, 100); + + offctx.filter = 'grayscale(50%)'; + offctx.drawImage(img, 100, 0, 100, 100); + + offctx.filter = 'sepia(60%)'; + offctx.drawImage(img, 200, 0, 100, 100); + + offctx.filter = 'saturate(30%)'; + offctx.drawImage(img, 0, 100, 100, 100); + + offctx.filter = 'hue-rotate(90degree)'; + offctx.drawImage(img, 100, 100, 100, 100); + + offctx.filter = 'invert(100%)'; + offctx.drawImage(img, 200, 100, 100, 100); + + offctx.filter = 'opacity(25%)'; + offctx.drawImage(img, 0, 200, 100, 100); + + offctx.filter = 'brightness(0.4)'; + offctx.drawImage(img, 100, 200, 100, 100); + + offctx.filter = 'contrast(200%)'; + offctx.drawImage(img, 200, 200, 100, 100); + + offctx.filter = 'blur(5px)'; + offctx.drawImage(img, 0, 300, 100, 100); + + var image = offctx.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } + } +``` + +![filterDemo](figures/filterDemo.jpeg) ### getTransform @@ -1860,6 +1925,11 @@ Obtains the current transformation matrix being applied to the context. This API Since API version 9, this API is supported in ArkTS widgets. +**Return value** + +| Type | Description | +| ---------------------------------------- | ----- | +| [Matrix2D](ts-components-canvas-matrix2d.md#Matrix2D) | Matrix object.| ### resetTransform @@ -1874,10 +1944,48 @@ Since API version 9, this API is supported in ArkTS widgets. direction(direction: CanvasDirection): void -Sets the text direction for drawing text. This API is a void API. +Sets the text direction for drawing text. Since API version 9, this API is supported in ArkTS widgets. +**Example** +```ts + // xxx.ets + @Entry + @Component + struct DirectionDemoOff { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(600, 600, this.settings) + + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offctx = this.offContext + offctx.font = '48px serif'; + offctx.textAlign = 'start' + offctx.fillText("Hi ltr!", 200, 50); + + offctx.direction = "rtl"; + offctx.fillText("Hi rtl!", 200, 100); + + var image = offctx.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } + } +``` + +![directionDemo](figures/directionDemo.jpeg) + + ### rotate @@ -1889,7 +1997,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ----- | ------ | ---- | ---- | ---------------------------------------- | | angle | number | Yes | 0 | Clockwise rotation angle. You can use **Math.PI / 180** to convert the angle to a radian.| @@ -1936,7 +2044,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | ----------- | | x | number | Yes | 0 | Horizontal scale factor.| | y | number | Yes | 0 | Vertical scale factor.| @@ -1985,7 +2093,6 @@ Defines a transformation matrix. To transform a graph, you only need to set para Since API version 9, this API is supported in ArkTS widgets. > **NOTE** -> > The following formulas calculate coordinates of the transformed graph. **x** and **y** represent coordinates before transformation, and **x'** and **y'** represent coordinates after transformation. > > - x' = scaleX \* x + skewY \* y + translateX @@ -1994,7 +2101,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | -------------------- | | a | number | Yes | 0 | X-axis scale. | | b | number | Yes | 0 | X-axis skew. | @@ -2052,7 +2159,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | -------------------- | | a | number | Yes | 0 | X-axis scale. | | b | number | Yes | 0 | X-axis skew. | @@ -2107,7 +2214,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | -------- | | x | number | Yes | 0 | X-axis translation.| | y | number | Yes | 0 | Y-axis translation.| @@ -2160,7 +2267,7 @@ Since API version 9, this API is supported in ArkTS widgets, except that **Pixel **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ----- | ---------------------------------------- | ---- | ---- | ----------------------------- | | image | [ImageBitmap](ts-components-canvas-imagebitmap.md) or [PixelMap](../apis/js-apis-image.md#pixelmap7)| Yes | null | Image resource. For details, see **ImageBitmap** or **PixelMap**.| | sx | number | No | 0 | X-coordinate of the upper left corner of the rectangle used to crop the source image. | @@ -2229,7 +2336,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | --------- | ---------------------------------------- | ---- | ---- | ---------------- | | imagedata | [ImageData](ts-components-canvas-imagedata.md) | Yes | null | **ImageData** object to copy.| @@ -2247,7 +2354,7 @@ Obtains the **[PixelMap](../apis/js-apis-image.md#pixelmap7)** object created wi **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | --------------- | | sx | number | Yes | 0 | X-coordinate of the upper left corner of the output area.| | sy | number | Yes | 0 | Y-coordinate of the upper left corner of the output area.| @@ -2268,7 +2375,7 @@ Draws the input [PixelMap](../apis/js-apis-image.md#pixelmap7) object on the can **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | --------------- | | sx | number | Yes | 0 | X-coordinate of the upper left corner of the output area.| | sy | number | Yes | 0 | Y-coordinate of the upper left corner of the output area.| @@ -2292,7 +2399,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | --------------- | | sx | number | Yes | 0 | X-coordinate of the upper left corner of the output area.| | sy | number | Yes | 0 | Y-coordinate of the upper left corner of the output area.| @@ -2343,9 +2450,9 @@ Since API version 9, this API is supported in ArkTS widgets. ### putImageData -putImageData(imageData: Object, dx: number, dy: number): void +putImageData(imageData: Object, dx: number | string, dy: number | string): void -putImageData(imageData: Object, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth?: number, dirtyHeight: number): void +putImageData(imageData: Object, dx: number | string, dy: number | string, dirtyX: number | string, dirtyY: number | string, dirtyWidth?: number | string, dirtyHeight: number | string): void Puts an **[ImageData](ts-components-canvas-imagedata.md)** object onto a rectangular area on the canvas. @@ -2353,15 +2460,15 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | -| ----------- | ------ | ---- | ------------ | ----------------------------- | -| imagedata | Object | Yes | null | **ImageData** object with pixels to put onto the canvas. | -| dx | number | Yes | 0 | X-axis offset of the rectangular area on the canvas. | -| dy | number | Yes | 0 | Y-axis offset of the rectangular area on the canvas. | -| dirtyX | number | No | 0 | X-axis offset of the upper left corner of the rectangular area relative to that of the source image.| -| dirtyY | number | No | 0 | Y-axis offset of the upper left corner of the rectangular area relative to that of the source image.| -| dirtyWidth | number | No | Width of the **ImageData** object| Width of the rectangular area to crop the source image. | -| dirtyHeight | number | No | Height of the **ImageData** object| Height of the rectangular area to crop the source image. | +| Name | Type | Mandatory | Default Value | Description | +| ----------- | ---------------------------------------- | ---- | ------------ | ----------------------------- | +| imagedata | Object | Yes | null | **ImageData** object with pixels to put onto the canvas. | +| dx | number \| string10+ | Yes | 0 | X-axis offset of the rectangular area on the canvas. | +| dy | number \| string10+ | Yes | 0 | Y-axis offset of the rectangular area on the canvas. | +| dirtyX | number \| string10+ | No | 0 | X-axis offset of the upper left corner of the rectangular area relative to that of the source image.| +| dirtyY | number \| string10+ | No | 0 | Y-axis offset of the upper left corner of the rectangular area relative to that of the source image.| +| dirtyWidth | number \| string10+ | No | Width of the **ImageData** object| Width of the rectangular area to crop the source image. | +| dirtyHeight | number \| string10+ | No | Height of the **ImageData** object| Height of the rectangular area to crop the source image. | **Example** @@ -2410,7 +2517,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Description | +| Name | Type | Description | | -------- | -------- | ------------------- | | segments | number[] | An array of numbers that specify distances to alternately draw a line and a gap.| @@ -2558,16 +2665,50 @@ Since API version 9, this API is supported in ArkTS widgets. imageSmoothingQuality(quality: imageSmoothingQuality) -Sets the quality of image smoothing. This API is a void API. +Sets the quality of image smoothing. Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Description | +| Name | Type | Description | | ------- | --------------------- | ---------------------------------------- | -| quality | imageSmoothingQuality | Quality of image smoothing. The value can be **'low'**, **'medium'**,or **'high'**.| +| quality | imageSmoothingQuality | Quality of image smoothing.
- **'low'**: low quality.
- **'medium'**: medium quality.
- **'high'**: high quality.| + +**Example** +```ts + // xxx.ets + @Entry + @Component + struct ImageSmoothingQualityDemoOff { + private settings: RenderingContextSettings = new RenderingContextSettings(true); + private context: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.settings); + private offContext: OffscreenCanvasRenderingContext2D = new OffscreenCanvasRenderingContext2D(600, 600, this.settings) + private img:ImageBitmap = new ImageBitmap("common/images/example.jpg"); + build() { + Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Canvas(this.context) + .width('100%') + .height('100%') + .backgroundColor('#ffff00') + .onReady(() =>{ + let offctx = this.offContext + offctx.imageSmoothingEnabled = true + offctx.imageSmoothingQuality = 'high' + offctx.drawImage(this.img, 0, 0, 400, 200) + + var image = offctx.transferToImageBitmap() + this.context.transferFromImageBitmap(image) + }) + } + .width('100%') + .height('100%') + } + } +``` + +![ImageSmoothingQualityDemo](figures/ImageSmoothingQualityDemo.jpeg) ### transferToImageBitmap @@ -2715,7 +2856,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | -------- | | x0 | number | Yes | 0 | X-coordinate of the start point.| | y0 | number | Yes | 0 | Y-coordinate of the start point.| @@ -2769,7 +2910,7 @@ Since API version 9, this API is supported in ArkTS widgets. **Parameters** -| Name | Type | Mandatory | Default Value | Description | +| Name | Type | Mandatory | Default Value | Description | | ---- | ------ | ---- | ---- | ----------------- | | x0 | number | Yes | 0 | X-coordinate of the center of the start circle. | | y0 | number | Yes | 0 | Y-coordinate of the center of the start circle. | @@ -2822,11 +2963,11 @@ Creates a conic gradient. **Parameters** -| Name | Type | Mandatory| Default Value| Description | -| ---------- | ------ | ---- | ------ | ------------------------------------------------------------ | -| startAngle | number | Yes | 0 | Angle at which the gradient starts, in radians. The angle measurement starts horizontally from the right side of the center and moves clockwise.| -| x | number | Yes | 0 | X-coordinate of the center of the conic gradient, in vp. | -| y | number | Yes | 0 | Y-coordinate of the center of the conic gradient, in vp. | +| Name | Type | Mandatory | Default Value | Description | +| ---------- | ------ | ---- | ---- | ----------------------------------- | +| startAngle | number | Yes | 0 | Angle at which the gradient starts, in radians. The angle measurement starts horizontally from the right side of the center and moves clockwise.| +| x | number | Yes | 0 | X-coordinate of the center of the conic gradient, in vp. | +| y | number | Yes | 0 | Y-coordinate of the center of the conic gradient, in vp. | **Example** @@ -2864,9 +3005,3 @@ struct OffscreenCanvasConicGradientPage { ``` ![en-us_image_0000001239032419](figures/en-us_image_0000001239032420.png) - -## CanvasPattern - -Defines an object created using the **[createPattern](#createpattern)** API. - -Since API version 9, this API is supported in ArkTS widgets. diff --git a/en/application-dev/reference/arkui-ts/ts-universal-attributes-click-effect.md b/en/application-dev/reference/arkui-ts/ts-universal-attributes-click-effect.md new file mode 100644 index 0000000000000000000000000000000000000000..ffcc737568abcbe244bef30a33e78248161bc8a4 --- /dev/null +++ b/en/application-dev/reference/arkui-ts/ts-universal-attributes-click-effect.md @@ -0,0 +1,95 @@ +# Click Effect + +You can set the click effect for a component to define how it behaves when clicked. + +> **NOTE** +> +> The APIs of this module are supported since API version 10. Updates will be marked with a superscript to indicate their earliest API version. + + +### Attributes + +| Name | Type | Description | +| ----------- | ------------------- | ------------------------------------------------------------ | +| clickEffect | [ClickEffect](#clickeffect) \| null | Click effect of the component.
**NOTE**
The click effect is revoked when this attribute is set to **null**.| + +### ClickEffect + +| Name | Type | Mandatory| Description | +| ----- | ----------------------------------------------------------- | ---- | ------------------------------------------------------------ | +| level | [ClickEffectLevel](ts-appendix-enums.md#clickeffectlevel10) | Yes | Click effect of the component.
Default value: **ClickEffectLevel.LIGHT**| +| scale | number | No | Zoom ratio. This parameter works based on the setting of **ClickEffectLevel**.
**NOTE**
The default value of this parameter varies by the value of **level**.
- If **level** is set to **ClickEffectLevel.LIGHT**, the default value is **0.90**.
- If **level** is set to **ClickEffectLevel.MIDDLE** or **ClickEffectLevel.HEAVY**, the default value is **0.95**. | + +### Example + +```ts +// xxx.ets +@Entry +@Component +struct ToggleExample { + build() { + Column({ space: 10 }) { + Text('type: Switch').fontSize(12).fontColor(0xcccccc).width('90%') + Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) { + Toggle({ type: ToggleType.Switch, isOn: false }) + .clickEffect({level:ClickEffectLevel.LIGHT}) + .selectedColor('#007DFF') + .switchPointColor('#FFFFFF') + .onChange((isOn: boolean) => { + console.info('Component status:' + isOn) + }) + + Toggle({ type: ToggleType.Switch, isOn: true }) + .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5}) + .selectedColor('#007DFF') + .switchPointColor('#FFFFFF') + .onChange((isOn: boolean) => { + console.info('Component status:' + isOn) + }) + } + + Text('type: Checkbox').fontSize(12).fontColor(0xcccccc).width('90%') + Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) { + Toggle({ type: ToggleType.Checkbox, isOn: false }) + .clickEffect({level:ClickEffectLevel.MIDDLE}) + .size({ width: 20, height: 20 }) + .selectedColor('#007DFF') + .onChange((isOn: boolean) => { + console.info('Component status:' + isOn) + }) + + Toggle({ type: ToggleType.Checkbox, isOn: true }) + .clickEffect({level:ClickEffectLevel.MIDDLE, scale: 0.5}) + .size({ width: 20, height: 20 }) + .selectedColor('#007DFF') + .onChange((isOn: boolean) => { + console.info('Component status:' + isOn) + }) + } + + Text('type: Button').fontSize(12).fontColor(0xcccccc).width('90%') + Flex({ justifyContent: FlexAlign.SpaceEvenly, alignItems: ItemAlign.Center }) { + Toggle({ type: ToggleType.Button, isOn: false }) { + Text('status button').fontColor('#182431').fontSize(12) + }.width(106) + .clickEffect({level:ClickEffectLevel.HEAVY}) + .selectedColor('rgba(0,125,255,0.20)') + .onChange((isOn: boolean) => { + console.info('Component status:' + isOn) + }) + + Toggle({ type: ToggleType.Button, isOn: true }) { + Text('status button').fontColor('#182431').fontSize(12) + }.width(106) + .clickEffect({level:ClickEffectLevel.HEAVY, scale: 0.5}) + .selectedColor('rgba(0,125,255,0.20)') + .onChange((isOn: boolean) => { + console.info('Component status:' + isOn) + }) + } + }.width('100%').padding(24) + } +} +``` + +![clickeffect](figures/clickeffect.gif) diff --git a/en/application-dev/reference/arkui-ts/ts-universal-attributes-obscured.md b/en/application-dev/reference/arkui-ts/ts-universal-attributes-obscured.md new file mode 100644 index 0000000000000000000000000000000000000000..873beb3dfae183a46d0ee6b48cb6172fa8fa8218 --- /dev/null +++ b/en/application-dev/reference/arkui-ts/ts-universal-attributes-obscured.md @@ -0,0 +1,57 @@ +# Obscuring + +When needed, you can obscure content of a component. + +> **NOTE** +> +> The APIs of this module are supported since API version 10. Updates will be marked with a superscript to indicate their earliest API version. + + +## Attributes + + +| Name | Type | Description | +| -----| ------------------------------------------ | ------------------------------------ | +| obscured | Array<[ObscuredReasons](ts-appendix-enums.md#obscuredreasons10)> | How the component content is obscured.
Default value: **[]**
This API is supported in ArkTS widgets.
This API only works for the [\](ts-basic-components-image.md) and [\](ts-basic-components-text.md) components.
**NOTE**
To obscure an image when it is being loaded, you must set the width and height of the **\** component. | + +## Example + +```ts +// xxx.ets +@Entry +@Component +struct ObscuredExample { + build() { + Row() { + Column() { + Text('Text not set obscured attribute').fontSize(10).fontColor(Color.Black) + Text('This is an example for text obscured attribute.') + .fontSize(30) + .width('600px') + .fontColor(Color.Black) + .border({ width: 1 }) + Text('Image not set obscured attribute').fontSize(10).fontColor(Color.Black) + Image($r('app.media.icon')) + .width('200px') + .height('200px') + Text('Text set obscured attribute').fontSize(10).fontColor(Color.Black) + Text('This is an example for text obscured attribute.') + .fontSize(30) + .width('600px') + .fontColor(Color.Black) + .border({ width: 1 }) + .obscured([ObscuredReasons.PLACEHOLDER]) + Text('Image set obscured attribute').fontSize(10).fontColor(Color.Black) + Image($r('app.media.icon')) + .width('200px') + .height('200px') + .obscured([ObscuredReasons.PLACEHOLDER]) + } + .width('100%') + } + .height('100%') + } +} +``` + +![obscured](figures/obscured.png) diff --git a/en/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md b/en/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md index d76050cf53ac8d98fe0426ea6a3a4e2a857fca15..37581d1f6c53d2b01266ee7930ea34bfeebbc5a4 100644 --- a/en/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md +++ b/en/application-dev/reference/arkui-ts/ts-universal-attributes-popup.md @@ -29,8 +29,8 @@ You can bind a popup to a component, specifying its content, interaction logic, | messageOptions10+ | [PopupMessageOptions](#popupmessageoptions10) | No | Parameters of the popup message. | | targetSpace10+ | [Length](ts-types.md#length) | No | Space between the popup and the target. | | placement10+ | [Placement](ts-appendix-enums.md#placement8) | No | Position of the popup relative to the target. The default value is **Placement.Bottom**.
If both **placementOnTop** and **placement** are set, the latter prevails.| -| offset10+ | [Position](ts-types.md#position8) | No | Offset of the popup relative to the display position specified by **placement**. | -| enableArrow10+ | boolean | No | Whether to display the arrow.
Default value: **true**| +| offset10+ | [Position](ts-types.md#position8) | No | Offset of the popup relative to the display position specified by **placement**.
**NOTE**
This parameter cannot be set in percentage.| +| enableArrow10+ | boolean | No | Whether to display the arrow.
Default value: **true**| ## PopupMessageOptions10+ @@ -53,7 +53,7 @@ You can bind a popup to a component, specifying its content, interaction logic, | maskColor(deprecated) | [ResourceColor](ts-types.md#resourcecolor) | No | Color of the popup mask.
**NOTE**
This parameter is deprecated since API version 10. You are advised to use **mask** instead.| | mask10+ | boolean \| [ResourceColor](ts-types.md#resourcecolor) | No | Whether to apply a mask to the popup. The value **true** means to apply a transparent mask to the popup, **false** means not to apply a mask to the popup, and a color value means to apply a mask in the corresponding color to the popup.| | targetSpace10+ | [Length](ts-types.md#length) | No | Space between the popup and the target. | -| offset10+ | [Position](ts-types.md#position8) | No | Offset of the popup relative to the display position specified by placement.| +| offset10+ | [Position](ts-types.md#position8) | No | Offset of the popup relative to the display position specified by **placement**.
**NOTE**
This parameter cannot be set in percentage.| ## Example ```ts diff --git a/en/application-dev/reference/errorcodes/errorcode-DistributedSchedule.md b/en/application-dev/reference/errorcodes/errorcode-DistributedSchedule.md index 62539888a7dc19cae0adf2ea3010affb637e9a96..30cf67c4d738f2320638b229148f374db36e02f1 100644 --- a/en/application-dev/reference/errorcodes/errorcode-DistributedSchedule.md +++ b/en/application-dev/reference/errorcodes/errorcode-DistributedSchedule.md @@ -113,7 +113,7 @@ Failed to get the missionInfo of the specified missionId. **Possible Causes** The possible causes are as follows: -1. The mission ID is incorrect. +1. An incorrect mission ID is passed in. 2. The mission information corresponding to the mission ID does not exist. **Solution** @@ -193,6 +193,26 @@ The continuation task has been initiated and is not complete yet. Wait until the continuation task is complete. +## 16300507 Failed to get the missionInfo of the specified bundleName. + +**Description** + +This error code is reported when calling the **distributedMissionManager.continueMission** API with **bundleName** specified fails. + +**Error Message** + +Failed to get the missionInfo of the specified bundle name. + +**Possible Causes** + +The possible causes are as follows: +1. An incorrect bundle name is passed in. +2. The mission information corresponding to the bundle name does not exist. + +**Solution** + +Verify the bundle name. + ## 3 Failed to flatten the object. **Description** diff --git a/en/application-dev/reference/errorcodes/errorcode-zlib.md b/en/application-dev/reference/errorcodes/errorcode-zlib.md index a2197400315b4e60a905121f3a665d5ac127c7f3..b599f52506b974aa1bc8c68c6eeb8a56fa8728b2 100644 --- a/en/application-dev/reference/errorcodes/errorcode-zlib.md +++ b/en/application-dev/reference/errorcodes/errorcode-zlib.md @@ -21,7 +21,8 @@ When the **compressFile()** API is called, the file to compress does not exist. **Solution** 1. Make sure the source file exists. -2. Make sure the path of the source file exists and the path is the correct sandbox path. +2. Ensure that the source file is in ZIP format. +3. Make sure the path of the source file exists and the path is the correct sandbox path. ## 900002 Invalid Destination File @@ -61,5 +62,5 @@ This error code is reported when the format of the source file is incorrect or t **Solution** -1. Check whether the source file format is ZIP. +1. Check whether the source file is in ZIP format. 2. Check whether the source file is complete. If the file is downloaded from the network, ensure that the file download is complete before calling the **decompressFile** API. diff --git a/en/application-dev/security/huks-appendix.md b/en/application-dev/security/huks-appendix.md index 11b1ce8f671103822f4954dbeac2bc6e2eca1bc2..b6371b6bb7d2e8fd9e70011c687989a911f7f51a 100644 --- a/en/application-dev/security/huks-appendix.md +++ b/en/application-dev/security/huks-appendix.md @@ -19,7 +19,7 @@ This document provides the HUKS specifications. Mandatory specifications are alg | ECC | 8+ | 256, 384, 521|Yes| | Ed25519 | 8+ | 256 |Yes| | X25519 | 8+ | 256 |Yes| -| DSA | 8+ | An integer multiple of 8, ranging from 8 to 1024 (inclusive) |No| +| DSA | 8+ | An integer multiple of 8, ranging from 512 to 1024 (inclusive) |No| | DH | 8+ | 2048 |Yes| | DH | 8+ | 3072, 4096 |No| | SM2 | 9+ | 256 |Yes| @@ -54,7 +54,7 @@ This document provides the HUKS specifications. Mandatory specifications are alg | ED25519/NoDigest | 8+ | If **NoDigest** is used, **TAG HuksKeyDigest.HUKS_DIGEST_NONE** must be set.|Yes| | SM2/SM3|9+ | |Yes| -### key Agreement Algorithms +### Key Agreement Algorithms | Algorithm | API Level| Remarks | Mandatory| | ------ | :-----------: | ------------------------------ |:-----------: | @@ -148,7 +148,7 @@ let rsa2048KeyPairMaterial = new Uint8Array([ The key algorithm is a value of [HuksKeyAlg](../reference/apis/js-apis-huks.md#hukskeyalg). - **RSA Key Pair Material Format** - | Key Algorithm| Key Size| Modulus n Length Ln| Public Key Exponent e Length Le | Private Key Exponent d Length Ld| n | e | d | + | Key Algorithm| Key Size| Modulus n Length Ln| Public Key Exponent e Length Le| Private Key Exponent d Length Ld| n | e | d | | :----: |:----:|:----:|:----:|:----:|:----:|:----:|:----:| |4 bytes|4 bytes|4 bytes|4 bytes|4 bytes|Ln bytes|Le bytes|Ld bytes| diff --git a/en/application-dev/security/huks-guidelines.md b/en/application-dev/security/huks-guidelines.md index 60839bf7b35ee9043fa8fb70c140459e51d6356f..8339804b79640b69bd059c9ddaa18fb101e8f457 100644 --- a/en/application-dev/security/huks-guidelines.md +++ b/en/application-dev/security/huks-guidelines.md @@ -224,14 +224,14 @@ You need to use the APIs listed in the following table in sequence. > >The public key plaintext material returned by **exportKeyItem()** is encapsulated in X.509 format, and the key material to be imported by **importWrappedKeyItem()** must be encapsulated in **LengthData-Data** format. Specifically, the application needs to request a Uint8Array and encapsulate the Uint8Array in the sequence listed in the following table. -**Table 2** Format of the wrapped key material +**Table 2** Format of the encrypted key material -| Content| Public Key Length (Lpk2)| Public Key (pk2) | k2 AAD Length (LAAD2) | k2 AAD (AAD2) | k2 Nonce Length (LNonce2) | k2 Nonce (Nonce2) | +| Content| Public Key Length (Lpk2)| Public Key (pk2)| k2 AAD Length (LAAD2)| k2 AAD (AAD2)| k2 Nonce Length (LNonce2)| k2 Nonce (Nonce2)| | :--: |:----:|:----: |:----: | :----: | :----:|:----:| |Length| 4 bytes|Lpk2 bytes| 4 bytes| LAAD2 bytes| 4 bytes| LNonce2 bytes| -| Content| k2 AEAD Length (LAEAD2) | k2 AEAD (AEAD2) | k3 Ciphertext Length (Lk3_enc) | k3 Ciphertext (k3_enc) | k3 AAD Length (LAAD3) | k3 AAD (AAD3) | +| Content| k2 AEAD Length (LAEAD2)| k2 AEAD (AEAD2)| k3 Ciphertext Length (Lk3_enc)| k3 Ciphertext (k3_enc)| k3 AAD Length (LAAD3)| k3 AAD (AAD3)| |Length| 4 bytes|LAEAD2 bytes| 4 bytes| Lk3_enc bytes| 4 bytes| LAAD3 bytes| -| Content| k3 Nonce Length (LNonce3) | k3 Nonce (Nonce3) | k3 AEAD Length (LAEAD3) | k3 AEAD (AEAD3) | Length of **k1'_size** (Lk1'_size) | Key Plaintext Material Length (k1'_size) | +| Content| k3 Nonce Length (LNonce3)| k3 Nonce (Nonce3)| k3 AEAD Length (LAEAD3)| k3 AEAD (AEAD3)| Length of **k1'_size** (Lk1'_size)| Key Plaintext Material Length (k1'_size)| |Length| 4 bytes|LNonce3 bytes| 4 bytes| LAEAD3 bytes| 4 bytes| Lk1'_size bytes| |Content|k1' Ciphertext Length (Lk1'_enc)| k1' ciphertext (k1'_enc) | | | | | |Length| 4 bytes|Lk1'_enc bytes| | | | | @@ -961,7 +961,7 @@ struct Index { ### Key Agreement -You are advised to pass in [HuksKeyStorageType](../reference/apis/js-apis-huks.md#hukskeystoragetype) to specify the storage type in key agreement. From API version 10, only **HUKS_STORAGE_ONLY_USED_IN_HUKS** or **HUKS_STORAGE_KEY_EXPORT_ALLOWED** can be used for key agreement. If **HuksKeyStorageType** is not passed in, the key can be stored and exported by default, which poses security risks. +You are advised to pass in [HuksKeyStorageType](../reference/apis/js-apis-huks.md#hukskeystoragetype) to specify the storage type in key agreement. From API version 10, only **HUKS_STORAGE_ONLY_USED_IN_HUKS** or **HUKS_STORAGE_KEY_EXPORT_ALLOWED** can be used. If **HuksKeyStorageType** is not passed in, the key can be stored or exported by default, which poses security risks. ```ts /* @@ -1332,7 +1332,7 @@ async function testAgree() { ### Key Derivation -You are advised to pass in [HuksKeyStorageType](../reference/apis/js-apis-huks.md#hukskeystoragetype) for key derivation. From API version 10, only **HUKS_STORAGE_ONLY_USED_IN_HUKS** or **HUKS_STORAGE_KEY_EXPORT_ALLOWED** can be used for key derivation. If **HuksKeyStorageType** is not passed in, the key can be stored and exported by default, which poses security risks. +You are advised to pass in [HuksKeyStorageType](../reference/apis/js-apis-huks.md#hukskeystoragetype) to specify the storage type in key derivation. From API version 10, only **HUKS_STORAGE_ONLY_USED_IN_HUKS** or **HUKS_STORAGE_KEY_EXPORT_ALLOWED** can be used. If **HuksKeyStorageType** is not passed in, the key can be stored or exported by default, which poses security risks. ```ts /* @@ -1685,33 +1685,31 @@ When a key is generated or imported, [HuksUserAuthType](../reference/apis/js-api **Table 3** User authentication types -| Name | Value | Description | -| ------------------------------- | ------ | ------------------------------------------------------------ | -| HUKS_USER_AUTH_TYPE_FINGERPRINT | 0x0001 | Fingerprint authentication, which can be enabled with facial authentication and PIN authentication at the same time. | -| HUKS_USER_AUTH_TYPE_FACE | 0x0002 | Facial authentication, whch can be enabled with fingerprint authentication and PIN authentication at the same time. | -| HUKS_USER_AUTH_TYPE_PIN | 0x0004 | PIN authentication, which can be enabled with fingerprint authentication and facial authenticationat the same time. | +| Name | Value | Description | +| ------------------------------- |---|------------------------ | +| HUKS_USER_AUTH_TYPE_FINGERPRINT |0x0001 | Fingerprint authentication, which can be enabled with facial authentication and PIN authentication at the same time. | +| HUKS_USER_AUTH_TYPE_FACE |0x0002 | Facial authentication, whch can be enabled with fingerprint authentication and PIN authentication at the same time.| +| HUKS_USER_AUTH_TYPE_PIN |0x0004 | PIN authentication, which can be enabled with fingerprint authentication and facial authenticationat the same time.| **Table 4** Secure access types - -| Name | Value | Description | -| --------------------------------------- | ----- | ------------------------------------------------------------ | -| HUKS_AUTH_ACCESS_INVALID_CLEAR_PASSWORD | 1 | Invalidate the key after the screen lock password is cleared. | -| HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL | 2 | Invalidate the key after a biometric enrollment is added. The user authentication types must include the biometric authentication. | +| Name | Value | Description | +| --------------------------------------- | ---- | ------------------------------------------------ | +| HUKS_AUTH_ACCESS_INVALID_CLEAR_PASSWORD | 1 | Invalidates the key after the screen lock password is cleared. | +| HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL | 2 | Invalidates the key after a biometric enrollment is added. The user authentication types must include the biometric authentication.| **Table 5** Challenge types - -| Name | Value | Description | -| -------------------------- | ----- | ------------------------------------------------------------ | -| HUKS_CHALLENGE_TYPE_NORMAL | 0 | Normal challenge, which requires an independent user authentication for each use of the key. | -| HUKS_CHALLENGE_TYPE_CUSTOM | 1 | Custom challenge, which supports only one user authentication for multiple keys. | -| HUKS_CHALLENGE_TYPE_NONE | 2 | No challenge is required during user authentication. | +| Name | Value | Description | +| ------------------------------- | ---- | ------------------------------ | +| HUKS_CHALLENGE_TYPE_NORMAL | 0 | Normal challenge, which requires an independent user authentication for each use of the key.| +| HUKS_CHALLENGE_TYPE_CUSTOM | 1 | Custom challenge, which supports only one user authentication for multiple keys.| +| HUKS_CHALLENGE_TYPE_NONE | 2 | No challenge is required during user authentication.| > **NOTICE** > -> - The three challenge types are mutually exclusive. + > - The three challenge types are mutually exclusive. > - If the challenge type is **HUKS_CHALLENGE_TYPE_NONE**, no challenge is required. However, the key can be accessed within a specified time period (set by **HUKS_TAG_AUTH_TIMEOUT**) after a successful authentication. The maximum value of **HUKS_TAG_AUTH_TIMEOUT** is 60 seconds. -To use a key, initialize the key session, and determine whether a challenge is required based on the challenge type specified when the key is generated or imported. +To use a key, initialize the key session, and determine whether a challenge is required based on the challenge type specified when the key is generated or imported. **Table 6** APIs for using a key @@ -1719,7 +1717,7 @@ To use a key, initialize the key session, and determine whether a challenge is r | -------------------------------------- | ----------------------------| |initSession(keyAlias: string, options: HuksOptions, callback: AsyncCallback\) : void| Initializes the key session and obtains the challenge.| |updateSession(handle: number, options: HuksOptions, token: Uint8Array, callback: AsyncCallback\) : void| Operates data by segment and passes the authentication token.| -|finishSession(handle: number, options: HuksOptions, token: Uint8Array, callback: AsyncCallback\) : void| Completes the key session operation.| +|finishSession(handle: number, options: HuksOptions, token: Uint8Array, callback: AsyncCallback\) : void| Finishes the key session.| **How to Develop** @@ -1944,21 +1942,21 @@ To use a key, initialize the key session, and determine whether a challenge is r ```ts /* - *The following uses an SM4 128-bit key and callback-based APIs as an example. + * Encrypt and decrypt data using an SM4 128-bit key and return the result in a callback. */ import huks from '@ohos.security.huks'; - + /* - *Set the key alias and encapsulate the key properties. + * Set the key alias and encapsulate the key properties. */ - let srcKeyAlias = 'sm4_key_fingerprint_access'; - let IV = '1234567890123456'; - let cipherInData = 'Hks_SM4_Cipher_Test_101010101010101010110_string'; - let handle; - let fingerAuthToken; - let updateResult = new Array(); - let finishOutData; - + let srcKeyAlias = 'sm4_key_fingerprint_access'; + let IV = '1234567890123456'; + let cipherInData = 'Hks_SM4_Cipher_Test_101010101010101010110_string'; + let handle; + let fingerAuthToken; + let updateResult = new Array(); + let finishOutData; + /* Configure the key generation parameter set and key encryption parameter set. */ let propertiesEncrypt = new Array(); propertiesEncrypt[0] = { @@ -1989,7 +1987,7 @@ To use a key, initialize the key session, and determine whether a challenge is r properties: propertiesEncrypt, inData: new Uint8Array(new Array()) } - + function StringToUint8Array(str) { let arr = []; for (let i = 0, j = str.length; i < j; ++i) { @@ -1997,7 +1995,7 @@ To use a key, initialize the key session, and determine whether a challenge is r } return new Uint8Array(arr); } - + function updateSession(handle:number, huksOptions:huks.HuksOptions, token:Uint8Array, throwObject) : Promise { return new Promise((resolve, reject) => { try { @@ -2014,7 +2012,7 @@ To use a key, initialize the key session, and determine whether a challenge is r } }); } - + async function publicUpdateFunc(handle:number, token:Uint8Array, huksOptions:huks.HuksOptions) { console.info(`enter callback doUpdate`); let throwObject = {isThrow: false}; @@ -2034,7 +2032,7 @@ To use a key, initialize the key session, and determine whether a challenge is r console.error(`callback: doUpdate input arg invalid, code: ${error.code}, msg: ${error.message}`); } } - + function finishSession(handle:number, huksOptions:huks.HuksOptions, token:Uint8Array, throwObject) : Promise { return new Promise((resolve, reject) => { try { @@ -2051,7 +2049,7 @@ To use a key, initialize the key session, and determine whether a challenge is r } }); } - + async function publicFinishFunc(handle:number, token:Uint8Array, huksOptions:huks.HuksOptions) { console.info(`enter callback doFinish`); let throwObject = {isThrow: false}; @@ -2072,13 +2070,13 @@ To use a key, initialize the key session, and determine whether a challenge is r console.error(`callback: doFinish input arg invalid, code: ${error.code}, msg: ${error.message}`); } } - + async function testSm4Cipher() { encryptOptions.inData = StringToUint8Array(cipherInData); /* Pass in the authentication token. */ await publicUpdateFunc(handle, fingerAuthToken, encryptOptions); encryptUpdateResult = updateResult; - + encryptOptions.inData = new Uint8Array(new Array()); /* Pass in the authentication token. */ await publicFinishFunc(handle, fingerAuthToken, encryptOptions); @@ -2087,32 +2085,31 @@ To use a key, initialize the key session, and determine whether a challenge is r } else { console.info('test finish encrypt success'); } - } + } ``` +### Refined User Identity Authentication -### Fine-grained User Identity Authentication - -As an extension of the [Key Access Control](#key-access-control), the fine-grained access control allows secondary user identity authentication (biometric authentication and lock screen password) to be performed for key access in one or more scenarios, such as encryption, decryption, signing, signature verification, key agreement, and key derivation. For example, a service needs to use a HUKS key to encrypt the account password information. In this scenario, identity authentication is not required in encryption but required in decryption. To achieve this purpose, you can use the fine-grained user identity authentication feature provided by the HUKS. +As an extension of the Key Access Control, the refined access control allows secondary user identity authentication (biometric authentication and lock screen password) to be performed for key access in one or more scenarios, such as encryption, decryption, signing, signature verification, key agreement, and key derivation. For example, a service needs to use a HUKS key to encrypt the account password information. In this scenario, identity authentication is not required in encryption but required in decryption. To achieve this purpose, you can use the refined user identity authentication feature provided by the HUKS. **How to Develop** -1. Specify [**HUKS_TAG_KEY_AUTH_PURPOSE**](../reference/apis/js-apis-huks.md#hukstag) for key generation to allow user identity authentication to be performed when a specific algorithm is used. +1. Specify [**HUKS_TAG_KEY_AUTH_PURPOSE**](../reference/apis/js-apis-huks.md#hukstag) in key generation to allow user identity authentication to be performed when a specific algorithm is used. 2. The **HUKS_TAG_KEY_AUTH_PURPOSE** does not need to be specified for the key usage process. The development process is the same as that of the user identity authentication process. **Available APIs** -You can use the [**HUKS_TAG_KEY_AUTH_PURPOSE**](../reference/apis/js-apis-huks.md#hukstag) tag to specify the scenario, for which the fine-grained user identity authentication is performed. The value range of this tag is [HuksKeyAlg](../reference/apis/js-apis-huks.md#hukskeyalg). +You can use the [**HUKS_TAG_KEY_AUTH_PURPOSE**](../reference/apis/js-apis-huks.md#hukstag) tag to specify the scenarios, for which the refined user identity authentication is performed. The value range of this tag is [HuksKeyAlg](../reference/apis/js-apis-huks.md#hukskeyalg). **Table 7** HUKS_TAG_KEY_AUTH_PURPOSE | Name | Description | | -------------------------------------- | ----------------------------| |HUKS_TAG_KEY_AUTH_PURPOSE| Purpose of the user identity authentication, that is, perform the user identity authentication when a specific algorithm is used.| -> **NOTE** -> -> - If [**HuksUserAuthType**](../reference/apis/js-apis-huks.md#huksuserauthtype9) is not specified, no user identity authentication is performed by default. In this case, the setting of **HUKS_TAG_KEY_AUTH_PURPOSE** is invalid by default. If **HuksUserAuthType** is specified and **HUKS_TAG_KEY_AUTH_PURPOSE** is not specified, user identity authentication will still be performed by default before the key is used with the algorithm that is specified in the key generation process. -> - If the AES or SM4 symmetric algorithm is used for encryption and decryption, only the CBC mode supports fine-grained user identity authentication. +**NOTE** + +- If [**HuksUserAuthType**](../reference/apis/js-apis-huks.md#huksuserauthtype9) is not specified, no user identity authentication is performed by default. In this case, the setting of **HUKS_TAG_KEY_AUTH_PURPOSE** is invalid by default. If **HuksUserAuthType** is specified and **HUKS_TAG_KEY_AUTH_PURPOSE** is not specified, user identity authentication will still be performed by default before the key is used with the algorithm that is specified in the key generation process. +- If the AES or SM4 symmetric algorithm is used for encryption and decryption, only the CBC mode supports refined user identity authentication. **How to Develop** @@ -2732,3 +2729,5 @@ async function AttestKeyTest() { ### Property 'finishSession' does not exist on type 'typeof huks'. Did you mean 'finish'? **finishSession()** is supported from API version 9. Update the SDK version or use the latest **security.huks.d.ts** file. + + diff --git a/en/application-dev/windowmanager/application-window-fa.md b/en/application-dev/windowmanager/application-window-fa.md index 3ffee6d6467c870581dd6ede6f55d5d111758a84..89337707dc67a24d88d1cc4dbf47276091591075 100644 --- a/en/application-dev/windowmanager/application-window-fa.md +++ b/en/application-dev/windowmanager/application-window-fa.md @@ -133,7 +133,7 @@ You can create a subwindow, such as a dialog box, and set its properties. ## Experiencing the Immersive Window Feature -To create a better video watching and gaming experience, you can use the immersive window feature to hide the system windows, including the status bar and navigation bar. To achieve this effect, you can use the immersive window feature, which is available only for the main window of an application. +To create a better video watching and gaming experience, you can use the immersive window feature to hide the system windows, including the status bar and navigation bar. This feature is available only for the main window of an application. Since API version 10, the immersive window has the same size as the full screen by default; its layout is controlled by the component module; the background color of its status bar and navigation bar is transparent, and the text color is black. When an application window calls **setWindowLayoutFullScreen**, with **true** passed in, the component module controls the immersive full-screen layout of the status bar and navigation bar. If **false** is passed in, the component module controls the non-immersive full-screen layout of the status bar and navigation bar. ### How to Develop @@ -163,8 +163,8 @@ To create a better video watching and gaming experience, you can use the immersi 2. Implement the immersive effect. You can use either of the following methods: - - Method 1: Call **setWindowSystemBarEnable** to hide the navigation bar and status bar. - - Method 2: Call **setWindowLayoutFullScreen** to enable the full-screen mode for the main window layout. Call **setSystemProperties** to set the opacity, background color, text color, and highlighted icon of the navigation bar and status bar to ensure that their display effect is consistent with that of the main window. + - Method 1: When the main window of the application is a full-screen window, call **setWindowSystemBarEnable** to hide the status bar and navigation bar. + - Method 2: Call **setWindowLayoutFullScreen** to enable the full-screen mode for the main window layout. Call **setSystemProperties** to set the opacity, background color, text color, and highlighted icon of the status bar and navigation bar to ensure that their display effect is consistent with that of the main window. ```js diff --git a/en/application-dev/windowmanager/application-window-stage.md b/en/application-dev/windowmanager/application-window-stage.md index 68c923de34cd3088137cf4817704630d6f196ccb..e5155946df06f0b5bd161db4fde80c152c5a1f48 100644 --- a/en/application-dev/windowmanager/application-window-stage.md +++ b/en/application-dev/windowmanager/application-window-stage.md @@ -202,7 +202,7 @@ You can create an application subwindow, such as a dialog box, and set its prope ## Experiencing the Immersive Window Feature -To create a better video watching and gaming experience, you can use the immersive window feature to hide the system windows, including the status bar and navigation bar. To achieve this effect, you can use the immersive window feature, which is available only for the main window of an application. +To create a better video watching and gaming experience, you can use the immersive window feature to hide the system windows, including the status bar and navigation bar. Tis feature is available only for the main window of an application. Since API version 10, the immersive window has the same size as the full screen by default; its layout is controlled by the component module; the background color of its status bar and navigation bar is transparent, and the text color is black. When an application window calls **setWindowLayoutFullScreen**, with **true** passed in, the component module controls the immersive full-screen layout of the status bar and navigation bar. If **false** is passed in, the component module controls the non-immersive full-screen layout of the status bar and navigation bar. ### How to Develop @@ -212,8 +212,8 @@ To create a better video watching and gaming experience, you can use the immersi Call **getMainWindow** to obtain the main window of the application. 2. Implement the immersive effect. You can use either of the following methods: - - Method 1: Call **setWindowSystemBarEnable** to hide the navigation bar and status bar. - - Method 2: Call **setWindowLayoutFullScreen** to enable the full-screen mode for the main window layout. Call **setWindowSystemBarProperties** to set the opacity, background color, text color, and highlighted icon of the navigation bar and status bar to ensure that their display effect is consistent with that of the main window. + - Method 1: When the main window of the application is a full-screen window, call **setWindowSystemBarEnable** to hide the status bar and navigation bar. + - Method 2: Call **setWindowLayoutFullScreen** to enable the full-screen mode for the main window layout. Call **setWindowSystemBarProperties** to set the opacity, background color, text color, and highlighted icon of the status bar and navigation bar to ensure that their display effect is consistent with that of the main window. 3. Load content for the immersive window and show it. @@ -387,4 +387,4 @@ A floating window is created based on an existing task. It is always displayed i }); } }; - ``` \ No newline at end of file + ``` diff --git a/en/release-notes/OpenHarmony-v3.2-release.md b/en/release-notes/OpenHarmony-v3.2-release.md index ff53562f8037b3036c27306698ba8b0bf77e0fd9..fed75e671895a0b6f6efc8d3f44465c44443efb3 100644 --- a/en/release-notes/OpenHarmony-v3.2-release.md +++ b/en/release-notes/OpenHarmony-v3.2-release.md @@ -6,7 +6,8 @@ OpenHarmony 3.2 Release provides more comprehensive capabilities for the standar The figure below shows the milestones of OpenHarmony 3.2. Read the content below to learn more about key features and capabilities. -**Figure 1** Milestones of OpenHarmony 3.2 +**Figure 1** Milestones of OpenHarmony 3.2 + ![release](figures/release.png) ## Feature Updates @@ -488,13 +489,13 @@ For details, see [DevEco Studio Version Change History](https://developer.harmon ## Version Mapping - **Table 1** Version mapping of software and tools +**Table 1** Version mapping of software and tools | Software/Tool| Version| Remarks| | -------- | -------- | -------- | | OpenHarmony | 3.2 Release | NA | | Public SDK | Ohos_sdk_public 3.2.11.9 (API Version 9 Release) | This toolkit is intended for application developers and does not contain system APIs that require system permissions. It is provided as standard in DevEco Studio.| -| (Optional) HUAWEI DevEco Studio| 3.1 Beta2 | Recommended for developing OpenHarmony applications How to obtain:
[Windows(64-bit)](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/f3/v3/uJyuq3syQ2ak4hE1QZmAug/devecostudio-windows-3.1.0.400.zip?HW-CC-KV=V1&HW-CC-Date=20230408T013335Z&HW-CC-Expire=315360000&HW-CC-Sign=96262721EDC9B34E6F62E66884AB7AE2A94C2A7B8C28D6F7FC891F46EB211A70)
[Mac(X86)](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/b7/v3/4z3mLQPCQR-g5KlC56SC1w/devecostudio-mac-3.1.0.400.zip?HW-CC-KV=V1&HW-CC-Date=20230408T013430Z&HW-CC-Expire=315360000&HW-CC-Sign=93E83FD1F1CE504EF8F098E08955A938FDA4E4926A2555CF1E02DC8D57210D76)
[Mac(ARM)](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/2e/v3/Fl9IY6PiQxqc3tnI2cftiw/devecostudio-mac-arm-3.1.0.400.zip?HW-CC-KV=V1&HW-CC-Date=20230408T013540Z&HW-CC-Expire=315360000&HW-CC-Sign=0906243123734033AAD34A7A005ED7671F00CAA693B6E674F81A094A0159ECCE) | +| (Optional) HUAWEI DevEco Studio| 3.1 Release | Recommended for developing OpenHarmony applications
How to obtain:
[Windows(64-bit)](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/16/v3/YO_7mAQNTbS8jekrvez5IA/devecostudio-windows-3.1.0.500.zip?HW-CC-KV=V1&HW-CC-Date=20230512T073650Z&HW-CC-Expire=315360000&HW-CC-Sign=90814E421B9A6D8DB4757FAFC21A965CF890A387DF9A2633B4AB797AD77E6485)
[Mac(X86)](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/d8/v3/zRt_WN3iRZiJ6nmb0mII2g/devecostudio-mac-3.1.0.500.zip?HW-CC-KV=V1&HW-CC-Date=20230512T073549Z&HW-CC-Expire=315360000&HW-CC-Sign=11DF6C7F2EE8C5CA5F5F44CE7441EBF2E24824FC7ECD5D961329C9575A8326AF)
[Mac(ARM)](https://contentcenter-vali-drcn.dbankcdn.cn/pvt_2/DeveloperAlliance_package_901_9/7d/v3/EEGHWfBmR_29a-xjAQJZqA/devecostudio-mac-arm-3.1.0.500.zip?HW-CC-KV=V1&HW-CC-Date=20230512T074142Z&HW-CC-Expire=315360000&HW-CC-Sign=92C9A7380140C8363D6B853A3898B31674144C2C809ED47F154EC450B714DBC0) | | (Optional) HUAWEI DevEco Device Tool| 3.1 Release | Recommended for developing OpenHarmony smart devices
[Click here](https://device.harmonyos.com/en/develop/ide/). | ## Source Code Acquisition diff --git a/en/release-notes/api-diff/v4.0-beta1/Readme-EN.md b/en/release-notes/api-diff/v4.0-beta1/Readme-EN.md index 0f5a6c6ea413caf34f952ae846ed76740b14cb57..81a639e59a7761212237895f9314e1137ca8c45c 100644 --- a/en/release-notes/api-diff/v4.0-beta1/Readme-EN.md +++ b/en/release-notes/api-diff/v4.0-beta1/Readme-EN.md @@ -12,7 +12,6 @@ - [Distributed data management subsystem](js-apidiff-distributed-data.md) - [Distributed hardware subsystem](js-apidiff-distributed-hardware.md) - [File management subsystem](js-apidiff-file-management.md) -- [Location subsystem](js-apidiff-geolocation.md) - [Globalization subsystem](js-apidiff-global.md) - [Graphic subsystem](js-apidiff-graphic.md) - [Misc services subsystem](js-apidiff-misc.md) diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-accessibility.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-accessibility.md index ba323a27a99d881c40da0c2dc785c6b0cb3815b5..1b86a89b38589b48c5a9b640c7f40d8a351e4467 100644 --- a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-accessibility.md +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-accessibility.md @@ -1,5 +1,26 @@ | Change Type | Old Version | New Version | d.ts File | | ---- | ------ | ------ | -------- | -|Error code added|NA|Class name: Config
Method or attribute name: get(): Promise\;
Error code: 201, 202|@ohos.accessibility.config.d.ts| -|Error code added|NA|Class name: Config
Method or attribute name: get(callback: AsyncCallback\): void;
Error code: 201, 202|@ohos.accessibility.config.d.ts| -|Error code added|NA|Class name: Config
Method or attribute name: off(callback?: Callback\): void;
Error code: 202|@ohos.accessibility.config.d.ts| +|Deprecated version changed|Class name: accessibility;
Method or attribute name: function getAbilityLists(abilityType: AbilityType, stateType: AbilityState): Promise\>;;
Old version information: |Class name: accessibility;
Method or attribute name: function getAbilityLists(abilityType: AbilityType, stateType: AbilityState): Promise\>;;
New version information: 9;
Substitute API: ohos.accessibility#getAccessibilityExtensionList|@ohos.accessibility.d.ts| +|Deprecated version changed|Class name: accessibility;
Method or attribute name: function sendEvent(event: EventInfo): Promise\;;
Old version information: |Class name: accessibility;
Method or attribute name: function sendEvent(event: EventInfo): Promise\;;
New version information: 9;
Substitute API: ohos.accessibility#sendAccessibilityEvent|@ohos.accessibility.d.ts| +|Error code added|Class name: Config;
Method or attribute name: get(): Promise\;;
Old version information: |Class name: Config;
Method or attribute name: get(): Promise\;;
New version information: 201, 202|@ohos.accessibility.config.d.ts| +|Error code added|Class name: Config;
Method or attribute name: get(callback: AsyncCallback\): void;;
Old version information: |Class name: Config;
Method or attribute name: get(callback: AsyncCallback\): void;;
New version information: 201, 202|@ohos.accessibility.config.d.ts| +|Error code added|Class name: Config;
Method or attribute name: off(callback?: Callback\): void;
Old version information: |Class name: Config;
Method or attribute name: off(callback?: Callback\): void;
New version information: 202|@ohos.accessibility.config.d.ts| +|Error code added|Class name: AccessibilityElement;
Method or attribute name: attributeValue\(
attributeName: T,
callback: AsyncCallback\
): void;;
Old version information: |Class name: AccessibilityElement;
Method or attribute name: attributeValue\(
attributeName: T,
callback: AsyncCallback\
): void;;
New version information: 401, 9300004|AccessibilityExtensionContext.d.ts| +|Error code changed|Class name: config;
Method or attribute name: function enableAbility(
name: string,
capability: Array\,
callback: AsyncCallback\
): void;
Old version information: 201,401, 9300001,9300002|Class name: config;
Method or attribute name: function enableAbility(
name: string,
capability: Array\,
callback: AsyncCallback\
): void;
New version information: 201, 202, 401, 9300001, 9300002|@ohos.accessibility.config.d.ts| +|Error code changed|Class name: config;
Method or attribute name: function enableAbility(name: string, capability: Array\): Promise\;;
Old version information: 201,401, 9300001,9300002|Class name: config;
Method or attribute name: function enableAbility(name: string, capability: Array\): Promise\;;
New version information: 201, 202, 401, 9300001, 9300002|@ohos.accessibility.config.d.ts| +|Error code changed|Class name: config;
Method or attribute name: function disableAbility(name: string, callback: AsyncCallback\): void;;
Old version information: 201,401, 9300001|Class name: config;
Method or attribute name: function disableAbility(name: string, callback: AsyncCallback\): void;;
New version information: 201, 202, 401, 9300001|@ohos.accessibility.config.d.ts| +|Error code changed|Class name: config;
Method or attribute name: function disableAbility(name: string): Promise\;;
Old version information: 201,401, 9300001|Class name: config;
Method or attribute name: function disableAbility(name: string): Promise\;;
New version information: 201, 202, 401, 9300001|@ohos.accessibility.config.d.ts| +|Error code changed|Class name: config;
Method or attribute name: function on(type: 'enabledAccessibilityExtensionListChange', callback: Callback\): void;;
Old version information: 401|Class name: config;
Method or attribute name: function on(type: 'enabledAccessibilityExtensionListChange', callback: Callback\): void;;
New version information: 202, 401|@ohos.accessibility.config.d.ts| +|Error code changed|Class name: config;
Method or attribute name: function off(type: 'enabledAccessibilityExtensionListChange', callback?: Callback\): void;;
Old version information: 401|Class name: config;
Method or attribute name: function off(type: 'enabledAccessibilityExtensionListChange', callback?: Callback\): void;;
New version information: 202, 401|@ohos.accessibility.config.d.ts| +|Error code changed|Class name: Config;
Method or attribute name: set(value: T, callback: AsyncCallback\): void;
Old version information: 201,401|Class name: Config;
Method or attribute name: set(value: T, callback: AsyncCallback\): void;
New version information: 201, 202, 401|@ohos.accessibility.config.d.ts| +|Error code changed|Class name: Config;
Method or attribute name: set(value: T): Promise\;;
Old version information: 201,401|Class name: Config;
Method or attribute name: set(value: T): Promise\;;
New version information: 201, 202, 401|@ohos.accessibility.config.d.ts| +|Error code changed|Class name: Config;
Method or attribute name: on(callback: Callback\): void;;
Old version information: 401|Class name: Config;
Method or attribute name: on(callback: Callback\): void;;
New version information: 201, 202, 401|@ohos.accessibility.config.d.ts| +|Error code changed|Class name: AccessibilityExtensionContext;
Method or attribute name: getFocusElement(isAccessibilityFocus: boolean, callback: AsyncCallback\): void;;
Old version information: 9300003|Class name: AccessibilityExtensionContext;
Method or attribute name: getFocusElement(isAccessibilityFocus: boolean, callback: AsyncCallback\): void;;
New version information: 401, 9300003|AccessibilityExtensionContext.d.ts| +|Error code changed|Class name: AccessibilityExtensionContext;
Method or attribute name: getFocusElement(callback: AsyncCallback\): void;;
Old version information: 9300003|Class name: AccessibilityExtensionContext;
Method or attribute name: getFocusElement(callback: AsyncCallback\): void;;
New version information: 401, 9300003|AccessibilityExtensionContext.d.ts| +|Error code changed|Class name: AccessibilityExtensionContext;
Method or attribute name: getFocusElement(isAccessibilityFocus?: boolean): Promise\;;
Old version information: 9300003|Class name: AccessibilityExtensionContext;
Method or attribute name: getFocusElement(isAccessibilityFocus?: boolean): Promise\;;
New version information: 401, 9300003|AccessibilityExtensionContext.d.ts| +|Error code changed|Class name: AccessibilityExtensionContext;
Method or attribute name: getWindowRootElement(windowId: number, callback: AsyncCallback\): void;;
Old version information: 9300003|Class name: AccessibilityExtensionContext;
Method or attribute name: getWindowRootElement(windowId: number, callback: AsyncCallback\): void;;
New version information: 401, 9300003|AccessibilityExtensionContext.d.ts| +|Error code changed|Class name: AccessibilityExtensionContext;
Method or attribute name: getWindowRootElement(callback: AsyncCallback\): void;;
Old version information: 9300003|Class name: AccessibilityExtensionContext;
Method or attribute name: getWindowRootElement(callback: AsyncCallback\): void;;
New version information: 401, 9300003|AccessibilityExtensionContext.d.ts| +|Error code changed|Class name: AccessibilityExtensionContext;
Method or attribute name: getWindowRootElement(windowId?: number): Promise\;;
Old version information: 9300003|Class name: AccessibilityExtensionContext;
Method or attribute name: getWindowRootElement(windowId?: number): Promise\;;
New version information: 401, 9300003|AccessibilityExtensionContext.d.ts| +|Error code changed|Class name: AccessibilityExtensionContext;
Method or attribute name: getWindows(displayId?: number): Promise\>;;
Old version information: 9300003|Class name: AccessibilityExtensionContext;
Method or attribute name: getWindows(displayId?: number): Promise\>;;
New version information: 401, 9300003|AccessibilityExtensionContext.d.ts| +|Error code changed|Class name: AccessibilityExtensionContext;
Method or attribute name: getWindows(callback: AsyncCallback\>): void;;
Old version information: 9300003|Class name: AccessibilityExtensionContext;
Method or attribute name: getWindows(callback: AsyncCallback\>): void;;
New version information: 401, 9300003|AccessibilityExtensionContext.d.ts| +|Error code changed|Class name: AccessibilityExtensionContext;
Method or attribute name: getWindows(displayId: number, callback: AsyncCallback\>): void;;
Old version information: 9300003|Class name: AccessibilityExtensionContext;
Method or attribute name: getWindows(displayId: number, callback: AsyncCallback\>): void;;
New version information: 401, 9300003|AccessibilityExtensionContext.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-account.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-account.md index 7f7198c58038d50463ce773e152f5bd31afa6655..1571111fd30ed84907858fd9d41c50e9c5d048ca 100644 --- a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-account.md +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-account.md @@ -80,78 +80,6 @@ |Access level changed|Class name: DomainPlugin
Access level: public API|Class name: DomainPlugin
Access level: system API|@ohos.account.osAccount.d.ts| |Access level changed|Class name: DomainAccountManager
Access level: public API|Class name: DomainAccountManager
Access level: system API|@ohos.account.osAccount.d.ts| |Access level changed|Class name: UserIdentityManager
Access level: public API|Class name: UserIdentityManager
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: GetPropertyRequest
Method or attribute name: authType: AuthType;
Access level: public API|Class name: GetPropertyRequest
Method or attribute name: authType: AuthType;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: GetPropertyRequest
Method or attribute name: keys: Array\;
Access level: public API|Class name: GetPropertyRequest
Method or attribute name: keys: Array\;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: SetPropertyRequest
Method or attribute name: authType: AuthType;
Access level: public API|Class name: SetPropertyRequest
Method or attribute name: authType: AuthType;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: SetPropertyRequest
Method or attribute name: key: SetPropertyType;
Access level: public API|Class name: SetPropertyRequest
Method or attribute name: key: SetPropertyType;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: SetPropertyRequest
Method or attribute name: setInfo: Uint8Array;
Access level: public API|Class name: SetPropertyRequest
Method or attribute name: setInfo: Uint8Array;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ExecutorProperty
Method or attribute name: result: number;
Access level: public API|Class name: ExecutorProperty
Method or attribute name: result: number;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ExecutorProperty
Method or attribute name: authSubType: AuthSubType;
Access level: public API|Class name: ExecutorProperty
Method or attribute name: authSubType: AuthSubType;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ExecutorProperty
Method or attribute name: remainTimes?: number;
Access level: public API|Class name: ExecutorProperty
Method or attribute name: remainTimes?: number;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ExecutorProperty
Method or attribute name: freezingTime?: number;
Access level: public API|Class name: ExecutorProperty
Method or attribute name: freezingTime?: number;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthResult
Method or attribute name: token?: Uint8Array;
Access level: public API|Class name: AuthResult
Method or attribute name: token?: Uint8Array;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthResult
Method or attribute name: remainTimes?: number;
Access level: public API|Class name: AuthResult
Method or attribute name: remainTimes?: number;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthResult
Method or attribute name: freezingTime?: number;
Access level: public API|Class name: AuthResult
Method or attribute name: freezingTime?: number;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: CredentialInfo
Method or attribute name: credType: AuthType;
Access level: public API|Class name: CredentialInfo
Method or attribute name: credType: AuthType;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: CredentialInfo
Method or attribute name: credSubType: AuthSubType;
Access level: public API|Class name: CredentialInfo
Method or attribute name: credSubType: AuthSubType;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: CredentialInfo
Method or attribute name: token: Uint8Array;
Access level: public API|Class name: CredentialInfo
Method or attribute name: token: Uint8Array;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: RequestResult
Method or attribute name: credentialId?: Uint8Array;
Access level: public API|Class name: RequestResult
Method or attribute name: credentialId?: Uint8Array;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: EnrolledCredInfo
Method or attribute name: credentialId: Uint8Array;
Access level: public API|Class name: EnrolledCredInfo
Method or attribute name: credentialId: Uint8Array;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: EnrolledCredInfo
Method or attribute name: authType: AuthType;
Access level: public API|Class name: EnrolledCredInfo
Method or attribute name: authType: AuthType;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: EnrolledCredInfo
Method or attribute name: authSubType: AuthSubType;
Access level: public API|Class name: EnrolledCredInfo
Method or attribute name: authSubType: AuthSubType;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: EnrolledCredInfo
Method or attribute name: templateId: Uint8Array;
Access level: public API|Class name: EnrolledCredInfo
Method or attribute name: templateId: Uint8Array;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: GetPropertyType
Method or attribute name: AUTH_SUB_TYPE = 1
Access level: public API|Class name: GetPropertyType
Method or attribute name: AUTH_SUB_TYPE = 1
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: GetPropertyType
Method or attribute name: REMAIN_TIMES = 2
Access level: public API|Class name: GetPropertyType
Method or attribute name: REMAIN_TIMES = 2
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: GetPropertyType
Method or attribute name: FREEZING_TIME = 3
Access level: public API|Class name: GetPropertyType
Method or attribute name: FREEZING_TIME = 3
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: SetPropertyType
Method or attribute name: INIT_ALGORITHM = 1
Access level: public API|Class name: SetPropertyType
Method or attribute name: INIT_ALGORITHM = 1
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthType
Method or attribute name: PIN = 1
Access level: public API|Class name: AuthType
Method or attribute name: PIN = 1
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthType
Method or attribute name: FACE = 2
Access level: public API|Class name: AuthType
Method or attribute name: FACE = 2
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthType
Method or attribute name: DOMAIN = 1024
Access level: public API|Class name: AuthType
Method or attribute name: DOMAIN = 1024
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthSubType
Method or attribute name: PIN_SIX = 10000
Access level: public API|Class name: AuthSubType
Method or attribute name: PIN_SIX = 10000
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthSubType
Method or attribute name: PIN_NUMBER = 10001
Access level: public API|Class name: AuthSubType
Method or attribute name: PIN_NUMBER = 10001
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthSubType
Method or attribute name: PIN_MIXED = 10002
Access level: public API|Class name: AuthSubType
Method or attribute name: PIN_MIXED = 10002
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthSubType
Method or attribute name: FACE_2D = 20000
Access level: public API|Class name: AuthSubType
Method or attribute name: FACE_2D = 20000
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthSubType
Method or attribute name: FACE_3D = 20001
Access level: public API|Class name: AuthSubType
Method or attribute name: FACE_3D = 20001
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthSubType
Method or attribute name: DOMAIN_MIXED = 10240001
Access level: public API|Class name: AuthSubType
Method or attribute name: DOMAIN_MIXED = 10240001
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthTrustLevel
Method or attribute name: ATL1 = 10000
Access level: public API|Class name: AuthTrustLevel
Method or attribute name: ATL1 = 10000
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthTrustLevel
Method or attribute name: ATL2 = 20000
Access level: public API|Class name: AuthTrustLevel
Method or attribute name: ATL2 = 20000
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthTrustLevel
Method or attribute name: ATL3 = 30000
Access level: public API|Class name: AuthTrustLevel
Method or attribute name: ATL3 = 30000
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: AuthTrustLevel
Method or attribute name: ATL4 = 40000
Access level: public API|Class name: AuthTrustLevel
Method or attribute name: ATL4 = 40000
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: Module
Method or attribute name: FACE_AUTH = 1
Access level: public API|Class name: Module
Method or attribute name: FACE_AUTH = 1
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ResultCode
Method or attribute name: SUCCESS = 0
Access level: public API|Class name: ResultCode
Method or attribute name: SUCCESS = 0
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ResultCode
Method or attribute name: FAIL = 1
Access level: public API|Class name: ResultCode
Method or attribute name: FAIL = 1
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ResultCode
Method or attribute name: GENERAL_ERROR = 2
Access level: public API|Class name: ResultCode
Method or attribute name: GENERAL_ERROR = 2
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ResultCode
Method or attribute name: CANCELED = 3
Access level: public API|Class name: ResultCode
Method or attribute name: CANCELED = 3
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ResultCode
Method or attribute name: TIMEOUT = 4
Access level: public API|Class name: ResultCode
Method or attribute name: TIMEOUT = 4
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ResultCode
Method or attribute name: TYPE_NOT_SUPPORT = 5
Access level: public API|Class name: ResultCode
Method or attribute name: TYPE_NOT_SUPPORT = 5
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ResultCode
Method or attribute name: TRUST_LEVEL_NOT_SUPPORT = 6
Access level: public API|Class name: ResultCode
Method or attribute name: TRUST_LEVEL_NOT_SUPPORT = 6
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ResultCode
Method or attribute name: BUSY = 7
Access level: public API|Class name: ResultCode
Method or attribute name: BUSY = 7
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ResultCode
Method or attribute name: INVALID_PARAMETERS = 8
Access level: public API|Class name: ResultCode
Method or attribute name: INVALID_PARAMETERS = 8
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ResultCode
Method or attribute name: LOCKED = 9
Access level: public API|Class name: ResultCode
Method or attribute name: LOCKED = 9
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ResultCode
Method or attribute name: NOT_ENROLLED = 10
Access level: public API|Class name: ResultCode
Method or attribute name: NOT_ENROLLED = 10
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_BRIGHT = 1
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_BRIGHT = 1
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_DARK = 2
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_DARK = 2
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_CLOSE = 3
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_CLOSE = 3
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_FAR = 4
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_FAR = 4
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_HIGH = 5
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_HIGH = 5
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_LOW = 6
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_LOW = 6
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_RIGHT = 7
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_RIGHT = 7
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_LEFT = 8
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_LEFT = 8
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_MUCH_MOTION = 9
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_TOO_MUCH_MOTION = 9
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_POOR_GAZE = 10
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_POOR_GAZE = 10
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_NOT_DETECTED = 11
Access level: public API|Class name: FaceTipsCode
Method or attribute name: FACE_AUTH_TIP_NOT_DETECTED = 11
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_GOOD = 0
Access level: public API|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_GOOD = 0
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_IMAGER_DIRTY = 1
Access level: public API|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_IMAGER_DIRTY = 1
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_INSUFFICIENT = 2
Access level: public API|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_INSUFFICIENT = 2
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_PARTIAL = 3
Access level: public API|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_PARTIAL = 3
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_TOO_FAST = 4
Access level: public API|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_TOO_FAST = 4
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_TOO_SLOW = 5
Access level: public API|Class name: FingerprintTips
Method or attribute name: FINGERPRINT_TIP_TOO_SLOW = 5
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_NOT_EXIST = 0
Access level: public API|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_NOT_EXIST = 0
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_TYPE_BASE = 1
Access level: public API|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_TYPE_BASE = 1
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_TYPE_DEVICE_OWNER = 2
Access level: public API|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_TYPE_DEVICE_OWNER = 2
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_TYPE_PROFILE_OWNER = 3
Access level: public API|Class name: ConstraintSourceType
Method or attribute name: CONSTRAINT_TYPE_PROFILE_OWNER = 3
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ConstraintSourceTypeInfo
Method or attribute name: localId: number;
Access level: public API|Class name: ConstraintSourceTypeInfo
Method or attribute name: localId: number;
Access level: system API|@ohos.account.osAccount.d.ts| -|Access level changed|Class name: ConstraintSourceTypeInfo
Method or attribute name: type: ConstraintSourceType;
Access level: public API|Class name: ConstraintSourceTypeInfo
Method or attribute name: type: ConstraintSourceType;
Access level: system API|@ohos.account.osAccount.d.ts| |Error code added|NA|Class name: UserAuth
Method or attribute name: constructor();
Error code: 202|@ohos.account.osAccount.d.ts| |Error code added|NA|Class name: UserAuth
Method or attribute name: getVersion(): number;
Error code: 202|@ohos.account.osAccount.d.ts| |Error code added|NA|Class name: PINAuth
Method or attribute name: constructor();
Error code: 202|@ohos.account.osAccount.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-arkui.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-arkui.md index f5c76f0c7e1cb7015ade9bc4fafeb5fc2930786e..c0aefa949e51c9ec0ec00e2190e3c997d1bb0d38 100644 --- a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-arkui.md +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-arkui.md @@ -66,11 +66,8 @@ |Added|NA|Module name: common
Class name: AnimatableArithmetic
Method or attribute name: plus(rhs: AnimatableArithmetic\): AnimatableArithmetic\;|common.d.ts| |Added|NA|Class name: AnimatableArithmetic
Method or attribute name: plus(rhs: AnimatableArithmetic\): AnimatableArithmetic\;|common.d.ts| |Added|NA|Module name: common
Class name: AnimatableArithmetic
Method or attribute name: subtract(rhs: AnimatableArithmetic\): AnimatableArithmetic\;|common.d.ts| -|Added|NA|Class name: AnimatableArithmetic
Method or attribute name: subtract(rhs: AnimatableArithmetic\): AnimatableArithmetic\;|common.d.ts| |Added|NA|Module name: common
Class name: AnimatableArithmetic
Method or attribute name: multiply(scale: number): AnimatableArithmetic\;|common.d.ts| -|Added|NA|Class name: AnimatableArithmetic
Method or attribute name: multiply(scale: number): AnimatableArithmetic\;|common.d.ts| |Added|NA|Module name: common
Class name: AnimatableArithmetic
Method or attribute name: equals(rhs: AnimatableArithmetic\): boolean;|common.d.ts| -|Added|NA|Class name: AnimatableArithmetic
Method or attribute name: equals(rhs: AnimatableArithmetic\): boolean;|common.d.ts| |Added|NA|Class name: global
Method or attribute name: declare const Recycle: ClassDecorator;|common.d.ts| |Added|NA|Module name: common
Class name: TransitionEdge|common.d.ts| |Added|NA|Module name: common
Class name: TransitionEdge
Method or attribute name: TOP|common.d.ts| @@ -566,1473 +563,34 @@ |Access level changed|Class name: SubscribedAbstractProperty
Method or attribute name: info(): string;
Access level: system API|Class name: SubscribedAbstractProperty
Method or attribute name: info(): string;
Access level: public API|common_ts_ets_api.d.ts| |Deprecated version changed|Class name: ShowToastOptions
Deprecated version: N/A|Class name: ShowToastOptions
Deprecated version: 8
Substitute API: ohos.prompt |@system.prompt.d.ts| |Deprecated version changed|Class name: TransitionOptions
Deprecated version: N/A|Class name: TransitionOptions
Deprecated version: 10
Substitute API: TransitionEffect |common.d.ts| -|Deprecated version changed|Class name: PopupOptions
Method or attribute name: placementOnTop?: boolean;
Deprecated version: N/A|Class name: PopupOptions
Method or attribute name: placementOnTop?: boolean;
Deprecated version: 10
Substitute API: PopupOptions|common.d.ts| -|Deprecated version changed|Class name: CustomPopupOptions
Method or attribute name: maskColor?: Color \| string \| Resource \| number;
Deprecated version: N/A|Class name: CustomPopupOptions
Method or attribute name: maskColor?: Color \| string \| Resource \| number;
Deprecated version: 10
Substitute API: CustomPopupOptions|common.d.ts| -|Deprecated version changed|Class name: CommonMethod
Method or attribute name: useSizeType(value: {
xs?: number \| { span: number; offset: number };
sm?: number \| { span: number; offset: number };
md?: number \| { span: number; offset: number };
lg?: number \| { span: number; offset: number };
}): T;
Deprecated version: N/A|Class name: CommonMethod
Method or attribute name: useSizeType(value: {
xs?: number \| { span: number; offset: number };
sm?: number \| { span: number; offset: number };
md?: number \| { span: number; offset: number };
lg?: number \| { span: number; offset: number };
}): T;
Deprecated version: 9
Substitute API: grid_col/|common.d.ts| -|Deprecated version changed|Class name: SizeType
Deprecated version: N/A|Class name: SizeType
Deprecated version: 9
Substitute API: grid_col/|grid_container.d.ts| -|Deprecated version changed|Class name: GridContainerOptions
Deprecated version: N/A|Class name: GridContainerOptions
Deprecated version: 9
Substitute API: grid_col/|grid_container.d.ts| +|Deprecated version changed|Class name: PopupOptions
Method or attribute name: placementOnTop?: boolean;
Deprecated version: N/A|Class name: PopupOptions
Method or attribute name: placementOnTop?: boolean;
Deprecated version: 10
Substitute API: PopupOptions#placement|common.d.ts| +|Deprecated version changed|Class name: CustomPopupOptions
Method or attribute name: maskColor?: Color \| string \| Resource \| number;
Deprecated version: N/A|Class name: CustomPopupOptions
Method or attribute name: maskColor?: Color \| string \| Resource \| number;
Deprecated version: 10
Substitute API: CustomPopupOptions#mask|common.d.ts| +|Deprecated version changed|Class name: CommonMethod
Method or attribute name: useSizeType(value: {
xs?: number \| { span: number; offset: number };
sm?: number \| { span: number; offset: number };
md?: number \| { span: number; offset: number };
lg?: number \| { span: number; offset: number };
}): T;
Deprecated version: N/A|Class name: CommonMethod
Method or attribute name: useSizeType(value: {
xs?: number \| { span: number; offset: number };
sm?: number \| { span: number; offset: number };
md?: number \| { span: number; offset: number };
lg?: number \| { span: number; offset: number };
}): T;
Deprecated version: 9
Substitute API: grid_col/[GridColColumnOption] and grid_row/[GridRowColumnOption]|common.d.ts| +|Deprecated version changed|Class name: SizeType
Deprecated version: N/A|Class name: SizeType
Deprecated version: 9
Substitute API: grid_col/[GridColColumnOption] and grid_row/[GridRowColumnOption]|grid_container.d.ts| +|Deprecated version changed|Class name: GridContainerOptions
Deprecated version: N/A|Class name: GridContainerOptions
Deprecated version: 9
Substitute API: grid_col/[GridColOptions] and grid_row/[GridRowOptions]|grid_container.d.ts| |Deprecated version changed|Class name: GridContainerOptions
Method or attribute name: columns?: number \| "auto";
Deprecated version: N/A|Class name: GridContainerOptions
Method or attribute name: columns?: number \| "auto";
Deprecated version: 9
Substitute API: N/A|grid_container.d.ts| |Deprecated version changed|Class name: GridContainerOptions
Method or attribute name: sizeType?: SizeType;
Deprecated version: N/A|Class name: GridContainerOptions
Method or attribute name: sizeType?: SizeType;
Deprecated version: 9
Substitute API: N/A|grid_container.d.ts| |Deprecated version changed|Class name: GridContainerOptions
Method or attribute name: gutter?: number \| string;
Deprecated version: N/A|Class name: GridContainerOptions
Method or attribute name: gutter?: number \| string;
Deprecated version: 9
Substitute API: N/A|grid_container.d.ts| |Deprecated version changed|Class name: GridContainerOptions
Method or attribute name: margin?: number \| string;
Deprecated version: N/A|Class name: GridContainerOptions
Method or attribute name: margin?: number \| string;
Deprecated version: 9
Substitute API: N/A|grid_container.d.ts| -|Deprecated version changed|Class name: GridContainerInterface
Deprecated version: N/A|Class name: GridContainerInterface
Deprecated version: 9
Substitute API: grid_col/|grid_container.d.ts| +|Deprecated version changed|Class name: GridContainerInterface
Deprecated version: N/A|Class name: GridContainerInterface
Deprecated version: 9
Substitute API: grid_col/[GridColInterface] and grid_row/[GridRowInterface]|grid_container.d.ts| |Deprecated version changed|Class name: GridContainerInterface
Method or attribute name: (value?: GridContainerOptions): GridContainerAttribute;
Deprecated version: N/A|Class name: GridContainerInterface
Method or attribute name: (value?: GridContainerOptions): GridContainerAttribute;
Deprecated version: 9
Substitute API: N/A|grid_container.d.ts| -|Deprecated version changed|Class name: GridContainerAttribute
Deprecated version: N/A|Class name: GridContainerAttribute
Deprecated version: 9
Substitute API: grid_col/|grid_container.d.ts| -|Deprecated version changed|Class name: ImageAttribute
Method or attribute name: draggable(value: boolean): ImageAttribute;
Deprecated version: N/A|Class name: ImageAttribute
Method or attribute name: draggable(value: boolean): ImageAttribute;
Deprecated version: 10
Substitute API: common.CommonMethod|image.d.ts| +|Deprecated version changed|Class name: GridContainerAttribute
Deprecated version: N/A|Class name: GridContainerAttribute
Deprecated version: 9
Substitute API: grid_col/[GridColAttribute] and grid_row/[GridRowAttribute]|grid_container.d.ts| +|Deprecated version changed|Class name: ImageAttribute
Method or attribute name: draggable(value: boolean): ImageAttribute;
Deprecated version: N/A|Class name: ImageAttribute
Method or attribute name: draggable(value: boolean): ImageAttribute;
Deprecated version: 10
Substitute API: common.CommonMethod#draggable|image.d.ts| |Deprecated version changed|Class name: Sticky
Deprecated version: N/A|Class name: Sticky
Deprecated version: 9
Substitute API: list/StickyStyle |list_item.d.ts| -|Deprecated version changed|Class name: ListItemAttribute
Method or attribute name: sticky(value: Sticky): ListItemAttribute;
Deprecated version: N/A|Class name: ListItemAttribute
Method or attribute name: sticky(value: Sticky): ListItemAttribute;
Deprecated version: 9
Substitute API: list/List|list_item.d.ts| +|Deprecated version changed|Class name: ListItemAttribute
Method or attribute name: sticky(value: Sticky): ListItemAttribute;
Deprecated version: N/A|Class name: ListItemAttribute
Method or attribute name: sticky(value: Sticky): ListItemAttribute;
Deprecated version: 9
Substitute API: list/List#sticky|list_item.d.ts| |Deprecated version changed|Class name: MenuAttribute
Method or attribute name: fontSize(value: Length): MenuAttribute;
Deprecated version: N/A|Class name: MenuAttribute
Method or attribute name: fontSize(value: Length): MenuAttribute;
Deprecated version: 10
Substitute API: font |menu.d.ts| -|Deprecated version changed|Class name: SwiperDisplayMode
Method or attribute name: Stretch
Deprecated version: N/A|Class name: SwiperDisplayMode
Method or attribute name: Stretch
Deprecated version: 10
Substitute API: SwiperDisplayMode|swiper.d.ts| -|Deprecated version changed|Class name: SwiperDisplayMode
Method or attribute name: AutoLinear
Deprecated version: N/A|Class name: SwiperDisplayMode
Method or attribute name: AutoLinear
Deprecated version: 10
Substitute API: SwiperDisplayMode|swiper.d.ts| +|Deprecated version changed|Class name: SwiperDisplayMode
Method or attribute name: Stretch
Deprecated version: N/A|Class name: SwiperDisplayMode
Method or attribute name: Stretch
Deprecated version: 10
Substitute API: SwiperDisplayMode#STRETCH|swiper.d.ts| +|Deprecated version changed|Class name: SwiperDisplayMode
Method or attribute name: AutoLinear
Deprecated version: N/A|Class name: SwiperDisplayMode
Method or attribute name: AutoLinear
Deprecated version: 10
Substitute API: SwiperDisplayMode#AUTO_LINEAR|swiper.d.ts| |Deprecated version changed|Class name: IndicatorStyle
Deprecated version: N/A|Class name: IndicatorStyle
Deprecated version: 10
Substitute API: N/A|swiper.d.ts| |Deprecated version changed|Class name: SwiperAttribute
Method or attribute name: indicatorStyle(value?: IndicatorStyle): SwiperAttribute;
Deprecated version: N/A|Class name: SwiperAttribute
Method or attribute name: indicatorStyle(value?: IndicatorStyle): SwiperAttribute;
Deprecated version: 10
Substitute API: N/A|swiper.d.ts| |Deprecated version changed|Class name: TextPickerAttribute
Method or attribute name: onAccept(callback: (value: string, index: number) => void): TextPickerAttribute;
Deprecated version: N/A|Class name: TextPickerAttribute
Method or attribute name: onAccept(callback: (value: string, index: number) => void): TextPickerAttribute;
Deprecated version: 10
Substitute API: N/A|text_picker.d.ts| |Deprecated version changed|Class name: TextPickerAttribute
Method or attribute name: onCancel(callback: () => void): TextPickerAttribute;
Deprecated version: N/A|Class name: TextPickerAttribute
Method or attribute name: onCancel(callback: () => void): TextPickerAttribute;
Deprecated version: 10
Substitute API: N/A|text_picker.d.ts| -|Deprecated version changed|Class name: WebAttribute
Method or attribute name: onUrlLoadIntercept(callback: (event?: { data: string \| WebResourceRequest }) => boolean): WebAttribute;
Deprecated version: N/A|Class name: WebAttribute
Method or attribute name: onUrlLoadIntercept(callback: (event?: { data: string \| WebResourceRequest }) => boolean): WebAttribute;
Deprecated version: 10
Substitute API: ohos.web.WebAttribute|web.d.ts| -|Initial version changed|Class name:
Method or attribute name: function setInterval(handler: Function \| string, delay: number, ...arguments: any[]): number;
Initial version: 7|Class name:
Method or attribute name: function setInterval(handler: Function \| string, delay: number, ...arguments: any[]): number;
Initial version: 10|global.d.ts| -|Initial version changed|Class name:
Method or attribute name: function setTimeout(handler: Function \| string, delay?: number, ...arguments: any[]): number;
Initial version: 7|Class name:
Method or attribute name: function setTimeout(handler: Function \| string, delay?: number, ...arguments: any[]): number;
Initial version: 10|global.d.ts| -|Initial version changed|Class name:
Method or attribute name: function clearInterval(intervalID?: number): void;
Initial version: 7|Class name:
Method or attribute name: function clearInterval(intervalID?: number): void;
Initial version: 10|global.d.ts| -|Initial version changed|Class name:
Method or attribute name: function clearTimeout(timeoutID?: number): void;
Initial version: 7|Class name:
Method or attribute name: function clearTimeout(timeoutID?: number): void;
Initial version: 10|global.d.ts| -|Initial version changed|Class name:
Method or attribute name: function canIUse(syscap: string): boolean;
Initial version: 8|Class name:
Method or attribute name: function canIUse(syscap: string): boolean;
Initial version: 10|global.d.ts| -|Initial version changed|Class name:
Method or attribute name: function getInspectorByKey(id: string): string;
Initial version: 9|Class name:
Method or attribute name: function getInspectorByKey(id: string): string;
Initial version: 10|global.d.ts| -|Initial version changed|Class name:
Method or attribute name: function getInspectorTree(): Object;
Initial version: 9|Class name:
Method or attribute name: function getInspectorTree(): Object;
Initial version: 10|global.d.ts| -|Initial version changed|Class name:
Method or attribute name: function sendEventByKey(id: string, action: number, params: string): boolean;
Initial version: 9|Class name:
Method or attribute name: function sendEventByKey(id: string, action: number, params: string): boolean;
Initial version: 10|global.d.ts| -|Initial version changed|Class name:
Method or attribute name: function sendTouchEvent(event: TouchObject): boolean;
Initial version: 9|Class name:
Method or attribute name: function sendTouchEvent(event: TouchObject): boolean;
Initial version: 10|global.d.ts| -|Initial version changed|Class name:
Method or attribute name: function sendKeyEvent(event: KeyEvent): boolean;
Initial version: 9|Class name:
Method or attribute name: function sendKeyEvent(event: KeyEvent): boolean;
Initial version: 10|global.d.ts| -|Initial version changed|Class name:
Method or attribute name: function sendMouseEvent(event: MouseEvent): boolean;
Initial version: 9|Class name:
Method or attribute name: function sendMouseEvent(event: MouseEvent): boolean;
Initial version: 10|global.d.ts| -|Initial version changed|Class name: AnimatorOptions
Initial version: 6|Class name: AnimatorOptions
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorOptions
Method or attribute name: duration: number;
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: duration: number;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorOptions
Method or attribute name: easing: string;
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: easing: string;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorOptions
Method or attribute name: delay: number;
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: delay: number;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorOptions
Method or attribute name: fill: "none" \| "forwards" \| "backwards" \| "both";
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: fill: "none" \| "forwards" \| "backwards" \| "both";
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorOptions
Method or attribute name: direction: "normal" \| "reverse" \| "alternate" \| "alternate-reverse";
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: direction: "normal" \| "reverse" \| "alternate" \| "alternate-reverse";
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorOptions
Method or attribute name: iterations: number;
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: iterations: number;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorOptions
Method or attribute name: begin: number;
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: begin: number;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorOptions
Method or attribute name: end: number;
Initial version: 6|Class name: AnimatorOptions
Method or attribute name: end: number;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorResult
Initial version: 6|Class name: AnimatorResult
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorResult
Method or attribute name: reset(options: AnimatorOptions): void;
Initial version: 9|Class name: AnimatorResult
Method or attribute name: reset(options: AnimatorOptions): void;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorResult
Method or attribute name: play(): void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: play(): void;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorResult
Method or attribute name: finish(): void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: finish(): void;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorResult
Method or attribute name: pause(): void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: pause(): void;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorResult
Method or attribute name: cancel(): void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: cancel(): void;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorResult
Method or attribute name: reverse(): void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: reverse(): void;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorResult
Method or attribute name: onframe: (progress: number) => void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: onframe: (progress: number) => void;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorResult
Method or attribute name: onfinish: () => void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: onfinish: () => void;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorResult
Method or attribute name: oncancel: () => void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: oncancel: () => void;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: AnimatorResult
Method or attribute name: onrepeat: () => void;
Initial version: 6|Class name: AnimatorResult
Method or attribute name: onrepeat: () => void;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: Animator
Initial version: 6|Class name: Animator
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: Animator
Method or attribute name: static create(options: AnimatorOptions): AnimatorResult;
Initial version: 9|Class name: Animator
Method or attribute name: static create(options: AnimatorOptions): AnimatorResult;
Initial version: 10|@ohos.animator.d.ts| -|Initial version changed|Class name: curves
Initial version: 7|Class name: curves
Initial version: 10|@ohos.curves.d.ts| -|Initial version changed|Class name: Curve
Initial version: 7|Class name: Curve
Initial version: 10|@ohos.curves.d.ts| -|Initial version changed|Class name: ICurve
Initial version: 9|Class name: ICurve
Initial version: 10|@ohos.curves.d.ts| -|Initial version changed|Class name: curves
Method or attribute name: function initCurve(curve?: Curve): ICurve;
Initial version: 9|Class name: curves
Method or attribute name: function initCurve(curve?: Curve): ICurve;
Initial version: 10|@ohos.curves.d.ts| -|Initial version changed|Class name: curves
Method or attribute name: function stepsCurve(count: number, end: boolean): ICurve;
Initial version: 9|Class name: curves
Method or attribute name: function stepsCurve(count: number, end: boolean): ICurve;
Initial version: 10|@ohos.curves.d.ts| -|Initial version changed|Class name: curves
Method or attribute name: function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve;
Initial version: 9|Class name: curves
Method or attribute name: function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve;
Initial version: 10|@ohos.curves.d.ts| -|Initial version changed|Class name: curves
Method or attribute name: function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve;
Initial version: 9|Class name: curves
Method or attribute name: function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve;
Initial version: 10|@ohos.curves.d.ts| -|Initial version changed|Class name: curves
Method or attribute name: function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve;
Initial version: 9|Class name: curves
Method or attribute name: function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve;
Initial version: 10|@ohos.curves.d.ts| -|Initial version changed|Class name: curves
Method or attribute name: function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve;
Initial version: 9|Class name: curves
Method or attribute name: function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve;
Initial version: 10|@ohos.curves.d.ts| -|Initial version changed|Class name: matrix4
Initial version: 7|Class name: matrix4
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: TranslateOption
Initial version: 7|Class name: TranslateOption
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: TranslateOption
Method or attribute name: x?: number;
Initial version: 7|Class name: TranslateOption
Method or attribute name: x?: number;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: TranslateOption
Method or attribute name: y?: number;
Initial version: 7|Class name: TranslateOption
Method or attribute name: y?: number;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: TranslateOption
Method or attribute name: z?: number;
Initial version: 7|Class name: TranslateOption
Method or attribute name: z?: number;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: ScaleOption
Initial version: 7|Class name: ScaleOption
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: ScaleOption
Method or attribute name: x?: number;
Initial version: 7|Class name: ScaleOption
Method or attribute name: x?: number;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: ScaleOption
Method or attribute name: y?: number;
Initial version: 7|Class name: ScaleOption
Method or attribute name: y?: number;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: ScaleOption
Method or attribute name: z?: number;
Initial version: 7|Class name: ScaleOption
Method or attribute name: z?: number;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: ScaleOption
Method or attribute name: centerX?: number;
Initial version: 7|Class name: ScaleOption
Method or attribute name: centerX?: number;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: ScaleOption
Method or attribute name: centerY?: number;
Initial version: 7|Class name: ScaleOption
Method or attribute name: centerY?: number;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: RotateOption
Initial version: 7|Class name: RotateOption
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: RotateOption
Method or attribute name: x?: number;
Initial version: 7|Class name: RotateOption
Method or attribute name: x?: number;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: RotateOption
Method or attribute name: y?: number;
Initial version: 7|Class name: RotateOption
Method or attribute name: y?: number;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: RotateOption
Method or attribute name: z?: number;
Initial version: 7|Class name: RotateOption
Method or attribute name: z?: number;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: RotateOption
Method or attribute name: centerX?: number;
Initial version: 7|Class name: RotateOption
Method or attribute name: centerX?: number;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: RotateOption
Method or attribute name: centerY?: number;
Initial version: 7|Class name: RotateOption
Method or attribute name: centerY?: number;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: RotateOption
Method or attribute name: angle?: number;
Initial version: 7|Class name: RotateOption
Method or attribute name: angle?: number;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: Matrix4Transit
Initial version: 7|Class name: Matrix4Transit
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: Matrix4Transit
Method or attribute name: copy(): Matrix4Transit;
Initial version: 7|Class name: Matrix4Transit
Method or attribute name: copy(): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: Matrix4Transit
Method or attribute name: invert(): Matrix4Transit;
Initial version: 7|Class name: Matrix4Transit
Method or attribute name: invert(): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: Matrix4Transit
Method or attribute name: combine(options: Matrix4Transit): Matrix4Transit;
Initial version: 7|Class name: Matrix4Transit
Method or attribute name: combine(options: Matrix4Transit): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: Matrix4Transit
Method or attribute name: translate(options: TranslateOption): Matrix4Transit;
Initial version: 7|Class name: Matrix4Transit
Method or attribute name: translate(options: TranslateOption): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: Matrix4Transit
Method or attribute name: scale(options: ScaleOption): Matrix4Transit;
Initial version: 7|Class name: Matrix4Transit
Method or attribute name: scale(options: ScaleOption): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: Matrix4Transit
Method or attribute name: rotate(options: RotateOption): Matrix4Transit;
Initial version: 7|Class name: Matrix4Transit
Method or attribute name: rotate(options: RotateOption): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: Matrix4Transit
Method or attribute name: transformPoint(options: [number, number]): [number, number];
Initial version: 7|Class name: Matrix4Transit
Method or attribute name: transformPoint(options: [number, number]): [number, number];
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: matrix4
Method or attribute name: function identity(): Matrix4Transit;
Initial version: 7|Class name: matrix4
Method or attribute name: function identity(): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: matrix4
Method or attribute name: function copy(): Matrix4Transit;
Initial version: 7|Class name: matrix4
Method or attribute name: function copy(): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: matrix4
Method or attribute name: function invert(): Matrix4Transit;
Initial version: 7|Class name: matrix4
Method or attribute name: function invert(): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: matrix4
Method or attribute name: function combine(options: Matrix4Transit): Matrix4Transit;
Initial version: 7|Class name: matrix4
Method or attribute name: function combine(options: Matrix4Transit): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: matrix4
Method or attribute name: function translate(options: TranslateOption): Matrix4Transit;
Initial version: 7|Class name: matrix4
Method or attribute name: function translate(options: TranslateOption): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: matrix4
Method or attribute name: function scale(options: ScaleOption): Matrix4Transit;
Initial version: 7|Class name: matrix4
Method or attribute name: function scale(options: ScaleOption): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: matrix4
Method or attribute name: function rotate(options: RotateOption): Matrix4Transit;
Initial version: 7|Class name: matrix4
Method or attribute name: function rotate(options: RotateOption): Matrix4Transit;
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: matrix4
Method or attribute name: function transformPoint(options: [number, number]): [number, number];
Initial version: 7|Class name: matrix4
Method or attribute name: function transformPoint(options: [number, number]): [number, number];
Initial version: 10|@ohos.matrix4.d.ts| -|Initial version changed|Class name: mediaquery
Initial version: 7|Class name: mediaquery
Initial version: 10|@ohos.mediaquery.d.ts| -|Initial version changed|Class name: MediaQueryResult
Method or attribute name: readonly matches: boolean;
Initial version: 7|Class name: MediaQueryResult
Method or attribute name: readonly matches: boolean;
Initial version: 10|@ohos.mediaquery.d.ts| -|Initial version changed|Class name: MediaQueryResult
Method or attribute name: readonly media: string;
Initial version: 7|Class name: MediaQueryResult
Method or attribute name: readonly media: string;
Initial version: 10|@ohos.mediaquery.d.ts| -|Initial version changed|Class name: MediaQueryListener
Method or attribute name: on(type: 'change', callback: Callback\): void;
Initial version: 7|Class name: MediaQueryListener
Method or attribute name: on(type: 'change', callback: Callback\): void;
Initial version: 10|@ohos.mediaquery.d.ts| -|Initial version changed|Class name: MediaQueryListener
Method or attribute name: off(type: 'change', callback?: Callback\): void;
Initial version: 7|Class name: MediaQueryListener
Method or attribute name: off(type: 'change', callback?: Callback\): void;
Initial version: 10|@ohos.mediaquery.d.ts| -|Initial version changed|Class name: mediaquery
Method or attribute name: function matchMediaSync(condition: string): MediaQueryListener;
Initial version: 7|Class name: mediaquery
Method or attribute name: function matchMediaSync(condition: string): MediaQueryListener;
Initial version: 10|@ohos.mediaquery.d.ts| -|Initial version changed|Class name: promptAction
Initial version: 9|Class name: promptAction
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ShowToastOptions
Initial version: 9|Class name: ShowToastOptions
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ShowToastOptions
Method or attribute name: message: string \| Resource;
Initial version: 9|Class name: ShowToastOptions
Method or attribute name: message: string \| Resource;
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ShowToastOptions
Method or attribute name: duration?: number;
Initial version: 9|Class name: ShowToastOptions
Method or attribute name: duration?: number;
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ShowToastOptions
Method or attribute name: bottom?: string \| number;
Initial version: 9|Class name: ShowToastOptions
Method or attribute name: bottom?: string \| number;
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: Button
Initial version: 9|Class name: Button
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: Button
Method or attribute name: text: string \| Resource;
Initial version: 9|Class name: Button
Method or attribute name: text: string \| Resource;
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: Button
Method or attribute name: color: string \| Resource;
Initial version: 9|Class name: Button
Method or attribute name: color: string \| Resource;
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ShowDialogSuccessResponse
Initial version: 9|Class name: ShowDialogSuccessResponse
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ShowDialogSuccessResponse
Method or attribute name: index: number;
Initial version: 9|Class name: ShowDialogSuccessResponse
Method or attribute name: index: number;
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ShowDialogOptions
Initial version: 9|Class name: ShowDialogOptions
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ShowDialogOptions
Method or attribute name: title?: string \| Resource;
Initial version: 9|Class name: ShowDialogOptions
Method or attribute name: title?: string \| Resource;
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ShowDialogOptions
Method or attribute name: message?: string \| Resource;
Initial version: 9|Class name: ShowDialogOptions
Method or attribute name: message?: string \| Resource;
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ShowDialogOptions
Method or attribute name: buttons?: [Button, Button?, Button?];
Initial version: 9|Class name: ShowDialogOptions
Method or attribute name: buttons?: [Button, Button?, Button?];
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ActionMenuSuccessResponse
Initial version: 9|Class name: ActionMenuSuccessResponse
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ActionMenuSuccessResponse
Method or attribute name: index: number;
Initial version: 9|Class name: ActionMenuSuccessResponse
Method or attribute name: index: number;
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ActionMenuOptions
Initial version: 9|Class name: ActionMenuOptions
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ActionMenuOptions
Method or attribute name: title?: string \| Resource;
Initial version: 9|Class name: ActionMenuOptions
Method or attribute name: title?: string \| Resource;
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: ActionMenuOptions
Method or attribute name: buttons: [Button, Button?, Button?, Button?, Button?, Button?];
Initial version: 9|Class name: ActionMenuOptions
Method or attribute name: buttons: [Button, Button?, Button?, Button?, Button?, Button?];
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: promptAction
Method or attribute name: function showDialog(options: ShowDialogOptions): Promise\;
Initial version: 9|Class name: promptAction
Method or attribute name: function showDialog(options: ShowDialogOptions): Promise\;
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: promptAction
Method or attribute name: function showActionMenu(options: ActionMenuOptions): Promise\;
Initial version: 9|Class name: promptAction
Method or attribute name: function showActionMenu(options: ActionMenuOptions): Promise\;
Initial version: 10|@ohos.promptAction.d.ts| -|Initial version changed|Class name: SheetInfo
Initial version: 8|Class name: SheetInfo
Initial version: 10|action_sheet.d.ts| -|Initial version changed|Class name: SheetInfo
Method or attribute name: title: string \| Resource;
Initial version: 8|Class name: SheetInfo
Method or attribute name: title: string \| Resource;
Initial version: 10|action_sheet.d.ts| -|Initial version changed|Class name: SheetInfo
Method or attribute name: icon?: string \| Resource;
Initial version: 8|Class name: SheetInfo
Method or attribute name: icon?: string \| Resource;
Initial version: 10|action_sheet.d.ts| -|Initial version changed|Class name: SheetInfo
Method or attribute name: action: () => void;
Initial version: 8|Class name: SheetInfo
Method or attribute name: action: () => void;
Initial version: 10|action_sheet.d.ts| -|Initial version changed|Class name: ActionSheet
Initial version: 8|Class name: ActionSheet
Initial version: 10|action_sheet.d.ts| -|Initial version changed|Class name: DialogAlignment
Initial version: 7|Class name: DialogAlignment
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: DialogAlignment
Method or attribute name: Top
Initial version: 7|Class name: DialogAlignment
Method or attribute name: Top
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: DialogAlignment
Method or attribute name: Center
Initial version: 7|Class name: DialogAlignment
Method or attribute name: Center
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: DialogAlignment
Method or attribute name: Bottom
Initial version: 7|Class name: DialogAlignment
Method or attribute name: Bottom
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: DialogAlignment
Method or attribute name: Default
Initial version: 7|Class name: DialogAlignment
Method or attribute name: Default
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: DialogAlignment
Method or attribute name: TopStart
Initial version: 8|Class name: DialogAlignment
Method or attribute name: TopStart
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: DialogAlignment
Method or attribute name: TopEnd
Initial version: 8|Class name: DialogAlignment
Method or attribute name: TopEnd
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: DialogAlignment
Method or attribute name: CenterStart
Initial version: 8|Class name: DialogAlignment
Method or attribute name: CenterStart
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: DialogAlignment
Method or attribute name: CenterEnd
Initial version: 8|Class name: DialogAlignment
Method or attribute name: CenterEnd
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: DialogAlignment
Method or attribute name: BottomStart
Initial version: 8|Class name: DialogAlignment
Method or attribute name: BottomStart
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: DialogAlignment
Method or attribute name: BottomEnd
Initial version: 8|Class name: DialogAlignment
Method or attribute name: BottomEnd
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: AlertDialogParam
Initial version: 7|Class name: AlertDialogParam
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: AlertDialogParam
Method or attribute name: title?: ResourceStr;
Initial version: 7|Class name: AlertDialogParam
Method or attribute name: title?: ResourceStr;
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: AlertDialogParam
Method or attribute name: message: ResourceStr;
Initial version: 7|Class name: AlertDialogParam
Method or attribute name: message: ResourceStr;
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: AlertDialogParam
Method or attribute name: autoCancel?: boolean;
Initial version: 7|Class name: AlertDialogParam
Method or attribute name: autoCancel?: boolean;
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: AlertDialogParam
Method or attribute name: cancel?: () => void;
Initial version: 7|Class name: AlertDialogParam
Method or attribute name: cancel?: () => void;
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: AlertDialogParam
Method or attribute name: alignment?: DialogAlignment;
Initial version: 7|Class name: AlertDialogParam
Method or attribute name: alignment?: DialogAlignment;
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: AlertDialogParam
Method or attribute name: offset?: Offset;
Initial version: 7|Class name: AlertDialogParam
Method or attribute name: offset?: Offset;
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: AlertDialogParam
Method or attribute name: gridCount?: number;
Initial version: 7|Class name: AlertDialogParam
Method or attribute name: gridCount?: number;
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: AlertDialogParamWithConfirm
Initial version: 7|Class name: AlertDialogParamWithConfirm
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: AlertDialogParamWithButtons
Initial version: 7|Class name: AlertDialogParamWithButtons
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: AlertDialog
Initial version: 7|Class name: AlertDialog
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: AlertDialog
Method or attribute name: static show(value: AlertDialogParamWithConfirm \| AlertDialogParamWithButtons);
Initial version: 7|Class name: AlertDialog
Method or attribute name: static show(value: AlertDialogParamWithConfirm \| AlertDialogParamWithButtons);
Initial version: 10|alert_dialog.d.ts| -|Initial version changed|Class name: IndexerAlign
Initial version: 7|Class name: IndexerAlign
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: IndexerAlign
Method or attribute name: Left
Initial version: 7|Class name: IndexerAlign
Method or attribute name: Left
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: IndexerAlign
Method or attribute name: Right
Initial version: 7|Class name: IndexerAlign
Method or attribute name: Right
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerInterface
Initial version: 7|Class name: AlphabetIndexerInterface
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerInterface
Method or attribute name: (value: { arrayValue: Array\; selected: number }): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerInterface
Method or attribute name: (value: { arrayValue: Array\; selected: number }): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Initial version: 7|Class name: AlphabetIndexerAttribute
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: color(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: color(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: selectedColor(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: selectedColor(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: popupColor(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: popupColor(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: selectedBackgroundColor(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: selectedBackgroundColor(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: popupBackground(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: popupBackground(value: ResourceColor): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: usingPopup(value: boolean): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: usingPopup(value: boolean): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: selectedFont(value: Font): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: selectedFont(value: Font): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: popupFont(value: Font): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: popupFont(value: Font): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: itemSize(value: string \| number): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: itemSize(value: string \| number): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: font(value: Font): AlphabetIndexerAttribute;
Initial version: 7|Class name: AlphabetIndexerAttribute
Method or attribute name: font(value: Font): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: onSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
Initial version: 8|Class name: AlphabetIndexerAttribute
Method or attribute name: onSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: onRequestPopupData(callback: (index: number) => Array\): AlphabetIndexerAttribute;
Initial version: 8|Class name: AlphabetIndexerAttribute
Method or attribute name: onRequestPopupData(callback: (index: number) => Array\): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: onPopupSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
Initial version: 8|Class name: AlphabetIndexerAttribute
Method or attribute name: onPopupSelect(callback: (index: number) => void): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: selected(index: number): AlphabetIndexerAttribute;
Initial version: 8|Class name: AlphabetIndexerAttribute
Method or attribute name: selected(index: number): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: AlphabetIndexerAttribute
Method or attribute name: popupPosition(value: Position): AlphabetIndexerAttribute;
Initial version: 8|Class name: AlphabetIndexerAttribute
Method or attribute name: popupPosition(value: Position): AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const AlphabetIndexer: AlphabetIndexerInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const AlphabetIndexer: AlphabetIndexerInterface;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const AlphabetIndexerInstance: AlphabetIndexerAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const AlphabetIndexerInstance: AlphabetIndexerAttribute;
Initial version: 10|alphabet_indexer.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const AnimatorInstance: AnimatorAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const AnimatorInstance: AnimatorAttribute;
Initial version: 9|animator.d.ts| -|Initial version changed|Class name: CalendarDay
Initial version: 7|Class name: CalendarDay
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarDay
Method or attribute name: index: number;
Initial version: 7|Class name: CalendarDay
Method or attribute name: index: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarDay
Method or attribute name: lunarMonth: string;
Initial version: 7|Class name: CalendarDay
Method or attribute name: lunarMonth: string;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarDay
Method or attribute name: lunarDay: string;
Initial version: 7|Class name: CalendarDay
Method or attribute name: lunarDay: string;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarDay
Method or attribute name: dayMark: string;
Initial version: 7|Class name: CalendarDay
Method or attribute name: dayMark: string;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarDay
Method or attribute name: dayMarkValue: string;
Initial version: 7|Class name: CalendarDay
Method or attribute name: dayMarkValue: string;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarDay
Method or attribute name: year: number;
Initial version: 7|Class name: CalendarDay
Method or attribute name: year: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarDay
Method or attribute name: month: number;
Initial version: 7|Class name: CalendarDay
Method or attribute name: month: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarDay
Method or attribute name: day: number;
Initial version: 7|Class name: CalendarDay
Method or attribute name: day: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarDay
Method or attribute name: isFirstOfLunar: boolean;
Initial version: 7|Class name: CalendarDay
Method or attribute name: isFirstOfLunar: boolean;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarDay
Method or attribute name: hasSchedule: boolean;
Initial version: 7|Class name: CalendarDay
Method or attribute name: hasSchedule: boolean;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarDay
Method or attribute name: markLunarDay: boolean;
Initial version: 7|Class name: CalendarDay
Method or attribute name: markLunarDay: boolean;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: MonthData
Initial version: 7|Class name: MonthData
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: MonthData
Method or attribute name: year: number;
Initial version: 7|Class name: MonthData
Method or attribute name: year: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: MonthData
Method or attribute name: month: number;
Initial version: 7|Class name: MonthData
Method or attribute name: month: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: MonthData
Method or attribute name: data: CalendarDay[];
Initial version: 7|Class name: MonthData
Method or attribute name: data: CalendarDay[];
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Initial version: 7|Class name: CurrentDayStyle
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: dayColor?: ResourceColor;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: dayColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: lunarColor?: ResourceColor;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: lunarColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: markLunarColor?: ResourceColor;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: markLunarColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: dayFontSize?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: dayFontSize?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: lunarDayFontSize?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: lunarDayFontSize?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: dayHeight?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: dayHeight?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: dayWidth?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: dayWidth?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: gregorianCalendarHeight?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: gregorianCalendarHeight?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: dayYAxisOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: dayYAxisOffset?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: lunarDayYAxisOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: lunarDayYAxisOffset?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: underscoreXAxisOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: underscoreXAxisOffset?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: underscoreYAxisOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: underscoreYAxisOffset?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: scheduleMarkerXAxisOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: scheduleMarkerXAxisOffset?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: scheduleMarkerYAxisOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: scheduleMarkerYAxisOffset?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: colSpace?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: colSpace?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: dailyFiveRowSpace?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: dailyFiveRowSpace?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: dailySixRowSpace?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: dailySixRowSpace?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: lunarHeight?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: lunarHeight?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: underscoreWidth?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: underscoreWidth?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: underscoreLength?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: underscoreLength?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: scheduleMarkerRadius?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: scheduleMarkerRadius?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: boundaryRowOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: boundaryRowOffset?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CurrentDayStyle
Method or attribute name: boundaryColOffset?: number;
Initial version: 7|Class name: CurrentDayStyle
Method or attribute name: boundaryColOffset?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: NonCurrentDayStyle
Initial version: 7|Class name: NonCurrentDayStyle
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthDayColor?: ResourceColor;
Initial version: 7|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthDayColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthLunarColor?: ResourceColor;
Initial version: 7|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthLunarColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthWorkDayMarkColor?: ResourceColor;
Initial version: 7|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthWorkDayMarkColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthOffDayMarkColor?: ResourceColor;
Initial version: 7|Class name: NonCurrentDayStyle
Method or attribute name: nonCurrentMonthOffDayMarkColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: TodayStyle
Initial version: 7|Class name: TodayStyle
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: TodayStyle
Method or attribute name: focusedDayColor?: ResourceColor;
Initial version: 7|Class name: TodayStyle
Method or attribute name: focusedDayColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: TodayStyle
Method or attribute name: focusedLunarColor?: ResourceColor;
Initial version: 7|Class name: TodayStyle
Method or attribute name: focusedLunarColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: TodayStyle
Method or attribute name: focusedAreaBackgroundColor?: ResourceColor;
Initial version: 7|Class name: TodayStyle
Method or attribute name: focusedAreaBackgroundColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: TodayStyle
Method or attribute name: focusedAreaRadius?: number;
Initial version: 7|Class name: TodayStyle
Method or attribute name: focusedAreaRadius?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WeekStyle
Initial version: 7|Class name: WeekStyle
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WeekStyle
Method or attribute name: weekColor?: ResourceColor;
Initial version: 7|Class name: WeekStyle
Method or attribute name: weekColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WeekStyle
Method or attribute name: weekendDayColor?: ResourceColor;
Initial version: 7|Class name: WeekStyle
Method or attribute name: weekendDayColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WeekStyle
Method or attribute name: weekendLunarColor?: ResourceColor;
Initial version: 7|Class name: WeekStyle
Method or attribute name: weekendLunarColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WeekStyle
Method or attribute name: weekFontSize?: number;
Initial version: 7|Class name: WeekStyle
Method or attribute name: weekFontSize?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WeekStyle
Method or attribute name: weekHeight?: number;
Initial version: 7|Class name: WeekStyle
Method or attribute name: weekHeight?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WeekStyle
Method or attribute name: weekWidth?: number;
Initial version: 7|Class name: WeekStyle
Method or attribute name: weekWidth?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WeekStyle
Method or attribute name: weekAndDayRowSpace?: number;
Initial version: 7|Class name: WeekStyle
Method or attribute name: weekAndDayRowSpace?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WorkStateStyle
Initial version: 7|Class name: WorkStateStyle
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WorkStateStyle
Method or attribute name: workDayMarkColor?: ResourceColor;
Initial version: 7|Class name: WorkStateStyle
Method or attribute name: workDayMarkColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WorkStateStyle
Method or attribute name: offDayMarkColor?: ResourceColor;
Initial version: 7|Class name: WorkStateStyle
Method or attribute name: offDayMarkColor?: ResourceColor;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WorkStateStyle
Method or attribute name: workDayMarkSize?: number;
Initial version: 7|Class name: WorkStateStyle
Method or attribute name: workDayMarkSize?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WorkStateStyle
Method or attribute name: offDayMarkSize?: number;
Initial version: 7|Class name: WorkStateStyle
Method or attribute name: offDayMarkSize?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WorkStateStyle
Method or attribute name: workStateWidth?: number;
Initial version: 7|Class name: WorkStateStyle
Method or attribute name: workStateWidth?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WorkStateStyle
Method or attribute name: workStateHorizontalMovingDistance?: number;
Initial version: 7|Class name: WorkStateStyle
Method or attribute name: workStateHorizontalMovingDistance?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: WorkStateStyle
Method or attribute name: workStateVerticalMovingDistance?: number;
Initial version: 7|Class name: WorkStateStyle
Method or attribute name: workStateVerticalMovingDistance?: number;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarController
Initial version: 7|Class name: CalendarController
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarController
Method or attribute name: constructor();
Initial version: 7|Class name: CalendarController
Method or attribute name: constructor();
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarController
Method or attribute name: backToToday();
Initial version: 7|Class name: CalendarController
Method or attribute name: backToToday();
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarController
Method or attribute name: goTo(value: { year: number; month: number; day: number });
Initial version: 7|Class name: CalendarController
Method or attribute name: goTo(value: { year: number; month: number; day: number });
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarInterface
Initial version: 7|Class name: CalendarInterface
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarInterface
Method or attribute name: (value: {
date: { year: number; month: number; day: number };
currentData: MonthData;
preData: MonthData;
nextData: MonthData;
controller?: CalendarController;
}): CalendarAttribute;
Initial version: 7|Class name: CalendarInterface
Method or attribute name: (value: {
date: { year: number; month: number; day: number };
currentData: MonthData;
preData: MonthData;
nextData: MonthData;
controller?: CalendarController;
}): CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarAttribute
Initial version: 7|Class name: CalendarAttribute
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarAttribute
Method or attribute name: showLunar(value: boolean): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: showLunar(value: boolean): CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarAttribute
Method or attribute name: showHoliday(value: boolean): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: showHoliday(value: boolean): CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarAttribute
Method or attribute name: needSlide(value: boolean): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: needSlide(value: boolean): CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarAttribute
Method or attribute name: startOfWeek(value: number): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: startOfWeek(value: number): CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarAttribute
Method or attribute name: offDays(value: number): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: offDays(value: number): CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarAttribute
Method or attribute name: direction(value: Axis): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: direction(value: Axis): CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarAttribute
Method or attribute name: currentDayStyle(value: CurrentDayStyle): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: currentDayStyle(value: CurrentDayStyle): CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarAttribute
Method or attribute name: nonCurrentDayStyle(value: NonCurrentDayStyle): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: nonCurrentDayStyle(value: NonCurrentDayStyle): CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarAttribute
Method or attribute name: todayStyle(value: TodayStyle): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: todayStyle(value: TodayStyle): CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarAttribute
Method or attribute name: weekStyle(value: WeekStyle): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: weekStyle(value: WeekStyle): CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarAttribute
Method or attribute name: workStateStyle(value: WorkStateStyle): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: workStateStyle(value: WorkStateStyle): CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarAttribute
Method or attribute name: onSelectChange(event: (event: { year: number; month: number; day: number }) => void): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: onSelectChange(event: (event: { year: number; month: number; day: number }) => void): CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: CalendarAttribute
Method or attribute name: onRequestData(
event: (event: {
year: number;
month: number;
currentYear: number;
currentMonth: number;
monthState: number;
}) => void,
): CalendarAttribute;
Initial version: 7|Class name: CalendarAttribute
Method or attribute name: onRequestData(
event: (event: {
year: number;
month: number;
currentYear: number;
currentMonth: number;
monthState: number;
}) => void,
): CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Calendar: CalendarInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Calendar: CalendarInterface;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const CalendarInstance: CalendarAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const CalendarInstance: CalendarAttribute;
Initial version: 10|calendar.d.ts| -|Initial version changed|Class name: ImageBitmap
Method or attribute name: constructor(data: PixelMap);
Initial version: 8|Class name: ImageBitmap
Method or attribute name: constructor(data: PixelMap);
Initial version: 10|canvas.d.ts| -|Initial version changed|Class name: CanvasRenderer
Method or attribute name: getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap;
Initial version: 8|Class name: CanvasRenderer
Method or attribute name: getPixelMap(sx: number, sy: number, sw: number, sh: number): PixelMap;
Initial version: 10|canvas.d.ts| -|Initial version changed|Class name: CanvasRenderer
Method or attribute name: setPixelMap(value?: PixelMap): void;
Initial version: 8|Class name: CanvasRenderer
Method or attribute name: setPixelMap(value?: PixelMap): void;
Initial version: 10|canvas.d.ts| -|Initial version changed|Class name: ColumnSplitInterface
Initial version: 7|Class name: ColumnSplitInterface
Initial version: 10|column_split.d.ts| -|Initial version changed|Class name: ColumnSplitInterface
Method or attribute name: (): ColumnSplitAttribute;
Initial version: 7|Class name: ColumnSplitInterface
Method or attribute name: (): ColumnSplitAttribute;
Initial version: 10|column_split.d.ts| -|Initial version changed|Class name: ColumnSplitAttribute
Initial version: 7|Class name: ColumnSplitAttribute
Initial version: 10|column_split.d.ts| -|Initial version changed|Class name: ColumnSplitAttribute
Method or attribute name: resizeable(value: boolean): ColumnSplitAttribute;
Initial version: 7|Class name: ColumnSplitAttribute
Method or attribute name: resizeable(value: boolean): ColumnSplitAttribute;
Initial version: 10|column_split.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const ColumnSplitInstance: ColumnSplitAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const ColumnSplitInstance: ColumnSplitAttribute;
Initial version: 10|column_split.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const ColumnSplit: ColumnSplitInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const ColumnSplit: ColumnSplitInterface;
Initial version: 10|column_split.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const StorageProp: (value: string) => PropertyDecorator;
Initial version: 7|Class name: global
Method or attribute name: declare const StorageProp: (value: string) => PropertyDecorator;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const StorageLink: (value: string) => PropertyDecorator;
Initial version: 7|Class name: global
Method or attribute name: declare const StorageLink: (value: string) => PropertyDecorator;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Concurrent: MethodDecorator;
Initial version: 9|Class name: global
Method or attribute name: declare const Concurrent: MethodDecorator;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const CustomDialog: ClassDecorator;
Initial version: 7|Class name: global
Method or attribute name: declare const CustomDialog: ClassDecorator;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const LocalStorageLink: (value: string) => PropertyDecorator;
Initial version: 9|Class name: global
Method or attribute name: declare const LocalStorageLink: (value: string) => PropertyDecorator;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const LocalStorageProp: (value: string) => PropertyDecorator;
Initial version: 9|Class name: global
Method or attribute name: declare const LocalStorageProp: (value: string) => PropertyDecorator;
Initial version: 10|common.d.ts| -|Initial version changed|Class name:
Method or attribute name: function getContext(component?: Object): Context;
Initial version: 9|Class name:
Method or attribute name: function getContext(component?: Object): Context;
Initial version: 10|common.d.ts| -|Initial version changed|Class name:
Method or attribute name: function postCardAction(component: Object, action: Object): void;
Initial version: 9|Class name:
Method or attribute name: function postCardAction(component: Object, action: Object): void;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: AnimateParam
Method or attribute name: tempo?: number;
Initial version: 7|Class name: AnimateParam
Method or attribute name: tempo?: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: AnimateParam
Method or attribute name: delay?: number;
Initial version: 7|Class name: AnimateParam
Method or attribute name: delay?: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: AnimateParam
Method or attribute name: iterations?: number;
Initial version: 7|Class name: AnimateParam
Method or attribute name: iterations?: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: ICurve
Initial version: 9|Class name: ICurve
Initial version: 10|common.d.ts| -|Initial version changed|Class name: MotionPathOptions
Initial version: 7|Class name: MotionPathOptions
Initial version: 10|common.d.ts| -|Initial version changed|Class name: MotionPathOptions
Method or attribute name: path: string;
Initial version: 7|Class name: MotionPathOptions
Method or attribute name: path: string;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: MotionPathOptions
Method or attribute name: from?: number;
Initial version: 7|Class name: MotionPathOptions
Method or attribute name: from?: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: MotionPathOptions
Method or attribute name: to?: number;
Initial version: 7|Class name: MotionPathOptions
Method or attribute name: to?: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: MotionPathOptions
Method or attribute name: rotatable?: boolean;
Initial version: 7|Class name: MotionPathOptions
Method or attribute name: rotatable?: boolean;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: sharedTransitionOptions
Initial version: 7|Class name: sharedTransitionOptions
Initial version: 10|common.d.ts| -|Initial version changed|Class name: sharedTransitionOptions
Method or attribute name: duration?: number;
Initial version: 7|Class name: sharedTransitionOptions
Method or attribute name: duration?: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: sharedTransitionOptions
Method or attribute name: curve?: Curve \| string;
Initial version: 7|Class name: sharedTransitionOptions
Method or attribute name: curve?: Curve \| string;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: sharedTransitionOptions
Method or attribute name: delay?: number;
Initial version: 7|Class name: sharedTransitionOptions
Method or attribute name: delay?: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: sharedTransitionOptions
Method or attribute name: motionPath?: MotionPathOptions;
Initial version: 7|Class name: sharedTransitionOptions
Method or attribute name: motionPath?: MotionPathOptions;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: sharedTransitionOptions
Method or attribute name: zIndex?: number;
Initial version: 7|Class name: sharedTransitionOptions
Method or attribute name: zIndex?: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: sharedTransitionOptions
Method or attribute name: type?: SharedTransitionEffectType;
Initial version: 7|Class name: sharedTransitionOptions
Method or attribute name: type?: SharedTransitionEffectType;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: AlignRuleOption
Initial version: 9|Class name: AlignRuleOption
Initial version: 10|common.d.ts| -|Initial version changed|Class name: AlignRuleOption
Method or attribute name: left?: { anchor: string, align: HorizontalAlign };
Initial version: 9|Class name: AlignRuleOption
Method or attribute name: left?: { anchor: string, align: HorizontalAlign };
Initial version: 10|common.d.ts| -|Initial version changed|Class name: AlignRuleOption
Method or attribute name: right?: { anchor: string, align: HorizontalAlign };
Initial version: 9|Class name: AlignRuleOption
Method or attribute name: right?: { anchor: string, align: HorizontalAlign };
Initial version: 10|common.d.ts| -|Initial version changed|Class name: AlignRuleOption
Method or attribute name: middle?: { anchor: string, align: HorizontalAlign };
Initial version: 9|Class name: AlignRuleOption
Method or attribute name: middle?: { anchor: string, align: HorizontalAlign };
Initial version: 10|common.d.ts| -|Initial version changed|Class name: AlignRuleOption
Method or attribute name: top?: { anchor: string, align: VerticalAlign };
Initial version: 9|Class name: AlignRuleOption
Method or attribute name: top?: { anchor: string, align: VerticalAlign };
Initial version: 10|common.d.ts| -|Initial version changed|Class name: AlignRuleOption
Method or attribute name: bottom?: { anchor: string, align: VerticalAlign };
Initial version: 9|Class name: AlignRuleOption
Method or attribute name: bottom?: { anchor: string, align: VerticalAlign };
Initial version: 10|common.d.ts| -|Initial version changed|Class name: AlignRuleOption
Method or attribute name: center?: { anchor: string, align: VerticalAlign };
Initial version: 9|Class name: AlignRuleOption
Method or attribute name: center?: { anchor: string, align: VerticalAlign };
Initial version: 10|common.d.ts| -|Initial version changed|Class name: TransitionOptions
Initial version: 9|Class name: TransitionOptions
Initial version: 7|common.d.ts| -|Initial version changed|Class name: TransitionOptions
Method or attribute name: type?: TransitionType;
Initial version: 9|Class name: TransitionOptions
Method or attribute name: type?: TransitionType;
Initial version: 7|common.d.ts| -|Initial version changed|Class name: TransitionOptions
Method or attribute name: opacity?: number;
Initial version: 9|Class name: TransitionOptions
Method or attribute name: opacity?: number;
Initial version: 7|common.d.ts| -|Initial version changed|Class name: TransitionOptions
Method or attribute name: translate?: TranslateOptions;
Initial version: 9|Class name: TransitionOptions
Method or attribute name: translate?: TranslateOptions;
Initial version: 7|common.d.ts| -|Initial version changed|Class name: TransitionOptions
Method or attribute name: scale?: ScaleOptions;
Initial version: 9|Class name: TransitionOptions
Method or attribute name: scale?: ScaleOptions;
Initial version: 7|common.d.ts| -|Initial version changed|Class name: TransitionOptions
Method or attribute name: rotate?: RotateOptions;
Initial version: 9|Class name: TransitionOptions
Method or attribute name: rotate?: RotateOptions;
Initial version: 7|common.d.ts| -|Initial version changed|Class name: ItemDragInfo
Initial version: 8|Class name: ItemDragInfo
Initial version: 10|common.d.ts| -|Initial version changed|Class name: ItemDragInfo
Method or attribute name: x: number;
Initial version: 8|Class name: ItemDragInfo
Method or attribute name: x: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: ItemDragInfo
Method or attribute name: y: number;
Initial version: 8|Class name: ItemDragInfo
Method or attribute name: y: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: DragItemInfo
Initial version: 8|Class name: DragItemInfo
Initial version: 10|common.d.ts| -|Initial version changed|Class name: DragItemInfo
Method or attribute name: pixelMap?: PixelMap;
Initial version: 8|Class name: DragItemInfo
Method or attribute name: pixelMap?: PixelMap;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: DragItemInfo
Method or attribute name: builder?: CustomBuilder;
Initial version: 8|Class name: DragItemInfo
Method or attribute name: builder?: CustomBuilder;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: DragItemInfo
Method or attribute name: extraInfo?: string;
Initial version: 8|Class name: DragItemInfo
Method or attribute name: extraInfo?: string;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: focusControl
Method or attribute name: function requestFocus(value: string): boolean;
Initial version: 9|Class name: focusControl
Method or attribute name: function requestFocus(value: string): boolean;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: SourceType
Initial version: 8|Class name: SourceType
Initial version: 10|common.d.ts| -|Initial version changed|Class name: SourceType
Method or attribute name: Unknown
Initial version: 8|Class name: SourceType
Method or attribute name: Unknown
Initial version: 10|common.d.ts| -|Initial version changed|Class name: SourceType
Method or attribute name: Mouse
Initial version: 8|Class name: SourceType
Method or attribute name: Mouse
Initial version: 10|common.d.ts| -|Initial version changed|Class name: SourceType
Method or attribute name: TouchScreen
Initial version: 8|Class name: SourceType
Method or attribute name: TouchScreen
Initial version: 10|common.d.ts| -|Initial version changed|Class name: SourceTool
Initial version: 9|Class name: SourceTool
Initial version: 10|common.d.ts| -|Initial version changed|Class name: SourceTool
Method or attribute name: Unknown
Initial version: 9|Class name: SourceTool
Method or attribute name: Unknown
Initial version: 10|common.d.ts| -|Initial version changed|Class name: RepeatMode
Initial version: 9|Class name: RepeatMode
Initial version: 10|common.d.ts| -|Initial version changed|Class name: RepeatMode
Method or attribute name: Repeat
Initial version: 9|Class name: RepeatMode
Method or attribute name: Repeat
Initial version: 10|common.d.ts| -|Initial version changed|Class name: RepeatMode
Method or attribute name: Stretch
Initial version: 9|Class name: RepeatMode
Method or attribute name: Stretch
Initial version: 10|common.d.ts| -|Initial version changed|Class name: RepeatMode
Method or attribute name: Round
Initial version: 9|Class name: RepeatMode
Method or attribute name: Round
Initial version: 10|common.d.ts| -|Initial version changed|Class name: RepeatMode
Method or attribute name: Space
Initial version: 9|Class name: RepeatMode
Method or attribute name: Space
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BlurStyle
Initial version: 9|Class name: BlurStyle
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BlurStyle
Method or attribute name: Thin
Initial version: 9|Class name: BlurStyle
Method or attribute name: Thin
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BlurStyle
Method or attribute name: Regular
Initial version: 9|Class name: BlurStyle
Method or attribute name: Regular
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BlurStyle
Method or attribute name: Thick
Initial version: 9|Class name: BlurStyle
Method or attribute name: Thick
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BaseEvent
Method or attribute name: pressure: number;
Initial version: 9|Class name: BaseEvent
Method or attribute name: pressure: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BaseEvent
Method or attribute name: tiltX: number;
Initial version: 9|Class name: BaseEvent
Method or attribute name: tiltX: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BaseEvent
Method or attribute name: tiltY: number;
Initial version: 9|Class name: BaseEvent
Method or attribute name: tiltY: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BaseEvent
Method or attribute name: sourceTool: SourceTool;
Initial version: 9|Class name: BaseEvent
Method or attribute name: sourceTool: SourceTool;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BorderImageOption
Initial version: 9|Class name: BorderImageOption
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BorderImageOption
Method or attribute name: slice?: Length \| EdgeWidths,
Initial version: 9|Class name: BorderImageOption
Method or attribute name: slice?: Length \| EdgeWidths,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BorderImageOption
Method or attribute name: repeat?: RepeatMode,
Initial version: 9|Class name: BorderImageOption
Method or attribute name: repeat?: RepeatMode,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BorderImageOption
Method or attribute name: source?: string \| Resource \| LinearGradient,
Initial version: 9|Class name: BorderImageOption
Method or attribute name: source?: string \| Resource \| LinearGradient,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BorderImageOption
Method or attribute name: width?: Length \| EdgeWidths,
Initial version: 9|Class name: BorderImageOption
Method or attribute name: width?: Length \| EdgeWidths,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BorderImageOption
Method or attribute name: outset?: Length \| EdgeWidths,
Initial version: 9|Class name: BorderImageOption
Method or attribute name: outset?: Length \| EdgeWidths,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: BorderImageOption
Method or attribute name: fill?: boolean
Initial version: 9|Class name: BorderImageOption
Method or attribute name: fill?: boolean
Initial version: 10|common.d.ts| -|Initial version changed|Class name: MouseEvent
Initial version: 8|Class name: MouseEvent
Initial version: 10|common.d.ts| -|Initial version changed|Class name: MouseEvent
Method or attribute name: button: MouseButton;
Initial version: 8|Class name: MouseEvent
Method or attribute name: button: MouseButton;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: MouseEvent
Method or attribute name: action: MouseAction;
Initial version: 8|Class name: MouseEvent
Method or attribute name: action: MouseAction;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: MouseEvent
Method or attribute name: screenX: number;
Initial version: 8|Class name: MouseEvent
Method or attribute name: screenX: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: MouseEvent
Method or attribute name: screenY: number;
Initial version: 8|Class name: MouseEvent
Method or attribute name: screenY: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: MouseEvent
Method or attribute name: x: number;
Initial version: 8|Class name: MouseEvent
Method or attribute name: x: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: MouseEvent
Method or attribute name: y: number;
Initial version: 8|Class name: MouseEvent
Method or attribute name: y: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: MouseEvent
Method or attribute name: stopPropagation?: () => void;
Initial version: 8|Class name: MouseEvent
Method or attribute name: stopPropagation?: () => void;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: TouchObject
Initial version: 7|Class name: TouchObject
Initial version: 10|common.d.ts| -|Initial version changed|Class name: TouchObject
Method or attribute name: type: TouchType;
Initial version: 7|Class name: TouchObject
Method or attribute name: type: TouchType;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: TouchObject
Method or attribute name: id: number;
Initial version: 7|Class name: TouchObject
Method or attribute name: id: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: TouchObject
Method or attribute name: screenX: number;
Initial version: 7|Class name: TouchObject
Method or attribute name: screenX: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: TouchObject
Method or attribute name: screenY: number;
Initial version: 7|Class name: TouchObject
Method or attribute name: screenY: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: TouchObject
Method or attribute name: x: number;
Initial version: 7|Class name: TouchObject
Method or attribute name: x: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: TouchObject
Method or attribute name: y: number;
Initial version: 7|Class name: TouchObject
Method or attribute name: y: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: TouchEvent
Initial version: 7|Class name: TouchEvent
Initial version: 10|common.d.ts| -|Initial version changed|Class name: TouchEvent
Method or attribute name: type: TouchType;
Initial version: 7|Class name: TouchEvent
Method or attribute name: type: TouchType;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: TouchEvent
Method or attribute name: touches: TouchObject[];
Initial version: 7|Class name: TouchEvent
Method or attribute name: touches: TouchObject[];
Initial version: 10|common.d.ts| -|Initial version changed|Class name: TouchEvent
Method or attribute name: changedTouches: TouchObject[];
Initial version: 7|Class name: TouchEvent
Method or attribute name: changedTouches: TouchObject[];
Initial version: 10|common.d.ts| -|Initial version changed|Class name: TouchEvent
Method or attribute name: stopPropagation?: () => void;
Initial version: 7|Class name: TouchEvent
Method or attribute name: stopPropagation?: () => void;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: DragEvent
Initial version: 7|Class name: DragEvent
Initial version: 10|common.d.ts| -|Initial version changed|Class name: DragEvent
Method or attribute name: getX(): number;
Initial version: 7|Class name: DragEvent
Method or attribute name: getX(): number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: DragEvent
Method or attribute name: getY(): number;
Initial version: 7|Class name: DragEvent
Method or attribute name: getY(): number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: KeyEvent
Initial version: 7|Class name: KeyEvent
Initial version: 10|common.d.ts| -|Initial version changed|Class name: KeyEvent
Method or attribute name: type: KeyType;
Initial version: 7|Class name: KeyEvent
Method or attribute name: type: KeyType;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: KeyEvent
Method or attribute name: keyCode: number;
Initial version: 7|Class name: KeyEvent
Method or attribute name: keyCode: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: KeyEvent
Method or attribute name: keyText: string;
Initial version: 7|Class name: KeyEvent
Method or attribute name: keyText: string;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: KeyEvent
Method or attribute name: keySource: KeySource;
Initial version: 7|Class name: KeyEvent
Method or attribute name: keySource: KeySource;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: KeyEvent
Method or attribute name: deviceId: number;
Initial version: 7|Class name: KeyEvent
Method or attribute name: deviceId: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: KeyEvent
Method or attribute name: metaKey: number;
Initial version: 7|Class name: KeyEvent
Method or attribute name: metaKey: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: KeyEvent
Method or attribute name: timestamp: number;
Initial version: 7|Class name: KeyEvent
Method or attribute name: timestamp: number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: KeyEvent
Method or attribute name: stopPropagation?: () => void;
Initial version: 7|Class name: KeyEvent
Method or attribute name: stopPropagation?: () => void;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: PopupOptions
Initial version: 7|Class name: PopupOptions
Initial version: 10|common.d.ts| -|Initial version changed|Class name: PopupOptions
Method or attribute name: message: string;
Initial version: 7|Class name: PopupOptions
Method or attribute name: message: string;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: PopupOptions
Method or attribute name: arrowOffset?: Length;
Initial version: 9|Class name: PopupOptions
Method or attribute name: arrowOffset?: Length;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: PopupOptions
Method or attribute name: showInSubWindow?: boolean;
Initial version: 9|Class name: PopupOptions
Method or attribute name: showInSubWindow?: boolean;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CustomPopupOptions
Initial version: 8|Class name: CustomPopupOptions
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CustomPopupOptions
Method or attribute name: builder: CustomBuilder;
Initial version: 8|Class name: CustomPopupOptions
Method or attribute name: builder: CustomBuilder;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CustomPopupOptions
Method or attribute name: placement?: Placement;
Initial version: 8|Class name: CustomPopupOptions
Method or attribute name: placement?: Placement;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CustomPopupOptions
Method or attribute name: popupColor?: Color \| string \| Resource \| number;
Initial version: 8|Class name: CustomPopupOptions
Method or attribute name: popupColor?: Color \| string \| Resource \| number;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CustomPopupOptions
Method or attribute name: enableArrow?: boolean;
Initial version: 8|Class name: CustomPopupOptions
Method or attribute name: enableArrow?: boolean;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CustomPopupOptions
Method or attribute name: autoCancel?: boolean;
Initial version: 8|Class name: CustomPopupOptions
Method or attribute name: autoCancel?: boolean;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CustomPopupOptions
Method or attribute name: arrowOffset?: Length;
Initial version: 9|Class name: CustomPopupOptions
Method or attribute name: arrowOffset?: Length;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CustomPopupOptions
Method or attribute name: showInSubWindow?: boolean;
Initial version: 9|Class name: CustomPopupOptions
Method or attribute name: showInSubWindow?: boolean;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: hitTestBehavior(value: HitTestMode): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: hitTestBehavior(value: HitTestMode): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: borderImage(value: BorderImageOption): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: borderImage(value: BorderImageOption): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: onHover(event: (isHover?: boolean) => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onHover(event: (isHover?: boolean) => void): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: hoverEffect(value: HoverEffect): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: hoverEffect(value: HoverEffect): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: onMouse(event: (event?: MouseEvent) => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onMouse(event: (event?: MouseEvent) => void): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: onTouch(event: (event?: TouchEvent) => void): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: onTouch(event: (event?: TouchEvent) => void): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: onKeyEvent(event: (event?: KeyEvent) => void): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: onKeyEvent(event: (event?: KeyEvent) => void): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: focusable(value: boolean): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: focusable(value: boolean): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: onFocus(event: () => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onFocus(event: () => void): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: onBlur(event: () => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onBlur(event: () => void): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: tabIndex(index: number): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: tabIndex(index: number): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: defaultFocus(value: boolean): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: defaultFocus(value: boolean): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: groupDefaultFocus(value: boolean): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: groupDefaultFocus(value: boolean): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: focusOnTouch(value: boolean): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: focusOnTouch(value: boolean): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: gesture(gesture: GestureType, mask?: GestureMask): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: gesture(gesture: GestureType, mask?: GestureMask): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: priorityGesture(gesture: GestureType, mask?: GestureMask): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: priorityGesture(gesture: GestureType, mask?: GestureMask): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: parallelGesture(gesture: GestureType, mask?: GestureMask): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: parallelGesture(gesture: GestureType, mask?: GestureMask): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: gridSpan(value: number): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: gridSpan(value: number): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: gridOffset(value: number): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: gridOffset(value: number): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: transform(value: object): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: transform(value: object): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: onAreaChange(event: (oldValue: Area, newValue: Area) => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onAreaChange(event: (oldValue: Area, newValue: Area) => void): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: sharedTransition(id: string, options?: sharedTransitionOptions): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: sharedTransition(id: string, options?: sharedTransitionOptions): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: alignRules(value: AlignRuleOption): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: alignRules(value: AlignRuleOption): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: onDragStart(event: (event?: DragEvent, extraParams?: string) => CustomBuilder \| DragItemInfo): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onDragStart(event: (event?: DragEvent, extraParams?: string) => CustomBuilder \| DragItemInfo): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: onDragEnter(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onDragEnter(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: onDragMove(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onDragMove(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: onDragLeave(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onDragLeave(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: onDrop(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 8|Class name: CommonMethod
Method or attribute name: onDrop(event: (event?: DragEvent, extraParams?: string) => void): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: motionPath(value: MotionPathOptions): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: motionPath(value: MotionPathOptions): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: geometryTransition(id: string): T;
Initial version: 7|Class name: CommonMethod
Method or attribute name: geometryTransition(id: string): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CommonMethod
Method or attribute name: onVisibleAreaChange(ratios: Array\, event: (isVisible: boolean, currentRatio: number) => void): T;
Initial version: 9|Class name: CommonMethod
Method or attribute name: onVisibleAreaChange(ratios: Array\, event: (isVisible: boolean, currentRatio: number) => void): T;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LinearGradient
Initial version: 9|Class name: LinearGradient
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutBorderInfo
Initial version: 9|Class name: LayoutBorderInfo
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutBorderInfo
Method or attribute name: borderWidth: EdgeWidths,
Initial version: 9|Class name: LayoutBorderInfo
Method or attribute name: borderWidth: EdgeWidths,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutBorderInfo
Method or attribute name: margin: Margin,
Initial version: 9|Class name: LayoutBorderInfo
Method or attribute name: margin: Margin,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutBorderInfo
Method or attribute name: padding: Padding,
Initial version: 9|Class name: LayoutBorderInfo
Method or attribute name: padding: Padding,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutInfo
Initial version: 9|Class name: LayoutInfo
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutInfo
Method or attribute name: position: Position,
Initial version: 9|Class name: LayoutInfo
Method or attribute name: position: Position,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutInfo
Method or attribute name: constraint: ConstraintSizeOptions,
Initial version: 9|Class name: LayoutInfo
Method or attribute name: constraint: ConstraintSizeOptions,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutChild
Initial version: 9|Class name: LayoutChild
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutChild
Method or attribute name: name: string,
Initial version: 9|Class name: LayoutChild
Method or attribute name: name: string,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutChild
Method or attribute name: id: string,
Initial version: 9|Class name: LayoutChild
Method or attribute name: id: string,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutChild
Method or attribute name: constraint: ConstraintSizeOptions,
Initial version: 9|Class name: LayoutChild
Method or attribute name: constraint: ConstraintSizeOptions,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutChild
Method or attribute name: borderInfo: LayoutBorderInfo,
Initial version: 9|Class name: LayoutChild
Method or attribute name: borderInfo: LayoutBorderInfo,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutChild
Method or attribute name: position: Position,
Initial version: 9|Class name: LayoutChild
Method or attribute name: position: Position,
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutChild
Method or attribute name: measure(childConstraint: ConstraintSizeOptions),
Initial version: 9|Class name: LayoutChild
Method or attribute name: measure(childConstraint: ConstraintSizeOptions),
Initial version: 10|common.d.ts| -|Initial version changed|Class name: LayoutChild
Method or attribute name: layout(childLayoutInfo: LayoutInfo)
Initial version: 9|Class name: LayoutChild
Method or attribute name: layout(childLayoutInfo: LayoutInfo)
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CustomComponent
Method or attribute name: onLayout?(children: Array\, constraint: ConstraintSizeOptions): void;
Initial version: 9|Class name: CustomComponent
Method or attribute name: onLayout?(children: Array\, constraint: ConstraintSizeOptions): void;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CustomComponent
Method or attribute name: onMeasure?(children: Array\, constraint: ConstraintSizeOptions): void;
Initial version: 9|Class name: CustomComponent
Method or attribute name: onMeasure?(children: Array\, constraint: ConstraintSizeOptions): void;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CustomComponent
Method or attribute name: onPageShow?(): void;
Initial version: 7|Class name: CustomComponent
Method or attribute name: onPageShow?(): void;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CustomComponent
Method or attribute name: onPageHide?(): void;
Initial version: 7|Class name: CustomComponent
Method or attribute name: onPageHide?(): void;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CustomComponent
Method or attribute name: onBackPress?(): void;
Initial version: 7|Class name: CustomComponent
Method or attribute name: onBackPress?(): void;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: CustomComponent
Method or attribute name: pageTransition?(): void;
Initial version: 9|Class name: CustomComponent
Method or attribute name: pageTransition?(): void;
Initial version: 10|common.d.ts| -|Initial version changed|Class name: AppStorage
Initial version: 7|Class name: AppStorage
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: AppStorage
Method or attribute name: static Link(propName: string): any;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Link(propName: string): any;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: AppStorage
Method or attribute name: static SetAndLink\(propName: string, defaultValue: T): SubscribedAbstractProperty\;
Initial version: 7|Class name: AppStorage
Method or attribute name: static SetAndLink\(propName: string, defaultValue: T): SubscribedAbstractProperty\;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: AppStorage
Method or attribute name: static Prop(propName: string): any;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Prop(propName: string): any;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: AppStorage
Method or attribute name: static SetAndProp\(propName: string, defaultValue: S): SubscribedAbstractProperty\;
Initial version: 7|Class name: AppStorage
Method or attribute name: static SetAndProp\(propName: string, defaultValue: S): SubscribedAbstractProperty\;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: AppStorage
Method or attribute name: static Has(propName: string): boolean;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Has(propName: string): boolean;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: AppStorage
Method or attribute name: static Get\(propName: string): T \| undefined;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Get\(propName: string): T \| undefined;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: AppStorage
Method or attribute name: static Set\(propName: string, newValue: T): boolean;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Set\(propName: string, newValue: T): boolean;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: AppStorage
Method or attribute name: static SetOrCreate\(propName: string, newValue: T): void;
Initial version: 7|Class name: AppStorage
Method or attribute name: static SetOrCreate\(propName: string, newValue: T): void;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: AppStorage
Method or attribute name: static Delete(propName: string): boolean;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Delete(propName: string): boolean;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: AppStorage
Method or attribute name: static Keys(): IterableIterator\;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Keys(): IterableIterator\;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: AppStorage
Method or attribute name: static Clear(): boolean;
Initial version: 9|Class name: AppStorage
Method or attribute name: static Clear(): boolean;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: AppStorage
Method or attribute name: static IsMutable(propName: string): boolean;
Initial version: 7|Class name: AppStorage
Method or attribute name: static IsMutable(propName: string): boolean;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: AppStorage
Method or attribute name: static Size(): number;
Initial version: 7|Class name: AppStorage
Method or attribute name: static Size(): number;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: SubscribedAbstractProperty
Method or attribute name: info(): string;
Initial version: 7|Class name: SubscribedAbstractProperty
Method or attribute name: info(): string;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: SubscribedAbstractProperty
Method or attribute name: abstract get(): T;
Initial version: 9|Class name: SubscribedAbstractProperty
Method or attribute name: abstract get(): T;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: SubscribedAbstractProperty
Method or attribute name: abstract set(newValue: T): void;
Initial version: 9|Class name: SubscribedAbstractProperty
Method or attribute name: abstract set(newValue: T): void;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: Environment
Initial version: 7|Class name: Environment
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: Environment
Method or attribute name: static EnvProp\(key: string, value: S): boolean;
Initial version: 7|Class name: Environment
Method or attribute name: static EnvProp\(key: string, value: S): boolean;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: Environment
Method or attribute name: static EnvProps(
props: {
key: string;
defaultValue: any;
}[],
): void;
Initial version: 7|Class name: Environment
Method or attribute name: static EnvProps(
props: {
key: string;
defaultValue: any;
}[],
): void;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: Environment
Method or attribute name: static Keys(): Array\;
Initial version: 7|Class name: Environment
Method or attribute name: static Keys(): Array\;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: PersistentStorage
Initial version: 7|Class name: PersistentStorage
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: PersistentStorage
Method or attribute name: static PersistProp\(key: string, defaultValue: T): void;
Initial version: 7|Class name: PersistentStorage
Method or attribute name: static PersistProp\(key: string, defaultValue: T): void;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: PersistentStorage
Method or attribute name: static DeleteProp(key: string): void;
Initial version: 7|Class name: PersistentStorage
Method or attribute name: static DeleteProp(key: string): void;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: PersistentStorage
Method or attribute name: static PersistProps(
properties: {
key: string;
defaultValue: any;
}[],
): void;
Initial version: 7|Class name: PersistentStorage
Method or attribute name: static PersistProps(
properties: {
key: string;
defaultValue: any;
}[],
): void;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: PersistentStorage
Method or attribute name: static Keys(): Array\;
Initial version: 7|Class name: PersistentStorage
Method or attribute name: static Keys(): Array\;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Initial version: 9|Class name: LocalStorage
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Method or attribute name: constructor(initializingProperties?: Object);
Initial version: 9|Class name: LocalStorage
Method or attribute name: constructor(initializingProperties?: Object);
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Method or attribute name: static GetShared(): LocalStorage;
Initial version: 9|Class name: LocalStorage
Method or attribute name: static GetShared(): LocalStorage;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Method or attribute name: has(propName: string): boolean;
Initial version: 9|Class name: LocalStorage
Method or attribute name: has(propName: string): boolean;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Method or attribute name: keys(): IterableIterator\;
Initial version: 9|Class name: LocalStorage
Method or attribute name: keys(): IterableIterator\;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Method or attribute name: size(): number;
Initial version: 9|Class name: LocalStorage
Method or attribute name: size(): number;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Method or attribute name: get\(propName: string): T \| undefined;
Initial version: 9|Class name: LocalStorage
Method or attribute name: get\(propName: string): T \| undefined;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Method or attribute name: set\(propName: string, newValue: T): boolean;
Initial version: 9|Class name: LocalStorage
Method or attribute name: set\(propName: string, newValue: T): boolean;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Method or attribute name: setOrCreate\(propName: string, newValue: T): boolean;
Initial version: 9|Class name: LocalStorage
Method or attribute name: setOrCreate\(propName: string, newValue: T): boolean;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Method or attribute name: link\(propName: string): SubscribedAbstractProperty\;
Initial version: 9|Class name: LocalStorage
Method or attribute name: link\(propName: string): SubscribedAbstractProperty\;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Method or attribute name: setAndLink\(propName: string, defaultValue: T): SubscribedAbstractProperty\;
Initial version: 9|Class name: LocalStorage
Method or attribute name: setAndLink\(propName: string, defaultValue: T): SubscribedAbstractProperty\;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Method or attribute name: prop\(propName: string): SubscribedAbstractProperty\;
Initial version: 9|Class name: LocalStorage
Method or attribute name: prop\(propName: string): SubscribedAbstractProperty\;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Method or attribute name: setAndProp\(propName: string, defaultValue: S): SubscribedAbstractProperty\;
Initial version: 9|Class name: LocalStorage
Method or attribute name: setAndProp\(propName: string, defaultValue: S): SubscribedAbstractProperty\;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Method or attribute name: delete(propName: string): boolean;
Initial version: 9|Class name: LocalStorage
Method or attribute name: delete(propName: string): boolean;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: LocalStorage
Method or attribute name: clear(): boolean;
Initial version: 9|Class name: LocalStorage
Method or attribute name: clear(): boolean;
Initial version: 10|common_ts_ets_api.d.ts| -|Initial version changed|Class name: ContextMenu
Initial version: 8|Class name: ContextMenu
Initial version: 10|context_menu.d.ts| -|Initial version changed|Class name: ContextMenu
Method or attribute name: static close();
Initial version: 8|Class name: ContextMenu
Method or attribute name: static close();
Initial version: 10|context_menu.d.ts| -|Initial version changed|Class name: CustomDialogControllerOptions
Initial version: 7|Class name: CustomDialogControllerOptions
Initial version: 10|custom_dialog_controller.d.ts| -|Initial version changed|Class name: CustomDialogControllerOptions
Method or attribute name: builder: any;
Initial version: 7|Class name: CustomDialogControllerOptions
Method or attribute name: builder: any;
Initial version: 10|custom_dialog_controller.d.ts| -|Initial version changed|Class name: CustomDialogControllerOptions
Method or attribute name: cancel?: () => void;
Initial version: 7|Class name: CustomDialogControllerOptions
Method or attribute name: cancel?: () => void;
Initial version: 10|custom_dialog_controller.d.ts| -|Initial version changed|Class name: CustomDialogControllerOptions
Method or attribute name: autoCancel?: boolean;
Initial version: 7|Class name: CustomDialogControllerOptions
Method or attribute name: autoCancel?: boolean;
Initial version: 10|custom_dialog_controller.d.ts| -|Initial version changed|Class name: CustomDialogControllerOptions
Method or attribute name: alignment?: DialogAlignment;
Initial version: 7|Class name: CustomDialogControllerOptions
Method or attribute name: alignment?: DialogAlignment;
Initial version: 10|custom_dialog_controller.d.ts| -|Initial version changed|Class name: CustomDialogControllerOptions
Method or attribute name: offset?: Offset;
Initial version: 7|Class name: CustomDialogControllerOptions
Method or attribute name: offset?: Offset;
Initial version: 10|custom_dialog_controller.d.ts| -|Initial version changed|Class name: CustomDialogControllerOptions
Method or attribute name: customStyle?: boolean;
Initial version: 7|Class name: CustomDialogControllerOptions
Method or attribute name: customStyle?: boolean;
Initial version: 10|custom_dialog_controller.d.ts| -|Initial version changed|Class name: CustomDialogControllerOptions
Method or attribute name: gridCount?: number;
Initial version: 8|Class name: CustomDialogControllerOptions
Method or attribute name: gridCount?: number;
Initial version: 10|custom_dialog_controller.d.ts| -|Initial version changed|Class name: CustomDialogController
Initial version: 7|Class name: CustomDialogController
Initial version: 10|custom_dialog_controller.d.ts| -|Initial version changed|Class name: CustomDialogController
Method or attribute name: constructor(value: CustomDialogControllerOptions);
Initial version: 7|Class name: CustomDialogController
Method or attribute name: constructor(value: CustomDialogControllerOptions);
Initial version: 10|custom_dialog_controller.d.ts| -|Initial version changed|Class name: CustomDialogController
Method or attribute name: open();
Initial version: 7|Class name: CustomDialogController
Method or attribute name: open();
Initial version: 10|custom_dialog_controller.d.ts| -|Initial version changed|Class name: CustomDialogController
Method or attribute name: close();
Initial version: 7|Class name: CustomDialogController
Method or attribute name: close();
Initial version: 10|custom_dialog_controller.d.ts| -|Initial version changed|Class name: DatePickerResult
Initial version: 8|Class name: DatePickerResult
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerResult
Method or attribute name: year?: number;
Initial version: 8|Class name: DatePickerResult
Method or attribute name: year?: number;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerResult
Method or attribute name: month?: number;
Initial version: 8|Class name: DatePickerResult
Method or attribute name: month?: number;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerResult
Method or attribute name: day?: number;
Initial version: 8|Class name: DatePickerResult
Method or attribute name: day?: number;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerOptions
Initial version: 8|Class name: DatePickerOptions
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerOptions
Method or attribute name: start?: Date;
Initial version: 8|Class name: DatePickerOptions
Method or attribute name: start?: Date;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerOptions
Method or attribute name: end?: Date;
Initial version: 8|Class name: DatePickerOptions
Method or attribute name: end?: Date;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerOptions
Method or attribute name: selected?: Date;
Initial version: 8|Class name: DatePickerOptions
Method or attribute name: selected?: Date;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerInterface
Initial version: 8|Class name: DatePickerInterface
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerInterface
Method or attribute name: (options?: DatePickerOptions): DatePickerAttribute;
Initial version: 8|Class name: DatePickerInterface
Method or attribute name: (options?: DatePickerOptions): DatePickerAttribute;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerAttribute
Initial version: 8|Class name: DatePickerAttribute
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerAttribute
Method or attribute name: lunar(value: boolean): DatePickerAttribute;
Initial version: 8|Class name: DatePickerAttribute
Method or attribute name: lunar(value: boolean): DatePickerAttribute;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerAttribute
Method or attribute name: onChange(callback: (value: DatePickerResult) => void): DatePickerAttribute;
Initial version: 8|Class name: DatePickerAttribute
Method or attribute name: onChange(callback: (value: DatePickerResult) => void): DatePickerAttribute;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerDialogOptions
Initial version: 8|Class name: DatePickerDialogOptions
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerDialogOptions
Method or attribute name: lunar?: boolean;
Initial version: 8|Class name: DatePickerDialogOptions
Method or attribute name: lunar?: boolean;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerDialogOptions
Method or attribute name: onAccept?: (value: DatePickerResult) => void;
Initial version: 8|Class name: DatePickerDialogOptions
Method or attribute name: onAccept?: (value: DatePickerResult) => void;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerDialogOptions
Method or attribute name: onCancel?: () => void;
Initial version: 8|Class name: DatePickerDialogOptions
Method or attribute name: onCancel?: () => void;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerDialogOptions
Method or attribute name: onChange?: (value: DatePickerResult) => void;
Initial version: 8|Class name: DatePickerDialogOptions
Method or attribute name: onChange?: (value: DatePickerResult) => void;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerDialog
Initial version: 8|Class name: DatePickerDialog
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: DatePickerDialog
Method or attribute name: static show(options?: DatePickerDialogOptions);
Initial version: 8|Class name: DatePickerDialog
Method or attribute name: static show(options?: DatePickerDialogOptions);
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const DatePicker: DatePickerInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const DatePicker: DatePickerInterface;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const DatePickerInstance: DatePickerAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const DatePickerInstance: DatePickerAttribute;
Initial version: 10|date_picker.d.ts| -|Initial version changed|Class name: Color
Method or attribute name: Transparent
Initial version: 9|Class name: Color
Method or attribute name: Transparent
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: TouchType
Initial version: 7|Class name: TouchType
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: TouchType
Method or attribute name: Down
Initial version: 7|Class name: TouchType
Method or attribute name: Down
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: TouchType
Method or attribute name: Up
Initial version: 7|Class name: TouchType
Method or attribute name: Up
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: TouchType
Method or attribute name: Move
Initial version: 7|Class name: TouchType
Method or attribute name: Move
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: TouchType
Method or attribute name: Cancel
Initial version: 7|Class name: TouchType
Method or attribute name: Cancel
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: MouseButton
Initial version: 8|Class name: MouseButton
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: MouseButton
Method or attribute name: Left
Initial version: 8|Class name: MouseButton
Method or attribute name: Left
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: MouseButton
Method or attribute name: Right
Initial version: 8|Class name: MouseButton
Method or attribute name: Right
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: MouseButton
Method or attribute name: Middle
Initial version: 8|Class name: MouseButton
Method or attribute name: Middle
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: MouseButton
Method or attribute name: Back
Initial version: 8|Class name: MouseButton
Method or attribute name: Back
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: MouseButton
Method or attribute name: Forward
Initial version: 8|Class name: MouseButton
Method or attribute name: Forward
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: MouseButton
Method or attribute name: None
Initial version: 8|Class name: MouseButton
Method or attribute name: None
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: MouseAction
Initial version: 8|Class name: MouseAction
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: MouseAction
Method or attribute name: Press
Initial version: 8|Class name: MouseAction
Method or attribute name: Press
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: MouseAction
Method or attribute name: Release
Initial version: 8|Class name: MouseAction
Method or attribute name: Release
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: MouseAction
Method or attribute name: Move
Initial version: 8|Class name: MouseAction
Method or attribute name: Move
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: MouseAction
Method or attribute name: Hover
Initial version: 8|Class name: MouseAction
Method or attribute name: Hover
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: AnimationStatus
Initial version: 7|Class name: AnimationStatus
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: AnimationStatus
Method or attribute name: Initial
Initial version: 7|Class name: AnimationStatus
Method or attribute name: Initial
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: AnimationStatus
Method or attribute name: Running
Initial version: 7|Class name: AnimationStatus
Method or attribute name: Running
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: AnimationStatus
Method or attribute name: Paused
Initial version: 7|Class name: AnimationStatus
Method or attribute name: Paused
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: AnimationStatus
Method or attribute name: Stopped
Initial version: 7|Class name: AnimationStatus
Method or attribute name: Stopped
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: FillMode
Initial version: 7|Class name: FillMode
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: FillMode
Method or attribute name: None
Initial version: 7|Class name: FillMode
Method or attribute name: None
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: FillMode
Method or attribute name: Forwards
Initial version: 7|Class name: FillMode
Method or attribute name: Forwards
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: FillMode
Method or attribute name: Backwards
Initial version: 7|Class name: FillMode
Method or attribute name: Backwards
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: FillMode
Method or attribute name: Both
Initial version: 7|Class name: FillMode
Method or attribute name: Both
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: KeyType
Initial version: 7|Class name: KeyType
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: KeyType
Method or attribute name: Down
Initial version: 7|Class name: KeyType
Method or attribute name: Down
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: KeyType
Method or attribute name: Up
Initial version: 7|Class name: KeyType
Method or attribute name: Up
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: KeySource
Initial version: 7|Class name: KeySource
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: KeySource
Method or attribute name: Unknown
Initial version: 7|Class name: KeySource
Method or attribute name: Unknown
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: KeySource
Method or attribute name: Keyboard
Initial version: 7|Class name: KeySource
Method or attribute name: Keyboard
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Edge
Initial version: 7|Class name: Edge
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Edge
Method or attribute name: Top
Initial version: 7|Class name: Edge
Method or attribute name: Top
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Edge
Method or attribute name: Bottom
Initial version: 7|Class name: Edge
Method or attribute name: Bottom
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Edge
Method or attribute name: Start
Initial version: 7|Class name: Edge
Method or attribute name: Start
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Edge
Method or attribute name: End
Initial version: 7|Class name: Edge
Method or attribute name: End
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Week
Initial version: 7|Class name: Week
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Week
Method or attribute name: Mon
Initial version: 7|Class name: Week
Method or attribute name: Mon
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Week
Method or attribute name: Tue
Initial version: 7|Class name: Week
Method or attribute name: Tue
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Week
Method or attribute name: Wed
Initial version: 7|Class name: Week
Method or attribute name: Wed
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Week
Method or attribute name: Thur
Initial version: 7|Class name: Week
Method or attribute name: Thur
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Week
Method or attribute name: Fri
Initial version: 7|Class name: Week
Method or attribute name: Fri
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Week
Method or attribute name: Sat
Initial version: 7|Class name: Week
Method or attribute name: Sat
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Week
Method or attribute name: Sun
Initial version: 7|Class name: Week
Method or attribute name: Sun
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: RelateType
Initial version: 7|Class name: RelateType
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: RelateType
Method or attribute name: FILL
Initial version: 7|Class name: RelateType
Method or attribute name: FILL
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: RelateType
Method or attribute name: FIT
Initial version: 7|Class name: RelateType
Method or attribute name: FIT
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: SharedTransitionEffectType
Initial version: 7|Class name: SharedTransitionEffectType
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: SharedTransitionEffectType
Method or attribute name: Static
Initial version: 7|Class name: SharedTransitionEffectType
Method or attribute name: Static
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: SharedTransitionEffectType
Method or attribute name: Exchange
Initial version: 7|Class name: SharedTransitionEffectType
Method or attribute name: Exchange
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: ResponseType
Initial version: 8|Class name: ResponseType
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: ResponseType
Method or attribute name: RightClick
Initial version: 8|Class name: ResponseType
Method or attribute name: RightClick
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: ResponseType
Method or attribute name: LongPress
Initial version: 8|Class name: ResponseType
Method or attribute name: LongPress
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: HoverEffect
Initial version: 8|Class name: HoverEffect
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: HoverEffect
Method or attribute name: Auto
Initial version: 8|Class name: HoverEffect
Method or attribute name: Auto
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: HoverEffect
Method or attribute name: Scale
Initial version: 8|Class name: HoverEffect
Method or attribute name: Scale
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: HoverEffect
Method or attribute name: Highlight
Initial version: 8|Class name: HoverEffect
Method or attribute name: Highlight
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: HoverEffect
Method or attribute name: None
Initial version: 8|Class name: HoverEffect
Method or attribute name: None
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Placement
Initial version: 8|Class name: Placement
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Placement
Method or attribute name: Left
Initial version: 8|Class name: Placement
Method or attribute name: Left
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Placement
Method or attribute name: Right
Initial version: 8|Class name: Placement
Method or attribute name: Right
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Placement
Method or attribute name: Top
Initial version: 8|Class name: Placement
Method or attribute name: Top
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Placement
Method or attribute name: Bottom
Initial version: 8|Class name: Placement
Method or attribute name: Bottom
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Placement
Method or attribute name: TopLeft
Initial version: 8|Class name: Placement
Method or attribute name: TopLeft
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Placement
Method or attribute name: TopRight
Initial version: 8|Class name: Placement
Method or attribute name: TopRight
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Placement
Method or attribute name: BottomLeft
Initial version: 8|Class name: Placement
Method or attribute name: BottomLeft
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Placement
Method or attribute name: BottomRight
Initial version: 8|Class name: Placement
Method or attribute name: BottomRight
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Placement
Method or attribute name: LeftTop
Initial version: 9|Class name: Placement
Method or attribute name: LeftTop
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Placement
Method or attribute name: LeftBottom
Initial version: 9|Class name: Placement
Method or attribute name: LeftBottom
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Placement
Method or attribute name: RightTop
Initial version: 9|Class name: Placement
Method or attribute name: RightTop
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: Placement
Method or attribute name: RightBottom
Initial version: 9|Class name: Placement
Method or attribute name: RightBottom
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: CopyOptions
Initial version: 9|Class name: CopyOptions
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: CopyOptions
Method or attribute name: None = 0
Initial version: 9|Class name: CopyOptions
Method or attribute name: None = 0
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: CopyOptions
Method or attribute name: InApp = 1
Initial version: 9|Class name: CopyOptions
Method or attribute name: InApp = 1
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: CopyOptions
Method or attribute name: LocalDevice = 2
Initial version: 9|Class name: CopyOptions
Method or attribute name: LocalDevice = 2
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: HitTestMode
Initial version: 9|Class name: HitTestMode
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: HitTestMode
Method or attribute name: Default
Initial version: 9|Class name: HitTestMode
Method or attribute name: Default
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: HitTestMode
Method or attribute name: Block
Initial version: 9|Class name: HitTestMode
Method or attribute name: Block
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: HitTestMode
Method or attribute name: Transparent
Initial version: 9|Class name: HitTestMode
Method or attribute name: Transparent
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: HitTestMode
Method or attribute name: None
Initial version: 9|Class name: HitTestMode
Method or attribute name: None
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: TitleHeight
Initial version: 9|Class name: TitleHeight
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: TitleHeight
Method or attribute name: MainOnly
Initial version: 9|Class name: TitleHeight
Method or attribute name: MainOnly
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: TitleHeight
Method or attribute name: MainWithSub
Initial version: 9|Class name: TitleHeight
Method or attribute name: MainWithSub
Initial version: 10|enums.d.ts| -|Initial version changed|Class name: FlowItemInterface
Initial version: 9|Class name: FlowItemInterface
Initial version: 10|flow_item.d.ts| -|Initial version changed|Class name: FlowItemInterface
Method or attribute name: (): FlowItemAttribute;
Initial version: 9|Class name: FlowItemInterface
Method or attribute name: (): FlowItemAttribute;
Initial version: 10|flow_item.d.ts| -|Initial version changed|Class name: FlowItemAttribute
Initial version: 9|Class name: FlowItemAttribute
Initial version: 10|flow_item.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const FlowItem: FlowItemInterface
Initial version: 9|Class name: global
Method or attribute name: declare const FlowItem: FlowItemInterface
Initial version: 10|flow_item.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const FlowItemInstance: FlowItemAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const FlowItemInstance: FlowItemAttribute;
Initial version: 10|flow_item.d.ts| -|Initial version changed|Class name: PanDirection
Initial version: 7|Class name: PanDirection
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanDirection
Method or attribute name: None
Initial version: 7|Class name: PanDirection
Method or attribute name: None
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanDirection
Method or attribute name: Horizontal
Initial version: 7|Class name: PanDirection
Method or attribute name: Horizontal
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanDirection
Method or attribute name: Left
Initial version: 7|Class name: PanDirection
Method or attribute name: Left
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanDirection
Method or attribute name: Right
Initial version: 7|Class name: PanDirection
Method or attribute name: Right
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanDirection
Method or attribute name: Vertical
Initial version: 7|Class name: PanDirection
Method or attribute name: Vertical
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanDirection
Method or attribute name: Up
Initial version: 7|Class name: PanDirection
Method or attribute name: Up
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanDirection
Method or attribute name: Down
Initial version: 7|Class name: PanDirection
Method or attribute name: Down
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanDirection
Method or attribute name: All
Initial version: 7|Class name: PanDirection
Method or attribute name: All
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: SwipeDirection
Initial version: 8|Class name: SwipeDirection
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: SwipeDirection
Method or attribute name: None
Initial version: 8|Class name: SwipeDirection
Method or attribute name: None
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: SwipeDirection
Method or attribute name: Horizontal
Initial version: 8|Class name: SwipeDirection
Method or attribute name: Horizontal
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: SwipeDirection
Method or attribute name: Vertical
Initial version: 8|Class name: SwipeDirection
Method or attribute name: Vertical
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: SwipeDirection
Method or attribute name: All
Initial version: 8|Class name: SwipeDirection
Method or attribute name: All
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureMode
Initial version: 7|Class name: GestureMode
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureMode
Method or attribute name: Sequence
Initial version: 7|Class name: GestureMode
Method or attribute name: Sequence
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureMode
Method or attribute name: Parallel
Initial version: 7|Class name: GestureMode
Method or attribute name: Parallel
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureMode
Method or attribute name: Exclusive
Initial version: 7|Class name: GestureMode
Method or attribute name: Exclusive
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureMask
Initial version: 7|Class name: GestureMask
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureMask
Method or attribute name: Normal
Initial version: 7|Class name: GestureMask
Method or attribute name: Normal
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureMask
Method or attribute name: IgnoreInternal
Initial version: 7|Class name: GestureMask
Method or attribute name: IgnoreInternal
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: FingerInfo
Initial version: 8|Class name: FingerInfo
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: FingerInfo
Method or attribute name: id: number;
Initial version: 8|Class name: FingerInfo
Method or attribute name: id: number;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: FingerInfo
Method or attribute name: globalX: number;
Initial version: 8|Class name: FingerInfo
Method or attribute name: globalX: number;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: FingerInfo
Method or attribute name: globalY: number;
Initial version: 8|Class name: FingerInfo
Method or attribute name: globalY: number;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: FingerInfo
Method or attribute name: localX: number;
Initial version: 8|Class name: FingerInfo
Method or attribute name: localX: number;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: FingerInfo
Method or attribute name: localY: number;
Initial version: 8|Class name: FingerInfo
Method or attribute name: localY: number;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureEvent
Initial version: 7|Class name: GestureEvent
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureEvent
Method or attribute name: repeat: boolean;
Initial version: 7|Class name: GestureEvent
Method or attribute name: repeat: boolean;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureEvent
Method or attribute name: fingerList: FingerInfo[];
Initial version: 8|Class name: GestureEvent
Method or attribute name: fingerList: FingerInfo[];
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureEvent
Method or attribute name: offsetX: number;
Initial version: 7|Class name: GestureEvent
Method or attribute name: offsetX: number;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureEvent
Method or attribute name: offsetY: number;
Initial version: 7|Class name: GestureEvent
Method or attribute name: offsetY: number;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureEvent
Method or attribute name: angle: number;
Initial version: 7|Class name: GestureEvent
Method or attribute name: angle: number;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureEvent
Method or attribute name: speed: number;
Initial version: 8|Class name: GestureEvent
Method or attribute name: speed: number;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureEvent
Method or attribute name: scale: number;
Initial version: 7|Class name: GestureEvent
Method or attribute name: scale: number;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureEvent
Method or attribute name: pinchCenterX: number;
Initial version: 7|Class name: GestureEvent
Method or attribute name: pinchCenterX: number;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureEvent
Method or attribute name: pinchCenterY: number;
Initial version: 7|Class name: GestureEvent
Method or attribute name: pinchCenterY: number;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: TapGestureInterface
Initial version: 7|Class name: TapGestureInterface
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: TapGestureInterface
Method or attribute name: (value?: { count?: number; fingers?: number }): TapGestureInterface;
Initial version: 7|Class name: TapGestureInterface
Method or attribute name: (value?: { count?: number; fingers?: number }): TapGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: TapGestureInterface
Method or attribute name: onAction(event: (event?: GestureEvent) => void): TapGestureInterface;
Initial version: 7|Class name: TapGestureInterface
Method or attribute name: onAction(event: (event?: GestureEvent) => void): TapGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: LongPressGestureInterface
Initial version: 7|Class name: LongPressGestureInterface
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: LongPressGestureInterface
Method or attribute name: (value?: { fingers?: number; repeat?: boolean; duration?: number }): LongPressGestureInterface;
Initial version: 7|Class name: LongPressGestureInterface
Method or attribute name: (value?: { fingers?: number; repeat?: boolean; duration?: number }): LongPressGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: LongPressGestureInterface
Method or attribute name: onAction(event: (event?: GestureEvent) => void): LongPressGestureInterface;
Initial version: 7|Class name: LongPressGestureInterface
Method or attribute name: onAction(event: (event?: GestureEvent) => void): LongPressGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: LongPressGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): LongPressGestureInterface;
Initial version: 7|Class name: LongPressGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): LongPressGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: LongPressGestureInterface
Method or attribute name: onActionCancel(event: () => void): LongPressGestureInterface;
Initial version: 7|Class name: LongPressGestureInterface
Method or attribute name: onActionCancel(event: () => void): LongPressGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanGestureOptions
Initial version: 7|Class name: PanGestureOptions
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanGestureOptions
Method or attribute name: constructor(value?: { fingers?: number; direction?: PanDirection; distance?: number });
Initial version: 7|Class name: PanGestureOptions
Method or attribute name: constructor(value?: { fingers?: number; direction?: PanDirection; distance?: number });
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanGestureOptions
Method or attribute name: setDirection(value: PanDirection);
Initial version: 7|Class name: PanGestureOptions
Method or attribute name: setDirection(value: PanDirection);
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanGestureOptions
Method or attribute name: setDistance(value: number);
Initial version: 7|Class name: PanGestureOptions
Method or attribute name: setDistance(value: number);
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanGestureOptions
Method or attribute name: setFingers(value: number);
Initial version: 7|Class name: PanGestureOptions
Method or attribute name: setFingers(value: number);
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanGestureInterface
Initial version: 7|Class name: PanGestureInterface
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanGestureInterface
Method or attribute name: (value?: { fingers?: number; direction?: PanDirection; distance?: number } \| PanGestureOptions): PanGestureInterface;
Initial version: 7|Class name: PanGestureInterface
Method or attribute name: (value?: { fingers?: number; direction?: PanDirection; distance?: number } \| PanGestureOptions): PanGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanGestureInterface
Method or attribute name: onActionStart(event: (event?: GestureEvent) => void): PanGestureInterface;
Initial version: 7|Class name: PanGestureInterface
Method or attribute name: onActionStart(event: (event?: GestureEvent) => void): PanGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanGestureInterface
Method or attribute name: onActionUpdate(event: (event?: GestureEvent) => void): PanGestureInterface;
Initial version: 7|Class name: PanGestureInterface
Method or attribute name: onActionUpdate(event: (event?: GestureEvent) => void): PanGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): PanGestureInterface;
Initial version: 7|Class name: PanGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): PanGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PanGestureInterface
Method or attribute name: onActionCancel(event: () => void): PanGestureInterface;
Initial version: 7|Class name: PanGestureInterface
Method or attribute name: onActionCancel(event: () => void): PanGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: SwipeGestureInterface
Initial version: 8|Class name: SwipeGestureInterface
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: SwipeGestureInterface
Method or attribute name: (value?: { fingers?: number; direction?: SwipeDirection; speed?: number }): SwipeGestureInterface;
Initial version: 8|Class name: SwipeGestureInterface
Method or attribute name: (value?: { fingers?: number; direction?: SwipeDirection; speed?: number }): SwipeGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: SwipeGestureInterface
Method or attribute name: onAction(event: (event?: GestureEvent) => void): SwipeGestureInterface;
Initial version: 8|Class name: SwipeGestureInterface
Method or attribute name: onAction(event: (event?: GestureEvent) => void): SwipeGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PinchGestureInterface
Initial version: 7|Class name: PinchGestureInterface
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PinchGestureInterface
Method or attribute name: (value?: { fingers?: number; distance?: number }): PinchGestureInterface;
Initial version: 7|Class name: PinchGestureInterface
Method or attribute name: (value?: { fingers?: number; distance?: number }): PinchGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PinchGestureInterface
Method or attribute name: onActionStart(event: (event?: GestureEvent) => void): PinchGestureInterface;
Initial version: 7|Class name: PinchGestureInterface
Method or attribute name: onActionStart(event: (event?: GestureEvent) => void): PinchGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PinchGestureInterface
Method or attribute name: onActionUpdate(event: (event?: GestureEvent) => void): PinchGestureInterface;
Initial version: 7|Class name: PinchGestureInterface
Method or attribute name: onActionUpdate(event: (event?: GestureEvent) => void): PinchGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PinchGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): PinchGestureInterface;
Initial version: 7|Class name: PinchGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): PinchGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: PinchGestureInterface
Method or attribute name: onActionCancel(event: () => void): PinchGestureInterface;
Initial version: 7|Class name: PinchGestureInterface
Method or attribute name: onActionCancel(event: () => void): PinchGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: RotationGestureInterface
Initial version: 7|Class name: RotationGestureInterface
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: RotationGestureInterface
Method or attribute name: (value?: { fingers?: number; angle?: number }): RotationGestureInterface;
Initial version: 7|Class name: RotationGestureInterface
Method or attribute name: (value?: { fingers?: number; angle?: number }): RotationGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: RotationGestureInterface
Method or attribute name: onActionStart(event: (event?: GestureEvent) => void): RotationGestureInterface;
Initial version: 7|Class name: RotationGestureInterface
Method or attribute name: onActionStart(event: (event?: GestureEvent) => void): RotationGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: RotationGestureInterface
Method or attribute name: onActionUpdate(event: (event?: GestureEvent) => void): RotationGestureInterface;
Initial version: 7|Class name: RotationGestureInterface
Method or attribute name: onActionUpdate(event: (event?: GestureEvent) => void): RotationGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: RotationGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): RotationGestureInterface;
Initial version: 7|Class name: RotationGestureInterface
Method or attribute name: onActionEnd(event: (event?: GestureEvent) => void): RotationGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: RotationGestureInterface
Method or attribute name: onActionCancel(event: () => void): RotationGestureInterface;
Initial version: 7|Class name: RotationGestureInterface
Method or attribute name: onActionCancel(event: () => void): RotationGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureGroupInterface
Initial version: 7|Class name: GestureGroupInterface
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureGroupInterface
Method or attribute name: (mode: GestureMode, ...gesture: GestureType[]): GestureGroupInterface;
Initial version: 7|Class name: GestureGroupInterface
Method or attribute name: (mode: GestureMode, ...gesture: GestureType[]): GestureGroupInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GestureGroupInterface
Method or attribute name: onCancel(event: () => void): GestureGroupInterface;
Initial version: 7|Class name: GestureGroupInterface
Method or attribute name: onCancel(event: () => void): GestureGroupInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TapGesture: TapGestureInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const TapGesture: TapGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const LongPressGesture: LongPressGestureInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const LongPressGesture: LongPressGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const PanGesture: PanGestureInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const PanGesture: PanGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const SwipeGesture: SwipeGestureInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const SwipeGesture: SwipeGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const PinchGesture: PinchGestureInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const PinchGesture: PinchGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const RotationGesture: RotationGestureInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const RotationGesture: RotationGestureInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const GestureGroup: GestureGroupInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const GestureGroup: GestureGroupInterface;
Initial version: 10|gesture.d.ts| -|Initial version changed|Class name: GridInterface
Initial version: 7|Class name: GridInterface
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridInterface
Method or attribute name: (scroller?: Scroller): GridAttribute;
Initial version: 7|Class name: GridInterface
Method or attribute name: (scroller?: Scroller): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridDirection
Initial version: 8|Class name: GridDirection
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridDirection
Method or attribute name: Row
Initial version: 8|Class name: GridDirection
Method or attribute name: Row
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridDirection
Method or attribute name: Column
Initial version: 8|Class name: GridDirection
Method or attribute name: Column
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridDirection
Method or attribute name: RowReverse
Initial version: 8|Class name: GridDirection
Method or attribute name: RowReverse
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridDirection
Method or attribute name: ColumnReverse
Initial version: 8|Class name: GridDirection
Method or attribute name: ColumnReverse
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Initial version: 7|Class name: GridAttribute
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: columnsTemplate(value: string): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: columnsTemplate(value: string): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: rowsTemplate(value: string): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: rowsTemplate(value: string): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: columnsGap(value: Length): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: columnsGap(value: Length): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: rowsGap(value: Length): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: rowsGap(value: Length): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: scrollBarWidth(value: number \| string): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: scrollBarWidth(value: number \| string): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: scrollBarColor(value: Color \| number \| string): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: scrollBarColor(value: Color \| number \| string): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: scrollBar(value: BarState): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: scrollBar(value: BarState): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: onScrollIndex(event: (first: number) => void): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: onScrollIndex(event: (first: number) => void): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: cachedCount(value: number): GridAttribute;
Initial version: 7|Class name: GridAttribute
Method or attribute name: cachedCount(value: number): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: editMode(value: boolean): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: editMode(value: boolean): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: multiSelectable(value: boolean): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: multiSelectable(value: boolean): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: maxCount(value: number): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: maxCount(value: number): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: minCount(value: number): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: minCount(value: number): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: cellLength(value: number): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: cellLength(value: number): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: layoutDirection(value: GridDirection): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: layoutDirection(value: GridDirection): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: supportAnimation(value: boolean): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: supportAnimation(value: boolean): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => (() => any) \| void): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => (() => any) \| void): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: onItemDragEnter(event: (event: ItemDragInfo) => void): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: onItemDragEnter(event: (event: ItemDragInfo) => void): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridAttribute
Method or attribute name: onItemDrop(
event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void,
): GridAttribute;
Initial version: 8|Class name: GridAttribute
Method or attribute name: onItemDrop(
event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void,
): GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Grid: GridInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Grid: GridInterface;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const GridInstance: GridAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const GridInstance: GridAttribute;
Initial version: 10|grid.d.ts| -|Initial version changed|Class name: GridItemInterface
Initial version: 7|Class name: GridItemInterface
Initial version: 10|gridItem.d.ts| -|Initial version changed|Class name: GridItemInterface
Method or attribute name: (): GridItemAttribute;
Initial version: 7|Class name: GridItemInterface
Method or attribute name: (): GridItemAttribute;
Initial version: 10|gridItem.d.ts| -|Initial version changed|Class name: GridItemAttribute
Initial version: 7|Class name: GridItemAttribute
Initial version: 10|gridItem.d.ts| -|Initial version changed|Class name: GridItemAttribute
Method or attribute name: rowStart(value: number): GridItemAttribute;
Initial version: 7|Class name: GridItemAttribute
Method or attribute name: rowStart(value: number): GridItemAttribute;
Initial version: 10|gridItem.d.ts| -|Initial version changed|Class name: GridItemAttribute
Method or attribute name: rowEnd(value: number): GridItemAttribute;
Initial version: 7|Class name: GridItemAttribute
Method or attribute name: rowEnd(value: number): GridItemAttribute;
Initial version: 10|gridItem.d.ts| -|Initial version changed|Class name: GridItemAttribute
Method or attribute name: columnStart(value: number): GridItemAttribute;
Initial version: 7|Class name: GridItemAttribute
Method or attribute name: columnStart(value: number): GridItemAttribute;
Initial version: 10|gridItem.d.ts| -|Initial version changed|Class name: GridItemAttribute
Method or attribute name: columnEnd(value: number): GridItemAttribute;
Initial version: 7|Class name: GridItemAttribute
Method or attribute name: columnEnd(value: number): GridItemAttribute;
Initial version: 10|gridItem.d.ts| -|Initial version changed|Class name: GridItemAttribute
Method or attribute name: selectable(value: boolean): GridItemAttribute;
Initial version: 8|Class name: GridItemAttribute
Method or attribute name: selectable(value: boolean): GridItemAttribute;
Initial version: 10|gridItem.d.ts| -|Initial version changed|Class name: GridItemAttribute
Method or attribute name: onSelect(event: (isSelected: boolean) => void): GridItemAttribute;
Initial version: 8|Class name: GridItemAttribute
Method or attribute name: onSelect(event: (isSelected: boolean) => void): GridItemAttribute;
Initial version: 10|gridItem.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const GridItem: GridItemInterface
Initial version: 7|Class name: global
Method or attribute name: declare const GridItem: GridItemInterface
Initial version: 10|gridItem.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const GridItemInstance: GridItemAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const GridItemInstance: GridItemAttribute;
Initial version: 10|gridItem.d.ts| -|Initial version changed|Class name: GridColColumnOption
Initial version: 9|Class name: GridColColumnOption
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColColumnOption
Method or attribute name: xs?: number,
Initial version: 9|Class name: GridColColumnOption
Method or attribute name: xs?: number,
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColColumnOption
Method or attribute name: sm?: number,
Initial version: 9|Class name: GridColColumnOption
Method or attribute name: sm?: number,
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColColumnOption
Method or attribute name: md?: number,
Initial version: 9|Class name: GridColColumnOption
Method or attribute name: md?: number,
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColColumnOption
Method or attribute name: lg?: number,
Initial version: 9|Class name: GridColColumnOption
Method or attribute name: lg?: number,
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColColumnOption
Method or attribute name: xl?: number,
Initial version: 9|Class name: GridColColumnOption
Method or attribute name: xl?: number,
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColColumnOption
Method or attribute name: xxl?: number,
Initial version: 9|Class name: GridColColumnOption
Method or attribute name: xxl?: number,
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColOptions
Initial version: 9|Class name: GridColOptions
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColOptions
Method or attribute name: span?: number \| GridColColumnOption;
Initial version: 9|Class name: GridColOptions
Method or attribute name: span?: number \| GridColColumnOption;
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColOptions
Method or attribute name: offset?: number \| GridColColumnOption;
Initial version: 9|Class name: GridColOptions
Method or attribute name: offset?: number \| GridColColumnOption;
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColOptions
Method or attribute name: order?: number \| GridColColumnOption;
Initial version: 9|Class name: GridColOptions
Method or attribute name: order?: number \| GridColColumnOption;
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColInterface
Initial version: 9|Class name: GridColInterface
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColInterface
Method or attribute name: (option?: GridColOptions): GridColAttribute;
Initial version: 9|Class name: GridColInterface
Method or attribute name: (option?: GridColOptions): GridColAttribute;
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColAttribute
Method or attribute name: span(value: number \| GridColColumnOption): GridColAttribute;
Initial version: 9|Class name: GridColAttribute
Method or attribute name: span(value: number \| GridColColumnOption): GridColAttribute;
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColAttribute
Method or attribute name: gridColOffset(value: number \| GridColColumnOption): GridColAttribute;
Initial version: 9|Class name: GridColAttribute
Method or attribute name: gridColOffset(value: number \| GridColColumnOption): GridColAttribute;
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridColAttribute
Method or attribute name: order(value: number \| GridColColumnOption): GridColAttribute;
Initial version: 9|Class name: GridColAttribute
Method or attribute name: order(value: number \| GridColColumnOption): GridColAttribute;
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const GridCol: GridColInterface
Initial version: 9|Class name: global
Method or attribute name: declare const GridCol: GridColInterface
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const GridColInstance: GridColAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const GridColInstance: GridColAttribute;
Initial version: 10|grid_col.d.ts| -|Initial version changed|Class name: GridRowSizeOption
Initial version: 9|Class name: GridRowSizeOption
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowSizeOption
Method or attribute name: xs?: Length,
Initial version: 9|Class name: GridRowSizeOption
Method or attribute name: xs?: Length,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowSizeOption
Method or attribute name: sm?: Length,
Initial version: 9|Class name: GridRowSizeOption
Method or attribute name: sm?: Length,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowSizeOption
Method or attribute name: md?: Length,
Initial version: 9|Class name: GridRowSizeOption
Method or attribute name: md?: Length,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowSizeOption
Method or attribute name: lg?: Length,
Initial version: 9|Class name: GridRowSizeOption
Method or attribute name: lg?: Length,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowSizeOption
Method or attribute name: xl?: Length,
Initial version: 9|Class name: GridRowSizeOption
Method or attribute name: xl?: Length,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowSizeOption
Method or attribute name: xxl?: Length,
Initial version: 9|Class name: GridRowSizeOption
Method or attribute name: xxl?: Length,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowColumnOption
Initial version: 9|Class name: GridRowColumnOption
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowColumnOption
Method or attribute name: xs?: number,
Initial version: 9|Class name: GridRowColumnOption
Method or attribute name: xs?: number,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowColumnOption
Method or attribute name: sm?: number,
Initial version: 9|Class name: GridRowColumnOption
Method or attribute name: sm?: number,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowColumnOption
Method or attribute name: md?: number,
Initial version: 9|Class name: GridRowColumnOption
Method or attribute name: md?: number,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowColumnOption
Method or attribute name: lg?: number,
Initial version: 9|Class name: GridRowColumnOption
Method or attribute name: lg?: number,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowColumnOption
Method or attribute name: xl?: number,
Initial version: 9|Class name: GridRowColumnOption
Method or attribute name: xl?: number,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowColumnOption
Method or attribute name: xxl?: number,
Initial version: 9|Class name: GridRowColumnOption
Method or attribute name: xxl?: number,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GutterOption
Initial version: 9|Class name: GutterOption
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GutterOption
Method or attribute name: x?: Length \| GridRowSizeOption,
Initial version: 9|Class name: GutterOption
Method or attribute name: x?: Length \| GridRowSizeOption,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GutterOption
Method or attribute name: y?: Length \| GridRowSizeOption
Initial version: 9|Class name: GutterOption
Method or attribute name: y?: Length \| GridRowSizeOption
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: BreakpointsReference
Initial version: 9|Class name: BreakpointsReference
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: BreakpointsReference
Method or attribute name: WindowSize
Initial version: 9|Class name: BreakpointsReference
Method or attribute name: WindowSize
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: BreakpointsReference
Method or attribute name: ComponentSize
Initial version: 9|Class name: BreakpointsReference
Method or attribute name: ComponentSize
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowDirection
Initial version: 9|Class name: GridRowDirection
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowDirection
Method or attribute name: Row
Initial version: 9|Class name: GridRowDirection
Method or attribute name: Row
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowDirection
Method or attribute name: RowReverse
Initial version: 9|Class name: GridRowDirection
Method or attribute name: RowReverse
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: BreakPoints
Initial version: 9|Class name: BreakPoints
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: BreakPoints
Method or attribute name: value?: Array\,
Initial version: 9|Class name: BreakPoints
Method or attribute name: value?: Array\,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: BreakPoints
Method or attribute name: reference?: BreakpointsReference,
Initial version: 9|Class name: BreakPoints
Method or attribute name: reference?: BreakpointsReference,
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowOptions
Initial version: 9|Class name: GridRowOptions
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowOptions
Method or attribute name: gutter?: Length \| GutterOption;
Initial version: 9|Class name: GridRowOptions
Method or attribute name: gutter?: Length \| GutterOption;
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowOptions
Method or attribute name: columns?: number \| GridRowColumnOption;
Initial version: 9|Class name: GridRowOptions
Method or attribute name: columns?: number \| GridRowColumnOption;
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowOptions
Method or attribute name: breakpoints?: BreakPoints;
Initial version: 9|Class name: GridRowOptions
Method or attribute name: breakpoints?: BreakPoints;
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowOptions
Method or attribute name: direction?: GridRowDirection;
Initial version: 9|Class name: GridRowOptions
Method or attribute name: direction?: GridRowDirection;
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowInterface
Initial version: 9|Class name: GridRowInterface
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowInterface
Method or attribute name: (option?: GridRowOptions): GridRowAttribute;
Initial version: 9|Class name: GridRowInterface
Method or attribute name: (option?: GridRowOptions): GridRowAttribute;
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: GridRowAttribute
Method or attribute name: onBreakpointChange(callback: (breakpoints: string) => void): GridRowAttribute;
Initial version: 9|Class name: GridRowAttribute
Method or attribute name: onBreakpointChange(callback: (breakpoints: string) => void): GridRowAttribute;
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const GridRow: GridRowInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const GridRow: GridRowInterface;
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const GridRowInstance: GridRowAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const GridRowInstance: GridRowAttribute;
Initial version: 10|grid_row.d.ts| -|Initial version changed|Class name: ImageAttribute
Method or attribute name: colorFilter(value: ColorFilter): ImageAttribute;
Initial version: 9|Class name: ImageAttribute
Method or attribute name: colorFilter(value: ColorFilter): ImageAttribute;
Initial version: 10|image.d.ts| -|Initial version changed|Class name: ImageAttribute
Method or attribute name: copyOption(value: CopyOptions): ImageAttribute;
Initial version: 9|Class name: ImageAttribute
Method or attribute name: copyOption(value: CopyOptions): ImageAttribute;
Initial version: 10|image.d.ts| -|Initial version changed|Class name: ImageAnimatorInterface
Initial version: 7|Class name: ImageAnimatorInterface
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageAnimatorInterface
Method or attribute name: (): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorInterface
Method or attribute name: (): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageFrameInfo
Initial version: 7|Class name: ImageFrameInfo
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageFrameInfo
Method or attribute name: width?: number \| string;
Initial version: 7|Class name: ImageFrameInfo
Method or attribute name: width?: number \| string;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageFrameInfo
Method or attribute name: height?: number \| string;
Initial version: 7|Class name: ImageFrameInfo
Method or attribute name: height?: number \| string;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageFrameInfo
Method or attribute name: top?: number \| string;
Initial version: 7|Class name: ImageFrameInfo
Method or attribute name: top?: number \| string;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageFrameInfo
Method or attribute name: left?: number \| string;
Initial version: 7|Class name: ImageFrameInfo
Method or attribute name: left?: number \| string;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageFrameInfo
Method or attribute name: duration?: number;
Initial version: 7|Class name: ImageFrameInfo
Method or attribute name: duration?: number;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageAnimatorAttribute
Initial version: 7|Class name: ImageAnimatorAttribute
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: images(value: Array\): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: images(value: Array\): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: state(value: AnimationStatus): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: state(value: AnimationStatus): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: duration(value: number): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: duration(value: number): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: reverse(value: boolean): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: reverse(value: boolean): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: fixedSize(value: boolean): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: fixedSize(value: boolean): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: fillMode(value: FillMode): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: fillMode(value: FillMode): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: iterations(value: number): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: iterations(value: number): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: onStart(event: () => void): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: onStart(event: () => void): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: onPause(event: () => void): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: onPause(event: () => void): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: onRepeat(event: () => void): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: onRepeat(event: () => void): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: onCancel(event: () => void): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: onCancel(event: () => void): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: ImageAnimatorAttribute
Method or attribute name: onFinish(event: () => void): ImageAnimatorAttribute;
Initial version: 7|Class name: ImageAnimatorAttribute
Method or attribute name: onFinish(event: () => void): ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const ImageAnimator: ImageAnimatorInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const ImageAnimator: ImageAnimatorInterface;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const ImageAnimatorInstance: ImageAnimatorAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const ImageAnimatorInstance: ImageAnimatorAttribute;
Initial version: 10|image_animator.d.ts| -|Initial version changed|Class name: DataChangeListener
Initial version: 7|Class name: DataChangeListener
Initial version: 10|lazy_for_each.d.ts| -|Initial version changed|Class name: DataChangeListener
Method or attribute name: onDataReloaded(): void;
Initial version: 7|Class name: DataChangeListener
Method or attribute name: onDataReloaded(): void;
Initial version: 10|lazy_for_each.d.ts| -|Initial version changed|Class name: DataChangeListener
Method or attribute name: onDataAdd(index: number): void;
Initial version: 8|Class name: DataChangeListener
Method or attribute name: onDataAdd(index: number): void;
Initial version: 10|lazy_for_each.d.ts| -|Initial version changed|Class name: DataChangeListener
Method or attribute name: onDataMove(from: number, to: number): void;
Initial version: 8|Class name: DataChangeListener
Method or attribute name: onDataMove(from: number, to: number): void;
Initial version: 10|lazy_for_each.d.ts| -|Initial version changed|Class name: DataChangeListener
Method or attribute name: onDataDelete(index: number): void;
Initial version: 8|Class name: DataChangeListener
Method or attribute name: onDataDelete(index: number): void;
Initial version: 10|lazy_for_each.d.ts| -|Initial version changed|Class name: DataChangeListener
Method or attribute name: onDataChange(index: number): void;
Initial version: 8|Class name: DataChangeListener
Method or attribute name: onDataChange(index: number): void;
Initial version: 10|lazy_for_each.d.ts| -|Initial version changed|Class name: IDataSource
Initial version: 7|Class name: IDataSource
Initial version: 10|lazy_for_each.d.ts| -|Initial version changed|Class name: IDataSource
Method or attribute name: totalCount(): number;
Initial version: 7|Class name: IDataSource
Method or attribute name: totalCount(): number;
Initial version: 10|lazy_for_each.d.ts| -|Initial version changed|Class name: IDataSource
Method or attribute name: getData(index: number): any;
Initial version: 7|Class name: IDataSource
Method or attribute name: getData(index: number): any;
Initial version: 10|lazy_for_each.d.ts| -|Initial version changed|Class name: IDataSource
Method or attribute name: registerDataChangeListener(listener: DataChangeListener): void;
Initial version: 7|Class name: IDataSource
Method or attribute name: registerDataChangeListener(listener: DataChangeListener): void;
Initial version: 10|lazy_for_each.d.ts| -|Initial version changed|Class name: IDataSource
Method or attribute name: unregisterDataChangeListener(listener: DataChangeListener): void;
Initial version: 7|Class name: IDataSource
Method or attribute name: unregisterDataChangeListener(listener: DataChangeListener): void;
Initial version: 10|lazy_for_each.d.ts| -|Initial version changed|Class name: LazyForEachInterface
Initial version: 7|Class name: LazyForEachInterface
Initial version: 10|lazy_for_each.d.ts| -|Initial version changed|Class name: LazyForEachInterface
Method or attribute name: (
dataSource: IDataSource,
itemGenerator: (item: any, index?: number) => void,
keyGenerator?: (item: any, index?: number) => string,
): LazyForEachInterface;
Initial version: 7|Class name: LazyForEachInterface
Method or attribute name: (
dataSource: IDataSource,
itemGenerator: (item: any, index?: number) => void,
keyGenerator?: (item: any, index?: number) => string,
): LazyForEachInterface;
Initial version: 10|lazy_for_each.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const LazyForEach: LazyForEachInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const LazyForEach: LazyForEachInterface;
Initial version: 10|lazy_for_each.d.ts| -|Initial version changed|Class name: ListItemAlign
Initial version: 9|Class name: ListItemAlign
Initial version: 10|list.d.ts| -|Initial version changed|Class name: ListItemAlign
Method or attribute name: Start
Initial version: 9|Class name: ListItemAlign
Method or attribute name: Start
Initial version: 10|list.d.ts| -|Initial version changed|Class name: ListItemAlign
Method or attribute name: Center
Initial version: 9|Class name: ListItemAlign
Method or attribute name: Center
Initial version: 10|list.d.ts| -|Initial version changed|Class name: ListItemAlign
Method or attribute name: End
Initial version: 9|Class name: ListItemAlign
Method or attribute name: End
Initial version: 10|list.d.ts| -|Initial version changed|Class name: StickyStyle
Initial version: 9|Class name: StickyStyle
Initial version: 10|list.d.ts| -|Initial version changed|Class name: StickyStyle
Method or attribute name: None = 0
Initial version: 9|Class name: StickyStyle
Method or attribute name: None = 0
Initial version: 10|list.d.ts| -|Initial version changed|Class name: StickyStyle
Method or attribute name: Header = 1
Initial version: 9|Class name: StickyStyle
Method or attribute name: Header = 1
Initial version: 10|list.d.ts| -|Initial version changed|Class name: StickyStyle
Method or attribute name: Footer = 2
Initial version: 9|Class name: StickyStyle
Method or attribute name: Footer = 2
Initial version: 10|list.d.ts| -|Initial version changed|Class name: ListAttribute
Method or attribute name: lanes(value: number \| LengthConstrain): ListAttribute;
Initial version: 9|Class name: ListAttribute
Method or attribute name: lanes(value: number \| LengthConstrain): ListAttribute;
Initial version: 10|list.d.ts| -|Initial version changed|Class name: ListAttribute
Method or attribute name: alignListItem(value: ListItemAlign): ListAttribute;
Initial version: 9|Class name: ListAttribute
Method or attribute name: alignListItem(value: ListItemAlign): ListAttribute;
Initial version: 10|list.d.ts| -|Initial version changed|Class name: ListAttribute
Method or attribute name: sticky(value: StickyStyle): ListAttribute;
Initial version: 9|Class name: ListAttribute
Method or attribute name: sticky(value: StickyStyle): ListAttribute;
Initial version: 10|list.d.ts| -|Initial version changed|Class name: ListAttribute
Method or attribute name: onScrollStart(event: () => void): ListAttribute;
Initial version: 9|Class name: ListAttribute
Method or attribute name: onScrollStart(event: () => void): ListAttribute;
Initial version: 10|list.d.ts| -|Initial version changed|Class name: ListAttribute
Method or attribute name: onItemMove(event: (from: number, to: number) => boolean): ListAttribute;
Initial version: 7|Class name: ListAttribute
Method or attribute name: onItemMove(event: (from: number, to: number) => boolean): ListAttribute;
Initial version: 10|list.d.ts| -|Initial version changed|Class name: ListAttribute
Method or attribute name: onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => ((() => any) \| void)): ListAttribute;
Initial version: 8|Class name: ListAttribute
Method or attribute name: onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => ((() => any) \| void)): ListAttribute;
Initial version: 10|list.d.ts| -|Initial version changed|Class name: ListAttribute
Method or attribute name: onItemDragEnter(event: (event: ItemDragInfo) => void): ListAttribute;
Initial version: 8|Class name: ListAttribute
Method or attribute name: onItemDragEnter(event: (event: ItemDragInfo) => void): ListAttribute;
Initial version: 10|list.d.ts| -|Initial version changed|Class name: ListAttribute
Method or attribute name: onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): ListAttribute;
Initial version: 8|Class name: ListAttribute
Method or attribute name: onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): ListAttribute;
Initial version: 10|list.d.ts| -|Initial version changed|Class name: ListAttribute
Method or attribute name: onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): ListAttribute;
Initial version: 8|Class name: ListAttribute
Method or attribute name: onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): ListAttribute;
Initial version: 10|list.d.ts| -|Initial version changed|Class name: ListAttribute
Method or attribute name: onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute;
Initial version: 8|Class name: ListAttribute
Method or attribute name: onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): ListAttribute;
Initial version: 10|list.d.ts| -|Initial version changed|Class name: ListAttribute
Method or attribute name: onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ListAttribute;
Initial version: 9|Class name: ListAttribute
Method or attribute name: onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ListAttribute;
Initial version: 10|list.d.ts| -|Initial version changed|Class name: SwipeEdgeEffect
Initial version: 9|Class name: SwipeEdgeEffect
Initial version: 10|list_item.d.ts| -|Initial version changed|Class name: SwipeEdgeEffect
Method or attribute name: Spring
Initial version: 9|Class name: SwipeEdgeEffect
Method or attribute name: Spring
Initial version: 10|list_item.d.ts| -|Initial version changed|Class name: SwipeEdgeEffect
Method or attribute name: None
Initial version: 9|Class name: SwipeEdgeEffect
Method or attribute name: None
Initial version: 10|list_item.d.ts| -|Initial version changed|Class name: SwipeActionOptions
Initial version: 9|Class name: SwipeActionOptions
Initial version: 10|list_item.d.ts| -|Initial version changed|Class name: SwipeActionOptions
Method or attribute name: start?: CustomBuilder;
Initial version: 9|Class name: SwipeActionOptions
Method or attribute name: start?: CustomBuilder;
Initial version: 10|list_item.d.ts| -|Initial version changed|Class name: SwipeActionOptions
Method or attribute name: end?: CustomBuilder;
Initial version: 9|Class name: SwipeActionOptions
Method or attribute name: end?: CustomBuilder;
Initial version: 10|list_item.d.ts| -|Initial version changed|Class name: SwipeActionOptions
Method or attribute name: edgeEffect?: SwipeEdgeEffect;
Initial version: 9|Class name: SwipeActionOptions
Method or attribute name: edgeEffect?: SwipeEdgeEffect;
Initial version: 10|list_item.d.ts| -|Initial version changed|Class name: ListItemAttribute
Method or attribute name: selectable(value: boolean): ListItemAttribute;
Initial version: 8|Class name: ListItemAttribute
Method or attribute name: selectable(value: boolean): ListItemAttribute;
Initial version: 9|list_item.d.ts| -|Initial version changed|Class name: ListItemAttribute
Method or attribute name: swipeAction(value: SwipeActionOptions): ListItemAttribute;
Initial version: 9|Class name: ListItemAttribute
Method or attribute name: swipeAction(value: SwipeActionOptions): ListItemAttribute;
Initial version: 10|list_item.d.ts| -|Initial version changed|Class name: ListItemGroupOptions
Initial version: 9|Class name: ListItemGroupOptions
Initial version: 10|list_item_group.d.ts| -|Initial version changed|Class name: ListItemGroupOptions
Method or attribute name: header?: CustomBuilder;
Initial version: 9|Class name: ListItemGroupOptions
Method or attribute name: header?: CustomBuilder;
Initial version: 10|list_item_group.d.ts| -|Initial version changed|Class name: ListItemGroupOptions
Method or attribute name: footer?: CustomBuilder;
Initial version: 9|Class name: ListItemGroupOptions
Method or attribute name: footer?: CustomBuilder;
Initial version: 10|list_item_group.d.ts| -|Initial version changed|Class name: ListItemGroupOptions
Method or attribute name: space?: number \| string;
Initial version: 9|Class name: ListItemGroupOptions
Method or attribute name: space?: number \| string;
Initial version: 10|list_item_group.d.ts| -|Initial version changed|Class name: ListItemGroupInterface
Initial version: 9|Class name: ListItemGroupInterface
Initial version: 10|list_item_group.d.ts| -|Initial version changed|Class name: ListItemGroupInterface
Method or attribute name: (options?: ListItemGroupOptions): ListItemGroupAttribute;
Initial version: 9|Class name: ListItemGroupInterface
Method or attribute name: (options?: ListItemGroupOptions): ListItemGroupAttribute;
Initial version: 10|list_item_group.d.ts| -|Initial version changed|Class name: ListItemGroupAttribute
Initial version: 9|Class name: ListItemGroupAttribute
Initial version: 10|list_item_group.d.ts| -|Initial version changed|Class name: ListItemGroupAttribute
Method or attribute name: divider(
value: {
strokeWidth: Length;
color?: ResourceColor;
startMargin?: Length;
endMargin?: Length;
} \| null,
): ListItemGroupAttribute;
Initial version: 9|Class name: ListItemGroupAttribute
Method or attribute name: divider(
value: {
strokeWidth: Length;
color?: ResourceColor;
startMargin?: Length;
endMargin?: Length;
} \| null,
): ListItemGroupAttribute;
Initial version: 10|list_item_group.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const ListItemGroupInstance: ListItemGroupAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const ListItemGroupInstance: ListItemGroupAttribute;
Initial version: 10|list_item_group.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const ListItemGroup: ListItemGroupInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const ListItemGroup: ListItemGroupInterface;
Initial version: 10|list_item_group.d.ts| -|Initial version changed|Class name: MenuInterface
Initial version: 9|Class name: MenuInterface
Initial version: 10|menu.d.ts| -|Initial version changed|Class name: MenuInterface
Method or attribute name: (): MenuAttribute;
Initial version: 9|Class name: MenuInterface
Method or attribute name: (): MenuAttribute;
Initial version: 10|menu.d.ts| -|Initial version changed|Class name: MenuAttribute
Initial version: 9|Class name: MenuAttribute
Initial version: 10|menu.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Menu: MenuInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const Menu: MenuInterface;
Initial version: 10|menu.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const MenuInstance: MenuAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const MenuInstance: MenuAttribute;
Initial version: 10|menu.d.ts| -|Initial version changed|Class name: MenuItemOptions
Initial version: 9|Class name: MenuItemOptions
Initial version: 10|menu_item.d.ts| -|Initial version changed|Class name: MenuItemOptions
Method or attribute name: startIcon?: ResourceStr;
Initial version: 9|Class name: MenuItemOptions
Method or attribute name: startIcon?: ResourceStr;
Initial version: 10|menu_item.d.ts| -|Initial version changed|Class name: MenuItemOptions
Method or attribute name: content?: ResourceStr;
Initial version: 9|Class name: MenuItemOptions
Method or attribute name: content?: ResourceStr;
Initial version: 10|menu_item.d.ts| -|Initial version changed|Class name: MenuItemOptions
Method or attribute name: endIcon?: ResourceStr;
Initial version: 9|Class name: MenuItemOptions
Method or attribute name: endIcon?: ResourceStr;
Initial version: 10|menu_item.d.ts| -|Initial version changed|Class name: MenuItemOptions
Method or attribute name: labelInfo?: ResourceStr;
Initial version: 9|Class name: MenuItemOptions
Method or attribute name: labelInfo?: ResourceStr;
Initial version: 10|menu_item.d.ts| -|Initial version changed|Class name: MenuItemOptions
Method or attribute name: builder?: CustomBuilder;
Initial version: 9|Class name: MenuItemOptions
Method or attribute name: builder?: CustomBuilder;
Initial version: 10|menu_item.d.ts| -|Initial version changed|Class name: MenuItemInterface
Initial version: 9|Class name: MenuItemInterface
Initial version: 10|menu_item.d.ts| -|Initial version changed|Class name: MenuItemInterface
Method or attribute name: (value?: MenuItemOptions \| CustomBuilder): MenuItemAttribute;
Initial version: 9|Class name: MenuItemInterface
Method or attribute name: (value?: MenuItemOptions \| CustomBuilder): MenuItemAttribute;
Initial version: 10|menu_item.d.ts| -|Initial version changed|Class name: MenuItemAttribute
Initial version: 9|Class name: MenuItemAttribute
Initial version: 10|menu_item.d.ts| -|Initial version changed|Class name: MenuItemAttribute
Method or attribute name: selected(value: boolean): MenuItemAttribute;
Initial version: 9|Class name: MenuItemAttribute
Method or attribute name: selected(value: boolean): MenuItemAttribute;
Initial version: 10|menu_item.d.ts| -|Initial version changed|Class name: MenuItemAttribute
Method or attribute name: onChange(callback: (selected: boolean) => void): MenuItemAttribute;
Initial version: 9|Class name: MenuItemAttribute
Method or attribute name: onChange(callback: (selected: boolean) => void): MenuItemAttribute;
Initial version: 10|menu_item.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const MenuItem: MenuItemInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const MenuItem: MenuItemInterface;
Initial version: 10|menu_item.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const MenuItemInstance: MenuItemAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const MenuItemInstance: MenuItemAttribute;
Initial version: 10|menu_item.d.ts| -|Initial version changed|Class name: MenuItemGroupOptions
Initial version: 9|Class name: MenuItemGroupOptions
Initial version: 10|menu_item_group.d.ts| -|Initial version changed|Class name: MenuItemGroupOptions
Method or attribute name: header?: ResourceStr \| CustomBuilder;
Initial version: 9|Class name: MenuItemGroupOptions
Method or attribute name: header?: ResourceStr \| CustomBuilder;
Initial version: 10|menu_item_group.d.ts| -|Initial version changed|Class name: MenuItemGroupOptions
Method or attribute name: footer?: ResourceStr \| CustomBuilder;
Initial version: 9|Class name: MenuItemGroupOptions
Method or attribute name: footer?: ResourceStr \| CustomBuilder;
Initial version: 10|menu_item_group.d.ts| -|Initial version changed|Class name: MenuItemGroupInterface
Initial version: 9|Class name: MenuItemGroupInterface
Initial version: 10|menu_item_group.d.ts| -|Initial version changed|Class name: MenuItemGroupInterface
Method or attribute name: (value?: MenuItemGroupOptions): MenuItemGroupAttribute;
Initial version: 9|Class name: MenuItemGroupInterface
Method or attribute name: (value?: MenuItemGroupOptions): MenuItemGroupAttribute;
Initial version: 10|menu_item_group.d.ts| -|Initial version changed|Class name: MenuItemGroupAttribute
Initial version: 9|Class name: MenuItemGroupAttribute
Initial version: 10|menu_item_group.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const MenuItemGroup: MenuItemGroupInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const MenuItemGroup: MenuItemGroupInterface;
Initial version: 10|menu_item_group.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const MenuItemGroupInstance: MenuItemGroupAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const MenuItemGroupInstance: MenuItemGroupAttribute;
Initial version: 10|menu_item_group.d.ts| -|Initial version changed|Class name: NavigationCommonTitle
Initial version: 9|Class name: NavigationCommonTitle
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationCommonTitle
Method or attribute name: main: string;
Initial version: 9|Class name: NavigationCommonTitle
Method or attribute name: main: string;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationCommonTitle
Method or attribute name: sub: string;
Initial version: 9|Class name: NavigationCommonTitle
Method or attribute name: sub: string;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationCustomTitle
Initial version: 9|Class name: NavigationCustomTitle
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationCustomTitle
Method or attribute name: builder: CustomBuilder;
Initial version: 9|Class name: NavigationCustomTitle
Method or attribute name: builder: CustomBuilder;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationCustomTitle
Method or attribute name: height: TitleHeight \| Length;
Initial version: 9|Class name: NavigationCustomTitle
Method or attribute name: height: TitleHeight \| Length;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationMode
Initial version: 9|Class name: NavigationMode
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationMode
Method or attribute name: Stack
Initial version: 9|Class name: NavigationMode
Method or attribute name: Stack
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationMode
Method or attribute name: Split
Initial version: 9|Class name: NavigationMode
Method or attribute name: Split
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationMode
Method or attribute name: Auto
Initial version: 9|Class name: NavigationMode
Method or attribute name: Auto
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavBarPosition
Initial version: 9|Class name: NavBarPosition
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavBarPosition
Method or attribute name: Start
Initial version: 9|Class name: NavBarPosition
Method or attribute name: Start
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavBarPosition
Method or attribute name: End
Initial version: 9|Class name: NavBarPosition
Method or attribute name: End
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationTitleMode
Initial version: 8|Class name: NavigationTitleMode
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationTitleMode
Method or attribute name: Free = 0
Initial version: 8|Class name: NavigationTitleMode
Method or attribute name: Free = 0
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationTitleMode
Method or attribute name: Full
Initial version: 8|Class name: NavigationTitleMode
Method or attribute name: Full
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationTitleMode
Method or attribute name: Mini
Initial version: 8|Class name: NavigationTitleMode
Method or attribute name: Mini
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationMenuItem
Method or attribute name: value: string;
Initial version: 8|Class name: NavigationMenuItem
Method or attribute name: value: string;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationMenuItem
Method or attribute name: icon?: string;
Initial version: 8|Class name: NavigationMenuItem
Method or attribute name: icon?: string;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationMenuItem
Method or attribute name: action?: () => void;
Initial version: 8|Class name: NavigationMenuItem
Method or attribute name: action?: () => void;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationInterface
Initial version: 8|Class name: NavigationInterface
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationInterface
Method or attribute name: (): NavigationAttribute;
Initial version: 8|Class name: NavigationInterface
Method or attribute name: (): NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationAttribute
Initial version: 8|Class name: NavigationAttribute
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationAttribute
Method or attribute name: navBarWidth(value: Length): NavigationAttribute;
Initial version: 9|Class name: NavigationAttribute
Method or attribute name: navBarWidth(value: Length): NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationAttribute
Method or attribute name: navBarPosition(value: NavBarPosition): NavigationAttribute;
Initial version: 9|Class name: NavigationAttribute
Method or attribute name: navBarPosition(value: NavBarPosition): NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationAttribute
Method or attribute name: mode(value: NavigationMode): NavigationAttribute;
Initial version: 9|Class name: NavigationAttribute
Method or attribute name: mode(value: NavigationMode): NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationAttribute
Method or attribute name: backButtonIcon(value: string \| PixelMap \| Resource): NavigationAttribute;
Initial version: 9|Class name: NavigationAttribute
Method or attribute name: backButtonIcon(value: string \| PixelMap \| Resource): NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationAttribute
Method or attribute name: hideNavBar(value: boolean): NavigationAttribute;
Initial version: 9|Class name: NavigationAttribute
Method or attribute name: hideNavBar(value: boolean): NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationAttribute
Method or attribute name: hideTitleBar(value: boolean): NavigationAttribute;
Initial version: 8|Class name: NavigationAttribute
Method or attribute name: hideTitleBar(value: boolean): NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationAttribute
Method or attribute name: hideBackButton(value: boolean): NavigationAttribute;
Initial version: 8|Class name: NavigationAttribute
Method or attribute name: hideBackButton(value: boolean): NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationAttribute
Method or attribute name: titleMode(value: NavigationTitleMode): NavigationAttribute;
Initial version: 8|Class name: NavigationAttribute
Method or attribute name: titleMode(value: NavigationTitleMode): NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationAttribute
Method or attribute name: menus(value: Array\ \| CustomBuilder): NavigationAttribute;
Initial version: 8|Class name: NavigationAttribute
Method or attribute name: menus(value: Array\ \| CustomBuilder): NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationAttribute
Method or attribute name: toolBar(value: object \| CustomBuilder): NavigationAttribute;
Initial version: 8|Class name: NavigationAttribute
Method or attribute name: toolBar(value: object \| CustomBuilder): NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationAttribute
Method or attribute name: hideToolBar(value: boolean): NavigationAttribute;
Initial version: 8|Class name: NavigationAttribute
Method or attribute name: hideToolBar(value: boolean): NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationAttribute
Method or attribute name: onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute;
Initial version: 8|Class name: NavigationAttribute
Method or attribute name: onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationAttribute
Method or attribute name: onNavBarStateChange(callback: (isVisible: boolean) => void): NavigationAttribute;
Initial version: 9|Class name: NavigationAttribute
Method or attribute name: onNavBarStateChange(callback: (isVisible: boolean) => void): NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Navigation: NavigationInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const Navigation: NavigationInterface;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const NavigationInstance: NavigationAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const NavigationInstance: NavigationAttribute;
Initial version: 10|navigation.d.ts| -|Initial version changed|Class name: NavigationType
Initial version: 7|Class name: NavigationType
Initial version: 10|navigator.d.ts| -|Initial version changed|Class name: NavigationType
Method or attribute name: Push
Initial version: 7|Class name: NavigationType
Method or attribute name: Push
Initial version: 10|navigator.d.ts| -|Initial version changed|Class name: NavigationType
Method or attribute name: Back
Initial version: 7|Class name: NavigationType
Method or attribute name: Back
Initial version: 10|navigator.d.ts| -|Initial version changed|Class name: NavigationType
Method or attribute name: Replace
Initial version: 7|Class name: NavigationType
Method or attribute name: Replace
Initial version: 10|navigator.d.ts| -|Initial version changed|Class name: NavigatorInterface
Initial version: 7|Class name: NavigatorInterface
Initial version: 10|navigator.d.ts| -|Initial version changed|Class name: NavigatorInterface
Method or attribute name: (value?: { target: string; type?: NavigationType }): NavigatorAttribute;
Initial version: 7|Class name: NavigatorInterface
Method or attribute name: (value?: { target: string; type?: NavigationType }): NavigatorAttribute;
Initial version: 10|navigator.d.ts| -|Initial version changed|Class name: NavigatorInterface
Method or attribute name: (): NavigatorAttribute;
Initial version: 7|Class name: NavigatorInterface
Method or attribute name: (): NavigatorAttribute;
Initial version: 10|navigator.d.ts| -|Initial version changed|Class name: NavigatorAttribute
Initial version: 7|Class name: NavigatorAttribute
Initial version: 10|navigator.d.ts| -|Initial version changed|Class name: NavigatorAttribute
Method or attribute name: active(value: boolean): NavigatorAttribute;
Initial version: 7|Class name: NavigatorAttribute
Method or attribute name: active(value: boolean): NavigatorAttribute;
Initial version: 10|navigator.d.ts| -|Initial version changed|Class name: NavigatorAttribute
Method or attribute name: type(value: NavigationType): NavigatorAttribute;
Initial version: 7|Class name: NavigatorAttribute
Method or attribute name: type(value: NavigationType): NavigatorAttribute;
Initial version: 10|navigator.d.ts| -|Initial version changed|Class name: NavigatorAttribute
Method or attribute name: target(value: string): NavigatorAttribute;
Initial version: 7|Class name: NavigatorAttribute
Method or attribute name: target(value: string): NavigatorAttribute;
Initial version: 10|navigator.d.ts| -|Initial version changed|Class name: NavigatorAttribute
Method or attribute name: params(value: object): NavigatorAttribute;
Initial version: 7|Class name: NavigatorAttribute
Method or attribute name: params(value: object): NavigatorAttribute;
Initial version: 10|navigator.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Navigator: NavigatorInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Navigator: NavigatorInterface;
Initial version: 10|navigator.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const NavigatorInstance: NavigatorAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const NavigatorInstance: NavigatorAttribute;
Initial version: 10|navigator.d.ts| -|Initial version changed|Class name: NavDestinationCommonTitle
Initial version: 9|Class name: NavDestinationCommonTitle
Initial version: 10|nav_destination.d.ts| -|Initial version changed|Class name: NavDestinationCommonTitle
Method or attribute name: main: string;
Initial version: 9|Class name: NavDestinationCommonTitle
Method or attribute name: main: string;
Initial version: 10|nav_destination.d.ts| -|Initial version changed|Class name: NavDestinationCommonTitle
Method or attribute name: sub: string;
Initial version: 9|Class name: NavDestinationCommonTitle
Method or attribute name: sub: string;
Initial version: 10|nav_destination.d.ts| -|Initial version changed|Class name: NavDestinationCustomTitle
Initial version: 9|Class name: NavDestinationCustomTitle
Initial version: 10|nav_destination.d.ts| -|Initial version changed|Class name: NavDestinationCustomTitle
Method or attribute name: builder: CustomBuilder;
Initial version: 9|Class name: NavDestinationCustomTitle
Method or attribute name: builder: CustomBuilder;
Initial version: 10|nav_destination.d.ts| -|Initial version changed|Class name: NavDestinationCustomTitle
Method or attribute name: height: TitleHeight \| Length;
Initial version: 9|Class name: NavDestinationCustomTitle
Method or attribute name: height: TitleHeight \| Length;
Initial version: 10|nav_destination.d.ts| -|Initial version changed|Class name: NavDestinationInterface
Initial version: 9|Class name: NavDestinationInterface
Initial version: 10|nav_destination.d.ts| -|Initial version changed|Class name: NavDestinationInterface
Method or attribute name: (): NavDestinationAttribute;
Initial version: 9|Class name: NavDestinationInterface
Method or attribute name: (): NavDestinationAttribute;
Initial version: 10|nav_destination.d.ts| -|Initial version changed|Class name: NavDestinationAttribute
Initial version: 9|Class name: NavDestinationAttribute
Initial version: 10|nav_destination.d.ts| -|Initial version changed|Class name: NavDestinationAttribute
Method or attribute name: title(value: string \| CustomBuilder \| NavDestinationCommonTitle \| NavDestinationCustomTitle): NavDestinationAttribute;
Initial version: 9|Class name: NavDestinationAttribute
Method or attribute name: title(value: string \| CustomBuilder \| NavDestinationCommonTitle \| NavDestinationCustomTitle): NavDestinationAttribute;
Initial version: 10|nav_destination.d.ts| -|Initial version changed|Class name: NavDestinationAttribute
Method or attribute name: hideTitleBar(value: boolean): NavDestinationAttribute;
Initial version: 9|Class name: NavDestinationAttribute
Method or attribute name: hideTitleBar(value: boolean): NavDestinationAttribute;
Initial version: 10|nav_destination.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const NavDestination: NavDestinationInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const NavDestination: NavDestinationInterface;
Initial version: 10|nav_destination.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const NavDestinationInstance: NavDestinationAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const NavDestinationInstance: NavDestinationAttribute;
Initial version: 10|nav_destination.d.ts| -|Initial version changed|Class name: NavRouterInterface
Initial version: 9|Class name: NavRouterInterface
Initial version: 10|nav_router.d.ts| -|Initial version changed|Class name: NavRouterInterface
Method or attribute name: (): NavRouterAttribute;
Initial version: 9|Class name: NavRouterInterface
Method or attribute name: (): NavRouterAttribute;
Initial version: 10|nav_router.d.ts| -|Initial version changed|Class name: NavRouterAttribute
Initial version: 9|Class name: NavRouterAttribute
Initial version: 10|nav_router.d.ts| -|Initial version changed|Class name: NavRouterAttribute
Method or attribute name: onStateChange(callback: (isActivated: boolean) => void): NavRouterAttribute;
Initial version: 9|Class name: NavRouterAttribute
Method or attribute name: onStateChange(callback: (isActivated: boolean) => void): NavRouterAttribute;
Initial version: 10|nav_router.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const NavRouter: NavRouterInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const NavRouter: NavRouterInterface;
Initial version: 10|nav_router.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const NavRouterInstance: NavRouterAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const NavRouterInstance: NavRouterAttribute;
Initial version: 10|nav_router.d.ts| -|Initial version changed|Class name: RouteType
Initial version: 7|Class name: RouteType
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: RouteType
Method or attribute name: None
Initial version: 7|Class name: RouteType
Method or attribute name: None
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: RouteType
Method or attribute name: Push
Initial version: 7|Class name: RouteType
Method or attribute name: Push
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: RouteType
Method or attribute name: Pop
Initial version: 7|Class name: RouteType
Method or attribute name: Pop
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: SlideEffect
Initial version: 7|Class name: SlideEffect
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: SlideEffect
Method or attribute name: Left
Initial version: 7|Class name: SlideEffect
Method or attribute name: Left
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: SlideEffect
Method or attribute name: Right
Initial version: 7|Class name: SlideEffect
Method or attribute name: Right
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: SlideEffect
Method or attribute name: Top
Initial version: 7|Class name: SlideEffect
Method or attribute name: Top
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: SlideEffect
Method or attribute name: Bottom
Initial version: 7|Class name: SlideEffect
Method or attribute name: Bottom
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: CommonTransition
Initial version: 7|Class name: CommonTransition
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: CommonTransition
Method or attribute name: constructor();
Initial version: 7|Class name: CommonTransition
Method or attribute name: constructor();
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: CommonTransition
Method or attribute name: slide(value: SlideEffect): T;
Initial version: 7|Class name: CommonTransition
Method or attribute name: slide(value: SlideEffect): T;
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: CommonTransition
Method or attribute name: translate(value: { x?: number \| string; y?: number \| string; z?: number \| string }): T;
Initial version: 7|Class name: CommonTransition
Method or attribute name: translate(value: { x?: number \| string; y?: number \| string; z?: number \| string }): T;
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: CommonTransition
Method or attribute name: scale(value: { x?: number; y?: number; z?: number; centerX?: number \| string; centerY?: number \| string }): T;
Initial version: 7|Class name: CommonTransition
Method or attribute name: scale(value: { x?: number; y?: number; z?: number; centerX?: number \| string; centerY?: number \| string }): T;
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: CommonTransition
Method or attribute name: opacity(value: number): T;
Initial version: 7|Class name: CommonTransition
Method or attribute name: opacity(value: number): T;
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: PageTransitionEnterInterface
Initial version: 7|Class name: PageTransitionEnterInterface
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: PageTransitionEnterInterface
Method or attribute name: (value: { type?: RouteType; duration?: number; curve?: Curve \| string; delay?: number }): PageTransitionEnterInterface;
Initial version: 7|Class name: PageTransitionEnterInterface
Method or attribute name: (value: { type?: RouteType; duration?: number; curve?: Curve \| string; delay?: number }): PageTransitionEnterInterface;
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: PageTransitionEnterInterface
Method or attribute name: onEnter(event: (type?: RouteType, progress?: number) => void): PageTransitionEnterInterface;
Initial version: 7|Class name: PageTransitionEnterInterface
Method or attribute name: onEnter(event: (type?: RouteType, progress?: number) => void): PageTransitionEnterInterface;
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: PageTransitionExitInterface
Initial version: 7|Class name: PageTransitionExitInterface
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: PageTransitionExitInterface
Method or attribute name: (value: { type?: RouteType; duration?: number; curve?: Curve \| string; delay?: number }): PageTransitionExitInterface;
Initial version: 7|Class name: PageTransitionExitInterface
Method or attribute name: (value: { type?: RouteType; duration?: number; curve?: Curve \| string; delay?: number }): PageTransitionExitInterface;
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: PageTransitionExitInterface
Method or attribute name: onExit(event: (type?: RouteType, progress?: number) => void): PageTransitionExitInterface;
Initial version: 7|Class name: PageTransitionExitInterface
Method or attribute name: onExit(event: (type?: RouteType, progress?: number) => void): PageTransitionExitInterface;
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const PageTransitionEnter: PageTransitionEnterInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const PageTransitionEnter: PageTransitionEnterInterface;
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const PageTransitionExit: PageTransitionExitInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const PageTransitionExit: PageTransitionExitInterface;
Initial version: 10|page_transition.d.ts| -|Initial version changed|Class name: PanelMode
Initial version: 7|Class name: PanelMode
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelMode
Method or attribute name: Mini
Initial version: 7|Class name: PanelMode
Method or attribute name: Mini
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelMode
Method or attribute name: Half
Initial version: 7|Class name: PanelMode
Method or attribute name: Half
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelMode
Method or attribute name: Full
Initial version: 7|Class name: PanelMode
Method or attribute name: Full
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelType
Initial version: 7|Class name: PanelType
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelType
Method or attribute name: Minibar
Initial version: 7|Class name: PanelType
Method or attribute name: Minibar
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelType
Method or attribute name: Foldable
Initial version: 7|Class name: PanelType
Method or attribute name: Foldable
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelType
Method or attribute name: Temporary
Initial version: 7|Class name: PanelType
Method or attribute name: Temporary
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelInterface
Initial version: 7|Class name: PanelInterface
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelInterface
Method or attribute name: (show: boolean): PanelAttribute;
Initial version: 7|Class name: PanelInterface
Method or attribute name: (show: boolean): PanelAttribute;
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelAttribute
Initial version: 7|Class name: PanelAttribute
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelAttribute
Method or attribute name: mode(value: PanelMode): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: mode(value: PanelMode): PanelAttribute;
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelAttribute
Method or attribute name: type(value: PanelType): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: type(value: PanelType): PanelAttribute;
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelAttribute
Method or attribute name: dragBar(value: boolean): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: dragBar(value: boolean): PanelAttribute;
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelAttribute
Method or attribute name: fullHeight(value: number \| string): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: fullHeight(value: number \| string): PanelAttribute;
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelAttribute
Method or attribute name: halfHeight(value: number \| string): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: halfHeight(value: number \| string): PanelAttribute;
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelAttribute
Method or attribute name: miniHeight(value: number \| string): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: miniHeight(value: number \| string): PanelAttribute;
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelAttribute
Method or attribute name: show(value: boolean): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: show(value: boolean): PanelAttribute;
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelAttribute
Method or attribute name: backgroundMask(color: ResourceColor): PanelAttribute;
Initial version: 9|Class name: PanelAttribute
Method or attribute name: backgroundMask(color: ResourceColor): PanelAttribute;
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelAttribute
Method or attribute name: onChange(
event: (
/**
* Width of content area.
* @since 7
*/
width: number,

/**
* Height of content area.
* @since 7
*/
height: number,

/**
* Initial state.
* @since 7
*/
mode: PanelMode,
) => void,
): PanelAttribute;
Initial version: 7|Class name: PanelAttribute
Method or attribute name: onChange(
event: (
/**
* Width of content area.
* @since 7
*/
width: number,

/**
* Height of content area.
* @since 7
*/
height: number,

/**
* Initial state.
* @since 7
*/
mode: PanelMode,
) => void,
): PanelAttribute;
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PanelAttribute
Method or attribute name: onHeightChange(callback: (value: number) => void): PanelAttribute;
Initial version: 9|Class name: PanelAttribute
Method or attribute name: onHeightChange(callback: (value: number) => void): PanelAttribute;
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Panel: PanelInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Panel: PanelInterface;
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const PanelInstance: PanelAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const PanelInstance: PanelAttribute;
Initial version: 10|panel.d.ts| -|Initial version changed|Class name: PatternLockController
Initial version: 9|Class name: PatternLockController
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: PatternLockController
Method or attribute name: constructor();
Initial version: N/A|Class name: PatternLockController
Method or attribute name: constructor();
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: PatternLockController
Method or attribute name: reset();
Initial version: N/A|Class name: PatternLockController
Method or attribute name: reset();
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: PatternLockInterface
Initial version: 9|Class name: PatternLockInterface
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: PatternLockAttribute
Initial version: 9|Class name: PatternLockAttribute
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: sideLength(value: Length): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: sideLength(value: Length): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: circleRadius(value: Length): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: circleRadius(value: Length): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: backgroundColor(value: ResourceColor): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: backgroundColor(value: ResourceColor): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: regularColor(value: ResourceColor): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: regularColor(value: ResourceColor): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: selectedColor(value: ResourceColor): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: selectedColor(value: ResourceColor): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: activeColor(value: ResourceColor): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: activeColor(value: ResourceColor): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: pathColor(value: ResourceColor): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: pathColor(value: ResourceColor): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: pathStrokeWidth(value: number \| string): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: pathStrokeWidth(value: number \| string): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: onPatternComplete(callback: (input: Array\) => void): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: onPatternComplete(callback: (input: Array\) => void): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: PatternLockAttribute
Method or attribute name: autoReset(value: boolean): PatternLockAttribute;
Initial version: 9|Class name: PatternLockAttribute
Method or attribute name: autoReset(value: boolean): PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const PatternLock: PatternLockInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const PatternLock: PatternLockInterface;
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const PatternLockInstance: PatternLockAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const PatternLockInstance: PatternLockAttribute;
Initial version: 10|pattern_lock.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Rect: RectInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const Rect: RectInterface;
Initial version: 10|rect.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const RectInstance: RectAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const RectInstance: RectAttribute;
Initial version: 10|rect.d.ts| -|Initial version changed|Class name: RefreshStatus
Initial version: 8|Class name: RefreshStatus
Initial version: 10|refresh.d.ts| -|Initial version changed|Class name: RefreshStatus
Method or attribute name: Inactive
Initial version: 8|Class name: RefreshStatus
Method or attribute name: Inactive
Initial version: 10|refresh.d.ts| -|Initial version changed|Class name: RefreshStatus
Method or attribute name: Drag
Initial version: 8|Class name: RefreshStatus
Method or attribute name: Drag
Initial version: 10|refresh.d.ts| -|Initial version changed|Class name: RefreshStatus
Method or attribute name: OverDrag
Initial version: 8|Class name: RefreshStatus
Method or attribute name: OverDrag
Initial version: 10|refresh.d.ts| -|Initial version changed|Class name: RefreshStatus
Method or attribute name: Refresh
Initial version: 8|Class name: RefreshStatus
Method or attribute name: Refresh
Initial version: 10|refresh.d.ts| -|Initial version changed|Class name: RefreshStatus
Method or attribute name: Done
Initial version: 8|Class name: RefreshStatus
Method or attribute name: Done
Initial version: 10|refresh.d.ts| -|Initial version changed|Class name: RefreshInterface
Initial version: 8|Class name: RefreshInterface
Initial version: 10|refresh.d.ts| -|Initial version changed|Class name: RefreshAttribute
Initial version: 8|Class name: RefreshAttribute
Initial version: 10|refresh.d.ts| -|Initial version changed|Class name: RefreshAttribute
Method or attribute name: onStateChange(callback: (state: RefreshStatus) => void): RefreshAttribute;
Initial version: 8|Class name: RefreshAttribute
Method or attribute name: onStateChange(callback: (state: RefreshStatus) => void): RefreshAttribute;
Initial version: 10|refresh.d.ts| -|Initial version changed|Class name: RefreshAttribute
Method or attribute name: onRefreshing(callback: () => void): RefreshAttribute;
Initial version: 8|Class name: RefreshAttribute
Method or attribute name: onRefreshing(callback: () => void): RefreshAttribute;
Initial version: 10|refresh.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Refresh: RefreshInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const Refresh: RefreshInterface;
Initial version: 10|refresh.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const RefreshInstance: RefreshAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const RefreshInstance: RefreshAttribute;
Initial version: 10|refresh.d.ts| -|Initial version changed|Class name: RelativeContainerInterface
Initial version: 9|Class name: RelativeContainerInterface
Initial version: 10|relative_container.d.ts| -|Initial version changed|Class name: RelativeContainerAttribute
Initial version: 9|Class name: RelativeContainerAttribute
Initial version: 10|relative_container.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const RelativeContainerInstance: RelativeContainerAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const RelativeContainerInstance: RelativeContainerAttribute;
Initial version: 10|relative_container.d.ts| -|Initial version changed|Class name: RowSplitInterface
Initial version: 7|Class name: RowSplitInterface
Initial version: 10|row_split.d.ts| -|Initial version changed|Class name: RowSplitInterface
Method or attribute name: (): RowSplitAttribute;
Initial version: 7|Class name: RowSplitInterface
Method or attribute name: (): RowSplitAttribute;
Initial version: 10|row_split.d.ts| -|Initial version changed|Class name: RowSplitAttribute
Initial version: 7|Class name: RowSplitAttribute
Initial version: 10|row_split.d.ts| -|Initial version changed|Class name: RowSplitAttribute
Method or attribute name: resizeable(value: boolean): RowSplitAttribute;
Initial version: 7|Class name: RowSplitAttribute
Method or attribute name: resizeable(value: boolean): RowSplitAttribute;
Initial version: 10|row_split.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const RowSplit: RowSplitInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const RowSplit: RowSplitInterface;
Initial version: 10|row_split.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const RowSplitInstance: RowSplitAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const RowSplitInstance: RowSplitAttribute;
Initial version: 10|row_split.d.ts| -|Initial version changed|Class name: ScrollDirection
Initial version: 7|Class name: ScrollDirection
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollDirection
Method or attribute name: Vertical
Initial version: 7|Class name: ScrollDirection
Method or attribute name: Vertical
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollDirection
Method or attribute name: Horizontal
Initial version: 7|Class name: ScrollDirection
Method or attribute name: Horizontal
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollDirection
Method or attribute name: None
Initial version: 7|Class name: ScrollDirection
Method or attribute name: None
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: Scroller
Initial version: 7|Class name: Scroller
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: Scroller
Method or attribute name: constructor();
Initial version: 7|Class name: Scroller
Method or attribute name: constructor();
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: Scroller
Method or attribute name: scrollEdge(value: Edge);
Initial version: 7|Class name: Scroller
Method or attribute name: scrollEdge(value: Edge);
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: Scroller
Method or attribute name: scrollPage(value: { next: boolean });
Initial version: 9|Class name: Scroller
Method or attribute name: scrollPage(value: { next: boolean });
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: Scroller
Method or attribute name: currentOffset();
Initial version: 7|Class name: Scroller
Method or attribute name: currentOffset();
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: Scroller
Method or attribute name: scrollBy(dx: Length, dy: Length);
Initial version: 9|Class name: Scroller
Method or attribute name: scrollBy(dx: Length, dy: Length);
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollInterface
Initial version: 7|Class name: ScrollInterface
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollInterface
Method or attribute name: (scroller?: Scroller): ScrollAttribute;
Initial version: 7|Class name: ScrollInterface
Method or attribute name: (scroller?: Scroller): ScrollAttribute;
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollAttribute
Initial version: 7|Class name: ScrollAttribute
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollAttribute
Method or attribute name: scrollable(value: ScrollDirection): ScrollAttribute;
Initial version: 7|Class name: ScrollAttribute
Method or attribute name: scrollable(value: ScrollDirection): ScrollAttribute;
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollAttribute
Method or attribute name: onScroll(event: (xOffset: number, yOffset: number) => void): ScrollAttribute;
Initial version: 7|Class name: ScrollAttribute
Method or attribute name: onScroll(event: (xOffset: number, yOffset: number) => void): ScrollAttribute;
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollAttribute
Method or attribute name: onScrollEdge(event: (side: Edge) => void): ScrollAttribute;
Initial version: 7|Class name: ScrollAttribute
Method or attribute name: onScrollEdge(event: (side: Edge) => void): ScrollAttribute;
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollAttribute
Method or attribute name: onScrollStart(event: () => void): ScrollAttribute;
Initial version: 9|Class name: ScrollAttribute
Method or attribute name: onScrollStart(event: () => void): ScrollAttribute;
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollAttribute
Method or attribute name: onScrollStop(event: () => void): ScrollAttribute;
Initial version: 9|Class name: ScrollAttribute
Method or attribute name: onScrollStop(event: () => void): ScrollAttribute;
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollAttribute
Method or attribute name: scrollBar(barState: BarState): ScrollAttribute;
Initial version: 7|Class name: ScrollAttribute
Method or attribute name: scrollBar(barState: BarState): ScrollAttribute;
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollAttribute
Method or attribute name: scrollBarColor(color: Color \| number \| string): ScrollAttribute;
Initial version: 7|Class name: ScrollAttribute
Method or attribute name: scrollBarColor(color: Color \| number \| string): ScrollAttribute;
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollAttribute
Method or attribute name: scrollBarWidth(value: number \| string): ScrollAttribute;
Initial version: 7|Class name: ScrollAttribute
Method or attribute name: scrollBarWidth(value: number \| string): ScrollAttribute;
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollAttribute
Method or attribute name: edgeEffect(edgeEffect: EdgeEffect): ScrollAttribute;
Initial version: 7|Class name: ScrollAttribute
Method or attribute name: edgeEffect(edgeEffect: EdgeEffect): ScrollAttribute;
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollAttribute
Method or attribute name: onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ScrollAttribute;
Initial version: 9|Class name: ScrollAttribute
Method or attribute name: onScrollFrameBegin(event: (offset: number, state: ScrollState) => { offsetRemain: number }): ScrollAttribute;
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Scroll: ScrollInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Scroll: ScrollInterface;
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const ScrollInstance: ScrollAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const ScrollInstance: ScrollAttribute;
Initial version: 10|scroll.d.ts| -|Initial version changed|Class name: ScrollBarDirection
Initial version: 8|Class name: ScrollBarDirection
Initial version: 10|scroll_bar.d.ts| -|Initial version changed|Class name: ScrollBarDirection
Method or attribute name: Vertical
Initial version: 8|Class name: ScrollBarDirection
Method or attribute name: Vertical
Initial version: 10|scroll_bar.d.ts| -|Initial version changed|Class name: ScrollBarDirection
Method or attribute name: Horizontal
Initial version: 8|Class name: ScrollBarDirection
Method or attribute name: Horizontal
Initial version: 10|scroll_bar.d.ts| -|Initial version changed|Class name: ScrollBarOptions
Initial version: 8|Class name: ScrollBarOptions
Initial version: 10|scroll_bar.d.ts| -|Initial version changed|Class name: ScrollBarOptions
Method or attribute name: scroller: Scroller;
Initial version: 8|Class name: ScrollBarOptions
Method or attribute name: scroller: Scroller;
Initial version: 10|scroll_bar.d.ts| -|Initial version changed|Class name: ScrollBarOptions
Method or attribute name: direction?: ScrollBarDirection;
Initial version: 8|Class name: ScrollBarOptions
Method or attribute name: direction?: ScrollBarDirection;
Initial version: 10|scroll_bar.d.ts| -|Initial version changed|Class name: ScrollBarOptions
Method or attribute name: state?: BarState;
Initial version: 8|Class name: ScrollBarOptions
Method or attribute name: state?: BarState;
Initial version: 10|scroll_bar.d.ts| -|Initial version changed|Class name: ScrollBarInterface
Initial version: 8|Class name: ScrollBarInterface
Initial version: 10|scroll_bar.d.ts| -|Initial version changed|Class name: ScrollBarInterface
Method or attribute name: (value: ScrollBarOptions): ScrollBarAttribute;
Initial version: 8|Class name: ScrollBarInterface
Method or attribute name: (value: ScrollBarOptions): ScrollBarAttribute;
Initial version: 10|scroll_bar.d.ts| -|Initial version changed|Class name: ScrollBarAttribute
Initial version: 8|Class name: ScrollBarAttribute
Initial version: 10|scroll_bar.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const ScrollBar: ScrollBarInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const ScrollBar: ScrollBarInterface;
Initial version: 10|scroll_bar.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const ScrollBarInstance: ScrollBarAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const ScrollBarInstance: ScrollBarAttribute;
Initial version: 10|scroll_bar.d.ts| -|Initial version changed|Class name: SearchController
Initial version: 8|Class name: SearchController
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SearchController
Method or attribute name: constructor();
Initial version: 8|Class name: SearchController
Method or attribute name: constructor();
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SearchController
Method or attribute name: caretPosition(value: number): void;
Initial version: 8|Class name: SearchController
Method or attribute name: caretPosition(value: number): void;
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SearchInterface
Initial version: 8|Class name: SearchInterface
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SearchAttribute
Initial version: 8|Class name: SearchAttribute
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SearchAttribute
Method or attribute name: placeholderColor(value: ResourceColor): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: placeholderColor(value: ResourceColor): SearchAttribute;
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SearchAttribute
Method or attribute name: placeholderFont(value?: Font): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: placeholderFont(value?: Font): SearchAttribute;
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SearchAttribute
Method or attribute name: textFont(value?: Font): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: textFont(value?: Font): SearchAttribute;
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SearchAttribute
Method or attribute name: onSubmit(callback: (value: string) => void): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: onSubmit(callback: (value: string) => void): SearchAttribute;
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SearchAttribute
Method or attribute name: onChange(callback: (value: string) => void): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: onChange(callback: (value: string) => void): SearchAttribute;
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SearchAttribute
Method or attribute name: onCopy(callback: (value: string) => void): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: onCopy(callback: (value: string) => void): SearchAttribute;
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SearchAttribute
Method or attribute name: onCut(callback: (value: string) => void): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: onCut(callback: (value: string) => void): SearchAttribute;
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SearchAttribute
Method or attribute name: onPaste(callback: (value: string) => void): SearchAttribute;
Initial version: 8|Class name: SearchAttribute
Method or attribute name: onPaste(callback: (value: string) => void): SearchAttribute;
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SearchAttribute
Method or attribute name: copyOption(value: CopyOptions): SearchAttribute;
Initial version: 9|Class name: SearchAttribute
Method or attribute name: copyOption(value: CopyOptions): SearchAttribute;
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SearchAttribute
Method or attribute name: textAlign(value: TextAlign): SearchAttribute;
Initial version: 9|Class name: SearchAttribute
Method or attribute name: textAlign(value: TextAlign): SearchAttribute;
Initial version: 10|search.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Search: SearchInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const Search: SearchInterface;
Initial version: 10|search.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const SearchInstance: SearchAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const SearchInstance: SearchAttribute;
Initial version: 10|search.d.ts| -|Initial version changed|Class name: SelectOption
Initial version: 8|Class name: SelectOption
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectOption
Method or attribute name: value: ResourceStr;
Initial version: 8|Class name: SelectOption
Method or attribute name: value: ResourceStr;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectOption
Method or attribute name: icon?: ResourceStr;
Initial version: 8|Class name: SelectOption
Method or attribute name: icon?: ResourceStr;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectInterface
Initial version: 8|Class name: SelectInterface
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectInterface
Method or attribute name: (options: Array\): SelectAttribute;
Initial version: 8|Class name: SelectInterface
Method or attribute name: (options: Array\): SelectAttribute;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectAttribute
Initial version: 8|Class name: SelectAttribute
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectAttribute
Method or attribute name: selected(value: number): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: selected(value: number): SelectAttribute;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectAttribute
Method or attribute name: value(value: string): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: value(value: string): SelectAttribute;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectAttribute
Method or attribute name: font(value: Font): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: font(value: Font): SelectAttribute;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectAttribute
Method or attribute name: fontColor(value: ResourceColor): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: fontColor(value: ResourceColor): SelectAttribute;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectAttribute
Method or attribute name: selectedOptionBgColor(value: ResourceColor): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: selectedOptionBgColor(value: ResourceColor): SelectAttribute;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectAttribute
Method or attribute name: selectedOptionFont(value: Font): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: selectedOptionFont(value: Font): SelectAttribute;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectAttribute
Method or attribute name: selectedOptionFontColor(value: ResourceColor): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: selectedOptionFontColor(value: ResourceColor): SelectAttribute;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectAttribute
Method or attribute name: optionBgColor(value: ResourceColor): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: optionBgColor(value: ResourceColor): SelectAttribute;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectAttribute
Method or attribute name: optionFont(value: Font): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: optionFont(value: Font): SelectAttribute;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectAttribute
Method or attribute name: optionFontColor(value: ResourceColor): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: optionFontColor(value: ResourceColor): SelectAttribute;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: SelectAttribute
Method or attribute name: onSelect(callback: (index: number, value?: string) => void): SelectAttribute;
Initial version: 8|Class name: SelectAttribute
Method or attribute name: onSelect(callback: (index: number, value?: string) => void): SelectAttribute;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Select: SelectInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const Select: SelectInterface;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const SelectInstance: SelectAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const SelectInstance: SelectAttribute;
Initial version: 10|select.d.ts| -|Initial version changed|Class name: ShapeInterface
Method or attribute name: new (value?: PixelMap): ShapeAttribute;
Initial version: 7|Class name: ShapeInterface
Method or attribute name: new (value?: PixelMap): ShapeAttribute;
Initial version: 10|shape.d.ts| -|Initial version changed|Class name: ShapeInterface
Method or attribute name: (value: PixelMap): ShapeAttribute;
Initial version: 7|Class name: ShapeInterface
Method or attribute name: (value: PixelMap): ShapeAttribute;
Initial version: 10|shape.d.ts| -|Initial version changed|Class name: SideBarContainerType
Initial version: 8|Class name: SideBarContainerType
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerType
Method or attribute name: Embed
Initial version: 8|Class name: SideBarContainerType
Method or attribute name: Embed
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerType
Method or attribute name: Overlay
Initial version: 8|Class name: SideBarContainerType
Method or attribute name: Overlay
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarPosition
Initial version: 9|Class name: SideBarPosition
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarPosition
Method or attribute name: Start
Initial version: 9|Class name: SideBarPosition
Method or attribute name: Start
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarPosition
Method or attribute name: End
Initial version: 9|Class name: SideBarPosition
Method or attribute name: End
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: ButtonStyle
Initial version: 8|Class name: ButtonStyle
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: ButtonStyle
Method or attribute name: left?: number;
Initial version: 8|Class name: ButtonStyle
Method or attribute name: left?: number;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: ButtonStyle
Method or attribute name: top?: number;
Initial version: 8|Class name: ButtonStyle
Method or attribute name: top?: number;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: ButtonStyle
Method or attribute name: width?: number;
Initial version: 8|Class name: ButtonStyle
Method or attribute name: width?: number;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: ButtonStyle
Method or attribute name: height?: number;
Initial version: 8|Class name: ButtonStyle
Method or attribute name: height?: number;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerInterface
Initial version: 8|Class name: SideBarContainerInterface
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerInterface
Method or attribute name: (type?: SideBarContainerType): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerInterface
Method or attribute name: (type?: SideBarContainerType): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerAttribute
Initial version: 8|Class name: SideBarContainerAttribute
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: showSideBar(value: boolean): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerAttribute
Method or attribute name: showSideBar(value: boolean): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: controlButton(value: ButtonStyle): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerAttribute
Method or attribute name: controlButton(value: ButtonStyle): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: showControlButton(value: boolean): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerAttribute
Method or attribute name: showControlButton(value: boolean): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: onChange(callback: (value: boolean) => void): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerAttribute
Method or attribute name: onChange(callback: (value: boolean) => void): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: sideBarWidth(value: number): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerAttribute
Method or attribute name: sideBarWidth(value: number): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: minSideBarWidth(value: number): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerAttribute
Method or attribute name: minSideBarWidth(value: number): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: maxSideBarWidth(value: number): SideBarContainerAttribute;
Initial version: 8|Class name: SideBarContainerAttribute
Method or attribute name: maxSideBarWidth(value: number): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: sideBarWidth(value: Length): SideBarContainerAttribute;
Initial version: 9|Class name: SideBarContainerAttribute
Method or attribute name: sideBarWidth(value: Length): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: minSideBarWidth(value: Length): SideBarContainerAttribute;
Initial version: 9|Class name: SideBarContainerAttribute
Method or attribute name: minSideBarWidth(value: Length): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: maxSideBarWidth(value: Length): SideBarContainerAttribute;
Initial version: 9|Class name: SideBarContainerAttribute
Method or attribute name: maxSideBarWidth(value: Length): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: autoHide(value: boolean): SideBarContainerAttribute;
Initial version: 9|Class name: SideBarContainerAttribute
Method or attribute name: autoHide(value: boolean): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: SideBarContainerAttribute
Method or attribute name: sideBarPosition(value: SideBarPosition): SideBarContainerAttribute;
Initial version: 9|Class name: SideBarContainerAttribute
Method or attribute name: sideBarPosition(value: SideBarPosition): SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const SideBarContainer: SideBarContainerInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const SideBarContainer: SideBarContainerInterface;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const SideBarContainerInstance: SideBarContainerAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const SideBarContainerInstance: SideBarContainerAttribute;
Initial version: 10|sidebar.d.ts| -|Initial version changed|Class name: ColorMode
Initial version: 7|Class name: ColorMode
Initial version: 10|state_management.d.ts| -|Initial version changed|Class name: ColorMode
Method or attribute name: LIGHT = 0
Initial version: 7|Class name: ColorMode
Method or attribute name: LIGHT = 0
Initial version: 10|state_management.d.ts| -|Initial version changed|Class name: ColorMode
Method or attribute name: DARK
Initial version: 7|Class name: ColorMode
Method or attribute name: DARK
Initial version: 10|state_management.d.ts| -|Initial version changed|Class name: LayoutDirection
Initial version: 7|Class name: LayoutDirection
Initial version: 10|state_management.d.ts| -|Initial version changed|Class name: LayoutDirection
Method or attribute name: LTR
Initial version: 7|Class name: LayoutDirection
Method or attribute name: LTR
Initial version: 10|state_management.d.ts| -|Initial version changed|Class name: LayoutDirection
Method or attribute name: RTL
Initial version: 7|Class name: LayoutDirection
Method or attribute name: RTL
Initial version: 10|state_management.d.ts| -|Initial version changed|Class name: LayoutDirection
Method or attribute name: Auto
Initial version: 8|Class name: LayoutDirection
Method or attribute name: Auto
Initial version: 10|state_management.d.ts| -|Initial version changed|Class name: StepperInterface
Initial version: 8|Class name: StepperInterface
Initial version: 10|stepper.d.ts| -|Initial version changed|Class name: StepperInterface
Method or attribute name: (value?: { index?: number }): StepperAttribute;
Initial version: 8|Class name: StepperInterface
Method or attribute name: (value?: { index?: number }): StepperAttribute;
Initial version: 10|stepper.d.ts| -|Initial version changed|Class name: StepperAttribute
Initial version: 8|Class name: StepperAttribute
Initial version: 10|stepper.d.ts| -|Initial version changed|Class name: StepperAttribute
Method or attribute name: onFinish(callback: () => void): StepperAttribute;
Initial version: 8|Class name: StepperAttribute
Method or attribute name: onFinish(callback: () => void): StepperAttribute;
Initial version: 10|stepper.d.ts| -|Initial version changed|Class name: StepperAttribute
Method or attribute name: onSkip(callback: () => void): StepperAttribute;
Initial version: 8|Class name: StepperAttribute
Method or attribute name: onSkip(callback: () => void): StepperAttribute;
Initial version: 10|stepper.d.ts| -|Initial version changed|Class name: StepperAttribute
Method or attribute name: onChange(callback: (prevIndex?: number, index?: number) => void): StepperAttribute;
Initial version: 8|Class name: StepperAttribute
Method or attribute name: onChange(callback: (prevIndex?: number, index?: number) => void): StepperAttribute;
Initial version: 10|stepper.d.ts| -|Initial version changed|Class name: StepperAttribute
Method or attribute name: onNext(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
Initial version: 8|Class name: StepperAttribute
Method or attribute name: onNext(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
Initial version: 10|stepper.d.ts| -|Initial version changed|Class name: StepperAttribute
Method or attribute name: onPrevious(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
Initial version: 8|Class name: StepperAttribute
Method or attribute name: onPrevious(callback: (index?: number, pendingIndex?: number) => void): StepperAttribute;
Initial version: 10|stepper.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Stepper: StepperInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const Stepper: StepperInterface;
Initial version: 10|stepper.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const StepperInstance: StepperAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const StepperInstance: StepperAttribute;
Initial version: 10|stepper.d.ts| -|Initial version changed|Class name: ItemState
Initial version: 8|Class name: ItemState
Initial version: 10|stepper_item.d.ts| -|Initial version changed|Class name: ItemState
Method or attribute name: Normal
Initial version: 8|Class name: ItemState
Method or attribute name: Normal
Initial version: 10|stepper_item.d.ts| -|Initial version changed|Class name: ItemState
Method or attribute name: Disabled
Initial version: 8|Class name: ItemState
Method or attribute name: Disabled
Initial version: 10|stepper_item.d.ts| -|Initial version changed|Class name: ItemState
Method or attribute name: Waiting
Initial version: 8|Class name: ItemState
Method or attribute name: Waiting
Initial version: 10|stepper_item.d.ts| -|Initial version changed|Class name: ItemState
Method or attribute name: Skip
Initial version: 8|Class name: ItemState
Method or attribute name: Skip
Initial version: 10|stepper_item.d.ts| -|Initial version changed|Class name: StepperItemInterface
Initial version: 8|Class name: StepperItemInterface
Initial version: 10|stepper_item.d.ts| -|Initial version changed|Class name: StepperItemInterface
Method or attribute name: (): StepperItemAttribute;
Initial version: 8|Class name: StepperItemInterface
Method or attribute name: (): StepperItemAttribute;
Initial version: 10|stepper_item.d.ts| -|Initial version changed|Class name: StepperItemAttribute
Initial version: 8|Class name: StepperItemAttribute
Initial version: 10|stepper_item.d.ts| -|Initial version changed|Class name: StepperItemAttribute
Method or attribute name: prevLabel(value: string): StepperItemAttribute;
Initial version: 8|Class name: StepperItemAttribute
Method or attribute name: prevLabel(value: string): StepperItemAttribute;
Initial version: 10|stepper_item.d.ts| -|Initial version changed|Class name: StepperItemAttribute
Method or attribute name: nextLabel(value: string): StepperItemAttribute;
Initial version: 8|Class name: StepperItemAttribute
Method or attribute name: nextLabel(value: string): StepperItemAttribute;
Initial version: 10|stepper_item.d.ts| -|Initial version changed|Class name: StepperItemAttribute
Method or attribute name: status(value?: ItemState): StepperItemAttribute;
Initial version: 8|Class name: StepperItemAttribute
Method or attribute name: status(value?: ItemState): StepperItemAttribute;
Initial version: 10|stepper_item.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const StepperItemInstance: StepperItemAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const StepperItemInstance: StepperItemAttribute;
Initial version: 10|stepper_item.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const StepperItem: StepperItemInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const StepperItem: StepperItemInterface;
Initial version: 10|stepper_item.d.ts| -|Initial version changed|Class name: SwiperController
Initial version: 7|Class name: SwiperController
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperController
Method or attribute name: constructor();
Initial version: 7|Class name: SwiperController
Method or attribute name: constructor();
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperController
Method or attribute name: showNext();
Initial version: 7|Class name: SwiperController
Method or attribute name: showNext();
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperController
Method or attribute name: showPrevious();
Initial version: 7|Class name: SwiperController
Method or attribute name: showPrevious();
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperController
Method or attribute name: finishAnimation(callback?: () => void);
Initial version: 7|Class name: SwiperController
Method or attribute name: finishAnimation(callback?: () => void);
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperDisplayMode
Initial version: 7|Class name: SwiperDisplayMode
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperDisplayMode
Method or attribute name: Stretch
Initial version: 7|Class name: SwiperDisplayMode
Method or attribute name: Stretch
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperDisplayMode
Method or attribute name: AutoLinear
Initial version: 7|Class name: SwiperDisplayMode
Method or attribute name: AutoLinear
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperInterface
Initial version: 7|Class name: SwiperInterface
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperInterface
Method or attribute name: (controller?: SwiperController): SwiperAttribute;
Initial version: 7|Class name: SwiperInterface
Method or attribute name: (controller?: SwiperController): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Initial version: 7|Class name: SwiperAttribute
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: index(value: number): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: index(value: number): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: autoPlay(value: boolean): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: autoPlay(value: boolean): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: interval(value: number): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: interval(value: number): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: loop(value: boolean): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: loop(value: boolean): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: duration(value: number): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: duration(value: number): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: vertical(value: boolean): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: vertical(value: boolean): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: itemSpace(value: number \| string): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: itemSpace(value: number \| string): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: displayMode(value: SwiperDisplayMode): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: displayMode(value: SwiperDisplayMode): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: cachedCount(value: number): SwiperAttribute;
Initial version: 8|Class name: SwiperAttribute
Method or attribute name: cachedCount(value: number): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: displayCount(value: number \| string): SwiperAttribute;
Initial version: 8|Class name: SwiperAttribute
Method or attribute name: displayCount(value: number \| string): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: effectMode(value: EdgeEffect): SwiperAttribute;
Initial version: 8|Class name: SwiperAttribute
Method or attribute name: effectMode(value: EdgeEffect): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: disableSwipe(value: boolean): SwiperAttribute;
Initial version: 8|Class name: SwiperAttribute
Method or attribute name: disableSwipe(value: boolean): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: onChange(event: (index: number) => void): SwiperAttribute;
Initial version: 7|Class name: SwiperAttribute
Method or attribute name: onChange(event: (index: number) => void): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: onAnimationStart(event: (index: number) => void): SwiperAttribute;
Initial version: 9|Class name: SwiperAttribute
Method or attribute name: onAnimationStart(event: (index: number) => void): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: SwiperAttribute
Method or attribute name: onAnimationEnd(event: (index: number) => void): SwiperAttribute;
Initial version: 9|Class name: SwiperAttribute
Method or attribute name: onAnimationEnd(event: (index: number) => void): SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Swiper: SwiperInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Swiper: SwiperInterface;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const SwiperInstance: SwiperAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const SwiperInstance: SwiperAttribute;
Initial version: 10|swiper.d.ts| -|Initial version changed|Class name: BarMode
Initial version: 7|Class name: BarMode
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: BarMode
Method or attribute name: Scrollable
Initial version: 7|Class name: BarMode
Method or attribute name: Scrollable
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: BarMode
Method or attribute name: Fixed
Initial version: 7|Class name: BarMode
Method or attribute name: Fixed
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: BarPosition
Initial version: 7|Class name: BarPosition
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: BarPosition
Method or attribute name: Start
Initial version: 7|Class name: BarPosition
Method or attribute name: Start
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: BarPosition
Method or attribute name: End
Initial version: 7|Class name: BarPosition
Method or attribute name: End
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: TabsController
Initial version: 7|Class name: TabsController
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: TabsController
Method or attribute name: constructor();
Initial version: 7|Class name: TabsController
Method or attribute name: constructor();
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: TabsController
Method or attribute name: changeIndex(value: number): void;
Initial version: 7|Class name: TabsController
Method or attribute name: changeIndex(value: number): void;
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: TabsInterface
Initial version: 7|Class name: TabsInterface
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: TabsInterface
Method or attribute name: (value?: { barPosition?: BarPosition; index?: number; controller?: TabsController }): TabsAttribute;
Initial version: 7|Class name: TabsInterface
Method or attribute name: (value?: { barPosition?: BarPosition; index?: number; controller?: TabsController }): TabsAttribute;
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: TabsAttribute
Initial version: 7|Class name: TabsAttribute
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: TabsAttribute
Method or attribute name: vertical(value: boolean): TabsAttribute;
Initial version: 7|Class name: TabsAttribute
Method or attribute name: vertical(value: boolean): TabsAttribute;
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: TabsAttribute
Method or attribute name: barPosition(value: BarPosition): TabsAttribute;
Initial version: 9|Class name: TabsAttribute
Method or attribute name: barPosition(value: BarPosition): TabsAttribute;
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: TabsAttribute
Method or attribute name: scrollable(value: boolean): TabsAttribute;
Initial version: 7|Class name: TabsAttribute
Method or attribute name: scrollable(value: boolean): TabsAttribute;
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: TabsAttribute
Method or attribute name: barMode(value: BarMode): TabsAttribute;
Initial version: 7|Class name: TabsAttribute
Method or attribute name: barMode(value: BarMode): TabsAttribute;
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: TabsAttribute
Method or attribute name: barWidth(value: Length): TabsAttribute;
Initial version: 8|Class name: TabsAttribute
Method or attribute name: barWidth(value: Length): TabsAttribute;
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: TabsAttribute
Method or attribute name: barHeight(value: Length): TabsAttribute;
Initial version: 8|Class name: TabsAttribute
Method or attribute name: barHeight(value: Length): TabsAttribute;
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: TabsAttribute
Method or attribute name: animationDuration(value: number): TabsAttribute;
Initial version: 7|Class name: TabsAttribute
Method or attribute name: animationDuration(value: number): TabsAttribute;
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: TabsAttribute
Method or attribute name: onChange(event: (index: number) => void): TabsAttribute;
Initial version: 7|Class name: TabsAttribute
Method or attribute name: onChange(event: (index: number) => void): TabsAttribute;
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Tabs: TabsInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Tabs: TabsInterface;
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TabsInstance: TabsAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const TabsInstance: TabsAttribute;
Initial version: 10|tabs.d.ts| -|Initial version changed|Class name: SubTabBarStyle
Initial version: 9|Class name: SubTabBarStyle
Initial version: 10|tab_content.d.ts| -|Initial version changed|Class name: BottomTabBarStyle
Initial version: 9|Class name: BottomTabBarStyle
Initial version: 10|tab_content.d.ts| -|Initial version changed|Class name: TabContentInterface
Initial version: 7|Class name: TabContentInterface
Initial version: 10|tab_content.d.ts| -|Initial version changed|Class name: TabContentInterface
Method or attribute name: (): TabContentAttribute;
Initial version: 7|Class name: TabContentInterface
Method or attribute name: (): TabContentAttribute;
Initial version: 10|tab_content.d.ts| -|Initial version changed|Class name: TabContentAttribute
Initial version: 7|Class name: TabContentAttribute
Initial version: 10|tab_content.d.ts| -|Initial version changed|Class name: TabContentAttribute
Method or attribute name: tabBar(value: SubTabBarStyle \| BottomTabBarStyle): TabContentAttribute;
Initial version: 9|Class name: TabContentAttribute
Method or attribute name: tabBar(value: SubTabBarStyle \| BottomTabBarStyle): TabContentAttribute;
Initial version: 10|tab_content.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TabContent: TabContentInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const TabContent: TabContentInterface;
Initial version: 10|tab_content.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TabContentInstance: TabContentAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const TabContentInstance: TabContentAttribute;
Initial version: 10|tab_content.d.ts| -|Initial version changed|Class name: TextAttribute
Method or attribute name: copyOption(value: CopyOptions): TextAttribute;
Initial version: 9|Class name: TextAttribute
Method or attribute name: copyOption(value: CopyOptions): TextAttribute;
Initial version: 10|text.d.ts| -|Initial version changed|Class name: TextAreaController
Initial version: 8|Class name: TextAreaController
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaController
Method or attribute name: constructor();
Initial version: 8|Class name: TextAreaController
Method or attribute name: constructor();
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaController
Method or attribute name: caretPosition(value: number): void;
Initial version: 8|Class name: TextAreaController
Method or attribute name: caretPosition(value: number): void;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaOptions
Initial version: 7|Class name: TextAreaOptions
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaOptions
Method or attribute name: placeholder?: ResourceStr;
Initial version: 7|Class name: TextAreaOptions
Method or attribute name: placeholder?: ResourceStr;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaOptions
Method or attribute name: text?: ResourceStr;
Initial version: 7|Class name: TextAreaOptions
Method or attribute name: text?: ResourceStr;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaOptions
Method or attribute name: controller?: TextAreaController;
Initial version: 8|Class name: TextAreaOptions
Method or attribute name: controller?: TextAreaController;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaInterface
Initial version: 7|Class name: TextAreaInterface
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaInterface
Method or attribute name: (value?: TextAreaOptions): TextAreaAttribute;
Initial version: 7|Class name: TextAreaInterface
Method or attribute name: (value?: TextAreaOptions): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Initial version: 7|Class name: TextAreaAttribute
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: placeholderColor(value: ResourceColor): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: placeholderColor(value: ResourceColor): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: placeholderFont(value: Font): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: placeholderFont(value: Font): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: textAlign(value: TextAlign): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: textAlign(value: TextAlign): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: caretColor(value: ResourceColor): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: caretColor(value: ResourceColor): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: fontColor(value: ResourceColor): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: fontColor(value: ResourceColor): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: fontSize(value: Length): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: fontSize(value: Length): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: fontStyle(value: FontStyle): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: fontStyle(value: FontStyle): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: inputFilter(value: ResourceStr, error?: (value: string) => void): TextAreaAttribute;
Initial version: 8|Class name: TextAreaAttribute
Method or attribute name: inputFilter(value: ResourceStr, error?: (value: string) => void): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: onChange(callback: (value: string) => void): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: onChange(callback: (value: string) => void): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: onCopy(callback: (value: string) => void): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: onCopy(callback: (value: string) => void): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: onCut(callback: (value: string) => void): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: onCut(callback: (value: string) => void): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: onPaste(callback: (value: string) => void): TextAreaAttribute;
Initial version: 7|Class name: TextAreaAttribute
Method or attribute name: onPaste(callback: (value: string) => void): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextAreaAttribute
Method or attribute name: copyOption(value: CopyOptions): TextAreaAttribute;
Initial version: 9|Class name: TextAreaAttribute
Method or attribute name: copyOption(value: CopyOptions): TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TextArea: TextAreaInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const TextArea: TextAreaInterface;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TextAreaInstance: TextAreaAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const TextAreaInstance: TextAreaAttribute;
Initial version: 10|text_area.d.ts| -|Initial version changed|Class name: TextClockController
Initial version: 8|Class name: TextClockController
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: TextClockController
Method or attribute name: constructor();
Initial version: 8|Class name: TextClockController
Method or attribute name: constructor();
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: TextClockController
Method or attribute name: start();
Initial version: 8|Class name: TextClockController
Method or attribute name: start();
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: TextClockController
Method or attribute name: stop();
Initial version: 8|Class name: TextClockController
Method or attribute name: stop();
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: TextClockInterface
Initial version: 8|Class name: TextClockInterface
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: TextClockInterface
Method or attribute name: (options?: { timeZoneOffset?: number; controller?: TextClockController }): TextClockAttribute;
Initial version: 8|Class name: TextClockInterface
Method or attribute name: (options?: { timeZoneOffset?: number; controller?: TextClockController }): TextClockAttribute;
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: TextClockAttribute
Method or attribute name: format(value: string): TextClockAttribute;
Initial version: 8|Class name: TextClockAttribute
Method or attribute name: format(value: string): TextClockAttribute;
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: TextClockAttribute
Method or attribute name: onDateChange(event: (value: number) => void): TextClockAttribute;
Initial version: 8|Class name: TextClockAttribute
Method or attribute name: onDateChange(event: (value: number) => void): TextClockAttribute;
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: TextClockAttribute
Method or attribute name: fontColor(value: ResourceColor): TextClockAttribute;
Initial version: 8|Class name: TextClockAttribute
Method or attribute name: fontColor(value: ResourceColor): TextClockAttribute;
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: TextClockAttribute
Method or attribute name: fontSize(value: Length): TextClockAttribute;
Initial version: 8|Class name: TextClockAttribute
Method or attribute name: fontSize(value: Length): TextClockAttribute;
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: TextClockAttribute
Method or attribute name: fontStyle(value: FontStyle): TextClockAttribute;
Initial version: 8|Class name: TextClockAttribute
Method or attribute name: fontStyle(value: FontStyle): TextClockAttribute;
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: TextClockAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextClockAttribute;
Initial version: 8|Class name: TextClockAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextClockAttribute;
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: TextClockAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextClockAttribute;
Initial version: 8|Class name: TextClockAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextClockAttribute;
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TextClock: TextClockInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const TextClock: TextClockInterface;
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TextClockInstance: TextClockAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const TextClockInstance: TextClockAttribute;
Initial version: 10|text_clock.d.ts| -|Initial version changed|Class name: InputType
Initial version: 7|Class name: InputType
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: InputType
Method or attribute name: Normal
Initial version: 7|Class name: InputType
Method or attribute name: Normal
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: InputType
Method or attribute name: Number
Initial version: 7|Class name: InputType
Method or attribute name: Number
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: InputType
Method or attribute name: PhoneNumber
Initial version: 9|Class name: InputType
Method or attribute name: PhoneNumber
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: InputType
Method or attribute name: Email
Initial version: 7|Class name: InputType
Method or attribute name: Email
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: InputType
Method or attribute name: Password
Initial version: 7|Class name: InputType
Method or attribute name: Password
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: EnterKeyType
Initial version: 7|Class name: EnterKeyType
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: EnterKeyType
Method or attribute name: Go
Initial version: 7|Class name: EnterKeyType
Method or attribute name: Go
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: EnterKeyType
Method or attribute name: Search
Initial version: 7|Class name: EnterKeyType
Method or attribute name: Search
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: EnterKeyType
Method or attribute name: Send
Initial version: 7|Class name: EnterKeyType
Method or attribute name: Send
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: EnterKeyType
Method or attribute name: Next
Initial version: 7|Class name: EnterKeyType
Method or attribute name: Next
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: EnterKeyType
Method or attribute name: Done
Initial version: 7|Class name: EnterKeyType
Method or attribute name: Done
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputController
Initial version: 8|Class name: TextInputController
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputController
Method or attribute name: constructor();
Initial version: 8|Class name: TextInputController
Method or attribute name: constructor();
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputController
Method or attribute name: caretPosition(value: number): void;
Initial version: 8|Class name: TextInputController
Method or attribute name: caretPosition(value: number): void;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputOptions
Initial version: 7|Class name: TextInputOptions
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputOptions
Method or attribute name: placeholder?: ResourceStr;
Initial version: 7|Class name: TextInputOptions
Method or attribute name: placeholder?: ResourceStr;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputOptions
Method or attribute name: text?: ResourceStr;
Initial version: 7|Class name: TextInputOptions
Method or attribute name: text?: ResourceStr;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputOptions
Method or attribute name: controller?: TextInputController;
Initial version: 8|Class name: TextInputOptions
Method or attribute name: controller?: TextInputController;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputStyle
Initial version: 9|Class name: TextInputStyle
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputStyle
Method or attribute name: Default
Initial version: 9|Class name: TextInputStyle
Method or attribute name: Default
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputStyle
Method or attribute name: Inline
Initial version: 9|Class name: TextInputStyle
Method or attribute name: Inline
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputInterface
Initial version: 7|Class name: TextInputInterface
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputInterface
Method or attribute name: (value?: TextInputOptions): TextInputAttribute;
Initial version: 7|Class name: TextInputInterface
Method or attribute name: (value?: TextInputOptions): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Initial version: 7|Class name: TextInputAttribute
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: type(value: InputType): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: type(value: InputType): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: placeholderColor(value: ResourceColor): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: placeholderColor(value: ResourceColor): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: placeholderFont(value?: Font): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: placeholderFont(value?: Font): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: enterKeyType(value: EnterKeyType): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: enterKeyType(value: EnterKeyType): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: caretColor(value: ResourceColor): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: caretColor(value: ResourceColor): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: onEditChange(callback: (isEditing: boolean) => void): TextInputAttribute;
Initial version: 8|Class name: TextInputAttribute
Method or attribute name: onEditChange(callback: (isEditing: boolean) => void): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: onSubmit(callback: (enterKey: EnterKeyType) => void): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: onSubmit(callback: (enterKey: EnterKeyType) => void): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: onChange(callback: (value: string) => void): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: onChange(callback: (value: string) => void): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: maxLength(value: number): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: maxLength(value: number): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: fontColor(value: ResourceColor): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: fontColor(value: ResourceColor): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: fontSize(value: Length): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: fontSize(value: Length): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: fontStyle(value: FontStyle): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: fontStyle(value: FontStyle): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextInputAttribute;
Initial version: 7|Class name: TextInputAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: inputFilter(value: ResourceStr, error?: (value: string) => void): TextInputAttribute;
Initial version: 8|Class name: TextInputAttribute
Method or attribute name: inputFilter(value: ResourceStr, error?: (value: string) => void): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: onCopy(callback: (value: string) => void): TextInputAttribute;
Initial version: 8|Class name: TextInputAttribute
Method or attribute name: onCopy(callback: (value: string) => void): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: onCut(callback: (value: string) => void): TextInputAttribute;
Initial version: 8|Class name: TextInputAttribute
Method or attribute name: onCut(callback: (value: string) => void): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: onPaste(callback: (value: string) => void): TextInputAttribute;
Initial version: 8|Class name: TextInputAttribute
Method or attribute name: onPaste(callback: (value: string) => void): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: copyOption(value: CopyOptions): TextInputAttribute;
Initial version: 9|Class name: TextInputAttribute
Method or attribute name: copyOption(value: CopyOptions): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: showPasswordIcon(value: boolean): TextInputAttribute;
Initial version: 9|Class name: TextInputAttribute
Method or attribute name: showPasswordIcon(value: boolean): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: textAlign(value: TextAlign): TextInputAttribute;
Initial version: 9|Class name: TextInputAttribute
Method or attribute name: textAlign(value: TextAlign): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextInputAttribute
Method or attribute name: style(value: TextInputStyle): TextInputAttribute;
Initial version: 9|Class name: TextInputAttribute
Method or attribute name: style(value: TextInputStyle): TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TextInput: TextInputInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const TextInput: TextInputInterface;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TextInputInstance: TextInputAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const TextInputInstance: TextInputAttribute;
Initial version: 10|text_input.d.ts| -|Initial version changed|Class name: TextPickerOptions
Initial version: 8|Class name: TextPickerOptions
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerOptions
Method or attribute name: value?: string;
Initial version: N/A|Class name: TextPickerOptions
Method or attribute name: value?: string;
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerOptions
Method or attribute name: selected?: number;
Initial version: N/A|Class name: TextPickerOptions
Method or attribute name: selected?: number;
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerInterface
Initial version: 8|Class name: TextPickerInterface
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerInterface
Method or attribute name: (options?: TextPickerOptions): TextPickerAttribute;
Initial version: 8|Class name: TextPickerInterface
Method or attribute name: (options?: TextPickerOptions): TextPickerAttribute;
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerAttribute
Initial version: 8|Class name: TextPickerAttribute
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerAttribute
Method or attribute name: defaultPickerItemHeight(value: number \| string): TextPickerAttribute;
Initial version: 8|Class name: TextPickerAttribute
Method or attribute name: defaultPickerItemHeight(value: number \| string): TextPickerAttribute;
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerAttribute
Method or attribute name: onChange(callback: (value: string, index: number) => void): TextPickerAttribute;
Initial version: 8|Class name: TextPickerAttribute
Method or attribute name: onChange(callback: (value: string, index: number) => void): TextPickerAttribute;
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerResult
Initial version: 8|Class name: TextPickerResult
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerResult
Method or attribute name: value: string;
Initial version: 8|Class name: TextPickerResult
Method or attribute name: value: string;
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerResult
Method or attribute name: index: number;
Initial version: 8|Class name: TextPickerResult
Method or attribute name: index: number;
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerDialogOptions
Initial version: 8|Class name: TextPickerDialogOptions
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerDialogOptions
Method or attribute name: defaultPickerItemHeight?: number \| string;
Initial version: 8|Class name: TextPickerDialogOptions
Method or attribute name: defaultPickerItemHeight?: number \| string;
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerDialogOptions
Method or attribute name: onAccept?: (value: TextPickerResult) => void;
Initial version: 8|Class name: TextPickerDialogOptions
Method or attribute name: onAccept?: (value: TextPickerResult) => void;
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerDialogOptions
Method or attribute name: onCancel?: () => void;
Initial version: 8|Class name: TextPickerDialogOptions
Method or attribute name: onCancel?: () => void;
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerDialogOptions
Method or attribute name: onChange?: (value: TextPickerResult) => void;
Initial version: 8|Class name: TextPickerDialogOptions
Method or attribute name: onChange?: (value: TextPickerResult) => void;
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerDialog
Initial version: 8|Class name: TextPickerDialog
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextPickerDialog
Method or attribute name: static show(options?: TextPickerDialogOptions);
Initial version: 8|Class name: TextPickerDialog
Method or attribute name: static show(options?: TextPickerDialogOptions);
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TextPicker: TextPickerInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const TextPicker: TextPickerInterface;
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TextPickerInstance: TextPickerAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const TextPickerInstance: TextPickerAttribute;
Initial version: 10|text_picker.d.ts| -|Initial version changed|Class name: TextTimerController
Initial version: 8|Class name: TextTimerController
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerController
Method or attribute name: constructor();
Initial version: 8|Class name: TextTimerController
Method or attribute name: constructor();
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerController
Method or attribute name: start();
Initial version: 8|Class name: TextTimerController
Method or attribute name: start();
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerController
Method or attribute name: pause();
Initial version: 8|Class name: TextTimerController
Method or attribute name: pause();
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerController
Method or attribute name: reset();
Initial version: 8|Class name: TextTimerController
Method or attribute name: reset();
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerOptions
Initial version: 8|Class name: TextTimerOptions
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerOptions
Method or attribute name: isCountDown?: boolean;
Initial version: 8|Class name: TextTimerOptions
Method or attribute name: isCountDown?: boolean;
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerOptions
Method or attribute name: count?: number;
Initial version: 8|Class name: TextTimerOptions
Method or attribute name: count?: number;
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerOptions
Method or attribute name: controller?: TextTimerController;
Initial version: 8|Class name: TextTimerOptions
Method or attribute name: controller?: TextTimerController;
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerInterface
Initial version: 8|Class name: TextTimerInterface
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerInterface
Method or attribute name: (options?: TextTimerOptions): TextTimerAttribute;
Initial version: 8|Class name: TextTimerInterface
Method or attribute name: (options?: TextTimerOptions): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerAttribute
Initial version: 8|Class name: TextTimerAttribute
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerAttribute
Method or attribute name: format(value: string): TextTimerAttribute;
Initial version: 8|Class name: TextTimerAttribute
Method or attribute name: format(value: string): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerAttribute
Method or attribute name: fontColor(value: ResourceColor): TextTimerAttribute;
Initial version: 8|Class name: TextTimerAttribute
Method or attribute name: fontColor(value: ResourceColor): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerAttribute
Method or attribute name: fontSize(value: Length): TextTimerAttribute;
Initial version: 8|Class name: TextTimerAttribute
Method or attribute name: fontSize(value: Length): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerAttribute
Method or attribute name: fontStyle(value: FontStyle): TextTimerAttribute;
Initial version: 8|Class name: TextTimerAttribute
Method or attribute name: fontStyle(value: FontStyle): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextTimerAttribute;
Initial version: 8|Class name: TextTimerAttribute
Method or attribute name: fontWeight(value: number \| FontWeight \| string): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextTimerAttribute;
Initial version: 8|Class name: TextTimerAttribute
Method or attribute name: fontFamily(value: ResourceStr): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TextTimerAttribute
Method or attribute name: onTimer(event: (utc: number, elapsedTime: number) => void): TextTimerAttribute;
Initial version: 8|Class name: TextTimerAttribute
Method or attribute name: onTimer(event: (utc: number, elapsedTime: number) => void): TextTimerAttribute;
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TextTimer: TextTimerInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const TextTimer: TextTimerInterface;
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TextTimerInstance: TextTimerAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const TextTimerInstance: TextTimerAttribute;
Initial version: 10|text_timer.d.ts| -|Initial version changed|Class name: TimePickerResult
Initial version: 8|Class name: TimePickerResult
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerResult
Method or attribute name: hour?: number;
Initial version: 8|Class name: TimePickerResult
Method or attribute name: hour?: number;
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerResult
Method or attribute name: minute?: number;
Initial version: 8|Class name: TimePickerResult
Method or attribute name: minute?: number;
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerOptions
Initial version: 8|Class name: TimePickerOptions
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerOptions
Method or attribute name: selected?: Date;
Initial version: N/A|Class name: TimePickerOptions
Method or attribute name: selected?: Date;
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerInterface
Initial version: 8|Class name: TimePickerInterface
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerInterface
Method or attribute name: (options?: TimePickerOptions): TimePickerAttribute;
Initial version: 8|Class name: TimePickerInterface
Method or attribute name: (options?: TimePickerOptions): TimePickerAttribute;
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerAttribute
Initial version: 8|Class name: TimePickerAttribute
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerAttribute
Method or attribute name: useMilitaryTime(value: boolean): TimePickerAttribute;
Initial version: 8|Class name: TimePickerAttribute
Method or attribute name: useMilitaryTime(value: boolean): TimePickerAttribute;
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerAttribute
Method or attribute name: onChange(callback: (value: TimePickerResult) => void): TimePickerAttribute;
Initial version: 8|Class name: TimePickerAttribute
Method or attribute name: onChange(callback: (value: TimePickerResult) => void): TimePickerAttribute;
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerDialogOptions
Initial version: 8|Class name: TimePickerDialogOptions
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerDialogOptions
Method or attribute name: useMilitaryTime?: boolean;
Initial version: 8|Class name: TimePickerDialogOptions
Method or attribute name: useMilitaryTime?: boolean;
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerDialogOptions
Method or attribute name: onAccept?: (value: TimePickerResult) => void;
Initial version: 8|Class name: TimePickerDialogOptions
Method or attribute name: onAccept?: (value: TimePickerResult) => void;
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerDialogOptions
Method or attribute name: onCancel?: () => void;
Initial version: 8|Class name: TimePickerDialogOptions
Method or attribute name: onCancel?: () => void;
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerDialogOptions
Method or attribute name: onChange?: (value: TimePickerResult) => void;
Initial version: 8|Class name: TimePickerDialogOptions
Method or attribute name: onChange?: (value: TimePickerResult) => void;
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerDialog
Initial version: 8|Class name: TimePickerDialog
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: TimePickerDialog
Method or attribute name: static show(options?: TimePickerDialogOptions);
Initial version: 8|Class name: TimePickerDialog
Method or attribute name: static show(options?: TimePickerDialogOptions);
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TimePicker: TimePickerInterface;
Initial version: 8|Class name: global
Method or attribute name: declare const TimePicker: TimePickerInterface;
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const TimePickerInstance: TimePickerAttribute;
Initial version: 8|Class name: global
Method or attribute name: declare const TimePickerInstance: TimePickerAttribute;
Initial version: 10|time_picker.d.ts| -|Initial version changed|Class name: Resource
Method or attribute name: readonly bundleName: string;
Initial version: 9|Class name: Resource
Method or attribute name: readonly bundleName: string;
Initial version: 10|units.d.ts| -|Initial version changed|Class name: Resource
Method or attribute name: readonly moduleName: string;
Initial version: 9|Class name: Resource
Method or attribute name: readonly moduleName: string;
Initial version: 10|units.d.ts| -|Initial version changed|Class name: Font
Initial version: 7|Class name: Font
Initial version: 10|units.d.ts| -|Initial version changed|Class name: Font
Method or attribute name: size?: Length;
Initial version: N/A|Class name: Font
Method or attribute name: size?: Length;
Initial version: 10|units.d.ts| -|Initial version changed|Class name: Font
Method or attribute name: weight?: FontWeight \| number \| string;
Initial version: N/A|Class name: Font
Method or attribute name: weight?: FontWeight \| number \| string;
Initial version: 10|units.d.ts| -|Initial version changed|Class name: Font
Method or attribute name: family?: string \| Resource;
Initial version: N/A|Class name: Font
Method or attribute name: family?: string \| Resource;
Initial version: 10|units.d.ts| -|Initial version changed|Class name: Font
Method or attribute name: style?: FontStyle;
Initial version: N/A|Class name: Font
Method or attribute name: style?: FontStyle;
Initial version: 10|units.d.ts| -|Initial version changed|Class name: ColorFilter
Initial version: 9|Class name: ColorFilter
Initial version: 10|units.d.ts| -|Initial version changed|Class name: ColorFilter
Method or attribute name: constructor(value: number[]);
Initial version: 9|Class name: ColorFilter
Method or attribute name: constructor(value: number[]);
Initial version: 10|units.d.ts| -|Initial version changed|Class name: SeekMode
Initial version: 8|Class name: SeekMode
Initial version: 10|video.d.ts| -|Initial version changed|Class name: SeekMode
Method or attribute name: PreviousKeyframe
Initial version: 8|Class name: SeekMode
Method or attribute name: PreviousKeyframe
Initial version: 10|video.d.ts| -|Initial version changed|Class name: SeekMode
Method or attribute name: NextKeyframe
Initial version: 8|Class name: SeekMode
Method or attribute name: NextKeyframe
Initial version: 10|video.d.ts| -|Initial version changed|Class name: SeekMode
Method or attribute name: ClosestKeyframe
Initial version: 8|Class name: SeekMode
Method or attribute name: ClosestKeyframe
Initial version: 10|video.d.ts| -|Initial version changed|Class name: SeekMode
Method or attribute name: Accurate
Initial version: 8|Class name: SeekMode
Method or attribute name: Accurate
Initial version: 10|video.d.ts| -|Initial version changed|Class name: PlaybackSpeed
Initial version: 8|Class name: PlaybackSpeed
Initial version: 10|video.d.ts| -|Initial version changed|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_0_75_X
Initial version: 8|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_0_75_X
Initial version: 10|video.d.ts| -|Initial version changed|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_1_00_X
Initial version: 8|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_1_00_X
Initial version: 10|video.d.ts| -|Initial version changed|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_1_25_X
Initial version: 8|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_1_25_X
Initial version: 10|video.d.ts| -|Initial version changed|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_1_75_X
Initial version: 8|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_1_75_X
Initial version: 10|video.d.ts| -|Initial version changed|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_2_00_X
Initial version: 8|Class name: PlaybackSpeed
Method or attribute name: Speed_Forward_2_00_X
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoOptions
Initial version: 7|Class name: VideoOptions
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoOptions
Method or attribute name: src?: string \| Resource;
Initial version: 7|Class name: VideoOptions
Method or attribute name: src?: string \| Resource;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoOptions
Method or attribute name: currentProgressRate?: number \| string \| PlaybackSpeed;
Initial version: 7|Class name: VideoOptions
Method or attribute name: currentProgressRate?: number \| string \| PlaybackSpeed;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoOptions
Method or attribute name: previewUri?: string \| PixelMap \| Resource;
Initial version: 7|Class name: VideoOptions
Method or attribute name: previewUri?: string \| PixelMap \| Resource;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoOptions
Method or attribute name: controller?: VideoController;
Initial version: 7|Class name: VideoOptions
Method or attribute name: controller?: VideoController;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoController
Initial version: 7|Class name: VideoController
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoController
Method or attribute name: constructor();
Initial version: 7|Class name: VideoController
Method or attribute name: constructor();
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoController
Method or attribute name: start();
Initial version: 7|Class name: VideoController
Method or attribute name: start();
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoController
Method or attribute name: pause();
Initial version: 7|Class name: VideoController
Method or attribute name: pause();
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoController
Method or attribute name: stop();
Initial version: 7|Class name: VideoController
Method or attribute name: stop();
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoController
Method or attribute name: setCurrentTime(value: number);
Initial version: 7|Class name: VideoController
Method or attribute name: setCurrentTime(value: number);
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoController
Method or attribute name: requestFullscreen(value: boolean);
Initial version: 7|Class name: VideoController
Method or attribute name: requestFullscreen(value: boolean);
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoController
Method or attribute name: exitFullscreen();
Initial version: 7|Class name: VideoController
Method or attribute name: exitFullscreen();
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoController
Method or attribute name: setCurrentTime(value: number, seekMode: SeekMode);
Initial version: 8|Class name: VideoController
Method or attribute name: setCurrentTime(value: number, seekMode: SeekMode);
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoInterface
Initial version: 7|Class name: VideoInterface
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoInterface
Method or attribute name: (value: VideoOptions): VideoAttribute;
Initial version: 7|Class name: VideoInterface
Method or attribute name: (value: VideoOptions): VideoAttribute;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoAttribute
Initial version: 7|Class name: VideoAttribute
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoAttribute
Method or attribute name: muted(value: boolean): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: muted(value: boolean): VideoAttribute;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoAttribute
Method or attribute name: autoPlay(value: boolean): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: autoPlay(value: boolean): VideoAttribute;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoAttribute
Method or attribute name: controls(value: boolean): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: controls(value: boolean): VideoAttribute;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoAttribute
Method or attribute name: loop(value: boolean): VideoAttribute;
Initial version: 6|Class name: VideoAttribute
Method or attribute name: loop(value: boolean): VideoAttribute;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoAttribute
Method or attribute name: objectFit(value: ImageFit): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: objectFit(value: ImageFit): VideoAttribute;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoAttribute
Method or attribute name: onStart(event: () => void): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: onStart(event: () => void): VideoAttribute;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoAttribute
Method or attribute name: onPause(event: () => void): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: onPause(event: () => void): VideoAttribute;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoAttribute
Method or attribute name: onFinish(event: () => void): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: onFinish(event: () => void): VideoAttribute;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: VideoAttribute
Method or attribute name: onError(event: () => void): VideoAttribute;
Initial version: 7|Class name: VideoAttribute
Method or attribute name: onError(event: () => void): VideoAttribute;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const Video: VideoInterface;
Initial version: 7|Class name: global
Method or attribute name: declare const Video: VideoInterface;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const VideoInstance: VideoAttribute;
Initial version: 7|Class name: global
Method or attribute name: declare const VideoInstance: VideoAttribute;
Initial version: 10|video.d.ts| -|Initial version changed|Class name: WaterFlowOptions
Initial version: 9|Class name: WaterFlowOptions
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: WaterFlowOptions
Method or attribute name: footer?: CustomBuilder;
Initial version: 9|Class name: WaterFlowOptions
Method or attribute name: footer?: CustomBuilder;
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: WaterFlowOptions
Method or attribute name: scroller?: Scroller;
Initial version: 9|Class name: WaterFlowOptions
Method or attribute name: scroller?: Scroller;
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: WaterFlowInterface
Initial version: 9|Class name: WaterFlowInterface
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: WaterFlowInterface
Method or attribute name: (options?: WaterFlowOptions): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowInterface
Method or attribute name: (options?: WaterFlowOptions): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: WaterFlowAttribute
Initial version: 9|Class name: WaterFlowAttribute
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: columnsTemplate(value: string): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: columnsTemplate(value: string): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: itemConstraintSize(value: ConstraintSizeOptions): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: itemConstraintSize(value: ConstraintSizeOptions): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: rowsTemplate(value: string): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: rowsTemplate(value: string): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: columnsGap(value: Length): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: columnsGap(value: Length): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: rowsGap(value: Length): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: rowsGap(value: Length): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: layoutDirection(value: FlexDirection): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: layoutDirection(value: FlexDirection): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: onReachStart(event: () => void): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: onReachStart(event: () => void): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: WaterFlowAttribute
Method or attribute name: onReachEnd(event: () => void): WaterFlowAttribute;
Initial version: 9|Class name: WaterFlowAttribute
Method or attribute name: onReachEnd(event: () => void): WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const WaterFlow: WaterFlowInterface;
Initial version: 9|Class name: global
Method or attribute name: declare const WaterFlow: WaterFlowInterface;
Initial version: 10|water_flow.d.ts| -|Initial version changed|Class name: global
Method or attribute name: declare const WaterFlowInstance: WaterFlowAttribute;
Initial version: 9|Class name: global
Method or attribute name: declare const WaterFlowInstance: WaterFlowAttribute;
Initial version: 10|water_flow.d.ts| -|Function changed|Class name: ActionSheet
Method or attribute name: static show(value: {

/**

* Title Properties

* @since 8

*/

title: string \| Resource;



/**

* message Properties

* @since 8

*/

message: string \| Resource;



/**

* Invoke the commit function.

* @since 8

*/

confirm?: {

/**

* Text content of the confirmation button.

* @since 8

*/

value: string \| Resource;



/**

* Method executed by the callback.

* @since 8

*/

action: () => void;

};



/**

* Execute Cancel Function.

* @since 8

*/

cancel?: () => void;



/**

* The Array of sheets

* @since 8

*/

sheets: Array\;



/**

* Allows users to click the mask layer to exit.

* @since 8

*/

autoCancel?: boolean;



/**

* Alignment in the vertical direction.

* @since 8

*/

alignment?: DialogAlignment;



/**

* Offset of the pop-up window relative to the alignment position.

* @since 8

*/

offset?: { dx: number \| string \| Resource; dy: number \| string \| Resource };

});
|Class name: ActionSheet
Method or attribute name: static show(value: {
/**
* Title Properties
* @since 8
*/
/**
* Title Properties
* @crossplatform
* @since 10
*/
title: string \| Resource;

/**
* message Properties
* @since 8
*/
/**
* message Properties
* @crossplatform
* @since 10
*/
message: string \| Resource;

/**
* Invoke the commit function.
* @since 8
*/
/**
* Invoke the commit function.
* @crossplatform
* @since 10
*/
confirm?: {
/**
* Text content of the confirmation button.
* @since 8
*/
/**
* Text content of the confirmation button.
* @crossplatform
* @since 10
*/
value: string \| Resource;

/**
* Method executed by the callback.
* @since 8
*/
/**
* Method executed by the callback.
* @crossplatform
* @since 10
*/
action: () => void;
};

/**
* Execute Cancel Function.
* @since 8
*/
/**
* Execute Cancel Function.
* @crossplatform
* @since 10
*/
cancel?: () => void;

/**
* The Array of sheets
* @since 8
*/
/**
* The Array of sheets
* @crossplatform
* @since 10
*/
sheets: Array\;

/**
* Allows users to click the mask layer to exit.
* @since 8
*/
/**
* Allows users to click the mask layer to exit.
* @crossplatform
* @since 10
*/
autoCancel?: boolean;

/**
* Alignment in the vertical direction.
* @since 8
*/
/**
* Alignment in the vertical direction.
* @crossplatform
* @since 10
*/
alignment?: DialogAlignment;

/**
* Offset of the pop-up window relative to the alignment position.
* @since 8
*/
/**
* Offset of the pop-up window relative to the alignment position.
* @crossplatform
* @since 10
*/
offset?: { dx: number \| string \| Resource; dy: number \| string \| Resource };
});
|action_sheet.d.ts| +|Deprecated version changed|Class name: WebAttribute
Method or attribute name: onUrlLoadIntercept(callback: (event?: { data: string \| WebResourceRequest }) => boolean): WebAttribute;
Deprecated version: N/A|Class name: WebAttribute
Method or attribute name: onUrlLoadIntercept(callback: (event?: { data: string \| WebResourceRequest }) => boolean): WebAttribute;
Deprecated version: 10
Substitute API: ohos.web.WebAttribute#onLoadIntercept|web.d.ts| |Function changed|Class name: AlphabetIndexerAttribute
Method or attribute name: alignStyle(value: IndexerAlign): AlphabetIndexerAttribute;
|Class name: AlphabetIndexerAttribute
Method or attribute name: alignStyle(value: IndexerAlign, offset?: Length): AlphabetIndexerAttribute;
|alphabet_indexer.d.ts| -|Function changed|Class name: PopupOptions
Method or attribute name: onStateChange?: (event: { isVisible: boolean }) => void;
|Class name: PopupOptions
Method or attribute name: onStateChange?: (event: {
/**
* is Visible.
* @crossplatform
* @since 10
*/
isVisible: boolean
}) => void;
|common.d.ts| -|Function changed|Class name: CustomPopupOptions
Method or attribute name: onStateChange?: (event: { isVisible: boolean }) => void;
|Class name: CustomPopupOptions
Method or attribute name: onStateChange?: (event: {
/**
* is Visible.
* @crossplatform
* @since 10
*/
isVisible: boolean
}) => void;
|common.d.ts| |Function changed|Class name: CommonMethod
Method or attribute name: backgroundBlurStyle(value: BlurStyle): T;
|Class name: CommonMethod
Method or attribute name: backgroundBlurStyle(value: BlurStyle, options?: BackgroundBlurStyleOptions): T;
|common.d.ts| |Function changed|Class name: CommonMethod
Method or attribute name: borderStyle(value: BorderStyle): T;
|Class name: CommonMethod
Method or attribute name: borderStyle(value: BorderStyle \| EdgeStyles): T;
|common.d.ts| -|Function changed|Class name: CommonMethod
Method or attribute name: borderStyle(value: EdgeStyles): T;
|Class name: CommonMethod
Method or attribute name: borderStyle(value: BorderStyle \| EdgeStyles): T;
|common.d.ts| -|Function changed|Class name: CommonMethod
Method or attribute name: borderWidth(value: Length): T;
|Class name: CommonMethod
Method or attribute name: borderWidth(value: Length \| EdgeWidths): T;
|common.d.ts| |Function changed|Class name: CommonMethod
Method or attribute name: borderWidth(value: EdgeWidths): T;
|Class name: CommonMethod
Method or attribute name: borderWidth(value: Length \| EdgeWidths): T;
|common.d.ts| |Function changed|Class name: CommonMethod
Method or attribute name: borderColor(value: ResourceColor): T;
|Class name: CommonMethod
Method or attribute name: borderColor(value: ResourceColor \| EdgeColors): T;
|common.d.ts| -|Function changed|Class name: CommonMethod
Method or attribute name: borderColor(value: EdgeColors): T;
|Class name: CommonMethod
Method or attribute name: borderColor(value: ResourceColor \| EdgeColors): T;
|common.d.ts| -|Function changed|Class name: CommonMethod
Method or attribute name: borderRadius(value: Length): T;
|Class name: CommonMethod
Method or attribute name: borderRadius(value: Length \| BorderRadiuses): T;
|common.d.ts| |Function changed|Class name: CommonMethod
Method or attribute name: borderRadius(value: BorderRadiuses): T;
|Class name: CommonMethod
Method or attribute name: borderRadius(value: Length \| BorderRadiuses): T;
|common.d.ts| |Function changed|Class name: CommonMethod
Method or attribute name: transition(value: TransitionOptions): T;
|Class name: CommonMethod
Method or attribute name: transition(value: TransitionOptions \| TransitionEffect): T;
|common.d.ts| |Function changed|Class name: CommonMethod
Method or attribute name: shadow(value: {
radius: number \| Resource;
color?: Color \| string \| Resource;
offsetX?: number \| Resource;
offsetY?: number \| Resource;
}): T;
|Class name: CommonMethod
Method or attribute name: shadow(value: ShadowOptions \| ShadowStyle): T;
|common.d.ts| @@ -2043,16 +601,7 @@ |Function changed|Class name: MenuItemAttribute
Method or attribute name: selectIcon(value: boolean): MenuItemAttribute;
|Class name: MenuItemAttribute
Method or attribute name: selectIcon(value: boolean \| ResourceStr): MenuItemAttribute;
|menu_item.d.ts| |Function changed|Class name: NavigationAttribute
Method or attribute name: title(value: string \| CustomBuilder \| NavigationCommonTitle \| NavigationCustomTitle): NavigationAttribute;
|Class name: NavigationAttribute
Method or attribute name: title(value: ResourceStr \| CustomBuilder \| NavigationCommonTitle \| NavigationCustomTitle): NavigationAttribute;
|navigation.d.ts| |Function changed|Class name: RefreshInterface
Method or attribute name: (value: { refreshing: boolean; offset?: number \| string; friction?: number \| string }): RefreshAttribute;
|Class name: RefreshInterface
Method or attribute name: (value: RefreshOptions): RefreshAttribute;
|refresh.d.ts| -|Function changed|Class name: Scroller
Method or attribute name: scrollTo(value: {
xOffset: number \| string;
yOffset: number \| string;
animation?: { duration: number; curve: Curve };
});
|Class name: Scroller
Method or attribute name: scrollTo(value: {
/**
* The X-axis offset.
* @crossplatform
* @since 10
*/
xOffset: number \| string;

/**
* The Y-axis offset.
* @crossplatform
* @since 10
*/
yOffset: number \| string;

/**
* Descriptive animation.
* @crossplatform
* @since 10
*/
animation?: { duration: number; curve: Curve };
});
|scroll.d.ts| |Function changed|Class name: Scroller
Method or attribute name: scrollToIndex(value: number);
|Class name: Scroller
Method or attribute name: scrollToIndex(value: number, smooth?:boolean);
|scroll.d.ts| -|Function changed|Class name: SearchInterface
Method or attribute name: (options?: { value?: string;
placeholder?: string;
icon?: string;
controller?: SearchController
}): SearchAttribute;
|Class name: SearchInterface
Method or attribute name: (options?: {
/**
* Text input in the search text box
* @type { string }
* @since 8
*/
value?: string;

/**
* Text displayed when there is no input
* @type { string }
* @since 8
*/
/**
* Text displayed when there is no input
* @type { ResourceStr }
* @since 10
*/
placeholder?: ResourceStr;

/**
* Path to the search icon
* @type { string }
* @since 8
*/
icon?: string;

/**
* Controller of the \ component
* @type { SearchController }
* @since 8
*/
controller?: SearchController
}): SearchAttribute;
|search.d.ts| |Function changed|Class name: SearchAttribute
Method or attribute name: searchButton(value: string): SearchAttribute;
|Class name: SearchAttribute
Method or attribute name: searchButton(value: string, option?: SearchButtonOption): SearchAttribute;
|search.d.ts| |Function changed|Class name: SwiperAttribute
Method or attribute name: indicator(value: boolean): SwiperAttribute;
|Class name: SwiperAttribute
Method or attribute name: indicator(value: DotIndicator \| DigitIndicator \| boolean): SwiperAttribute;
|swiper.d.ts| |Function changed|Class name: SwiperAttribute
Method or attribute name: curve(value: Curve \| string): SwiperAttribute;
|Class name: SwiperAttribute
Method or attribute name: curve(value: Curve \| string \| ICurve): SwiperAttribute;
|swiper.d.ts| -|Function changed|Class name: SubTabBarStyle
Method or attribute name: constructor(content: string \| Resource);
|Class name: SubTabBarStyle
Method or attribute name: constructor(content: ResourceStr);
|tab_content.d.ts| -|Function changed|Class name: BottomTabBarStyle
Method or attribute name: constructor(icon: string \| Resource, text: string \| Resource);
|Class name: BottomTabBarStyle
Method or attribute name: constructor(icon: ResourceStr, text: ResourceStr);
|tab_content.d.ts| -|Function changed|Class name: VideoAttribute
Method or attribute name: onFullscreenChange(callback: (event?: { fullscreen: boolean }) => void): VideoAttribute;
|Class name: VideoAttribute
Method or attribute name: onFullscreenChange(callback: (event?: {
/**
* Play the flag in full screen.
* @crossplatform
* @since 10
*/
fullscreen: boolean
}) => void): VideoAttribute;
|video.d.ts| -|Function changed|Class name: VideoAttribute
Method or attribute name: onPrepared(callback: (event?: { duration: number }) => void): VideoAttribute;
|Class name: VideoAttribute
Method or attribute name: onPrepared(callback: (event?: {
/**
* Playback duration.
* @crossplatform
* @since 10
*/
duration: number
}) => void): VideoAttribute;
|video.d.ts| -|Function changed|Class name: VideoAttribute
Method or attribute name: onSeeking(callback: (event?: { time: number }) => void): VideoAttribute;
|Class name: VideoAttribute
Method or attribute name: onSeeking(callback: (event?: {
/**
* Play time.
* @crossplatform
* @since 10
*/
time: number
}) => void): VideoAttribute;
|video.d.ts| -|Function changed|Class name: VideoAttribute
Method or attribute name: onSeeked(callback: (event?: { time: number }) => void): VideoAttribute;
|Class name: VideoAttribute
Method or attribute name: onSeeked(callback: (event?: {
/**
* Play time.
* @crossplatform
* @since 10
*/
time: number
}) => void): VideoAttribute;
|video.d.ts| -|Function changed|Class name: VideoAttribute
Method or attribute name: onUpdate(callback: (event?: { time: number }) => void): VideoAttribute;
|Class name: VideoAttribute
Method or attribute name: onUpdate(callback: (event?: {
/**
* Play time.
* @crossplatform
* @since 10
*/
time: number
}) => void): VideoAttribute;
|video.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-compiler-and-runtime.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-compiler-and-runtime.md index 031938e0a7081cdc0c1b4dc2876412750e128467..6e85fb8dd0c391c520a0d8935d2d88c66b5be728 100644 --- a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-compiler-and-runtime.md +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-compiler-and-runtime.md @@ -1,42 +1,15 @@ | Change Type | Old Version | New Version | d.ts File | | ---- | ------ | ------ | -------- | |Added|NA|Module name: global
Class name: console
Method or attribute name: static assert(value?: Object, ...arguments: Object[]): void;|global.d.ts| -|Added|NA|Class name: console
Method or attribute name: static assert(value?: Object, ...arguments: Object[]): void;|global.d.ts| |Added|NA|Module name: global
Class name: console
Method or attribute name: static count(label?: string): void;|global.d.ts| -|Added|NA|Class name: console
Method or attribute name: static count(label?: string): void;|global.d.ts| |Added|NA|Module name: global
Class name: console
Method or attribute name: static countReset(label?: string): void;|global.d.ts| -|Added|NA|Class name: console
Method or attribute name: static countReset(label?: string): void;|global.d.ts| |Added|NA|Module name: global
Class name: console
Method or attribute name: static dir(dir?: Object): void;|global.d.ts| -|Added|NA|Class name: console
Method or attribute name: static dir(dir?: Object): void;|global.d.ts| |Added|NA|Module name: global
Class name: console
Method or attribute name: static dirxml(...arguments: Object[]): void;|global.d.ts| -|Added|NA|Class name: console
Method or attribute name: static dirxml(...arguments: Object[]): void;|global.d.ts| |Added|NA|Module name: global
Class name: console
Method or attribute name: static group(...arguments: Object[]): void;|global.d.ts| -|Added|NA|Class name: console
Method or attribute name: static group(...arguments: Object[]): void;|global.d.ts| |Added|NA|Module name: global
Class name: console
Method or attribute name: static groupCollapsed(...arguments: Object[]): void;|global.d.ts| -|Added|NA|Class name: console
Method or attribute name: static groupCollapsed(...arguments: Object[]): void;|global.d.ts| |Added|NA|Module name: global
Class name: console
Method or attribute name: static groupEnd(): void;|global.d.ts| -|Added|NA|Class name: console
Method or attribute name: static groupEnd(): void;|global.d.ts| |Added|NA|Module name: global
Class name: console
Method or attribute name: static table(tableData?: Object): void;|global.d.ts| -|Added|NA|Class name: console
Method or attribute name: static table(tableData?: Object): void;|global.d.ts| |Added|NA|Module name: global
Class name: console
Method or attribute name: static time(label?: string): void;|global.d.ts| -|Added|NA|Class name: console
Method or attribute name: static time(label?: string): void;|global.d.ts| |Added|NA|Module name: global
Class name: console
Method or attribute name: static timeEnd(label?: string): void;|global.d.ts| -|Added|NA|Class name: console
Method or attribute name: static timeEnd(label?: string): void;|global.d.ts| |Added|NA|Module name: global
Class name: console
Method or attribute name: static timeLog(label?: string, ...arguments: Object[]): void;|global.d.ts| -|Added|NA|Class name: console
Method or attribute name: static timeLog(label?: string, ...arguments: Object[]): void;|global.d.ts| |Added|NA|Module name: global
Class name: console
Method or attribute name: static trace(...arguments: Object[]): void;|global.d.ts| -|Added|NA|Class name: console
Method or attribute name: static trace(...arguments: Object[]): void;|global.d.ts| -|Initial version changed|Class name: LRUCache
Method or attribute name: keys(): K[];
Initial version: N/A|Class name: LRUCache
Method or attribute name: keys(): K[];
Initial version: 9|@ohos.util.d.ts| -|Initial version changed|Class name: WorkerEventListener
Method or attribute name: (event: Event): void \| Promise\;
Initial version: 9|Class name: WorkerEventListener
Method or attribute name: (event: Event): void \| Promise\;
Initial version: 10|@ohos.worker.d.ts| -|Initial version changed|Class name: WorkerEventTarget
Method or attribute name: addEventListener(type: string, listener: WorkerEventListener): void;
Initial version: 9|Class name: WorkerEventTarget
Method or attribute name: addEventListener(type: string, listener: WorkerEventListener): void;
Initial version: 10|@ohos.worker.d.ts| -|Initial version changed|Class name: ThreadWorkerGlobalScope
Method or attribute name: onmessage?: (this: ThreadWorkerGlobalScope, ev: MessageEvents) => void;
Initial version: 9|Class name: ThreadWorkerGlobalScope
Method or attribute name: onmessage?: (this: ThreadWorkerGlobalScope, ev: MessageEvents) => void;
Initial version: 10|@ohos.worker.d.ts| -|Initial version changed|Class name: ThreadWorkerGlobalScope
Method or attribute name: onmessageerror?: (this: ThreadWorkerGlobalScope, ev: MessageEvents) => void;
Initial version: 9|Class name: ThreadWorkerGlobalScope
Method or attribute name: onmessageerror?: (this: ThreadWorkerGlobalScope, ev: MessageEvents) => void;
Initial version: 10|@ohos.worker.d.ts| -|Initial version changed|Class name: ThreadWorker
Method or attribute name: onexit?: (code: number) => void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: onexit?: (code: number) => void;
Initial version: 10|@ohos.worker.d.ts| -|Initial version changed|Class name: ThreadWorker
Method or attribute name: onerror?: (err: ErrorEvent) => void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: onerror?: (err: ErrorEvent) => void;
Initial version: 10|@ohos.worker.d.ts| -|Initial version changed|Class name: ThreadWorker
Method or attribute name: onmessage?: (event: MessageEvents) => void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: onmessage?: (event: MessageEvents) => void;
Initial version: 10|@ohos.worker.d.ts| -|Initial version changed|Class name: ThreadWorker
Method or attribute name: onmessageerror?: (event: MessageEvents) => void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: onmessageerror?: (event: MessageEvents) => void;
Initial version: 10|@ohos.worker.d.ts| -|Initial version changed|Class name: ThreadWorker
Method or attribute name: on(type: string, listener: WorkerEventListener): void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: on(type: string, listener: WorkerEventListener): void;
Initial version: 10|@ohos.worker.d.ts| -|Initial version changed|Class name: ThreadWorker
Method or attribute name: once(type: string, listener: WorkerEventListener): void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: once(type: string, listener: WorkerEventListener): void;
Initial version: 10|@ohos.worker.d.ts| -|Initial version changed|Class name: ThreadWorker
Method or attribute name: off(type: string, listener?: WorkerEventListener): void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: off(type: string, listener?: WorkerEventListener): void;
Initial version: 10|@ohos.worker.d.ts| -|Initial version changed|Class name: ThreadWorker
Method or attribute name: addEventListener(type: string, listener: WorkerEventListener): void;
Initial version: 9|Class name: ThreadWorker
Method or attribute name: addEventListener(type: string, listener: WorkerEventListener): void;
Initial version: 10|@ohos.worker.d.ts| -|Function changed|Class name: RationalNumber
Method or attribute name: static createRationalFromString(rationalString: string): RationalNumber​;
|Class name: RationalNumber
Method or attribute name: static createRationalFromString(rationalString: string): RationalNumber;
|@ohos.util.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md index 0c262dfd4cf8d9fca897f7f0b3e0625e63d82f57..98ae468deb8c61e57aa23ff774539239839857ed 100644 --- a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-distributed-data.md @@ -128,166 +128,13 @@ |Added|NA|Module name: ohos.data.UDMF
Class name: ApplicationDefinedRecord
Method or attribute name: applicationDefinedType: string;|@ohos.data.UDMF.d.ts| |Added|NA|Module name: ohos.data.UDMF
Class name: ApplicationDefinedRecord
Method or attribute name: rawData: Uint8Array;|@ohos.data.UDMF.d.ts| |Deleted|Module name: ohos.data.relationalStore
Class name: relationalStore
Method or attribute name: type ValuesBucket = { [key:string]: ValueType \| Uint8Array \| null;}|NA|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: put(key: string, value: Uint8Array \| string \| number \| boolean, callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: put(key: string, value: Uint8Array \| string \| number \| boolean, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: put(key: string, value: Uint8Array \| string \| number \| boolean): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: put(key: string, value: Uint8Array \| string \| number \| boolean): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: putBatch(entries: Entry[], callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: putBatch(entries: Entry[], callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: putBatch(entries: Entry[]): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: putBatch(entries: Entry[]): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: putBatch(value: Array\, callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: putBatch(value: Array\, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: putBatch(value: Array\): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: putBatch(value: Array\): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: delete(key: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: delete(key: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: delete(key: string): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: delete(key: string): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: delete(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\);
Initial version: 9|Class name: SingleKVStore
Method or attribute name: delete(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\);
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: delete(predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: delete(predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: deleteBatch(keys: string[], callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: deleteBatch(keys: string[], callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: deleteBatch(keys: string[]): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: deleteBatch(keys: string[]): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: getResultSet(keyPrefix: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: getResultSet(keyPrefix: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: getResultSet(keyPrefix: string): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: getResultSet(keyPrefix: string): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: getResultSet(query: Query, callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: getResultSet(query: Query, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: getResultSet(query: Query): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: getResultSet(query: Query): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: startTransaction(callback: AsyncCallback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: startTransaction(callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: startTransaction(): Promise\;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: startTransaction(): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: SingleKVStore
Method or attribute name: on(event: 'dataChange', type: SubscribeType, listener: Callback\): void;
Initial version: 9|Class name: SingleKVStore
Method or attribute name: on(event: 'dataChange', type: SubscribeType, listener: Callback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(keyPrefix: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(keyPrefix: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(keyPrefix: string): Promise\;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(keyPrefix: string): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, keyPrefix: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, keyPrefix: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, keyPrefix: string): Promise\;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, keyPrefix: string): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(query: Query, callback: AsyncCallback\): void;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(query: Query, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(query: Query): Promise\;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(query: Query): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, query: Query, callback: AsyncCallback\): void;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, query: Query, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, query: Query): Promise\;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, query: Query): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 9|Class name: DeviceKVStore
Method or attribute name: getResultSet(deviceId: string, predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 10|@ohos.data.distributedKVStore.d.ts| -|Initial version changed|Class name: preferences
Initial version: 9|Class name: preferences
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: preferences
Method or attribute name: const MAX_KEY_LENGTH: 80;
Initial version: N/A|Class name: preferences
Method or attribute name: const MAX_KEY_LENGTH: 80;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: preferences
Method or attribute name: const MAX_VALUE_LENGTH: 8192;
Initial version: N/A|Class name: preferences
Method or attribute name: const MAX_VALUE_LENGTH: 8192;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: preferences
Method or attribute name: function getPreferences(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: preferences
Method or attribute name: function getPreferences(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: preferences
Method or attribute name: function getPreferences(context: Context, name: string): Promise\;
Initial version: 9|Class name: preferences
Method or attribute name: function getPreferences(context: Context, name: string): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: preferences
Method or attribute name: function deletePreferences(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: preferences
Method or attribute name: function deletePreferences(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: preferences
Method or attribute name: function deletePreferences(context: Context, name: string): Promise\;
Initial version: 9|Class name: preferences
Method or attribute name: function deletePreferences(context: Context, name: string): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: preferences
Method or attribute name: function removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: preferences
Method or attribute name: function removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: preferences
Method or attribute name: function removePreferencesFromCache(context: Context, name: string): Promise\;
Initial version: 9|Class name: preferences
Method or attribute name: function removePreferencesFromCache(context: Context, name: string): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Initial version: 9|Class name: Preferences
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: get(key: string, defValue: ValueType, callback: AsyncCallback\): void;
Initial version: 9|Class name: Preferences
Method or attribute name: get(key: string, defValue: ValueType, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: get(key: string, defValue: ValueType): Promise\;
Initial version: 9|Class name: Preferences
Method or attribute name: get(key: string, defValue: ValueType): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: getAll(callback: AsyncCallback\): void;
Initial version: 9|Class name: Preferences
Method or attribute name: getAll(callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: getAll(): Promise\;
Initial version: 9|Class name: Preferences
Method or attribute name: getAll(): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: has(key: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: Preferences
Method or attribute name: has(key: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: has(key: string): Promise\;
Initial version: 9|Class name: Preferences
Method or attribute name: has(key: string): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: put(key: string, value: ValueType, callback: AsyncCallback\): void;
Initial version: 9|Class name: Preferences
Method or attribute name: put(key: string, value: ValueType, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: put(key: string, value: ValueType): Promise\;
Initial version: 9|Class name: Preferences
Method or attribute name: put(key: string, value: ValueType): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: delete(key: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: Preferences
Method or attribute name: delete(key: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: delete(key: string): Promise\;
Initial version: 9|Class name: Preferences
Method or attribute name: delete(key: string): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: clear(callback: AsyncCallback\): void;
Initial version: 9|Class name: Preferences
Method or attribute name: clear(callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: clear(): Promise\;
Initial version: 9|Class name: Preferences
Method or attribute name: clear(): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: flush(callback: AsyncCallback\): void;
Initial version: 9|Class name: Preferences
Method or attribute name: flush(callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: flush(): Promise\;
Initial version: 9|Class name: Preferences
Method or attribute name: flush(): Promise\;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: on(type: 'change', callback: Callback\<{ key: string }>): void;
Initial version: 9|Class name: Preferences
Method or attribute name: on(type: 'change', callback: Callback\<{ key: string }>): void;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: Preferences
Method or attribute name: off(type: 'change', callback?: Callback\<{ key: string }>): void;
Initial version: 9|Class name: Preferences
Method or attribute name: off(type: 'change', callback?: Callback\<{ key: string }>): void;
Initial version: 10|@ohos.data.preferences.d.ts| -|Initial version changed|Class name: relationalStore
Initial version: 9|Class name: relationalStore
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: StoreConfig
Initial version: 9|Class name: StoreConfig
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: StoreConfig
Method or attribute name: name: string;
Initial version: 9|Class name: StoreConfig
Method or attribute name: name: string;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: SyncMode
Initial version: 9|Class name: SyncMode
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: SyncMode
Method or attribute name: SYNC_MODE_PUSH = 0
Initial version: 9|Class name: SyncMode
Method or attribute name: SYNC_MODE_PUSH = 0
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: SyncMode
Method or attribute name: SYNC_MODE_PULL = 1
Initial version: 9|Class name: SyncMode
Method or attribute name: SYNC_MODE_PULL = 1
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Initial version: 9|Class name: RdbPredicates
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: equalTo(field: string, value: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: equalTo(field: string, value: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: notEqualTo(field: string, value: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: notEqualTo(field: string, value: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: beginWrap(): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: beginWrap(): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: endWrap(): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: endWrap(): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: or(): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: or(): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: and(): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: and(): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: contains(field: string, value: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: contains(field: string, value: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: beginsWith(field: string, value: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: beginsWith(field: string, value: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: endsWith(field: string, value: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: endsWith(field: string, value: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: isNull(field: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: isNull(field: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: isNotNull(field: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: isNotNull(field: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: like(field: string, value: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: like(field: string, value: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: glob(field: string, value: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: glob(field: string, value: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: between(field: string, low: ValueType, high: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: between(field: string, low: ValueType, high: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: notBetween(field: string, low: ValueType, high: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: notBetween(field: string, low: ValueType, high: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: greaterThan(field: string, value: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: greaterThan(field: string, value: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: lessThan(field: string, value: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: lessThan(field: string, value: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: greaterThanOrEqualTo(field: string, value: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: lessThanOrEqualTo(field: string, value: ValueType): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: lessThanOrEqualTo(field: string, value: ValueType): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: orderByAsc(field: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: orderByAsc(field: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: orderByDesc(field: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: orderByDesc(field: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: distinct(): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: distinct(): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: limitAs(value: number): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: limitAs(value: number): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: offsetAs(rowOffset: number): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: offsetAs(rowOffset: number): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: groupBy(fields: Array\): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: groupBy(fields: Array\): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: indexedBy(field: string): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: indexedBy(field: string): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: in(field: string, value: Array\): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: in(field: string, value: Array\): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbPredicates
Method or attribute name: notIn(field: string, value: Array\): RdbPredicates;
Initial version: 9|Class name: RdbPredicates
Method or attribute name: notIn(field: string, value: Array\): RdbPredicates;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Initial version: 9|Class name: ResultSet
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: columnNames: Array\;
Initial version: 9|Class name: ResultSet
Method or attribute name: columnNames: Array\;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: columnCount: number;
Initial version: 9|Class name: ResultSet
Method or attribute name: columnCount: number;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: rowCount: number;
Initial version: 9|Class name: ResultSet
Method or attribute name: rowCount: number;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: rowIndex: number;
Initial version: 9|Class name: ResultSet
Method or attribute name: rowIndex: number;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: isAtFirstRow: boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: isAtFirstRow: boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: isAtLastRow: boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: isAtLastRow: boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: isEnded: boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: isEnded: boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: isStarted: boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: isStarted: boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: isClosed: boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: isClosed: boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: getColumnIndex(columnName: string): number;
Initial version: 9|Class name: ResultSet
Method or attribute name: getColumnIndex(columnName: string): number;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: getColumnName(columnIndex: number): string;
Initial version: 9|Class name: ResultSet
Method or attribute name: getColumnName(columnIndex: number): string;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: goTo(offset: number): boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: goTo(offset: number): boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: goToRow(position: number): boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: goToRow(position: number): boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: goToFirstRow(): boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: goToFirstRow(): boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: goToLastRow(): boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: goToLastRow(): boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: goToNextRow(): boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: goToNextRow(): boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: goToPreviousRow(): boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: goToPreviousRow(): boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: getBlob(columnIndex: number): Uint8Array;
Initial version: 9|Class name: ResultSet
Method or attribute name: getBlob(columnIndex: number): Uint8Array;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: getString(columnIndex: number): string;
Initial version: 9|Class name: ResultSet
Method or attribute name: getString(columnIndex: number): string;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: getLong(columnIndex: number): number;
Initial version: 9|Class name: ResultSet
Method or attribute name: getLong(columnIndex: number): number;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: getDouble(columnIndex: number): number;
Initial version: 9|Class name: ResultSet
Method or attribute name: getDouble(columnIndex: number): number;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: isColumnNull(columnIndex: number): boolean;
Initial version: 9|Class name: ResultSet
Method or attribute name: isColumnNull(columnIndex: number): boolean;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: ResultSet
Method or attribute name: close(): void;
Initial version: 9|Class name: ResultSet
Method or attribute name: close(): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Initial version: 9|Class name: RdbStore
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: batchInsert(table: string, values: Array\, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: batchInsert(table: string, values: Array\, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: batchInsert(table: string, values: Array\): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: batchInsert(table: string, values: Array\): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: delete(predicates: RdbPredicates, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: delete(predicates: RdbPredicates, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: delete(predicates: RdbPredicates): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: delete(predicates: RdbPredicates): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: delete(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: delete(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: delete(table: string, predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: delete(table: string, predicates: dataSharePredicates.DataSharePredicates): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: querySql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: querySql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: beginTransaction(): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: beginTransaction(): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: commit(): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: commit(): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: rollBack(): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: rollBack(): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: backup(destName: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: backup(destName: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: backup(destName: string): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: backup(destName: string): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: restore(srcName: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: RdbStore
Method or attribute name: restore(srcName: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: RdbStore
Method or attribute name: restore(srcName: string): Promise\;
Initial version: 9|Class name: RdbStore
Method or attribute name: restore(srcName: string): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: relationalStore
Method or attribute name: function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback\): void;
Initial version: 9|Class name: relationalStore
Method or attribute name: function getRdbStore(context: Context, config: StoreConfig, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: relationalStore
Method or attribute name: function getRdbStore(context: Context, config: StoreConfig): Promise\;
Initial version: 9|Class name: relationalStore
Method or attribute name: function getRdbStore(context: Context, config: StoreConfig): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: relationalStore
Method or attribute name: function deleteRdbStore(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 9|Class name: relationalStore
Method or attribute name: function deleteRdbStore(context: Context, name: string, callback: AsyncCallback\): void;
Initial version: 10|@ohos.data.relationalStore.d.ts| -|Initial version changed|Class name: relationalStore
Method or attribute name: function deleteRdbStore(context: Context, name: string): Promise\;
Initial version: 9|Class name: relationalStore
Method or attribute name: function deleteRdbStore(context: Context, name: string): Promise\;
Initial version: 10|@ohos.data.relationalStore.d.ts| |Permission added|Class name: SubscribeType
Method or attribute name: SUBSCRIBE_TYPE_REMOTE = 0
Permission: N/A|Class name: SubscribeType
Method or attribute name: SUBSCRIBE_TYPE_REMOTE = 0
Permission: ohos.permission.DISTRIBUTED_DATASYNC|@ohos.data.rdb.d.ts| |Permission added|Class name: SubscribeType
Method or attribute name: SUBSCRIBE_TYPE_REMOTE = 0
Permission: N/A|Class name: SubscribeType
Method or attribute name: SUBSCRIBE_TYPE_REMOTE = 0
Permission: ohos.permission.DISTRIBUTED_DATASYNC|@ohos.data.relationalStore.d.ts| |Function changed|Class name: dataShare
Method or attribute name: function createDataShareHelper(context: Context, uri: string): Promise\;
|Class name: dataShare
Method or attribute name: function createDataShareHelper(
context: Context,
uri: string,
option?: DataShareHelperOption
): Promise\;
|@ohos.data.dataShare.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket, conflict: ConflictResolution, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket): Promise\;
|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket, conflict: ConflictResolution): Promise\;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution): Promise\;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution): Promise\;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
|Class name: RdbStore
Method or attribute name: update(table: string, values: ValuesBucket, predicates: dataSharePredicates.DataSharePredicates): Promise\;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: query(predicates: RdbPredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: query(table: string, predicates: dataSharePredicates.DataSharePredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: querySql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: querySql(sql: string, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: executeSql(sql: string, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| -|Function changed|Class name: RdbStore
Method or attribute name: executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket, callback: AsyncCallback): void;
insert(table: string, values: ValuesBucket, conflict: ConflictResolution, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket): Promise\;
|Class name: RdbStore
Method or attribute name: insert(table: string, values: ValuesBucket): Promise\;
insert(table: string, values: ValuesBucket, conflict: ConflictResolution): Promise\;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates, callback: AsyncCallback\): void;
update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
|Class name: RdbStore
Method or attribute name: update(values: ValuesBucket, predicates: RdbPredicates): Promise\;
update(values: ValuesBucket, predicates: RdbPredicates, conflict: ConflictResolution): Promise\;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: query(predicates: RdbPredicates, columns: Array\, callback: AsyncCallback\): void;
query(predicates: RdbPredicates, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: querySql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: querySql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
querySql(sql: string, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| +|Function changed|Class name: RdbStore
Method or attribute name: executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
|Class name: RdbStore
Method or attribute name: executeSql(sql: string, bindArgs: Array\, callback: AsyncCallback\): void;
executeSql(sql: string, callback: AsyncCallback\): void;
|@ohos.data.relationalStore.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-geolocation.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-geolocation.md deleted file mode 100644 index abef9b2304985df358222b1c9b3f9db197bf6847..0000000000000000000000000000000000000000 --- a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-geolocation.md +++ /dev/null @@ -1,37 +0,0 @@ -| Change Type | Old Version | New Version | d.ts File | -| ---- | ------ | ------ | -------- | -|Permission added|Class name: GeoAddress
Method or attribute name: latitude?: number;
Permission: N/A|Class name: GeoAddress
Method or attribute name: latitude?: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: longitude?: number;
Permission: N/A|Class name: GeoAddress
Method or attribute name: longitude?: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: locale?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: locale?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: placeName?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: placeName?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: countryCode?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: countryCode?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: countryName?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: countryName?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: administrativeArea?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: administrativeArea?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: subAdministrativeArea?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: subAdministrativeArea?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: locality?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: locality?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: subLocality?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: subLocality?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: roadName?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: roadName?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: subRoadName?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: subRoadName?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: premises?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: premises?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: postalCode?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: postalCode?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: phoneNumber?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: phoneNumber?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: addressUrl?: string;
Permission: N/A|Class name: GeoAddress
Method or attribute name: addressUrl?: string;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: descriptions?: Array\;
Permission: N/A|Class name: GeoAddress
Method or attribute name: descriptions?: Array\;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoAddress
Method or attribute name: descriptionsSize?: number;
Permission: N/A|Class name: GeoAddress
Method or attribute name: descriptionsSize?: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: Location
Method or attribute name: latitude: number;
Permission: N/A|Class name: Location
Method or attribute name: latitude: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: Location
Method or attribute name: longitude: number;
Permission: N/A|Class name: Location
Method or attribute name: longitude: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: Location
Method or attribute name: altitude: number;
Permission: N/A|Class name: Location
Method or attribute name: altitude: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: Location
Method or attribute name: accuracy: number;
Permission: N/A|Class name: Location
Method or attribute name: accuracy: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: Location
Method or attribute name: speed: number;
Permission: N/A|Class name: Location
Method or attribute name: speed: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: Location
Method or attribute name: timeStamp: number;
Permission: N/A|Class name: Location
Method or attribute name: timeStamp: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: Location
Method or attribute name: direction: number;
Permission: N/A|Class name: Location
Method or attribute name: direction: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: Location
Method or attribute name: timeSinceBoot: number;
Permission: N/A|Class name: Location
Method or attribute name: timeSinceBoot: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: Location
Method or attribute name: additions?: Array\;
Permission: N/A|Class name: Location
Method or attribute name: additions?: Array\;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: Location
Method or attribute name: additionSize?: number;
Permission: N/A|Class name: Location
Method or attribute name: additionSize?: number;
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoLocationErrorCode
Method or attribute name: INPUT_PARAMS_ERROR
Permission: N/A|Class name: GeoLocationErrorCode
Method or attribute name: INPUT_PARAMS_ERROR
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoLocationErrorCode
Method or attribute name: REVERSE_GEOCODE_ERROR
Permission: N/A|Class name: GeoLocationErrorCode
Method or attribute name: REVERSE_GEOCODE_ERROR
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoLocationErrorCode
Method or attribute name: GEOCODE_ERROR
Permission: N/A|Class name: GeoLocationErrorCode
Method or attribute name: GEOCODE_ERROR
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoLocationErrorCode
Method or attribute name: LOCATOR_ERROR
Permission: N/A|Class name: GeoLocationErrorCode
Method or attribute name: LOCATOR_ERROR
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoLocationErrorCode
Method or attribute name: LOCATION_SWITCH_ERROR
Permission: N/A|Class name: GeoLocationErrorCode
Method or attribute name: LOCATION_SWITCH_ERROR
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoLocationErrorCode
Method or attribute name: LAST_KNOWN_LOCATION_ERROR
Permission: N/A|Class name: GeoLocationErrorCode
Method or attribute name: LAST_KNOWN_LOCATION_ERROR
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| -|Permission added|Class name: GeoLocationErrorCode
Method or attribute name: LOCATION_REQUEST_TIMEOUT_ERROR
Permission: N/A|Class name: GeoLocationErrorCode
Method or attribute name: LOCATION_REQUEST_TIMEOUT_ERROR
Permission: ohos.permission.LOCATION|@ohos.geolocation.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-global.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-global.md index 818e229db84b9f5cc91515153df12bd2da815058..7199eea42a2fe40cd02a6ea8f295f5c51b64a5cc 100644 --- a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-global.md +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-global.md @@ -17,156 +17,3 @@ |Added|NA|Class name: ResourceManager
Method or attribute name: getDrawableDescriptor(resource: Resource, density?: number): DrawableDescriptor;|@ohos.resourceManager.d.ts| |Added|NA|Class name: ResourceManager
Method or attribute name: getRawFileList(path: string, callback: _AsyncCallback\>): void;|@ohos.resourceManager.d.ts| |Added|NA|Class name: ResourceManager
Method or attribute name: getRawFileList(path: string): Promise\>;|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: System
Initial version: 9|Class name: System
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: System
Method or attribute name: static getDisplayCountry(country: string, locale: string, sentenceCase?: boolean): string;
Initial version: 9|Class name: System
Method or attribute name: static getDisplayCountry(country: string, locale: string, sentenceCase?: boolean): string;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: System
Method or attribute name: static getDisplayLanguage(language: string, locale: string, sentenceCase?: boolean): string;
Initial version: 9|Class name: System
Method or attribute name: static getDisplayLanguage(language: string, locale: string, sentenceCase?: boolean): string;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: System
Method or attribute name: static getSystemLanguage(): string;
Initial version: 9|Class name: System
Method or attribute name: static getSystemLanguage(): string;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: System
Method or attribute name: static setSystemLanguage(language: string): void;
Initial version: N/A|Class name: System
Method or attribute name: static setSystemLanguage(language: string): void;
Initial version: 9|@ohos.i18n.d.ts| -|Initial version changed|Class name: System
Method or attribute name: static getSystemRegion(): string;
Initial version: 9|Class name: System
Method or attribute name: static getSystemRegion(): string;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: System
Method or attribute name: static getSystemLocale(): string;
Initial version: 9|Class name: System
Method or attribute name: static getSystemLocale(): string;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: System
Method or attribute name: static is24HourClock(): boolean;
Initial version: 9|Class name: System
Method or attribute name: static is24HourClock(): boolean;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: I18NUtil
Initial version: 9|Class name: I18NUtil
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: I18NUtil
Method or attribute name: static getDateOrder(locale: string): string;
Initial version: 9|Class name: I18NUtil
Method or attribute name: static getDateOrder(locale: string): string;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: i18n
Method or attribute name: function getCalendar(locale: string, type?: string): Calendar;
Initial version: 8|Class name: i18n
Method or attribute name: function getCalendar(locale: string, type?: string): Calendar;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Calendar
Method or attribute name: setTime(date: Date): void;
Initial version: 8|Class name: Calendar
Method or attribute name: setTime(date: Date): void;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Calendar
Method or attribute name: setTime(time: number): void;
Initial version: 8|Class name: Calendar
Method or attribute name: setTime(time: number): void;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Calendar
Method or attribute name: setTimeZone(timezone: string): void;
Initial version: 8|Class name: Calendar
Method or attribute name: setTimeZone(timezone: string): void;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Calendar
Method or attribute name: getTimeZone(): string;
Initial version: 8|Class name: Calendar
Method or attribute name: getTimeZone(): string;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Calendar
Method or attribute name: getFirstDayOfWeek(): number;
Initial version: 8|Class name: Calendar
Method or attribute name: getFirstDayOfWeek(): number;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Calendar
Method or attribute name: setFirstDayOfWeek(value: number): void;
Initial version: 8|Class name: Calendar
Method or attribute name: setFirstDayOfWeek(value: number): void;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Calendar
Method or attribute name: getMinimalDaysInFirstWeek(): number;
Initial version: 8|Class name: Calendar
Method or attribute name: getMinimalDaysInFirstWeek(): number;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Calendar
Method or attribute name: setMinimalDaysInFirstWeek(value: number): void;
Initial version: 8|Class name: Calendar
Method or attribute name: setMinimalDaysInFirstWeek(value: number): void;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Calendar
Method or attribute name: get(field: string): number;
Initial version: 8|Class name: Calendar
Method or attribute name: get(field: string): number;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Calendar
Method or attribute name: isWeekend(date?: Date): boolean;
Initial version: 8|Class name: Calendar
Method or attribute name: isWeekend(date?: Date): boolean;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: i18n
Method or attribute name: function isRTL(locale: string): boolean;
Initial version: 7|Class name: i18n
Method or attribute name: function isRTL(locale: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Unicode
Initial version: 9|Class name: Unicode
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Unicode
Method or attribute name: static isDigit(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isDigit(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Unicode
Method or attribute name: static isSpaceChar(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isSpaceChar(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Unicode
Method or attribute name: static isWhitespace(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isWhitespace(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Unicode
Method or attribute name: static isRTL(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isRTL(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Unicode
Method or attribute name: static isIdeograph(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isIdeograph(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Unicode
Method or attribute name: static isLetter(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isLetter(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Unicode
Method or attribute name: static isLowerCase(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isLowerCase(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Unicode
Method or attribute name: static isUpperCase(char: string): boolean;
Initial version: 9|Class name: Unicode
Method or attribute name: static isUpperCase(char: string): boolean;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: Unicode
Method or attribute name: static getType(char: string): string;
Initial version: 9|Class name: Unicode
Method or attribute name: static getType(char: string): string;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: i18n
Method or attribute name: function getTimeZone(zoneID?: string): TimeZone;
Initial version: 7|Class name: i18n
Method or attribute name: function getTimeZone(zoneID?: string): TimeZone;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: TimeZone
Initial version: 7|Class name: TimeZone
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: TimeZone
Method or attribute name: getID(): string;
Initial version: 7|Class name: TimeZone
Method or attribute name: getID(): string;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: TimeZone
Method or attribute name: getRawOffset(): number;
Initial version: 7|Class name: TimeZone
Method or attribute name: getRawOffset(): number;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: TimeZone
Method or attribute name: getOffset(date?: number): number;
Initial version: 7|Class name: TimeZone
Method or attribute name: getOffset(date?: number): number;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: TimeZone
Method or attribute name: static getAvailableIDs(): Array\;
Initial version: 9|Class name: TimeZone
Method or attribute name: static getAvailableIDs(): Array\;
Initial version: 10|@ohos.i18n.d.ts| -|Initial version changed|Class name: intl
Initial version: 6|Class name: intl
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: LocaleOptions
Initial version: 6|Class name: LocaleOptions
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: Locale
Initial version: 6|Class name: Locale
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: Locale
Method or attribute name: constructor();
Initial version: 8|Class name: Locale
Method or attribute name: constructor();
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: Locale
Method or attribute name: constructor(locale: string, options?: LocaleOptions);
Initial version: 6|Class name: Locale
Method or attribute name: constructor(locale: string, options?: LocaleOptions);
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: Locale
Method or attribute name: toString(): string;
Initial version: 6|Class name: Locale
Method or attribute name: toString(): string;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: Locale
Method or attribute name: maximize(): Locale;
Initial version: 6|Class name: Locale
Method or attribute name: maximize(): Locale;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: Locale
Method or attribute name: minimize(): Locale;
Initial version: 6|Class name: Locale
Method or attribute name: minimize(): Locale;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: DateTimeOptions
Initial version: 6|Class name: DateTimeOptions
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: DateTimeFormat
Initial version: 6|Class name: DateTimeFormat
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: DateTimeFormat
Method or attribute name: constructor();
Initial version: 8|Class name: DateTimeFormat
Method or attribute name: constructor();
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: DateTimeFormat
Method or attribute name: constructor(locale: string \| Array\, options?: DateTimeOptions);
Initial version: 6|Class name: DateTimeFormat
Method or attribute name: constructor(locale: string \| Array\, options?: DateTimeOptions);
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: DateTimeFormat
Method or attribute name: format(date: Date): string;
Initial version: 6|Class name: DateTimeFormat
Method or attribute name: format(date: Date): string;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: DateTimeFormat
Method or attribute name: formatRange(startDate: Date, endDate: Date): string;
Initial version: 6|Class name: DateTimeFormat
Method or attribute name: formatRange(startDate: Date, endDate: Date): string;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: DateTimeFormat
Method or attribute name: resolvedOptions(): DateTimeOptions;
Initial version: 6|Class name: DateTimeFormat
Method or attribute name: resolvedOptions(): DateTimeOptions;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: NumberOptions
Initial version: 6|Class name: NumberOptions
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: NumberFormat
Initial version: 6|Class name: NumberFormat
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: NumberFormat
Method or attribute name: constructor();
Initial version: 8|Class name: NumberFormat
Method or attribute name: constructor();
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: NumberFormat
Method or attribute name: constructor(locale: string \| Array\, options?: NumberOptions);
Initial version: 6|Class name: NumberFormat
Method or attribute name: constructor(locale: string \| Array\, options?: NumberOptions);
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: NumberFormat
Method or attribute name: format(number: number): string;
Initial version: 6|Class name: NumberFormat
Method or attribute name: format(number: number): string;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: NumberFormat
Method or attribute name: resolvedOptions(): NumberOptions;
Initial version: 6|Class name: NumberFormat
Method or attribute name: resolvedOptions(): NumberOptions;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: CollatorOptions
Initial version: 8|Class name: CollatorOptions
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: Collator
Initial version: 8|Class name: Collator
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: Collator
Method or attribute name: constructor();
Initial version: 8|Class name: Collator
Method or attribute name: constructor();
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: Collator
Method or attribute name: constructor(locale: string \| Array\, options?: CollatorOptions);
Initial version: 8|Class name: Collator
Method or attribute name: constructor(locale: string \| Array\, options?: CollatorOptions);
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: Collator
Method or attribute name: compare(first: string, second: string): number;
Initial version: 8|Class name: Collator
Method or attribute name: compare(first: string, second: string): number;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: Collator
Method or attribute name: resolvedOptions(): CollatorOptions;
Initial version: 8|Class name: Collator
Method or attribute name: resolvedOptions(): CollatorOptions;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: PluralRulesOptions
Initial version: 8|Class name: PluralRulesOptions
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: PluralRules
Initial version: 8|Class name: PluralRules
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: PluralRules
Method or attribute name: constructor();
Initial version: 8|Class name: PluralRules
Method or attribute name: constructor();
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: PluralRules
Method or attribute name: constructor(locale: string \| Array\, options?: PluralRulesOptions);
Initial version: 8|Class name: PluralRules
Method or attribute name: constructor(locale: string \| Array\, options?: PluralRulesOptions);
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: PluralRules
Method or attribute name: select(n: number): string;
Initial version: 8|Class name: PluralRules
Method or attribute name: select(n: number): string;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: RelativeTimeFormatInputOptions
Initial version: 8|Class name: RelativeTimeFormatInputOptions
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: RelativeTimeFormatResolvedOptions
Initial version: 8|Class name: RelativeTimeFormatResolvedOptions
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: locale: string;
Initial version: 8|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: locale: string;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: style: string;
Initial version: 8|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: style: string;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: numeric: string;
Initial version: 8|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: numeric: string;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: numberingSystem: string;
Initial version: 8|Class name: RelativeTimeFormatResolvedOptions
Method or attribute name: numberingSystem: string;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: RelativeTimeFormat
Initial version: 8|Class name: RelativeTimeFormat
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: RelativeTimeFormat
Method or attribute name: constructor();
Initial version: 8|Class name: RelativeTimeFormat
Method or attribute name: constructor();
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: RelativeTimeFormat
Method or attribute name: constructor(locale: string \| Array\, options?: RelativeTimeFormatInputOptions);
Initial version: 8|Class name: RelativeTimeFormat
Method or attribute name: constructor(locale: string \| Array\, options?: RelativeTimeFormatInputOptions);
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: RelativeTimeFormat
Method or attribute name: format(value: number, unit: string): string;
Initial version: 8|Class name: RelativeTimeFormat
Method or attribute name: format(value: number, unit: string): string;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: RelativeTimeFormat
Method or attribute name: formatToParts(value: number, unit: string): Array\;
Initial version: 8|Class name: RelativeTimeFormat
Method or attribute name: formatToParts(value: number, unit: string): Array\;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: RelativeTimeFormat
Method or attribute name: resolvedOptions(): RelativeTimeFormatResolvedOptions;
Initial version: 8|Class name: RelativeTimeFormat
Method or attribute name: resolvedOptions(): RelativeTimeFormatResolvedOptions;
Initial version: 10|@ohos.intl.d.ts| -|Initial version changed|Class name: resourceManager
Initial version: 6|Class name: resourceManager
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: Direction
Initial version: 6|Class name: Direction
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: Direction
Method or attribute name: DIRECTION_VERTICAL = 0
Initial version: 6|Class name: Direction
Method or attribute name: DIRECTION_VERTICAL = 0
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: Direction
Method or attribute name: DIRECTION_HORIZONTAL = 1
Initial version: 6|Class name: Direction
Method or attribute name: DIRECTION_HORIZONTAL = 1
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: DeviceType
Initial version: 6|Class name: DeviceType
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_PHONE = 0x00
Initial version: 6|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_PHONE = 0x00
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_TABLET = 0x01
Initial version: 6|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_TABLET = 0x01
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_CAR = 0x02
Initial version: 6|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_CAR = 0x02
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_PC = 0x03
Initial version: 6|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_PC = 0x03
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_TV = 0x04
Initial version: 6|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_TV = 0x04
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_WEARABLE = 0x06
Initial version: 6|Class name: DeviceType
Method or attribute name: DEVICE_TYPE_WEARABLE = 0x06
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ScreenDensity
Initial version: 6|Class name: ScreenDensity
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ScreenDensity
Method or attribute name: SCREEN_SDPI = 120
Initial version: 6|Class name: ScreenDensity
Method or attribute name: SCREEN_SDPI = 120
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ScreenDensity
Method or attribute name: SCREEN_MDPI = 160
Initial version: 6|Class name: ScreenDensity
Method or attribute name: SCREEN_MDPI = 160
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ScreenDensity
Method or attribute name: SCREEN_LDPI = 240
Initial version: 6|Class name: ScreenDensity
Method or attribute name: SCREEN_LDPI = 240
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ScreenDensity
Method or attribute name: SCREEN_XLDPI = 320
Initial version: 6|Class name: ScreenDensity
Method or attribute name: SCREEN_XLDPI = 320
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ScreenDensity
Method or attribute name: SCREEN_XXLDPI = 480
Initial version: 6|Class name: ScreenDensity
Method or attribute name: SCREEN_XXLDPI = 480
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ScreenDensity
Method or attribute name: SCREEN_XXXLDPI = 640
Initial version: 6|Class name: ScreenDensity
Method or attribute name: SCREEN_XXXLDPI = 640
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: Configuration
Initial version: 6|Class name: Configuration
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: DeviceCapability
Initial version: 6|Class name: DeviceCapability
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Initial version: 6|Class name: ResourceManager
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringValue(resource: Resource, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringValue(resource: Resource, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringValue(resource: Resource): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringValue(resource: Resource): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resource: Resource, callback: _AsyncCallback\>): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resource: Resource, callback: _AsyncCallback\>): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resource: Resource): Promise\>;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resource: Resource): Promise\>;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContent(resource: Resource, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContent(resource: Resource, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContent(resource: Resource): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContent(resource: Resource): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resource: Resource, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resource: Resource, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resource: Resource): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resource: Resource): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getDeviceCapability(callback: _AsyncCallback\): void;
Initial version: 6|Class name: ResourceManager
Method or attribute name: getDeviceCapability(callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getDeviceCapability(): Promise\;
Initial version: 6|Class name: ResourceManager
Method or attribute name: getDeviceCapability(): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getConfiguration(callback: _AsyncCallback\): void;
Initial version: 6|Class name: ResourceManager
Method or attribute name: getConfiguration(callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getConfiguration(): Promise\;
Initial version: 6|Class name: ResourceManager
Method or attribute name: getConfiguration(): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resource: Resource, num: number, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resource: Resource, num: number, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resource: Resource, num: number): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resource: Resource, num: number): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringByName(resName: string, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringByName(resName: string, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringByName(resName: string): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringByName(resName: string): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringArrayByName(resName: string, callback: _AsyncCallback\>): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringArrayByName(resName: string, callback: _AsyncCallback\>): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringArrayByName(resName: string): Promise\>;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringArrayByName(resName: string): Promise\>;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaByName(resName: string, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaByName(resName: string, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaByName(resName: string): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaByName(resName: string): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaBase64ByName(resName: string, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaBase64ByName(resName: string, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaBase64ByName(resName: string): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaBase64ByName(resName: string): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getPluralStringByName(resName: string, num: number, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getPluralStringByName(resName: string, num: number, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getPluralStringByName(resName: string, num: number): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getPluralStringByName(resName: string, num: number): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringSync(resId: number): string;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringSync(resId: number): string;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringSync(resource: Resource): string;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringSync(resource: Resource): string;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringByNameSync(resName: string): string;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringByNameSync(resName: string): string;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getBoolean(resId: number): boolean;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getBoolean(resId: number): boolean;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getBoolean(resource: Resource): boolean;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getBoolean(resource: Resource): boolean;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getBooleanByName(resName: string): boolean;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getBooleanByName(resName: string): boolean;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getNumber(resId: number): number;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getNumber(resId: number): number;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getNumber(resource: Resource): number;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getNumber(resource: Resource): number;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getNumberByName(resName: string): number;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getNumberByName(resName: string): number;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: release();
Initial version: 7|Class name: ResourceManager
Method or attribute name: release();
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringValue(resId: number, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringValue(resId: number, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringValue(resId: number): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringValue(resId: number): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resId: number, callback: _AsyncCallback\>): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resId: number, callback: _AsyncCallback\>): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resId: number): Promise\>;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getStringArrayValue(resId: number): Promise\>;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resId: number, num: number, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resId: number, num: number, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resId: number, num: number): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getPluralStringValue(resId: number, num: number): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContent(resId: number, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContent(resId: number, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContent(resId: number): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContent(resId: number): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resId: number, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resId: number, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resId: number): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getMediaContentBase64(resId: number): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getRawFileContent(path: string, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getRawFileContent(path: string, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getRawFileContent(path: string): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getRawFileContent(path: string): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getRawFd(path: string, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getRawFd(path: string, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: getRawFd(path: string): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: getRawFd(path: string): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: closeRawFd(path: string, callback: _AsyncCallback\): void;
Initial version: 9|Class name: ResourceManager
Method or attribute name: closeRawFd(path: string, callback: _AsyncCallback\): void;
Initial version: 10|@ohos.resourceManager.d.ts| -|Initial version changed|Class name: ResourceManager
Method or attribute name: closeRawFd(path: string): Promise\;
Initial version: 9|Class name: ResourceManager
Method or attribute name: closeRawFd(path: string): Promise\;
Initial version: 10|@ohos.resourceManager.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md index 078d2293f3f9b892525569bfc40f9431f9033f1c..4d98bb2e5f9a589293dbf6e9ba73d224d398389a 100644 --- a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-misc.md @@ -157,125 +157,6 @@ |Added|NA|Class name: wallpaper
Method or attribute name: function setVideo(source: string, wallpaperType: WallpaperType): Promise\;|@ohos.wallpaper.d.ts| |Added|NA|Class name: wallpaper
Method or attribute name: function on(

type: 'wallpaperChange',

callback: (wallpaperType: WallpaperType, resourceType: WallpaperResourceType) => void

): void;|@ohos.wallpaper.d.ts| |Added|NA|Class name: wallpaper
Method or attribute name: function off(

type: 'wallpaperChange',

callback?: (wallpaperType: WallpaperType, resourceType: WallpaperResourceType) => void

): void;|@ohos.wallpaper.d.ts| -|Initial version changed|Class name: inputMethod
Method or attribute name: function switchCurrentInputMethodSubtype(target: InputMethodSubtype, callback: AsyncCallback\): void;
Initial version: 9|Class name: inputMethod
Method or attribute name: function switchCurrentInputMethodSubtype(target: InputMethodSubtype, callback: AsyncCallback\): void;
Initial version: 10|@ohos.inputMethod.d.ts| -|Initial version changed|Class name: inputMethod
Method or attribute name: function switchCurrentInputMethodSubtype(target: InputMethodSubtype): Promise\;
Initial version: 9|Class name: inputMethod
Method or attribute name: function switchCurrentInputMethodSubtype(target: InputMethodSubtype): Promise\;
Initial version: 10|@ohos.inputMethod.d.ts| -|Initial version changed|Class name: request
Initial version: N/A|Class name: request
Initial version: 6|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const EXCEPTION_PERMISSION: number;
Initial version: 9|Class name: request
Method or attribute name: const EXCEPTION_PERMISSION: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const EXCEPTION_PARAMCHECK: number;
Initial version: 9|Class name: request
Method or attribute name: const EXCEPTION_PARAMCHECK: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const EXCEPTION_UNSUPPORTED: number;
Initial version: 9|Class name: request
Method or attribute name: const EXCEPTION_UNSUPPORTED: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const EXCEPTION_FILEIO: number;
Initial version: 9|Class name: request
Method or attribute name: const EXCEPTION_FILEIO: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const EXCEPTION_FILEPATH: number;
Initial version: 9|Class name: request
Method or attribute name: const EXCEPTION_FILEPATH: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const EXCEPTION_SERVICE: number;
Initial version: 9|Class name: request
Method or attribute name: const EXCEPTION_SERVICE: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const EXCEPTION_OTHERS: number;
Initial version: 9|Class name: request
Method or attribute name: const EXCEPTION_OTHERS: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const NETWORK_MOBILE: number;
Initial version: 6|Class name: request
Method or attribute name: const NETWORK_MOBILE: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const NETWORK_WIFI: number;
Initial version: 6|Class name: request
Method or attribute name: const NETWORK_WIFI: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const ERROR_CANNOT_RESUME: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_CANNOT_RESUME: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const ERROR_DEVICE_NOT_FOUND: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_DEVICE_NOT_FOUND: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const ERROR_FILE_ALREADY_EXISTS: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_FILE_ALREADY_EXISTS: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const ERROR_FILE_ERROR: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_FILE_ERROR: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const ERROR_HTTP_DATA_ERROR: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_HTTP_DATA_ERROR: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const ERROR_INSUFFICIENT_SPACE: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_INSUFFICIENT_SPACE: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const ERROR_TOO_MANY_REDIRECTS: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_TOO_MANY_REDIRECTS: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const ERROR_UNHANDLED_HTTP_CODE: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_UNHANDLED_HTTP_CODE: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const ERROR_UNKNOWN: number;
Initial version: 7|Class name: request
Method or attribute name: const ERROR_UNKNOWN: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const ERROR_OFFLINE: number;
Initial version: 9|Class name: request
Method or attribute name: const ERROR_OFFLINE: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const ERROR_UNSUPPORTED_NETWORK_TYPE: number;
Initial version: 9|Class name: request
Method or attribute name: const ERROR_UNSUPPORTED_NETWORK_TYPE: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const PAUSED_QUEUED_FOR_WIFI: number;
Initial version: 7|Class name: request
Method or attribute name: const PAUSED_QUEUED_FOR_WIFI: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const PAUSED_WAITING_FOR_NETWORK: number;
Initial version: 7|Class name: request
Method or attribute name: const PAUSED_WAITING_FOR_NETWORK: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const PAUSED_WAITING_TO_RETRY: number;
Initial version: 7|Class name: request
Method or attribute name: const PAUSED_WAITING_TO_RETRY: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const PAUSED_BY_USER: number;
Initial version: 9|Class name: request
Method or attribute name: const PAUSED_BY_USER: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const PAUSED_UNKNOWN: number;
Initial version: 7|Class name: request
Method or attribute name: const PAUSED_UNKNOWN: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const SESSION_SUCCESSFUL: number;
Initial version: 7|Class name: request
Method or attribute name: const SESSION_SUCCESSFUL: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const SESSION_RUNNING: number;
Initial version: 7|Class name: request
Method or attribute name: const SESSION_RUNNING: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const SESSION_PENDING: number;
Initial version: 7|Class name: request
Method or attribute name: const SESSION_PENDING: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const SESSION_PAUSED: number;
Initial version: 7|Class name: request
Method or attribute name: const SESSION_PAUSED: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: const SESSION_FAILED: number;
Initial version: 7|Class name: request
Method or attribute name: const SESSION_FAILED: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: function downloadFile(context: BaseContext, config: DownloadConfig, callback: AsyncCallback\): void;
Initial version: 9|Class name: request
Method or attribute name: function downloadFile(context: BaseContext, config: DownloadConfig, callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: function downloadFile(context: BaseContext, config: DownloadConfig): Promise\;
Initial version: 9|Class name: request
Method or attribute name: function downloadFile(context: BaseContext, config: DownloadConfig): Promise\;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: function uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback\): void;
Initial version: 9|Class name: request
Method or attribute name: function uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: request
Method or attribute name: function uploadFile(context: BaseContext, config: UploadConfig): Promise\;
Initial version: 9|Class name: request
Method or attribute name: function uploadFile(context: BaseContext, config: UploadConfig): Promise\;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadConfig
Initial version: 6|Class name: DownloadConfig
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadConfig
Method or attribute name: url: string;
Initial version: 6|Class name: DownloadConfig
Method or attribute name: url: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadConfig
Method or attribute name: header?: Object;
Initial version: 6|Class name: DownloadConfig
Method or attribute name: header?: Object;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadConfig
Method or attribute name: enableMetered?: boolean;
Initial version: 6|Class name: DownloadConfig
Method or attribute name: enableMetered?: boolean;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadConfig
Method or attribute name: enableRoaming?: boolean;
Initial version: 6|Class name: DownloadConfig
Method or attribute name: enableRoaming?: boolean;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadConfig
Method or attribute name: description?: string;
Initial version: 6|Class name: DownloadConfig
Method or attribute name: description?: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadConfig
Method or attribute name: networkType?: number;
Initial version: 6|Class name: DownloadConfig
Method or attribute name: networkType?: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadConfig
Method or attribute name: filePath?: string;
Initial version: 7|Class name: DownloadConfig
Method or attribute name: filePath?: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadConfig
Method or attribute name: title?: string;
Initial version: 6|Class name: DownloadConfig
Method or attribute name: title?: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadConfig
Method or attribute name: background?: boolean;
Initial version: 9|Class name: DownloadConfig
Method or attribute name: background?: boolean;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadInfo
Initial version: 7|Class name: DownloadInfo
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadInfo
Method or attribute name: description: string;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: description: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadInfo
Method or attribute name: downloadedBytes: number;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: downloadedBytes: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadInfo
Method or attribute name: downloadId: number;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: downloadId: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadInfo
Method or attribute name: failedReason: number;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: failedReason: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadInfo
Method or attribute name: fileName: string;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: fileName: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadInfo
Method or attribute name: filePath: string;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: filePath: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadInfo
Method or attribute name: pausedReason: number;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: pausedReason: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadInfo
Method or attribute name: status: number;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: status: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadInfo
Method or attribute name: targetURI: string;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: targetURI: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadInfo
Method or attribute name: downloadTitle: string;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: downloadTitle: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadInfo
Method or attribute name: downloadTotalBytes: number;
Initial version: 7|Class name: DownloadInfo
Method or attribute name: downloadTotalBytes: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Initial version: 6|Class name: DownloadTask
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: on(type: 'progress', callback: (receivedSize: number, totalSize: number) => void): void;
Initial version: 6|Class name: DownloadTask
Method or attribute name: on(type: 'progress', callback: (receivedSize: number, totalSize: number) => void): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: off(type: 'progress', callback?: (receivedSize: number, totalSize: number) => void): void;
Initial version: 6|Class name: DownloadTask
Method or attribute name: off(type: 'progress', callback?: (receivedSize: number, totalSize: number) => void): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: on(type: 'complete' \| 'pause' \| 'remove', callback: () => void): void;
Initial version: 7|Class name: DownloadTask
Method or attribute name: on(type: 'complete' \| 'pause' \| 'remove', callback: () => void): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: on(type: 'complete' \| 'pause' \| 'remove', callback: () => void): void;
Initial version: 7|Class name: DownloadTask
Method or attribute name: on(type: 'complete' \| 'pause' \| 'remove', callback: () => void): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: off(type: 'complete' \| 'pause' \| 'remove', callback?: () => void): void;
Initial version: 7|Class name: DownloadTask
Method or attribute name: off(type: 'complete' \| 'pause' \| 'remove', callback?: () => void): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: on(type: 'fail', callback: (err: number) => void): void;
Initial version: 7|Class name: DownloadTask
Method or attribute name: on(type: 'fail', callback: (err: number) => void): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: off(type: 'fail', callback?: (err: number) => void): void;
Initial version: 7|Class name: DownloadTask
Method or attribute name: off(type: 'fail', callback?: (err: number) => void): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: delete(callback: AsyncCallback\): void;
Initial version: 9|Class name: DownloadTask
Method or attribute name: delete(callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: delete(): Promise\;
Initial version: 9|Class name: DownloadTask
Method or attribute name: delete(): Promise\;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: suspend(callback: AsyncCallback\): void;
Initial version: 9|Class name: DownloadTask
Method or attribute name: suspend(callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: suspend(): Promise\;
Initial version: 9|Class name: DownloadTask
Method or attribute name: suspend(): Promise\;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: restore(callback: AsyncCallback\): void;
Initial version: 9|Class name: DownloadTask
Method or attribute name: restore(callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: restore(): Promise\;
Initial version: 9|Class name: DownloadTask
Method or attribute name: restore(): Promise\;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: getTaskInfo(callback: AsyncCallback\): void;
Initial version: 9|Class name: DownloadTask
Method or attribute name: getTaskInfo(callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: getTaskInfo(): Promise\;
Initial version: 9|Class name: DownloadTask
Method or attribute name: getTaskInfo(): Promise\;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: getTaskMimeType(callback: AsyncCallback\): void;
Initial version: 9|Class name: DownloadTask
Method or attribute name: getTaskMimeType(callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: DownloadTask
Method or attribute name: getTaskMimeType(): Promise\;
Initial version: 9|Class name: DownloadTask
Method or attribute name: getTaskMimeType(): Promise\;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: File
Initial version: 6|Class name: File
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: File
Method or attribute name: filename: string;
Initial version: 6|Class name: File
Method or attribute name: filename: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: File
Method or attribute name: name: string;
Initial version: 6|Class name: File
Method or attribute name: name: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: File
Method or attribute name: uri: string;
Initial version: 6|Class name: File
Method or attribute name: uri: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: File
Method or attribute name: type: string;
Initial version: 6|Class name: File
Method or attribute name: type: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: RequestData
Initial version: 6|Class name: RequestData
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: RequestData
Method or attribute name: name: string;
Initial version: 6|Class name: RequestData
Method or attribute name: name: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: RequestData
Method or attribute name: value: string;
Initial version: 6|Class name: RequestData
Method or attribute name: value: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: UploadConfig
Initial version: 6|Class name: UploadConfig
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: UploadConfig
Method or attribute name: url: string;
Initial version: 6|Class name: UploadConfig
Method or attribute name: url: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: UploadConfig
Method or attribute name: header: Object;
Initial version: 6|Class name: UploadConfig
Method or attribute name: header: Object;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: UploadConfig
Method or attribute name: method: string;
Initial version: 6|Class name: UploadConfig
Method or attribute name: method: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: UploadConfig
Method or attribute name: files: Array\;
Initial version: 6|Class name: UploadConfig
Method or attribute name: files: Array\;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: UploadConfig
Method or attribute name: data: Array\;
Initial version: 6|Class name: UploadConfig
Method or attribute name: data: Array\;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: TaskState
Initial version: 9|Class name: TaskState
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: TaskState
Method or attribute name: path: string;
Initial version: 9|Class name: TaskState
Method or attribute name: path: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: TaskState
Method or attribute name: responseCode: number;
Initial version: 9|Class name: TaskState
Method or attribute name: responseCode: number;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: TaskState
Method or attribute name: message: string;
Initial version: 9|Class name: TaskState
Method or attribute name: message: string;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: UploadTask
Initial version: 6|Class name: UploadTask
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: UploadTask
Method or attribute name: on(type: 'progress', callback: (uploadedSize: number, totalSize: number) => void): void;
Initial version: 6|Class name: UploadTask
Method or attribute name: on(type: 'progress', callback: (uploadedSize: number, totalSize: number) => void): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: UploadTask
Method or attribute name: off(type: 'progress', callback?: (uploadedSize: number, totalSize: number) => void): void;
Initial version: 6|Class name: UploadTask
Method or attribute name: off(type: 'progress', callback?: (uploadedSize: number, totalSize: number) => void): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: UploadTask
Method or attribute name: on(type: 'headerReceive', callback: (header: object) => void): void;
Initial version: 7|Class name: UploadTask
Method or attribute name: on(type: 'headerReceive', callback: (header: object) => void): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: UploadTask
Method or attribute name: off(type: 'headerReceive', callback?: (header: object) => void): void;
Initial version: 7|Class name: UploadTask
Method or attribute name: off(type: 'headerReceive', callback?: (header: object) => void): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: UploadTask
Method or attribute name: delete(callback: AsyncCallback\): void;
Initial version: 9|Class name: UploadTask
Method or attribute name: delete(callback: AsyncCallback\): void;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: UploadTask
Method or attribute name: delete(): Promise\;
Initial version: 9|Class name: UploadTask
Method or attribute name: delete(): Promise\;
Initial version: 10|@ohos.request.d.ts| -|Initial version changed|Class name: UploadResponse
Initial version: N/A|Class name: UploadResponse
Initial version: 3|@system.request.d.ts| -|Initial version changed|Class name: DownloadResponse
Initial version: N/A|Class name: DownloadResponse
Initial version: 3|@system.request.d.ts| -|Initial version changed|Class name: OnDownloadCompleteResponse
Initial version: N/A|Class name: OnDownloadCompleteResponse
Initial version: 3|@system.request.d.ts| -|Initial version changed|Class name: RequestFile
Initial version: N/A|Class name: RequestFile
Initial version: 3|@system.request.d.ts| -|Initial version changed|Class name: RequestData
Initial version: N/A|Class name: RequestData
Initial version: 3|@system.request.d.ts| -|Initial version changed|Class name: UploadRequestOptions
Initial version: N/A|Class name: UploadRequestOptions
Initial version: 3|@system.request.d.ts| -|Initial version changed|Class name: DownloadRequestOptions
Initial version: N/A|Class name: DownloadRequestOptions
Initial version: 3|@system.request.d.ts| -|Initial version changed|Class name: OnDownloadCompleteOptions
Initial version: N/A|Class name: OnDownloadCompleteOptions
Initial version: 3|@system.request.d.ts| -|Initial version changed|Class name: Request
Initial version: N/A|Class name: Request
Initial version: 3|@system.request.d.ts| -|Permission added|Class name: request
Method or attribute name: const EXCEPTION_PERMISSION: number;
Permission: N/A|Class name: request
Method or attribute name: const EXCEPTION_PERMISSION: number;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| -|Permission added|Class name: request
Method or attribute name: const EXCEPTION_PARAMCHECK: number;
Permission: N/A|Class name: request
Method or attribute name: const EXCEPTION_PARAMCHECK: number;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| -|Permission added|Class name: request
Method or attribute name: const EXCEPTION_UNSUPPORTED: number;
Permission: N/A|Class name: request
Method or attribute name: const EXCEPTION_UNSUPPORTED: number;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| -|Permission added|Class name: request
Method or attribute name: const EXCEPTION_FILEIO: number;
Permission: N/A|Class name: request
Method or attribute name: const EXCEPTION_FILEIO: number;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| -|Permission added|Class name: request
Method or attribute name: const EXCEPTION_FILEPATH: number;
Permission: N/A|Class name: request
Method or attribute name: const EXCEPTION_FILEPATH: number;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| -|Permission added|Class name: request
Method or attribute name: const EXCEPTION_SERVICE: number;
Permission: N/A|Class name: request
Method or attribute name: const EXCEPTION_SERVICE: number;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| -|Permission added|Class name: request
Method or attribute name: const EXCEPTION_OTHERS: number;
Permission: N/A|Class name: request
Method or attribute name: const EXCEPTION_OTHERS: number;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| -|Permission added|Class name: DownloadConfig
Method or attribute name: background?: boolean;
Permission: N/A|Class name: DownloadConfig
Method or attribute name: background?: boolean;
Permission: ohos.permission.INTERNET|@ohos.request.d.ts| |Permission added|Class name: screenLock
Method or attribute name: function lock(callback: AsyncCallback\): void;
Permission: N/A|Class name: screenLock
Method or attribute name: function lock(callback: AsyncCallback\): void;
Permission: ohos.permission.ACCESS_SCREEN_LOCK_INNER|@ohos.screenLock.d.ts| |Permission added|Class name: screenLock
Method or attribute name: function onSystemEvent(callback: Callback\): boolean;
Permission: N/A|Class name: screenLock
Method or attribute name: function onSystemEvent(callback: Callback\): boolean;
Permission: ohos.permission.ACCESS_SCREEN_LOCK_INNER|@ohos.screenLock.d.ts| |Permission added|Class name: screenLock
Method or attribute name: function sendScreenLockEvent(event: String, parameter: number, callback: AsyncCallback\): void;
Permission: N/A|Class name: screenLock
Method or attribute name: function sendScreenLockEvent(event: String, parameter: number, callback: AsyncCallback\): void;
Permission: ohos.permission.ACCESS_SCREEN_LOCK_INNER|@ohos.screenLock.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-multi-modal-input.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-multi-modal-input.md index 1eadca1eaec0dc0e7e6ba10b2291c0e9b230d389..55807266ea996913d0544e84aa821610d007470c 100644 --- a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-multi-modal-input.md +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-multi-modal-input.md @@ -21,10 +21,3 @@ |Added|NA|Module name: ohos.multimodalInput.shortKey
Class name: shortKey
Method or attribute name: function setKeyDownDuration(businessKey: string, delay: number, callback: AsyncCallback\): void;|@ohos.multimodalInput.shortKey.d.ts| |Added|NA|Module name: ohos.multimodalInput.shortKey
Class name: shortKey
Method or attribute name: function setKeyDownDuration(businessKey: string, delay: number): Promise\;|@ohos.multimodalInput.shortKey.d.ts| |Deleted|Module name: ohos.multimodalInput.inputDevice
Class name: AxisType
Method or attribute name: type AxisType = 'touchMajor' \| 'touchMinor' \| 'orientation' \| 'x' \| 'y' \| 'pressure' \| 'toolMinor' \| 'toolMajor' \| 'NULL';|NA|@ohos.multimodalInput.inputDevice.d.ts| -|Initial version changed|Class name: KeyOptions
Initial version: N/A|Class name: KeyOptions
Initial version: 8|@ohos.multimodalInput.inputConsumer.d.ts| -|Initial version changed|Class name: KeyOptions
Method or attribute name: preKeys: Array\;
Initial version: N/A|Class name: KeyOptions
Method or attribute name: preKeys: Array\;
Initial version: 8|@ohos.multimodalInput.inputConsumer.d.ts| -|Initial version changed|Class name: KeyOptions
Method or attribute name: finalKey: number;
Initial version: N/A|Class name: KeyOptions
Method or attribute name: finalKey: number;
Initial version: 8|@ohos.multimodalInput.inputConsumer.d.ts| -|Initial version changed|Class name: KeyOptions
Method or attribute name: isFinalKeyDown: boolean;
Initial version: N/A|Class name: KeyOptions
Method or attribute name: isFinalKeyDown: boolean;
Initial version: 8|@ohos.multimodalInput.inputConsumer.d.ts| -|Initial version changed|Class name: KeyOptions
Method or attribute name: finalKeyDownDuration: number;
Initial version: N/A|Class name: KeyOptions
Method or attribute name: finalKeyDownDuration: number;
Initial version: 8|@ohos.multimodalInput.inputConsumer.d.ts| -|Permission added|Class name: TouchEventReceiver
Permission: N/A|Class name: TouchEventReceiver
Permission: ohos.permission.INPUT_MONITORING|@ohos.multimodalInput.inputMonitor.d.ts| -|SysCap changed|Class name: inputDeviceCooperate
SysCap:N/A|Class name: inputDeviceCooperate
SysCap:SystemCapability.MultimodalInput.Input.Cooperator|@ohos.multimodalInput.inputDeviceCooperate.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-multimedia.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-multimedia.md index 1754623d3d8b252f0f98e706dfb3f97458c3fd02..c1f80fec6864be7946a772ee951a283019fe3ac1 100644 --- a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-multimedia.md +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-multimedia.md @@ -129,9 +129,10 @@ |Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: release(callback: AsyncCallback\): void;|ringtonePlayer.d.ts| |Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: release(): Promise\;|ringtonePlayer.d.ts| |Added|NA|Module name: ringtonePlayer
Class name: RingtonePlayer
Method or attribute name: on(type: 'audioInterrupt', callback: Callback\): void;|ringtonePlayer.d.ts| -|Access level changed|Class name: VolumeEvent
Access level: public API|Class name: VolumeEvent
Access level: system API|@ohos.multimedia.audio.d.ts| -|Access level changed|Class name: VolumeEvent
Method or attribute name: volumeGroupId: number;
Access level: system API|Class name: VolumeEvent
Method or attribute name: volumeGroupId: number;
Access level: public API|@ohos.multimedia.audio.d.ts| -|Access level changed|Class name: VolumeEvent
Method or attribute name: networkId: string;
Access level: system API|Class name: VolumeEvent
Method or attribute name: networkId: string;
Access level: public API|@ohos.multimedia.audio.d.ts| +|Access level changed|Class name: VolumeEvent
Access level: public API|Class name: VolumeEvent
Access level: system API|@ohos.multimedia.audio.d.ts| +|Access level changed|Class name: VolumeEvent
Method or attribute name: volumeType: AudioVolumeType;;
Access level: public API|Class name: VolumeEvent
Method or attribute name: volumeType: AudioVolumeType;;
Access level: system API|@ohos.multimedia.audio.d.ts| +|Access level changed|Class name: VolumeEvent
Method or attribute name: volume: number;
Access level: public API|Class name: VolumeEvent
Method or attribute name: volume: number;
Access level: system API|@ohos.multimedia.audio.d.ts| +|Access level changed|Class name: VolumeEvent
Method or attribute name: updateUi: boolean;
Access level: public API|Class name: VolumeEvent
Method or attribute name: updateUi: boolean;;
Access level: system API|@ohos.multimedia.audio.d.ts| |Access level changed|Class name: AVSessionType
Method or attribute name: type AVSessionType = 'audio' \| 'video';
Access level: system API|Class name: AVSessionType
Method or attribute name: type AVSessionType = 'audio' \| 'video';
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void;
Access level: system API|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType): Promise\;
Access level: system API|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| @@ -167,11 +168,48 @@ |Access level changed|Class name: AVSession
Method or attribute name: destroy(callback: AsyncCallback\): void;
Access level: system API|Class name: AVSession
Method or attribute name: destroy(callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: AVSession
Method or attribute name: destroy(): Promise\;
Access level: system API|Class name: AVSession
Method or attribute name: destroy(): Promise\;
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: AVMetadata
Access level: system API|Class name: AVMetadata
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: assetId: string;
Access level: system API|Class name: AVMetadata
Method or attribute name: assetId: string;;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: title?: string;
Access level: system API|Class name: AVMetadata
Method or attribute name: title?: string;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: artist?: string;
Access level: system API|Class name: AVMetadata
Method or attribute name: artist?: string;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: author?: string;
Access level: system API|Class name: AVMetadata
Method or attribute name: author?: string;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: album?: string;
Access level: system API|Class name: AVMetadata
Method or attribute name: album?: string;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: writer?: string;
Access level: system API|Class name: AVMetadata
Method or attribute name: writer?: string;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: composer?: string;
Access level: system API|Class name: AVMetadata
Method or attribute name: composer?: string;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: duration?: number;
Access level: system API|Class name: AVMetadata
Method or attribute name: duration?: number;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: mediaImage?: image.PixelMap \|string;;
Access level: system API|Class name: AVMetadata
Method or attribute name: mediaImage?: image.PixelMap \|string;;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: publishDate?: Date;
Access level: system API|Class name: AVMetadata
Method or attribute name: publishDate?: Date;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: subtitle?: string;
Access level: system API|Class name: AVMetadata
Method or attribute name: subtitle?: string;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: description?: string;
Access level: system API|Class name: AVMetadata
Method or attribute name: description?: string;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: lyric?: string;
Access level: system API|Class name: AVMetadata
Method or attribute name: lyric?: string;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: previousAssetId?: string;
Access level: system API|Class name: AVMetadata
Method or attribute name: previousAssetId?: string;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVMetadata
Method or attribute name: nextAssetId?: string;
Access level: system API|Class name: AVMetadata
Method or attribute name: nextAssetId?: string;
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: AVPlaybackState
Access level: system API|Class name: AVPlaybackState
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVPlaybackState
Method or attribute name: state?: PlaybackState;
Access level: system API|Class name: AVPlaybackState
Method or attribute name: state?: PlaybackState;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVPlaybackState
Method or attribute name: speed?: number;
Access level: system API|Class name: AVPlaybackState
Method or attribute name: speed?: number;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVPlaybackState
Method or attribute name: position?: PlaybackPosition;
Access level: system API|Class name: AVPlaybackState
Method or attribute name: position?: PlaybackPosition;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVPlaybackState
Method or attribute name: bufferedTime?: number;
Access level: system API|Class name: AVPlaybackState
Method or attribute name: bufferedTime?: number;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVPlaybackState
Method or attribute name: loopMode?: LoopMode;
Access level: system API|Class name: AVPlaybackState
Method or attribute name: loopMode?: LoopMode;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVPlaybackState
Method or attribute name: isFavorite?: boolean;
Access level: system API|Class name: AVPlaybackState
Method or attribute name: isFavorite?: boolean;
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: PlaybackPosition
Access level: system API|Class name: PlaybackPosition
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: PlaybackPosition
Method or attribute name: elapsedTime: number;
Access level: system API|Class name: PlaybackPosition
Method or attribute name: elapsedTime: number;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: PlaybackPosition
Method or attribute name: updateTime: number;
Access level: system API|Class name: PlaybackPosition
Method or attribute name: updateTime: number;
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: OutputDeviceInfo
Access level: system API|Class name: OutputDeviceInfo
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: OutputDeviceInfo
Method or attribute name: isRemote: boolean;
Access level: system API|Class name: OutputDeviceInfo
Method or attribute name: isRemote: boolean;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: OutputDeviceInfo
Method or attribute name: audioDeviceId: Array\;
Access level: system API|Class name: OutputDeviceInfo
Method or attribute name: audioDeviceId: Array\;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: OutputDeviceInfo
Method or attribute name: deviceName: Array\;
Access level: system API|Class name: OutputDeviceInfo
Method or attribute name: deviceName: Array\;
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: LoopMode
Access level: system API|Class name: LoopMode
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: LoopMode
Method or attribute name: LOOP_MODE_SEQUENCE = 0,
Access level: system API|Class name: LoopMode
Method or attribute name: LOOP_MODE_SEQUENCE = 0,;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: LoopMode
Method or attribute name: LOOP_MODE_SINGLE = 1,
Access level: system API|Class name: LoopMode
Method or attribute name: LOOP_MODE_SINGLE = 1,
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: LoopMode
Method or attribute name: LOOP_MODE_LIST = 2,
Access level: system API|Class name: LoopMode
Method or attribute name: LOOP_MODE_LIST = 2,;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: LoopMode
Method or attribute name: LOOP_MODE_SHUFFLE = 3,
Access level: system API|Class name: LoopMode
Method or attribute name: LOOP_MODE_SHUFFLE = 3,
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: PlaybackState
Access level: system API|Class name: PlaybackState
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_INITIAL = 0
Access level: system API|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_INITIAL = 0
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PREPARE = 1
Access level: system API|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PREPARE = 1
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PLAY = 2
Access level: system API|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PLAY = 2
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PAUSE = 3
Access level: system API|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PAUSE = 3
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_FAST_FORWARD = 4
Access level: system API|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_FAST_FORWARD = 4
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_REWIND = 5
Access level: system API|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_REWIND = 5
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_STOP = 6
Access level: system API|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_STOP = 6
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: AVSessionController
Access level: system API|Class name: AVSessionController
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: AVSessionController
Method or attribute name: readonly sessionId: string;
Access level: system API|Class name: AVSessionController
Method or attribute name: readonly sessionId: string;
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: AVSessionController
Method or attribute name: getAVPlaybackState(callback: AsyncCallback\): void;
Access level: system API|Class name: AVSessionController
Method or attribute name: getAVPlaybackState(callback: AsyncCallback\): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| @@ -206,131 +244,15 @@ |Access level changed|Class name: AVSessionController
Method or attribute name: on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
Access level: system API|Class name: AVSessionController
Method or attribute name: on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: AVSessionController
Method or attribute name: off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
Access level: system API|Class name: AVSessionController
Method or attribute name: off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: AVControlCommand
Access level: system API|Class name: AVControlCommand
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVControlCommand
Method or attribute name: command: AVControlCommandType;
Access level: system API|Class name: AVControlCommand
Method or attribute name: command: AVControlCommandType;
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVControlCommand
Method or attribute name: parameter?: LoopMode \|string\|number;
Access level: system API|Class name: AVControlCommand
Method or attribute name: parameter?: LoopMode \|string\|number;
Access level: public API|@ohos.multimedia.avsession.d.ts| |Access level changed|Class name: AVSessionErrorCode
Access level: system API|Class name: AVSessionErrorCode
Access level: public API|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AudioManager
Method or attribute name: on(type: 'volumeChange', callback: Callback\): void;
Initial version: 9|Class name: AudioManager
Method or attribute name: on(type: 'volumeChange', callback: Callback\): void;
Initial version: 8|@ohos.multimedia.audio.d.ts| -|Initial version changed|Class name: VolumeEvent
Initial version: 9|Class name: VolumeEvent
Initial version: 8|@ohos.multimedia.audio.d.ts| -|Initial version changed|Class name: VolumeEvent
Method or attribute name: volumeType: AudioVolumeType;
Initial version: 9|Class name: VolumeEvent
Method or attribute name: volumeType: AudioVolumeType;
Initial version: 8|@ohos.multimedia.audio.d.ts| -|Initial version changed|Class name: VolumeEvent
Method or attribute name: volume: number;
Initial version: 9|Class name: VolumeEvent
Method or attribute name: volume: number;
Initial version: 8|@ohos.multimedia.audio.d.ts| -|Initial version changed|Class name: VolumeEvent
Method or attribute name: updateUi: boolean;
Initial version: 9|Class name: VolumeEvent
Method or attribute name: updateUi: boolean;
Initial version: 8|@ohos.multimedia.audio.d.ts| -|Initial version changed|Class name: AVSessionType
Method or attribute name: type AVSessionType = 'audio' \| 'video';
Initial version: 9|Class name: AVSessionType
Method or attribute name: type AVSessionType = 'audio' \| 'video';
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void;
Initial version: 9|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType, callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType): Promise\;
Initial version: 9|Class name: avSession
Method or attribute name: function createAVSession(context: Context, tag: string, type: AVSessionType): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Initial version: 9|Class name: AVSession
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: readonly sessionId: string;
Initial version: 9|Class name: AVSession
Method or attribute name: readonly sessionId: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: setAVMetadata(data: AVMetadata, callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: setAVMetadata(data: AVMetadata, callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: setAVMetadata(data: AVMetadata): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: setAVMetadata(data: AVMetadata): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: setAVPlaybackState(state: AVPlaybackState, callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: setAVPlaybackState(state: AVPlaybackState): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: setAVPlaybackState(state: AVPlaybackState): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: setLaunchAbility(ability: WantAgent, callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: setLaunchAbility(ability: WantAgent, callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: setLaunchAbility(ability: WantAgent): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: setLaunchAbility(ability: WantAgent): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: getController(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: getController(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: getController(): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: getController(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: getOutputDevice(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: getOutputDevice(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: getOutputDevice(): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: getOutputDevice(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: on(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback: () => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: on(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback: () => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: off(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback?: () => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: off(type: 'play' \| 'pause' \| 'stop' \| 'playNext' \| 'playPrevious' \| 'fastForward' \| 'rewind', callback?: () => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: on(type: 'seek', callback: (time: number) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: on(type: 'seek', callback: (time: number) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: off(type: 'seek', callback?: (time: number) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: off(type: 'seek', callback?: (time: number) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: on(type: 'setSpeed', callback: (speed: number) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: on(type: 'setSpeed', callback: (speed: number) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: off(type: 'setSpeed', callback?: (speed: number) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: off(type: 'setSpeed', callback?: (speed: number) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: on(type: 'setLoopMode', callback: (mode: LoopMode) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: on(type: 'setLoopMode', callback: (mode: LoopMode) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: off(type: 'setLoopMode', callback?: (mode: LoopMode) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: on(type: 'toggleFavorite', callback: (assetId: string) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: on(type: 'toggleFavorite', callback: (assetId: string) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: off(type: 'toggleFavorite', callback?: (assetId: string) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: off(type: 'toggleFavorite', callback?: (assetId: string) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: on(type: 'handleKeyEvent', callback: (event: KeyEvent) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: on(type: 'handleKeyEvent', callback: (event: KeyEvent) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: off(type: 'handleKeyEvent', callback?: (event: KeyEvent) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
Initial version: 9|Class name: AVSession
Method or attribute name: off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: activate(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: activate(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: activate(): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: activate(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: deactivate(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: deactivate(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: deactivate(): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: deactivate(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: destroy(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSession
Method or attribute name: destroy(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSession
Method or attribute name: destroy(): Promise\;
Initial version: 9|Class name: AVSession
Method or attribute name: destroy(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Initial version: 9|Class name: AVMetadata
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: assetId: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: assetId: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: title?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: title?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: artist?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: artist?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: author?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: author?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: album?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: album?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: writer?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: writer?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: composer?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: composer?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: duration?: number;
Initial version: 9|Class name: AVMetadata
Method or attribute name: duration?: number;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: mediaImage?: image.PixelMap \| string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: mediaImage?: image.PixelMap \| string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: publishDate?: Date;
Initial version: 9|Class name: AVMetadata
Method or attribute name: publishDate?: Date;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: subtitle?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: subtitle?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: description?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: description?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: lyric?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: lyric?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: previousAssetId?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: previousAssetId?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVMetadata
Method or attribute name: nextAssetId?: string;
Initial version: 9|Class name: AVMetadata
Method or attribute name: nextAssetId?: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVPlaybackState
Initial version: 9|Class name: AVPlaybackState
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVPlaybackState
Method or attribute name: state?: PlaybackState;
Initial version: 9|Class name: AVPlaybackState
Method or attribute name: state?: PlaybackState;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVPlaybackState
Method or attribute name: speed?: number;
Initial version: 9|Class name: AVPlaybackState
Method or attribute name: speed?: number;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVPlaybackState
Method or attribute name: position?: PlaybackPosition;
Initial version: 9|Class name: AVPlaybackState
Method or attribute name: position?: PlaybackPosition;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVPlaybackState
Method or attribute name: bufferedTime?: number;
Initial version: 9|Class name: AVPlaybackState
Method or attribute name: bufferedTime?: number;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVPlaybackState
Method or attribute name: loopMode?: LoopMode;
Initial version: 9|Class name: AVPlaybackState
Method or attribute name: loopMode?: LoopMode;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVPlaybackState
Method or attribute name: isFavorite?: boolean;
Initial version: 9|Class name: AVPlaybackState
Method or attribute name: isFavorite?: boolean;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: PlaybackPosition
Initial version: 9|Class name: PlaybackPosition
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: PlaybackPosition
Method or attribute name: elapsedTime: number;
Initial version: 9|Class name: PlaybackPosition
Method or attribute name: elapsedTime: number;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: PlaybackPosition
Method or attribute name: updateTime: number;
Initial version: 9|Class name: PlaybackPosition
Method or attribute name: updateTime: number;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: OutputDeviceInfo
Initial version: 9|Class name: OutputDeviceInfo
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: OutputDeviceInfo
Method or attribute name: isRemote: boolean;
Initial version: 9|Class name: OutputDeviceInfo
Method or attribute name: isRemote: boolean;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: OutputDeviceInfo
Method or attribute name: audioDeviceId: Array\;
Initial version: 9|Class name: OutputDeviceInfo
Method or attribute name: audioDeviceId: Array\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: OutputDeviceInfo
Method or attribute name: deviceName: Array\;
Initial version: 9|Class name: OutputDeviceInfo
Method or attribute name: deviceName: Array\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: LoopMode
Initial version: 9|Class name: LoopMode
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: LoopMode
Method or attribute name: LOOP_MODE_SEQUENCE = 0
Initial version: 9|Class name: LoopMode
Method or attribute name: LOOP_MODE_SEQUENCE = 0
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: LoopMode
Method or attribute name: LOOP_MODE_SINGLE = 1
Initial version: 9|Class name: LoopMode
Method or attribute name: LOOP_MODE_SINGLE = 1
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: LoopMode
Method or attribute name: LOOP_MODE_LIST = 2
Initial version: 9|Class name: LoopMode
Method or attribute name: LOOP_MODE_LIST = 2
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: LoopMode
Method or attribute name: LOOP_MODE_SHUFFLE = 3
Initial version: 9|Class name: LoopMode
Method or attribute name: LOOP_MODE_SHUFFLE = 3
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: PlaybackState
Initial version: 9|Class name: PlaybackState
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_INITIAL = 0
Initial version: 9|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_INITIAL = 0
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PREPARE = 1
Initial version: 9|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PREPARE = 1
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PLAY = 2
Initial version: 9|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PLAY = 2
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PAUSE = 3
Initial version: 9|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_PAUSE = 3
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_FAST_FORWARD = 4
Initial version: 9|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_FAST_FORWARD = 4
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_REWIND = 5
Initial version: 9|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_REWIND = 5
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_STOP = 6
Initial version: 9|Class name: PlaybackState
Method or attribute name: PLAYBACK_STATE_STOP = 6
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Initial version: 9|Class name: AVSessionController
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: readonly sessionId: string;
Initial version: 9|Class name: AVSessionController
Method or attribute name: readonly sessionId: string;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: getAVPlaybackState(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getAVPlaybackState(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: getAVPlaybackState(): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getAVPlaybackState(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: getAVMetadata(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getAVMetadata(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: getAVMetadata(): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getAVMetadata(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: getOutputDevice(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getOutputDevice(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: getOutputDevice(): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getOutputDevice(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: sendAVKeyEvent(event: KeyEvent, callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: sendAVKeyEvent(event: KeyEvent): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: sendAVKeyEvent(event: KeyEvent): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: getLaunchAbility(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getLaunchAbility(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: getLaunchAbility(): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getLaunchAbility(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: getRealPlaybackPositionSync(): number;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getRealPlaybackPositionSync(): number;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: isActive(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: isActive(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: isActive(): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: isActive(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: destroy(callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: destroy(callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: destroy(): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: destroy(): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: getValidCommands(callback: AsyncCallback\>): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getValidCommands(callback: AsyncCallback\>): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: getValidCommands(): Promise\>;
Initial version: 9|Class name: AVSessionController
Method or attribute name: getValidCommands(): Promise\>;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: sendControlCommand(command: AVControlCommand, callback: AsyncCallback\): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: sendControlCommand(command: AVControlCommand, callback: AsyncCallback\): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: sendControlCommand(command: AVControlCommand): Promise\;
Initial version: 9|Class name: AVSessionController
Method or attribute name: sendControlCommand(command: AVControlCommand): Promise\;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: on(type: 'metadataChange', filter: Array\ \| 'all', callback: (data: AVMetadata) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: on(type: 'metadataChange', filter: Array\ \| 'all', callback: (data: AVMetadata) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: off(type: 'metadataChange', callback?: (data: AVMetadata) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: off(type: 'metadataChange', callback?: (data: AVMetadata) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: on(type: 'playbackStateChange', filter: Array\ \| 'all', callback: (state: AVPlaybackState) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: on(type: 'playbackStateChange', filter: Array\ \| 'all', callback: (state: AVPlaybackState) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: off(type: 'playbackStateChange', callback?: (state: AVPlaybackState) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: on(type: 'sessionDestroy', callback: () => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: on(type: 'sessionDestroy', callback: () => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: off(type: 'sessionDestroy', callback?: () => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: off(type: 'sessionDestroy', callback?: () => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: on(type: 'activeStateChange', callback: (isActive: boolean) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: on(type: 'activeStateChange', callback: (isActive: boolean) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: off(type: 'activeStateChange', callback?: (isActive: boolean) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: off(type: 'activeStateChange', callback?: (isActive: boolean) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: on(type: 'validCommandChange', callback: (commands: Array\) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: on(type: 'validCommandChange', callback: (commands: Array\) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: off(type: 'validCommandChange', callback?: (commands: Array\) => void);
Initial version: 9|Class name: AVSessionController
Method or attribute name: off(type: 'validCommandChange', callback?: (commands: Array\) => void);
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: on(type: 'outputDeviceChange', callback: (device: OutputDeviceInfo) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionController
Method or attribute name: off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
Initial version: 9|Class name: AVSessionController
Method or attribute name: off(type: 'outputDeviceChange', callback?: (device: OutputDeviceInfo) => void): void;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVControlCommand
Initial version: 9|Class name: AVControlCommand
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVControlCommand
Method or attribute name: command: AVControlCommandType;
Initial version: 9|Class name: AVControlCommand
Method or attribute name: command: AVControlCommandType;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVControlCommand
Method or attribute name: parameter?: LoopMode \| string \| number;
Initial version: 9|Class name: AVControlCommand
Method or attribute name: parameter?: LoopMode \| string \| number;
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionErrorCode
Initial version: 9|Class name: AVSessionErrorCode
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SERVICE_EXCEPTION = 6600101
Initial version: 9|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SERVICE_EXCEPTION = 6600101
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_NOT_EXIST = 6600102
Initial version: 9|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_NOT_EXIST = 6600102
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_CONTROLLER_NOT_EXIST = 6600103
Initial version: 9|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_CONTROLLER_NOT_EXIST = 6600103
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_REMOTE_CONNECTION_ERR = 6600104
Initial version: 9|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_REMOTE_CONNECTION_ERR = 6600104
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_COMMAND_INVALID = 6600105
Initial version: 9|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_COMMAND_INVALID = 6600105
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_INACTIVE = 6600106
Initial version: 9|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_INACTIVE = 6600106
Initial version: 10|@ohos.multimedia.avsession.d.ts| -|Initial version changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_MESSAGE_OVERLOAD = 6600107
Initial version: 9|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_MESSAGE_OVERLOAD = 6600107
Initial version: 10|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SERVICE_EXCEPTION = 6600101
Access level: system API|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SERVICE_EXCEPTION = 6600101,
Access level: public API|@ohos.multimedia.avsession.d.ts| +|Access level changed|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_NOT_EXIST = 6600102
Access level: system API|Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_NOT_EXIST = 6600102
Access level: public API|@ohos.multimedia.avsession.d.ts| +| Access level changed | Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_NOT_EXIST = 6600102
Access level: system API | Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_NOT_EXIST = 6600102
Access level: public API | @ohos.multimedia.avsession.d.ts | +| Access level changed | Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_CONTROLLER_NOT_EXIST = 6600103
Access level: system API | Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_NOT_EXIST = 6600103
Access level: public API | @ohos.multimedia.avsession.d.ts | +| Access level changed | Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_REMOTE_CONNECTION_ERR = 6600104
Access level: system API | Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_REMOTE_CONNECTION_ERR = 6600104
Access level: public API | @ohos.multimedia.avsession.d.ts | +| Access level changed | Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_COMMAND_INVALID = 6600105
Access level: system API | Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_COMMAND_INVALID = 6600105
Access level: public API | @ohos.multimedia.avsession.d.ts | +| Access level changed | Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_INACTIVE = 6600106
Access level: system API | Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_SESSION_INACTIVE = 6600106
Access level: public API | @ohos.multimedia.avsession.d.ts | +| Access level changed | Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_MESSAGE_OVERLOAD = 6600107
Access level: system API | Class name: AVSessionErrorCode
Method or attribute name: ERR_CODE_MESSAGE_OVERLOAD = 6600107
Access level: public API | @ohos.multimedia.avsession.d.ts | + diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-security.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-security.md index b7638558713b2daa36bc50371abfaf6f9274076f..075058726f29d8b60639c103d9649d2de59b65ac 100644 --- a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-security.md +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-security.md @@ -11,18 +11,4 @@ |Added|NA|Module name: ohos.security.huks
Class name: HuksTag
Method or attribute name: HUKS_TAG_KEY_AUTH_PURPOSE = HuksTagType.HUKS_TAG_TYPE_UINT \| 311|@ohos.security.huks.d.ts| |Deprecated version changed|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_TEMP = 0
Deprecated version: N/A|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_TEMP = 0
Deprecated version: 10
Substitute API: N/A|@ohos.security.huks.d.ts| |Deprecated version changed|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_PERSISTENT = 1
Deprecated version: N/A|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_PERSISTENT = 1
Deprecated version: 10
Substitute API: N/A|@ohos.security.huks.d.ts| -|Initial version changed|Class name: abilityAccessCtrl
Initial version: N/A|Class name: abilityAccessCtrl
Initial version: 8|@ohos.abilityAccessCtrl.d.ts| -|Initial version changed|Class name: abilityAccessCtrl
Method or attribute name: function createAtManager(): AtManager;
Initial version: 8|Class name: abilityAccessCtrl
Method or attribute name: function createAtManager(): AtManager;
Initial version: 10|@ohos.abilityAccessCtrl.d.ts| -|Initial version changed|Class name: AtManager
Initial version: N/A|Class name: AtManager
Initial version: 8|@ohos.abilityAccessCtrl.d.ts| -|Initial version changed|Class name: AtManager
Method or attribute name: checkAccessToken(tokenID: number, permissionName: Permissions): Promise\;
Initial version: 9|Class name: AtManager
Method or attribute name: checkAccessToken(tokenID: number, permissionName: Permissions): Promise\;
Initial version: 10|@ohos.abilityAccessCtrl.d.ts| -|Initial version changed|Class name: GrantStatus
Initial version: 8|Class name: GrantStatus
Initial version: 10|@ohos.abilityAccessCtrl.d.ts| -|Initial version changed|Class name: GrantStatus
Method or attribute name: PERMISSION_DENIED = -1
Initial version: N/A|Class name: GrantStatus
Method or attribute name: PERMISSION_DENIED = -1
Initial version: 10|@ohos.abilityAccessCtrl.d.ts| -|Initial version changed|Class name: GrantStatus
Method or attribute name: PERMISSION_GRANTED = 0
Initial version: N/A|Class name: GrantStatus
Method or attribute name: PERMISSION_GRANTED = 0
Initial version: 10|@ohos.abilityAccessCtrl.d.ts| -|Initial version changed|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_TEMP = 0
Initial version: N/A|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_TEMP = 0
Initial version: 8|@ohos.security.huks.d.ts| -|Initial version changed|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_PERSISTENT = 1
Initial version: N/A|Class name: HuksKeyStorageType
Method or attribute name: HUKS_STORAGE_PERSISTENT = 1
Initial version: 8|@ohos.security.huks.d.ts| -|Initial version changed|Class name: Cipher
Method or attribute name: static rsa(options: CipherRsaOptions): void;
Initial version: N/A|Class name: Cipher
Method or attribute name: static rsa(options: CipherRsaOptions): void;
Initial version: 3|@system.cipher.d.ts| -|Initial version changed|Class name: Cipher
Method or attribute name: static aes(options: CipherAesOptions): void;
Initial version: N/A|Class name: Cipher
Method or attribute name: static aes(options: CipherAesOptions): void;
Initial version: 3|@system.cipher.d.ts| -|Initial version changed|Class name: PermissionRequestResult
Initial version: 9|Class name: PermissionRequestResult
Initial version: 10|PermissionRequestResult.d.ts| -|Initial version changed|Class name: PermissionRequestResult
Method or attribute name: permissions: Array\;
Initial version: 9|Class name: PermissionRequestResult
Method or attribute name: permissions: Array\;
Initial version: 10|PermissionRequestResult.d.ts| -|Initial version changed|Class name: PermissionRequestResult
Method or attribute name: authResults: Array\;
Initial version: 9|Class name: PermissionRequestResult
Method or attribute name: authResults: Array\;
Initial version: 10|PermissionRequestResult.d.ts| |Error code added|NA|Class name: AtManager
Method or attribute name: getVersion(): Promise\;
Error code: 202|@ohos.abilityAccessCtrl.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-sensor.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-sensor.md index 60dd3d2f9dc8543e3ee14d48296c90bbd2a77ddd..6ee63b7238d1858e0f2d2e433c665da77db94038 100644 --- a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-sensor.md +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-sensor.md @@ -8,21 +8,3 @@ |Added|NA|Class name: vibrator
Method or attribute name: function isSupportEffect(effectId: string, callback: AsyncCallback\): void;|@ohos.vibrator.d.ts| |Added|NA|Module name: ohos.vibrator
Class name: vibrator
Method or attribute name: function isSupportEffect(effectId: string): Promise\;|@ohos.vibrator.d.ts| |Added|NA|Class name: vibrator
Method or attribute name: function isSupportEffect(effectId: string): Promise\;|@ohos.vibrator.d.ts| -|Permission added|Class name: AccelerometerResponse
Method or attribute name: x: number;
Permission: N/A|Class name: AccelerometerResponse
Method or attribute name: x: number;
Permission: ohos.permission.ACCELEROMETER|@system.sensor.d.ts| -|Permission added|Class name: AccelerometerResponse
Method or attribute name: y: number;
Permission: N/A|Class name: AccelerometerResponse
Method or attribute name: y: number;
Permission: ohos.permission.ACCELEROMETER|@system.sensor.d.ts| -|Permission added|Class name: AccelerometerResponse
Method or attribute name: z: number;
Permission: N/A|Class name: AccelerometerResponse
Method or attribute name: z: number;
Permission: ohos.permission.ACCELEROMETER|@system.sensor.d.ts| -|Permission added|Class name: subscribeAccelerometerOptions
Method or attribute name: interval: string;
Permission: N/A|Class name: subscribeAccelerometerOptions
Method or attribute name: interval: string;
Permission: ohos.permission.ACCELEROMETER|@system.sensor.d.ts| -|Permission added|Class name: subscribeAccelerometerOptions
Method or attribute name: success: (data: AccelerometerResponse) => void;
Permission: N/A|Class name: subscribeAccelerometerOptions
Method or attribute name: success: (data: AccelerometerResponse) => void;
Permission: ohos.permission.ACCELEROMETER|@system.sensor.d.ts| -|Permission added|Class name: subscribeAccelerometerOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: N/A|Class name: subscribeAccelerometerOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: ohos.permission.ACCELEROMETER|@system.sensor.d.ts| -|Permission added|Class name: StepCounterResponse
Method or attribute name: steps: number;
Permission: N/A|Class name: StepCounterResponse
Method or attribute name: steps: number;
Permission: ohos.permission.ACTIVITY_MOTION|@system.sensor.d.ts| -|Permission added|Class name: SubscribeStepCounterOptions
Method or attribute name: success: (data: StepCounterResponse) => void;
Permission: N/A|Class name: SubscribeStepCounterOptions
Method or attribute name: success: (data: StepCounterResponse) => void;
Permission: ohos.permission.ACTIVITY_MOTION|@system.sensor.d.ts| -|Permission added|Class name: SubscribeStepCounterOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: N/A|Class name: SubscribeStepCounterOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: ohos.permission.ACTIVITY_MOTION|@system.sensor.d.ts| -|Permission added|Class name: HeartRateResponse
Method or attribute name: heartRate: number;
Permission: N/A|Class name: HeartRateResponse
Method or attribute name: heartRate: number;
Permission: ohos.permission.READ_HEALTH_DATA|@system.sensor.d.ts| -|Permission added|Class name: SubscribeHeartRateOptions
Method or attribute name: success: (data: HeartRateResponse) => void;
Permission: N/A|Class name: SubscribeHeartRateOptions
Method or attribute name: success: (data: HeartRateResponse) => void;
Permission: ohos.permission.READ_HEALTH_DATA|@system.sensor.d.ts| -|Permission added|Class name: SubscribeHeartRateOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: N/A|Class name: SubscribeHeartRateOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: ohos.permission.READ_HEALTH_DATA|@system.sensor.d.ts| -|Permission added|Class name: GyroscopeResponse
Method or attribute name: x: number;
Permission: N/A|Class name: GyroscopeResponse
Method or attribute name: x: number;
Permission: ohos.permission.GYROSCOPE|@system.sensor.d.ts| -|Permission added|Class name: GyroscopeResponse
Method or attribute name: y: number;
Permission: N/A|Class name: GyroscopeResponse
Method or attribute name: y: number;
Permission: ohos.permission.GYROSCOPE|@system.sensor.d.ts| -|Permission added|Class name: GyroscopeResponse
Method or attribute name: z: number;
Permission: N/A|Class name: GyroscopeResponse
Method or attribute name: z: number;
Permission: ohos.permission.GYROSCOPE|@system.sensor.d.ts| -|Permission added|Class name: SubscribeGyroscopeOptions
Method or attribute name: interval: string;
Permission: N/A|Class name: SubscribeGyroscopeOptions
Method or attribute name: interval: string;
Permission: ohos.permission.GYROSCOPE|@system.sensor.d.ts| -|Permission added|Class name: SubscribeGyroscopeOptions
Method or attribute name: success: (data: GyroscopeResponse) => void;
Permission: N/A|Class name: SubscribeGyroscopeOptions
Method or attribute name: success: (data: GyroscopeResponse) => void;
Permission: ohos.permission.GYROSCOPE|@system.sensor.d.ts| -|Permission added|Class name: SubscribeGyroscopeOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: N/A|Class name: SubscribeGyroscopeOptions
Method or attribute name: fail?: (data: string, code: number) => void;
Permission: ohos.permission.GYROSCOPE|@system.sensor.d.ts| diff --git a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-update.md b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-update.md index 7618e4b4a0d3c29c8d5131a82804c6718337ddbc..18220fe9cda3dad13e3aedb74ae0c927e6c41260 100644 --- a/en/release-notes/api-diff/v4.0-beta1/js-apidiff-update.md +++ b/en/release-notes/api-diff/v4.0-beta1/js-apidiff-update.md @@ -3,141 +3,3 @@ |Added|NA|Class name: BusinessVendor
Method or attribute name: PUBLIC = 'public'|@ohos.update.d.ts| |Added|NA|Class name: UpgradeAction
Method or attribute name: UPGRADE = 'upgrade'|@ohos.update.d.ts| |Added|NA|Class name: UpgradeAction
Method or attribute name: RECOVERY = 'recovery'|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeInfo
Access level: public API|Class name: UpgradeInfo
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeInfo
Method or attribute name: upgradeApp: string;
Access level: public API|Class name: UpgradeInfo
Method or attribute name: upgradeApp: string;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeInfo
Method or attribute name: businessType: BusinessType;
Access level: public API|Class name: UpgradeInfo
Method or attribute name: businessType: BusinessType;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: BusinessType
Access level: public API|Class name: BusinessType
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: BusinessType
Method or attribute name: vendor: BusinessVendor;
Access level: public API|Class name: BusinessType
Method or attribute name: vendor: BusinessVendor;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: BusinessType
Method or attribute name: subType: BusinessSubType;
Access level: public API|Class name: BusinessType
Method or attribute name: subType: BusinessSubType;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: CheckResult
Access level: public API|Class name: CheckResult
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: CheckResult
Method or attribute name: isExistNewVersion: boolean;
Access level: public API|Class name: CheckResult
Method or attribute name: isExistNewVersion: boolean;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: CheckResult
Method or attribute name: newVersionInfo: NewVersionInfo;
Access level: public API|Class name: CheckResult
Method or attribute name: newVersionInfo: NewVersionInfo;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: NewVersionInfo
Access level: public API|Class name: NewVersionInfo
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: NewVersionInfo
Method or attribute name: versionDigestInfo: VersionDigestInfo;
Access level: public API|Class name: NewVersionInfo
Method or attribute name: versionDigestInfo: VersionDigestInfo;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: NewVersionInfo
Method or attribute name: versionComponents: Array\;
Access level: public API|Class name: NewVersionInfo
Method or attribute name: versionComponents: Array\;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: VersionDigestInfo
Access level: public API|Class name: VersionDigestInfo
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: VersionDigestInfo
Method or attribute name: versionDigest: string;
Access level: public API|Class name: VersionDigestInfo
Method or attribute name: versionDigest: string;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: VersionComponent
Access level: public API|Class name: VersionComponent
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: VersionComponent
Method or attribute name: componentId: string;
Access level: public API|Class name: VersionComponent
Method or attribute name: componentId: string;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: VersionComponent
Method or attribute name: componentType: ComponentType;
Access level: public API|Class name: VersionComponent
Method or attribute name: componentType: ComponentType;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: VersionComponent
Method or attribute name: upgradeAction: UpgradeAction;
Access level: public API|Class name: VersionComponent
Method or attribute name: upgradeAction: UpgradeAction;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: VersionComponent
Method or attribute name: displayVersion: string;
Access level: public API|Class name: VersionComponent
Method or attribute name: displayVersion: string;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: VersionComponent
Method or attribute name: innerVersion: string;
Access level: public API|Class name: VersionComponent
Method or attribute name: innerVersion: string;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: VersionComponent
Method or attribute name: size: number;
Access level: public API|Class name: VersionComponent
Method or attribute name: size: number;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: VersionComponent
Method or attribute name: effectiveMode: EffectiveMode;
Access level: public API|Class name: VersionComponent
Method or attribute name: effectiveMode: EffectiveMode;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: VersionComponent
Method or attribute name: descriptionInfo: DescriptionInfo;
Access level: public API|Class name: VersionComponent
Method or attribute name: descriptionInfo: DescriptionInfo;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DescriptionOptions
Access level: public API|Class name: DescriptionOptions
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DescriptionOptions
Method or attribute name: format: DescriptionFormat;
Access level: public API|Class name: DescriptionOptions
Method or attribute name: format: DescriptionFormat;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DescriptionOptions
Method or attribute name: language: string;
Access level: public API|Class name: DescriptionOptions
Method or attribute name: language: string;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: ComponentDescription
Access level: public API|Class name: ComponentDescription
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: ComponentDescription
Method or attribute name: componentId: string;
Access level: public API|Class name: ComponentDescription
Method or attribute name: componentId: string;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: ComponentDescription
Method or attribute name: descriptionInfo: DescriptionInfo;
Access level: public API|Class name: ComponentDescription
Method or attribute name: descriptionInfo: DescriptionInfo;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DescriptionInfo
Access level: public API|Class name: DescriptionInfo
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DescriptionInfo
Method or attribute name: descriptionType: DescriptionType;
Access level: public API|Class name: DescriptionInfo
Method or attribute name: descriptionType: DescriptionType;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DescriptionInfo
Method or attribute name: content: string;
Access level: public API|Class name: DescriptionInfo
Method or attribute name: content: string;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: CurrentVersionInfo
Access level: public API|Class name: CurrentVersionInfo
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: CurrentVersionInfo
Method or attribute name: osVersion: string;
Access level: public API|Class name: CurrentVersionInfo
Method or attribute name: osVersion: string;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: CurrentVersionInfo
Method or attribute name: deviceName: string;
Access level: public API|Class name: CurrentVersionInfo
Method or attribute name: deviceName: string;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: CurrentVersionInfo
Method or attribute name: versionComponents: Array\;
Access level: public API|Class name: CurrentVersionInfo
Method or attribute name: versionComponents: Array\;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DownloadOptions
Access level: public API|Class name: DownloadOptions
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DownloadOptions
Method or attribute name: allowNetwork: NetType;
Access level: public API|Class name: DownloadOptions
Method or attribute name: allowNetwork: NetType;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DownloadOptions
Method or attribute name: order: Order;
Access level: public API|Class name: DownloadOptions
Method or attribute name: order: Order;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: ResumeDownloadOptions
Access level: public API|Class name: ResumeDownloadOptions
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: ResumeDownloadOptions
Method or attribute name: allowNetwork: NetType;
Access level: public API|Class name: ResumeDownloadOptions
Method or attribute name: allowNetwork: NetType;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: PauseDownloadOptions
Access level: public API|Class name: PauseDownloadOptions
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: PauseDownloadOptions
Method or attribute name: isAllowAutoResume: boolean;
Access level: public API|Class name: PauseDownloadOptions
Method or attribute name: isAllowAutoResume: boolean;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeOptions
Access level: public API|Class name: UpgradeOptions
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeOptions
Method or attribute name: order: Order;
Access level: public API|Class name: UpgradeOptions
Method or attribute name: order: Order;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: ClearOptions
Access level: public API|Class name: ClearOptions
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: ClearOptions
Method or attribute name: status: UpgradeStatus;
Access level: public API|Class name: ClearOptions
Method or attribute name: status: UpgradeStatus;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradePolicy
Access level: public API|Class name: UpgradePolicy
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradePolicy
Method or attribute name: downloadStrategy: boolean;
Access level: public API|Class name: UpgradePolicy
Method or attribute name: downloadStrategy: boolean;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradePolicy
Method or attribute name: autoUpgradeStrategy: boolean;
Access level: public API|Class name: UpgradePolicy
Method or attribute name: autoUpgradeStrategy: boolean;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradePolicy
Method or attribute name: autoUpgradePeriods: Array\;
Access level: public API|Class name: UpgradePolicy
Method or attribute name: autoUpgradePeriods: Array\;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradePeriod
Access level: public API|Class name: UpgradePeriod
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradePeriod
Method or attribute name: start: number;
Access level: public API|Class name: UpgradePeriod
Method or attribute name: start: number;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradePeriod
Method or attribute name: end: number;
Access level: public API|Class name: UpgradePeriod
Method or attribute name: end: number;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: TaskInfo
Access level: public API|Class name: TaskInfo
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: TaskInfo
Method or attribute name: existTask: boolean;
Access level: public API|Class name: TaskInfo
Method or attribute name: existTask: boolean;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: TaskInfo
Method or attribute name: taskBody: TaskBody;
Access level: public API|Class name: TaskInfo
Method or attribute name: taskBody: TaskBody;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventInfo
Access level: public API|Class name: EventInfo
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventInfo
Method or attribute name: eventId: EventId;
Access level: public API|Class name: EventInfo
Method or attribute name: eventId: EventId;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventInfo
Method or attribute name: taskBody: TaskBody;
Access level: public API|Class name: EventInfo
Method or attribute name: taskBody: TaskBody;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: TaskBody
Access level: public API|Class name: TaskBody
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: TaskBody
Method or attribute name: versionDigestInfo: VersionDigestInfo;
Access level: public API|Class name: TaskBody
Method or attribute name: versionDigestInfo: VersionDigestInfo;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: TaskBody
Method or attribute name: status: UpgradeStatus;
Access level: public API|Class name: TaskBody
Method or attribute name: status: UpgradeStatus;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: TaskBody
Method or attribute name: subStatus: number;
Access level: public API|Class name: TaskBody
Method or attribute name: subStatus: number;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: TaskBody
Method or attribute name: progress: number;
Access level: public API|Class name: TaskBody
Method or attribute name: progress: number;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: TaskBody
Method or attribute name: installMode: number;
Access level: public API|Class name: TaskBody
Method or attribute name: installMode: number;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: TaskBody
Method or attribute name: errorMessages: Array\;
Access level: public API|Class name: TaskBody
Method or attribute name: errorMessages: Array\;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: TaskBody
Method or attribute name: versionComponents: Array\;
Access level: public API|Class name: TaskBody
Method or attribute name: versionComponents: Array\;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: ErrorMessage
Access level: public API|Class name: ErrorMessage
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: ErrorMessage
Method or attribute name: errorCode: number;
Access level: public API|Class name: ErrorMessage
Method or attribute name: errorCode: number;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: ErrorMessage
Method or attribute name: errorMessage: string;
Access level: public API|Class name: ErrorMessage
Method or attribute name: errorMessage: string;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventClassifyInfo
Access level: public API|Class name: EventClassifyInfo
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventClassifyInfo
Method or attribute name: eventClassify: EventClassify;
Access level: public API|Class name: EventClassifyInfo
Method or attribute name: eventClassify: EventClassify;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventClassifyInfo
Method or attribute name: extraInfo: string;
Access level: public API|Class name: EventClassifyInfo
Method or attribute name: extraInfo: string;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeFile
Access level: public API|Class name: UpgradeFile
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeFile
Method or attribute name: fileType: ComponentType;
Access level: public API|Class name: UpgradeFile
Method or attribute name: fileType: ComponentType;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeFile
Method or attribute name: filePath: string;
Access level: public API|Class name: UpgradeFile
Method or attribute name: filePath: string;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeTaskCallback
Access level: public API|Class name: UpgradeTaskCallback
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeTaskCallback
Method or attribute name: (eventInfo: EventInfo): void;
Access level: public API|Class name: UpgradeTaskCallback
Method or attribute name: (eventInfo: EventInfo): void;
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: BusinessVendor
Access level: public API|Class name: BusinessVendor
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: BusinessSubType
Access level: public API|Class name: BusinessSubType
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: BusinessSubType
Method or attribute name: FIRMWARE = 1
Access level: public API|Class name: BusinessSubType
Method or attribute name: FIRMWARE = 1
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: ComponentType
Access level: public API|Class name: ComponentType
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: ComponentType
Method or attribute name: OTA = 1
Access level: public API|Class name: ComponentType
Method or attribute name: OTA = 1
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeAction
Access level: public API|Class name: UpgradeAction
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EffectiveMode
Access level: public API|Class name: EffectiveMode
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EffectiveMode
Method or attribute name: COLD = 1
Access level: public API|Class name: EffectiveMode
Method or attribute name: COLD = 1
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EffectiveMode
Method or attribute name: LIVE = 2
Access level: public API|Class name: EffectiveMode
Method or attribute name: LIVE = 2
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EffectiveMode
Method or attribute name: LIVE_AND_COLD = 3
Access level: public API|Class name: EffectiveMode
Method or attribute name: LIVE_AND_COLD = 3
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DescriptionType
Access level: public API|Class name: DescriptionType
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DescriptionType
Method or attribute name: CONTENT = 0
Access level: public API|Class name: DescriptionType
Method or attribute name: CONTENT = 0
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DescriptionType
Method or attribute name: URI = 1
Access level: public API|Class name: DescriptionType
Method or attribute name: URI = 1
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DescriptionFormat
Access level: public API|Class name: DescriptionFormat
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DescriptionFormat
Method or attribute name: STANDARD = 0
Access level: public API|Class name: DescriptionFormat
Method or attribute name: STANDARD = 0
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: DescriptionFormat
Method or attribute name: SIMPLIFIED = 1
Access level: public API|Class name: DescriptionFormat
Method or attribute name: SIMPLIFIED = 1
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: NetType
Access level: public API|Class name: NetType
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: NetType
Method or attribute name: CELLULAR = 1
Access level: public API|Class name: NetType
Method or attribute name: CELLULAR = 1
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: NetType
Method or attribute name: METERED_WIFI = 2
Access level: public API|Class name: NetType
Method or attribute name: METERED_WIFI = 2
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: NetType
Method or attribute name: NOT_METERED_WIFI = 4
Access level: public API|Class name: NetType
Method or attribute name: NOT_METERED_WIFI = 4
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: NetType
Method or attribute name: WIFI = 6
Access level: public API|Class name: NetType
Method or attribute name: WIFI = 6
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: NetType
Method or attribute name: CELLULAR_AND_WIFI = 7
Access level: public API|Class name: NetType
Method or attribute name: CELLULAR_AND_WIFI = 7
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: Order
Access level: public API|Class name: Order
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: Order
Method or attribute name: DOWNLOAD = 1
Access level: public API|Class name: Order
Method or attribute name: DOWNLOAD = 1
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: Order
Method or attribute name: INSTALL = 2
Access level: public API|Class name: Order
Method or attribute name: INSTALL = 2
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: Order
Method or attribute name: DOWNLOAD_AND_INSTALL = 3
Access level: public API|Class name: Order
Method or attribute name: DOWNLOAD_AND_INSTALL = 3
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: Order
Method or attribute name: APPLY = 4
Access level: public API|Class name: Order
Method or attribute name: APPLY = 4
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: Order
Method or attribute name: INSTALL_AND_APPLY = 6
Access level: public API|Class name: Order
Method or attribute name: INSTALL_AND_APPLY = 6
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeStatus
Access level: public API|Class name: UpgradeStatus
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeStatus
Method or attribute name: WAITING_DOWNLOAD = 20
Access level: public API|Class name: UpgradeStatus
Method or attribute name: WAITING_DOWNLOAD = 20
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeStatus
Method or attribute name: DOWNLOADING = 21
Access level: public API|Class name: UpgradeStatus
Method or attribute name: DOWNLOADING = 21
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeStatus
Method or attribute name: DOWNLOAD_PAUSED = 22
Access level: public API|Class name: UpgradeStatus
Method or attribute name: DOWNLOAD_PAUSED = 22
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeStatus
Method or attribute name: DOWNLOAD_FAIL = 23
Access level: public API|Class name: UpgradeStatus
Method or attribute name: DOWNLOAD_FAIL = 23
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeStatus
Method or attribute name: WAITING_INSTALL = 30
Access level: public API|Class name: UpgradeStatus
Method or attribute name: WAITING_INSTALL = 30
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeStatus
Method or attribute name: UPDATING = 31
Access level: public API|Class name: UpgradeStatus
Method or attribute name: UPDATING = 31
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeStatus
Method or attribute name: WAITING_APPLY = 40
Access level: public API|Class name: UpgradeStatus
Method or attribute name: WAITING_APPLY = 40
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeStatus
Method or attribute name: APPLYING = 41
Access level: public API|Class name: UpgradeStatus
Method or attribute name: APPLYING = 41
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeStatus
Method or attribute name: UPGRADE_SUCCESS = 50
Access level: public API|Class name: UpgradeStatus
Method or attribute name: UPGRADE_SUCCESS = 50
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: UpgradeStatus
Method or attribute name: UPGRADE_FAIL = 51
Access level: public API|Class name: UpgradeStatus
Method or attribute name: UPGRADE_FAIL = 51
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventClassify
Access level: public API|Class name: EventClassify
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventClassify
Method or attribute name: TASK = 0x01000000
Access level: public API|Class name: EventClassify
Method or attribute name: TASK = 0x01000000
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Access level: public API|Class name: EventId
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_TASK_BASE = EventClassify.TASK
Access level: public API|Class name: EventId
Method or attribute name: EVENT_TASK_BASE = EventClassify.TASK
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_TASK_RECEIVE
Access level: public API|Class name: EventId
Method or attribute name: EVENT_TASK_RECEIVE
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_TASK_CANCEL
Access level: public API|Class name: EventId
Method or attribute name: EVENT_TASK_CANCEL
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_WAIT
Access level: public API|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_WAIT
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_START
Access level: public API|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_START
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_UPDATE
Access level: public API|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_UPDATE
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_PAUSE
Access level: public API|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_PAUSE
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_RESUME
Access level: public API|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_RESUME
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_SUCCESS
Access level: public API|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_SUCCESS
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_FAIL
Access level: public API|Class name: EventId
Method or attribute name: EVENT_DOWNLOAD_FAIL
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_UPGRADE_WAIT
Access level: public API|Class name: EventId
Method or attribute name: EVENT_UPGRADE_WAIT
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_UPGRADE_START
Access level: public API|Class name: EventId
Method or attribute name: EVENT_UPGRADE_START
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_UPGRADE_UPDATE
Access level: public API|Class name: EventId
Method or attribute name: EVENT_UPGRADE_UPDATE
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_APPLY_WAIT
Access level: public API|Class name: EventId
Method or attribute name: EVENT_APPLY_WAIT
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_APPLY_START
Access level: public API|Class name: EventId
Method or attribute name: EVENT_APPLY_START
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_UPGRADE_SUCCESS
Access level: public API|Class name: EventId
Method or attribute name: EVENT_UPGRADE_SUCCESS
Access level: system API|@ohos.update.d.ts| -|Access level changed|Class name: EventId
Method or attribute name: EVENT_UPGRADE_FAIL
Access level: public API|Class name: EventId
Method or attribute name: EVENT_UPGRADE_FAIL
Access level: system API|@ohos.update.d.ts| diff --git a/zh-cn/application-dev/Readme-CN.md b/zh-cn/application-dev/Readme-CN.md index 405f0971488d733c9989dbf8bab377616e3c1cfb..aa9b731e0cd6ba1f928db3b8d91753ffe441eec7 100644 --- a/zh-cn/application-dev/Readme-CN.md +++ b/zh-cn/application-dev/Readme-CN.md @@ -9,8 +9,6 @@ - 快速入门 - [开发准备](quick-start/start-overview.md) - [使用ArkTS语言开发(Stage模型)](quick-start/start-with-ets-stage.md) - - [使用ArkTS语言开发(FA模型)](quick-start/start-with-ets-fa.md) - - [使用JS语言开发(FA模型)](quick-start/start-with-js-fa.md) - 开发基础知识 - 应用程序包基础知识 - [应用程序包概述](quick-start/application-package-overview.md) diff --git a/zh-cn/application-dev/ability-deprecated/fa-brief.md b/zh-cn/application-dev/ability-deprecated/fa-brief.md index b7d8cc355da275462a663160a278d9ca6ff93188..3b80798ea10b4fb89e75d074f2f1eace8276534b 100644 --- a/zh-cn/application-dev/ability-deprecated/fa-brief.md +++ b/zh-cn/application-dev/ability-deprecated/fa-brief.md @@ -48,7 +48,6 @@ FA模型的应用包的工程目录结构,请参考[OpenHarmony工程介绍](h - [`ArkTSDistributedCalc`:分布式计算器(ArkTS)(API9)(Full SDK)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/SuperFeature/DistributedAppDev/ArkTSDistributedCalc) - [`DistributedDataGobang`:分布式五子棋(ArkTS)(API9)(Full SDK)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/Solutions/Game/DistributedDataGobang) -- [分布式调度启动远程FA(JS)(API8)](https://gitee.com/openharmony/codelabs/tree/master/Distributed/RemoteStartFA) - [分布式新闻客户端(JS)(API8)](https://gitee.com/openharmony/codelabs/tree/master/Distributed/NewsDemo) - [分布式手写板(ArkTS)(Full SDK)(API8)](https://gitee.com/openharmony/codelabs/tree/master/Distributed/DistributeDatabaseDrawEts) - [分布式鉴权(JS)(API8)](https://gitee.com/openharmony/codelabs/tree/master/Distributed/GameAuthOpenH) diff --git a/zh-cn/application-dev/connectivity/http-request.md b/zh-cn/application-dev/connectivity/http-request.md index b70938d8a2416722798558c9dd13a99501cf6e81..e15970bc6cec746a1a0c613bf323c87d7ac8f0d2 100644 --- a/zh-cn/application-dev/connectivity/http-request.md +++ b/zh-cn/application-dev/connectivity/http-request.md @@ -166,5 +166,4 @@ httpRequest.request2( 针对HTTP数据请求,有以下相关实例可供参考: -- [`Http:`数据请求(ArkTS)(API9))](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Connectivity/Http) -- [使用HTTP实现与服务端通信(ArkTS)(API9)](https://gitee.com/openharmony/codelabs/tree/master/NetworkManagement/SmartChatEtsOH) \ No newline at end of file +- [`Http:`数据请求(ArkTS)(API9))](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Connectivity/Http) \ No newline at end of file diff --git a/zh-cn/application-dev/connectivity/socket-connection.md b/zh-cn/application-dev/connectivity/socket-connection.md index 6e0642eb039af3bfd9a97ca03b931a69dbeec957..21fd25e288eda893cdea73fa57cff83faa48b8e0 100644 --- a/zh-cn/application-dev/connectivity/socket-connection.md +++ b/zh-cn/application-dev/connectivity/socket-connection.md @@ -324,6 +324,4 @@ tlsTwoWay.close((err) => { 针对Socket连接开发,有以下相关实例可供参考: -- [`Socket`:Socket 连接(ArkTS)(API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Connectivity/Socket) -- [使用UDP实现与服务端通信(ArkTS)(API9)](https://gitee.com/openharmony/codelabs/tree/master/NetworkManagement/UdpDemoOH) -- [使用TCP实现与服务端通信(ArkTS)(API9)](https://gitee.com/openharmony/codelabs/tree/master/NetworkManagement/TcpSocketDemo) +- [`Socket`:Socket 连接(ArkTS)(API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/Connectivity/Socket) \ No newline at end of file diff --git a/zh-cn/application-dev/device/vibrator-guidelines.md b/zh-cn/application-dev/device/vibrator-guidelines.md index b30c4bac269b09126b0aac733b895ec4cfd4e5e8..f28e42dc65b4754fe863e8558b5d9e2be3424200 100644 --- a/zh-cn/application-dev/device/vibrator-guidelines.md +++ b/zh-cn/application-dev/device/vibrator-guidelines.md @@ -22,124 +22,265 @@ | ohos.vibrator | isSupportEffect(effectId: string, callback: AsyncCallback<boolean>): void | 查询是否支持传入的参数effectId。返回true则表示支持,否则不支持 | +## 自定义振动格式 + +自定义振动提供给用户设计自己所需振动效果的能力,用户可通过自定义振动配置文件,并遵循相应规则编排所需振动形式,使能更加开放的振感交互体验。 + +自定义振动配置文件为Json格式,在形式上如下所示: + +```json +{ + "MetaData": { + "Create": "2023-01-09", + "Description": "a haptic case", + "Version": 1.0, + "ChannelNumber": 1 + }, + "Channels": [ + { + "Parameters": { + "Index": 1 + }, + "Pattern": [ + { + "Event": { + "Type": "transient", + "StartTime": 0, + "Parameters": { + "Intensity": 100, + "Frequency": 31 + } + } + }, + { + "Event": { + "Type": "continuous", + "StartTime": 100, + "Duration": 54, + "Parameters": { + "Intensity": 38, + "Frequency": 30 + } + } + } + ] + } + ] +} +``` + +Json文件共包含2个属性。 +- "MetaData"属性中为文件头信息,可在如下属性中添加描述。
+"Version":必填项,文件格式的版本号,向前兼容,目前起步仅支持版本1.0;
+"ChannelNumber":必填项,表示马达振动的通道数,目前仅支持单通道,规定为1;
+"Create":可选项,可记录文件创作时间;
+"Description":可选项,可指明振动效果、创建信息等附加说明。
+- "Channels"属性中为马达振动通道的相关信息。
+ +"Channels"是Json数组,表示各个通道的信息,包含2个属性。 +- "Parameters"属性中为通道参数。
+"Index":必填项,表示通道编号,单通道下规定为1。
+- "Pattern"属性中为马达振动序列。
+ +"Pattern"是Json数组,每个"Event"属性代表1个振动事件,支持添加2种振动类型。 +- 类型1:"transient"类型,瞬态短振动,干脆有力;
+- 类型2:"continuous"类型,稳态长振动,具备长时间输出强劲有力振动的能力。
+ +振动事件参数信息具体如下表: + +| 参数 | 说明 | 范围| +| --- | ------------------------ | ---| +| Type | 振动事件类型,必填 | "transient" 或"continuous"| +| StartTime | 振动的起始时间,必填 | 单位ms,有效范围为[0, 1800 000],振动事件不能重叠| +| Duration | 振动持续时间,仅当类型为"continuous"时有效 | 单位ms,有效范围为(10, 1600)| +| Intensity | 振动强度,必填 | 有效范围为[0, 100],这里的强度值为相对值,并不代表真实强度| +| Frequency | 振动频率,必填 | 有效范围为[0, 100],这里的频率值为相对值,并不代表真实频率| + +其他要求: + +| 参数 | 要求 | +| -------- | ------------------------ | +| 振动事件(event)的数量 | 不得超过128个 | +| 振动配置文件长度 | 不得超过64KB | + + ## 开发步骤 1. 控制设备上的振动器,需要申请权限ohos.permission.VIBRATE。具体配置方式请参考[权限申请声明](../security/accesstoken-guidelines.md)。 2. 根据指定振动效果和振动属性触发马达振动。 - ```js - import vibrator from '@ohos.vibrator'; - try { - vibrator.startVibration({ // 使用startVibration需要添加ohos.permission.VIBRATE权限 - type: 'time', - duration: 1000, - }, { - id: 0, - usage: 'alarm' - }, (error) => { - if (error) { - console.error('vibrate fail, error.code: ' + error.code + 'error.message: ', + error.message); - return; - } - console.log('Callback returned to indicate a successful vibration.'); - }); - } catch (err) { - console.error('errCode: ' + err.code + ' ,msg: ' + err.message); - } - ``` +```js +import vibrator from '@ohos.vibrator'; +try { + vibrator.startVibration({ // 使用startVibration需要添加ohos.permission.VIBRATE权限 + type: 'time', + duration: 1000, + }, { + id: 0, + usage: 'alarm' + }, (error) => { + if (error) { + console.error('vibrate fail, error.code: ' + error.code + 'error.message: ', + error.message); + return; + } + console.log('Callback returned to indicate a successful vibration.'); + }); +} catch (err) { + console.error('errCode: ' + err.code + ' ,msg: ' + err.message); +} +``` 3. 按照指定模式停止马达的振动。 - ```js - import vibrator from '@ohos.vibrator'; - try { - // 按照VIBRATOR_STOP_MODE_TIME模式停止振动, 使用stopVibration需要添加ohos.permission.VIBRATE权限 - vibrator.stopVibration(vibrator.VibratorStopMode.VIBRATOR_STOP_MODE_TIME, function (error) { - if (error) { - console.log('error.code' + error.code + 'error.message' + error.message); - return; - } - console.log('Callback returned to indicate successful.'); - }) - } catch (err) { - console.info('errCode: ' + err.code + ' ,msg: ' + err.message); - } - ``` - +```js +import vibrator from '@ohos.vibrator'; +try { + // 按照VIBRATOR_STOP_MODE_TIME模式停止振动, 使用stopVibration需要添加ohos.permission.VIBRATE权限 + vibrator.stopVibration(vibrator.VibratorStopMode.VIBRATOR_STOP_MODE_TIME, function (error) { + if (error) { + console.log('error.code' + error.code + 'error.message' + error.message); + return; + } + console.log('Callback returned to indicate successful.'); + }) +} catch (err) { + console.info('errCode: ' + err.code + ' ,msg: ' + err.message); +} +``` + 4. 停止所有模式的马达振动。 - ```js - import vibrator from '@ohos.vibrator'; - // 使用startVibration、stopVibration需要添加ohos.permission.VIBRATE权限 - try { - vibrator.startVibration({ - type: 'time', - duration: 1000, - }, { - id: 0, - usage: 'alarm' - }, (error) => { - if (error) { - console.error('vibrate fail, error.code: ' + error.code + 'error.message: ', + error.message); - return; - } - console.log('Callback returned to indicate a successful vibration.'); - }); - // 停止所有类型的马达振动 - vibrator.stopVibration(function (error) { - if (error) { - console.log('error.code' + error.code + 'error.message' + error.message); - return; - } - console.log('Callback returned to indicate successful.'); - }) - } catch (error) { - console.info('errCode: ' + error.code + ' ,msg: ' + error.message); - } - ``` +```js +import vibrator from '@ohos.vibrator'; +// 使用startVibration、stopVibration需要添加ohos.permission.VIBRATE权限 +try { + vibrator.startVibration({ + type: 'time', + duration: 1000, + }, { + id: 0, + usage: 'alarm' + }, (error) => { + if (error) { + console.error('vibrate fail, error.code: ' + error.code + 'error.message: ', + error.message); + return; + } + console.log('Callback returned to indicate a successful vibration.'); + }); + // 停止所有类型的马达振动 + vibrator.stopVibration(function (error) { + if (error) { + console.log('error.code' + error.code + 'error.message' + error.message); + return; + } + console.log('Callback returned to indicate successful.'); + }) +} catch (error) { + console.info('errCode: ' + error.code + ' ,msg: ' + error.message); +} +``` 5. 查询是否支持传入的参数effectId。 - ```js - import vibrator from '@ohos.vibrator'; - try { - // 查询是否支持'haptic.clock.timer' - vibrator.isSupportEffect('haptic.clock.timer', function (err, state) { - if (err) { - console.error('isSupportEffect failed, error:' + JSON.stringify(err)); - return; - } - console.log('The effectId is ' + (state ? 'supported' : 'unsupported')); - if (state) { - try { - vibrator.startVibration({ // 使用startVibration需要添加ohos.permission.VIBRATE权限 - type: 'preset', - effectId: 'haptic.clock.timer', - count: 1, - }, { - usage: 'unknown' - }, (error) => { - if(error) { - console.error('haptic.clock.timer vibrator error:' + JSON.stringify(error)); - } else { - console.log('haptic.clock.timer vibrator success'); - } - }); - } catch (error) { - console.error('Exception in, error:' + JSON.stringify(error)); - } - } - }) - } catch (error) { - console.error('Exception in, error:' + JSON.stringify(error)); - } - ``` - - +```js +import vibrator from '@ohos.vibrator'; +try { + // 查询是否支持'haptic.clock.timer' + vibrator.isSupportEffect('haptic.clock.timer', function (err, state) { + if (err) { + console.error('isSupportEffect failed, error:' + JSON.stringify(err)); + return; + } + console.log('The effectId is ' + (state ? 'supported' : 'unsupported')); + if (state) { + try { + vibrator.startVibration({ // 使用startVibration需要添加ohos.permission.VIBRATE权限 + type: 'preset', + effectId: 'haptic.clock.timer', + count: 1, + }, { + usage: 'unknown' + }, (error) => { + if(error) { + console.error('haptic.clock.timer vibrator error:' + JSON.stringify(error)); + } else { + console.log('haptic.clock.timer vibrator success'); + } + }); + } catch (error) { + console.error('Exception in, error:' + JSON.stringify(error)); + } + } + }) +} catch (error) { + console.error('Exception in, error:' + JSON.stringify(error)); +} +``` + +6. 启动和停止自定义振动 + +```js +import vibrator from '@ohos.vibrator'; +import resourceManager from '@ohos.resourceManager'; + +const FILE_NAME = "xxx.json"; + +async function openResource(fileName) { + let fileDescriptor = undefined; + let mgr = await resourceManager.getResourceManager(); + await mgr.getRawFd(fileName).then(value => { + fileDescriptor = {fd: value.fd, offset: value.offset, length: value.length}; + console.log('openResource success fileName: ' + fileName); + }).catch(error => { + console.log('openResource err: ' + error); + }); + return fileDescriptor; +} + +async function closeResource(fileName) { + let mgr = await resourceManager.getResourceManager(); + await mgr.closeRawFd(fileName).then(()=> { + console.log('closeResource success fileName: ' + fileName); + }).catch(error => { + console.log('closeResource err: ' + error); + }); +} + +// 获取振动文件资源描述符 +let rawFd = openResource(FILE_NAME); +// 使用startVibration、stopVibration需要添加ohos.permission.VIBRATE权限 +try { + // 启动自定义振动 + vibrator.startVibration({ + type: "file", + hapticFd: { fd: rawFd.fd, offset: rawFd.offset, length: rawFd.length } + }, { + usage: "alarm" + }).then(() => { + console.info('startVibration success'); + }, (error) => { + console.info('startVibration error'); + }); + // 停止所有类型的马达振动 + vibrator.stopVibration(function (error) { + if (error) { + console.log('error.code' + error.code + 'error.message' + error.message); + return; + } + console.log('Callback returned to indicate successful.'); + }) +} catch (error) { + console.info('errCode: ' + error.code + ' ,msg: ' + error.message); +} +// 关闭振动文件资源 +closeResource(FILE_NAME); +``` + ## 相关实例 针对振动开发,有以下相关实例可供参考: -- [`Vibrator`:振动(ArkTS)(API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/DeviceManagement/Vibrator) \ No newline at end of file +- [`Vibrator`:振动(ArkTS)(API9)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/DeviceManagement/Vibrator/BasicVibration) +- [`CustomHaptic`:自定义振动(ArkTS)(API10)](https://gitee.com/openharmony/applications_app_samples/tree/master/code/BasicFeature/DeviceManagement/Vibrator/CustomHaptic) diff --git a/zh-cn/application-dev/napi/napi-guidelines.md b/zh-cn/application-dev/napi/napi-guidelines.md index 2ffb79d552180b5e1d5b34cd869eaca1adf4eaf2..6dbf776e8b068efc3820daf15ae61e4cf8bb1882 100644 --- a/zh-cn/application-dev/napi/napi-guidelines.md +++ b/zh-cn/application-dev/napi/napi-guidelines.md @@ -188,6 +188,6 @@ ArkCompiler会对JS对象线程进行保护,使用不当会引起应用crash 针对N-API的开发,有以下相关完整实例可供参考: -- [第一个Native C++应用(ArkTS)(API9)](https://gitee.com/openharmony/codelabs/tree/master/NativeAPI/NativeTemplateDemo) +- [简易Native C++ 示例(ArkTS)(API9)](https://gitee.com/openharmony/codelabs/tree/master/NativeAPI/NativeTemplateDemo) -- [Native Component(ArkTS)(API9)](https://gitee.com/openharmony/codelabs/tree/master/NativeAPI/XComponent) \ No newline at end of file +- [Native XComponent组件的使用(ArkTS)(API9)](https://gitee.com/openharmony/codelabs/tree/master/NativeAPI/XComponent) \ No newline at end of file diff --git a/zh-cn/application-dev/napi/purgeable-memory-guidelines.md b/zh-cn/application-dev/napi/purgeable-memory-guidelines.md index a2290acf11b24cb3f27ee44acdffe39e7e597b74..28af17f0cb2ea3aa929f529417c32488ced256ad 100644 --- a/zh-cn/application-dev/napi/purgeable-memory-guidelines.md +++ b/zh-cn/application-dev/napi/purgeable-memory-guidelines.md @@ -8,7 +8,7 @@ 针对Purgeable memory,常见的开发场景如下: * 通过`Purgeablmemory`提供的`NAPI`接口申请PurgeableMemory对象,并将数据内容写入PurgeableMemory对象。 -* 使用完毕后使用 +* 使用完毕后释放 ## 接口说明 diff --git a/zh-cn/application-dev/quick-start/Readme-CN.md b/zh-cn/application-dev/quick-start/Readme-CN.md index e85b6eb8fca9d8c5d758167ada0620715bdaaf57..41ed69bcd4cfa06e0a3c0ffbb6ce395ceb464d77 100755 --- a/zh-cn/application-dev/quick-start/Readme-CN.md +++ b/zh-cn/application-dev/quick-start/Readme-CN.md @@ -3,8 +3,6 @@ - 快速入门 - [开发准备](start-overview.md) - [使用ArkTS语言开发(Stage模型)](start-with-ets-stage.md) - - [使用ArkTS语言开发(FA模型)](start-with-ets-fa.md) - - [使用JS语言开发(FA模型)](start-with-js-fa.md) - 开发基础知识 - 应用程序包基础知识 - [应用程序包概述](application-package-overview.md) diff --git a/zh-cn/application-dev/quick-start/arkts-create-custom-components.md b/zh-cn/application-dev/quick-start/arkts-create-custom-components.md index d2054ed86f2cde7f463080a4ba939e4ab2e83dba..2b8fe92da38cb37568a5e58ff78ff553d445bab9 100644 --- a/zh-cn/application-dev/quick-start/arkts-create-custom-components.md +++ b/zh-cn/application-dev/quick-start/arkts-create-custom-components.md @@ -106,6 +106,8 @@ struct ParentComponent { > **说明:** > > 从API version 9开始,该装饰器支持在ArkTS卡片中使用。 + > + > 从API version 10开始,\@Entry可以接受一个可选的[LocalStorage](arkts-localstorage.md)的参数或者一个可选的[EntryOptions](#entryOptions)参数。 ```ts @Entry @@ -114,6 +116,23 @@ struct ParentComponent { } ``` + ### EntryOptions10+ + + 命名路由跳转选项。 + + | 名称 | 类型 | 必填 | 说明 | + | ------ | ------ | ---- | ------------------------------------------------------------ | + | routeName | string | 否 | 表示作为命名路由页面的名字。 | + | storage | [LocalStorage](arkts-localstorage.md) | 否 | 页面级的UI状态存储。 | + + ```ts + @Entry({ routeName : 'myPage' }) + @Component + struct MyComponent { + } + ``` + + - \@Recycle:\@Recycle装饰的自定义组件具备可复用能力 > **说明:** diff --git a/zh-cn/application-dev/quick-start/figures/changeToAPI10.png b/zh-cn/application-dev/quick-start/figures/changeToAPI10.png new file mode 100644 index 0000000000000000000000000000000000000000..32c7660ccf7dbd05c206b7753a2dfdb72cca5d0e Binary files /dev/null and b/zh-cn/application-dev/quick-start/figures/changeToAPI10.png differ diff --git a/zh-cn/application-dev/quick-start/figures/chooseStageModel.png b/zh-cn/application-dev/quick-start/figures/chooseStageModel.png index 3125c8ba0591ce0c53344f35fb780eb956601624..b7dd96b6b7c5d2afd241e0c6fd9ee91977692115 100644 Binary files a/zh-cn/application-dev/quick-start/figures/chooseStageModel.png and b/zh-cn/application-dev/quick-start/figures/chooseStageModel.png differ diff --git a/zh-cn/application-dev/quick-start/figures/createProject.png b/zh-cn/application-dev/quick-start/figures/createProject.png index 7a56a44e0e7f80671b86c521792352db625ccad7..6c884853a1afcb2dbb72f1e5f7914ab063908299 100644 Binary files a/zh-cn/application-dev/quick-start/figures/createProject.png and b/zh-cn/application-dev/quick-start/figures/createProject.png differ diff --git a/zh-cn/application-dev/quick-start/figures/deleteRuntimeOS.png b/zh-cn/application-dev/quick-start/figures/deleteRuntimeOS.png new file mode 100644 index 0000000000000000000000000000000000000000..8087b03be057d646ae6e3348abae73c1e840b781 Binary files /dev/null and b/zh-cn/application-dev/quick-start/figures/deleteRuntimeOS.png differ diff --git a/zh-cn/application-dev/quick-start/figures/targetSdkVersion.png b/zh-cn/application-dev/quick-start/figures/targetSdkVersion.png new file mode 100644 index 0000000000000000000000000000000000000000..e3846adab2a4b644e09dd00c7e66c79db94cbb18 Binary files /dev/null and b/zh-cn/application-dev/quick-start/figures/targetSdkVersion.png differ diff --git a/zh-cn/application-dev/quick-start/figures/zh-cn_image_0000001609333677.png b/zh-cn/application-dev/quick-start/figures/zh-cn_image_0000001609333677.png new file mode 100644 index 0000000000000000000000000000000000000000..88e2fede373b6b369375bc2d8e58b2dba0770da6 Binary files /dev/null and b/zh-cn/application-dev/quick-start/figures/zh-cn_image_0000001609333677.png differ diff --git a/zh-cn/application-dev/quick-start/start-overview.md b/zh-cn/application-dev/quick-start/start-overview.md index d3a3528883a02dbeb91d210de97606e0109455bc..43b273e56e147880b1ec4dcf5290bd56fa55b7f8 100644 --- a/zh-cn/application-dev/quick-start/start-overview.md +++ b/zh-cn/application-dev/quick-start/start-overview.md @@ -29,8 +29,9 @@ OpenHarmony提供了一套UI开发框架,即方舟开发框架(ArkUI框架 随着系统的演进发展,OpenHarmony先后提供了两种应用模型: -- **FA(Feature Ability)模型:** OpenHarmony API 7开始支持的模型,已经不再主推。FA模型开发可见[FA模型开发概述](../application-models/fa-model-development-overview.md)。 -- **Stage模型:** OpenHarmony API 9开始新增的模型,是目前主推且会长期演进的模型。在该模型中,由于提供了AbilityStage、WindowStage等类作为应用组件和Window窗口的“舞台”,因此称这种应用模型为Stage模型。Stage模型开发可见[Stage模型开发概述](../application-models/stage-model-development-overview.md)。 +- **Stage模型:** OpenHarmony API 9开始新增的模型,是目前主推且会长期演进的模型。在该模型中,由于提供了AbilityStage、WindowStage等类作为应用组件和Window窗口的“舞台”,因此称这种应用模型为Stage模型。Stage模型开发可见[Stage模型开发概述](../application-models/stage-model-development-overview.md)。**快速入门以此为例提供开发指导。** + +- **FA(Feature Ability)模型:** OpenHarmony API 7开始支持的模型,已经不再主推。FA模型开发可见[FA模型开发概述](../application-models/fa-model-development-overview.md)。**快速入门章节不再对此展开提供开发指导。** FA模型和Stage模型的整体架构和设计思想等更多区别,请见[应用模型解读](../application-models/application-model-description.md)。 @@ -39,8 +40,8 @@ FA模型和Stage模型的整体架构和设计思想等更多区别,请见[应 ## 工具准备 -1. 安装最新版[DevEco Studio](https://developer.harmonyos.com/cn/develop/deveco-studio)。 +1. 安装最新版[DevEco Studio](../../release-notes/OpenHarmony-v4.0-beta1.md#配套关系)。 2. 请参考[配置开发环境](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/environment_config-0000001052902427-V3),完成**DevEco Studio**的安装和开发环境配置。 -完成上述操作及基本概念的理解后,可参照[使用ArkTS语言进行开发(Stage模型)](start-with-ets-stage.md)、[使用ArkTS语言开发(FA模型)](start-with-ets-fa.md)、[使用JS语言开发(FA模型)](../quick-start/start-with-js-fa.md)中的任一章节进行下一步体验和学习。 \ No newline at end of file +完成上述操作及基本概念的理解后,可参照[使用ArkTS语言进行开发(Stage模型)](start-with-ets-stage.md)中的任一章节进行下一步体验和学习。 diff --git a/zh-cn/application-dev/quick-start/start-with-ets-fa.md b/zh-cn/application-dev/quick-start/start-with-ets-fa.md deleted file mode 100644 index e04557d126081c36aced089576003df3e26b6002..0000000000000000000000000000000000000000 --- a/zh-cn/application-dev/quick-start/start-with-ets-fa.md +++ /dev/null @@ -1,299 +0,0 @@ -# 使用ArkTS语言开发(FA模型) - - -> **说明:** -> -> 请使用**DevEco Studio V3.0.0.601 Beta1**及更高版本。 -> -> 为确保运行效果,本文以使用**DevEco Studio 3.1 Beta2**版本为例,点击[此处](https://developer.harmonyos.com/cn/develop/deveco-studio)获取下载链接。 - - -## 创建ArkTS工程 - -1. 若首次打开**DevEco Studio**,请点击**Create Project**创建工程。如果已经打开了一个工程,请在菜单栏选择**File** > **New** > **Create Project**来创建一个新工程。选择**Application**应用开发(本文以应用开发为例,**Atomic Service**对应为原子化服务开发),选择模板“**Empty Ability**”,点击**Next**进行下一步配置。 - - ![createProject](figures/createProject.png) - -2. 进入配置工程界面,**Compile SDK** 选择“**8**”(**Compile SDK**选择“**9**”时注意同步选择**Model** 为“**FA**”,此处以选择“**8**”为例),**Language**选择“**ArkTS**”,其他参数保持默认设置即可。 - - ![chooseFAModel_ets](figures/chooseFAModel_ets.png) - - > **说明:** - > - > DevEco Studio V3.0 Beta3及更高版本支持使用ArkTS[低代码开发](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/ide-low-code-overview-0000001480179573-V3)方式。 - > - > 低代码开发方式具有丰富的UI界面编辑功能,通过可视化界面开发方式快速构建布局,可有效降低开发者的上手成本并提升开发者构建UI界面的效率。 - > - > 如需使用低代码开发方式,请打开上图中的Enable Super Visual开关。 - -3. 点击**Finish**,工具会自动生成示例代码和相关资源,等待工程创建完成。 -4. 工程创建完成后,在**entry > build-profile.json5**文件中,将targets中的runtimeOS改为“OpenHarmony”,然后点击右上角提示框的**Sync Now**以进行OpenHarmony应用开发。 - - -## ArkTS工程目录结构(FA模型) - -![zh-cn_image_0000001384652328](figures/zh-cn_image_0000001384652328.png) - -- **entry**:OpenHarmony工程模块,编译构建生成一个[HAP](../../glossary.md#hap)包。 - - **src > main > ets**:用于存放ArkTS源码。 - - **src > main > ets > MainAbility**:应用/服务的入口。 - - **src > main > ets > MainAbility > pages**:MainAbility包含的页面。 - - **src > main > ets > MainAbility > pages > index.ets**:pages列表中的第一个页面,即应用的首页入口。 - - **src > main > ets > MainAbility > app.ets**:承载Ability生命周期。 - - **src > main > resources**:用于存放应用/服务所用到的资源文件,如图形、多媒体、字符串、布局文件等。关于资源文件,详见[资源文件的分类](resource-categories-and-access.md#资源分类)。 - - **src > main > config.json**:模块配置文件。主要包含HAP的配置信息、应用/服务在具体设备上的配置信息以及应用/服务的全局配置信息。具体的配置文件说明,详见[应用配置文件(FA模型)](application-configuration-file-overview-fa.md)。 - - **build-profile.json5**:当前的模块信息 、编译信息配置项,包括buildOption、targets配置等。其中targets中可配置当前运行环境,默认为HarmonyOS。若需开发OpenHarmony应用,则需开发者自行修改为OpenHarmony。 - - **hvigorfile.ts**:模块级编译构建任务脚本,开发者可以自定义相关任务和代码实现。 -- **build-profile.json5**:应用级配置信息,包括签名、产品配置等。 -- **hvigorfile.ts**:应用级编译构建任务脚本。 - - -## 构建第一个页面 - -1. 使用文本组件。 - - 工程同步完成后,在“**Project**”窗口,点击“**entry > src > main > ets > MainAbility > pages**”,打开“**index.ets**”文件,可以看到页面由Text组件组成。“**index.ets**”文件的示例如下: - - ```ts - // index.ets - @Entry - @Component - struct Index { - @State message: string = 'Hello World' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - } - .width('100%') - } - .height('100%') - } - } - ``` - -2. 添加按钮。 - - 在默认页面基础上,我们添加一个Button组件,作为按钮响应用户点击,从而实现跳转到另一个页面。“**index.ets**”文件的示例如下: - - ```ts - // index.ets - @Entry - @Component - struct Index { - @State message: string = 'Hello World' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - // 添加按钮,以响应用户点击 - Button() { - Text('Next') - .fontSize(30) - .fontWeight(FontWeight.Bold) - } - .type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('40%') - .height('5%') - } - .width('100%') - } - .height('100%') - } - } - ``` - -3. 在编辑窗口右上角的侧边工具栏,点击Previewer,打开预览器。第一个页面效果如下图所示: - - ![zh-cn_image_0000001311334976](figures/zh-cn_image_0000001311334976.png) - - -## 构建第二个页面 - -1. 创建第二个页面。 - - - 新建第二个页面文件。在“**Project**”窗口,打开“**entry > src > main > ets > MainAbility**”,右键点击“**pages**”文件夹,选择“**New > ArkTS File**”,命名为“**second**”,点击“**Finish**”。可以看到文件目录结构如下: - ![zh-cn_image_0000001311334932](figures/zh-cn_image_0000001311334932.png) - - > **说明:** - > - > 开发者也可以在右键点击“**pages**”文件夹时,选择“**New > Page**”,则无需手动配置相关页面路由。 - - 配置第二个页面的路由。在config.json文件中的“module - js - pages”下配置第二个页面的路由“pages/second”。示例如下: - - ```json - { - "module": { - "js": [ - { - "pages": [ - "pages/index", - "pages/second" - ] - } - ] - } - } - ``` - -2. 添加文本及按钮。 - - 参照第一个页面,在第二个页面添加Text组件、Button组件等,并设置其样式。“**second.ets**”文件的示例如下: - - ```ts - // second.ets - @Entry - @Component - struct Second { - @State message: string = 'Hi there' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('Back') - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('40%') - .height('5%') - } - .width('100%') - } - .height('100%') - } - } - ``` - - -## 实现页面间的跳转 - -页面间的导航可以通过[页面路由router](../reference/apis/js-apis-router.md)来实现。页面路由router根据页面url找到目标页面,从而实现跳转。使用页面路由请导入router模块。 - -1. 第一个页面跳转到第二个页面。 - - 在第一个页面中,跳转按钮绑定onClick事件,点击按钮时跳转到第二页。“**index.ets**”文件的示例如下: - - ```ts - // index.ets - // 导入页面路由模块 - import router from '@ohos.router'; - - @Entry - @Component - struct Index { - @State message: string = 'Hello World' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - // 添加按钮,以响应用户点击 - Button() { - Text('Next') - .fontSize(30) - .fontWeight(FontWeight.Bold) - } - .type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('40%') - .height('5%') - // 跳转按钮绑定onClick事件,点击时跳转到第二页 - .onClick(() => { - router.push({ url: 'pages/second' }) - // 若为API 9工程,则可使用以下接口 - // router.pushUrl({ url: 'pages/second' }) - - }) - } - .width('100%') - } - .height('100%') - } - } - ``` - -2. 第二个页面返回到第一个页面。 - - 在第二个页面中,返回按钮绑定onClick事件,点击按钮时返回到第一页。“**second.ets**”文件的示例如下: - - ```ts - // second.ets - // 导入页面路由模块 - import router from '@ohos.router'; - - @Entry - @Component - struct Second { - @State message: string = 'Hi there' - - build() { - Row() { - Column() { - Text(this.message) - .fontSize(50) - .fontWeight(FontWeight.Bold) - Button() { - Text('Back') - .fontSize(25) - .fontWeight(FontWeight.Bold) - } - .type(ButtonType.Capsule) - .margin({ - top: 20 - }) - .backgroundColor('#0D9FFB') - .width('40%') - .height('5%') - // 返回按钮绑定onClick事件,点击按钮时返回到第一页 - .onClick(() => { - router.back() - }) - } - .width('100%') - } - .height('100%') - } - } - ``` - -3. 打开index.ets文件,点击预览器中的![zh-cn_image_0000001311015192](figures/zh-cn_image_0000001311015192.png)按钮进行刷新。效果如下图所示: - - ![zh-cn_image_0000001364254729](figures/zh-cn_image_0000001364254729.png) - - -## 使用真机运行应用 - -1. 将搭载OpenHarmony标准系统的开发板与电脑连接。 - -2. 点击**File** > **Project Structure...** > **Project** > **SigningConfigs** 界面勾选“**Automatically generate signature**”,等待自动签名完成即可,点击“**OK**”。如下图所示: - - ![signConfig](figures/signConfig.png) - -3. 在编辑窗口右上角的工具栏,点击![zh-cn_image_0000001364054485](figures/zh-cn_image_0000001364054485.png)按钮运行。效果如下图所示: - - ![zh-cn_image_0000001364254729](figures/zh-cn_image_0000001364254729.png) - -恭喜您已经使用ArkTS语言开发(FA模型)完成了第一个OpenHarmony应用,快来[探索更多的OpenHarmony功能](../application-dev-guide.md)吧。 diff --git a/zh-cn/application-dev/quick-start/start-with-ets-stage.md b/zh-cn/application-dev/quick-start/start-with-ets-stage.md index 4ebd11ba03a96828fd31457093a0cce1161708ba..004ec08a357cc6bf5b418243ba767cb1a86e25b3 100644 --- a/zh-cn/application-dev/quick-start/start-with-ets-stage.md +++ b/zh-cn/application-dev/quick-start/start-with-ets-stage.md @@ -1,51 +1,131 @@ # 使用ArkTS语言开发(Stage模型) -> **说明:** -> -> 请使用**DevEco Studio V3.0.0.900 Beta3**及更高版本。 -> -> 为确保运行效果,本文以使用**DevEco Studio 3.1 Beta2**版本为例,点击[此处](https://developer.harmonyos.com/cn/develop/deveco-studio)获取下载链接。 - +> **说明:** +> +> 请使用**DevEco Studio V3.0.0.900 Beta3**及更高版本。 +> +> 为确保运行效果,本文以使用**DevEco Studio 4.0 Beta1**版本为例,点击[此处](../../release-notes/OpenHarmony-v4.0-beta1.md#配套关系)获取下载链接。 ## 创建ArkTS工程 -1. 若首次打开**DevEco Studio**,请点击**Create Project**创建工程。如果已经打开了一个工程,请在菜单栏选择**File** > **New** > **Create Project**来创建一个新工程。选择**Application**应用开发(本文以应用开发为例,**Atomic Service**对应为原子化服务开发),选择模板“**Empty Ability**”,点击**Next**进行下一步配置。 +对于不同API版本,创建对应的OpenHarmony工程的步骤不同。主要分为API 9之后的工程创建、API 9及API之前的工程创建两种。 + +此处分别以创建API 10和创建API 9的OpenHarmony工程为例,给出具体的指导。 + +### 创建API 10的OpenHarmony工程 + +1. 若首次打开**DevEco Studio**,请点击**Create Project**创建工程。如果已经打开了一个工程,请在菜单栏选择**File** > **New** > **Create Project**来创建一个新工程。 + +2. 选择**Application**应用开发(本文以应用开发为例,Atomic Service对应为原子化服务开发),选择模板“**Empty Ability**”,点击**Next**进行下一步配置。 ![createProject](figures/createProject.png) -2. 进入配置工程界面,**Compile SDK**选择“**9**”,**Model** 选择“**Stage**”,其他参数保持默认设置即可。 +3. 进入配置工程界面,**Compile SDK**选择“**3.1.0(API 9)**”,其他参数保持默认设置即可。 ![chooseStageModel](figures/chooseStageModel.png) > **说明:** - > - > 支持使用ArkTS[低代码开发](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/ide-low-code-overview-0000001480179573-V3)方式。 - > + > 支持使用ArkTS低代码开发方式。 + > > 低代码开发方式具有丰富的UI界面编辑功能,通过可视化界面开发方式快速构建布局,可有效降低开发者的上手成本并提升开发者构建UI界面的效率。 - > + > > 如需使用低代码开发方式,请打开上图中的Enable Super Visual开关。 - -3. 点击**Finish**,工具会自动生成示例代码和相关资源,等待工程创建完成。 -4. 工程创建完成后,在**entry > build-profile.json5**文件中,将targets中的runtimeOS改为“OpenHarmony”,然后点击右上角提示框的**Sync Now**以进行OpenHarmony应用开发。 +4. 点击**Finish**,工具会自动生成示例代码和相关资源,等待工程创建完成。 + +5. 工程创建完成后,在应用级**build-profile.json5**文件中,将**compileSdkVersion**和**compatibleSdkVersion**字段从**app**下迁移到当前选中的products中。当前生效的products可以通过点击编辑区域右上方![zh-cn_image_0000001609333677](figures/zh-cn_image_0000001609333677.png)图标进行查看。 + + ![changeToAPI10](figures/changeToAPI10.png) + +6. 请将**targetSdkVersion**从9改为10,并配置**runtimeOS**为“**OpenHarmony**”。 + + ![targetSdkVersion](figures/targetSdkVersion.png) + +7. 将其他各模块级别的build-profile.json5文件中targets字段下的runtimeOS配置删除。 + + ![deleteRuntimeOS](figures/deleteRuntimeOS.png) +8. 单击Sync Now完成同步。此时工程对应为API 10的OpenHarmony工程。 + +### 创建API 9的OpenHarmony工程 + +1. 若首次打开**DevEco Studio**,请点击**Create Project**创建工程。如果已经打开了一个工程,请在菜单栏选择**File** > **New** > **Create Project**来创建一个新工程。 + +2. 选择**Application**应用开发(本文以应用开发为例,Atomic Service对应为原子化服务开发),选择模板“**Empty Ability**”,点击**Next**进行下一步配置。 + + ![createProject](figures/createProject.png) + +3. 进入配置工程界面,**Compile SDK**选择“**3.1.0(API 9)**”,其他参数保持默认设置即可。 + + ![chooseStageModel](figures/chooseStageModel.png) + + > **说明:** + > 支持使用ArkTS低代码开发方式。 + > + > 低代码开发方式具有丰富的UI界面编辑功能,通过可视化界面开发方式快速构建布局,可有效降低开发者的上手成本并提升开发者构建UI界面的效率。 + > + > 如需使用低代码开发方式,请打开上图中的Enable Super Visual开关。 -## ArkTS工程目录结构(Stage模型) +4. 点击**Finish**,工具会自动生成示例代码和相关资源,等待工程创建完成。 + +5. 在模块级**entry > build-profile.json5**文件中,将targets中的**runtimeOS**配置为“**OpenHarmony**”。 + +6. 单击Sync Now完成同步。此时工程对应为API 9的OpenHarmony工程。 + + +## ArkTS工程目录结构(Stage模型)(API 10) ![zh-cn_image_0000001364054489](figures/zh-cn_image_0000001364054489.png) -- **AppScope > app.json5**:应用的全局配置信息。 +- **AppScope > app.json5**:应用的全局配置信息。 + - **entry**:OpenHarmony工程模块,编译构建生成一个[HAP](../../glossary.md#hap)包。 - **src > main > ets**:用于存放ArkTS源码。 + - **src > main > ets > entryability**:应用/服务的入口。 + - **src > main > ets > pages**:应用/服务包含的页面。 + - **src > main > resources**:用于存放应用/服务所用到的资源文件,如图形、多媒体、字符串、布局文件等。关于资源文件,详见[资源文件的分类](resource-categories-and-access.md#资源分类)。 - - **src > main > module.json5**:模块配置文件。主要包含HAP的配置信息、应用/服务在具体设备上的配置信息以及应用/服务的全局配置信息。具体的配置文件说明,详见[module.json5配置文件](module-configuration-file.md)。 - - **build-profile.json5**:当前的模块信息 、编译信息配置项,包括buildOption、targets配置等。其中targets中可配置当前运行环境,默认为HarmonyOS。若需开发OpenHarmony应用,则需开发者自行修改为OpenHarmony。 + + - **src > main > module.json5**:模块配置文件。主要包含HAP包的配置信息、应用/服务在具体设备上的配置信息以及应用/服务的全局配置信息。具体的配置文件说明,详见[module.json5配置文件](module-configuration-file.md)。 + + - **build-profile.json5**:当前的模块信息 、编译信息配置项,包括buildOption、targets配置等。 + - **hvigorfile.ts**:模块级编译构建任务脚本,开发者可以自定义相关任务和代码实现。 -- **oh_modules**:用于存放三方库依赖信息。关于原npm工程适配ohpm操作,请参考[历史工程手动迁移](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/project_overview-0000001053822398-V3#section108143331212)。 -- **build-profile.json5**:应用级配置信息,包括签名、产品配置等。 + +- **oh_modules**:用于存放三方库依赖信息。关于原npm工程适配ohpm操作,请参考[历史工程迁移](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/project_overview-0000001053822398-V3#section108143331212)。 + +- **build-profile.json5**:应用级配置信息,包括签名signingConfigs、产品配置products等。其中products中的runtimeOS可配置当前运行环境,默认为"HarmonyOS",若需开发OpenHarmony应用,则需开发者自行修改为"OpenHarmony"。 + +- **hvigorfile.ts**:应用级编译构建任务脚本。 + +## ArkTS工程目录结构(Stage模型)(API 9) + +![zh-cn_image_0000001364054489](figures/zh-cn_image_0000001364054489.png) + +- **AppScope > app.json5**:应用的全局配置信息。 + +- **entry**:OpenHarmony工程模块,编译构建生成一个[HAP](../../glossary.md#hap)包。 + - **src > main > ets**:用于存放ArkTS源码。 + + - **src > main > ets > entryability**:应用/服务的入口。 + + - **src > main > ets > pages**:应用/服务包含的页面。 + + - **src > main > resources**:用于存放应用/服务所用到的资源文件,如图形、多媒体、字符串、布局文件等。关于资源文件,详见[资源文件的分类](resource-categories-and-access.md#资源分类)。 + + - **src > main > module.json5**:模块配置文件。主要包含HAP包的配置信息、应用/服务在具体设备上的配置信息以及应用/服务的全局配置信息。具体的配置文件说明,详见[module.json5配置文件](module-configuration-file.md)。 + + - **build-profile.json5**:当前的模块信息 、编译信息配置项,包括buildOption、targets配置等。其中targets中的runtimeOS可配置当前运行环境,默认为"HarmonyOS",若需开发OpenHarmony应用,则需开发者自行修改为"OpenHarmony"。 + + - **hvigorfile.ts**:模块级编译构建任务脚本,开发者可以自定义相关任务和代码实现。 + +- **oh_modules**:用于存放三方库依赖信息。关于原npm工程适配ohpm操作,请参考[历史工程迁移](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/project_overview-0000001053822398-V3#section108143331212)。 + +- **build-profile.json5**:应用级配置信息,包括签名signingConfigs、产品配置products等。 + - **hvigorfile.ts**:应用级编译构建任务脚本。 @@ -127,7 +207,7 @@ ![secondPage](figures/secondPage.png) - > **说明:** + > **说明:** > > 开发者也可以在右键点击“**pages**”文件夹时,选择“**New > Page**”,则无需手动配置相关页面路由。 - 配置第二个页面的路由。在“**Project**”窗口,打开“**entry > src > main > resources > base > profile**”,在main_pages.json文件中的“src”下配置第二个页面的路由“pages/Second”。示例如下: diff --git a/zh-cn/application-dev/quick-start/start-with-js-fa.md b/zh-cn/application-dev/quick-start/start-with-js-fa.md deleted file mode 100644 index 027047b98c7f9f57dde812613cff25a3601a5927..0000000000000000000000000000000000000000 --- a/zh-cn/application-dev/quick-start/start-with-js-fa.md +++ /dev/null @@ -1,237 +0,0 @@ -# 使用JS语言开发(FA模型) - - -> **说明:** -> -> 为确保运行效果,本文以使用**DevEco Studio 3.1 Beta2**版本为例,点击[此处](https://developer.harmonyos.com/cn/develop/deveco-studio#download)获取下载链接。 - - -## 创建JS工程 - -1. 若首次打开**DevEco Studio**,请点击**Create Project**创建工程。如果已经打开了一个工程,请在菜单栏选择**File** > **New** > **Create Project**来创建一个新工程。选择**Application**应用开发(本文以应用开发为例,**Atomic Service**对应为原子化服务开发),选择模板“**Empty Ability**”,点击**Next**进行下一步配置。 - - ![createProject](figures/createProject.png) - -2. 进入配置工程界面,**Compile SDK**选择“**8**”(**Compile SDK**选择“**9**”时注意同步选择 **Model** 为“**FA**”,此处以选择“**8**”为例),**Language**选择“**JS**”,其他参数保持默认设置即可。 - - ![chooseFAModel_js](figures/chooseFAModel_js.png) - - > **说明:** - > - > DevEco Studio V2.2 Beta1及更高版本支持使用JS[低代码开发](https://developer.harmonyos.com/cn/docs/documentation/doc-guides-V3/ide-low-code-overview-0000001480179573-V3)方式。 - > - > 低代码开发方式具有丰富的UI界面编辑功能,通过可视化界面开发方式快速构建布局,可有效降低开发者的上手成本并提升开发者构建UI界面的效率。 - > - > 如需使用低代码开发方式,请打开上图中的Enable Super Visual开关。 - -3. 点击**Finish**,工具会自动生成示例代码和相关资源,等待工程创建完成。 - -4. 工程创建完成后,在**entry > build-profile.json5**文件中,将targets中的runtimeOS改为“OpenHarmony”,然后点击右上角提示框的**Sync Now**以进行OpenHarmony应用开发。 - - -## JS工程目录结构 - -![zh-cn_image_0000001435376433](figures/zh-cn_image_0000001435376433.png) - -- **entry**:OpenHarmony工程模块,编译构建生成一个[HAP](../../glossary.md#hap)包。 - - **src > main > js**:用于存放js源码。 - - **src > main > js > MainAbility**:应用/服务的入口。 - - **src > main > js > MainAbility > i18n**:用于配置不同语言场景资源内容,比如应用文本词条、图片路径等资源。 - - **src > main > js > MainAbility > pages**:MainAbility包含的页面。 - - **src > main > js > MainAbility > app.js**:承载Ability生命周期。 - - - **src > main > resources**:用于存放应用/服务所用到的资源文件,如图形、多媒体、字符串、布局文件等。关于资源文件,详见[资源限定与访问](../ui/js-framework-resource-restriction.md)。 - - **src > main > config.json**:模块配置文件。主要包含HAP的配置信息、应用/服务在具体设备上的配置信息以及应用/服务的全局配置信息。具体的配置文件说明,详见[应用配置文件(FA模型)](application-configuration-file-overview-fa.md)。 - - **build-profile.json5**:当前的模块信息 、编译信息配置项,包括buildOption、targets配置等。其中targets中可配置当前运行环境,默认为HarmonyOS。若需开发OpenHarmony应用,则需开发者自行修改为OpenHarmony。 - - **hvigorfile.ts**:模块级编译构建任务脚本,开发者可以自定义相关任务和代码实现。 - -- **build-profile.json5**:应用级配置信息,包括签名、产品配置等。 - -- **hvigorfile.ts**:应用级编译构建任务脚本。 - - -## 构建第一个页面 - -1. 使用文本组件。 - - 工程同步完成后,在“**Project**”窗口,点击“**entry > src > main > js > MainAbility > pages> index**”,打开“**index.hml**”文件,设置Text组件内容。“**index.hml**”文件的示例如下: - - ```html - -
- - Hello World - -
- ``` - -2. 添加按钮,并绑定onclick方法。 - - 在默认页面基础上,我们添加一个button类型的input组件,作为按钮响应用户点击,从而实现跳转到另一个页面。“**index.hml**”文件的示例代码如下: - - ```html - -
- - Hello World - - - - -
- ``` - -3. 设置页面样式。 - - 在“**Project**”窗口,点击“**entry > src > main > js > MainAbility > pages> index**”,打开“**index.css**”文件,可以对页面中文本、按钮设置宽高、字体大小、间距等样式。“**index.css**”文件的示例如下: - - ```css - /* index.css */ - .container { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - left: 0px; - top: 0px; - width: 100%; - height: 100%; - } - - .title { - font-size: 100px; - font-weight: bold; - text-align: center; - width: 100%; - margin: 10px; - } - - .btn { - font-size: 60px; - font-weight: bold; - text-align: center; - width: 40%; - height: 5%; - margin-top: 20px; - } - ``` - -4. 在编辑窗口右上角的侧边工具栏,点击Previewer,打开预览器。第一个页面效果如下图所示: - - ![zh-cn_image_0000001311494592](figures/zh-cn_image_0000001311494592.png) - - -## 构建第二个页面 - -1. 创建第二个页面。 - - 在“**Project**”窗口,打开“**entry > src > main > js > MainAbility**”,右键点击“**pages**”文件夹,选择“**New > Page**”,命名为“**second**”,点击“**Finish**”,即完成第二个页面的创建。可以看到文件目录结构如下: - - ![zh-cn_image_0000001311334944](figures/zh-cn_image_0000001311334944.png) - -2. 添加文本及按钮。 - - 参照第一个页面,在第二个页面添加文本、按钮及点击按钮绑定页面返回等。“**second.hml**”文件的示例如下: - - ```html - -
- - Hi there - - - - -
- ``` - -3. **设置页面样式。**“**second.css**”文件的示例如下: - - ```css - /* second.css */ - .container { - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - left: 0px; - top: 0px; - width: 100%; - height: 100%; - } - - .title { - font-size: 100px; - font-weight: bold; - text-align: center; - width: 100%; - margin: 10px; - } - - .btn { - font-size: 60px; - font-weight: bold; - text-align: center; - width: 40%; - height: 5%; - margin-top: 20px; - } - ``` - - -## 实现页面间的跳转 - -页面间的导航可以通过[页面路由router](../reference/apis/js-apis-router.md)来实现。页面路由router根据页面url找到目标页面,从而实现跳转。使用页面路由请导入router模块。 - -1. 第一个页面跳转到第二个页面。 - - 在第一个页面中,跳转按钮绑定onclick方法,点击按钮时跳转到第二页。“**index.js**”示例如下: - - ```js - // index.js - // 导入页面路由模块 - import router from '@ohos.router'; - - export default { - onclick: function () { - router.push({ - url: "pages/second/second" - }) - } - } - ``` - -2. 第二个页面返回到第一个页面。 - - 在第二个页面中,返回按钮绑定back方法,点击按钮时返回到第一页。“**second.js**”示例如下: - - ```js - // second.js - // 导入页面路由模块 - import router from '@ohos.router'; - - export default { - back: function () { - router.back() - } - } - ``` - -3. 打开index文件夹下的任意一个文件,点击预览器中的![zh-cn_image_0000001311015192](figures/zh-cn_image_0000001311015192.png)按钮进行刷新。效果如下图所示: - - ![zh-cn_image_0000001311175132](figures/zh-cn_image_0000001311175132.png) - - -## 使用真机运行应用 - -1. 将搭载OpenHarmony标准系统的开发板与电脑连接。 - -2. 点击**File** > **Project Structure...** > **Project** > **Signing Configs**界面勾选“**Automatically generate signature**”,等待自动签名完成即可,点击“**OK**”。如下图所示: - - ![signConfig](figures/signConfig.png) - -3. 在编辑窗口右上角的工具栏,点击![zh-cn_image_0000001364054485](figures/zh-cn_image_0000001364054485.png)按钮运行。效果如下图所示: - - ![zh-cn_image_0000001311175132](figures/zh-cn_image_0000001311175132.png) - -恭喜您已经使用JS语言开发(FA模型)完成了第一个OpenHarmony应用,快来[探索更多的OpenHarmony功能](../application-dev-guide.md)吧。 diff --git a/zh-cn/application-dev/reference/apis/Readme-CN.md b/zh-cn/application-dev/reference/apis/Readme-CN.md index bb98cee3a25f87e08a732f6b837f55631c5d02c5..7ce7412ea2c80565879e07ba48ac17a570b60f55 100644 --- a/zh-cn/application-dev/reference/apis/Readme-CN.md +++ b/zh-cn/application-dev/reference/apis/Readme-CN.md @@ -263,6 +263,7 @@ - 文件管理 - [@ohos.file.backup (备份恢复)](js-apis-file-backup.md) + - [@ohos.file.cloudSync (端云同步能力)](js-apis-file-cloudsync.md) - [@ohos.file.cloudSyncManager (端云同步管理)](js-apis-file-cloudsyncmanager.md) - [@ohos.file.environment (目录环境能力)](js-apis-file-environment.md) - [@ohos.file.fileAccess (公共文件访问与管理)](js-apis-fileAccess.md) diff --git a/zh-cn/application-dev/reference/apis/commonEventManager-definitions.md b/zh-cn/application-dev/reference/apis/commonEventManager-definitions.md index 8a1fcacd7419656a7f260b4bef4149cb2b4b0181..638808becc41b7d6d45bdf6ba55fa2ca6b55f3f2 100644 --- a/zh-cn/application-dev/reference/apis/commonEventManager-definitions.md +++ b/zh-cn/application-dev/reference/apis/commonEventManager-definitions.md @@ -737,4 +737,22 @@ Wi-Fi P2P群组信息已更改。 ## [COMMON_EVENT_AUDIO_QUALITY_CHANGE](./common_event/commonEvent-telephony.md) -提示音频质量发生变化。 \ No newline at end of file +提示音频质量发生变化。 + +## [COMMON_EVENT_NET_QUOTA_WARNING10+](./common_event/commonEvent-netmanager.md) +提示网络流量使用达到设定的告警阈值。 + +## [COMMON_EVENT_NET_QUOTA_LIMIT_REMINDED10+](./common_event/commonEvent-netmanager.md) +提示网络流量使用达到设定的上限阈值,仍能继续使用。 + +## [OMMON_EVENT_NET_QUOTA_LIMIT10+](./common_event/commonEvent-netmanager.md) +提示网络流量使用达到设定的上限阈值,不能继续使用。 + +## [COMMON_EVENT_HTTP_PROXY_CHANGE10+](./common_event/commonEvent-netmanager.md) +提示网络Http代理配置信息更新。 + +## [COMMON_EVENT_AIRPLANE_MODE_CHANGED10+](./common_event/commonEvent-netmanager.md) +提示飞行模式状态变化。 + +## [COMMON_EVENT_CONNECTIVITY_CHANGE10+](./common_event/commonEvent-netmanager.md) +提示网络连接状态变化。 \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/common_event/Readme-CN.md b/zh-cn/application-dev/reference/apis/common_event/Readme-CN.md index 5e5593792a6de733e117b9dac1ca64f4254bf86b..94ca5724d3500b7e13674f2c29bcd39db85b0255 100644 --- a/zh-cn/application-dev/reference/apis/common_event/Readme-CN.md +++ b/zh-cn/application-dev/reference/apis/common_event/Readme-CN.md @@ -12,4 +12,4 @@ - [文件管理子系统公共事件定义](commonEvent-filemanagement.md) - [主题框架子系统-锁屏管理公共事件定义](commonEvent-screenlock.md) - [时间时区子系统公共事件定义](commonEvent-time.md) -- [桌面应用-短信公共事件定义](commonEvent-mms.md) \ No newline at end of file +- [桌面应用-短信公共事件定义](commonEvent-mms.md) diff --git a/zh-cn/application-dev/reference/apis/common_event/commonEvent-netmanager.md b/zh-cn/application-dev/reference/apis/common_event/commonEvent-netmanager.md new file mode 100644 index 0000000000000000000000000000000000000000..9b6679fa87b51f8eb513270ce24067f7638279a6 --- /dev/null +++ b/zh-cn/application-dev/reference/apis/common_event/commonEvent-netmanager.md @@ -0,0 +1,57 @@ +# 网络管理子系统公共事件定义 +网络管理子系统面向应用发布如下系统公共事件,应用如需订阅系统公共事件,请参考公共事件[接口文档](../js-apis-commonEventManager.md)。 + + +## COMMON_EVENT_CONNECTIVITY_CHANGE10+ + +提示网络连接状态变化。 + +- 值:usual.event.CONNECTIVITY_CHANGE +- 订阅者所需权限:无 + +各类网络(以太网、WIFI、蜂窝等)在发生连接状态状态变化时(断开、断开中、连接中、已连接等),将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_AIRPLANE_MODE_CHANGED10+ + +提示飞行模式状态变化。 + +- 值:usual.event.AIRPLANE_MODE +- 订阅者所需权限:无 + +在设置系统飞行模式状态后,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_HTTP_PROXY_CHANGE10+ + +提示网络Http代理配置信息更新。 + +- 值:usual.event.HTTP_PROXY_CHANGE +- 订阅者所需权限:无 + +在全局代理、各类网络(以太网、WIFI等)Http代理配置信息发生变化时,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_NET_QUOTA_WARNING10+ + +提示网络流量使用达到设定的告警阈值。 + +- 值:usual.event.QUOTA_WARNING +- 订阅者所需权限:无 + +当网络流量使用达到80%警告值时,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_NET_QUOTA_LIMIT_REMINDED10+ + +提示网络流量使用达到设定的上限阈值,仍能继续使用。 + +- 值:usual.event.NET_QUOTA_LIMIT_REMINDED +- 订阅者所需权限:无 + +当网络流量使用达到设定的上限阈值时,选择继续使用该网络,将会触发事件通知服务发布该系统公共事件。 + +## COMMON_EVENT_NET_QUOTA_LIMIT10+ + +提示网络流量使用达到设定的上限阈值,不能继续使用。 + +- 值:usual.event.NET_QUOTA_LIMIT +- 订阅者所需权限:无 + +当网络流量使用达到设定的上限阈值时,无法使用该网络,将会触发事件通知服务发布该系统公共事件。 \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md b/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md index 59e4e16f3ee4c709bde140f6dfb798734e8bae23..fa70f3bf96b1ec190526dfc3c0fd649ddd7680f1 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md +++ b/zh-cn/application-dev/reference/apis/js-apis-app-ability-wantAgent.md @@ -620,7 +620,7 @@ getWant(agent: WantAgent): Promise\ | 类型 | 说明 | | ----------------------------------------------------------- | ------------------------------------------------------------ | -| Promise\ | 以Promise形式返回获取WantAgent对象的want。 | +| Promise\<[Want](js-apis-app-ability-want.md)\> | 以Promise形式返回获取WantAgent对象的want。 | **错误码:** diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md index 7de51a3267318e9b7d20dc45bb1b5e2f1150b30e..e117132868ff4472c5327f52621ff032ba13c048 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md +++ b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-BundlePackInfo.md @@ -1,5 +1,5 @@ # BundlePackInfo -此接口为系统 + > **说明:** > 本模块首批接口从API version 9 开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 @@ -9,7 +9,7 @@ **系统接口:** 此接口为系统接口。 -**系统能力:** SystemCapability.BundleManager.BundleFrameWork.FreeInstall +**系统能力:** SystemCapability.BundleManager.BundleFramework.FreeInstall | 名称 | 类型 | 可读 | 可写 | 说明 | @@ -21,7 +21,7 @@ **系统接口:** 此接口为系统接口。 -**系统能力:** SystemCapability.BundleManager.BundleFrameWork.FreeInstall +**系统能力:** SystemCapability.BundleManager.BundleFramework.FreeInstall | 名称 | 类型 | 可读 | 可写 | 说明 | | ------------------- | -------------- | ---- | ---- | ------------------------------------------------------------ | @@ -34,7 +34,7 @@ **系统接口:** 此接口为系统接口。 -**系统能力:** SystemCapability.BundleManager.BundleFrameWork.FreeInstall +**系统能力:** SystemCapability.BundleManager.BundleFramework.FreeInstall | 名称 | 类型 | 可读 | 可写 | 说明 | | ------- | --------------------------------------------- | ---- | ---- | -------------------- | @@ -45,7 +45,7 @@ **系统接口:** 此接口为系统接口。 -**系统能力:** SystemCapability.BundleManager.BundleFrameWork.FreeInstall +**系统能力:** SystemCapability.BundleManager.BundleFramework.FreeInstall | 名称 | 类型 | 可读 | 可写 | 说明 | | ---------- | ------------------- | ---- | ---- | -------------------------------------- | @@ -56,7 +56,7 @@ **系统接口:** 此接口为系统接口。 -**系统能力:** SystemCapability.BundleManager.BundleFrameWork.FreeInstall +**系统能力:** SystemCapability.BundleManager.BundleFramework.FreeInstall | 名称 | 类型 | 可读 | 可写 | 说明 | | ------------------ | ------------------------------------------------- | ---- | ---- | ---------------------------------- | @@ -71,7 +71,7 @@ **系统接口:** 此接口为系统接口。 -**系统能力:** SystemCapability.BundleManager.BundleFrameWork.FreeInstall +**系统能力:** SystemCapability.BundleManager.BundleFramework.FreeInstall | 名称 | 类型 | 可读 | 可写 | 说明 | | ------------------- | ------- | ---- | ---- | ------------------------------------------------------------ | @@ -84,7 +84,7 @@ **系统接口:** 此接口为系统接口。 -**系统能力:** SystemCapability.BundleManager.BundleFrameWork.FreeInstall +**系统能力:** SystemCapability.BundleManager.BundleFramework.FreeInstall | 名称 | 类型 | 可读 | 可写 | 说明 | | ------- | ------------------------------------------- | ---- | ---- | ------------------------------------------------------------ | @@ -97,7 +97,7 @@ **系统接口:** 此接口为系统接口。 -**系统能力:** SystemCapability.BundleManager.BundleFrameWork.FreeInstall +**系统能力:** SystemCapability.BundleManager.BundleFramework.FreeInstall | 名称 | 类型 | 可读 | 可写 | 说明 | | ----- | ------------------------------------------- | ---- | ---- | ------------------------------------------------------------ | @@ -108,7 +108,7 @@ **系统接口:** 此接口为系统接口。 -**系统能力:** SystemCapability.BundleManager.BundleFrameWork.FreeInstall +**系统能力:** SystemCapability.BundleManager.BundleFramework.FreeInstall | 名称 | 类型 | 可读 | 可写 | 说明 | | ------------------- | -------------- | ---- | ---- | ------------------------------------------------------------ | @@ -124,7 +124,7 @@ **系统接口:** 此接口为系统接口。 -**系统能力:** SystemCapability.BundleManager.BundleFrameWork.FreeInstall +**系统能力:** SystemCapability.BundleManager.BundleFramework.FreeInstall | 名称 | 类型 | 可读 | 可写 | 说明 | | ----------- | ------ | ---- | ---- | -------------------- | @@ -136,7 +136,7 @@ **系统接口:** 此接口为系统接口。 -**系统能力:** SystemCapability.BundleManager.BundleFrameWork.FreeInstall +**系统能力:** SystemCapability.BundleManager.BundleFramework.FreeInstall | 名称 | 类型 | 可读 | 可写 | 说明 | | ------------------------ | ------ | ---- | ---- | ------------------------------------------------------------ | diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-businessAbilityInfo.md b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-businessAbilityInfo.md index deeea708b336bd3a01788a178a6353ff29bbeac8..f1125c973462fdc53d4dba759f1e1b7be0ca1be7 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-businessAbilityInfo.md +++ b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-businessAbilityInfo.md @@ -7,6 +7,8 @@ ## BusinessAbilityInfo +**系统接口:** 此接口为系统接口。 + **系统能力**: SystemCapability.BundleManager.BundleFramework.Core | 名称 | 类型 | 可读 | 可写 | 说明 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-overlayModuleInfo.md b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-overlayModuleInfo.md index aaf0668397c0db56c7e0a0ff22eabab2325fc20d..3f876c6423b16b95b93b5337eecc6c4785b619be 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-overlayModuleInfo.md +++ b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-overlayModuleInfo.md @@ -7,7 +7,7 @@ OverlayModuleInfo信息,系统应用可以通过[overlay.getOverlayModuleInfoB ## OverlayModuleInfo - **系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Overlay。 + **系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。 | 名称 | 类型 | 可读 | 可写 | 说明 | | --------------------- | ---------------------------------------------------| ---- | ---- | ---------------------------------------------- | diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-sharedBundleInfo.md b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-sharedBundleInfo.md index 7a3f872517b48c574436a6f94ca3d646a8022cf7..a5d0221af888345e1218992c84692c796227b796 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-bundleManager-sharedBundleInfo.md +++ b/zh-cn/application-dev/reference/apis/js-apis-bundleManager-sharedBundleInfo.md @@ -9,6 +9,8 @@ 共享包信息。 +**系统接口:** 此接口为系统接口。 + **系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。 | 名称 | 类型 | 可读 | 可写 | 说明 | @@ -21,6 +23,8 @@ 共享模块信息。 + **系统接口:** 此接口为系统接口。 + **系统能力:** 以下各项对应的系统能力均为SystemCapability.BundleManager.BundleFramework.Core。 | 名称 | 类型 | 可读 | 可写 | 说明 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md b/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md index 259468e780611d43118df19a112ae6de100f583d..ecc84983da84273f642721bd04727850d869948b 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-bundleManager.md @@ -114,6 +114,7 @@ Ability组件信息标志,指示需要获取的Ability组件信息的内容。 | PRINT10+ | 15 | PrintExtensionAbility:文件打印扩展能力,提供应用打印照片、文档等办公场景。当前支持图片打印,文档类型暂未支持。 | | PUSH10+ | 17 | PushExtensionAbility:推送扩展能力,提供推送场景化消息能力。预留能力,当前暂未支持。 | | DRIVER10+ | 18 | DriverExtensionAbility:驱动扩展能力,提供外设驱动扩展能力,当前暂未支持。 | +| APP_ACCOUNT_AUTHORIZATION10+ | 19 | AuthorizationExtensionAbility:应用帐号认证扩展能力,用于处理帐号授权的请求,允许第三方(相对于操作系统厂商)生态平台的帐号授权。 | | UNSPECIFIED | 255 | 不指定类型,配合queryExtensionAbilityInfo接口可以查询所有类型的ExtensionAbility。 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-device-manager.md b/zh-cn/application-dev/reference/apis/js-apis-device-manager.md index e584fbb5c0e6b12d847858e83cc5a908c6b8d943..d4ffb979bdb42d22c2e97e992da1dfa7fd93e01a 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-device-manager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-device-manager.md @@ -283,6 +283,46 @@ getTrustedDeviceListSync(): Array<DeviceInfo> } ``` +### getTrustedDeviceListSync10+ + +getTrustedDeviceListSync(isRefresh: boolean): Array<DeviceInfo> + +打开软总线系统端的心跳模式,让周围处于下线状态的可信设备快速上线,同时刷新已上线的可信设备列表。 + +**需要权限**:ohos.permission.ACCESS_SERVICE_DM + +**系统能力**:SystemCapability.DistributedHardware.DeviceManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------------- | --------------------------------- | ---- | ---------------------------------- | +| isRefresh | boolean | 是 | 是否打开心跳模式,刷新可信列表。 | + +**返回值:** + +| 名称 | 说明 | +| -------------------------------------- | ---------------- | +| Array<[DeviceInfo](#deviceinfo)> | 返回可信设备列表。 | + +**错误码:** + +以下的错误码的详细介绍请参见[设备管理错误码](../errorcodes/errorcode-device-manager.md) + +| 错误码ID | 错误信息 | +| -------- | --------------------------------------------------------------- | +| 11600101 | Failed to execute the function. | + +**示例:** + + ```js + try { + var deviceInfoList = dmInstance.getTrustedDeviceListSync(true); + } catch (err) { + console.error("getTrustedDeviceListSync errCode:" + err.code + ",errMessage:" + err.message); + } + ``` + ### getTrustedDeviceList8+ getTrustedDeviceList(callback:AsyncCallback<Array<DeviceInfo>>): void @@ -331,14 +371,6 @@ getTrustedDeviceList(): Promise<Array<DeviceInfo>> | ---------------------------------------- | --------------------- | | Promise<Array<[DeviceInfo](#deviceinfo)>> | Promise实例,用于获取异步返回结果。 | -**错误码:** - -以下的错误码的详细介绍请参见[设备管理错误码](../errorcodes/errorcode-device-manager.md) - -| 错误码ID | 错误信息 | -| -------- | --------------------------------------------------------------- | -| 11600101 | Failed to execute the function. | - **示例:** ```js @@ -431,14 +463,6 @@ getLocalDeviceInfo(): Promise<DeviceInfo> | ---------------------------------------- | --------------------- | | Promise<[DeviceInfo](#deviceinfo)> | Promise实例,用于获取异步返回结果。 | -**错误码:** - -以下的错误码的详细介绍请参见[设备管理错误码](../errorcodes/errorcode-device-manager.md) - -| 错误码ID | 错误信息 | -| ------- | --------------------------------------------------------------- | -| 11600101| Failed to execute the function. | - **示例:** ```js diff --git a/zh-cn/application-dev/reference/apis/js-apis-file-cloudsync.md b/zh-cn/application-dev/reference/apis/js-apis-file-cloudsync.md new file mode 100644 index 0000000000000000000000000000000000000000..e09800ce42262ced6c820f3902d829d2d5b8cb33 --- /dev/null +++ b/zh-cn/application-dev/reference/apis/js-apis-file-cloudsync.md @@ -0,0 +1,642 @@ +# @ohos.file.cloudSync (端云同步能力) + +该模块向应用提供端云同步能力,包括启动/停止端云同步以及启动/停止原图下载功能。 + +> **说明:** +> +> - 本模块首批接口从API version 10开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 +> - 本模块接口为系统接口,三方应用不支持调用。 + +## 导入模块 + +```js +import cloudSync from '@ohos.file.cloudSync' +``` + +## SyncState + +端云同步状态,为枚举类型。 + +> **说明:** +> +> 以下同步状态发生变更时,如果应用注册了同步过程事件监听,则通过回调通知应用。 + +**系统能力**: SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +| 名称 | 值| 说明 | +| ----- | ---- | ---- | +| UPLOADING | 0 | 上行同步中 | +| UPLOAD_FAILED | 1 | 上行同步失败 | +| DOWNLOADING | 2 | 下行同步中 | +| DOWNLOAD_FAILED | 3 | 下行同步失败 | +| COMPLETED | 4 | 同步成功 | +| STOPPED | 5 | 同步已停止 | + +## ErrorType + +端云同步失败类型,为枚举类型。 + +- 当前阶段,同步过程中,当移动数据网络和WIFI均不可用时,才会返回NETWORK_UNAVAILABLE;若有一种类型网络可用,则能正常同步。 +- 同步过程中,非充电场景下,电量低于15%,完成当前批上行同步后停止同步,返回低电量;电量低于10%,完成当前批上行同步后停止同步,返回告警电量。 +- 触发同步时,非充电场景下,若电量低于15%,则不允许同步,start接口返回对应错误。 +- 上行时,若云端空间不足,则文件上行失败,云端无该文件记录。 +- 下行时,若本地空间不足,则文件下行失败,本地空间释放后再次同步会重新下行。 + +**系统能力**: SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +| 名称 | 值| 说明 | +| ----- | ---- | ---- | +| NO_ERROR | 0 | 没有错误 | +| NETWORK_UNAVAILABLE | 1 | 所有网络不可用 | +| WIFI_UNAVAILABLE | 2 | WIFI不可用 | +| BATTERY_LEVEL_LOW | 3 | 低电量(低于15%) | +| BATTERY_LEVEL_WARNING | 4 | 告警电量(低于10%) | +| CLOUD_STORAGE_FULL | 5 | 云端空间不足 | +| LOCAL_STORAGE_FULL | 6 | 本地空间不足 | + +## SyncProgress + +端云同步过程。 + +**系统能力**: SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +| 名称 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| state | [SyncState](#syncstate) | 是 | 枚举值,端云同步状态| +| error | [ErrorType](#errortype) | 是 | 枚举值,同步失败错误类型| + +## GallerySync + +云图同步对象,用来支撑图库应用媒体资源端云同步流程。在使用前,需要先创建GallerySync实例。 + +### constructor + +constructor() + +端云同步流程的构造函数,用于获取GallerySync类的实例。 + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +**示例:** + + ```js + let gallerySync = new cloudSync.GallerySync() + ``` + +### on + +on(evt: 'progress', callback: (pg: SyncProgress) => void): void + +添加同步过程事件监听。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| evt | string | 是 | 订阅的事件类型,取值为'progress'(同步过程事件) | +| callback | (pg: SyncProgress) => void | 是 | 同步过程事件回调,回调入参为[SyncProgress](#syncprogress), 返回值为void| + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | +| 13600001 | IPC error. | + +**示例:** + + ```js + let gallerySync = new cloudSync.GallerySync(); + + gallerySync.on('progress', (pg: SyncProgress) => { + console.info("syncState:" + pg.syncState); + }); + ``` + +### off + +off(evt: 'progress'): void + +移除同步过程事件监听。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| evt | string | 是 | 取消订阅的事件类型,取值为'progress'(同步过程事件)| + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | +| 13600001 | IPC error. | + +**示例:** + + ```js + let gallerySync = new cloudSync.GallerySync(); + + gallerySync.on('progress', (pg: SyncProgress) => { + console.info("syncState:" + pg.syncState); + }); + + gallerySync.off('progress'); + ``` + +### start + +start(): Promise<void> + +异步方法启动端云同步, 以Promise形式返回结果。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +**返回值:** + +| 类型 | 说明 | +| --------------------- | ---------------- | +| Promise<void> | 使用Promise形式返回启动端云同步的结果 | + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | +| 22400001 | Cloud status not ready. | +| 22400002 | Network unavailable. | +| 22400003 | Battery level warning. | + +**示例:** + + ```js + let gallerySync = new cloudSync.GallerySync(); + + gallerySync.on('progress', (pg: SyncProgress) => { + console.info("syncState:" + pg.syncState); + }); + + gallerySync.start().then(function() { + console.info("start sync successfully"); + }).catch(function(err) { + console.info("start sync failed with error message: " + err.message + ", error code: " + err.code); + }); + ``` + +### start + +start(callback: AsyncCallback<void>): void + +异步方法启动端云同步, 以callback形式返回结果。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| callback | AsyncCallback<void> | 是 | 异步启动端云同步的回调 | + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | +| 22400001 | Cloud status not ready. | +| 22400002 | Network unavailable. | +| 22400003 | Battery level warning. | + +**示例:** + + ```js + let gallerySync = new cloudSync.GallerySync(); + + gallerySync.start((err) => { + if (err) { + console.info("start sync failed with error message: " + err.message + ", error code: " + err.code); + } else { + console.info("start sync successfully"); + } + }); + ``` + +### stop + +stop(): Promise<void> + +异步方法停止端云同步, 以Promise形式返回结果。 + +> **说明:** +> +> 调用stop接口,同步流程会停止。再次调用[start](#start)接口会继续同步。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +**返回值:** + +| 类型 | 说明 | +| --------------------- | ---------------- | +| Promise<void> | 使用Promise形式返回停止端云同步的结果 | + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | + +**示例:** + + ```js + let gallerySync = new cloudSync.GallerySync(); + + gallerySync.stop().then(function() { + console.info("stop sync successfully"); + }).catch(function(err) { + console.info("stop sync failed with error message: " + err.message + ", error code: " + err.code); + }); + ``` + +### stop + +stop(callback: AsyncCallback<void>): void + +异步方法停止端云同步, 以callback形式返回结果。 + +> **说明:** +> +> 调用stop接口,同步流程会停止。再次调用[start](#start)接口会继续同步。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| callback | AsyncCallback<void> | 是 | 异步停止端云同步的回调 | + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | + +**示例:** + + ```js + let gallerySync = new cloudSync.GallerySync(); + + gallerySync.stop((err) => { + if (err) { + console.info("stop sync failed with error message: " + err.message + ", error code: " + err.code); + } else { + console.info("stop sync successfully"); + } + }); + ``` + +## State + +云文件下载状态,为枚举类型。 + +**系统能力**: SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +| 名称 | 值| 说明 | +| ----- | ---- | ---- | +| RUNNING | 0 | 云文件正在下载中 | +| COMPLETED | 1 | 云文件下载完成 | +| FAILED | 2 | 云文件下载失败 | +| STOPPED | 3 | 云文件下载已停止 | + +## DownloadProgress + +云文件下载过程。 + +**系统能力**: SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +| 名称 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| state | [State](#state) | 是 | 枚举值,云文件下载状态| +| processed | number | 是 | 已下载数据大小| +| size | number | 是 | 当前云文件大小| +| uri | string | 是 | 当前云文件uri| + +## Download + +云文件下载对象,用来支撑图库应用原图文件下载流程。在使用前,需要先创建Download实例。 + +### constructor + +constructor() + +云文件下载流程的构造函数,用于获取Download类的实例。 + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +**示例:** + + ```js + let download = new cloudSync.Download() + ``` + +### on + +on(evt: 'progress', callback: (pg: DownloadProgress) => void): void + +添加云文件下载过程事件监听。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| evt | string | 是 | 订阅的事件类型,取值为'progress'(下载过程事件)| +| callback | (pg: DownloadProgress) => void | 是 | 云文件下载过程事件回调,回调入参为[DownloadProgress](#downloadprogress), 返回值为void| + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | +| 13600001 | IPC error. | + +**示例:** + + ```js + let download = new cloudSync.Download(); + + download.on('progress', (pg: DownloadProgress) => { + console.info("download state:" + pg.state); + }); + ``` + +### off + +off(evt: 'progress'): void + +移除云文件下载过程事件监听。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| evt | string | 是 | 取消订阅的事件类型,取值为'progress'(下载过程事件)| + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | +| 13600001 | IPC error. | + +**示例:** + + ```js + let download = new cloudSync.Download(); + + download.on('progress', (pg: DownloadProgress) => { + console.info("download state:" + pg.state); + }); + + download.off('progress'); + ``` + +### start + +start(uri: string): Promise<void> + +异步方法启动云文件下载, 以Promise形式返回结果。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| uri | string | 是 | 待下载文件uri | + +**返回值:** + +| 类型 | 说明 | +| --------------------- | ---------------- | +| Promise<void> | 使用Promise形式返回启动云文件下载的结果 | + +**示例:** + + ```js + let download = new cloudSync.Download(); + + download.on('progress', (pg: DownloadProgress) => { + console.info("download state:" + pg.state); + }); + + download.start().then(function() { + console.info("start download successfully"); + }).catch(function(err) { + console.info("start download failed with error message: " + err.message + ", error code: " + err.code); + }); + ``` + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | +| 13900002 | No such file or directory. | +| 13900025 | No space left on device. | + +### start + +start(uri: string, callback: AsyncCallback<void>): void + +异步方法启动云文件下载, 以callback形式返回结果。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| uri | string | 是 | 待下载文件uri | +| callback | AsyncCallback<void> | 是 | 异步启动云文件下载的回调 | + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | +| 13900002 | No such file or directory. | +| 13900025 | No space left on device. | + +**示例:** + + ```js + let download = new cloudSync.Download(); + + download.start((err) => { + if (err) { + console.info("start download failed with error message: " + err.message + ", error code: " + err.code); + } else { + console.info("start download successfully"); + } + }); + ``` + +### stop + +stop(uri: string): Promise<void> + +异步方法停止云文件下载, 以Promise形式返回结果。 + +> **说明:** +> +> 调用stop接口, 当前文件下载流程会终止, 缓存文件会被删除,再次调用start接口会重新开始下载 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| uri | string | 是 | 待下载文件uri | + +**返回值:** + +| 类型 | 说明 | +| --------------------- | ---------------- | +| Promise<void> | 使用Promise形式返回停止云文件下载的结果 | + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | + +**示例:** + + ```js + let download = new cloudSync.Download(); + + download.stop().then(function() { + console.info("stop download successfully"); + }).catch(function(err) { + console.info("stop download failed with error message: " + err.message + ", error code: " + err.code); + }); + ``` + +### stop + +stop(uri: string, callback: AsyncCallback<void>): void + +异步方法停止云文件下载, 以callback形式返回结果。 + +> **说明:** +> +> 调用stop接口, 当前文件下载流程会终止, 缓存文件会被删除, 再次调用start接口会重新开始下载 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| uri | string | 是 | 待下载文件uri | +| callback | AsyncCallback<void> | 是 | 异步停止云文件下载的回调 | + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | + +**示例:** + + ```js + let download = new cloudSync.Download(); + + download.stop((err) => { + if (err) { + console.info("stop download failed with error message: " + err.message + ", error code: " + err.code); + } else { + console.info("stop download successfully"); + } + }); + ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-file-cloudsyncmanager.md b/zh-cn/application-dev/reference/apis/js-apis-file-cloudsyncmanager.md index dfb3232075962a2fbb4755c5607c355df0e27709..133fe5ab8bf8bfa2bede4b8cbfa75500c7ce3927 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-file-cloudsyncmanager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-file-cloudsyncmanager.md @@ -1,20 +1,21 @@ # @ohos.file.cloudSyncManager (端云同步管理能力) -该模块向云空间提供通知或更改端云服务状态的能力。 +该模块向云空间应用提供端云同步管理能力,包括使能/去使能端云协同能力、修改应用同步开关,云端数据变化通知以及帐号退出清理/保留云相关文件等。 > **说明:** +> > - 本模块首批接口从API version 10开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 > - 本模块接口为系统接口,三方应用不支持调用。 ## 导入模块 ```js -import cloudSyncManager from '@ohos.file.cloudSyncManager'; +import cloudSyncManager from '@ohos.file.cloudSyncManager' ``` ## cloudSyncManager.changeAppCloudSwitch -changeAppCloudSwitch(accountId: string, bundleName: string, status: boolean): Promise<void>; +changeAppCloudSwitch(accountId: string, bundleName: string, status: boolean): Promise<void> 异步方法修改应用的端云文件同步开关,以Promise形式返回结果。 @@ -24,7 +25,7 @@ changeAppCloudSwitch(accountId: string, bundleName: string, status: boolean): Pr | 参数名 | 类型 | 必填 | 说明 | | ---------- | ------ | ---- | ---- | -| accountId | string | 是 | 帐号| +| accountId | string | 是 | 帐号Id | | bundleName | string | 是 | 应用包名| | status | boolean | 是 | 修改的应用云同步开关状态,true为打开,false为关闭| @@ -37,6 +38,7 @@ changeAppCloudSwitch(accountId: string, bundleName: string, status: boolean): Pr **错误码:** 以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + | 错误码ID | 错误信息 | | ---------------------------- | ---------- | | 201 | Permission verification failed. | @@ -57,7 +59,7 @@ changeAppCloudSwitch(accountId: string, bundleName: string, status: boolean): Pr ## cloudSyncManager.changeAppCloudSwitch -changeAppCloudSwitch(accountId: string, bundleName: string, status: boolean, callback: AsyncCallback<void>): void; +changeAppCloudSwitch(accountId: string, bundleName: string, status: boolean, callback: AsyncCallback<void>): void 异步方法修改应用的端云文件同步开关,以callback形式返回结果。 @@ -67,7 +69,7 @@ changeAppCloudSwitch(accountId: string, bundleName: string, status: boolean, cal | 参数名 | 类型 | 必填 | 说明 | | ---------- | ------ | ---- | ---- | -| accountId | string | 是 | 帐号| +| accountId | string | 是 | 帐号Id| | bundleName | string | 是 | 应用包名| | status | boolean | 是 | 修改的应用云同步开关状态,true为打开,false为关闭| | callback | AsyncCallback<void> | 是 | 异步修改应用的端云文件同步开关之后的回调 | @@ -75,6 +77,7 @@ changeAppCloudSwitch(accountId: string, bundleName: string, status: boolean, cal **错误码:** 以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + | 错误码ID | 错误信息 | | ---------------------------- | ---------- | | 201 | Permission verification failed. | @@ -97,7 +100,7 @@ changeAppCloudSwitch(accountId: string, bundleName: string, status: boolean, cal ## cloudSyncManager.notifyDataChange -notifyDataChange(accountId: string, bundleName: string): Promise<void>; +notifyDataChange(accountId: string, bundleName: string): Promise<void> 异步方法通知端云服务应用的云数据变更,以Promise形式返回结果。 @@ -107,7 +110,7 @@ notifyDataChange(accountId: string, bundleName: string): Promise<void>; | 参数名 | 类型 | 必填 | 说明 | | ---------- | ------ | ---- | ---- | -| accountId | string | 是 | 帐号| +| accountId | string | 是 | 帐号Id| | bundleName | string | 是 | 应用包名| **返回值:** @@ -119,6 +122,7 @@ notifyDataChange(accountId: string, bundleName: string): Promise<void>; **错误码:** 以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + | 错误码ID | 错误信息 | | ---------------------------- | ---------- | | 201 | Permission verification failed. | @@ -139,7 +143,7 @@ notifyDataChange(accountId: string, bundleName: string): Promise<void>; ## cloudSyncManager.notifyDataChange -notifyDataChange(accountId: string, bundleName: string, callback: AsyncCallback<void>): void; +notifyDataChange(accountId: string, bundleName: string, callback: AsyncCallback<void>): void 异步方法通知端云服务应用的云数据变更,以callback形式返回结果。 @@ -149,13 +153,14 @@ notifyDataChange(accountId: string, bundleName: string, callback: AsyncCallback& | 参数名 | 类型 | 必填 | 说明 | | ---------- | ------ | ---- | ---- | -| accountId | string | 是 | 帐号| +| accountId | string | 是 | 帐号Id| | bundleName | string | 是 | 应用包名| | callback | AsyncCallback<void> | 是 | 异步通知端云服务应用的云数据变更之后的回调 | **错误码:** 以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + | 错误码ID | 错误信息 | | ---------------------------- | ---------- | | 201 | Permission verification failed. | @@ -174,4 +179,276 @@ notifyDataChange(accountId: string, bundleName: string, callback: AsyncCallback& console.info("notifyDataChange successfully"); } }); - ``` \ No newline at end of file + ``` + +## cloudSyncManager.enableCloud + +enableCloud(accountId: string, switches: { [bundleName: string]: boolean }): Promise<void> + +异步方法使能端云协同能力,以Promise形式返回结果。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC_MANAGER + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSyncManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| accountId | string | 是 | 帐号Id| +| switches | object | 是 | 应用的端云协同特性使能开关,bundleName为应用包名,开关状态是个boolean类型| + +**返回值:** + +| 类型 | 说明 | +| --------------------- | ---------------- | +| Promise<void> | 使用Promise形式返回使能端云协同能力的结果 | + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | + +**示例:** + + ```js + let accountId = "testAccount"; + let switches = {"com.example.bundleName1": true, "com.example.bundleName2": false}; + cloudSyncManager.enableCloud(accountId, switches).then(function() { + console.info("enableCloud successfully"); + }).catch(function(err) { + console.info("enableCloud failed with error message: " + err.message + ", error code: " + err.code); + }); + ``` + +## cloudSyncManager.enableCloud + +enableCloud(accountId: string, switches: { [bundleName: string]: boolean }, callback: AsyncCallback<void>): void + +异步方法使能端云协同能力,以callback形式返回结果。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC_MANAGER + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSyncManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| accountId | string | 是 | 帐号Id| +| switches | object | 是 | 应用的端云协同特性使能开关,bundleName为应用包名,开关状态是个boolean类型| +| callback | AsyncCallback<void> | 是 | 异步使能端云协同能力之后的回调 | + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | + +**示例:** + + ```js + let accountId = "testAccount"; + let switches = {"com.example.bundleName1": true, "com.example.bundleName2": false}; + cloudSyncManager.enableCloud(accountId, switches, (err) => { + if (err) { + console.info("enableCloud failed with error message: " + err.message + ", error code: " + err.code); + } else { + console.info("enableCloud successfully"); + } + }); + ``` + +## cloudSyncManager.disableCloud + +disableCloud(accountId: string): Promise<void> + +异步方法去使能端云协同能力,以Promise形式返回结果。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC_MANAGER + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSyncManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| accountId | string | 是 | 帐号Id| + +**返回值:** + +| 类型 | 说明 | +| --------------------- | ---------------- | +| Promise<void> | 使用Promise形式返回去使能端云协同能力的结果 | + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | + +**示例:** + + ```js + let accountId = "testAccount"; + cloudSyncManager.disableCloud(accountId).then(function() { + console.info("disableCloud successfully"); + }).catch(function(err) { + console.info("disableCloud failed with error message: " + err.message + ", error code: " + err.code); + }); + ``` + +## cloudSyncManager.disableCloud + +disableCloud(accountId: string, callback: AsyncCallback<void>): void + +异步方法去使能端云协同能力,以callback形式返回结果。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC_MANAGER + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSyncManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| accountId | string | 是 | 帐号Id| +| callback | AsyncCallback<void> | 是 | 异步去使能端云协同能力之后的回调 | + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | + +**示例:** + + ```js + let accountId = "testAccount"; + cloudSyncManager.disableCloud(accountId, (err) => { + if (err) { + console.info("disableCloud failed with error message: " + err.message + ", error code: " + err.code); + } else { + console.info("disableCloud successfully"); + } + }); + ``` + +## Action + +清理本地云相关数据时的Action,为枚举类型。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC_MANAGER + +**系统能力**: SystemCapability.FileManagement.DistributedFileService.CloudSyncManager + +| 名称 | 值| 说明 | +| ----- | ---- | ---- | +| RETAIN_DATA | 0 | 仅清除云端标识,保留本地缓存文件| +| CLEAR_DATA | 1 | 清除云端标识信息,若存在本地缓存文件,一并删除| + +## cloudSyncManager.clean + +clean(accountId: string, appActions: { [bundleName: string]: Action }): Promise<void> + +异步方法清理本地云相关数据,以Promise形式返回结果。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC_MANAGER + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSyncManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| accountId | string | 是 | 帐号Id| +| appActions | object | 是 | 清理动作类型,bundleName为待清理应用包名, [Action](#action)为清理动作类型| + +**返回值:** + +| 类型 | 说明 | +| --------------------- | ---------------- | +| Promise<void> | 使用Promise形式返回清理本地云相关数据的结果 | + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | + +**示例:** + + ```js + let accountId = "testAccount"; + let appActions = {"com.example.bundleName1": cloudSyncManager.Action.RETAIN_DATA, + "com.example.bundleName2": cloudSyncManager.Action.CLEAR_DATA}; + cloudSyncManager.clean(accountId, appActions).then(function() { + console.info("clean successfully"); + }).catch(function(err) { + console.info("clean failed with error message: " + err.message + ", error code: " + err.code); + }); + ``` + +## cloudSyncManager.clean + +clean(accountId: string, appActions: { [bundleName: string]: Action }, callback: AsyncCallback<void>): void + +异步方法去使能端云协同能力,以callback形式返回结果。 + +**需要权限**:ohos.permission.CLOUDFILE_SYNC_MANAGER + +**系统能力**:SystemCapability.FileManagement.DistributedFileService.CloudSyncManager + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | ------ | ---- | ---- | +| accountId | string | 是 | 帐号Id| +| appActions | object | 是 | 清理动作类型,bundleName为待清理应用包名, [Action](#action)为清理动作类型| +| callback | AsyncCallback<void> | 是 | 异步去使能端云协同能力之后的回调 | + +**错误码:** + +以下错误码的详细介绍请参见[文件管理子系统错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| ---------------------------- | ---------- | +| 201 | Permission verification failed. | +| 202 | The caller is not a system application. | +| 401 | The input parameter is invalid. | + +**示例:** + + ```js + let accountId = "testAccount"; + let appActions = {"com.example.bundleName1": cloudSyncManager.Action.RETAIN_DATA, + "com.example.bundleName2": cloudSyncManager.Action.CLEAR_DATA}; + cloudSyncManager.clean(accountId, appActions, (err) => { + if (err) { + console.info("clean failed with error message: " + err.message + ", error code: " + err.code); + } else { + console.info("clean successfully"); + } + }); + ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-file-fs.md b/zh-cn/application-dev/reference/apis/js-apis-file-fs.md index 9a21b42b44bf98920b3463ed66e7cc1091fe4222..6610fa15a0ffc1f49625721d1e7c5b2e058fe575 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-file-fs.md +++ b/zh-cn/application-dev/reference/apis/js-apis-file-fs.md @@ -3187,7 +3187,7 @@ lock(exclusive?: boolean): Promise\ **示例:** ```js - let file = fs.openSync(path, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE); + let file = fs.openSync(pathDir + "/test.txt", fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE); file.lock(true).then(() => { console.log("lock file successful"); }).catch((err) => { @@ -3217,7 +3217,7 @@ lock(exclusive?: boolean, callback: AsyncCallback\): void **示例:** ```js - let file = fs.openSync(path, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE); + let file = fs.openSync(pathDir + "/test.txt", fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE); file.lock(true, (err) => { if (err) { console.info("lock file failed with error message: " + err.message + ", error code: " + err.code); @@ -3248,7 +3248,7 @@ tryLock(exclusive?: boolean): void **示例:** ```js - let file = fs.openSync(path, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE); + let file = fs.openSync(pathDir + "/test.txt", fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE); file.tryLock(true); console.log("lock file successful"); ``` @@ -3268,7 +3268,7 @@ unlock(): void **示例:** ```js - let file = fs.openSync(path, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE); + let file = fs.openSync(pathDir + "/test.txt", fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE); file.tryLock(true); file.unlock(); console.log("unlock file successful"); diff --git a/zh-cn/application-dev/reference/apis/js-apis-font.md b/zh-cn/application-dev/reference/apis/js-apis-font.md index f6ae982eb13e4261083ea2210256057db4e8d354..da339cd568241defdaa9aa34f94b70c7115b7f3b 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-font.md +++ b/zh-cn/application-dev/reference/apis/js-apis-font.md @@ -62,4 +62,104 @@ struct FontExample { } } ``` +## font.getSystemFontList +getSystemFontList(): Array\ + +获取系统支持的字体名称列表。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**返回值:** + +| 类型 | 说明 | +| -------------------- | ----------------- | +| Array\ | 系统的字体名列表。 | + +## 示例 + +```ts +// xxx.ets +import font from '@ohos.font'; + +@Entry +@Component +struct FontExample { + fontList: Array; + build() { + Column() { + Button("getSystemFontList") + .width('60%') + .height('6%') + .onClick(()=>{ + this.fontList = font.getSystemFontList() + }) + }.width('100%') + } +} +``` + +## font.getFontByName + +getFontByName(fontName: string): FontInfo; + +根据传入的系统字体名称获取系统字体的相关信息。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ---------- | --------- | ------- | ------------ | +| fontName | string | 是 | 系统的字体名。 | + +**返回值:** + +| 类型 | 说明 | +| ---------------- | ---------------------------- | +| FontInfo | 字体的详细信息 | + +## FontInfo + +| 名称 | 类型 | 说明 | +| -------------- | ------- | ------------------------- | +| path | string | 系统字体的文件路径。 | +| postScriptName | string | 系统字体的postScript名称。 | +| fullName | string | 系统字体的名称。 | +| family | string | 系统字体的字体家族。 | +| subfamily | string | 系统字体的子字体家族。 | +| weight | number | 系统字体的粗细程度。 | +| width | number | 系统字体的宽窄风格属性。 | +| italic | boolean | 系统字体是否倾斜。 | +| monoSpace | boolean | 系统字体是否紧凑。 | +| symbolic | boolean | 系统字体是否支持符号字体。 | + +```ts +// xxx.ets +import font from '@ohos.font'; + +@Entry +@Component +struct FontExample { + fontList: Array; + fontInfo: font.FontInfo; + build() { + Column() { + Button("getFontByName") + .onClick(() => { + this.fontInfo = font.getFontByName('HarmonyOS Sans Italic') + console.log("getFontByName(): path = " + this.fontInfo.path) + console.log("getFontByName(): postScriptName = " + this.fontInfo.postScriptName) + console.log("getFontByName(): fullName = " + this.fontInfo.fullName) + console.log("getFontByName(): Family = " + this.fontInfo.family) + console.log("getFontByName(): Subfamily = " + this.fontInfo.subfamily) + console.log("getFontByName(): weight = " + this.fontInfo.weight) + console.log("getFontByName(): width = " + this.fontInfo.width) + console.log("getFontByName(): italic = " + this.fontInfo.italic) + console.log("getFontByName(): monoSpace = " + this.fontInfo.monoSpace) + console.log("getFontByName(): symbolic = " + this.fontInfo.symbolic) + }) + }.width('100%') + } +} +``` \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/js-apis-huks.md b/zh-cn/application-dev/reference/apis/js-apis-huks.md index 597cb94a09798cea857bdb77e2a57833d1adfed5..6e2c334470c07278a78baea19537bede7fa10313 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-huks.md +++ b/zh-cn/application-dev/reference/apis/js-apis-huks.md @@ -17,7 +17,7 @@ import huks from '@ohos.security.huks' 调用接口使用的options中的properties数组中的param。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core | 名称 | 类型 | 必填 | 说明 | | ------ | ----------------------------------- | ---- | ------------ | @@ -28,7 +28,7 @@ import huks from '@ohos.security.huks' 调用接口使用的options。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core | 名称 | 类型 | 必填 | 说明 | | ---------- | ----------------- | ---- | ------------------------ | @@ -39,7 +39,7 @@ import huks from '@ohos.security.huks' huks Handle结构体。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core | 名称 | 类型 | 必填 | 说明 | | --------- | ---------- | ---- | ---------------------------------------------------- | @@ -50,7 +50,7 @@ huks Handle结构体。 调用接口返回的result。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core @@ -67,7 +67,7 @@ generateKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback\ 生成密钥,使用Callback回调异步返回结果。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core **参数:** @@ -142,7 +142,7 @@ generateKeyItem(keyAlias: string, options: HuksOptions) : Promise\ 生成密钥,使用Promise方式异步返回结果。基于密钥不出TEE原则,通过promise不会返回密钥材料内容,只用于表示此次调用是否成功。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -216,7 +216,7 @@ deleteKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback\ 删除密钥,使用Promise方式异步返回结果。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -317,7 +317,7 @@ getSdkVersion(options: HuksOptions) : string 获取当前系统sdk版本。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -347,7 +347,7 @@ importKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback\ 导入明文密钥,使用Promise方式异步返回结果。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -524,7 +524,7 @@ attestKeyItem(keyAlias: string, options: HuksOptions, callback: AsyncCallback\ 判断密钥是否存在,使用Promise回调异步返回结果 。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -1432,7 +1432,7 @@ let keyAlias = 'keyAlias'; let emptyOptions = { properties: [] }; -await huks.isKeyItemExist(keyAlias, emptyOptions).then((data) => { +huks.isKeyItemExist(keyAlias, emptyOptions).then((data) => { promptAction.showToast({ message: "keyAlias: " + keyAlias +"is existed!", duration: 500, @@ -1451,7 +1451,7 @@ initSession(keyAlias: string, options: HuksOptions, callback: AsyncCallback\; abortSession操作密钥接口,使用Promise方式异步返回结果。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -2087,7 +2087,7 @@ async function huksAbort() { 关于错误码的具体信息,可在[错误码参考文档](../errorcodes/errorcode-huks.md)中查看。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core | 名称 | 值 | 说明 | | ---------------------------------------------- | -------- |--------------------------- | @@ -2114,25 +2114,25 @@ async function huksAbort() { 表示密钥用途。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core | 名称 | 值 | 说明 | | ------------------------ | ---- | -------------------------------- | -| HUKS_KEY_PURPOSE_ENCRYPT | 1 | 表示密钥用于对明文进行加密操作。 | -| HUKS_KEY_PURPOSE_DECRYPT | 2 | 表示密钥用于对密文进行解密操作。 | -| HUKS_KEY_PURPOSE_SIGN | 4 | 表示密钥用于对数据进行签名。 | -| HUKS_KEY_PURPOSE_VERIFY | 8 | 表示密钥用于验证签名后的数据。 | -| HUKS_KEY_PURPOSE_DERIVE | 16 | 表示密钥用于派生密钥。 | -| HUKS_KEY_PURPOSE_WRAP | 32 | 表示密钥用于加密导出。 | -| HUKS_KEY_PURPOSE_UNWRAP | 64 | 表示密钥加密导入。 | -| HUKS_KEY_PURPOSE_MAC | 128 | 表示密钥用于生成mac消息验证码。 | -| HUKS_KEY_PURPOSE_AGREE | 256 | 表示密钥用于进行密钥协商。 | +| HUKS_KEY_PURPOSE_ENCRYPT | 1 | 表示密钥用于对明文进行加密操作。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_KEY_PURPOSE_DECRYPT | 2 | 表示密钥用于对密文进行解密操作。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_KEY_PURPOSE_SIGN | 4 | 表示密钥用于对数据进行签名。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_KEY_PURPOSE_VERIFY | 8 | 表示密钥用于验证签名后的数据。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_KEY_PURPOSE_DERIVE | 16 | 表示密钥用于派生密钥。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_KEY_PURPOSE_WRAP | 32 | 表示密钥用于加密导出。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_KEY_PURPOSE_UNWRAP | 64 | 表示密钥加密导入。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_KEY_PURPOSE_MAC | 128 | 表示密钥用于生成mac消息验证码。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_KEY_PURPOSE_AGREE | 256 | 表示密钥用于进行密钥协商。
**系统能力:** SystemCapability.Security.Huks.Extension| ## HuksKeyDigest 表示摘要算法。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension | 名称 | 值 | 说明 | | ---------------------- | ---- | ---------------------------------------- | @@ -2149,89 +2149,89 @@ async function huksAbort() { 表示补齐算法。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core | 名称 | 值 | 说明 | | ---------------------- | ---- | ---------------------------------------- | -| HUKS_PADDING_NONE | 0 | 表示不使用补齐算法。 | -| HUKS_PADDING_OAEP | 1 | 表示使用OAEP补齐算法。 | -| HUKS_PADDING_PSS | 2 | 表示使用PSS补齐算法。 | -| HUKS_PADDING_PKCS1_V1_5 | 3 | 表示使用PKCS1_V1_5补齐算法。 | -| HUKS_PADDING_PKCS5 | 4 | 表示使用PKCS5补齐算法。 | -| HUKS_PADDING_PKCS7 | 5 | 表示使用PKCS7补齐算法。 | +| HUKS_PADDING_NONE | 0 | 表示不使用补齐算法。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_PADDING_OAEP | 1 | 表示使用OAEP补齐算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_PADDING_PSS | 2 | 表示使用PSS补齐算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_PADDING_PKCS1_V1_5 | 3 | 表示使用PKCS1_V1_5补齐算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_PADDING_PKCS5 | 4 | 表示使用PKCS5补齐算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_PADDING_PKCS7 | 5 | 表示使用PKCS7补齐算法。
**系统能力:** SystemCapability.Security.Huks.Core| ## HuksCipherMode 表示加密模式。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core | 名称 | 值 | 说明 | | ------------- | ---- | --------------------- | -| HUKS_MODE_ECB | 1 | 表示使用ECB加密模式。 | -| HUKS_MODE_CBC | 2 | 表示使用CBC加密模式。 | -| HUKS_MODE_CTR | 3 | 表示使用CTR加密模式。 | -| HUKS_MODE_OFB | 4 | 表示使用OFB加密模式。 | -| HUKS_MODE_CCM | 31 | 表示使用CCM加密模式。 | -| HUKS_MODE_GCM | 32 | 表示使用GCM加密模式。 | +| HUKS_MODE_ECB | 1 | 表示使用ECB加密模式。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_MODE_CBC | 2 | 表示使用CBC加密模式。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_MODE_CTR | 3 | 表示使用CTR加密模式。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_MODE_OFB | 4 | 表示使用OFB加密模式。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_MODE_CCM | 31 | 表示使用CCM加密模式。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_MODE_GCM | 32 | 表示使用GCM加密模式。
**系统能力:** SystemCapability.Security.Huks.Core| ## HuksKeySize 表示密钥长度。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core | 名称 | 值 | 说明 | | ---------------------------------- | ---- | ------------------------------------------ | -| HUKS_RSA_KEY_SIZE_512 | 512 | 表示使用RSA算法的密钥长度为512bit。 | -| HUKS_RSA_KEY_SIZE_768 | 768 | 表示使用RSA算法的密钥长度为768bit。 | -| HUKS_RSA_KEY_SIZE_1024 | 1024 | 表示使用RSA算法的密钥长度为1024bit。 | -| HUKS_RSA_KEY_SIZE_2048 | 2048 | 表示使用RSA算法的密钥长度为2048bit。 | -| HUKS_RSA_KEY_SIZE_3072 | 3072 | 表示使用RSA算法的密钥长度为3072bit。 | -| HUKS_RSA_KEY_SIZE_4096 | 4096 | 表示使用RSA算法的密钥长度为4096bit。 | -| HUKS_ECC_KEY_SIZE_224 | 224 | 表示使用ECC算法的密钥长度为224bit。 | -| HUKS_ECC_KEY_SIZE_256 | 256 | 表示使用ECC算法的密钥长度为256bit。 | -| HUKS_ECC_KEY_SIZE_384 | 384 | 表示使用ECC算法的密钥长度为384bit。 | -| HUKS_ECC_KEY_SIZE_521 | 521 | 表示使用ECC算法的密钥长度为521bit。 | -| HUKS_AES_KEY_SIZE_128 | 128 | 表示使用AES算法的密钥长度为128bit。 | -| HUKS_AES_KEY_SIZE_192 | 192 | 表示使用AES算法的密钥长度为192bit。 | -| HUKS_AES_KEY_SIZE_256 | 256 | 表示使用AES算法的密钥长度为256bit。 | -| HUKS_AES_KEY_SIZE_512 | 512 | 表示使用AES算法的密钥长度为512bit。 | -| HUKS_CURVE25519_KEY_SIZE_256 | 256 | 表示使用CURVE25519算法的密钥长度为256bit。 | -| HUKS_DH_KEY_SIZE_2048 | 2048 | 表示使用DH算法的密钥长度为2048bit。 | -| HUKS_DH_KEY_SIZE_3072 | 3072 | 表示使用DH算法的密钥长度为3072bit。 | -| HUKS_DH_KEY_SIZE_4096 | 4096 | 表示使用DH算法的密钥长度为4096bit。 | -| HUKS_SM2_KEY_SIZE_2569+ | 256 | 表示SM2算法的密钥长度为256bit。 | -| HUKS_SM4_KEY_SIZE_1289+ | 128 | 表示SM4算法的密钥长度为128bit。 | +| HUKS_RSA_KEY_SIZE_512 | 512 | 表示使用RSA算法的密钥长度为512bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_RSA_KEY_SIZE_768 | 768 | 表示使用RSA算法的密钥长度为768bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_RSA_KEY_SIZE_1024 | 1024 | 表示使用RSA算法的密钥长度为1024bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_RSA_KEY_SIZE_2048 | 2048 | 表示使用RSA算法的密钥长度为2048bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_RSA_KEY_SIZE_3072 | 3072 | 表示使用RSA算法的密钥长度为3072bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_RSA_KEY_SIZE_4096 | 4096 | 表示使用RSA算法的密钥长度为4096bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ECC_KEY_SIZE_224 | 224 | 表示使用ECC算法的密钥长度为224bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ECC_KEY_SIZE_256 | 256 | 表示使用ECC算法的密钥长度为256bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ECC_KEY_SIZE_384 | 384 | 表示使用ECC算法的密钥长度为384bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ECC_KEY_SIZE_521 | 521 | 表示使用ECC算法的密钥长度为521bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_AES_KEY_SIZE_128 | 128 | 表示使用AES算法的密钥长度为128bit。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_AES_KEY_SIZE_192 | 192 | 表示使用AES算法的密钥长度为192bit。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_AES_KEY_SIZE_256 | 256 | 表示使用AES算法的密钥长度为256bit。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_AES_KEY_SIZE_512 | 512 | 表示使用AES算法的密钥长度为512bit。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_CURVE25519_KEY_SIZE_256 | 256 | 表示使用CURVE25519算法的密钥长度为256bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_DH_KEY_SIZE_2048 | 2048 | 表示使用DH算法的密钥长度为2048bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_DH_KEY_SIZE_3072 | 3072 | 表示使用DH算法的密钥长度为3072bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_DH_KEY_SIZE_4096 | 4096 | 表示使用DH算法的密钥长度为4096bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_SM2_KEY_SIZE_2569+ | 256 | 表示SM2算法的密钥长度为256bit。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_SM4_KEY_SIZE_1289+ | 128 | 表示SM4算法的密钥长度为128bit。
**系统能力:** SystemCapability.Security.Huks.Extension| ## HuksKeyAlg 表示密钥使用的算法。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core | 名称 | 值 | 说明 | | ------------------------- | ---- | --------------------- | -| HUKS_ALG_RSA | 1 | 表示使用RSA算法。 | -| HUKS_ALG_ECC | 2 | 表示使用ECC算法。 | -| HUKS_ALG_DSA | 3 | 表示使用DSA算法。 | -| HUKS_ALG_AES | 20 | 表示使用AES算法。 | -| HUKS_ALG_HMAC | 50 | 表示使用HMAC算法。 | -| HUKS_ALG_HKDF | 51 | 表示使用HKDF算法。 | -| HUKS_ALG_PBKDF2 | 52 | 表示使用PBKDF2算法。 | -| HUKS_ALG_ECDH | 100 | 表示使用ECDH算法。 | -| HUKS_ALG_X25519 | 101 | 表示使用X25519算法。 | -| HUKS_ALG_ED25519 | 102 | 表示使用ED25519算法。 | -| HUKS_ALG_DH | 103 | 表示使用DH算法。 | -| HUKS_ALG_SM29+ | 150 | 表示使用SM2算法。 | -| HUKS_ALG_SM39+ | 151 | 表示使用SM3算法。 | -| HUKS_ALG_SM49+ | 152 | 表示使用SM4算法。 | +| HUKS_ALG_RSA | 1 | 表示使用RSA算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ALG_ECC | 2 | 表示使用ECC算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ALG_DSA | 3 | 表示使用DSA算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ALG_AES | 20 | 表示使用AES算法。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_ALG_HMAC | 50 | 表示使用HMAC算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ALG_HKDF | 51 | 表示使用HKDF算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ALG_PBKDF2 | 52 | 表示使用PBKDF2算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ALG_ECDH | 100 | 表示使用ECDH算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ALG_X25519 | 101 | 表示使用X25519算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ALG_ED25519 | 102 | 表示使用ED25519算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ALG_DH | 103 | 表示使用DH算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ALG_SM29+ | 150 | 表示使用SM2算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ALG_SM39+ | 151 | 表示使用SM3算法。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_ALG_SM49+ | 152 | 表示使用SM4算法。
**系统能力:** SystemCapability.Security.Huks.Extension| ## HuksKeyGenerateType 表示生成密钥的类型。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension | 名称 | 值 | 说明 | | ------------------------------ | ---- | ---------------- | @@ -2243,7 +2243,7 @@ async function huksAbort() { 表示密钥的产生方式。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core | 名称 | 值 | 说明 | | -------------------------- | ---- | ------------------------------------ | @@ -2256,20 +2256,20 @@ async function huksAbort() { 表示密钥存储方式。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core | 名称 | 值 | 说明 | | -------------------------------------------- | ---- | ------------------------------ | -| HUKS_STORAGE_TEMP(deprecated) | 0 | 表示通过本地直接管理密钥。
> **说明:** 从API version 10开始废弃,由于开发者正常使用密钥管理过程中并不需要使用此TAG,故无替代接口。针对针对密钥派生场景,可使用HUKS_STORAGE_ONLY_USED_IN_HUKS 与 HUKS_STORAGE_KEY_EXPORT_ALLOWED。 | -| HUKS_STORAGE_PERSISTENT(deprecated) | 1 | 表示通过HUKS service管理密钥。
> **说明:** 从API version 10开始废弃,由于开发者正常使用密钥管理过程中并不需要使用此TAG,故无替代接口。针对密钥派生场景,可使用HUKS_STORAGE_ONLY_USED_IN_HUKS 与 HUKS_STORAGE_KEY_EXPORT_ALLOWED。 | -| HUKS_STORAGE_ONLY_USED_IN_HUKS10+ | 2 | 表示主密钥派生的密钥存储于huks中,由HUKS进行托管 | -| HUKS_STORAGE_KEY_EXPORT_ALLOWED10+ | 3 | 表示主密钥派生的密钥直接导出给业务方,HUKS不对其进行托管服务 | +| HUKS_STORAGE_TEMP(deprecated) | 0 | 表示通过本地直接管理密钥。
> **说明:** 从API version 10开始废弃,由于开发者正常使用密钥管理过程中并不需要使用此TAG,故无替代接口。针对针对密钥派生场景,可使用HUKS_STORAGE_ONLY_USED_IN_HUKS 与 HUKS_STORAGE_KEY_EXPORT_ALLOWED。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_STORAGE_PERSISTENT(deprecated) | 1 | 表示通过HUKS service管理密钥。
> **说明:** 从API version 10开始废弃,由于开发者正常使用密钥管理过程中并不需要使用此TAG,故无替代接口。针对密钥派生场景,可使用HUKS_STORAGE_ONLY_USED_IN_HUKS 与 HUKS_STORAGE_KEY_EXPORT_ALLOWED。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_STORAGE_ONLY_USED_IN_HUKS10+ | 2 | 表示主密钥派生的密钥存储于huks中,由HUKS进行托管
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_STORAGE_KEY_EXPORT_ALLOWED10+ | 3 | 表示主密钥派生的密钥直接导出给业务方,HUKS不对其进行托管服务
**系统能力:** SystemCapability.Security.Huks.Extension| ## HuksSendType 表示发送Tag的方式。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension | 名称 | 值 | 说明 | | -------------------- | ---- | ----------------- | @@ -2280,7 +2280,7 @@ async function huksAbort() { 表示导入加密密钥的算法套件。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension | 名称 | 值 | 说明 | | ---------------------------------------------- | ---- | ----------------------------------------------------- | @@ -2291,7 +2291,7 @@ async function huksAbort() { 表示导入密钥的密钥类型,默认为导入公钥,导入对称密钥时不需要该字段。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension | 名称 | 值 | 说明 | | ------------------------- | ---- | ------------------------------ | @@ -2303,7 +2303,7 @@ async function huksAbort() { 表示Rsa在签名验签、padding为pss时需指定的salt_len类型。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension | 名称 | 值 | 说明 | | ------------------------------------------ | ---- | ---------------------------- | @@ -2314,7 +2314,7 @@ async function huksAbort() { 表示用户认证类型。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension | 名称 | 值 | 说明 | | ------------------------------- | ---- | ------------------------- | @@ -2326,7 +2326,7 @@ async function huksAbort() { 表示安全访问控制类型。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension | 名称 | 值 | 说明 | | --------------------------------------- | ---- | ------------------------------------------------ | @@ -2337,7 +2337,7 @@ async function huksAbort() { 表示密钥使用时生成challenge的类型。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension | 名称 | 值 | 说明 | | ------------------------------- | ---- | ------------------------------ | @@ -2349,7 +2349,7 @@ async function huksAbort() { 表示challenge类型为用户自定义类型时,生成的challenge有效长度仅为8字节连续的数据,且仅支持4种位置 。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension | 名称 | 值 | 说明 | | ------------------------------- | ---- | ------------------------------ | @@ -2362,7 +2362,7 @@ async function huksAbort() { 表示生成或导入密钥时,指定该密钥的签名类型。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension | 名称 | 值 | 说明 | | ------------------------------ | ---- | ------------------------------------------------------------ | @@ -2372,7 +2372,7 @@ async function huksAbort() { 表示Tag的数据类型。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core | 名称 | 值 | 说明 | | --------------------- | ------- | --------------------------------------- | @@ -2387,95 +2387,95 @@ async function huksAbort() { 表示调用参数的Tag。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Core | 名称 | 值 | 说明 | | -------------------------------------------- | ---------------------------------------- | -------------------------------------- | -| HUKS_TAG_INVALID | HuksTagType.HUKS_TAG_TYPE_INVALID \| 0 | 表示非法的Tag。 | -| HUKS_TAG_ALGORITHM | HuksTagType.HUKS_TAG_TYPE_UINT \| 1 | 表示算法的Tag。 | -| HUKS_TAG_PURPOSE | HuksTagType.HUKS_TAG_TYPE_UINT \| 2 | 表示密钥用途的Tag。 | -| HUKS_TAG_KEY_SIZE | HuksTagType.HUKS_TAG_TYPE_UINT \| 3 | 表示密钥长度的Tag。 | -| HUKS_TAG_DIGEST | HuksTagType.HUKS_TAG_TYPE_UINT \| 4 | 表示摘要算法的Tag。 | -| HUKS_TAG_PADDING | HuksTagType.HUKS_TAG_TYPE_UINT \| 5 | 表示补齐算法的Tag。 | -| HUKS_TAG_BLOCK_MODE | HuksTagType.HUKS_TAG_TYPE_UINT \| 6 | 表示加密模式的Tag。 | -| HUKS_TAG_KEY_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 7 | 表示密钥类型的Tag。 | -| HUKS_TAG_ASSOCIATED_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 8 | 表示附加身份验证数据的Tag。 | -| HUKS_TAG_NONCE | HuksTagType.HUKS_TAG_TYPE_BYTES \| 9 | 表示密钥加解密的字段。 | -| HUKS_TAG_IV | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10 | 表示密钥初始化的向量。 | -| HUKS_TAG_INFO | HuksTagType.HUKS_TAG_TYPE_BYTES \| 11 | 表示密钥派生时的info。 | -| HUKS_TAG_SALT | HuksTagType.HUKS_TAG_TYPE_BYTES \| 12 | 表示密钥派生时的盐值。 | -| HUKS_TAG_PWD | HuksTagType.HUKS_TAG_TYPE_BYTES \| 13 | 表示密钥派生时的password。 | -| HUKS_TAG_ITERATION | HuksTagType.HUKS_TAG_TYPE_UINT \| 14 | 表示密钥派生时的迭代次数。 | -| HUKS_TAG_KEY_GENERATE_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 15 | 表示生成密钥类型的Tag。 | -| HUKS_TAG_DERIVE_MAIN_KEY | HuksTagType.HUKS_TAG_TYPE_BYTES \| 16 | 表示密钥派生时的主密钥。 | -| HUKS_TAG_DERIVE_FACTOR | HuksTagType.HUKS_TAG_TYPE_BYTES \| 17 | 表示密钥派生时的派生因子。 | -| HUKS_TAG_DERIVE_ALG | HuksTagType.HUKS_TAG_TYPE_UINT \| 18 | 表示密钥派生时的算法类型。 | -| HUKS_TAG_AGREE_ALG | HuksTagType.HUKS_TAG_TYPE_UINT \| 19 | 表示密钥协商时的算法类型。 | -| HUKS_TAG_AGREE_PUBLIC_KEY_IS_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 20 | 表示密钥协商时的公钥别名。 | -| HUKS_TAG_AGREE_PRIVATE_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BYTES \| 21 | 表示密钥协商时的私钥别名。 | -| HUKS_TAG_AGREE_PUBLIC_KEY | HuksTagType.HUKS_TAG_TYPE_BYTES \| 22 | 表示密钥协商时的公钥。 | -| HUKS_TAG_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BYTES \| 23 | 表示密钥别名。 | -| HUKS_TAG_DERIVE_KEY_SIZE | HuksTagType.HUKS_TAG_TYPE_UINT \| 24 | 表示派生密钥的大小。 | -| HUKS_TAG_IMPORT_KEY_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 25 | 表示导入的密钥类型。 | -| HUKS_TAG_UNWRAP_ALGORITHM_SUITE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 26 | 表示导入加密密钥的套件。 | -| HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|29 | 表示派生密钥/协商密钥的存储类型。 | -| HUKS_TAG_RSA_PSS_SALT_LEN_TYPE10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|30 | 表示rsa_pss_salt_length的类型。 | -| HUKS_TAG_ACTIVE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 201 | 原为证书业务预留字段,当前证书管理已独立,此字段废弃,不再预留。 | -| HUKS_TAG_ORIGINATION_EXPIRE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 202 | 原为证书业务预留字段,当前证书管理已独立,此字段废弃,不再预留。 | -| HUKS_TAG_USAGE_EXPIRE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 203 | 原为证书业务预留字段,当前证书管理已独立,此字段废弃,不再预留。 | -| HUKS_TAG_CREATION_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 204 | 原为证书业务预留字段,当前证书管理已独立,此字段废弃,不再预留。 | -| HUKS_TAG_ALL_USERS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 301 | 预留 | -| HUKS_TAG_USER_ID | HuksTagType.HUKS_TAG_TYPE_UINT \| 302 | 表示当前密钥属于哪个userID | -| HUKS_TAG_NO_AUTH_REQUIRED | HuksTagType.HUKS_TAG_TYPE_BOOL \| 303 | 预留。 | -| HUKS_TAG_USER_AUTH_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 304 | 表示用户认证类型。从[HuksUserAuthType](#huksuserauthtype9)中选择,需要与安全访问控制类型同时设置。支持同时指定两种用户认证类型,如:安全访问控制类型指定为HKS_SECURE_ACCESS_INVALID_NEW_BIO_ENROLL时,密钥访问认证类型可以指定以下三种: HKS_USER_AUTH_TYPE_FACE 、HKS_USER_AUTH_TYPE_FINGERPRINT、HKS_USER_AUTH_TYPE_FACE \| HKS_USER_AUTH_TYPE_FINGERPRINT | -| HUKS_TAG_AUTH_TIMEOUT | HuksTagType.HUKS_TAG_TYPE_UINT \| 305 | 表示authtoken单次有效期。 | -| HUKS_TAG_AUTH_TOKEN | HuksTagType.HUKS_TAG_TYPE_BYTES \| 306 | 用于传入authToken的字段 | -| HUKS_TAG_KEY_AUTH_ACCESS_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 307 | 表示安全访问控制类型。从[HuksAuthAccessType](#huksauthaccesstype9)中选择,需要和用户认证类型同时设置。 | -| HUKS_TAG_KEY_SECURE_SIGN_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 308 | 表示生成或导入密钥时,指定该密钥的签名类型。 | -| HUKS_TAG_CHALLENGE_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 309 | 表示密钥使用时生成的challenge类型。从[HuksChallengeType](#hukschallengetype9)中选择 | -| HUKS_TAG_CHALLENGE_POS9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 310 | 表示challenge类型为用户自定义类型时,huks产生的challenge有效长度仅为8字节连续的数据。从[HuksChallengePosition](#hukschallengeposition9)中选择。 | -| HUKS_TAG_KEY_AUTH_PURPOSE10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|311 | 表示密钥认证用途的tag | -| HUKS_TAG_ATTESTATION_CHALLENGE | HuksTagType.HUKS_TAG_TYPE_BYTES \| 501 | 表示attestation时的挑战值。 | -| HUKS_TAG_ATTESTATION_APPLICATION_ID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 502 | 表示attestation时拥有该密钥的application的Id。 | -| HUKS_TAG_ATTESTATION_ID_BRAND | HuksTagType.HUKS_TAG_TYPE_BYTES \| 503 | 表示设备的品牌。 | -| HUKS_TAG_ATTESTATION_ID_DEVICE | HuksTagType.HUKS_TAG_TYPE_BYTES \| 504 | 表示设备的设备ID。 | -| HUKS_TAG_ATTESTATION_ID_PRODUCT | HuksTagType.HUKS_TAG_TYPE_BYTES \| 505 | 表示设备的产品名。 | -| HUKS_TAG_ATTESTATION_ID_SERIAL | HuksTagType.HUKS_TAG_TYPE_BYTES \| 506 | 表示设备的SN号。 | -| HUKS_TAG_ATTESTATION_ID_IMEI | HuksTagType.HUKS_TAG_TYPE_BYTES \| 507 | 表示设备的IMEI号。 | -| HUKS_TAG_ATTESTATION_ID_MEID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 508 | 表示设备的MEID号。 | -| HUKS_TAG_ATTESTATION_ID_MANUFACTURER | HuksTagType.HUKS_TAG_TYPE_BYTES \| 509 | 表示设备的制造商。 | -| HUKS_TAG_ATTESTATION_ID_MODEL | HuksTagType.HUKS_TAG_TYPE_BYTES \| 510 | 表示设备的型号。 | -| HUKS_TAG_ATTESTATION_ID_ALIAS | HuksTagType.HUKS_TAG_TYPE_BYTES \| 511 | 表示attestation时的密钥别名。 | -| HUKS_TAG_ATTESTATION_ID_SOCID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 512 | 表示设备的SOCID。 | -| HUKS_TAG_ATTESTATION_ID_UDID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 513 | 表示设备的UDID。 | -| HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO | HuksTagType.HUKS_TAG_TYPE_BYTES \| 514 | 表示attestation时的安全凭据。 | -| HUKS_TAG_ATTESTATION_ID_VERSION_INFO | HuksTagType.HUKS_TAG_TYPE_BYTES \| 515 | 表示attestation时的版本号。 | -| HUKS_TAG_IS_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 1001 | 表示是否使用生成key时传入的别名的Tag。 | -| HUKS_TAG_KEY_STORAGE_FLAG | HuksTagType.HUKS_TAG_TYPE_UINT \| 1002 | 表示密钥存储方式的Tag。 | -| HUKS_TAG_IS_ALLOWED_WRAP | HuksTagType.HUKS_TAG_TYPE_BOOL \| 1003 | 预留。 | -| HUKS_TAG_KEY_WRAP_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 1004 | 预留。 | -| HUKS_TAG_KEY_AUTH_ID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 1005 | 预留。 | -| HUKS_TAG_KEY_ROLE | HuksTagType.HUKS_TAG_TYPE_UINT \| 1006 | 预留。 | -| HUKS_TAG_KEY_FLAG | HuksTagType.HUKS_TAG_TYPE_UINT \| 1007 | 表示密钥标志的Tag。 | -| HUKS_TAG_IS_ASYNCHRONIZED | HuksTagType.HUKS_TAG_TYPE_UINT \| 1008 | 预留。 | -| HUKS_TAG_SECURE_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 1009 | 预留。 | -| HUKS_TAG_SECURE_KEY_UUID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 1010 | 预留。 | -| HUKS_TAG_KEY_DOMAIN | HuksTagType.HUKS_TAG_TYPE_UINT \| 1011 | 预留。 | -| HUKS_TAG_PROCESS_NAME | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10001 | 表示进程名称的Tag。 | -| HUKS_TAG_PACKAGE_NAME | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10002 | 预留。 | -| HUKS_TAG_ACCESS_TIME | HuksTagType.HUKS_TAG_TYPE_UINT \| 10003 | 预留。 | -| HUKS_TAG_USES_TIME | HuksTagType.HUKS_TAG_TYPE_UINT \| 10004 | 预留。 | -| HUKS_TAG_CRYPTO_CTX | HuksTagType.HUKS_TAG_TYPE_ULONG \| 10005 | 预留。 | -| HUKS_TAG_KEY | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10006 | 预留。 | -| HUKS_TAG_KEY_VERSION | HuksTagType.HUKS_TAG_TYPE_UINT \| 10007 | 表示密钥版本的Tag。 | -| HUKS_TAG_PAYLOAD_LEN | HuksTagType.HUKS_TAG_TYPE_UINT \| 10008 | 预留。 | -| HUKS_TAG_AE_TAG | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10009 | 用于传入GCM模式中的AEAD数据的字段。 | -| HUKS_TAG_IS_KEY_HANDLE | HuksTagType.HUKS_TAG_TYPE_ULONG \| 10010 | 预留。 | -| HUKS_TAG_OS_VERSION | HuksTagType.HUKS_TAG_TYPE_UINT \| 10101 | 表示操作系统版本的Tag。 | -| HUKS_TAG_OS_PATCHLEVEL | HuksTagType.HUKS_TAG_TYPE_UINT \| 10102 | 表示操作系统补丁级别的Tag。 | -| HUKS_TAG_SYMMETRIC_KEY_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 20001 | 预留。 | -| HUKS_TAG_ASYMMETRIC_PUBLIC_KEY_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 20002 | 预留。 | -| HUKS_TAG_ASYMMETRIC_PRIVATE_KEY_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 20003 | 预留。 | +| HUKS_TAG_INVALID | HuksTagType.HUKS_TAG_TYPE_INVALID \| 0 | 表示非法的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_ALGORITHM | HuksTagType.HUKS_TAG_TYPE_UINT \| 1 | 表示算法的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_PURPOSE | HuksTagType.HUKS_TAG_TYPE_UINT \| 2 | 表示密钥用途的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_KEY_SIZE | HuksTagType.HUKS_TAG_TYPE_UINT \| 3 | 表示密钥长度的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_DIGEST | HuksTagType.HUKS_TAG_TYPE_UINT \| 4 | 表示摘要算法的Tag。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_PADDING | HuksTagType.HUKS_TAG_TYPE_UINT \| 5 | 表示补齐算法的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_BLOCK_MODE | HuksTagType.HUKS_TAG_TYPE_UINT \| 6 | 表示加密模式的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_KEY_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 7 | 表示密钥类型的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_ASSOCIATED_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 8 | 表示附加身份验证数据的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_NONCE | HuksTagType.HUKS_TAG_TYPE_BYTES \| 9 | 表示密钥加解密的字段。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_IV | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10 | 表示密钥初始化的向量。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_INFO | HuksTagType.HUKS_TAG_TYPE_BYTES \| 11 | 表示密钥派生时的info。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_SALT | HuksTagType.HUKS_TAG_TYPE_BYTES \| 12 | 表示密钥派生时的盐值。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_PWD | HuksTagType.HUKS_TAG_TYPE_BYTES \| 13 | 表示密钥派生时的password。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_ITERATION | HuksTagType.HUKS_TAG_TYPE_UINT \| 14 | 表示密钥派生时的迭代次数。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_GENERATE_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 15 | 表示生成密钥类型的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_DERIVE_MAIN_KEY | HuksTagType.HUKS_TAG_TYPE_BYTES \| 16 | 表示密钥派生时的主密钥。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_DERIVE_FACTOR | HuksTagType.HUKS_TAG_TYPE_BYTES \| 17 | 表示密钥派生时的派生因子。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_DERIVE_ALG | HuksTagType.HUKS_TAG_TYPE_UINT \| 18 | 表示密钥派生时的算法类型。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_AGREE_ALG | HuksTagType.HUKS_TAG_TYPE_UINT \| 19 | 表示密钥协商时的算法类型。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_AGREE_PUBLIC_KEY_IS_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 20 | 表示密钥协商时的公钥别名。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_AGREE_PRIVATE_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BYTES \| 21 | 表示密钥协商时的私钥别名。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_AGREE_PUBLIC_KEY | HuksTagType.HUKS_TAG_TYPE_BYTES \| 22 | 表示密钥协商时的公钥。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BYTES \| 23 | 表示密钥别名。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_DERIVE_KEY_SIZE | HuksTagType.HUKS_TAG_TYPE_UINT \| 24 | 表示派生密钥的大小。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_IMPORT_KEY_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 25 | 表示导入的密钥类型。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_UNWRAP_ALGORITHM_SUITE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 26 | 表示导入加密密钥的套件。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|29 | 表示派生密钥/协商密钥的存储类型。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_RSA_PSS_SALT_LEN_TYPE10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|30 | 表示rsa_pss_salt_length的类型。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ACTIVE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 201 | 原为证书业务预留字段,当前证书管理已独立,此字段废弃,不再预留。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ORIGINATION_EXPIRE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 202 | 原为证书业务预留字段,当前证书管理已独立,此字段废弃,不再预留。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_USAGE_EXPIRE_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 203 | 原为证书业务预留字段,当前证书管理已独立,此字段废弃,不再预留。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_CREATION_DATETIME(deprecated) | HuksTagType.HUKS_TAG_TYPE_ULONG \| 204 | 原为证书业务预留字段,当前证书管理已独立,此字段废弃,不再预留。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_ALL_USERS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 301 | 预留
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_USER_ID | HuksTagType.HUKS_TAG_TYPE_UINT \| 302 | 表示当前密钥属于哪个userID
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_NO_AUTH_REQUIRED | HuksTagType.HUKS_TAG_TYPE_BOOL \| 303 | 预留。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_USER_AUTH_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 304 | 表示用户认证类型。从[HuksUserAuthType](#huksuserauthtype9)中选择,需要与安全访问控制类型同时设置。支持同时指定两种用户认证类型,如:安全访问控制类型指定为HKS_SECURE_ACCESS_INVALID_NEW_BIO_ENROLL时,密钥访问认证类型可以指定以下三种: HKS_USER_AUTH_TYPE_FACE 、HKS_USER_AUTH_TYPE_FINGERPRINT、HKS_USER_AUTH_TYPE_FACE \| HKS_USER_AUTH_TYPE_FINGERPRINT
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_AUTH_TIMEOUT | HuksTagType.HUKS_TAG_TYPE_UINT \| 305 | 表示authtoken单次有效期。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_AUTH_TOKEN | HuksTagType.HUKS_TAG_TYPE_BYTES \| 306 | 用于传入authToken的字段
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_AUTH_ACCESS_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 307 | 表示安全访问控制类型。从[HuksAuthAccessType](#huksauthaccesstype9)中选择,需要和用户认证类型同时设置。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_SECURE_SIGN_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 308 | 表示生成或导入密钥时,指定该密钥的签名类型。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_CHALLENGE_TYPE9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 309 | 表示密钥使用时生成的challenge类型。从[HuksChallengeType](#hukschallengetype9)中选择
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_CHALLENGE_POS9+ | HuksTagType.HUKS_TAG_TYPE_UINT \| 310 | 表示challenge类型为用户自定义类型时,huks产生的challenge有效长度仅为8字节连续的数据。从[HuksChallengePosition](#hukschallengeposition9)中选择。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_AUTH_PURPOSE10+ | HuksTagType.HUKS_TAG_TYPE_UINT \|311 | 表示密钥认证用途的tag
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_CHALLENGE | HuksTagType.HUKS_TAG_TYPE_BYTES \| 501 | 表示attestation时的挑战值。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_APPLICATION_ID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 502 | 表示attestation时拥有该密钥的application的Id。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_BRAND | HuksTagType.HUKS_TAG_TYPE_BYTES \| 503 | 表示设备的品牌。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_DEVICE | HuksTagType.HUKS_TAG_TYPE_BYTES \| 504 | 表示设备的设备ID。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_PRODUCT | HuksTagType.HUKS_TAG_TYPE_BYTES \| 505 | 表示设备的产品名。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_SERIAL | HuksTagType.HUKS_TAG_TYPE_BYTES \| 506 | 表示设备的SN号。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_IMEI | HuksTagType.HUKS_TAG_TYPE_BYTES \| 507 | 表示设备的IMEI号。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_MEID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 508 | 表示设备的MEID号。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_MANUFACTURER | HuksTagType.HUKS_TAG_TYPE_BYTES \| 509 | 表示设备的制造商。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_MODEL | HuksTagType.HUKS_TAG_TYPE_BYTES \| 510 | 表示设备的型号。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_ALIAS | HuksTagType.HUKS_TAG_TYPE_BYTES \| 511 | 表示attestation时的密钥别名。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_SOCID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 512 | 表示设备的SOCID。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_UDID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 513 | 表示设备的UDID。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO | HuksTagType.HUKS_TAG_TYPE_BYTES \| 514 | 表示attestation时的安全凭据。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ATTESTATION_ID_VERSION_INFO | HuksTagType.HUKS_TAG_TYPE_BYTES \| 515 | 表示attestation时的版本号。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_IS_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 1001 | 表示是否使用生成key时传入的别名的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_KEY_STORAGE_FLAG | HuksTagType.HUKS_TAG_TYPE_UINT \| 1002 | 表示密钥存储方式的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_IS_ALLOWED_WRAP | HuksTagType.HUKS_TAG_TYPE_BOOL \| 1003 | 预留。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_WRAP_TYPE | HuksTagType.HUKS_TAG_TYPE_UINT \| 1004 | 预留。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_AUTH_ID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 1005 | 预留。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_ROLE | HuksTagType.HUKS_TAG_TYPE_UINT \| 1006 | 预留。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_FLAG | HuksTagType.HUKS_TAG_TYPE_UINT \| 1007 | 表示密钥标志的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_IS_ASYNCHRONIZED | HuksTagType.HUKS_TAG_TYPE_UINT \| 1008 | 预留。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_SECURE_KEY_ALIAS | HuksTagType.HUKS_TAG_TYPE_BOOL \| 1009 | 预留。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_SECURE_KEY_UUID | HuksTagType.HUKS_TAG_TYPE_BYTES \| 1010 | 预留。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY_DOMAIN | HuksTagType.HUKS_TAG_TYPE_UINT \| 1011 | 预留。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_PROCESS_NAME | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10001 | 表示进程名称的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_PACKAGE_NAME | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10002 | 预留。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ACCESS_TIME | HuksTagType.HUKS_TAG_TYPE_UINT \| 10003 | 预留。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_USES_TIME | HuksTagType.HUKS_TAG_TYPE_UINT \| 10004 | 预留。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_CRYPTO_CTX | HuksTagType.HUKS_TAG_TYPE_ULONG \| 10005 | 预留。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_KEY | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10006 | 预留。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_KEY_VERSION | HuksTagType.HUKS_TAG_TYPE_UINT \| 10007 | 表示密钥版本的Tag。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_PAYLOAD_LEN | HuksTagType.HUKS_TAG_TYPE_UINT \| 10008 | 预留。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_AE_TAG | HuksTagType.HUKS_TAG_TYPE_BYTES \| 10009 | 用于传入GCM模式中的AEAD数据的字段。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_IS_KEY_HANDLE | HuksTagType.HUKS_TAG_TYPE_ULONG \| 10010 | 预留。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_OS_VERSION | HuksTagType.HUKS_TAG_TYPE_UINT \| 10101 | 表示操作系统版本的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_OS_PATCHLEVEL | HuksTagType.HUKS_TAG_TYPE_UINT \| 10102 | 表示操作系统补丁级别的Tag。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_SYMMETRIC_KEY_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 20001 | 预留。
**系统能力:** SystemCapability.Security.Huks.Core| +| HUKS_TAG_ASYMMETRIC_PUBLIC_KEY_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 20002 | 预留。
**系统能力:** SystemCapability.Security.Huks.Extension| +| HUKS_TAG_ASYMMETRIC_PRIVATE_KEY_DATA | HuksTagType.HUKS_TAG_TYPE_BYTES \| 20003 | 预留。
**系统能力:** SystemCapability.Security.Huks.Extension| ## huks.generateKey(deprecated) @@ -2485,7 +2485,7 @@ generateKey(keyAlias: string, options: HuksOptions, callback: AsyncCallback\ **说明:** 从API Version 9开始废弃,建议使用[huks.generateKeyItem9+](#huksgeneratekeyitem9)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -2537,7 +2537,7 @@ generateKey(keyAlias: string, options: HuksOptions) : Promise\ > **说明:** 从API Version 9开始废弃,建议使用[huks.generateKeyItem9+](#huksgeneratekeyitem9-1)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -2590,7 +2590,7 @@ deleteKey(keyAlias: string, options: HuksOptions, callback: AsyncCallback\ **说明:** 从API Version 9开始废弃,建议使用[huks.deleteKeyItem9+](#huksdeletekeyitem9)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -2619,7 +2619,7 @@ deleteKey(keyAlias: string, options: HuksOptions) : Promise\ > **说明:** 从API Version 9开始废弃,建议使用[huks.deleteKeyItem9+](#huksdeletekeyitem9-1)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -2653,7 +2653,7 @@ importKey(keyAlias: string, options: HuksOptions, callback: AsyncCallback\ **说明:** 从API Version 9开始废弃,建议使用[huks.importKeyItem9+](#huksimportkeyitem9)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -2713,7 +2713,7 @@ importKey(keyAlias: string, options: HuksOptions) : Promise\ > **说明:** 从API Version 9开始废弃,建议使用[huks.importKeyItem9+](#huksimportkeyitem9-1)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -2780,7 +2780,7 @@ exportKey(keyAlias: string, options: HuksOptions, callback: AsyncCallback\ **说明:** 从API Version 9开始废弃,建议使用[huks.exportKeyItem9+](#huksexportkeyitem9)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -2809,7 +2809,7 @@ exportKey(keyAlias: string, options: HuksOptions) : Promise\ > **说明:** 从API Version 9开始废弃,建议使用[huks.exportKeyItem9+](#huksexportkeyitem9-1))替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -2843,7 +2843,7 @@ getKeyProperties(keyAlias: string, options: HuksOptions, callback: AsyncCallback > **说明:** 从API Version 9开始废弃,建议使用[huks.getKeyItemProperties9+](#huksgetkeyitemproperties9)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -2872,7 +2872,7 @@ getKeyProperties(keyAlias: string, options: HuksOptions) : Promise\ > **说明:** 从API Version 9开始废弃,建议使用[huks.getKeyItemProperties9+](#huksgetkeyitemproperties9-1)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -2906,7 +2906,7 @@ isKeyExist(keyAlias: string, options: HuksOptions, callback: AsyncCallback\ **说明:** 从API Version 9开始废弃,建议使用[huks.isKeyItemExist9+](#huksiskeyitemexist9)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -2935,7 +2935,7 @@ isKeyExist(keyAlias: string, options: HuksOptions) : Promise\ > **说明:** 从API Version 9开始废弃,建议使用[huks.isKeyItemExist9+](#huksiskeyitemexist9-1)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -2969,7 +2969,7 @@ init操作密钥接口,使用Callback回调异步返回结果。huks.init, huk > **说明:** 从API Version 9开始废弃,建议使用[huks.initSession9+](#huksinitsession9-1)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -2987,7 +2987,7 @@ init操作密钥接口,使用Promise方式异步返回结果。huks.init, huks > **说明:** 从API Version 9开始废弃,建议使用[huks.initSession9+](#huksinitsession9-1)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -3010,7 +3010,7 @@ update操作密钥接口,使用Callback回调异步返回结果。huks.init, h > **说明:** 从API Version 9开始废弃,建议使用[huks.updateSession9+](#huksupdatesession9-1)替代。 -**系统能力**: SystemCapability.Security.Huks +**系统能力**: SystemCapability.Security.Huks.Extension **参数:** @@ -3029,7 +3029,7 @@ update操作密钥接口,使用Promise方式异步返回结果。huks.init, hu > **说明:** 从API Version 9开始废弃,建议使用[huks.updateSession9+](#huksupdatesession9-2)替代。 -**系统能力**: SystemCapability.Security.Huks +**系统能力**: SystemCapability.Security.Huks.Extension **参数:** @@ -3053,7 +3053,7 @@ finish操作密钥接口,使用Callback回调异步返回结果。huks.init, h > **说明:** 从API Version 9开始废弃,建议使用[huks.finishSession9+](#huksfinishsession9)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -3071,7 +3071,7 @@ finish操作密钥接口,使用Promise方式异步返回结果。huks.init, hu > **说明:** 从API Version 9开始废弃,建议使用[huks.finishSession9+](#huksfinishsession9-1)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -3094,7 +3094,7 @@ abort操作密钥接口,使用Callback回调异步返回结果。 > **说明:** 从API Version 9开始废弃,建议使用[huks.abortSession9+](#huksabortsession9)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -3205,7 +3205,7 @@ abort操作密钥接口,使用Promise方式异步返回结果。 > **说明:** 从API Version 9开始废弃,建议使用[huks.abortSession9+](#huksabortsession9-1)替代。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension **参数:** @@ -3323,7 +3323,7 @@ function huksAbort() { huks Handle结构体。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension > **说明:** 从API Version 9开始废弃,建议使用[HuksSessionHandle9+](#hukssessionhandle9)替代。 | 名称 | 类型 | 必填 | 说明 | @@ -3336,7 +3336,7 @@ huks Handle结构体。 调用接口返回的result。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension > **说明:** 从API Version 9开始废弃,建议使用[HuksReturnResult9+](#huksreturnresult9)替代。 @@ -3352,7 +3352,7 @@ huks Handle结构体。 表示错误码的枚举。 -**系统能力**:SystemCapability.Security.Huks +**系统能力**:SystemCapability.Security.Huks.Extension > **说明:** 从API Version 9开始废弃,建议使用[HuksExceptionErrCode9+](#huksexceptionerrcode9)替代。 | 名称 | 值 | 说明 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-inner-wantAgent-wantAgentInfo.md b/zh-cn/application-dev/reference/apis/js-apis-inner-wantAgent-wantAgentInfo.md index 51aa7db9ed634554e5c8c9d3d1cb72c05bd51e66..84bc35b73d4f87def3c8e005a1fd7794ccc2a605 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inner-wantAgent-wantAgentInfo.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inner-wantAgent-wantAgentInfo.md @@ -16,7 +16,7 @@ import wantAgent from '@ohos.app.ability.wantAgent'; | 名称 | 类型 | 必填 | 说明 | | -------------- | ------------------------------- | ---- | ---------------------- | -| wants | Array\ | 是 | 将被执行的动作列表。 | +| wants | Array\<[Want](js-apis-application-want.md)\> | 是 | 将被执行的动作列表。 | | operationType | [wantAgent.OperationType](js-apis-app-ability-wantAgent.md#operationtype) | 是 | 动作类型。 | | requestCode | number | 是 | 使用者定义的一个私有值。 | | wantAgentFlags | Array<[wantAgent.WantAgentFlags](js-apis-app-ability-wantAgent.md#wantagentflags)> | 否 | 动作执行属性。 | diff --git a/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md b/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md index 3f1f7eb38f6719edd884a508cc96523f9479ab3b..d349ac3740e24fbec66e0f55e3e98e8ccab7de86 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md +++ b/zh-cn/application-dev/reference/apis/js-apis-inputmethod.md @@ -705,7 +705,7 @@ try { attach(showKeyboard: boolean, textConfig: TextConfig): Promise<void> -用于自绘控件绑定输入法应用。使用callback异步回调。 +用于自绘控件绑定输入法应用。使用promise异步回调。 必须先调用此接口完成自绘控件与输入法应用的绑定,才可以使用输入法框架的以下功能:显示、隐藏键盘;更新光标信息;更改编辑框选中范围;保存配置信息;监听处理由输入法应用发送的信息或命令等。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-media.md b/zh-cn/application-dev/reference/apis/js-apis-media.md index 2f599963ff4123f1ffd2586a06b706ad36dd6fcd..93fdd31294986a4d17500aaf5471319e8144ab86 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-media.md +++ b/zh-cn/application-dev/reference/apis/js-apis-media.md @@ -1640,7 +1640,7 @@ avPlayer.off('startRenderFrame') on(type: 'videoSizeChange', callback: (width: number, height: number) => void): void -监听视频播放宽高变化事件,仅视频播放支持该订阅事件,默认只在prepread状态上报一次,但HLS协议码流会在切换分辨率时上报; +监听视频播放宽高变化事件,仅视频播放支持该订阅事件,默认只在prepared状态上报一次,但HLS协议码流会在切换分辨率时上报; **系统能力:** SystemCapability.Multimedia.Media.AVPlayer diff --git a/zh-cn/application-dev/reference/apis/js-apis-medialibrary.md b/zh-cn/application-dev/reference/apis/js-apis-medialibrary.md index 0ed5ad2e39d8a78a4c08dd18b95f8813913789f2..8a018b9032da3414e2a2c9c614def2b31c34def9 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-medialibrary.md +++ b/zh-cn/application-dev/reference/apis/js-apis-medialibrary.md @@ -1,12 +1,14 @@ # @ohos.multimedia.medialibrary (媒体库管理) > **说明:** +> > - 该组件从API Version 6开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 > - 从API Version 9开始废弃。保留至API Version 13版本。 > - 部分功能变更为系统接口,仅供系统应用使用,请使用[@ohos.filemanagement.userFileManager](js-apis-userFileManager.md)相应接口替代。 > - 媒体资源选择和保存功能仍开放给普通应用,请使用[@ohos.file.picker](js-apis-file-picker.md)相应接口替代。 ## 导入模块 + ```js import mediaLibrary from '@ohos.multimedia.mediaLibrary'; ``` @@ -21,7 +23,7 @@ getMediaLibrary(context: Context): MediaLibrary **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**参数:** +**参数:** | 参数名 | 类型 | 必填 | 说明 | | ------- | ------- | ---- | -------------------------- | @@ -31,12 +33,12 @@ getMediaLibrary(context: Context): MediaLibrary | 类型 | 说明 | | ----------------------------- | :---- | -| [MediaLibrary](#medialibrary) | 媒体库实例 | +| [MediaLibrary](#medialibrary) | 媒体库实例。 | **示例:(从API Version 9开始)** ```ts -// 获取mediaLibrary实例,后续用到此实例均采用此处获取的实例 +// 获取mediaLibrary实例,后续用到此实例均采用此处获取的实例。 const context = getContext(this); let media = mediaLibrary.getMediaLibrary(context); ``` @@ -64,7 +66,7 @@ getMediaLibrary(): MediaLibrary | 类型 | 说明 | | ----------------------------- | :--------- | -| [MediaLibrary](#medialibrary) | 媒体库实例 | +| [MediaLibrary](#medialibrary) | 媒体库实例。 | **示例:** @@ -88,57 +90,57 @@ getFileAssets(options: MediaFetchOptions, callback: AsyncCallback<FetchFileRe | 参数名 | 类型 | 必填 | 说明 | | -------- | --------------------------------------------------- | ---- | --------------------------------- | -| options | [MediaFetchOptions](#mediafetchoptions7) | 是 | 文件获取选项 | -| callback | AsyncCallback<[FetchFileResult](#fetchfileresult7)> | 是 | 异步获取FetchFileResult之后的回调 | +| options | [MediaFetchOptions](#mediafetchoptions7) | 是 | 文件检索选项。 | +| callback | AsyncCallback<[FetchFileResult](#fetchfileresult7)> | 是 | callback返回文件检索结果集。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - // 创建文件获取选项,此处参数为获取image类型的文件资源 - let imagesFetchOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - }; - // 获取文件资源,使用callback方式返回异步结果 - media.getFileAssets(imagesFetchOp, async (error, fetchFileResult) => { - // 判断获取的文件资源的检索结果集是否为undefined,若为undefined则接口调用失败 - if (fetchFileResult == undefined) { - console.error('get fetchFileResult failed with error: ' + error); - return; - } - // 获取文件检索结果集中的总数 - const count = fetchFileResult.getCount(); - // 判断结果集中的数量是否小于0,小于0时表示接口调用失败 - if (count < 0) { - console.error('get count from fetchFileResult failed, count: ' + count); - return; - } - // 判断结果集中的数量是否等于0,等于0时表示接口调用成功,但是检索结果集为空,请检查文件获取选项参数配置是否有误和设备中是否存在相应文件 - if (count == 0) { - console.info('The count of fetchFileResult is zero'); - return; - } - console.info('Get fetchFileResult successfully, count: ' + count); - // 获取文件检索结果集中的第一个资源,使用callback方式返回异步结果,文件数量较多时请使用getAllObject接口 - fetchFileResult.getFirstObject(async (error, fileAsset) => { - // 检查获取的第一个资源是否为undefined,若为undefined则接口调用失败 - if (fileAsset == undefined) { - console.error('get first object failed with error: ' + error); - return; - } - console.info('fileAsset.displayName ' + '0 : ' + fileAsset.displayName); - // 调用 getNextObject 接口获取下一个资源,直到最后一个 - for (let i = 1; i < count; i++) { - let fileAsset = await fetchFileResult.getNextObject(); - console.info('fileAsset.displayName ' + i + ': ' + fileAsset.displayName); - } - // 释放FetchFileResult实例并使其失效。无法调用其他方法 - fetchFileResult.close(); - }); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + // 创建文件获取选项,此处参数为获取image类型的文件资源。 + let imagesFetchOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + }; + // 获取文件资源,使用callback方式返回异步结果。 + media.getFileAssets(imagesFetchOp, async (error, fetchFileResult) => { + // 判断获取的文件资源的检索结果集是否为undefined,若为undefined则接口调用失败。 + if (fetchFileResult == undefined) { + console.error('get fetchFileResult failed with error: ' + error); + return; + } + // 获取文件检索结果集中的总数。 + const count = fetchFileResult.getCount(); + // 判断结果集中的数量是否小于0,小于0时表示接口调用失败。 + if (count < 0) { + console.error('get count from fetchFileResult failed, count: ' + count); + return; + } + // 判断结果集中的数量是否等于0,等于0时表示接口调用成功,但是检索结果集为空,请检查文件获取选项参数配置是否有误和设备中是否存在相应文件。 + if (count == 0) { + console.info('The count of fetchFileResult is zero'); + return; + } + console.info('Get fetchFileResult successfully, count: ' + count); + // 获取文件检索结果集中的第一个资源,使用callback方式返回异步结果,文件数量较多时请使用getAllObject接口。 + fetchFileResult.getFirstObject(async (error, fileAsset) => { + // 检查获取的第一个资源是否为undefined,若为undefined则接口调用失败。 + if (fileAsset == undefined) { + console.error('get first object failed with error: ' + error); + return; + } + console.info('fileAsset.displayName ' + '0 : ' + fileAsset.displayName); + // 调用 getNextObject 接口获取下一个资源,直到最后一个。 + for (let i = 1; i < count; i++) { + let fileAsset = await fetchFileResult.getNextObject(); + console.info('fileAsset.displayName ' + i + ': ' + fileAsset.displayName); + } + // 释放FetchFileResult实例并使其失效。无法调用其他方法。 + fetchFileResult.close(); }); + }); } ``` @@ -156,58 +158,58 @@ getFileAssets(options: MediaFetchOptions): Promise<FetchFileResult> | 参数名 | 类型 | 必填 | 说明 | | ------- | ---------------------------------------- | ---- | ------------ | -| options | [MediaFetchOptions](#mediafetchoptions7) | 是 | 文件检索选项 | +| options | [MediaFetchOptions](#mediafetchoptions7) | 是 | 文件检索选项。 | -**返回值** +**返回值:** | 类型 | 说明 | | ------------------------------------ | -------------- | -| [FetchFileResult](#fetchfileresult7) | 文件数据结果集 | +| Promise<[FetchFileResult](#fetchfileresult7)> | Promise对象,返回文件检索结果集。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - // 创建文件获取选项,此处参数为获取image类型的文件资源 - let imagesFetchOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - }; - // 获取文件资源,使用Promise方式返回结果 - media.getFileAssets(imagesFetchOp).then(async (fetchFileResult) => { - // 获取文件检索结果集中的总数 - const count = fetchFileResult.getCount(); - // 判断结果集中的数量是否小于0,小于0时表示接口调用失败 - if (count < 0) { - console.error('get count from fetchFileResult failed, count: ' + count); - return; - } - // 判断结果集中的数量是否等于0,等于0时表示接口调用成功,但是检索结果集为空,请检查文件获取选项参数配置是否有误和设备中是否存在相应文件 - if (count == 0) { - console.info('The count of fetchFileResult is zero'); - return; - } - console.info('Get fetchFileResult successfully, count: ' + count); - // 获取文件检索结果集中的第一个资源,使用Promise方式返回异步结果,文件数量较多时请使用getAllObject接口 - fetchFileResult.getFirstObject().then(async (fileAsset) => { - console.info('fileAsset.displayName ' + '0 : ' + fileAsset.displayName); - // 调用 getNextObject 接口获取下一个资源,直到最后一个 - for (let i = 1; i < count; i++) { - let fileAsset = await fetchFileResult.getNextObject(); - console.info('fileAsset.displayName ' + i + ': ' + fileAsset.displayName); - } - // 释放FetchFileResult实例并使其失效。无法调用其他方法 - fetchFileResult.close(); - }).catch((error) => { - // 调用getFirstObject接口失败 - console.error('get first object failed with error: ' + error); - }); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + // 创建文件获取选项,此处参数为获取image类型的文件资源。 + let imagesFetchOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + }; + // 获取文件资源,使用Promise方式返回结果。 + media.getFileAssets(imagesFetchOp).then(async (fetchFileResult) => { + // 获取文件检索结果集中的总数。 + const count = fetchFileResult.getCount(); + // 判断结果集中的数量是否小于0,小于0时表示接口调用失败。 + if (count < 0) { + console.error('get count from fetchFileResult failed, count: ' + count); + return; + } + // 判断结果集中的数量是否等于0,等于0时表示接口调用成功,但是检索结果集为空,请检查文件获取选项参数配置是否有误和设备中是否存在相应文件。 + if (count == 0) { + console.info('The count of fetchFileResult is zero'); + return; + } + console.info('Get fetchFileResult successfully, count: ' + count); + // 获取文件检索结果集中的第一个资源,使用Promise方式返回异步结果,文件数量较多时请使用getAllObject接口。 + fetchFileResult.getFirstObject().then(async (fileAsset) => { + console.info('fileAsset.displayName ' + '0 : ' + fileAsset.displayName); + // 调用 getNextObject 接口获取下一个资源,直到最后一个。 + for (let i = 1; i < count; i++) { + let fileAsset = await fetchFileResult.getNextObject(); + console.info('fileAsset.displayName ' + i + ': ' + fileAsset.displayName); + } + // 释放FetchFileResult实例并使其失效。无法调用其他方法。 + fetchFileResult.close(); }).catch((error) => { - // 调用getFileAssets接口失败 - console.error('get file assets failed with error: ' + error); + // 调用getFirstObject接口失败。 + console.error('get first object failed with error: ' + error); }); + }).catch((error) => { + // 调用getFileAssets接口失败。 + console.error('get file assets failed with error: ' + error); + }); } ``` @@ -223,16 +225,17 @@ on(type: 'deviceChange'|'albumChange'|'imageChange'|'audioChange' | 参数名 | 类型 | 必填 | 说明 | | -------- | -------------------- | ---- | ---------------------------------------- | -| type | 'deviceChange'|
'albumChange'|
'imageChange'|
'audioChange'|
'videoChange'|
'fileChange'|
'remoteFileChange' | 是 | 媒体类型
'deviceChange': 注册设备变更
'albumChange': 相册变更
'imageChange': 图片文件变更
'audioChange':  音频文件变更
'videoChange':  视频文件变更
'fileChange':  文件变更
'remoteFileChange': 注册设备上文件变更 | -| callback | Callback<void> | 是 | 回调返回空 | +| type | 'deviceChange'|
'albumChange'|
'imageChange'|
'audioChange'|
'videoChange'|
'fileChange'|
'remoteFileChange' | 是 | 媒体类型
'deviceChange': 注册设备变更
'albumChange': 相册变更
'imageChange': 图片文件变更
'audioChange':  音频文件变更
'videoChange':  视频文件变更
'fileChange':  文件变更
'remoteFileChange': 注册设备上文件变更。 | +| callback | Callback<void> | 是 | callbac返回空。 | **示例:** ```js media.on('imageChange', () => { - // image file had changed, do something -}) + // image file had changed, do something. +}); ``` + ### off8+ off(type: 'deviceChange'|'albumChange'|'imageChange'|'audioChange'|'videoChange'|'fileChange'|'remoteFileChange', callback?: Callback<void>): void @@ -245,15 +248,15 @@ off(type: 'deviceChange'|'albumChange'|'imageChange'|'audioChange | 参数名 | 类型 | 必填 | 说明 | | -------- | -------------------- | ---- | ---------------------------------------- | -| type | 'deviceChange'|
'albumChange'|
'imageChange'|
'audioChange'|
'videoChange'|
'fileChange'|
'remoteFileChange' | 是 | 媒体类型
'deviceChange': 注册设备变更
'albumChange': 相册变更
'imageChange': 图片文件变更
'audioChange':  音频文件变更
'videoChange':  视频文件变更
'fileChange':  文件变更
'remoteFileChange': 注册设备上文件变更 | -| callback | Callback<void> | 否 | 回调返回空 | +| type | 'deviceChange'|
'albumChange'|
'imageChange'|
'audioChange'|
'videoChange'|
'fileChange'|
'remoteFileChange' | 是 | 媒体类型
'deviceChange': 注册设备变更
'albumChange': 相册变更
'imageChange': 图片文件变更
'audioChange':  音频文件变更
'videoChange':  视频文件变更
'fileChange':  文件变更
'remoteFileChange': 注册设备上文件变更。 | +| callback | Callback<void> | 否 | callback返回空。 | **示例:** ```js media.off('imageChange', () => { - // stop listening successfully -}) + // stop listening successfully. +}); ``` ### createAsset8+ @@ -270,26 +273,26 @@ createAsset(mediaType: MediaType, displayName: string, relativePath: string, cal | 参数名 | 类型 | 必填 | 说明 | | ------------ | --------------------------------------- | ---- | ------------------------------------------------------------ | -| mediaType | [MediaType](#mediatype8) | 是 | 媒体类型 | -| displayName | string | 是 | 展示文件名 | -| relativePath | string | 是 | 文件保存路径,可以通过[getPublicDirectory](#getpublicdirectory8)获取不同类型文件的保存路径 | -| callback | AsyncCallback<[FileAsset](#fileasset7)> | 是 | 异步获取媒体数据FileAsset之后的回调 | +| mediaType | [MediaType](#mediatype8) | 是 | 媒体类型。 | +| displayName | string | 是 | 展示文件名。 | +| relativePath | string | 是 | 文件保存路径,可以通过[getPublicDirectory](#getpublicdirectory8)获取不同类型文件的保存路径。 | +| callback | AsyncCallback<[FileAsset](#fileasset7)> | 是 | callback返回创建的媒体资源FileAsset对象。 | **示例:** ```js async function example() { - // 使用Callback方式创建Image类型文件 - let mediaType = mediaLibrary.MediaType.IMAGE; - let DIR_IMAGE = mediaLibrary.DirectoryType.DIR_IMAGE; - const path = await media.getPublicDirectory(DIR_IMAGE); - media.createAsset(mediaType, 'imageCallBack.jpg', path + 'myPicture/', (error, fileAsset) => { - if (fileAsset != undefined) { - console.info('createAsset successfully, message'); - } else { - console.error('createAsset failed with error: ' + error); - } - }); + // 使用Callback方式创建Image类型文件。 + let mediaType = mediaLibrary.MediaType.IMAGE; + let DIR_IMAGE = mediaLibrary.DirectoryType.DIR_IMAGE; + const path = await media.getPublicDirectory(DIR_IMAGE); + media.createAsset(mediaType, 'imageCallBack.jpg', path + 'myPicture/', (error, fileAsset) => { + if (fileAsset != undefined) { + console.info('createAsset successfully, message'); + } else { + console.error('createAsset failed with error: ' + error); + } + }); } ``` @@ -307,29 +310,29 @@ createAsset(mediaType: MediaType, displayName: string, relativePath: string): Pr | 参数名 | 类型 | 必填 | 说明 | | ------------ | ------------------------ | ---- | ------------------------------------------------------------ | -| mediaType | [MediaType](#mediatype8) | 是 | 媒体类型 | -| displayName | string | 是 | 展示文件名 | -| relativePath | string | 是 | 相对路径,可以通过getPublicDirectory获取不同类型媒体文件的一层目录的relative path | +| mediaType | [MediaType](#mediatype8) | 是 | 媒体类型。 | +| displayName | string | 是 | 展示文件名。 | +| relativePath | string | 是 | 相对路径,可以通过getPublicDirectory获取不同类型媒体文件的一层目录的relative path。 | -**返回值** +**返回值:** | 类型 | 说明 | | ------------------------ | ----------------- | -| [FileAsset](#fileasset7) | 媒体数据FileAsset | +| Promise<[FileAsset](#fileasset7)> | Promise对象,返回创建媒体数据的FileAsset。 | **示例:** ```js async function example() { - // 使用Promise方式创建Image类型文件 - let mediaType = mediaLibrary.MediaType.IMAGE; - let DIR_IMAGE = mediaLibrary.DirectoryType.DIR_IMAGE; - const path = await media.getPublicDirectory(DIR_IMAGE); - media.createAsset(mediaType, 'imagePromise.jpg', path + 'myPicture/').then((fileAsset) => { - console.info('createAsset successfully, message = ' + JSON.stringify(fileAsset)); - }).catch((error) => { - console.error('createAsset failed with error: ' + error); - }); + // 使用Promise方式创建Image类型文件。 + let mediaType = mediaLibrary.MediaType.IMAGE; + let DIR_IMAGE = mediaLibrary.DirectoryType.DIR_IMAGE; + const path = await media.getPublicDirectory(DIR_IMAGE); + media.createAsset(mediaType, 'imagePromise.jpg', path + 'myPicture/').then((fileAsset) => { + console.info('createAsset successfully, message = ' + JSON.stringify(fileAsset)); + }).catch((error) => { + console.error('createAsset failed with error: ' + error); + }); } ``` @@ -337,7 +340,7 @@ async function example() { deleteAsset(uri: string): Promise\ -删除媒体文件资源 +删除媒体文件资源。 **系统接口**:此接口为系统接口。 @@ -349,42 +352,44 @@ deleteAsset(uri: string): Promise\ | 参数名 | 类型 | 必填 | 说明 | | -------- | ---------------------------- | ---- | --------------- | -| uri | string | 是 | 需要删除的媒体文件资源的uri | +| uri | string | 是 | 需要删除的媒体文件资源的uri。 | **返回值:** + | 类型 | 说明 | | ------------------- | -------------------- | -| Promise<void> | Promise回调返回删除的结果。 | +| Promise<void> | Promise对象,返回删除的结果。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let fileType = mediaLibrary.MediaType.FILE; - let option = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [fileType.toString()], - }; - const fetchFileResult = await media.getFileAssets(option); - let asset = await fetchFileResult.getFirstObject(); - if (asset == undefined) { - console.error('asset not exist'); - return; - } - media.deleteAsset(asset.uri).then(() => { - console.info('deleteAsset successfully'); - }).catch((error) => { - console.error('deleteAsset failed with error: ' + error); - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let fileType = mediaLibrary.MediaType.FILE; + let option = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [fileType.toString()], + }; + const fetchFileResult = await media.getFileAssets(option); + let asset = await fetchFileResult.getFirstObject(); + if (asset == undefined) { + console.error('asset not exist'); + return; + } + media.deleteAsset(asset.uri).then(() => { + console.info('deleteAsset successfully'); + }).catch((error) => { + console.error('deleteAsset failed with error: ' + error); + }); + fetchFileResult.close(); } ``` ### deleteAsset8+ + deleteAsset(uri: string, callback: AsyncCallback\): void -删除媒体文件资源 +删除媒体文件资源。 **系统接口**:此接口为系统接口。 @@ -397,32 +402,32 @@ deleteAsset(uri: string, callback: AsyncCallback\): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ---------------------------- | ---- | --------------- | | uri | string | 是 | 需要删除的媒体文件资源的uri。 | -|callback |AsyncCallback\| 是 |回调函数,用于获取删除的结果。| +|callback |AsyncCallback\| 是 |callback返回空。| **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let fileType = mediaLibrary.MediaType.FILE; - let option = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [fileType.toString()], - }; - const fetchFileResult = await media.getFileAssets(option); - let asset = await fetchFileResult.getFirstObject(); - if (asset == undefined) { - console.error('asset not exist'); - return; + let fileKeyObj = mediaLibrary.FileKey; + let fileType = mediaLibrary.MediaType.FILE; + let option = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [fileType.toString()], + }; + const fetchFileResult = await media.getFileAssets(option); + let asset = await fetchFileResult.getFirstObject(); + if (asset == undefined) { + console.error('asset not exist'); + return; + } + media.deleteAsset(asset.uri, (error) => { + if (error != undefined) { + console.error('deleteAsset failed with error: ' + error); + } else { + console.info('deleteAsset successfully'); } - media.deleteAsset(asset.uri, (error) => { - if (error != undefined) { - console.error('deleteAsset failed with error: ' + error); - } else { - console.info('deleteAsset successfully'); - } - }); - fetchFileResult.close(); + }); + fetchFileResult.close(); } ``` @@ -438,19 +443,19 @@ getPublicDirectory(type: DirectoryType, callback: AsyncCallback<string>): | 参数名 | 类型 | 必填 | 说明 | | -------- | -------------------------------- | ---- | ------------------------- | -| type | [DirectoryType](#directorytype8) | 是 | 公共目录类型 | -| callback | AsyncCallback<string> | 是 | callback 返回公共目录路径 | +| type | [DirectoryType](#directorytype8) | 是 | 公共目录类型。 | +| callback | AsyncCallback<string> | 是 | callback返回公共目录路径。 | **示例:** ```js let DIR_CAMERA = mediaLibrary.DirectoryType.DIR_CAMERA; media.getPublicDirectory(DIR_CAMERA, (error, dicResult) => { - if (dicResult == 'Camera/') { - console.info('getPublicDirectory DIR_CAMERA successfully'); - } else { - console.error('getPublicDirectory DIR_CAMERA failed with error: ' + error); - } + if (dicResult == 'Camera/') { + console.info('getPublicDirectory DIR_CAMERA successfully'); + } else { + console.error('getPublicDirectory DIR_CAMERA failed with error: ' + error); + } }); ``` @@ -466,28 +471,28 @@ getPublicDirectory(type: DirectoryType): Promise<string> | 参数名 | 类型 | 必填 | 说明 | | ------ | -------------------------------- | ---- | ------------ | -| type | [DirectoryType](#directorytype8) | 是 | 公共目录类型 | +| type | [DirectoryType](#directorytype8) | 是 | 公共目录类型。 | **返回值:** | 类型 | 说明 | | ---------------- | ---------------- | -| Promise\ | 返回公共目录路径 | +| Promise\ | Promise对象,返回公共目录路径。 | **示例:** ```js async function example() { - let DIR_CAMERA = mediaLibrary.DirectoryType.DIR_CAMERA; - media.getPublicDirectory(DIR_CAMERA).then((dicResult) => { - if (dicResult == 'Camera/') { - console.info('getPublicDirectory DIR_CAMERA successfully'); - } else { - console.error('getPublicDirectory DIR_CAMERA failed'); - } - }).catch((error) => { - console.error('getPublicDirectory failed with error: ' + error); - }); + let DIR_CAMERA = mediaLibrary.DirectoryType.DIR_CAMERA; + media.getPublicDirectory(DIR_CAMERA).then((dicResult) => { + if (dicResult == 'Camera/') { + console.info('getPublicDirectory DIR_CAMERA successfully'); + } else { + console.error('getPublicDirectory DIR_CAMERA failed'); + } + }).catch((error) => { + console.error('getPublicDirectory failed with error: ' + error); + }); } ``` @@ -501,12 +506,12 @@ getAlbums(options: MediaFetchOptions, callback: AsyncCallback<Array<Album& **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**参数** +**参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | -------------------------------------------- | ---- | --------------------------- | -| options | [MediaFetchOptions](#mediafetchoptions7) | 是 | 相册获取条件 | -| callback | AsyncCallback<Array<[Album](#album7)>> | 是 | 异步获取Album列表之后的回调 | +| options | [MediaFetchOptions](#mediafetchoptions7) | 是 | 相册检索条件。 | +| callback | AsyncCallback<Array<[Album](#album7)>> | 是 | callback返回获取的Album结果集。 | **示例:** @@ -523,7 +528,7 @@ async function example() { } else { console.error('getAlbums failed with error: ' + error); } - }) + }); } ``` @@ -541,19 +546,19 @@ getAlbums(options: MediaFetchOptions): Promise<Array<Album>> | 参数名 | 类型 | 必填 | 说明 | | ------- | ---------------------------------------- | ---- | ------------ | -| options | [MediaFetchOptions](#mediafetchoptions7) | 是 | 相册获取条件 | +| options | [MediaFetchOptions](#mediafetchoptions7) | 是 | 相册获取条件。 | **返回值:** | 类型 | 说明 | | -------------------------------- | ------------- | -| Promise> | 返回Album列表 | +| Promise> | Promise对象,返回获取的Album结果集。 | **示例:** ```js async function example() { - // 获取相册需要先预置相册和资源,示例代码为预置的新建相册1。 + // 获取相册需要先预置相册和资源,示例代码为预置的新建相册1。 let AlbumNoArgsfetchOp = { selections: mediaLibrary.FileKey.ALBUM_NAME + '= ?', selectionArgs: ['新建相册1'], @@ -579,13 +584,13 @@ release(callback: AsyncCallback<void>): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------- | ---- | ---------- | -| callback | AsyncCallback<void> | 是 | 无返回值 | +| callback | AsyncCallback<void> | 是 | callback返回空。 | **示例:** ```js media.release(() => { - // do something + // do something. }); ``` @@ -602,12 +607,12 @@ release(): Promise<void> | 类型 | 说明 | | ------------------- | -------------------- | -| Promise<void> | Promise实例,用于获取异步返回结果 | +| Promise<void> | Promise对象,返回空。 | **示例:** ```js -media.release() +media.release(); ``` ### storeMediaAsset @@ -625,27 +630,26 @@ storeMediaAsset(option: MediaAssetOption, callback: AsyncCallback<string>) | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------------------- | ---- | ----------------------- | | option | [MediaAssetOption](#mediaassetoption) | 是 | 媒体资源选项。 | -| callback | AsyncCallback<string> | 是 | 媒体资源保存回调,返回保存成功后得到的URI。 | +| callback | AsyncCallback<string> | 是 | callback返回保存媒体资源成功后得到的URI。 | **示例:** ```js let option = { - src : '/data/storage/el2/base/haps/entry/image.png', - mimeType : 'image/*', - relativePath : 'Pictures/' + src : '/data/storage/el2/base/haps/entry/image.png', + mimeType : 'image/*', + relativePath : 'Pictures/' }; mediaLibrary.getMediaLibrary().storeMediaAsset(option, (error, value) => { - if (error) { - console.error('storeMediaAsset failed with error: ' + error); - return; - } - console.info('Media resources stored. '); - // Obtain the URI that stores media resources. + if (error) { + console.error('storeMediaAsset failed with error: ' + error); + return; + } + console.info('Media resources stored. '); + // Obtain the URI that stores media resources. }); ``` - ### storeMediaAsset storeMediaAsset(option: MediaAssetOption): Promise<string> @@ -666,32 +670,31 @@ storeMediaAsset(option: MediaAssetOption): Promise<string> | 类型 | 说明 | | --------------------- | ---------------------------- | -| Promise<string> | Promise实例,用于异步获取保存成功后得到的URI。 | +| Promise<string> | Promise对象,返回保存媒体资源成功后得到的URI。 | **示例:** ```js let option = { - src : '/data/storage/el2/base/haps/entry/image.png', - mimeType : 'image/*', - relativePath : 'Pictures/' + src : '/data/storage/el2/base/haps/entry/image.png', + mimeType : 'image/*', + relativePath : 'Pictures/' }; mediaLibrary.getMediaLibrary().storeMediaAsset(option).then((value) => { - console.info('Media resources stored.'); - // Obtain the URI that stores media resources. + console.info('Media resources stored.'); + // Obtain the URI that stores media resources. }).catch((error) => { - console.error('storeMediaAsset failed with error: ' + error); + console.error('storeMediaAsset failed with error: ' + error); }); ``` - ### startImagePreview startImagePreview(images: Array<string>, index: number, callback: AsyncCallback<void>): void 启动图片预览界面并限定预览开始显示的图片。可以预览指定序号的单张本地图片(datashare://),也可以预览列表中的所有网络图片(https://)。使用callback方式进行异步回调。 -> **说明**: +> **说明**: > 此接口为API Version 6开始支持,只支持FA模型使用。 > 建议使用[Image组件](../arkui-ts/ts-basic-components-image.md)替代。
Image组件,可用于本地图片和网络图片的渲染展示。 @@ -703,32 +706,31 @@ startImagePreview(images: Array<string>, index: number, callback: AsyncCal | -------- | ------------------------- | ---- | ---------------------------------------- | | images | Array<string> | 是 | 预览的图片URI('https://','datashare://')列表。 | | index | number | 是 | 开始显示的图片序号。 | -| callback | AsyncCallback<void> | 是 | 图片预览回调,失败时返回错误信息。 | +| callback | AsyncCallback<void> | 是 | callback返回空。 | **示例:** ```js let images = [ - 'file://media/xxxx/2', - 'file://media/xxxx/3' + 'file://media/xxxx/2', + 'file://media/xxxx/3' ]; -/* 网络图片使用方式 +/* 网络图片使用方式。 let images = [ - 'https://media.xxxx.com/image1.jpg', - 'https://media.xxxx.com/image2.jpg' + 'https://media.xxxx.com/image1.jpg', + 'https://media.xxxx.com/image2.jpg' ]; */ let index = 1; mediaLibrary.getMediaLibrary().startImagePreview(images, index, (error) => { - if (error) { - console.error('startImagePreview failed with error: ' + error); - return; - } - console.info('Succeeded in previewing the images.'); + if (error) { + console.error('startImagePreview failed with error: ' + error); + return; + } + console.info('Succeeded in previewing the images.'); }); ``` - ### startImagePreview startImagePreview(images: Array<string>, callback: AsyncCallback<void>): void @@ -746,38 +748,37 @@ startImagePreview(images: Array<string>, callback: AsyncCallback<void&g | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------- | ---- | ---------------------------------------- | | images | Array<string> | 是 | 预览的图片URI('https://','datashare://')列表。 | -| callback | AsyncCallback<void> | 是 | 图片预览回调,失败时返回错误信息。 | +| callback | AsyncCallback<void> | 是 | callback返回空。 | **示例:** ```js let images = [ - 'file://media/xxxx/2', - 'file://media/xxxx/3' + 'file://media/xxxx/2', + 'file://media/xxxx/3' ]; -/* 网络图片使用方式 +/* 网络图片使用方式。 let images = [ - 'https://media.xxxx.com/image1.jpg', - 'https://media.xxxx.com/image2.jpg' + 'https://media.xxxx.com/image1.jpg', + 'https://media.xxxx.com/image2.jpg' ]; */ mediaLibrary.getMediaLibrary().startImagePreview(images, (error) => { - if (error) { - console.error('startImagePreview failed with error: ' + error); - return; - } - console.info('Succeeded in previewing the images.'); + if (error) { + console.error('startImagePreview failed with error: ' + error); + return; + } + console.info('Succeeded in previewing the images.'); }); ``` - ### startImagePreview startImagePreview(images: Array<string>, index?: number): Promise<void> 启动图片预览界面并限定预览开始显示的图片。可以预览指定序号的单张本地图片(datashare://),也可以预览列表中的所有网络图片(https://)。使用Promise方式进行异步回调。 -> **说明**: +> **说明**: > 此接口为API Version 6开始支持,只支持FA模型使用。 > 建议使用[Image组件](../arkui-ts/ts-basic-components-image.md)替代。
Image组件,可用于本地图片和网络图片的渲染展示。 @@ -794,37 +795,36 @@ startImagePreview(images: Array<string>, index?: number): Promise<void& | 类型 | 说明 | | ------------------- | ------------------------------- | -| Promise<void> | Promise实例,用于异步获取预览结果,失败时返回错误信息。 | +| Promise<void> | Promise对象,返回空。 | **示例:** ```js let images = [ - 'file://media/xxxx/2', - 'file://media/xxxx/3' + 'file://media/xxxx/2', + 'file://media/xxxx/3' ]; -/* 网络图片使用方式 +/* 网络图片使用方式。 let images = [ - 'https://media.xxxx.com/image1.jpg', - 'https://media.xxxx.com/image2.jpg' + 'https://media.xxxx.com/image1.jpg', + 'https://media.xxxx.com/image2.jpg' ]; */ let index = 1; mediaLibrary.getMediaLibrary().startImagePreview(images, index).then(() => { - console.info('Succeeded in previewing the images.'); + console.info('Succeeded in previewing the images.'); }).catch((error) => { - console.error('startImagePreview failed with error: ' + error); + console.error('startImagePreview failed with error: ' + error); }); ``` - ### startMediaSelect startMediaSelect(option: MediaSelectOption, callback: AsyncCallback<Array<string>>): void 启动媒体选择界面,以异步方法获取选择的媒体URI列表,使用callback形式返回结果。 -> **说明**: +> **说明**: > 此接口为API Version 6开始支持,只支持FA模型使用。 > 建议使用系统应用图库替代。图库是系统内置的可视资源访问应用,提供图片和视频的管理、浏览等功能,使用方法请参考[OpenHarmony/applications_photos](https://gitee.com/openharmony/applications_photos#4-%E5%85%B8%E5%9E%8B%E6%8E%A5%E5%8F%A3%E7%9A%84%E4%BD%BF%E7%94%A8)。 @@ -835,33 +835,32 @@ startMediaSelect(option: MediaSelectOption, callback: AsyncCallback<Array< | 参数名 | 类型 | 必填 | 说明 | | -------- | ---------------------------------------- | ---- | ------------------------------------ | | option | [MediaSelectOption](#mediaselectoption) | 是 | 媒体选择选项。 | -| callback | AsyncCallback<Array<string>> | 是 | 媒体选择回调,返回选择的媒体URI(datashare://)列表。 | +| callback | AsyncCallback<Array<string>> | 是 | callback返回选择的媒体URI列表。 | **示例:** ```js let option : mediaLibrary.MediaSelectOption = { - type : 'media', - count : 2 + type : 'media', + count : 2 }; mediaLibrary.getMediaLibrary().startMediaSelect(option, (error, value) => { - if (error) { - console.error('startMediaSelect failed with error: ' + error); - return; - } - console.info('Media resources selected.'); - // Obtain the media selection value. + if (error) { + console.error('startMediaSelect failed with error: ' + error); + return; + } + console.info('Media resources selected.'); + // Obtain the media selection value. }); ``` - ### startMediaSelect startMediaSelect(option: MediaSelectOption): Promise<Array<string>> 启动媒体选择界面,以异步方法获取选择的媒体URI列表,使用Promise形式返回结果。 -> **说明**: +> **说明**: > 此接口为API Version 6开始支持,只支持FA模型使用。 > 建议使用系统应用图库替代。图库是系统内置的可视资源访问应用,提供图片和视频的管理、浏览等功能,使用方法请参考[OpenHarmony/applications_photos](https://gitee.com/openharmony/applications_photos#4-%E5%85%B8%E5%9E%8B%E6%8E%A5%E5%8F%A3%E7%9A%84%E4%BD%BF%E7%94%A8)。 @@ -877,28 +876,28 @@ startMediaSelect(option: MediaSelectOption): Promise<Array<string>> | 类型 | 说明 | | ---------------------------------- | ---------------------------------------- | -| Promise<Array<string>> | Promise实例,用于异步获取选择的媒体URI(datashare://)列表。 | +| Promise<Array<string>> | Promise对象,返回选择的媒体URI列表。 | **示例:** ```js let option : mediaLibrary.MediaSelectOption = { - type : 'media', - count : 2 + type : 'media', + count : 2 }; mediaLibrary.getMediaLibrary().startMediaSelect(option).then((value) => { - console.info('Media resources selected.'); - // Obtain the media selection value. + console.info('Media resources selected.'); + // Obtain the media selection value. }).catch((error) => { - console.error('startMediaSelect failed with error: ' + error); + console.error('startMediaSelect failed with error: ' + error); }); - ``` + ### getActivePeers8+ getActivePeers(): Promise\>; -获取在线对端设备的信息,使用Promise方式返回异步结果 +获取在线对端设备的信息,使用Promise方式返回异步结果。 **系统接口**:此接口为系统接口。 @@ -910,21 +909,21 @@ getActivePeers(): Promise\>; | 类型 | 说明 | | ------------------- | -------------------- | -| Promise\> | 返回获取的所有在线对端设备的PeerInfo | +| Promise\> | Promise对象,返回获取的所有在线对端设备的PeerInfo。 | **示例:** ```js async function example() { - media.getActivePeers().then((devicesInfo) => { - if (devicesInfo != undefined) { - console.info('get distributed info ' + JSON.stringify(devicesInfo)); - } else { - console.info('get distributed info is undefined!'); - } - }).catch((error) => { - console.error('get distributed info failed with error: ' + error); - }); + media.getActivePeers().then((devicesInfo) => { + if (devicesInfo != undefined) { + console.info('get distributed info ' + JSON.stringify(devicesInfo)); + } else { + console.info('get distributed info is undefined!'); + } + }).catch((error) => { + console.error('get distributed info failed with error: ' + error); + }); } ``` @@ -944,28 +943,27 @@ getActivePeers(callback: AsyncCallback\>): void; | 类型 | 说明 | | ------------------- | -------------------- | -| callback: AsyncCallback\> | 返回获取的所有在线对端设备的PeerInfo | +| callback: AsyncCallback\> | callback返回获取的所有在线对端设备的PeerInfo对象。 | **示例:** ```js async function example() { - media.getActivePeers((error, devicesInfo) => { - if (devicesInfo != undefined) { - console.info('get distributed info ' + JSON.stringify(devicesInfo)); - } else { - console.error('get distributed failed with error: ' + error); - } - }); + media.getActivePeers((error, devicesInfo) => { + if (devicesInfo != undefined) { + console.info('get distributed info ' + JSON.stringify(devicesInfo)); + } else { + console.error('get distributed failed with error: ' + error); + } + }); } ``` - ### getAllPeers8+ getAllPeers(): Promise\>; -获取所有对端设备的信息,使用Promise方式返回异步结果 +获取所有对端设备的信息,使用Promise方式返回异步结果。 **系统接口**:此接口为系统接口。 @@ -977,21 +975,21 @@ getAllPeers(): Promise\>; | 类型 | 说明 | | ------------------- | -------------------- | -| Promise\> | 返回获取的所有对端设备的PeerInfo | +| Promise\> | Promise对象,返回获取的所有对端设备的PeerInfo。 | **示例:** ```js async function example() { - media.getAllPeers().then((devicesInfo) => { - if (devicesInfo != undefined) { - console.info('get distributed info ' + JSON.stringify(devicesInfo)); - } else { - console.info('get distributed info is undefined!'); - } - }).catch((error) => { - console.error('get distributed info failed with error: ' + error); - }); + media.getAllPeers().then((devicesInfo) => { + if (devicesInfo != undefined) { + console.info('get distributed info ' + JSON.stringify(devicesInfo)); + } else { + console.info('get distributed info is undefined!'); + } + }).catch((error) => { + console.error('get distributed info failed with error: ' + error); + }); } ``` @@ -1011,19 +1009,19 @@ getAllPeers(callback: AsyncCallback\>): void; | 类型 | 说明 | | ------------------- | -------------------- | -| callback: AsyncCallback\> | 返回获取的所有对端设备的PeerInfo | +| callback: AsyncCallback\> | callback返回获取的所有对端设备的PeerInfo对象。 | **示例:** ```js async function example() { - media.getAllPeers((error, devicesInfo) => { - if (devicesInfo != undefined) { - console.info('get distributed info ' + JSON.stringify(devicesInfo)); - } else { - console.error('get distributed failed with error: ' + error); - } - }); + media.getAllPeers((error, devicesInfo) => { + if (devicesInfo != undefined) { + console.info('get distributed info ' + JSON.stringify(devicesInfo)); + } else { + console.error('get distributed failed with error: ' + error); + } + }); } ``` @@ -1032,6 +1030,7 @@ async function example() { 提供封装文件属性的方法。 > **说明:** +> > 1. title字段默认为去掉后缀的文件名,音频和视频文件会尝试解析文件内容,部分设备写入后在触发扫描时会被还原。 > 2. orientation字段部分设备可能不支持修改,建议使用image组件的[ModifyImageProperty](js-apis-image.md#modifyimageproperty9)接口。 @@ -1041,28 +1040,27 @@ async function example() { | 名称 | 类型 | 可读 | 可写 | 说明 | | ------------------------- | ------------------------ | ---- | ---- | ------------------------------------------------------ | -| id | number | 是 | 否 | 文件资源编号 | -| uri | string | 是 | 否 | 文件资源uri(如:file://media/image/2) | -| mimeType | string | 是 | 否 | 文件扩展属性 | -| mediaType8+ | [MediaType](#mediatype8) | 是 | 否 | 媒体类型 | -| displayName | string | 是 | 是 | 显示文件名,包含后缀名 | -| title | string | 是 | 是 | 文件标题 | -| relativePath8+ | string | 是 | 是 | 相对公共目录路径 | -| parent8+ | number | 是 | 否 | 父目录id | -| size | number | 是 | 否 | 文件大小(单位:字节) | -| dateAdded | number | 是 | 否 | 添加日期(添加文件时间到1970年1月1日的秒数值) | -| dateModified | number | 是 | 否 | 修改日期(修改文件时间到1970年1月1日的秒数值,修改文件名不会改变此值,当文件内容发生修改时才会更新)| -| dateTaken | number | 是 | 否 | 拍摄日期(文件拍照时间到1970年1月1日的秒数值) | -| artist8+ | string | 是 | 否 | 作者 | -| audioAlbum8+ | string | 是 | 否 | 专辑 | -| width | number | 是 | 否 | 图片宽度(单位:像素) | -| height | number | 是 | 否 | 图片高度(单位:像素) | -| orientation | number | 是 | 是 | 图片显示方向(顺时针旋转角度,如0,90,180 单位:度) | -| duration8+ | number | 是 | 否 | 持续时间(单位:毫秒) | -| albumId | number | 是 | 否 | 文件所归属的相册编号 | -| albumUri8+ | string | 是 | 否 | 文件所归属相册uri | -| albumName | string | 是 | 否 | 文件所归属相册名称 | - +| id | number | 是 | 否 | 文件资源编号。 | +| uri | string | 是 | 否 | 文件资源uri(如:file://media/image/2)。 | +| mimeType | string | 是 | 否 | 文件扩展属性。 | +| mediaType8+ | [MediaType](#mediatype8) | 是 | 否 | 媒体类型。 | +| displayName | string | 是 | 是 | 显示文件名,包含后缀名。 | +| title | string | 是 | 是 | 文件标题。 | +| relativePath8+ | string | 是 | 是 | 相对公共目录路径。 | +| parent8+ | number | 是 | 否 | 父目录id。 | +| size | number | 是 | 否 | 文件大小(单位:字节)。 | +| dateAdded | number | 是 | 否 | 添加日期(添加文件时间到1970年1月1日的秒数值)。 | +| dateModified | number | 是 | 否 | 修改日期(修改文件时间到1970年1月1日的秒数值,修改文件名不会改变此值,当文件内容发生修改时才会更新)。| +| dateTaken | number | 是 | 否 | 拍摄日期(文件拍照时间到1970年1月1日的秒数值)。 | +| artist8+ | string | 是 | 否 | 作者。 | +| audioAlbum8+ | string | 是 | 否 | 专辑。 | +| width | number | 是 | 否 | 图片宽度(单位:像素)。 | +| height | number | 是 | 否 | 图片高度(单位:像素)。 | +| orientation | number | 是 | 是 | 图片显示方向(顺时针旋转角度,如0,90,180 单位:度)。 | +| duration8+ | number | 是 | 否 | 持续时间(单位:毫秒)。 | +| albumId | number | 是 | 否 | 文件所归属的相册编号。 | +| albumUri8+ | string | 是 | 否 | 文件所归属相册uri。 | +| albumName | string | 是 | 否 | 文件所归属相册名称。 | ### isDirectory8+ @@ -1078,29 +1076,29 @@ isDirectory(callback: AsyncCallback<boolean>): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ---------------------------- | ---- | ------------------- | -| callback | AsyncCallback<boolean> | 是 | 当前FileAsset是否是目录的回调 | +| callback | AsyncCallback<boolean> | 是 | callback返回boolean值,值为true则是目录,值为false则非目录。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.isDirectory((error, isDirectory) => { - if (error) { - console.error('isDirectory failed with error: ' + error); - } else { - console.info('isDirectory result:' + isDirectory); - } - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.isDirectory((error, isDirectory) => { + if (error) { + console.error('isDirectory failed with error: ' + error); + } else { + console.info('isDirectory result:' + isDirectory); + } + }); + fetchFileResult.close(); } ``` @@ -1118,27 +1116,27 @@ isDirectory():Promise<boolean> | 类型 | 说明 | | ---------------------- | ---------------------------- | -| Promise<boolean> | Promise实例,返回当前FileAsset是否是目录 | +| Promise<boolean> | Promise对象,返回boolean值,值为true则是目录,值为false则非目录。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.isDirectory().then((isDirectory) => { - console.info('isDirectory result:' + isDirectory); - }).catch((error) => { - console.error('isDirectory failed with error: ' + error); - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.isDirectory().then((isDirectory) => { + console.info('isDirectory result:' + isDirectory); + }).catch((error) => { + console.error('isDirectory failed with error: ' + error); + }); + fetchFileResult.close(); } ``` @@ -1156,26 +1154,26 @@ commitModify(callback: AsyncCallback<void>): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------- | ---- | ----- | -| callback | AsyncCallback<void> | 是 | 回调返回空 | +| callback | AsyncCallback<void> | 是 | callback返回空。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.title = 'newtitle'; - asset.commitModify(() => { - console.info('commitModify successfully'); - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.title = 'newtitle'; + asset.commitModify(() => { + console.info('commitModify successfully'); + }); + fetchFileResult.close(); } ``` @@ -1193,24 +1191,24 @@ commitModify(): Promise<void> | 类型 | 说明 | | ------------------- | ---------- | -| Promise<void> | Promise返回空 | +| Promise<void> | Promise对象,返回空。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.title = 'newtitle'; - await asset.commitModify(); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.title = 'newtitle'; + await asset.commitModify(); + fetchFileResult.close(); } ``` @@ -1226,28 +1224,28 @@ open(mode: string, callback: AsyncCallback<number>): void **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**参数** +**参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | --------------------------- | ---- | ----------------------------------- | -| mode | string | 是 | 打开文件方式,如:'r'(只读), 'w'(只写), 'rw'(读写) | -| callback | AsyncCallback<number> | 是 | 回调返回文件描述符 | +| mode | string | 是 | 打开文件方式,如:'r'(只读), 'w'(只写), 'rw'(读写)。 | +| callback | AsyncCallback<number> | 是 | callback返回文件描述符。 | **示例:** ```js async function example() { - let mediaType = mediaLibrary.MediaType.IMAGE; - let DIR_IMAGE = mediaLibrary.DirectoryType.DIR_IMAGE; - const path = await media.getPublicDirectory(DIR_IMAGE); - const asset = await media.createAsset(mediaType, 'image00003.jpg', path); - asset.open('rw', (error, fd) => { - if (fd > 0) { - asset.close(fd); - } else { - console.error('File Open failed with error: ' + error); - } - }); + let mediaType = mediaLibrary.MediaType.IMAGE; + let DIR_IMAGE = mediaLibrary.DirectoryType.DIR_IMAGE; + const path = await media.getPublicDirectory(DIR_IMAGE); + const asset = await media.createAsset(mediaType, 'image00003.jpg', path); + asset.open('rw', (error, fd) => { + if (fd > 0) { + asset.close(fd); + } else { + console.error('File Open failed with error: ' + error); + } + }); } ``` @@ -1267,27 +1265,27 @@ open(mode: string): Promise<number> | 参数名 | 类型 | 必填 | 说明 | | ---- | ------ | ---- | ----------------------------------- | -| mode | string | 是 | 打开文件方式,如:'r'(只读), 'w'(只写), 'rw'(读写) | +| mode | string | 是 | 打开文件方式,如:'r'(只读), 'w'(只写), 'rw'(读写)。 | **返回值:** | 类型 | 说明 | | --------------------- | ------------- | -| Promise<number> | Promise返回文件描述符 | +| Promise<number> | Promise对象,返回文件描述符。 | **示例:** ```js async function example() { - let mediaType = mediaLibrary.MediaType.IMAGE; - let DIR_IMAGE = mediaLibrary.DirectoryType.DIR_IMAGE; - const path = await media.getPublicDirectory(DIR_IMAGE); - const asset = await media.createAsset(mediaType, 'image00003.jpg', path); - asset.open('rw').then((fd) => { - console.info('File open fd: ' + fd); - }).catch((error) => { - console.error('File open failed with error: ' + error); - }); + let mediaType = mediaLibrary.MediaType.IMAGE; + let DIR_IMAGE = mediaLibrary.DirectoryType.DIR_IMAGE; + const path = await media.getPublicDirectory(DIR_IMAGE); + const asset = await media.createAsset(mediaType, 'image00003.jpg', path); + asset.open('rw').then((fd) => { + console.info('File open fd: ' + fd); + }).catch((error) => { + console.error('File open failed with error: ' + error); + }); } ``` @@ -1305,35 +1303,35 @@ close(fd: number, callback: AsyncCallback<void>): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------- | ---- | ----- | -| fd | number | 是 | 文件描述符 | -| callback | AsyncCallback<void> | 是 | 回调返回空 | +| fd | number | 是 | 文件描述符。 | +| callback | AsyncCallback<void> | 是 | callback返回空。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.open('rw').then((fd) => { - console.info('File open fd: ' + fd); - asset.close(fd, (error) => { - if (error) { - console.error('asset.close failed with error: ' + error); - } else { - console.info('asset.close successfully'); - } - }); - }).catch((error) => { - console.error('File open failed with error: ' + error); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.open('rw').then((fd) => { + console.info('File open fd: ' + fd); + asset.close(fd, (error) => { + if (error) { + console.error('asset.close failed with error: ' + error); + } else { + console.info('asset.close successfully'); + } }); - fetchFileResult.close(); + }).catch((error) => { + console.error('File open failed with error: ' + error); + }); + fetchFileResult.close(); } ``` @@ -1351,38 +1349,38 @@ close(fd: number): Promise<void> | 参数名 | 类型 | 必填 | 说明 | | ---- | ------ | ---- | ----- | -| fd | number | 是 | 文件描述符 | +| fd | number | 是 | 文件描述符。 | **返回值:** | 类型 | 说明 | | ------------------- | ---------- | -| Promise<void> | Promise返回空 | +| Promise<void> | Promise对象,返回空。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.open('rw').then((fd) => { - console.info('File fd!' + fd); - asset.close(fd).then(() => { - console.info('asset.close successfully'); - }).catch((closeErr) => { - console.error('asset.close fail, closeErr: ' + closeErr); - }); - }).catch((error) => { - console.error('open File failed with error: ' + error); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.open('rw').then((fd) => { + console.info('File fd!' + fd); + asset.close(fd).then(() => { + console.info('asset.close successfully'); + }).catch((closeErr) => { + console.error('asset.close fail, closeErr: ' + closeErr); }); - fetchFileResult.close(); + }).catch((error) => { + console.error('open File failed with error: ' + error); + }); + fetchFileResult.close(); } ``` @@ -1400,29 +1398,29 @@ getThumbnail(callback: AsyncCallback<image.PixelMap>): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ----------------------------------- | ---- | ---------------- | -| callback | AsyncCallback<image.PixelMap> | 是 | 回调返回缩略图的PixelMap | +| callback | AsyncCallback<image.PixelMap> | 是 | callback返回缩略图的PixelMap。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.getThumbnail((error, pixelmap) => { - if (error) { - console.error('mediaLibrary getThumbnail failed with error: ' + error); - } else { - console.info('mediaLibrary getThumbnail Successful, pixelmap ' + JSON.stringify(pixelmap)); - } - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.getThumbnail((error, pixelmap) => { + if (error) { + console.error('mediaLibrary getThumbnail failed with error: ' + error); + } else { + console.info('mediaLibrary getThumbnail Successful, pixelmap ' + JSON.stringify(pixelmap)); + } + }); + fetchFileResult.close(); } ``` @@ -1440,31 +1438,31 @@ getThumbnail(size: Size, callback: AsyncCallback<image.PixelMap>): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ----------------------------------- | ---- | ---------------- | -| size | [Size](#size8) | 是 | 缩略图尺寸 | -| callback | AsyncCallback<image.PixelMap> | 是 | 回调返回缩略图的PixelMap | +| size | [Size](#size8) | 是 | 缩略图尺寸。 | +| callback | AsyncCallback<image.PixelMap> | 是 | callback返回缩略图的PixelMap。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let size = { width: 720, height: 720 }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.getThumbnail(size, (error, pixelmap) => { - if (error) { - console.error('mediaLibrary getThumbnail failed with error: ' + error); - } else { - console.info('mediaLibrary getThumbnail Successful, pixelmap ' + JSON.stringify(pixelmap)); - } - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let size = { width: 720, height: 720 }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.getThumbnail(size, (error, pixelmap) => { + if (error) { + console.error('mediaLibrary getThumbnail failed with error: ' + error); + } else { + console.info('mediaLibrary getThumbnail Successful, pixelmap ' + JSON.stringify(pixelmap)); + } + }); + fetchFileResult.close(); } ``` @@ -1482,34 +1480,34 @@ getThumbnail(size?: Size): Promise<image.PixelMap> | 参数名 | 类型 | 必填 | 说明 | | ---- | -------------- | ---- | ----- | -| size | [Size](#size8) | 否 | 缩略图尺寸 | +| size | [Size](#size8) | 否 | 缩略图尺寸。 | **返回值:** | 类型 | 说明 | | ----------------------------- | --------------------- | -| Promise<image.PixelMap> | Promise返回缩略图的PixelMap | +| Promise<image.PixelMap> | Promise对象,返回缩略图的PixelMap。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let size = { width: 720, height: 720 }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.getThumbnail(size).then((pixelmap) => { - console.info('mediaLibrary getThumbnail Successful, pixelmap ' + JSON.stringify(pixelmap)); - }).catch((error) => { - console.error('mediaLibrary getThumbnail failed with error: ' + error); - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let size = { width: 720, height: 720 }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.getThumbnail(size).then((pixelmap) => { + console.info('mediaLibrary getThumbnail Successful, pixelmap ' + JSON.stringify(pixelmap)); + }).catch((error) => { + console.error('mediaLibrary getThumbnail failed with error: ' + error); + }); + fetchFileResult.close(); } ``` @@ -1527,30 +1525,30 @@ favorite(isFavorite: boolean, callback: AsyncCallback<void>): void | 参数名 | 类型 | 必填 | 说明 | | ---------- | ------------------------- | ---- | ---------------------------------- | -| isFavorite | boolean | 是 | 是否设置为收藏文件, true:设置为收藏文件,false:取消收藏 | -| callback | AsyncCallback<void> | 是 | 回调返回空 | +| isFavorite | boolean | 是 | 是否设置为收藏文件, true:设置为收藏文件,false:取消收藏。 | +| callback | AsyncCallback<void> | 是 | callback返回空。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.favorite(true,(error) => { - if (error) { - console.error('mediaLibrary favorite failed with error: ' + error); - } else { - console.info('mediaLibrary favorite Successful'); - } - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.favorite(true,(error) => { + if (error) { + console.error('mediaLibrary favorite failed with error: ' + error); + } else { + console.info('mediaLibrary favorite Successful'); + } + }); + fetchFileResult.close(); } ``` @@ -1568,33 +1566,33 @@ favorite(isFavorite: boolean): Promise<void> | 参数名 | 类型 | 必填 | 说明 | | ---------- | ------- | ---- | ---------------------------------- | -| isFavorite | boolean | 是 | 是否设置为收藏文件, true:设置为收藏文件,false:取消收藏 | +| isFavorite | boolean | 是 | 是否设置为收藏文件, true:设置为收藏文件,false:取消收藏。 | **返回值:** | 类型 | 说明 | | ------------------- | ---------- | -| Promise<void> | Promise返回空 | +| Promise<void> | Promise对象,返回空。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.favorite(true).then(() => { - console.info('mediaLibrary favorite Successful'); - }).catch((error) => { - console.error('mediaLibrary favorite failed with error: ' + error); - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.favorite(true).then(() => { + console.info('mediaLibrary favorite Successful'); + }).catch((error) => { + console.error('mediaLibrary favorite failed with error: ' + error); + }); + fetchFileResult.close(); } ``` @@ -1612,29 +1610,29 @@ isFavorite(callback: AsyncCallback<boolean>): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ---------------------------- | ---- | ----------- | -| callback | AsyncCallback<boolean> | 是 | 回调表示是否为收藏文件 | +| callback | AsyncCallback<boolean> | 是 | callback返回boolean值,值为true则为已收藏,值为false则为未收藏。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.isFavorite((error, isFavorite) => { - if (error) { - console.error('mediaLibrary favoriisFavoritete failed with error: ' + error); - } else { - console.info('mediaLibrary isFavorite Successful, isFavorite result: ' + isFavorite); - } - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.isFavorite((error, isFavorite) => { + if (error) { + console.error('mediaLibrary favoriisFavoritete failed with error: ' + error); + } else { + console.info('mediaLibrary isFavorite Successful, isFavorite result: ' + isFavorite); + } + }); + fetchFileResult.close(); } ``` @@ -1652,27 +1650,27 @@ isFavorite():Promise<boolean> | 类型 | 说明 | | ---------------------- | ------------------ | -| Promise<boolean> | Promise回调表示是否是收藏文件 | +| Promise<boolean> | Promise对象,返回boolean值,值为true则为已收藏,值为false则为未收藏。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.isFavorite().then((isFavorite) => { - console.info('mediaLibrary isFavorite Successful, isFavorite result: ' + isFavorite); - }).catch((error) => { - console.error('mediaLibrary favoriisFavoritete failed with error: ' + error); - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.isFavorite().then((isFavorite) => { + console.info('mediaLibrary isFavorite Successful, isFavorite result: ' + isFavorite); + }).catch((error) => { + console.error('mediaLibrary favoriisFavoritete failed with error: ' + error); + }); + fetchFileResult.close(); } ``` @@ -1692,30 +1690,30 @@ trash(isTrash: boolean, callback: AsyncCallback<void>): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------- | ---- | --------- | -| isTrash | boolean | 是 | 是否设置为垃圾文件 | -| callback | AsyncCallback<void> | 是 | 回调返回空 | +| isTrash | boolean | 是 | 是否设置为垃圾文件。 | +| callback | AsyncCallback<void> | 是 | callback返回空。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.trash(true, (error) => { - if (error) { - console.error('mediaLibrary trash failed with error: ' + error); - } else { - console.info('mediaLibrary trash Successful'); - } - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.trash(true, (error) => { + if (error) { + console.error('mediaLibrary trash failed with error: ' + error); + } else { + console.info('mediaLibrary trash Successful'); + } + }); + fetchFileResult.close(); } ``` @@ -1735,33 +1733,33 @@ trash(isTrash: boolean): Promise<void> | 参数名 | 类型 | 必填 | 说明 | | ------- | ------- | ---- | --------- | -| isTrash | boolean | 是 | 是否设置为垃圾文件 | +| isTrash | boolean | 是 | 是否设置为垃圾文件。 | **返回值:** | 类型 | 说明 | | ------------------- | ---------- | -| Promise<void> | Promise返回空 | +| Promise<void> | Promise对象,返回空 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.trash(true).then(() => { - console.info('trash successfully'); - }).catch((error) => { - console.error('trash failed with error: ' + error); - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.trash(true).then(() => { + console.info('trash successfully'); + }).catch((error) => { + console.error('trash failed with error: ' + error); + }); + fetchFileResult.close(); } ``` @@ -1779,29 +1777,29 @@ isTrash(callback: AsyncCallback<boolean>): void | 参数名 | 类型 | 必填 | 说明 | | -------- | ---------------------------- | ---- | --------------- | -| callback | AsyncCallback<boolean> | 是 | 回调返回表示文件是否为垃圾文件 | +| callback | AsyncCallback<boolean> | 是 | callback返回boolean值,值为true则为垃圾文件,值为false则为非垃圾文件。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.isTrash((error, isTrash) => { - if (error) { - console.error('Failed to get trash state failed with error: ' + error); - return; - } - console.info('Get trash state successfully, isTrash result: ' + isTrash); - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.isTrash((error, isTrash) => { + if (error) { + console.error('Failed to get trash state failed with error: ' + error); + return; + } + console.info('Get trash state successfully, isTrash result: ' + isTrash); + }); + fetchFileResult.close(); } ``` @@ -1819,27 +1817,27 @@ isTrash():Promise<boolean> | 类型 | 说明 | | ------------------- | -------------------- | -| Promise<void> | Promise回调表示文件是否为垃圾文件 | +| Promise<void> | Promise对象,返回boolean值,值为true则为垃圾文件,值为false则为非垃圾文件。 | **示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - const fetchFileResult = await media.getFileAssets(getImageOp); - const asset = await fetchFileResult.getFirstObject(); - asset.isTrash().then((isTrash) => { - console.info('isTrash result: ' + isTrash); - }).catch((error) => { - console.error('isTrash failed with error: ' + error); - }); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + const fetchFileResult = await media.getFileAssets(getImageOp); + const asset = await fetchFileResult.getFirstObject(); + asset.isTrash().then((isTrash) => { + console.info('isTrash result: ' + isTrash); + }).catch((error) => { + console.error('isTrash failed with error: ' + error); + }); + fetchFileResult.close(); } ``` @@ -1855,27 +1853,27 @@ getCount(): number **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**返回值**: +**返回值:** | 类型 | 说明 | | ------ | -------- | -| number | 检索到的文件总数 | +| number | 检索到的文件总数。 | -**示例**: +**示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let fileType = mediaLibrary.MediaType.FILE; - let getFileCountOneOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [fileType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let fetchFileResult = await media.getFileAssets(getFileCountOneOp); - const fetchCount = fetchFileResult.getCount(); - console.info('fetchCount result: ' + fetchCount); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let fileType = mediaLibrary.MediaType.FILE; + let getFileCountOneOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [fileType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let fetchFileResult = await media.getFileAssets(getFileCountOneOp); + const fetchCount = fetchFileResult.getCount(); + console.info('fetchCount result: ' + fetchCount); + fetchFileResult.close(); } ``` @@ -1887,35 +1885,35 @@ isAfterLast(): boolean **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**返回值**: +**返回值:** | 类型 | 说明 | | ------- | ---------------------------------- | | boolean | 当读到最后一条记录后,后续没有记录返回true,否则返回false。 | -**示例**: +**示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let fetchFileResult = await media.getFileAssets(getImageOp); - const fetchCount = fetchFileResult.getCount(); - console.info('mediaLibrary fetchFileResult.getCount, count:' + fetchCount); - let fileAsset = await fetchFileResult.getFirstObject(); - for (var i = 1; i < fetchCount; i++) { - fileAsset = await fetchFileResult.getNextObject(); - if(i == fetchCount - 1) { - var result = fetchFileResult.isAfterLast(); - console.info('mediaLibrary fileAsset isAfterLast result: ' + result); - fetchFileResult.close(); - } + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let fetchFileResult = await media.getFileAssets(getImageOp); + const fetchCount = fetchFileResult.getCount(); + console.info('mediaLibrary fetchFileResult.getCount, count:' + fetchCount); + let fileAsset = await fetchFileResult.getFirstObject(); + for (var i = 1; i < fetchCount; i++) { + fileAsset = await fetchFileResult.getNextObject(); + if(i == fetchCount - 1) { + var result = fetchFileResult.isAfterLast(); + console.info('mediaLibrary fileAsset isAfterLast result: ' + result); + fetchFileResult.close(); } + } } ``` @@ -1927,19 +1925,19 @@ close(): void **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**示例**: +**示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let fetchFileResult = await media.getFileAssets(getImageOp); - fetchFileResult.close(); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let fetchFileResult = await media.getFileAssets(getImageOp); + fetchFileResult.close(); } ``` @@ -1951,32 +1949,32 @@ getFirstObject(callback: AsyncCallback<FileAsset>): void **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**参数**: +**参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | --------------------------------------------- | ---- | ------------------------------------------- | -| callback | AsyncCallback<[FileAsset](#fileasset7)> | 是 | 异步获取结果集中第一个FileAsset完成后的回调 | +| callback | AsyncCallback<[FileAsset](#fileasset7)> | 是 | callback返回文件检索结果集中第一个FileAsset对象。 | -**示例**: +**示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let fetchFileResult = await media.getFileAssets(getImageOp); - fetchFileResult.getFirstObject((error, fileAsset) => { - if (error) { - console.error('fetchFileResult getFirstObject failed with error: ' + error); - return; - } - console.info('getFirstObject successfully, displayName : ' + fileAsset.displayName); - fetchFileResult.close(); - }) + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let fetchFileResult = await media.getFileAssets(getImageOp); + fetchFileResult.getFirstObject((error, fileAsset) => { + if (error) { + console.error('fetchFileResult getFirstObject failed with error: ' + error); + return; + } + console.info('getFirstObject successfully, displayName : ' + fileAsset.displayName); + fetchFileResult.close(); + }) } ``` @@ -1988,30 +1986,30 @@ getFirstObject(): Promise<FileAsset> **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**返回值**: +**返回值:** | 类型 | 说明 | | --------------------------------------- | -------------------------- | -| Promise<[FileAsset](#fileasset7)> | Promise方式返回FileAsset。 | +| Promise<[FileAsset](#fileasset7)> | Promise对象,返回文件检索结果集中第一个FileAsset。 | -**示例**: +**示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let fetchFileResult = await media.getFileAssets(getImageOp); - fetchFileResult.getFirstObject().then((fileAsset) => { - console.info('getFirstObject successfully, displayName: ' + fileAsset.displayName); - fetchFileResult.close(); - }).catch((error) => { - console.error('getFirstObject failed with error: ' + error); - }); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let fetchFileResult = await media.getFileAssets(getImageOp); + fetchFileResult.getFirstObject().then((fileAsset) => { + console.info('getFirstObject successfully, displayName: ' + fileAsset.displayName); + fetchFileResult.close(); + }).catch((error) => { + console.error('getFirstObject failed with error: ' + error); + }); } ``` @@ -2025,36 +2023,36 @@ getNextObject(callback: AsyncCallback<FileAsset>): void **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**参数**: +**参数:** | 参数名 | 类型 | 必填 | 说明 | | --------- | --------------------------------------------- | ---- | ----------------------------------------- | -| callbacke | AsyncCallback<[FileAsset](#fileasset7)> | 是 | 异步返回结果集中下一个FileAsset之后的回调 | +| callbacke | AsyncCallback<[FileAsset](#fileasset7)> | 是 | callback返回文件检索结果集中下一个FileAsset对象。 | -**示例**: +**示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let fetchFileResult = await media.getFileAssets(getImageOp); - let fileAsset = await fetchFileResult.getFirstObject(); - console.log('fetchFileResult getFirstObject successfully, displayName: ' + fileAsset.displayName); - if (!fetchFileResult.isAfterLast()) { - fetchFileResult.getNextObject((error, fileAsset) => { - if (error) { - console.error('fetchFileResult getNextObject failed with error: ' + error); - return; - } - console.log('fetchFileResult getNextObject successfully, displayName: ' + fileAsset.displayName); - fetchFileResult.close(); - }) - } + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let fetchFileResult = await media.getFileAssets(getImageOp); + let fileAsset = await fetchFileResult.getFirstObject(); + console.log('fetchFileResult getFirstObject successfully, displayName: ' + fileAsset.displayName); + if (!fetchFileResult.isAfterLast()) { + fetchFileResult.getNextObject((error, fileAsset) => { + if (error) { + console.error('fetchFileResult getNextObject failed with error: ' + error); + return; + } + console.log('fetchFileResult getNextObject successfully, displayName: ' + fileAsset.displayName); + fetchFileResult.close(); + }) + } } ``` @@ -2069,34 +2067,34 @@ getNextObject(): Promise<FileAsset> **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**返回值**: +**返回值:** | 类型 | 说明 | | --------------------------------------- | ----------------- | -| Promise<[FileAsset](#fileasset7)> | 返回FileAsset对象 | +| Promise<[FileAsset](#fileasset7)> | Promise对象,返回文件检索结果集中下一个FileAsset。 | -**示例**: +**示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let fetchFileResult = await media.getFileAssets(getImageOp); - let fileAsset = await fetchFileResult.getFirstObject(); - console.log('fetchFileResult getFirstObject successfully, displayName: ' + fileAsset.displayName); - if (!fetchFileResult.isAfterLast()) { - fetchFileResult.getNextObject().then((fileAsset) => { - console.info('fetchFileResult getNextObject successfully, displayName: ' + fileAsset.displayName); - fetchFileResult.close(); - }).catch((error) => { - console.error('fetchFileResult getNextObject failed with error: ' + error); - }) - } + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let fetchFileResult = await media.getFileAssets(getImageOp); + let fileAsset = await fetchFileResult.getFirstObject(); + console.log('fetchFileResult getFirstObject successfully, displayName: ' + fileAsset.displayName); + if (!fetchFileResult.isAfterLast()) { + fetchFileResult.getNextObject().then((fileAsset) => { + console.info('fetchFileResult getNextObject successfully, displayName: ' + fileAsset.displayName); + fetchFileResult.close(); + }).catch((error) => { + console.error('fetchFileResult getNextObject failed with error: ' + error); + }) + } } ``` @@ -2108,32 +2106,32 @@ getLastObject(callback: AsyncCallback<FileAsset>): void **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**参数**: +**参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | --------------------------------------------- | ---- | --------------------------- | -| callback | AsyncCallback<[FileAsset](#fileasset7)> | 是 | 异步返回FileAsset之后的回调 | +| callback | AsyncCallback<[FileAsset](#fileasset7)> | 是 | callback返回文件检索结果集中最后一个FileAsset对象。 | -**示例**: +**示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let fetchFileResult = await media.getFileAssets(getImageOp); - fetchFileResult.getLastObject((error, fileAsset) => { - if (error) { - console.error('getLastObject failed with error: ' + error); - return; - } - console.info('getLastObject successfully, displayName: ' + fileAsset.displayName); - fetchFileResult.close(); - }) + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let fetchFileResult = await media.getFileAssets(getImageOp); + fetchFileResult.getLastObject((error, fileAsset) => { + if (error) { + console.error('getLastObject failed with error: ' + error); + return; + } + console.info('getLastObject successfully, displayName: ' + fileAsset.displayName); + fetchFileResult.close(); + }) } ``` @@ -2145,30 +2143,30 @@ getLastObject(): Promise<FileAsset> **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**返回值**: +**返回值:** | 类型 | 说明 | | --------------------------------------- | ----------------- | -| Promise<[FileAsset](#fileasset7)> | 返回FileAsset对象 | +| Promise<[FileAsset](#fileasset7)> | Promise对象,返回文件检索结果集中最后一个FileAsset。 | -**示例**: +**示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let fetchFileResult = await media.getFileAssets(getImageOp); - fetchFileResult.getLastObject().then((fileAsset) => { - console.info('getLastObject successfully, displayName: ' + fileAsset.displayName); - fetchFileResult.close(); - }).catch((error) => { - console.error('getLastObject failed with error: ' + error); - }); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let fetchFileResult = await media.getFileAssets(getImageOp); + fetchFileResult.getLastObject().then((fileAsset) => { + console.info('getLastObject successfully, displayName: ' + fileAsset.displayName); + fetchFileResult.close(); + }).catch((error) => { + console.error('getLastObject failed with error: ' + error); + }); } ``` @@ -2180,33 +2178,33 @@ getPositionObject(index: number, callback: AsyncCallback<FileAsset>): void **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**参数**: +**参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ---------------------------------------- | ---- | ------------------ | -| index | number | 是 | 要获取的文件的索引,从0开始(注意该值要小于文件检索集的count值) | -| callback | AsyncCallback<[FileAsset](#fileasset7)> | 是 | 异步返回FileAsset之后的回调 | +| index | number | 是 | 要获取的文件的索引,从0开始(注意该值要小于文件检索集的count值)。 | +| callback | AsyncCallback<[FileAsset](#fileasset7)> | 是 | callback返回文件检索结果集中指定索引处的FileAsset对象。 | -**示例**: +**示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let fetchFileResult = await media.getFileAssets(getImageOp); - fetchFileResult.getPositionObject(0, (error, fileAsset) => { - if (error) { - console.error('getPositionObject failed with error: ' + error); - return; - } - console.info('getPositionObject successfully, displayName: ' + fileAsset.displayName); - fetchFileResult.close(); - }) + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let fetchFileResult = await media.getFileAssets(getImageOp); + fetchFileResult.getPositionObject(0, (error, fileAsset) => { + if (error) { + console.error('getPositionObject failed with error: ' + error); + return; + } + console.info('getPositionObject successfully, displayName: ' + fileAsset.displayName); + fetchFileResult.close(); + }) } ``` @@ -2218,36 +2216,36 @@ getPositionObject(index: number): Promise<FileAsset> **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**参数**: +**参数:** | 参数名 | 类型 | 必填 | 说明 | | ----- | ------ | ---- | -------------- | -| index | number | 是 | 要获取的文件的索引,从0开始(注意该值要小于文件检索集的count值) | +| index | number | 是 | 要获取的文件的索引,从0开始(注意该值要小于文件检索集的count值)。 | -**返回值**: +**返回值:** | 类型 | 说明 | | --------------------------------------- | ----------------- | -| Promise<[FileAsset](#fileasset7)> | 返回FileAsset对象 | +| Promise<[FileAsset](#fileasset7)> | Promise对象,返回文件检索结果集中指定索引处的FileAsset。 | -**示例**: +**示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let fetchFileResult = await media.getFileAssets(getImageOp); - fetchFileResult.getPositionObject(0).then((fileAsset) => { - console.info('getPositionObject successfully, displayName: ' + fileAsset.displayName); - fetchFileResult.close(); - }).catch((error) => { - console.error('getPositionObject failed with error: ' + error); - }); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let fetchFileResult = await media.getFileAssets(getImageOp); + fetchFileResult.getPositionObject(0).then((fileAsset) => { + console.info('getPositionObject successfully, displayName: ' + fileAsset.displayName); + fetchFileResult.close(); + }).catch((error) => { + console.error('getPositionObject failed with error: ' + error); + }); } ``` @@ -2259,34 +2257,34 @@ getAllObject(callback: AsyncCallback<Array<FileAsset>>): void **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**参数**: +**参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ---------------------------------------- | ---- | -------------------- | -| callback | AsyncCallback<Array<[FileAsset](#fileasset7)>> | 是 | 异步返回FileAsset列表之后的回调 | +| callback | AsyncCallback<Array<[FileAsset](#fileasset7)>> | 是 | callback返回文件检索结果集中所有的FileAsset对象。 | -**示例**: +**示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let fetchFileResult = await media.getFileAssets(getImageOp); - fetchFileResult.getAllObject((error, fileAssetList) => { - if (error) { - console.error('getAllObject failed with error: ' + error); - return; - } - for (let i = 0; i < fetchFileResult.getCount(); i++) { - console.info('getAllObject fileAssetList ' + i + ' displayName: ' + fileAssetList[i].displayName); - } - fetchFileResult.close(); - }) + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let fetchFileResult = await media.getFileAssets(getImageOp); + fetchFileResult.getAllObject((error, fileAssetList) => { + if (error) { + console.error('getAllObject failed with error: ' + error); + return; + } + for (let i = 0; i < fetchFileResult.getCount(); i++) { + console.info('getAllObject fileAssetList ' + i + ' displayName: ' + fileAssetList[i].displayName); + } + fetchFileResult.close(); + }) } ``` @@ -2298,32 +2296,32 @@ getAllObject(): Promise<Array<FileAsset>> **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**返回值**: +**返回值:** | 类型 | 说明 | | ---------------------------------------- | --------------------- | -| Promise<Array<[FileAsset](#fileasset7)>> | 返回FileAsset对象列表 | +| Promise<Array<[FileAsset](#fileasset7)>> | Promise对象,返回文件检索结果集中所有的FileAsset。 | -**示例**: +**示例:** ```js async function example() { - let fileKeyObj = mediaLibrary.FileKey; - let imageType = mediaLibrary.MediaType.IMAGE; - let getImageOp = { - selections: fileKeyObj.MEDIA_TYPE + '= ?', - selectionArgs: [imageType.toString()], - order: fileKeyObj.DATE_ADDED + ' DESC', - }; - let fetchFileResult = await media.getFileAssets(getImageOp); - fetchFileResult.getAllObject().then((fileAssetList) => { - for (let i = 0; i < fetchFileResult.getCount(); i++) { - console.info('getAllObject fileAssetList ' + i + ' displayName: ' + fileAssetList[i].displayName); - } - fetchFileResult.close(); - }).catch((error) => { - console.error('getAllObject failed with error: ' + error); - }); + let fileKeyObj = mediaLibrary.FileKey; + let imageType = mediaLibrary.MediaType.IMAGE; + let getImageOp = { + selections: fileKeyObj.MEDIA_TYPE + '= ?', + selectionArgs: [imageType.toString()], + order: fileKeyObj.DATE_ADDED + ' DESC', + }; + let fetchFileResult = await media.getFileAssets(getImageOp); + fetchFileResult.getAllObject().then((fileAssetList) => { + for (let i = 0; i < fetchFileResult.getCount(); i++) { + console.info('getAllObject fileAssetList ' + i + ' displayName: ' + fileAssetList[i].displayName); + } + fetchFileResult.close(); + }).catch((error) => { + console.error('getAllObject failed with error: ' + error); + }); } ``` @@ -2337,13 +2335,13 @@ async function example() { | 名称 | 类型 | 可读 | 可写 | 说明 | | ------------ | ------ | ---- | ---- | ------- | -| albumId | number | 是 | 否 | 相册编号 | -| albumName | string | 是 | 是 | 相册名称 | -| albumUri8+ | string | 是 | 否 | 相册Uri | -| dateModified | number | 是 | 否 | 修改日期 | -| count8+ | number | 是 | 否 | 相册中文件数量 | -| relativePath8+ | string | 是 | 否 | 相对路径 | -| coverUri8+ | string | 是 | 否 | 封面文件Uri | +| albumId | number | 是 | 否 | 相册编号。 | +| albumName | string | 是 | 是 | 相册名称。 | +| albumUri8+ | string | 是 | 否 | 相册Uri。 | +| dateModified | number | 是 | 否 | 修改日期。 | +| count8+ | number | 是 | 否 | 相册中文件数量。 | +| relativePath8+ | string | 是 | 否 | 相对路径。 | +| coverUri8+ | string | 是 | 否 | 封面文件Uri。 | ### commitModify8+ @@ -2355,13 +2353,13 @@ commitModify(callback: AsyncCallback<void>): void **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**参数**: +**参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | ------------------------- | ---- | ---------- | -| callback | AsyncCallback<void> | 是 | 回调返回空 | +| callback | AsyncCallback<void> | 是 | callback返回空。 | -**示例**: +**示例:** ```js async function example() { @@ -2379,7 +2377,7 @@ async function example() { return; } console.info('commitModify successful.'); - }) + }); } ``` @@ -2393,13 +2391,13 @@ commitModify(): Promise<void> **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**返回值**: +**返回值:** | 类型 | 说明 | | ------------------- | ------------ | -| Promise<void> | Promise调用返回空 | +| Promise<void> | Promise对象,返回空。 | -**示例**: +**示例:** ```js async function example() { @@ -2429,13 +2427,13 @@ getFileAssets(callback: AsyncCallback<FetchFileResult>): void **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**参数**: +**参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | --------------------------------------------------- | ---- | ----------------------------------- | -| callback | AsyncCallback<[FetchFileResult](#fetchfileresult7)> | 是 | 异步返回FetchFileResult之后的回调。 | +| callback | AsyncCallback<[FetchFileResult](#fetchfileresult7)> | 是 | callback返回相册中的文件检索结果集。 | -**示例**: +**示例:** ```js async function example() { @@ -2470,14 +2468,14 @@ getFileAssets(options: MediaFetchOptions, callback: AsyncCallback<FetchFileRe **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**参数**: +**参数:** | 参数名 | 类型 | 必填 | 说明 | | -------- | --------------------------------------------------- | ---- | ----------------------------------- | | options | [MediaFetchOptions](#mediafetchoptions7) | 是 | 媒体检索选项。 | -| callback | AsyncCallback<[FetchFileResult](#fetchfileresult7)> | 是 | 异步返回FetchFileResult之后的回调。 | +| callback | AsyncCallback<[FetchFileResult](#fetchfileresult7)> | 是 | callback返回相册中的文件检索结果集。 | -**示例**: +**示例:** ```js async function example() { @@ -2489,11 +2487,11 @@ async function example() { let fileNoArgsfetchOp = { selections: '', selectionArgs: [], - } - // 获取符合检索要求的相册,返回相册列表 + }; + // 获取符合检索要求的相册,返回相册列表。 const albumList = await media.getAlbums(AlbumNoArgsfetchOp); const album = albumList[0]; - // 取到相册列表中的一个相册,获取此相册中所有符合媒体检索选项的媒体资源 + // 取到相册列表中的一个相册,获取此相册中所有符合媒体检索选项的媒体资源。 album.getFileAssets(fileNoArgsfetchOp, (error, fetchFileResult) => { if (error) { console.error('album getFileAssets failed with error: ' + error); @@ -2516,19 +2514,19 @@ async function example() { **系统能力**:SystemCapability.Multimedia.MediaLibrary.Core -**参数**: +**参数:** | 参数名 | 类型 | 必填 | 说明 | | ------- | ---------------------------------------- | ---- | -------------- | | options | [MediaFetchOptions](#mediafetchoptions7) | 否 | 媒体检索选项。 | -**返回值**: +**返回值:** | 类型 | 说明 | | --------------------------------------------- | ------------------------- | -| Promise<[FetchFileResult](#fetchfileresult7)> | 返回FetchFileResult对象。 | +| Promise<[FetchFileResult](#fetchfileresult7)> | Promise对象,返回相册中的文件检索结果集。 | -**示例**: +**示例:** ```js async function example() { @@ -2541,10 +2539,10 @@ async function example() { selections: '', selectionArgs: [], }; - // 获取符合检索要求的相册,返回相册列表 + // 获取符合检索要求的相册,返回相册列表。 const albumList = await media.getAlbums(AlbumNoArgsfetchOp); const album = albumList[0]; - // 取到相册列表中的一个相册,获取此相册中所有符合媒体检索选项的媒体资源 + // 取到相册列表中的一个相册,获取此相册中所有符合媒体检索选项的媒体资源。 album.getFileAssets(fileNoArgsfetchOp).then((fetchFileResult) => { let count = fetchFileResult.getCount(); console.info('album getFileAssets successfully, count: ' + count); @@ -2565,12 +2563,10 @@ async function example() { | 名称 | 类型 | 可读 | 可写 | 说明 | | ---------- | -------------------------- | ---- | ---- | ---------------- | -| deviceName | string | 是 | 否 | 注册设备的名称 | -| networkId | string | 是 | 否 | 注册设备的网络ID | -| deviceType | [DeviceType](#devicetype8) | 是 | 否 | 设备类型 | -| isOnline | boolean | 是 | 否 | 是否在线 | - - +| deviceName | string | 是 | 否 | 注册设备的名称。 | +| networkId | string | 是 | 否 | 注册设备的网络ID。 | +| deviceType | [DeviceType](#devicetype8) | 是 | 否 | 设备类型。 | +| isOnline | boolean | 是 | 否 | 是否在线。 | ## MediaType8+ @@ -2580,10 +2576,10 @@ async function example() { | 名称 | 值 | 说明 | | ----- | ---- | ---- | -| FILE | 0 | 文件 | -| IMAGE | 1 | 图片 | -| VIDEO | 2 | 视频 | -| AUDIO | 3 | 音频 | +| FILE | 0 | 文件。 | +| IMAGE | 1 | 图片。 | +| VIDEO | 2 | 视频。| +| AUDIO | 3 | 音频。 | ## FileKey8+ @@ -2596,25 +2592,25 @@ async function example() { | 名称 | 值 | 说明 | | ------------- | ------------------- | ---------------------------------------------------------- | -| ID | 'file_id' | 文件编号 | -| RELATIVE_PATH | 'relative_path' | 相对公共目录路径 | -| DISPLAY_NAME | 'display_name' | 显示名字 | -| PARENT | 'parent' | 父目录id | -| MIME_TYPE | 'mime_type' | 文件扩展属性(如:image/*、video/*、file/*) | -| MEDIA_TYPE | 'media_type' | 媒体类型 | -| SIZE | 'size' | 文件大小(单位:字节) | -| DATE_ADDED | 'date_added' | 添加日期(添加文件时间到1970年1月1日的秒数值) | -| DATE_MODIFIED | 'date_modified' | 修改日期(修改文件时间到1970年1月1日的秒数值,修改文件名不会改变此值,当文件内容发生修改时才会更新) | -| DATE_TAKEN | 'date_taken' | 拍摄日期(文件拍照时间到1970年1月1日的秒数值) | -| TITLE | 'title' | 文件标题 | -| ARTIST | 'artist' | 作者 | -| AUDIOALBUM | 'audio_album' | 专辑 | -| DURATION | 'duration' | 持续时间(单位:毫秒) | -| WIDTH | 'width' | 图片宽度(单位:像素) | -| HEIGHT | 'height' | 图片高度(单位:像素) | -| ORIENTATION | 'orientation' | 图片显示方向,即顺时针旋转角度,如0,90,180。(单位:度) | -| ALBUM_ID | 'bucket_id' | 文件所归属的相册编号 | -| ALBUM_NAME | 'bucket_display_name' | 文件所归属相册名称 | +| ID | 'file_id' | 文件编号。 | +| RELATIVE_PATH | 'relative_path' | 相对公共目录路径。 | +| DISPLAY_NAME | 'display_name' | 显示名字。 | +| PARENT | 'parent' | 父目录id。 | +| MIME_TYPE | 'mime_type' | 文件扩展属性(如:image/*、video/*、file/*)。 | +| MEDIA_TYPE | 'media_type' | 媒体类型。 | +| SIZE | 'size' | 文件大小(单位:字节)。 | +| DATE_ADDED | 'date_added' | 添加日期(添加文件时间到1970年1月1日的秒数值)。 | +| DATE_MODIFIED | 'date_modified' | 修改日期(修改文件时间到1970年1月1日的秒数值,修改文件名不会改变此值,当文件内容发生修改时才会更新)。 | +| DATE_TAKEN | 'date_taken' | 拍摄日期(文件拍照时间到1970年1月1日的秒数值)。 | +| TITLE | 'title' | 文件标题。 | +| ARTIST | 'artist' | 作者。 | +| AUDIOALBUM | 'audio_album' | 专辑。 | +| DURATION | 'duration' | 持续时间(单位:毫秒)。 | +| WIDTH | 'width' | 图片宽度(单位:像素)。 | +| HEIGHT | 'height' | 图片高度(单位:像素)。 | +| ORIENTATION | 'orientation' | 图片显示方向,即顺时针旋转角度,如0,90,180。(单位:度)。 | +| ALBUM_ID | 'bucket_id' | 文件所归属的相册编号。 | +| ALBUM_NAME | 'bucket_display_name' | 文件所归属相册名称。 | ## DirectoryType8+ @@ -2624,12 +2620,12 @@ async function example() { | 名称 | 值 | 说明 | | ------------- | --- | ------------------ | -| DIR_CAMERA | 0 | 表示Camera文件路径 | -| DIR_VIDEO | 1 | 表示视频路径 | -| DIR_IMAGE | 2 | 表示图片路径 | -| DIR_AUDIO | 3 | 表示音频路径 | -| DIR_DOCUMENTS | 4 | 表示文档路径 | -| DIR_DOWNLOAD | 5 | 表示下载路径 | +| DIR_CAMERA | 0 | 表示Camera文件路径。 | +| DIR_VIDEO | 1 | 表示视频路径。 | +| DIR_IMAGE | 2 | 表示图片路径。 | +| DIR_AUDIO | 3 | 表示音频路径。 | +| DIR_DOCUMENTS | 4 | 表示文档路径。 | +| DIR_DOWNLOAD | 5 | 表示下载路径。 | ## DeviceType8+ @@ -2641,13 +2637,13 @@ async function example() { | 名称 | 值 | 说明 | | ------------ | --- | ---------- | -| TYPE_UNKNOWN | 0 | 未识别设备 | -| TYPE_LAPTOP | 1 | 笔记本电脑 | -| TYPE_PHONE | 2 | 手机 | -| TYPE_TABLET | 3 | 平板电脑 | -| TYPE_WATCH | 4 | 智能手表 | -| TYPE_CAR | 5 | 车载设备 | -| TYPE_TV | 6 | 电视设备 | +| TYPE_UNKNOWN | 0 | 未识别设备。 | +| TYPE_LAPTOP | 1 | 笔记本电脑。 | +| TYPE_PHONE | 2 | 手机。 | +| TYPE_TABLET | 3 | 平板电脑。 | +| TYPE_WATCH | 4 | 智能手表。 | +| TYPE_CAR | 5 | 车载设备。 | +| TYPE_TV | 6 | 电视设备。 | ## MediaFetchOptions7+ @@ -2660,9 +2656,9 @@ async function example() { | selections | string | 是 | 是 | 检索条件,使用[FileKey](#filekey8)中的枚举值作为检索条件的列名。示例:
selections: mediaLibrary.FileKey.MEDIA_TYPE + '= ? OR ' + mediaLibrary.FileKey.MEDIA_TYPE + '= ?', | | selectionArgs | Array<string> | 是 | 是 | 检索条件的值,对应selections中检索条件列的值。
示例:
selectionArgs: [mediaLibrary.MediaType.IMAGE.toString(), mediaLibrary.MediaType.VIDEO.toString()], | | order | string | 是 | 是 | 检索结果排序方式,使用[FileKey](#filekey8)中的枚举值作为检索结果排序的列,可以用升序或降序排列。示例:
升序排列:order: mediaLibrary.FileKey.DATE_ADDED + ' ASC'
降序排列:order: mediaLibrary.FileKey.DATE_ADDED + ' DESC' | -| uri8+ | string | 是 | 是 | 文件URI | -| networkId8+ | string | 是 | 是 | 注册设备网络ID | -| extendArgs8+ | string | 是 | 是 | 扩展的检索参数,目前没有扩展检索参数 | +| uri8+ | string | 是 | 是 | 文件URI。 | +| networkId8+ | string | 是 | 是 | 注册设备网络ID。 | +| extendArgs8+ | string | 是 | 是 | 扩展的检索参数,目前没有扩展检索参数。 | ## Size8+ @@ -2672,8 +2668,8 @@ async function example() { | 名称 | 类型 | 可读 | 可写 | 说明 | | ------ | ------ | ---- | ---- | -------- | -| width | number | 是 | 是 | 宽(单位:像素) | -| height | number | 是 | 是 | 高(单位:像素) | +| width | number | 是 | 是 | 宽(单位:像素)。 | +| height | number | 是 | 是 | 高(单位:像素)。 | ## MediaAssetOption @@ -2681,7 +2677,6 @@ async function example() { **系统能力:** 以下各项对应的系统能力均为SystemCapability.Multimedia.MediaLibrary.Core - | 名称 | 类型 | 可读 | 可写 | 说明 | | ------------ | ------ | ---- | ---- | ------------------------------------------------------------ | | src | string | 是 | 是 | 本地文件应用沙箱路径。 | @@ -2696,6 +2691,5 @@ async function example() { | 名称 | 类型 | 可读 | 可写 | 说明 | | ----- | ------ | ---- | ---- | -------------------- | -| type | 'image' | 'video' | 'media' | 是 | 是 | 媒体类型,包括:image, video, media,当前仅支持media类型 | +| type | 'image' | 'video' | 'media' | 是 | 是 | 媒体类型,包括:image, video, media,当前仅支持media类型。 | | count | number | 是 | 是 | 可以选择媒体数量的最大值,count = 1表示单选,count大于1表示多选。 | - diff --git a/zh-cn/application-dev/reference/apis/js-apis-net-mdns.md b/zh-cn/application-dev/reference/apis/js-apis-net-mdns.md index 5690ac8d20ab87beb5898a950ff6d41839c1c391..fab925b78e132512652558c71e28a9d02ff38f1b 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-net-mdns.md +++ b/zh-cn/application-dev/reference/apis/js-apis-net-mdns.md @@ -629,7 +629,7 @@ FA模型示例: // 获取context import featureAbility from '@ohos.ability.featureAbility'; let context = featureAbility.getContext(); - +let serviceType = "_print._tcp"; let discoveryService = mdns.createDiscoveryService(context, serviceType); discoveryService.startSearchingMDNS(); ``` @@ -645,7 +645,7 @@ class EntryAbility extends UIAbility { } } let context = globalThis.context; - +let serviceType = "_print._tcp"; let discoveryService = mdns.createDiscoveryService(context, serviceType); discoveryService.startSearchingMDNS(); ``` @@ -666,7 +666,7 @@ FA模型示例: // 获取context import featureAbility from '@ohos.ability.featureAbility'; let context = featureAbility.getContext(); - +let serviceType = "_print._tcp"; let discoveryService = mdns.createDiscoveryService(context, serviceType); discoveryService.stopSearchingMDNS(); ``` @@ -682,7 +682,7 @@ class EntryAbility extends UIAbility { } } let context = globalThis.context; - +let serviceType = "_print._tcp"; let discoveryService = mdns.createDiscoveryService(context, serviceType); discoveryService.stopSearchingMDNS(); ``` @@ -706,6 +706,8 @@ on(type: 'discoveryStart', callback: Callback<{serviceInfo: LocalServiceInfo, er ```js // 参考mdns.createDiscoveryService +let context = globalThis.context; +let serviceType = "_print._tcp"; let discoveryService = mdns.createDiscoveryService(context, serviceType); discoveryService.startSearchingMDNS(); @@ -735,6 +737,8 @@ on(type: 'discoveryStop', callback: Callback<{serviceInfo: LocalServiceInfo, err ```js // 参考mdns.createDiscoveryService +let context = globalThis.context; +let serviceType = "_print._tcp"; let discoveryService = mdns.createDiscoveryService(context, serviceType); discoveryService.startSearchingMDNS(); @@ -764,6 +768,8 @@ on(type: 'serviceFound', callback: Callback\): void ```js // 参考mdns.createDiscoveryService +let context = globalThis.context; +let serviceType = "_print._tcp"; let discoveryService = mdns.createDiscoveryService(context, serviceType); discoveryService.startSearchingMDNS(); @@ -793,6 +799,8 @@ on(type: 'serviceLost', callback: Callback\): void ```js // 参考mdns.createDiscoveryService +let context = globalThis.context; +let serviceType = "_print._tcp"; let discoveryService = mdns.createDiscoveryService(context, serviceType); discoveryService.startSearchingMDNS(); diff --git a/zh-cn/application-dev/reference/apis/js-apis-observer.md b/zh-cn/application-dev/reference/apis/js-apis-observer.md index 1df375f5345435c21db631dd356ddcca09d2343b..a32d61f9e5b81f9366298c4361d8059743b32a04 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-observer.md +++ b/zh-cn/application-dev/reference/apis/js-apis-observer.md @@ -849,6 +849,83 @@ observer.off('simStateChange', callback); observer.off('simStateChange'); ``` +## observer.on('iccAccountInfoChange')10+ + +on\(type: 'iccAccountInfoChange', callback: Callback\\): void; + +订阅卡帐户变化事件,使用callback方式作为异步方法。 + +**系统能力**:SystemCapability.Telephony.StateRegistry + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | +| type | string | 是 | 卡帐户变化事件,参数固定为'iccAccountInfoChange'。 | +| callback | Callback\ | 是 | 回调函数。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------------------- | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**示例:** + +```js +observer.on('iccAccountInfoChange', error => { + console.log("on iccAccountInfoChange, error:" + JSON.stringify(error)); +}); +``` + + +## observer.off('iccAccountInfoChange')10+ + +off\(type: 'iccAccountInfoChange', callback?: Callback\\): void; + +移除订阅卡帐户变化事件,使用callback方式作为异步方法。 + +>**说明:** +> +>可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。 + +**系统能力**:SystemCapability.Telephony.StateRegistry + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | +| type | string | 是 | 卡帐户变化事件,参数固定为'iccAccountInfoChange'。 | +| callback | Callback\ | 否 | 回调函数。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------------------- | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300999 | Unknown error code. | + +**示例:** + +```js +let callback = data => { + console.log("on iccAccountInfoChange, data:" + JSON.stringify(data)); +} +observer.on('iccAccountInfoChange', callback); +// 可以指定传入on中的callback取消一个订阅,也可以不指定callback清空所有订阅。 +observer.off('iccAccountInfoChange', callback); +observer.off('iccAccountInfoChange'); +``` + ## LockReason8+ diff --git a/zh-cn/application-dev/reference/apis/js-apis-pointer.md b/zh-cn/application-dev/reference/apis/js-apis-pointer.md index b0760db61b992f152567e1bdbee79a0f4afbab3c..f6d959f0221be8f6fb5c1115fd81ac4bc80f0c5e 100755 --- a/zh-cn/application-dev/reference/apis/js-apis-pointer.md +++ b/zh-cn/application-dev/reference/apis/js-apis-pointer.md @@ -850,9 +850,9 @@ window.getLastWindow(this.context, (error, win) => { | MIDDLE_BTN_SOUTH_EAST | 36 | 向东南滚动 |![MID_Btn_South_East.png](./figures/MID_Btn_South_East.png)| | MIDDLE_BTN_SOUTH_WEST | 37 | 向西南滚动 |![MID_Btn_South_West.png](./figures/MID_Btn_South_West.png)| | MIDDLE_BTN_NORTH_SOUTH_WEST_EAST | 38 | 四向锥形移动 |![MID_Btn_North_South_West_East.png](./figures/MID_Btn_North_South_West_East.png)| -| HORIZONTAL_TEXT_CURSOR | 39 | 垂直文本选择 |![Horizontal_Text_Cursor.png](./figures/Horizontal_Text_Cursor.png)| -| CURSOR_CROSS | 40 | 十字光标 |![Cursor_Cross.png](./figures/Cursor_Cross.png)| -| CURSOR_CIRCLE | 41 | 圆形光标 |![Cursor_Circle.png](./figures/Cursor_Circle.png)| +| HORIZONTAL_TEXT_CURSOR10+ | 39 | 垂直文本选择 |![Horizontal_Text_Cursor.png](./figures/Horizontal_Text_Cursor.png)| +| CURSOR_CROSS10+ | 40 | 十字光标 |![Cursor_Cross.png](./figures/Cursor_Cross.png)| +| CURSOR_CIRCLE10+ | 41 | 圆形光标 |![Cursor_Circle.png](./figures/Cursor_Circle.png)| ## pointer.setTouchpadScrollSwitch10+ diff --git a/zh-cn/application-dev/reference/apis/js-apis-power.md b/zh-cn/application-dev/reference/apis/js-apis-power.md index ae46bff2087ada296f91096d10b7de46489c6362..584df2eb8629c0dec27c98f41e55fc2cae113f22 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-power.md +++ b/zh-cn/application-dev/reference/apis/js-apis-power.md @@ -147,7 +147,7 @@ try { ## power.suspend9+ -suspend(): void +suspend(isImmediate?: boolean): void 休眠设备。 @@ -155,6 +155,13 @@ suspend(): void **系统能力:** SystemCapability.PowerManager.PowerManager.Core +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------ | ------ | ---- | ---------- | +| isImmediate10+ | boolean | 否 | 是否直接休眠设备。不填该参数则默认为false由系统自动检测何时进入休眠。
**说明:** 从API version 10开始,支持该参数。| + + **错误码:** 以下错误码的详细介绍请参见[系统电源管理错误码](../errorcodes/errorcode-power.md)。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-request.md b/zh-cn/application-dev/reference/apis/js-apis-request.md index d6417879adc99b99d00a53188ff14d8e45b51e42..f48cba1ac1a2b94700ab099435acd9a297fbd61f 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-request.md +++ b/zh-cn/application-dev/reference/apis/js-apis-request.md @@ -105,6 +105,7 @@ uploadFile(context: BaseContext, config: UploadConfig): Promise<UploadTask> ```js let uploadTask; + let context; let uploadConfig = { url: 'http://patch', header: { key1: "value1", key2: "value2" }, @@ -113,16 +114,20 @@ uploadFile(context: BaseContext, config: UploadConfig): Promise<UploadTask> data: [{ name: "name123", value: "123" }], }; try { - request.uploadFile(globalThis.abilityContext, uploadConfig).then((data) => { + request.uploadFile(context, uploadConfig).then((data) => { uploadTask = data; }).catch((err) => { - console.error('Failed to request the upload. Cause: ' + JSON.stringify(err)); + console.error(`Failed to request the upload. Code: ${err.code}, message: ${err.message}`); }); } catch (err) { - console.error('err.code : ' + err.code + ', err.message : ' + err.message); + console.error(`Failed to request the upload. Code: ${err.code}, message: ${err.message}`); } ``` +> **说明:** +> +> 示例中context的获取方式请参见[获取UIAbility的上下文信息](../../application-models/uiability-usage.md#获取uiability的上下文信息)。 + ## request.uploadFile9+ @@ -154,6 +159,7 @@ uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback&l ```js let uploadTask; + let context; let uploadConfig = { url: 'http://patch', header: { key1: "value1", key2: "value2" }, @@ -162,18 +168,22 @@ uploadFile(context: BaseContext, config: UploadConfig, callback: AsyncCallback&l data: [{ name: "name123", value: "123" }], }; try { - request.uploadFile(globalThis.abilityContext, uploadConfig, (err, data) => { + request.uploadFile(context, uploadConfig, (err, data) => { if (err) { - console.error('Failed to request the upload. Cause: ' + JSON.stringify(err)); - return; + console.error(`Failed to request the upload. Code: ${err.code}, message: ${err.message}`); + return; } uploadTask = data; }); } catch (err) { - console.error('err.code : ' + err.code + ', err.message : ' + err.message); + console.error(`Failed to request the upload. Code: ${err.code}, message: ${err.message}`); } ``` +> **说明:** +> +> 示例中context的获取方式请参见[获取UIAbility的上下文信息](../../application-models/uiability-usage.md#获取uiability的上下文信息)。 + ## request.upload(deprecated) upload(config: UploadConfig): Promise<UploadTask> @@ -212,9 +222,9 @@ upload(config: UploadConfig): Promise<UploadTask> data: [{ name: "name123", value: "123" }], }; request.upload(uploadConfig).then((data) => { - uploadTask = data; + uploadTask = data; }).catch((err) => { - console.error('Failed to request the upload. Cause: ' + JSON.stringify(err)); + console.error(`Failed to request the upload. Code: ${err.code}, message: ${err.message}`); }) ``` @@ -252,11 +262,11 @@ upload(config: UploadConfig, callback: AsyncCallback<UploadTask>): void data: [{ name: "name123", value: "123" }], }; request.upload(uploadConfig, (err, data) => { - if (err) { - console.error('Failed to request the upload. Cause: ' + JSON.stringify(err)); - return; - } - uploadTask = data; + if (err) { + console.error(`Failed to request the upload. Code: ${err.code}, message: ${err.message}`); + return; + } + uploadTask = data; }); ``` @@ -294,7 +304,7 @@ on(type: 'progress', callback:(uploadedSize: number, totalSize: number) => vo ```js let upProgressCallback = (uploadedSize, totalSize) => { - console.info("upload totalSize:" + totalSize + " uploadedSize:" + uploadedSize); + console.info("upload totalSize:" + totalSize + " uploadedSize:" + uploadedSize); }; uploadTask.on('progress', upProgressCallback); ``` @@ -327,7 +337,7 @@ on(type: 'headerReceive', callback: (header: object) => void): void ```js let headerCallback = (headers) => { - console.info("upOnHeader headers:" + JSON.stringify(headers)); + console.info("upOnHeader headers:" + JSON.stringify(headers)); }; uploadTask.on('headerReceive', headerCallback); ``` @@ -361,7 +371,7 @@ on(type: 'headerReceive', callback: (header: object) => void): void ```js let upCompleteCallback = (taskStates) => { for (let i = 0; i < taskStates.length; i++ ) { - console.info("upOnComplete taskState:" + JSON.stringify(taskStates[i])); + console.info("upOnComplete taskState:" + JSON.stringify(taskStates[i])); } }; uploadTask.on('complete', upCompleteCallback); @@ -396,7 +406,7 @@ off(type: 'progress', callback?: (uploadedSize: number, totalSize: number) =&g ```js let upProgressCallback = (uploadedSize, totalSize) => { - console.info('Upload delete progress notification.' + 'totalSize:' + totalSize + 'uploadedSize:' + uploadedSize); + console.info('Upload delete progress notification.' + 'totalSize:' + totalSize + 'uploadedSize:' + uploadedSize); }; uploadTask.off('progress', upProgressCallback); ``` @@ -423,7 +433,7 @@ off(type: 'headerReceive', callback?: (header: object) => void): void ```js let headerCallback = (header) => { - console.info(`Upload delete headerReceive notification. header: ${JSON.stringify(header)}`); + console.info(`Upload delete headerReceive notification. header: ${JSON.stringify(header)}`); }; uploadTask.off('headerReceive', headerCallback); ``` @@ -451,7 +461,7 @@ off(type: 'headerReceive', callback?: (header: object) => void): void let upCompleteCallback = (taskStates) => { console.info('Upload delete complete notification.'); for (let i = 0; i < taskStates.length; i++ ) { - console.info('taskState:' + JSON.stringify(taskStates[i])); + console.info('taskState:' + JSON.stringify(taskStates[i])); } }; uploadTask.off('complete', upCompleteCallback); @@ -484,13 +494,13 @@ delete(): Promise<boolean> ```js uploadTask.delete().then((result) => { - if (result) { - console.info('Upload task removed successfully. '); - } else { - console.error('Failed to remove the upload task. '); - } + if (result) { + console.info('Succeeded in deleting the upload task.'); + } else { + console.error(`Failed to delete the upload task. Code: ${err.code}, message: ${err.message}`); + } }).catch((err) => { - console.error('Failed to remove the upload task. Cause: ' + JSON.stringify(err)); + console.error(`Failed to delete the upload task. Code: ${err.code}, message: ${err.message}`); }); ``` @@ -515,15 +525,15 @@ delete(callback: AsyncCallback<boolean>): void ```js uploadTask.delete((err, result) => { - if (err) { - console.error('Failed to remove the upload task. Cause: ' + JSON.stringify(err)); - return; - } - if (result) { - console.info('Upload task removed successfully.'); - } else { - console.error('Failed to remove the upload task.'); - } + if (err) { + console.error(`Failed to delete the upload task. Code: ${err.code}, message: ${err.message}`); + return; + } + if (result) { + console.info('Succeeded in deleting the upload task.'); + } else { + console.error(`Failed to delete the upload task. Code: ${err.code}, message: ${err.message}`); + } }); ``` @@ -550,13 +560,13 @@ remove(): Promise<boolean> ```js uploadTask.remove().then((result) => { - if (result) { - console.info('Upload task removed successfully. '); - } else { - console.error('Failed to remove the upload task. '); - } + if (result) { + console.info('Succeeded in removing the upload task.'); + } else { + console.error(`Failed to remove the upload task. Code: ${err.code}, message: ${err.message}`); + } }).catch((err) => { - console.error('Failed to remove the upload task. Cause: ' + JSON.stringify(err)); + console.error(`Failed to remove the upload task. Code: ${err.code}, message: ${err.message}`); }); ``` @@ -583,15 +593,15 @@ remove(callback: AsyncCallback<boolean>): void ```js uploadTask.remove((err, result) => { - if (err) { - console.error('Failed to remove the upload task. Cause: ' + JSON.stringify(err)); - return; - } - if (result) { - console.info('Upload task removed successfully.'); - } else { - console.error('Failed to remove the upload task.'); - } + if (err) { + console.error(`Failed to remove the upload task. Code: ${err.code}, message: ${err.message}`); + return; + } + if (result) { + console.info('Succeeded in removing the upload task.'); + } else { + console.error(`Failed to remove the upload task. Code: ${err.code}, message: ${err.message}`); + } }); ``` @@ -688,17 +698,22 @@ downloadFile(context: BaseContext, config: DownloadConfig): Promise<DownloadT ```js let downloadTask; + let context; try { - request.downloadFile(globalThis.abilityContext, { url: 'https://xxxx/xxxx.hap' }).then((data) => { - downloadTask = data; + request.downloadFile(context, { url: 'https://xxxx/xxxx.hap' }).then((data) => { + downloadTask = data; }).catch((err) => { - console.error('Failed to request the download. Cause: ' + JSON.stringify(err)); + console.error(`Failed to request the download. Code: ${err.code}, message: ${err.message}`); }) } catch (err) { - console.error('err.code : ' + err.code + ', err.message : ' + err.message); + console.error(`Failed to request the download. Code: ${err.code}, message: ${err.message}`); } ``` +> **说明:** +> +> 示例中context的获取方式请参见[获取UIAbility的上下文信息](../../application-models/uiability-usage.md#获取uiability的上下文信息)。 + ## request.downloadFile9+ @@ -733,20 +748,25 @@ downloadFile(context: BaseContext, config: DownloadConfig, callback: AsyncCallba ```js let downloadTask; + let context; try { - request.downloadFile(globalThis.abilityContext, { url: 'https://xxxx/xxxxx.hap', + request.downloadFile(context, { url: 'https://xxxx/xxxxx.hap', filePath: 'xxx/xxxxx.hap'}, (err, data) => { - if (err) { - console.error('Failed to request the download. Cause: ' + JSON.stringify(err)); - return; - } - downloadTask = data; + if (err) { + console.error(`Failed to request the download. Code: ${err.code}, message: ${err.message}`); + return; + } + downloadTask = data; }); } catch (err) { - console.error('err.code : ' + err.code + ', err.message : ' + err.message); + console.error(`Failed to request the download. Code: ${err.code}, message: ${err.message}`); } ``` +> **说明:** +> +> 示例中context的获取方式请参见[获取UIAbility的上下文信息](../../application-models/uiability-usage.md#获取uiability的上下文信息)。 + ## request.download(deprecated) download(config: DownloadConfig): Promise<DownloadTask> @@ -778,9 +798,9 @@ download(config: DownloadConfig): Promise<DownloadTask> ```js let downloadTask; request.download({ url: 'https://xxxx/xxxx.hap' }).then((data) => { - downloadTask = data; + downloadTask = data; }).catch((err) => { - console.error('Failed to request the download. Cause: ' + JSON.stringify(err)); + console.error(`Failed to request the download. Code: ${err.code}, message: ${err.message}`); }) ``` @@ -812,11 +832,11 @@ download(config: DownloadConfig, callback: AsyncCallback<DownloadTask>): v let downloadTask; request.download({ url: 'https://xxxx/xxxxx.hap', filePath: 'xxx/xxxxx.hap'}, (err, data) => { - if (err) { - console.error('Failed to request the download. Cause: ' + JSON.stringify(err)); - return; - } - downloadTask = data; + if (err) { + console.error(`Failed to request the download. Code: ${err.code}, message: ${err.message}`); + return; + } + downloadTask = data; }); ``` @@ -853,7 +873,7 @@ on(type: 'progress', callback:(receivedSize: number, totalSize: number) => vo ```js let progresCallback = (receivedSize, totalSize) => { - console.info("download receivedSize:" + receivedSize + " totalSize:" + totalSize); + console.info("download receivedSize:" + receivedSize + " totalSize:" + totalSize); }; downloadTask.on('progress', progresCallback); ``` @@ -880,7 +900,7 @@ off(type: 'progress', callback?: (receivedSize: number, totalSize: number) => ```js let progresCallback = (receivedSize, totalSize) => { - console.info('Download delete progress notification.' + 'receivedSize:' + receivedSize + 'totalSize:' + totalSize); + console.info('Download delete progress notification.' + 'receivedSize:' + receivedSize + 'totalSize:' + totalSize); }; downloadTask.off('progress', progresCallback); ``` @@ -907,17 +927,17 @@ on(type: 'complete'|'pause'|'remove', callback:() => void): void ```js let completeCallback = () => { - console.info('Download task completed.'); + console.info('Download task completed.'); }; downloadTask.on('complete', completeCallback); let pauseCallback = () => { - console.info('Download task pause.'); + console.info('Download task pause.'); }; downloadTask.on('pause', pauseCallback); let removeCallback = () => { - console.info('Download task remove.'); + console.info('Download task remove.'); }; downloadTask.on('remove', removeCallback); ``` @@ -944,17 +964,17 @@ off(type: 'complete'|'pause'|'remove', callback?:() => void): void ```js let completeCallback = () => { - console.info('Download delete complete notification.'); + console.info('Download delete complete notification.'); }; downloadTask.off('complete', completeCallback); let pauseCallback = () => { - console.info('Download delete pause notification.'); + console.info('Download delete pause notification.'); }; downloadTask.off('pause', pauseCallback); let removeCallback = () => { - console.info('Download delete remove notification.'); + console.info('Download delete remove notification.'); }; downloadTask.off('remove', removeCallback); ``` @@ -987,7 +1007,7 @@ on(type: 'fail', callback: (err: number) => void): void ```js let failCallback = (err) => { - console.info('Download task failed. Cause:' + err); + console.error(`Failed to download the task. Code: ${err.code}, message: ${err.message}`); }; downloadTask.on('fail', failCallback); ``` @@ -1014,7 +1034,7 @@ off(type: 'fail', callback?: (err: number) => void): void ```js let failCallback = (err) => { - console.info(`Download delete fail notification. err: ${err.message}`); + console.error(`Failed to download the task. Code: ${err.code}, message: ${err.message}`); }; downloadTask.off('fail', failCallback); ``` @@ -1039,13 +1059,13 @@ delete(): Promise<boolean> ```js downloadTask.delete().then((result) => { - if (result) { - console.info('Download task removed.'); - } else { - console.error('Failed to remove the download task.'); - } + if (result) { + console.info('Succeeded in removing the download task.'); + } else { + console.error(`Failed to remove the download task. Code: ${err.code}, message: ${err.message}`); + } }).catch ((err) => { - console.error('Failed to remove the download task.'); + console.error(`Failed to remove the download task. Code: ${err.code}, message: ${err.message}`); }); ``` @@ -1070,15 +1090,15 @@ delete(callback: AsyncCallback<boolean>): void ```js downloadTask.delete((err, result)=>{ - if(err) { - console.error('Failed to remove the download task.'); - return; - } - if (result) { - console.info('Download task removed.'); - } else { - console.error('Failed to remove the download task.'); - } + if(err) { + console.error(`Failed to remove the download task. Code: ${err.code}, message: ${err.message}`); + return; + } + if (result) { + console.info('Succeeded in removing the download task.'); + } else { + console.error(`Failed to remove the download task. Code: ${err.code}, message: ${err.message}`); + } }); ``` @@ -1103,9 +1123,9 @@ getTaskInfo(): Promise<DownloadInfo> ```js downloadTask.getTaskInfo().then((downloadInfo) => { - console.info('Download task queried. Data:' + JSON.stringify(downloadInfo)) + console.info('Succeeded in querying the download task') }) .catch((err) => { - console.error('Failed to query the download task. Cause:' + err) + console.error(`Failed to query the download task. Code: ${err.code}, message: ${err.message}`) }); ``` @@ -1130,11 +1150,11 @@ getTaskInfo(callback: AsyncCallback<DownloadInfo>): void ```js downloadTask.getTaskInfo((err, downloadInfo)=>{ - if(err) { - console.error('Failed to query the download mimeType. Cause:' + JSON.stringify(err)); - } else { - console.info('download query success. data:'+ JSON.stringify(downloadInfo)); - } + if(err) { + console.error(`Failed to query the download mimeType. Code: ${err.code}, message: ${err.message}`); + } else { + console.info('Succeeded in querying the download mimeType'); + } }); ``` @@ -1159,9 +1179,9 @@ getTaskMimeType(): Promise<string> ```js downloadTask.getTaskMimeType().then((data) => { - console.info('Download task queried. Data:' + JSON.stringify(data)); + console.info('Succeeded in querying the download MimeType'); }).catch((err) => { - console.error('Failed to query the download MimeType. Cause:' + JSON.stringify(err)) + console.error(`Failed to query the download MimeType. Code: ${err.code}, message: ${err.message}`) }); ``` @@ -1186,11 +1206,11 @@ getTaskMimeType(callback: AsyncCallback<string>): void; ```js downloadTask.getTaskMimeType((err, data)=>{ - if(err) { - console.error('Failed to query the download mimeType. Cause:' + JSON.stringify(err)); - } else { - console.info('Download task queried. data:' + JSON.stringify(data)); - } + if(err) { + console.error(`Failed to query the download mimeType. Code: ${err.code}, message: ${err.message}`); + } else { + console.info('Succeeded in querying the download mimeType'); + } }); ``` @@ -1215,13 +1235,13 @@ suspend(): Promise<boolean> ```js downloadTask.suspend().then((result) => { - if (result) { - console.info('Download task paused. '); - } else { - console.error('Failed to pause the download task. Cause:' + JSON.stringify(result)); - } + if (result) { + console.info('Succeeded in pausing the download task.'); + } else { + console.error(`Failed to pause the download task. Code: ${err.code}, message: ${err.message}`); + } }).catch((err) => { - console.error('Failed to pause the download task. Cause:' + JSON.stringify(err)); + console.error(`Failed to pause the download task. Code: ${err.code}, message: ${err.message}`); }); ``` @@ -1246,15 +1266,15 @@ suspend(callback: AsyncCallback<boolean>): void ```js downloadTask.suspend((err, result)=>{ - if(err) { - console.error('Failed to pause the download task. Cause:' + JSON.stringify(err)); - return; - } - if (result) { - console.info('Download task paused. '); - } else { - console.error('Failed to pause the download task. Cause:' + JSON.stringify(result)); - } + if(err) { + console.error(`Failed to pause the download task. Code: ${err.code}, message: ${err.message}`); + return; + } + if (result) { + console.info('Succeeded in pausing the download task.'); + } else { + console.error(`Failed to pause the download task. Code: ${err.code}, message: ${err.message}`); + } }); ``` @@ -1279,14 +1299,14 @@ restore(): Promise<boolean> ```js downloadTask.restore().then((result) => { - if (result) { - console.info('Download task resumed.') - } else { - console.error('Failed to resume the download task. '); - } - console.info('Download task resumed.') + if (result) { + console.info('Succeeded in resuming the download task.') + } else { + console.error(`Failed to resume the download task. Code: ${err.code}, message: ${err.message}`); + } + console.info('Succeeded in resuming the download task.') }).catch((err) => { - console.error('Failed to resume the download task. Cause:' + err); + console.error(`Failed to resume the download task. Code: ${err.code}, message: ${err.message}`); }); ``` @@ -1311,20 +1331,19 @@ restore(callback: AsyncCallback<boolean>): void ```js downloadTask.restore((err, result)=>{ - if (err) { - console.error('Failed to resume the download task. Cause:' + err); - return; - } - if (result) { - console.info('Download task resumed.'); - } else { - console.error('Failed to resume the download task.'); - } + if (err) { + console.error(`Failed to resume the download task. Code: ${err.code}, message: ${err.message}`); + return; + } + if (result) { + console.info('Succeeded in resuming the download task.'); + } else { + console.error(`Failed to resume the download task. Code: ${err.code}, message: ${err.message}`); + } }); ``` - ### remove(deprecated) remove(): Promise<boolean> @@ -1347,13 +1366,13 @@ remove(): Promise<boolean> ```js downloadTask.remove().then((result) => { - if (result) { - console.info('Download task removed.'); - } else { - console.error('Failed to remove the download task.'); - } + if (result) { + console.info('Succeeded in removing the download task.'); + } else { + console.error(`Failed to remove the download task. Code: ${err.code}, message: ${err.message}`); + } }).catch ((err) => { - console.error('Failed to remove the download task.'); + console.error(`Failed to remove the download task. Code: ${err.code}, message: ${err.message}`); }); ``` @@ -1380,15 +1399,15 @@ remove(callback: AsyncCallback<boolean>): void ```js downloadTask.remove((err, result)=>{ - if(err) { - console.error('Failed to remove the download task.'); - return; - } - if (result) { - console.info('Download task removed.'); - } else { - console.error('Failed to remove the download task.'); - } + if(err) { + console.error(`Failed to remove the download task. Code: ${err.code}, message: ${err.message}`); + return; + } + if (result) { + console.info('Succeeded in removing the download task.'); + } else { + console.error(`Failed to remove the download task. Code: ${err.code}, message: ${err.message}`); + } }); ``` @@ -1415,9 +1434,9 @@ query(): Promise<DownloadInfo> ```js downloadTask.query().then((downloadInfo) => { - console.info('Download task queried. Data:' + JSON.stringify(downloadInfo)) + console.info('Succeeded in querying the download task.') }) .catch((err) => { - console.error('Failed to query the download task. Cause:' + err) + console.error(`Failed to query the download task. Code: ${err.code}, message: ${err.message}`) }); ``` @@ -1444,11 +1463,11 @@ query(callback: AsyncCallback<DownloadInfo>): void ```js downloadTask.query((err, downloadInfo)=>{ - if(err) { - console.error('Failed to query the download mimeType. Cause:' + JSON.stringify(err)); - } else { - console.info('download query success. data:'+ JSON.stringify(downloadInfo)); - } + if(err) { + console.error(`Failed to query the download mimeType. Code: ${err.code}, message: ${err.message}`); + } else { + console.info('Succeeded in querying the download task.'); + } }); ``` @@ -1475,9 +1494,9 @@ queryMimeType(): Promise<string> ```js downloadTask.queryMimeType().then((data) => { - console.info('Download task queried. Data:' + JSON.stringify(data)); + console.info('Succeededto in querying the download MimeType.'); }).catch((err) => { - console.error('Failed to query the download MimeType. Cause:' + JSON.stringify(err)) + console.error(`Failed to query the download MimeType. Code: ${err.code}, message: ${err.message}`) }); ``` @@ -1504,11 +1523,11 @@ queryMimeType(callback: AsyncCallback<string>): void; ```js downloadTask.queryMimeType((err, data)=>{ - if(err) { - console.error('Failed to query the download mimeType. Cause:' + JSON.stringify(err)); - } else { - console.info('Download task queried. data:' + JSON.stringify(data)); - } + if(err) { + console.error(`Failed to query the download mimeType. Code: ${err.code}, message: ${err.message}`); + } else { + console.info('Succeeded in querying the download mimeType.'); + } }); ``` @@ -1535,13 +1554,13 @@ pause(): Promise<void> ```js downloadTask.pause().then((result) => { - if (result) { - console.info('Download task paused. '); - } else { - console.error('Failed to pause the download task. Cause:' + JSON.stringify(result)); - } + if (result) { + console.info('Succeeded in pausing the download task.'); + } else { + console.error(`Failed to pause the download task. Code: ${err.code}, message: ${err.message}`); + } }).catch((err) => { - console.error('Failed to pause the download task. Cause:' + JSON.stringify(err)); + console.error(`Failed to pause the download task. Code: ${err.code}, message: ${err.message}`); }); ``` @@ -1568,15 +1587,15 @@ pause(callback: AsyncCallback<void>): void ```js downloadTask.pause((err, result)=>{ - if(err) { - console.error('Failed to pause the download task. Cause:' + JSON.stringify(err)); - return; - } - if (result) { - console.info('Download task paused. '); - } else { - console.error('Failed to pause the download task. Cause:' + JSON.stringify(result)); - } + if(err) { + console.error(`Failed to pause the download task. Code: ${err.code}, message: ${err.message}`); + return; + } + if (result) { + console.info('Succeeded in pausing the download task.'); + } else { + console.error(`Failed to pause the download task. Code: ${err.code}, message: ${err.message}`); + } }); ``` @@ -1603,14 +1622,14 @@ resume(): Promise<void> ```js downloadTask.resume().then((result) => { - if (result) { - console.info('Download task resumed.') - } else { - console.error('Failed to resume the download task. '); - } - console.info('Download task resumed.') + if (result) { + console.info('Succeeded in resuming the download task.') + } else { + console.error(`Failed to resume the download task. Code: ${err.code}, message: ${err.message}`); + } + console.info('Succeeded in resuming the download task.') }).catch((err) => { - console.error('Failed to resume the download task. Cause:' + err); + console.error(`Failed to resume the download task. Code: ${err.code}, message: ${err.message}`); }); ``` @@ -1637,15 +1656,15 @@ resume(callback: AsyncCallback<void>): void ```js downloadTask.resume((err, result)=>{ - if (err) { - console.error('Failed to resume the download task. Cause:' + err); - return; - } - if (result) { - console.info('Download task resumed.'); - } else { - console.error('Failed to resume the download task.'); - } + if (err) { + console.error(`Failed to resume the download task. Code: ${err.code}, message: ${err.message}`); + return; + } + if (result) { + console.info('Succeeded in resuming the download task.'); + } else { + console.error(`Failed to resume the download task. Code: ${err.code}, message: ${err.message}`); + } }); ``` @@ -1895,6 +1914,7 @@ on(event: "progress" | "completed" | "failed", callback: (progress: Progress) =& **示例:** ```js + let context; let attachments = [{ name: "taskOnTest", value: { @@ -1928,16 +1948,19 @@ on(event: "progress" | "completed" | "failed", callback: (progress: Progress) =& let createOnCallback = (progress) => { console.info('upload task completed.'); }; - request.agent.create(globalThis.abilityContext, conf).then((task)=> { + request.agent.create(context, conf).then((task)=> { task.on('progress', createOnCallback); task.on('completed', createOnCallback); task.on('failed', createOnCallback); - console.info(`create a upload task successfully. result: ${task.tid}`); + console.info(`Succeeded in creating a upload task. result: ${task.tid}`); }).catch((err) => { - console.error(`Failed to create a upload task, because: ${JSON.stringify(err)}`); + console.error(`Failed to create a upload task, Code: ${err.code}, message: ${err.message}`); }); ``` +> **说明:** +> +> 示例中context的获取方式请参见[获取UIAbility的上下文信息](../../application-models/uiability-usage.md#获取uiability的上下文信息)。 ### off('progress'|'completed'|'failed')10+ @@ -1951,7 +1974,7 @@ off(event: "progress" | "completed" | "failed", callback?: (progress: Progress) | 参数名 | 类型 | 必填 | 说明 | | -------- | -------- | -------- | -------- | - | evt | string | 是 | 订阅的事件类型。
- 取值为'progress',表示任务进度;
- 取值为'completed',表示任务已完成;
- 取值为'failed',表示任务失败。 | + | event | string | 是 | 订阅的事件类型。
- 取值为'progress',表示任务进度;
- 取值为'completed',表示任务已完成;
- 取值为'failed',表示任务失败。 | | callback | function | 否 | 发生相关的事件时触发该回调方法,返回任务进度的数据结构| **错误码:** @@ -1965,6 +1988,7 @@ off(event: "progress" | "completed" | "failed", callback?: (progress: Progress) **示例:** ```js + let context; let attachments = [{ name: "taskOffTest", value: { @@ -1998,19 +2022,22 @@ off(event: "progress" | "completed" | "failed", callback?: (progress: Progress) let createOffCallback = (progress) => { console.info('upload task completed.'); }; - request.agent.create(globalThis.abilityContext, conf).then((task)=> { + request.agent.create(context, conf).then((task)=> { task.on('progress', createOffCallback); task.on('completed', createOffCallback); task.on('failed', createOffCallback); task.off('progress', createOffCallback); task.off('completed', createOffCallback); task.off('failed', createOffCallback); - console.info(`create a upload task successfully. result: ${task.tid}`); + console.info(`Succeeded in creating a upload task. result: ${task.tid}`); }).catch((err) => { - console.error(`Failed to create a upload task, because: ${JSON.stringify(err)}`); + console.error(`Failed to create a upload task, Code: ${err.code}, message: ${err.message}`); }); ``` +> **说明:** +> +> 示例中context的获取方式请参见[获取UIAbility的上下文信息](../../application-models/uiability-usage.md#获取uiability的上下文信息)。 ### start10+ @@ -2040,6 +2067,7 @@ start(callback: AsyncCallback<void>): void **示例:** ```js + let context; let conf = { action: request.agent.Action.DOWNLOAD, url: 'http://127.0.0.1', @@ -2062,20 +2090,23 @@ start(callback: AsyncCallback<void>): void precise: false, token: "it is a secret" }; - request.agent.create(globalThis.abilityContext, conf).then((task) => { + request.agent.create(context, conf).then((task) => { task.start((err) => { if (err) { - console.error(`Failed to start the download task, because: ${JSON.stringify(err)}`); + console.error(`Failed to start the download task, Code: ${err.code}, message: ${err.message}`); return; } - console.info(`start a download task successfully. `); - }) - console.info(`create a download task successfully. result: ${task.tid}`); + console.info(`Succeeded in starting a download task.`); + }); + console.info(`Succeeded in creating a download task. result: ${task.tid}`); }).catch((err) => { - console.error(`Failed to create a download task, because: ${JSON.stringify(err)}`); + console.error(`Failed to create a download task, Code: ${err.code}, message: ${err.message}`); }); ``` +> **说明:** +> +> 示例中context的获取方式请参见[获取UIAbility的上下文信息](../../application-models/uiability-usage.md#获取uiability的上下文信息)。 ### start10+ @@ -2105,6 +2136,7 @@ start(): Promise<void> **示例:** ```js + let context; let conf = { action: request.agent.Action.DOWNLOAD, url: 'http://127.0.0.1', @@ -2127,18 +2159,21 @@ start(): Promise<void> precise: false, token: "it is a secret" }; - request.agent.create(globalThis.abilityContext, conf).then((task) => { + request.agent.create(context, conf).then((task) => { task.start().then(() => { - console.info(`start a download task successfully. `); + console.info(`Succeeded in starting a download task.`); }).catch((err) => { - console.error(`Failed to start the download task, because: ${JSON.stringify(err)}`); + console.error(`Failed to start the download task, Code: ${err.code}, message: ${err.message}`); }); - console.info(`create a download task successfully. result: ${task.tid}`); + console.info(`Succeeded in creating a download task. result: ${task.tid}`); }).catch((err) => { - console.error(`Failed to create a download task, because: ${JSON.stringify(err)}`); + console.error(`Failed to create a download task, Code: ${err.code}, message: ${err.message}`); }); ``` +> **说明:** +> +> 示例中context的获取方式请参见[获取UIAbility的上下文信息](../../application-models/uiability-usage.md#获取uiability的上下文信息)。 ### pause10+ @@ -2167,6 +2202,7 @@ pause(callback: AsyncCallback<void>): void **示例:** ```js + let context; let conf = { action: request.agent.Action.DOWNLOAD, url: 'http://127.0.0.1', @@ -2189,17 +2225,17 @@ pause(callback: AsyncCallback<void>): void precise: false, token: "it is a secret" }; - request.agent.create(globalThis.abilityContext, conf).then((task) => { + request.agent.create(context, conf).then((task) => { task.pause((err) => { if (err) { - console.error(`Failed to pause the download task, because: ${JSON.stringify(err)}`); + console.error(`Failed to pause the download task, Code: ${err.code}, message: ${err.message}`); return; } - console.info(`pause a download task successfully. `); - }) - console.info(`create a download task successfully. result: ${task.tid}`); + console.info(`Succeeded in pausing a download task. `); + }); + console.info(`Succeeded in creating a download task. result: ${task.tid}`); }).catch((err) => { - console.error(`Failed to create a download task, because: ${JSON.stringify(err)}`); + console.error(`Failed to create a download task, Code: ${err.code}, message: ${err.message}`); }); ``` @@ -2231,6 +2267,7 @@ pause(): Promise<void> **示例:** ```js + let context; let conf = { action: request.agent.Action.DOWNLOAD, url: 'http://127.0.0.1', @@ -2253,15 +2290,15 @@ pause(): Promise<void> precise: false, token: "it is a secret" }; - request.agent.create(globalThis.abilityContext, conf).then((task) => { + request.agent.create(context, conf).then((task) => { task.pause().then(() => { - console.info(`pause a upload task successfully. `); + console.info(`Succeeded in pausing a download task. `); }).catch((err) => { - console.error(`Failed to pause the upload task, because: ${JSON.stringify(err)}`); + console.error(`Failed to pause the upload task, Code: ${err.code}, message: ${err.message}`); }); - console.info(`create a upload task successfully. result: ${task.tid}`); + console.info(`Succeeded in creating a download task. result: ${task.tid}`); }).catch((err) => { - console.error(`Failed to create a upload task, because: ${JSON.stringify(err)}`); + console.error(`Failed to create a upload task, Code: ${err.code}, message: ${err.message}`); }); ``` @@ -2295,6 +2332,7 @@ resume(callback: AsyncCallback<void>): void **示例:** ```js + let context; let conf = { action: request.agent.Action.DOWNLOAD, url: 'http://127.0.0.1', @@ -2317,15 +2355,17 @@ resume(callback: AsyncCallback<void>): void precise: false, token: "it is a secret" }; - request.agent.create(globalThis.abilityContext, conf).then((task) => { - task.resume().then(() => { - console.info(`resume a download task successfully. `); - }).catch((err) => { - console.error(`Failed to resume the download task, because: ${JSON.stringify(err)}`); + request.agent.create(context, conf).then((task) => { + task.resume((err) => { + if (err) { + console.error(`Failed to resume the download task, Code: ${err.code}, message: ${err.message}`); + return; + } + console.info(`Succeeded in resuming a download task. `); }); - console.info(`create a download task successfully. result: ${task.tid}`); + console.info(`Succeeded in creating a download task. result: ${task.tid}`); }).catch((err) => { - console.error(`Failed to create a download task, because: ${JSON.stringify(err)}`); + console.error(`Failed to create a download task, Code: ${err.code}, message: ${err.message}`); }); ``` @@ -2359,6 +2399,7 @@ resume(): Promise<void> **示例:** ```js + let context; let conf = { action: request.agent.Action.DOWNLOAD, url: 'http://127.0.0.1', @@ -2381,17 +2422,15 @@ resume(): Promise<void> precise: false, token: "it is a secret" }; - request.agent.create(globalThis.abilityContext, conf).then((task) => { - task.resume((err) => { - if (err) { - console.error(`Failed to resume the download task, because: ${JSON.stringify(err)}`); - return; - } - console.info(`resume a download task successfully. `); - }) - console.info(`create a download task successfully. result: ${task.tid}`); + request.agent.create(context, conf).then((task) => { + task.resume().then(() => { + console.info(`Succeeded in resuming a download task. `); + }).catch((err) => { + console.error(`Failed to resume the download task, Code: ${err.code}, message: ${err.message}`); + }); + console.info(`Succeeded in creating a download task. result: ${task.tid}`); }).catch((err) => { - console.error(`Failed to create a download task, because: ${JSON.stringify(err)}`); + console.error(`Failed to create a download task, Code: ${err.code}, message: ${err.message}`); }); ``` @@ -2422,6 +2461,7 @@ stop(callback: AsyncCallback<void>): void **示例:** ```js + let context; let conf = { action: request.agent.Action.DOWNLOAD, url: 'http://127.0.0.1', @@ -2444,15 +2484,17 @@ stop(callback: AsyncCallback<void>): void precise: false, token: "it is a secret" }; - request.agent.create(globalThis.abilityContext, conf).then((task) => { - task.stop().then(() => { - console.info(`stop a download task successfully. `); - }).catch((err) => { - console.error(`Failed to stop the download task, because: ${JSON.stringify(err)}`); + request.agent.create(context, conf).then((task) => { + task.stop((err) => { + if (err) { + console.error(`Failed to stop the download task, Code: ${err.code}, message: ${err.message}`); + return; + } + console.info(`Succeeded in stopping a download task. `); }); - console.info(`create a download task successfully. result: ${task.tid}`); + console.info(`Succeeded in creating a download task. result: ${task.tid}`); }).catch((err) => { - console.error(`Failed to create a download task, because: ${JSON.stringify(err)}`); + console.error(`Failed to create a download task, Code: ${err.code}, message: ${err.message}`); }); ``` @@ -2483,6 +2525,7 @@ stop(): Promise<void> **示例:** ```js + let context; let conf = { action: request.agent.Action.DOWNLOAD, url: 'http://127.0.0.1', @@ -2505,17 +2548,15 @@ stop(): Promise<void> precise: false, token: "it is a secret" }; - request.agent.create(globalThis.abilityContext, conf).then((task) => { - task.stop((err) => { - if (err) { - console.error(`Failed to stop the download task, because: ${JSON.stringify(err)}`); - return; - } - console.info(`stop a download task successfully. `); - }) - console.info(`create a download task successfully. result: ${task.tid}`); + request.agent.create(context, conf).then((task) => { + task.stop().then(() => { + console.info(`Succeeded in stopping a download task. `); + }).catch((err) => { + console.error(`Failed to stop the download task, Code: ${err.code}, message: ${err.message}`); + }); + console.info(`Succeeded in creating a download task. result: ${task.tid}`); }).catch((err) => { - console.error(`Failed to create a download task, because: ${JSON.stringify(err)}`); + console.error(`Failed to create a download task, Code: ${err.code}, message: ${err.message}`); }); ``` @@ -2552,6 +2593,7 @@ create(context: BaseContext, conf: Conf, callback: AsyncCallback<Task>): v **示例:** ```js + let context; let attachments = [{ name: "reeateTest", value: { @@ -2582,15 +2624,18 @@ create(context: BaseContext, conf: Conf, callback: AsyncCallback<Task>): v precise: false, token: "it is a secret" }; - request.agent.create(globalThis.abilityContext, conf, (err, task) => { + request.agent.create(context, conf, (err, task) => { if (err) { - console.error(`Failed to create a upload task, because: ${err.message}`); + console.error(`Failed to create a download task, Code: ${err.code}, message: ${err.message}`); return; } - console.info(`create a upload task successfully. result: ${task.conf}`); + console.info(`Succeeded in creating a download task. result: ${task.conf}`); }); ``` +> **说明:** +> +> 示例中context的获取方式请参见[获取UIAbility的上下文信息](../../application-models/uiability-usage.md#获取uiability的上下文信息)。 ## request.agent.create10+ @@ -2630,6 +2675,7 @@ create(context: BaseContext, conf: Conf): Promise<Task> **示例:** ```js + let context; let attachments = [{ name: "reeateTest", value: { @@ -2660,13 +2706,16 @@ create(context: BaseContext, conf: Conf): Promise<Task> precise: false, token: "it is a secret" }; - request.agent.create(globalThis.abilityContext, conf).then((task)=> { - console.info(`create a upload task successfully. result: ${task.conf}`); + request.agent.create(context, conf).then((task)=> { + console.info(`Succeeded in creating a download task. result: ${task.conf}`); }).catch((err) => { - console.error(`Failed to create a upload task, because: ${err.message}`); + console.error(`Failed to create a download task, Code: ${err.code}, message: ${err.message}`); }); ``` +> **说明:** +> +> 示例中context的获取方式请参见[获取UIAbility的上下文信息](../../application-models/uiability-usage.md#获取uiability的上下文信息)。 ## request.agent.remove10+ @@ -2697,10 +2746,10 @@ remove(id: string, callback: AsyncCallback<void>): void ```js request.agent.remove("id", (err) => { if (err) { - console.error(`Failed to remove a upload task, because: ${JSON.stringify(err)}`); + console.error(`Failed to removing a download task, Code: ${err.code}, message: ${err.message}`); return; } - console.info(`remove a upload task successfully.`); + console.info(`Succeeded in creating a download task.`); }); ``` @@ -2738,9 +2787,9 @@ remove(id: string): Promise<void> ```js request.agent.remove("id").then(() => { - console.info(`remove a upload task successfully. `); + console.info(`Succeeded in removing a download task. `); }).catch((err) => { - console.error(`Failed to remove a upload task, because: ${JSON.stringify(err)}`); + console.error(`Failed to remove a download task, Code: ${err.code}, message: ${err.message}`); }); ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-resourceschedule-deviceStandby.md b/zh-cn/application-dev/reference/apis/js-apis-resourceschedule-deviceStandby.md index 7a25e9b11484f6810fae3f1a15183f00ef79f3f4..427c3a69b32ba7c8728edfb3cbc8329a440dcad2 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-resourceschedule-deviceStandby.md +++ b/zh-cn/application-dev/reference/apis/js-apis-resourceschedule-deviceStandby.md @@ -1,13 +1,16 @@ # @ohos.resourceschedule.deviceStandby(设备待机模块) -当设备长时间未被使用或通过按键,可以使设备进入待机模式。待机模式不影响应用使用,还可以延长电池续航时间。通过本模块接口,可查询设备是否为待机模式,以及使应用灵活申请开启或关闭待机模式。 +当设备长时间未被使用或通过按键,可以使设备进入待机模式。待机模式不影响应用使用,还可以延长电池续航时间。通过本模块接口,可查询设备或应用是否为待机模式,以及为应用申请或取消待机资源管控。 -> **说明:** -> - 本模块首批接口从API version 10开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 +> **说明**: +> +> - 本模块首批接口从API version 10开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。
+> - 需要检查是否已经配置请求相应的权限: ohos.permission.DEVICE_STANDBY_EXEMPTION ## 导入模块 ```js import deviceStandby from '@ohos.resourceschedule.deviceStandby'; ``` + ## deviceStandby.isDeviceInStandby isDeviceInStandby(callback: AsyncCallback<boolean>): void; @@ -33,6 +36,20 @@ isDeviceInStandby(callback: AsyncCallback<boolean>): void; | 9800004 | System service operation failed. | | 18700001 | Caller information verification failed when applying for efficiency resources. | +**示例**: + + try{ + deviceStandby.isDeviceInStandby((err, res) => { + if (err) { + console.log('DEVICE_STANDBY isDeviceInStandby callback failed. code is: ' + err.code + ',message is: ' + err.message); + } else { + console.log('DEVICE_STANDBY isDeviceInStandby callback succeeded, result: ' + JSON.stringify(res)); + } + }); + } catch(error) { + console.log('DEVICE_STANDBY isDeviceInStandby throw error, code is: ' + error.code + ',message is: ' + error.message); + } + ## deviceStandby.isDeviceInStandby isDeviceInStandby(): Promise<boolean> @@ -58,6 +75,18 @@ isDeviceInStandby(): Promise<boolean> | 9800004 | System service operation failed. | | 18700001 | Caller information verification failed when applying for efficiency resources. | +**示例**: + + try{ + deviceStandby.isDeviceInStandby().then( res => { + console.log('DEVICE_STANDBY isDeviceInStandby promise succeeded, result: ' + JSON.stringify(res)); + }).catch( err => { + console.log('DEVICE_STANDBY isDeviceInStandby promise failed. code is: ' + err.code + ',message is: ' + err.message); + }); + } catch (error) { + console.log('DEVICE_STANDBY isDeviceInStandby throw error, code is: ' + error.code + ',message is: ' + error.message); + } + ## deviceStandby.getExemptedApps getExemptedApps(resourceTypes: number, callback: AsyncCallback): void; @@ -86,6 +115,23 @@ getExemptedApps(resourceTypes: number, callback: AsyncCallback { + if (err) { + console.log('DEVICE_STANDBY getExemptedApps callback failed. code is: ' + err.code + ',message is: ' + err.message); + } else { + console.log('DEVICE_STANDBY getExemptedApps callback success.'); + for (let i = 0; i < res.length; i++) { + console.log('DEVICE_STANDBY getExemptedApps callback result ' + JSON.stringify(res[i])); + } + } + }); + } catch (error) { + console.log('DEVICE_STANDBY getExemptedApps throw error, code is: ' + error.code + ',message is: ' + error.message); + } + ## deviceStandby.getExemptedApps getExemptedApps(resourceTypes: number): Promise; @@ -122,10 +168,25 @@ getExemptedApps(resourceTypes: number): Promise; | 9800004 | System service operation failed. | | 18700001 | Caller information verification failed when applying for efficiency resources. | +**示例**: + + try{ + deviceStandby.getExemptedApps(resourceTypes).then( res => { + console.log('DEVICE_STANDBY getExemptedApps promise success.'); + for (let i = 0; i < res.length; i++) { + console.log('DEVICE_STANDBY getExemptedApps promise result ' + JSON.stringify(res[i])); + } + }).catch( err => { + console.log('DEVICE_STANDBY getExemptedApps promise failed. code is: ' + err.code + ',message is: ' + err.message); + }); + } catch (error) { + console.log('DEVICE_STANDBY getExemptedApps throw error, code is: ' + error.code + ',message is: ' + error.message); + } + ## deviceStandby.requestExemptionResource requestExemptionResource(request: ResourceRequest): void; -订阅申请豁免,为应用申请临时不进入待机管控能力。 +应用订阅申请豁免,使应用临时不进入待机管控。 **系统能力:** SystemCapability.ResourceSchedule.DeviceStandby.Exemption @@ -149,10 +210,43 @@ requestExemptionResource(request: ResourceRequest): void; | 9800004 | System service operation failed. | | 18700001 | Caller information verification failed when applying for efficiency resources. | +**示例**: + + let resRequest = { + resourceTypes: 1, + uid:10003, + name:"com.example.app", + duration:10, + reason:"apply", + }; + // 异步方法promise方式 + try{ + deviceStandby.requestExemptionResource(resRequest).then( () => { + console.log('DEVICE_STANDBY requestExemptionResource promise succeeded.'); + }).catch( err => { + console.log('DEVICE_STANDBY requestExemptionResource promise failed. code is: ' + err.code + ',message is: ' + err.message); + }); + } catch (error) { + console.log('DEVICE_STANDBY requestExemptionResource throw error, code is: ' + error.code + ',message is: ' + error.message); + } + + // 异步方法callback方式 + try{ + deviceStandby.requestExemptionResource(resRequest, (err) => { + if (err) { + console.log('DEVICE_STANDBY requestExemptionResource callback failed. code is: ' + err.code + ',message is: ' + err.message); + } else { + console.log('DEVICE_STANDBY requestExemptionResource callback succeeded.'); + } + }); + } catch (error) { + console.log('DEVICE_STANDBY requestExemptionResource throw error, code is: ' + error.code + ',message is: ' + error.message); + } + ## deviceStandby.releaseExemptionResource releaseExemptionResource(request: ResourceRequest): void; -去除订阅申请豁免,去除应用暂时不进入待机管控的能力。 +取消应用订阅申请豁免。 **系统能力:** SystemCapability.ResourceSchedule.DeviceStandby.Exemption @@ -176,6 +270,39 @@ releaseExemptionResource(request: ResourceRequest): void; | 9800004 | System service operation failed. | | 18700001 | Caller information verification failed when applying for efficiency resources. | +**示例**: + + let resRequest = { + resourceTypes: 1, + uid:10003, + name:"com.demo.app", + duration:10, + reason:"unapply", + }; + // 异步方法promise方式 + try{ + deviceStandby.releaseExemptionResource(resRequest).then( () => { + console.log('DEVICE_STANDBY releaseExemptionResource promise succeeded.'); + }).catch( err => { + console.log('DEVICE_STANDBY releaseExemptionResource promise failed. code is: ' + err.code + ',message is: ' + err.message); + }); + } catch (error) { + console.log('DEVICE_STANDBY releaseExemptionResource throw error, code is: ' + error.code + ',message is: ' + error.message); + } + + // 异步方法callback方式 + try{ + deviceStandby.releaseExemptionResource(resRequest, (err) => { + if (err) { + console.log('DEVICE_STANDBY releaseExemptionResource callback failed. code is: ' + err.code + ',message is: ' + err.message); + } else { + console.log('DEVICE_STANDBY releaseExemptionResource callback succeeded.'); + } + }); + } catch (error) { + console.log('DEVICE_STANDBY releaseExemptionResource throw error, code is: ' + error.code + ',message is: ' + error.message); + } + ## ResourceType 非待机应用资源枚举。
@@ -194,20 +321,20 @@ releaseExemptionResource(request: ResourceRequest): void; 豁免应用信息,不进入待机管控的应用信息。
-|名称 |类型 |说明 | -| ------------ | ------------ | ------------ | -|resourceTypes | number |应用的资源类型 | -|name |string | 应用名 | -|duration | number | 豁免时长 | +|名称 |类型 | 必填 |说明 | +| ------------ | ------------ |------------ | ------------ | +|resourceTypes | number | 是 |应用的资源类型 | +|name |string | 是 | 应用名 | +|duration | number | 是 | 豁免时长 | ## ResourceRequest 待机资源请求体。
-|名称 |类型 |说明 | -| ------------ | ------------ | ------------ | -|resourceTypes | number |应用的资源类型 | -|uid | number |应用uid | -|name |string | 应用名称 | -|duration | number | 豁免时长 | -|reason |string | 申请原因 | \ No newline at end of file +|名称 |类型 | 必填 |说明 | +| ------------ | ------------ |------------| ------------ | +|resourceTypes | number | 是 |应用的资源类型 | +|uid | number | 是 |应用uid | +|name |string | 是 | 应用名称 | +|duration | number | 是 | 豁免时长 | +|reason |string | 是 | 申请原因 | \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/js-apis-router.md b/zh-cn/application-dev/reference/apis/js-apis-router.md index 6eb5f54dce15c5a8db1a2ac5d63250220a1ec2d5..5ca7cbcc3caaee6e4d7c43444802d322672bbfc0 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-router.md +++ b/zh-cn/application-dev/reference/apis/js-apis-router.md @@ -46,7 +46,7 @@ pushUrl(options: RouterOptions): Promise<void> **示例:** -```js +```ts router.pushUrl({ url: 'pages/routerpage2', params: { @@ -91,7 +91,7 @@ pushUrl(options: RouterOptions, callback: AsyncCallback<void>): void **示例:** -```js +```ts router.pushUrl({ url: 'pages/routerpage2', params: { @@ -141,7 +141,7 @@ pushUrl(options: RouterOptions, mode: RouterMode): Promise<void> **示例:** -```js +```ts router.pushUrl({ url: 'pages/routerpage2', params: { @@ -187,7 +187,7 @@ pushUrl(options: RouterOptions, mode: RouterMode, callback: AsyncCallback<voi **示例:** -```js +```ts router.pushUrl({ url: 'pages/routerpage2', params: { @@ -236,7 +236,7 @@ replaceUrl(options: RouterOptions): Promise<void> **示例:** -```js +```ts router.replaceUrl({ url: 'pages/detail', params: { @@ -277,7 +277,7 @@ replaceUrl(options: RouterOptions, callback: AsyncCallback<void>): void **示例:** -```js +```ts router.replaceUrl({ url: 'pages/detail', params: { @@ -325,7 +325,7 @@ replaceUrl(options: RouterOptions, mode: RouterMode): Promise<void> **示例:** -```js +```ts router.replaceUrl({ url: 'pages/detail', params: { @@ -367,7 +367,7 @@ replaceUrl(options: RouterOptions, mode: RouterMode, callback: AsyncCallback< **示例:** -```js +```ts router.replaceUrl({ url: 'pages/detail', params: { @@ -383,6 +383,375 @@ router.replaceUrl({ ``` +## router.pushNamedRoute10+ + +pushNamedRoute(options: NamedRouterOptions): Promise<void> + +跳转到指定的命名路由页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | --------- | +| options | [NamedRouterOptions](#namedrouteroptions10) | 是 | 跳转页面描述信息。 | + +**返回值:** + +| 类型 | 说明 | +| ------------------- | --------- | +| Promise<void> | 异常返回结果。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | +| 100003 | if the pages are pushed too much. | +| 100004 | if the named route is not exist. | + +**示例:** + +```ts +router.pushNamedRoute({ + name: 'myPage', + params: { + data1: 'message', + data2: { + data3: [123, 456, 789] + } + } +}) + .then(() => { + // success + }) + .catch(err => { + console.error(`pushNamedRoute failed, code is ${err.code}, message is ${err.message}`); + }) +``` + +## router.pushNamedRoute10+ + +pushNamedRoute(options: NamedRouterOptions, callback: AsyncCallback<void>): void + +跳转到指定的命名路由页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | --------- | +| options | [NamedRouterOptions](#namedrouteroptions10) | 是 | 跳转页面描述信息。 | +| callback | AsyncCallback<void> | 是 | 异常响应回调。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | +| 100003 | if the pages are pushed too much. | +| 100004 | if the named route is not exist. | + +**示例:** + +```ts +router.pushNamedRoute({ + name: 'myPage', + params: { + data1: 'message', + data2: { + data3: [123, 456, 789] + } + } +}, (err) => { + if (err) { + console.error(`pushNamedRoute failed, code is ${err.code}, message is ${err.message}`); + return; + } + console.info('pushNamedRoute success'); +}) +``` +## router.pushNamedRoute10+ + +pushNamedRoute(options: NamedRouterOptions, mode: RouterMode): Promise<void> + +跳转到指定的命名路由页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | ---------- | +| options | [NamedRouterOptions](#namedrouteroptions10) | 是 | 跳转页面描述信息。 | +| mode | [RouterMode](#routermode9) | 是 | 跳转页面使用的模式。 | + +**返回值:** + +| 类型 | 说明 | +| ------------------- | --------- | +| Promise<void> | 异常返回结果。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | +| 100003 | if the pages are pushed too much. | +| 100004 | if the named route is not exist. | + +**示例:** + +```ts +router.pushNamedRoute({ + name: 'myPage', + params: { + data1: 'message', + data2: { + data3: [123, 456, 789] + } + } +}, router.RouterMode.Standard) + .then(() => { + // success + }) + .catch(err => { + console.error(`pushNamedRoute failed, code is ${err.code}, message is ${err.message}`); + }) +``` + +## router.pushNamedRoute10+ + +pushNamedRoute(options: NamedRouterOptions, mode: RouterMode, callback: AsyncCallback<void>): void + +跳转到指定的命名路由页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | ---------- | +| options | [NamedRouterOptions](#namedrouteroptions10) | 是 | 跳转页面描述信息。 | +| mode | [RouterMode](#routermode9) | 是 | 跳转页面使用的模式。 | +| callback | AsyncCallback<void> | 是 | 异常响应回调。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | +| 100003 | if the pages are pushed too much. | +| 100004 | if the named route is not exist. | + +**示例:** + +```ts +router.pushNamedRoute({ + name: 'myPage', + params: { + data1: 'message', + data2: { + data3: [123, 456, 789] + } + } +}, router.RouterMode.Standard, (err) => { + if (err) { + console.error(`pushNamedRoute failed, code is ${err.code}, message is ${err.message}`); + return; + } + console.info('pushNamedRoute success'); +}) +``` + +## router.replaceNamedRoute10+ + +replaceNamedRoute(options: NamedRouterOptions): Promise<void> + +用指定的命名路由页面替换当前页面,并销毁被替换的页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | ------------------ | +| options | [NamedRouterOptions](#namedrouteroptions10) | 是 | 替换页面描述信息。 | + +**返回值:** + +| 类型 | 说明 | +| ------------------- | --------- | +| Promise<void> | 异常返回结果。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | +| 100004 | if the named route is not exist. | + +**示例:** + +```ts +router.replaceNamedRoute({ + name: 'myPage', + params: { + data1: 'message' + } +}) + .then(() => { + // success + }) + .catch(err => { + console.error(`replaceNamedRoute failed, code is ${err.code}, message is ${err.message}`); + }) +``` + +## router.replaceNamedRoute10+ + +replaceNamedRoute(options: NamedRouterOptions, callback: AsyncCallback<void>): void + +用指定的命名路由页面替换当前页面,并销毁被替换的页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | ------------------ | +| options | [NamedRouterOptions](#namedrouteroptions10) | 是 | 替换页面描述信息。 | +| callback | AsyncCallback<void> | 是 | 异常响应回调。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | +| 100004 | if the named route is not exist. | + +**示例:** + +```ts +router.replaceNamedRoute({ + name: 'myPage', + params: { + data1: 'message' + } +}, (err) => { + if (err) { + console.error(`replaceNamedRoute failed, code is ${err.code}, message is ${err.message}`); + return; + } + console.info('replaceNamedRoute success'); +}) +``` + +## router.replaceNamedRoute10+ + +replaceNamedRoute(options: NamedRouterOptions, mode: RouterMode): Promise<void> + +用指定的命名路由页面替换当前页面,并销毁被替换的页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | ---------- | +| options | [NamedRouterOptions](#namedrouteroptions10) | 是 | 替换页面描述信息。 | +| mode | [RouterMode](#routermode9) | 是 | 跳转页面使用的模式。 | + + +**返回值:** + +| 类型 | 说明 | +| ------------------- | --------- | +| Promise<void> | 异常返回结果。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if can not get the delegate. | +| 100004 | if the named route is not exist. | + +**示例:** + +```ts +router.replaceNamedRoute({ + name: 'myPage', + params: { + data1: 'message' + } +}, router.RouterMode.Standard) + .then(() => { + // success + }) + .catch(err => { + console.error(`replaceNamedRoute failed, code is ${err.code}, message is ${err.message}`); + }) +``` + +## router.replaceNamedRoute10+ + +replaceNamedRoute(options: NamedRouterOptions, mode: RouterMode, callback: AsyncCallback<void>): void + +用指定的命名路由页面替换当前页面,并销毁被替换的页面。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| ------- | ------------------------------- | ---- | ---------- | +| options | [NamedRouterOptions](#namedrouteroptions10) | 是 | 替换页面描述信息。 | +| mode | [RouterMode](#routermode9) | 是 | 跳转页面使用的模式。 | +| callback | AsyncCallback<void> | 是 | 异常响应回调。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.router(页面路由)](../errorcodes/errorcode-router.md)错误码。 + +| 错误码ID | 错误信息 | +| --------- | ------- | +| 100001 | if UI execution context not found. | +| 100004 | if the named route is not exist. | + +**示例:** + +```ts +router.replaceNamedRoute({ + name: 'myPage', + params: { + data1: 'message' + } +}, router.RouterMode.Standard, (err) => { + if (err) { + console.error(`replaceNamedRoute failed, code is ${err.code}, message is ${err.message}`); + return; + } + console.info('replaceNamedRoute success'); +}); + +``` + ## router.back back(options?: RouterOptions ): void @@ -399,7 +768,7 @@ back(options?: RouterOptions ): void **示例:** -```js +```ts router.back({url:'pages/detail'}); ``` @@ -413,7 +782,7 @@ clear(): void **示例:** -```js +```ts router.clear(); ``` @@ -433,7 +802,7 @@ getLength(): string **示例:** -```js +```ts let size = router.getLength(); console.log('pages stack size = ' + size); ``` @@ -454,7 +823,7 @@ getState(): RouterState **示例:** -```js +```ts let page = router.getState(); console.log('current index = ' + page.index); console.log('current name = ' + page.name); @@ -497,15 +866,15 @@ showAlertBeforeBackPage(options: EnableAlertOptions): void **示例:** - ```js +```ts try { - router.showAlertBeforeBackPage({ - message: 'Message Info' + router.showAlertBeforeBackPage({ + message: 'Message Info' }); } catch(error) { console.error(`showAlertBeforeBackPage failed, code is ${error.code}, message is ${error.message}`); } - ``` +``` ## EnableAlertOptions 页面返回询问对话框选项。 @@ -526,7 +895,7 @@ hideAlertBeforeBackPage(): void **示例:** -```js +```ts router.hideAlertBeforeBackPage(); ``` @@ -576,11 +945,22 @@ router.getParams(); | Standard | 多实例模式,也是默认情况下的跳转模式。
目标页面会被添加到页面栈顶,无论栈中是否存在相同url的页面。
**说明:** 不使用路由跳转模式时,则按照默认的多实例模式进行跳转。 | | Single | 单实例模式。
如果目标页面的url已经存在于页面栈中,则会将离栈顶最近的同url页面移动到栈顶,该页面成为新建页。
如果目标页面的url在页面栈中不存在同url页面,则按照默认的多实例模式进行跳转。 | +## NamedRouterOptions10+ + +命名路由跳转选项。 + +**系统能力:** SystemCapability.ArkUI.ArkUI.Full + +| 名称 | 类型 | 必填 | 说明 | +| ------ | ------ | ---- | ------------------------------------------------------------ | +| name | string | 是 | 表示目标命名路由页面的name。 | +| params | object | 否 | 表示路由跳转时要同时传递到目标页面的数据。跳转到目标页面后,使用router.getParams()获取传递的参数,此外,在类web范式中,参数也可以在页面中直接使用,如this.keyValue(keyValue为跳转时params参数中的key值),如果目标页面中已有该字段,则其值会被传入的字段值覆盖。 | + ## 完整示例 ### 基于JS扩展的类Web开发范式 -```js +```ts // 在当前页面中 export default { pushPage() { @@ -593,7 +973,7 @@ export default { } } ``` -```js +```ts // 在detail页面中 export default { onInit() { @@ -703,7 +1083,7 @@ push(options: RouterOptions): void **示例:** -```js +```ts router.push({ url: 'pages/routerpage2', params: { @@ -733,7 +1113,7 @@ replace(options: RouterOptions): void **示例:** -```js +```ts router.replace({ url: 'pages/detail', params: { @@ -760,11 +1140,11 @@ enableAlertBeforeBackPage(options: EnableAlertOptions): void **示例:** - ```js -router.enableAlertBeforeBackPage({ - message: 'Message Info' -}); - ``` +```ts +router.enableAlertBeforeBackPage({ + message: 'Message Info' +}); +``` ## router.disableAlertBeforeBackPage(deprecated) @@ -778,6 +1158,6 @@ disableAlertBeforeBackPage(): void **示例:** -```js -router.disableAlertBeforeBackPage(); +```ts +router.disableAlertBeforeBackPage(); ``` \ No newline at end of file diff --git a/zh-cn/application-dev/reference/apis/js-apis-sim.md b/zh-cn/application-dev/reference/apis/js-apis-sim.md index 923c823e08fdce12cf214fc3c37d6c2e19c8e177..510e7b5c5bfd2298c8b32688e2ef3e33ec9629f4 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-sim.md +++ b/zh-cn/application-dev/reference/apis/js-apis-sim.md @@ -685,9 +685,11 @@ promise.then(data => { getSimAccountInfo\(slotId: number, callback: AsyncCallback\\): void -获取SIM卡账户信息。使用callback异步回调。 +获取SIM卡帐户信息。使用callback异步回调。 -**系统接口:** 此接口为系统接口。 +>**说明:** +> +>如果没有GET_TELEPHONY_STATE权限,获取到的ICCID和号码信息为空。 **需要权限**:ohos.permission.GET_TELEPHONY_STATE @@ -706,8 +708,6 @@ getSimAccountInfo\(slotId: number, callback: AsyncCallback\\): | 错误码ID | 错误信息 | | -------- | -------------------------------------------- | -| 201 | Permission denied. | -| 202 | Non-system applications use system APIs. | | 401 | Parameter error. | | 8300001 | Invalid parameter value. | | 8300002 | Operation failed. Cannot connect to service. | @@ -729,9 +729,11 @@ sim.getSimAccountInfo(0, (err, data) => { getSimAccountInfo\(slotId: number\): Promise\ -获取SIM卡账户信息。使用Promise异步回调。 +获取SIM卡帐户信息。使用Promise异步回调。 -**系统接口:** 此接口为系统接口。 +>**说明:** +> +>如果没有GET_TELEPHONY_STATE权限,获取到的ICCID和号码信息为空。 **需要权限**:ohos.permission.GET_TELEPHONY_STATE @@ -747,7 +749,7 @@ getSimAccountInfo\(slotId: number\): Promise\ | 类型 | 说明 | | -------------------------------------------- | ------------------------------------------ | -| Promise<[IccAccountInfo](#iccaccountinfo7)\> | 以Promise形式返回指定卡槽SIM卡的账户信息。 | +| Promise<[IccAccountInfo](#iccaccountinfo7)\> | 以Promise形式返回指定卡槽SIM卡的帐户信息。 | **错误码:** @@ -755,8 +757,6 @@ getSimAccountInfo\(slotId: number\): Promise\ | 错误码ID | 错误信息 | | -------- | -------------------------------------------- | -| 201 | Permission denied. | -| 202 | Non-system applications use system APIs. | | 401 | Parameter error. | | 8300001 | Invalid parameter value. | | 8300002 | Operation failed. Cannot connect to service. | @@ -780,9 +780,11 @@ promise.then(data => { getActiveSimAccountInfoList\(callback: AsyncCallback\\>\): void -获取活跃SIM卡账户信息列表。使用callback异步回调。 +获取活跃SIM卡帐户信息列表。使用callback异步回调。 -**系统接口:** 此接口为系统接口。 +>**说明:** +> +>如果没有GET_TELEPHONY_STATE权限,获取到的ICCID和号码信息为空。 **需要权限**:ohos.permission.GET_TELEPHONY_STATE @@ -800,8 +802,6 @@ getActiveSimAccountInfoList\(callback: AsyncCallback\\>\ | 错误码ID | 错误信息 | | -------- | -------------------------------------------- | -| 201 | Permission denied. | -| 202 | Non-system applications use system APIs. | | 8300001 | Invalid parameter value. | | 8300002 | Operation failed. Cannot connect to service. | | 8300003 | System internal error. | @@ -821,9 +821,11 @@ sim.getActiveSimAccountInfoList((err, data) => { getActiveSimAccountInfoList\(\): Promise\\>; -获取活跃SIM卡账户信息列表。使用Promise异步回调。 +获取活跃SIM卡帐户信息列表。使用Promise异步回调。 -**系统接口:** 此接口为系统接口。 +>**说明:** +> +>如果没有GET_TELEPHONY_STATE权限,获取到的ICCID和号码信息为空。 **需要权限**:ohos.permission.GET_TELEPHONY_STATE @@ -833,7 +835,7 @@ getActiveSimAccountInfoList\(\): Promise\\>; | 类型 | 说明 | | ---------------------------------------------------- | ---------------------------------------------- | -| Promise\> | 以Promise形式返回活跃卡槽SIM卡的账户信息列表。 | +| Promise\> | 以Promise形式返回活跃卡槽SIM卡的帐户信息列表。 | **错误码:** @@ -841,8 +843,6 @@ getActiveSimAccountInfoList\(\): Promise\\>; | 错误码ID | 错误信息 | | -------- | -------------------------------------------- | -| 201 | Permission denied. | -| 202 | Non-system applications use system APIs. | | 8300002 | Operation failed. Cannot connect to service. | | 8300003 | System internal error. | | 8300004 | Do not have sim card. | @@ -3990,6 +3990,80 @@ try { } ``` +## sim.getDefaultVoiceSimId10+ + +getDefaultVoiceSimId\(callback: AsyncCallback\\): void + +获取默认语音业务的SIM卡ID。使用callback异步回调。 + +**系统能力**:SystemCapability.Telephony.CoreService + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | --------------------------- | ---- | ---------- | +| callback | AsyncCallback<number> | 是 | 回调函数。
与SIM卡绑定,从1开始递增。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------------------- | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300004 | Do not have sim card. | +| 8300999 | Unknown error code. | +| 8301001 | SIM card is not activated. | + +**示例:** + +```js +sim.getDefaultVoiceSimId((err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + +## sim.getDefaultVoiceSimId10+ + +getDefaultVoiceSimId\(\): Promise\ + +获取默认语音业务的SIM卡ID。使用Promise异步回调。 + +**系统能力**:SystemCapability.Telephony.CoreService + +**返回值:** + +| 类型 | 说明 | +| ----------------- | --------------------------------------- | +| Promise\ | 以Promise形式返回默认语音业务的SIM卡ID。
与SIM卡绑定,从1开始递增。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------------------- | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300004 | Do not have sim card. | +| 8300999 | Unknown error code. | +| 8301001 | SIM card is not activated. | + +**示例:** + +```js +let promise = sim.getDefaultVoiceSimId(); +promise.then(data => { + console.log(`getDefaultVoiceSimId success, promise: data->${JSON.stringify(data)}`); +}).catch(err => { + console.log(`getDefaultVoiceSimId failed, promise: err->${JSON.stringify(err)}`); +}); +``` + ## SimState SIM卡状态。 @@ -4113,7 +4187,7 @@ SIM卡状态。 ## IccAccountInfo7+ -Icc账户信息。 +Icc帐户信息。 **系统接口:** 此接口为系统接口。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-sms.md b/zh-cn/application-dev/reference/apis/js-apis-sms.md index 8390e856f58045e0a81ede5c6113be982a44cda0..21b87a664f26e1a577abca95b4e072449abd7a7f 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-sms.md +++ b/zh-cn/application-dev/reference/apis/js-apis-sms.md @@ -1534,6 +1534,81 @@ promise.then(data => { }); ``` +## sms.getDefaultSmsSimId10+ + +getDefaultSmsSimId\(callback: AsyncCallback<number>\): void + +获取发送短信的默认SIM卡ID。使用callback异步回调。 + +**系统能力**:SystemCapability.Telephony.SmsMms + +**参数:** + +| 参数名 | 类型 | 必填 | 说明 | +| -------- | --------------------------- | ---- | ---------------------------------------- | +| callback | AsyncCallback<number> | 是 | 回调函数。
与SIM卡绑定,从1开始递增。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------------------- | +| 401 | Parameter error. | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300004 | Do not have sim card. | +| 8300999 | Unknown error code. | +| 8301001 | SIM card is not activated. | + +**示例:** + +```js +sms.getDefaultSmsSimId((err, data) => { + console.log(`callback: err->${JSON.stringify(err)}, data->${JSON.stringify(data)}`); +}); +``` + + +## sms.getDefaultSmsSimId10+ + +getDefaultSmsSimId\(\): Promise<number> + +获取发送短信的默认SIM卡ID。使用Promise异步回调。 + +**系统能力**:SystemCapability.Telephony.SmsMms + +**返回值:** + +| 类型 | 说明 | +| --------------- | ------------------------------------------------------------ | +| Promise<number> | 以Promise形式返回发送短信的默认SIM卡ID:
与SIM卡绑定,从1开始递增。 | + +**错误码:** + +以下错误码的详细介绍请参见[ohos.telephony(电话子系统)错误码](../../reference/errorcodes/errorcode-telephony.md)。 + +| 错误码ID | 错误信息 | +| -------- | -------------------------------------------- | +| 8300001 | Invalid parameter value. | +| 8300002 | Operation failed. Cannot connect to service. | +| 8300003 | System internal error. | +| 8300004 | Do not have sim card. | +| 8300999 | Unknown error code. | +| 8301001 | SIM card is not activated. | + +**示例:** + +```js +let promise = sms.getDefaultSmsSimId(); +promise.then(data => { + console.log(`getDefaultSmsSimId success, promise: data->${JSON.stringify(data)}`); +}).catch(err => { + console.error(`getDefaultSmsSimId failed, promise: err->${JSON.stringify(err)}`); +}); +``` + ## ShortMessage 短信实例。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-socket.md b/zh-cn/application-dev/reference/apis/js-apis-socket.md index c1bf293b009d186d29945984ef6ee25f4d5a8c82..e47fab146540c4f981ba3618e29c8505224040c2 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-socket.md +++ b/zh-cn/application-dev/reference/apis/js-apis-socket.md @@ -479,12 +479,12 @@ on(type: 'message', callback: Callback\<{message: ArrayBuffer, remoteInfo: Socke ```js let udp = socket.constructUDPSocketInstance(); +let messageView = ''; udp.on('message', value => { for (var i = 0; i < value.message.length; i++) { let messages = value.message[i] let message = String.fromCharCode(messages); - let messageView = ''; - messageView += item; + messageView += message; } console.log('on message message: ' + JSON.stringify(messageView)); console.log('remoteInfo: ' + JSON.stringify(value.remoteInfo)); @@ -513,12 +513,12 @@ off(type: 'message', callback?: Callback\<{message: ArrayBuffer, remoteInfo: Soc ```js let udp = socket.constructUDPSocketInstance(); +let messageView = ''; let callback = value => { for (var i = 0; i < value.message.length; i++) { let messages = value.message[i] let message = String.fromCharCode(messages); - let messageView = ''; - messageView += item; + messageView += message; } console.log('on message message: ' + JSON.stringify(messageView)); console.log('remoteInfo: ' + JSON.stringify(value.remoteInfo)); @@ -1365,12 +1365,12 @@ on(type: 'message', callback: Callback<{message: ArrayBuffer, remoteInfo: Socket ```js let tcp = socket.constructTCPSocketInstance(); +let messageView = ''; tcp.on('message', value => { for (var i = 0; i < value.message.length; i++) { let messages = value.message[i] let message = String.fromCharCode(messages); - let messageView = ''; - messageView += item; + messageView += message; } console.log('on message message: ' + JSON.stringify(messageView)); console.log('remoteInfo: ' + JSON.stringify(value.remoteInfo)); @@ -1399,12 +1399,12 @@ off(type: 'message', callback?: Callback<{message: ArrayBuffer, remoteInfo: Sock ```js let tcp = socket.constructTCPSocketInstance(); +let messageView = ''; let callback = value => { for (var i = 0; i < value.message.length; i++) { let messages = value.message[i] let message = String.fromCharCode(messages); - let messageView = ''; - messageView += item; + messageView += message; } console.log('on message message: ' + JSON.stringify(messageView)); console.log('remoteInfo: ' + JSON.stringify(value.remoteInfo)); @@ -1888,12 +1888,12 @@ on(type: 'message', callback: Callback<{message: ArrayBuffer, remoteInfo: Socket ```js let tls = socket.constructTLSSocketInstance(); +let messageView = ''; tls.on('message', value => { for (var i = 0; i < value.message.length; i++) { let messages = value.message[i] let message = String.fromCharCode(messages); - let messageView = ''; - messageView += item; + messageView += message; } console.log('on message message: ' + JSON.stringify(messageView)); console.log('remoteInfo: ' + JSON.stringify(value.remoteInfo)); @@ -1922,12 +1922,12 @@ off(type: 'message', callback?: Callback\<{message: ArrayBuffer, remoteInfo: Soc ```js let tls = socket.constructTLSSocketInstance(); +let messageView = ''; let callback = value => { for (var i = 0; i < value.message.length; i++) { let messages = value.message[i] let message = String.fromCharCode(messages); - let messageView = ''; - messageView += item; + messageView += message; } console.log('on message message: ' + JSON.stringify(messageView)); console.log('remoteInfo: ' + JSON.stringify(value.remoteInfo)); diff --git a/zh-cn/application-dev/reference/apis/js-apis-telephony-data.md b/zh-cn/application-dev/reference/apis/js-apis-telephony-data.md index cfc6daa095943b98a7f700f54e8eb65d254f4a27..16f6e2fc442ec3f32baf3f2adbdafb4b6611c65f 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-telephony-data.md +++ b/zh-cn/application-dev/reference/apis/js-apis-telephony-data.md @@ -768,6 +768,26 @@ promise.then(() => { }); ``` +## data.getDefaultCellularDataSimId10+ + +getDefaultCellularDataSimId(): number + +获取默认移动数据的SIM卡ID。 + +**系统能力**:SystemCapability.Telephony.CellularData + +**返回值:** + +| 类型 | 说明 | +| ------ | -------------------------------------------------- | +| number | 获取默认移动数据的SIM卡ID。
与SIM卡绑定,从1开始递增。 | + +**示例:** + +```js +console.log("Result: "+ data.getDefaultCellularDataSimId()) +``` + ## DataFlowType 描述蜂窝数据流类型。 diff --git a/zh-cn/application-dev/reference/apis/js-apis-usbManager.md b/zh-cn/application-dev/reference/apis/js-apis-usbManager.md index e95d7c069f99e026f7a4f09b9816641fca4a9e50..774fd319bdf4df27ac4ff45964309e76d79bd7c6 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-usbManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-usbManager.md @@ -152,7 +152,7 @@ hasRight(deviceName: string): boolean **示例:** ```js -let devicesName="1-1"; +let devicesName = "1-1"; let bool = usb.hasRight(devicesName); console.log(`${bool}`); ``` @@ -180,7 +180,7 @@ requestRight(deviceName: string): Promise<boolean> **示例:** ```js -let devicesName="1-1"; +let devicesName = "1-1"; usb.requestRight(devicesName).then((ret) => { console.log(`requestRight = ${ret}`); }); @@ -209,7 +209,7 @@ removeRight(deviceName: string): boolean **示例:** ```js -let devicesName= "1-1"; +let devicesName = "1-1"; if (usb.removeRight(devicesName)) { console.log(`Succeed in removing right`); } @@ -277,6 +277,16 @@ claimInterface(pipe: USBDevicePipe, iface: USBInterface, force ?: boolean): numb **示例:** ```js +let devicesList = usb.getDevices(); +if (devicesList.length == 0) { + console.log(`device list is empty`); + return; +} + +let device = devicesList[0]; +usb.requestRight(device.name); +let devicepipe = usb.connectDevice(device); +let interfaces = device.configs[0].interfaces[0]; let ret = usb.claimInterface(devicepipe, interfaces); console.log(`claimInterface = ${ret}`); ``` @@ -307,7 +317,18 @@ releaseInterface(pipe: USBDevicePipe, iface: USBInterface): number **示例:** ```js -let ret = usb.releaseInterface(devicepipe, interfaces); +let devicesList = usb.getDevices(); +if (devicesList.length == 0) { + console.log(`device list is empty`); + return; +} + +let device = devicesList[0]; +usb.requestRight(device.name); +let devicepipe = usb.connectDevice(device); +let interfaces = device.configs[0].interfaces[0]; +let ret = usb.claimInterface(devicepipe, interfaces); +ret = usb.releaseInterface(devicepipe, interfaces); console.log(`releaseInterface = ${ret}`); ``` @@ -337,6 +358,16 @@ setConfiguration(pipe: USBDevicePipe, config: USBConfiguration): number **示例:** ```js +let devicesList = usb.getDevices(); +if (devicesList.length == 0) { + console.log(`device list is empty`); + return; +} + +let device = devicesList[0]; +usb.requestRight(device.name); +let devicepipe = usb.connectDevice(device); +let config = device.configs[0]; let ret = usb.setConfiguration(devicepipe, config); console.log(`setConfiguration = ${ret}`); ``` @@ -367,7 +398,18 @@ setInterface(pipe: USBDevicePipe, iface: USBInterface): number **示例:** ```js -let ret = usb.setInterface(devicepipe, interfaces); +let devicesList = usb.getDevices(); +if (devicesList.length == 0) { + console.log(`device list is empty`); + return; +} + +let device = devicesList[0]; +usb.requestRight(device.name); +let devicepipe = usb.connectDevice(device); +let interfaces = device.configs[0].interfaces[0]; +let ret = usb.claimInterface(devicepipe, interfaces); +ret = usb.setInterface(devicepipe, interfaces); console.log(`setInterface = ${ret}`); ``` @@ -396,6 +438,14 @@ getRawDescriptor(pipe: USBDevicePipe): Uint8Array **示例:** ```js +let devicesList = usb.getDevices(); +if (devicesList.length == 0) { + console.log(`device list is empty`); + return; +} + +usb.requestRight(devicesList[0].name); +let devicepipe = usb.connectDevice(devicesList[0]); let ret = usb.getRawDescriptor(devicepipe); ``` @@ -424,6 +474,14 @@ getFileDescriptor(pipe: USBDevicePipe): number **示例:** ```js +let devicesList = usb.getDevices(); +if (devicesList.length == 0) { + console.log(`device list is empty`); + return; +} + +usb.requestRight(devicesList[0].name); +let devicepipe = usb.connectDevice(devicesList[0]); let ret = usb.getFileDescriptor(devicepipe); ``` @@ -462,6 +520,15 @@ let param = { index: 0, data: null }; + +let devicesList = usb.getDevices(); +if (devicesList.length == 0) { + console.log(`device list is empty`); + return; +} + +usb.requestRight(devicesList[0].name); +let devicepipe = usb.connectDevice(devicesList[0]); usb.controlTransfer(devicepipe, param).then((ret) => { console.log(`controlTransfer = ${ret}`); }) @@ -498,8 +565,22 @@ bulkTransfer(pipe: USBDevicePipe, endpoint: USBEndpoint, buffer: Uint8Array, tim //usb.getDevices 接口返回数据集合,取其中一个设备对象,并获取权限 。 //把获取到的设备对象作为参数传入usb.connectDevice;当usb.connectDevice接口成功返回之后; //才可以调用第三个接口usb.claimInterface.当usb.claimInterface 调用成功以后,再调用该接口。 +let devicesList = usb.getDevices(); +if (devicesList.length == 0) { + console.log(`device list is empty`); + return; +} + +let device = devicesList[0]; +usb.requestRight(device.name); + +let devicepipe = usb.connectDevice(device); +let interfaces = device.configs[0].interfaces[0]; +let endpoint = device.configs[0].interfaces[0].endpoints[0]; +let ret = usb.claimInterface(devicepipe, interfaces); +let buffer = new Uint8Array(128); usb.bulkTransfer(devicepipe, endpoint, buffer).then((ret) => { - console.log(`bulkTransfer = ${ret}`); + console.log(`bulkTransfer = ${ret}`); }); ``` @@ -528,6 +609,14 @@ closePipe(pipe: USBDevicePipe): number **示例:** ```js +let devicesList = usb.getDevices(); +if (devicesList.length == 0) { + console.log(`device list is empty`); + return; +} + +usb.requestRight(devicesList[0].name); +let devicepipe = usb.connectDevice(devicesList[0]); let ret = usb.closePipe(devicepipe); console.log(`closePipe = ${ret}`); ``` diff --git a/zh-cn/application-dev/reference/apis/js-apis-userFileManager.md b/zh-cn/application-dev/reference/apis/js-apis-userFileManager.md index b37505664f301282571431399563d1d432604f2b..4086cc53fe5714e89eec6c47f8542f361fe9241e 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-userFileManager.md +++ b/zh-cn/application-dev/reference/apis/js-apis-userFileManager.md @@ -62,6 +62,14 @@ getPhotoAssets(options: FetchOptions, callback: AsyncCallback<FetchResult< | options | [FetchOptions](#fetchoptions) | 是 | 图片和视频检索选项。 | | callback | AsyncCallback<[FetchResult](#fetchresult)<[FileAsset](#fileasset)>> | 是 | callback返回图片和视频检索结果集。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type options is not FetchOptions. | + **示例:** ```ts @@ -111,6 +119,14 @@ getPhotoAssets(options: FetchOptions): Promise<FetchResult<FileAsset>&g | --------------------------- | -------------- | | Promise<[FetchResult](#fetchresult)<[FileAsset](#fileasset)>> | Promise对象,返回图片和视频数据结果集。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type options is not FetchOptions. | + **示例:** ```ts @@ -155,6 +171,15 @@ createPhotoAsset(displayName: string, albumUri: string, callback: AsyncCallback& | albumUri | string | 是 | 创建的图片或者视频所在相册的uri。 | | callback | AsyncCallback<[FileAsset](#fileasset)> | 是 | callback返回创建的图片和视频结果。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type displayName or albumUri is not string. | +| 14000001 | if type displayName invalid. | + **示例:** ```ts @@ -197,6 +222,15 @@ createPhotoAsset(displayName: string, callback: AsyncCallback<FileAsset>): | displayName | string | 是 | 创建的图片或者视频文件名。 | | callback | AsyncCallback<[FileAsset](#fileasset)> | 是 | callback返回创建的图片和视频结果。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type displayName is not string. | +| 14000001 | if type displayName invalid. | + **示例:** ```ts @@ -237,6 +271,14 @@ createPhotoAsset(displayName: string, albumUri?: string): Promise<FileAsset&g | --------------------------- | -------------- | | Promise<[FileAsset](#fileasset)> | Promise对象,返回创建的图片和视频结果。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type displayName or albumUri is not string. | + **示例:** ```ts @@ -271,6 +313,15 @@ createPhotoAsset(displayName: string, createOption: PhotoCreateOptions, callback | createOption | [PhotoCreateOptions](#photocreateoptions10) | 是 | 图片或视频的创建选项。 | | callback | AsyncCallback<[FileAsset](#fileasset)> | 是 | callback返回创建的图片和视频结果。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type displayName is not string. | +| 14000001 | if type displayName invalid. | + **示例:** ```ts @@ -314,6 +365,14 @@ createPhotoAsset(displayName: string, createOption: PhotoCreateOptions): Promise | --------------------------- | -------------- | | Promise<[FileAsset](#fileasset)> | Promise对象,返回创建的图片和视频结果。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type displayName is not string. | + **示例:** ```ts @@ -341,7 +400,7 @@ createAudioAsset(displayName: string, callback: AsyncCallback<FileAsset>): **系统能力**:SystemCapability.FileManagement.UserFileManager.Core -**需要权限**:ohos.permission.WRITE_IMAGEVIDEO +**需要权限**:ohos.permission.WRITE_AUDIO **参数:** @@ -350,6 +409,15 @@ createAudioAsset(displayName: string, callback: AsyncCallback<FileAsset>): | displayName | string | 是 | 创建的音频文件名。 | | callback | AsyncCallback<[FileAsset](#fileasset)> | 是 | callback返回创建的音频资源结果。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type displayName is not string. | +| 14000001 | if type displayName invalid. | + **示例:** ```ts @@ -375,7 +443,7 @@ createAudioAsset(displayName: string): Promise<FileAsset>; **系统能力**:SystemCapability.FileManagement.UserFileManager.Core -**需要权限**:ohos.permission.WRITE_IMAGEVIDEO +**需要权限**:ohos.permission.WRITE_AUDIO **参数:** @@ -389,6 +457,14 @@ createAudioAsset(displayName: string): Promise<FileAsset>; | --------------------------- | -------------- | | Promise<[FileAsset](#fileasset)> | Promise对象,返回创建的音频资源结果。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type displayName is not string. | + **示例:** ```ts @@ -423,6 +499,14 @@ getPhotoAlbums(options: AlbumFetchOptions, callback: AsyncCallback<FetchResul | options | [AlbumFetchOptions](#albumfetchoptions) | 是 | 相册检索选项。 | | callback | AsyncCallback<[FetchResult](#fetchresult)<[Album](#album)>> | 是 | callback返回相册检索结果。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type options is not AlbumFetchOptions. | + **示例:** ```ts @@ -474,6 +558,14 @@ getPhotoAlbums(options: AlbumFetchOptions): Promise<FetchResult<Album>& | --------------------------- | -------------- | | Promise<[FetchResult](#fetchresult)<[Album](#album)>> | Promise对象,返回相册检索结果。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type options is not AlbumFetchOptions. | + **示例:** ```ts @@ -599,11 +691,13 @@ deleteAlbums(albums: Array<Album>, callback: AsyncCallback<void>): v **示例:** ```ts +import dataSharePredicates from '@ohos.data.dataSharePredicates'; + async function example() { - // 示例代码为删除名称包含newAlbumName的第一个相册。 + // 示例代码为删除相册名为newAlbumName的相册。 console.info('deleteAlbumsDemo'); let predicates = new dataSharePredicates.DataSharePredicates(); - predicates.like('album_name', '%newAlbumName%'); + predicates.equalTo('album_name', 'newAlbumName'); let fetchOptions = { fetchColumns: [], predicates: predicates @@ -648,11 +742,13 @@ deleteAlbums(albums: Array<Album>): Promise<void>; **示例:** ```ts +import dataSharePredicates from '@ohos.data.dataSharePredicates'; + async function example() { - // 示例代码为删除名称包含newAlbumName的第一个相册。 + // 示例代码为删除相册名为newAlbumName的相册。 console.info('deleteAlbumsDemo'); let predicates = new dataSharePredicates.DataSharePredicates(); - predicates.like('album_name', '%newAlbumName%'); + predicates.equalTo('album_name', 'newAlbumName'); let fetchOptions = { fetchColumns: [], predicates: predicates @@ -689,14 +785,24 @@ getAlbums(type: AlbumType, subType: AlbumSubType, options: FetchOptions, callbac | options | [FetchOptions](#fetchoptions) | 是 | 检索选项。 | | callback | AsyncCallback<[FetchResult](#fetchresult)<[Album](#album)>> | 是 | callback返回获取相册的结果集。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type options is not FetchOption. | + **示例:** ```ts +import dataSharePredicates from '@ohos.data.dataSharePredicates'; + async function example() { - // 示例代码中为获取相册名中包含newAlbumName的第一个相册。 + // 示例代码中为获取相册名为newAlbumName的相册。 console.info('getAlbumsDemo'); let predicates = new dataSharePredicates.DataSharePredicates(); - predicates.like('album_name', '%newAlbumName%'); + predicates.equalTo('album_name', 'newAlbumName'); let fetchOptions = { fetchColumns: [], predicates: predicates @@ -737,6 +843,14 @@ getAlbums(type: AlbumType, subType: AlbumSubType, callback: AsyncCallback<Fet | subType | [AlbumSubType](#albumsubtype10) | 是 | 相册子类型。 | | callback | AsyncCallback<[FetchResult](#fetchresult)<[Album](#album)>> | 是 | callback返回获取相册的结果集。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type options is not FetchOption. | + **示例:** ```ts @@ -785,14 +899,24 @@ getAlbums(type: AlbumType, subType: AlbumSubType, options?: FetchOptions): Promi | --------------------------- | -------------- | | Promise<[FetchResult](#fetchresult)<[Album](#album)>> | Promise对象,返回获取相册的结果集。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type options is not FetchOption. | + **示例:** ```ts +import dataSharePredicates from '@ohos.data.dataSharePredicates'; + async function example() { - // 示例代码中为获取相册名中包含newAlbumName的第一个相册。 + // 示例代码中为获取相册名为newAlbumName的相册。 console.info('getAlbumsDemo'); let predicates = new dataSharePredicates.DataSharePredicates(); - predicates.like('album_name', '%newAlbumName%'); + predicates.equalTo('album_name', 'newAlbumName'); let fetchOptions = { fetchColumns: [], predicates: predicates @@ -828,6 +952,14 @@ getPrivateAlbum(type: PrivateAlbumType, callback: AsyncCallback<FetchResult&l | type | [PrivateAlbumType](#privatealbumtype) | 是 | 系统相册类型。 | | callback | AsyncCallback<[FetchResult](#fetchresult)<[PrivateAlbum](#privatealbum)>> | 是 | callback返回相册检索结果。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type type is not PrivateAlbumType. | + **示例:** ```ts @@ -866,6 +998,14 @@ getPrivateAlbum(type: PrivateAlbumType): Promise<FetchResult<PrivateAlbum& | --------------------------- | -------------- | | Promise<[FetchResult](#fetchresult)<[PrivateAlbum](#privatealbum)>> | Promise对象,返回相册检索结果。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type type is not PrivateAlbumType. | + **示例:** ```ts @@ -898,6 +1038,14 @@ getAudioAssets(options: FetchOptions, callback: AsyncCallback<FetchResult< | options | [FetchOptions](#fetchoptions) | 是 | 检索选项。 | | callback | AsyncCallback<[FetchResult](#fetchresult)<[FileAsset](#fileasset)>> | 是 | callback返回音频检索结果。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type options is not FetchOptions. | + **示例:** ```ts @@ -948,6 +1096,14 @@ getAudioAssets(options: FetchOptions): Promise<FetchResult<FileAsset>&g | --------------------------- | -------------- | | Promise<[FetchResult](#fetchresult)<[FileAsset](#fileasset)>> | Promise对象,返回音频检索结果。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type options is not FetchOptions. | + **示例:** ```ts @@ -993,6 +1149,14 @@ delete(uri: string, callback: AsyncCallback<void>): void; | uri | string | 是 | 媒体文件uri。 | | callback | AsyncCallback<void> | 是 | callback返回void。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type uri is not string. | + **示例:** ```ts @@ -1048,6 +1212,14 @@ delete(uri: string): Promise<void>; | --------------------------------------- | ----------------- | | Promise<void>| Promise对象,返回void。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type uri is not string. | + **示例:** ```ts @@ -1385,9 +1557,19 @@ on(uri: string, forSubUri: boolean, callback: Callback<ChangeData>) : void | forSubUri | boolean | 是 | 是否模糊监听,uri为相册uri时,forSubUri 为true能监听到相册中文件的变化,如果是false只能监听相册本身变化。uri为fileAsset时,forSubUri 为true、false没有区别,uri为DefaultChangeUri时,forSubUri必须为true,如果为false将找不到该uri,收不到任何消息。 | | callback | Callback<[ChangeData](#changedata10)> | 是 | 返回要监听的[ChangeData](#changedata10)。注:uri可以注册多个不同的callback监听,[off10+](#off10)可以关闭该uri所有监听,也可以关闭指定callback的监听。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if parameter is invalid. | + **示例:** ```ts +import dataSharePredicates from '@ohos.data.dataSharePredicates'; + async function example() { console.info('onDemo'); let predicates = new dataSharePredicates.DataSharePredicates(); @@ -1438,9 +1620,19 @@ async function example() { | uri | string | 是 | FileAsset的uri, Album的uri或[DefaultChangeUri](#defaultchangeuri10)的值。 | | callback | Callback<[ChangeData](#changedata10)> | 否 | 解除[on10+](#on10)注册时的callback的监听,不填时,解除该uri的所有监听。注:off指定注册的callback后不会进入此回调。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if parameter is invalid. | + **示例:** ```ts +import dataSharePredicates from '@ohos.data.dataSharePredicates'; + async function example() { console.info('offDemo'); let predicates = new dataSharePredicates.DataSharePredicates(); @@ -1557,7 +1749,7 @@ async function example() { }; let fetchResult = await mgr.getPhotoAssets(fetchOption); let fileAsset = await fetchResult.getFirstObject(); - let displayName = userFileManager.ImageVideoKey.DISPLAY_NAME; + let displayName = userFileManager.ImageVideoKey.DISPLAY_NAME.toString(); fileAsset.set(displayName, 'newDisplayName1'); } catch (err) { console.error('release failed. message = ', err); @@ -1595,7 +1787,7 @@ async function example() { }; let fetchResult = await mgr.getPhotoAssets(fetchOption); let fileAsset = await fetchResult.getFirstObject(); - let displayName = userFileManager.ImageVideoKey.DISPLAY_NAME; + let displayName = userFileManager.ImageVideoKey.DISPLAY_NAME.toString(); let fileAssetDisplayName = fileAsset.get(displayName); console.info('fileAsset get fileAssetDisplayName = ', fileAssetDisplayName); fileAsset.set(displayName, 'newDisplayName2'); @@ -1640,7 +1832,7 @@ async function example() { }; let fetchResult = await mgr.getPhotoAssets(fetchOption); let fileAsset = await fetchResult.getFirstObject(); - let displayName = userFileManager.ImageVideoKey.DISPLAY_NAME; + let displayName = userFileManager.ImageVideoKey.DISPLAY_NAME.toString(); let fileAssetDisplayName = fileAsset.get(displayName); console.info('fileAsset get fileAssetDisplayName = ', fileAssetDisplayName); fileAsset.set(displayName, 'newDisplayName3'); @@ -2060,6 +2252,15 @@ setHidden(hiddenState: boolean, callback: AsyncCallback<void>): void | hiddenState | boolean | 是 | 是否设置为隐藏文件,true:将文件资产放入隐藏相册;false:从隐藏相册中恢复。 | | callback | AsyncCallback<void> | 是 | callback返回void。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)和[通用错误码](../errorcodes/errorcode-universal.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 202 | Called by non-system application. | +| 13900020 | if parameter is invalid. | + **示例:** ```ts @@ -2108,6 +2309,15 @@ setHidden(hiddenState: boolean): Promise<void> | ------------------- | ---------- | | Promise<void> | Promise对象,返回void。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)和[通用错误码](../errorcodes/errorcode-universal.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 202 | Called by non-system application. | +| 13900020 | if parameter is invalid. | + **示例:** ```ts @@ -2198,7 +2408,7 @@ async function example() { const fetchCount = fetchResult.getCount(); console.info('count:' + fetchCount); let fileAsset = await fetchResult.getLastObject(); - if (!fetchResult.isAfterLast()) { + if (fetchResult.isAfterLast()) { console.info('fileAsset isAfterLast displayName = ', fileAsset.displayName); } else { console.info('fileAsset not isAfterLast '); @@ -2464,6 +2674,14 @@ getPositionObject(index: number, callback: AsyncCallback<T>): void | index | number | 是 | 要获取的文件的索引,从0开始。 | | callback | AsyncCallback<T> | 是 | 异步返回指定索引的文件资产的回调。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type index is not number. | + **示例:** ```ts @@ -2507,6 +2725,14 @@ getPositionObject(index: number): Promise<T> | --------------------------------------- | ----------------- | | Promise<T> | Promise对象,返回结果集中指定索引的一个对象。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type index is not number. | + **示例:** ```ts @@ -2604,8 +2830,8 @@ async function example() { | 名称 | 类型 | 可读 | 可写 | 说明 | | ------------ | ------ | ---- | ---- | ------- | -| albumType8+ | [AlbumType]( #albumtype10) | 是 | 否 | 相册类型。 | -| albumSubType8+ | [AlbumSubType]( #albumsubtype10) | 是 | 否 | 相册子类型。 | +| albumType10+ | [AlbumType]( #albumtype10) | 是 | 否 | 相册类型。 | +| albumSubType10+ | [AlbumSubType]( #albumsubtype10) | 是 | 否 | 相册子类型。 | | albumName | string | 是 | 用户相册可写,预置相册不可写 | 相册名称。 | | albumUri | string | 是 | 否 | 相册Uri。 | | count | number | 是 | 否 | 相册中文件数量。 | @@ -2628,6 +2854,14 @@ getPhotoAssets(options: FetchOptions, callback: AsyncCallback<FetchResult< | options | [FetchOptions](#fetchoptions) | 是 | 检索选项。 | | callback | AsyncCallback<[FetchResult](#fetchresult)<[FileAsset](#fileasset)>> | 是 | callback返回图片和视频数据结果集。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type options is not FetchOptions. | + **示例:** ```ts @@ -2678,6 +2912,14 @@ getPhotoAssets(options: FetchOptions): Promise<FetchResult<FileAsset>&g | --------------------------------------- | ----------------- | | Promise<[FetchResult](#fetchresult)<[FileAsset](#fileasset)>> | Promise对象,返回图片和视频数据结果集。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type options is not FetchOptions. | + **示例:** ```ts @@ -2803,6 +3045,14 @@ addPhotoAssets(assets: Array<FileAsset>, callback: AsyncCallback<void&g | assets | Array<[FileAsset](#fileasset)> | 是 | 待添加到相册中的图片或视频数组。 | | callback | AsyncCallback<void> | 是 | callback返回void。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if PhotoAssets is invalid. | + **示例:** ```ts @@ -2855,6 +3105,14 @@ addPhotoAssets(assets: Array<FileAsset>): Promise<void>; | --------------------------------------- | ----------------- | |Promise<void> | Promise对象,返回void。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if PhotoAssets is invalid. | + **示例:** ```ts @@ -2900,6 +3158,14 @@ removePhotoAssets(assets: Array<FileAsset>, callback: AsyncCallback<voi | assets | Array<[FileAsset](#fileasset)> | 是 | 相册中待移除的图片或视频数组。 | | callback | AsyncCallback<void> | 是 | callback返回void。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if PhotoAssets is invalid. | + **示例:** ```ts @@ -2952,6 +3218,14 @@ removePhotoAssets(assets: Array<FileAsset>): Promise<void>; | --------------------------------------- | ----------------- | |Promise<void> | Promise对象,返回void。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if PhotoAssets is invalid. | + **示例:** ```ts @@ -2997,6 +3271,14 @@ recoverPhotoAssets(assets: Array<FileAsset>, callback: AsyncCallback<vo | assets | Array<[FileAsset](#fileasset)> | 是 | 回收站中待恢复图片或者视频数组。 | | callback | AsyncCallback<void> | 是 | callback返回void。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if PhotoAssets is invalid. | + **示例:** ```ts @@ -3049,6 +3331,14 @@ recoverPhotoAssets(assets: Array<FileAsset>): Promise<void>; | --------------------------------------- | ----------------- | |Promise<void> | Promise对象,返回void。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if PhotoAssets is invalid. | + **示例:** ```ts @@ -3096,6 +3386,14 @@ deletePhotoAssets(assets: Array<FileAsset>, callback: AsyncCallback<voi | assets | Array<[FileAsset](#fileasset)> | 是 | 回收站中待彻底删除图片或者视频数组。 | | callback | AsyncCallback<void> | 是 | callback返回void。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if PhotoAssets is invalid. | + **示例:** ```ts @@ -3150,6 +3448,14 @@ deletePhotoAssets(assets: Array<FileAsset>): Promise<void>; | --------------------------------------- | ----------------- | |Promise<void> | Promise对象,返回void。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if PhotoAssets is invalid. | + **示例:** ```ts @@ -3211,6 +3517,14 @@ getPhotoAssets(options: FetchOptions, callback: AsyncCallback<FetchResult< | options | [FetchOptions](#fetchoptions) | 是 | 检索选项。 | | callback | AsyncCallback<[FetchResult](#fetchresult)<[FileAsset](#fileasset)>> | 是 | callback返回图片和视频数据结果集。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type options is not FetchOptions. | + **示例:** ```ts @@ -3259,6 +3573,14 @@ getPhotoAssets(options: FetchOptions): Promise<FetchResult<FileAsset>&g | --------------------------------------- | ----------------- | | Promise:[FetchResult](#fetchresult)<[FileAsset](#fileasset)>| Promise对象,返回图片和视频数据结果集。 | +**错误码:** + +接口抛出错误码的详细介绍请参见[文件管理错误码](../errorcodes/errorcode-filemanagement.md)。 + +| 错误码ID | 错误信息 | +| -------- | ---------------------------------------- | +| 13900020 | if type options is not FetchOptions. | + **示例:** ```ts diff --git a/zh-cn/application-dev/reference/apis/js-apis-vibrator.md b/zh-cn/application-dev/reference/apis/js-apis-vibrator.md index eb5fe8765d264d4f7d206c9268f94b53396950cd..7f64ab88d121fab42a7661ce86d08564e28aff89 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-vibrator.md +++ b/zh-cn/application-dev/reference/apis/js-apis-vibrator.md @@ -434,7 +434,7 @@ try { 预置的振动效果。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.Sensors.MiscDevice +**系统能力**:SystemCapability.Sensors.MiscDevice | 名称 | 值 | 说明 | | ------------------ | -------------------- | -------------------------------- | @@ -445,7 +445,7 @@ try { 停止的振动模式。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.Sensors.MiscDevice +**系统能力**:SystemCapability.Sensors.MiscDevice | 名称 | 值 | 说明 | | ------------------------- | -------- | ------------------------------ | @@ -456,52 +456,76 @@ try { 马达振动效果。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.Sensors.MiscDevice +**系统能力**:SystemCapability.Sensors.MiscDevice | 类型 | 说明 | | -------------------------------- | ------------------------------ | | [VibrateTime](#vibratetime9) | 按照指定持续时间触发马达振动。 | | [VibratePreset](#vibratepreset9) | 按照预置振动类型触发马达振动。 | +| [VibrateFromFile10+](#vibratefromfile10) | 按照自定义振动配置文件触发马达振动。 | ## VibrateTime9+ 马达振动时长。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.Sensors.MiscDevice +**系统能力**:SystemCapability.Sensors.MiscDevice -| 名称 | 值 | 说明 | +| 名称 | 类型 | 说明 | | -------- | ------ | ------------------------------ | -| type | "time" | 按照指定持续时间触发马达振动。 | -| duration | - | 马达持续振动时长, 单位ms。 | +| type | string | 值为"time",按照指定持续时间触发马达振动。 | +| duration | number | 马达持续振动时长, 单位ms。 | ## VibratePreset9+ 马达预置振动类型。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.Sensors.MiscDevice +**系统能力**:SystemCapability.Sensors.MiscDevice -| 名称 | 值 | 说明 | +| 名称 | 类型 | 说明 | | -------- | -------- | ------------------------------ | -| type | "preset" | 按照预置振动效果触发马达振动。 | -| effectId | - | 预置的振动效果ID。 | -| count | - | 重复振动的次数。 | +| type | string | 值为"preset",按照预置振动效果触发马达振动。 | +| effectId | string | 预置的振动效果ID。 | +| count | number | 重复振动的次数。 | + +## VibrateFromFile10+ + +自定义振动类型,仅部分设备支持。 + +**系统能力**:SystemCapability.Sensors.MiscDevice + +| 名称 | 类型 | 说明 | +| -------- | -------- | ------------------------------ | +| type | string | 值为"file",按照振动配置文件触发马达振动。 | +| hapticFd | [HapticFileDescriptor](#hapticfiledescriptor10) | 振动配置文件的描述符。| + +## HapticFileDescriptor10+ + +自定义振动配置文件的描述符,必须确认资源文件可用,其参数可通过[文件管理API](js-apis-file-fs.md#fsopen)从沙箱路径获取或者通过[资源管理API](js-apis-resource-manager.md#getrawfd9)从HAP资源获取。使用场景:振动序列被存储在一个文件中,需要根据偏移量和长度进行振动,振动序列存储格式,请参考[自定义振动格式](../../device/vibrator-guidelines.md#自定义振动格式)。 + +**系统能力**:SystemCapability.Sensors.MiscDevice + +| 名称 | 类型 | 必填 | 说明 | +| -------- | -------- |--------| ------------------------------| +| fd | number | 是 | 资源文件描述符。 | +| offset | number | 否 | 距文件起始位置的偏移量,单位为字节,默认为文件起始位置,不可超出文件有效范围。| +| length | number | 否 | 资源长度,单位为字节,默认值为从偏移位置至文件结尾的长度,不可超出文件有效范围。| ## VibrateAttribute9+ 马达振动属性。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.Sensors.MiscDevice +**系统能力**:SystemCapability.Sensors.MiscDevice -| 名称 | 值 | 说明 | +| 名称 | 类型 | 说明 | | ----- | ------ | -------------- | -| id | 0 | 振动器id。 | -| usage | - | 马达振动的使用场景。 | +| id | number | 默认值为0,振动器id。 | +| usage | [Usage](#usage9) | 马达振动的使用场景。 | ## Usage9+ 振动使用场景。 -**系统能力**:以下各项对应的系统能力均为SystemCapability.Sensors.MiscDevice +**系统能力**:SystemCapability.Sensors.MiscDevice | 名称 | 类型 | 说明 | | ---------------- | ------ | ------------------------------ | diff --git a/zh-cn/application-dev/reference/apis/js-apis-webview.md b/zh-cn/application-dev/reference/apis/js-apis-webview.md index c9e95de117c820a9ed9283c76c877709d44ba07a..722eecfb467b5ea754f9c9a6d241e9a5273c571c 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-webview.md +++ b/zh-cn/application-dev/reference/apis/js-apis-webview.md @@ -1357,6 +1357,7 @@ struct Index { } +``` ### runJavaScript @@ -1477,11 +1478,9 @@ import web_webview from '@ohos.web.webview' @Component struct WebComponent { controller: web_webview.WebviewController = new web_webview.WebviewController(); - @State webResult: string = ''; build() { Column() { - Text(this.webResult).fontSize(20) Web({ src: $rawfile('index.html'), controller: this.controller }) .javaScriptAccess(true) .onPageEnd(e => { diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md index 1eaad8a7e76b26750dd6596139d4bdbe0842d9f4..1f0d41d585cb1d0a3e40cd8a8e8a7138948bfee8 100755 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-web.md @@ -106,7 +106,7 @@ Web(options: { src: ResourceStr, controller: WebviewController | WebController}) ``` 2.修改EntryAbility.ts。 - 以filesDir为例,获取沙箱路径。若想获取其他路径,请参考[应用开发路径](../../application-models/application-context-stage.md#获取应用开发路径)。 + 以filesDir为例,获取沙箱路径。若想获取其他路径,请参考[应用文件路径](../../application-models/application-context-stage.md#获取应用文件路径)。 ```ts // xxx.ts import UIAbility from '@ohos.app.ability.UIAbility'; @@ -670,6 +670,11 @@ verticalScrollBarAccess(verticalScrollBar: boolean) ``` +### password + +password(password: boolean) + +设置是否应保存密码。该接口为空接口。 ### cacheMode @@ -1237,6 +1242,18 @@ forceDarkAccess(access: boolean) } ``` +### tableData + +tableData(tableData: boolean) + +设置是否应保存表单数据。该接口为空接口。 + +### wideViewModeAccess + +wideViewModeAccess(wideViewModeAccess: boolean) + +设置web是否支持html中meta标签的viewport属性。该接口为空接口。 + ### pinchSmooth9+ pinchSmooth(isEnabled: boolean) @@ -2091,6 +2108,26 @@ onRefreshAccessedHistory(callback: (event?: { url: string, isRefreshed: boolean } ``` +### onSslErrorReceive(deprecated) + +onSslErrorReceive(callback: (event?: { handler: Function, error: object }) => void) + +通知用户加载资源时发生SSL错误。 + +> **说明:** +> +> 从API version 8开始支持,从API version 9开始废弃。建议使用[onSslErrorEventReceive9+](#onsslerroreventreceive9)替代。 + +### onFileSelectorShow(deprecated) + +onFileSelectorShow(callback: (event?: { callback: Function, fileSelector: object }) => void) + +调用此函数以处理具有“文件”输入类型的HTML表单,以响应用户按下的“选择文件”按钮。 + +> **说明:** +> +> 从API version 8开始支持,从API version 9开始废弃。建议使用[onShowFileSelector9+](#onshowfileselector9)替代。 + ### onRenderExited9+ onRenderExited(callback: (event?: { renderExitReason: RenderExitReason }) => void) @@ -5083,9 +5120,11 @@ clearHistory(): void 通过WebCookie可以控制Web组件中的cookie的各种行为,其中每个应用中的所有web组件共享一个WebCookie。通过controller方法中的getCookieManager方法可以获取WebCookie对象,进行后续的cookie管理操作。 ### setCookie(deprecated) + setCookie(): boolean 设置cookie,该方法为同步方法。设置成功返回true,否则返回false。 + 从API version 9开始不再维护,建议使用[setCookie9+](../apis/js-apis-webview.md#setcookie)代替。 **返回值:** @@ -5094,57 +5133,16 @@ setCookie(): boolean | ------- | ------------- | | boolean | 设置cookie是否成功。 | -**示例:** - - ```ts - // xxx.ets - @Entry - @Component - struct WebComponent { - controller: WebController = new WebController() - - build() { - Column() { - Button('setCookie') - .onClick(() => { - let result = this.controller.getCookieManager().setCookie() - console.log("result: " + result) - }) - Web({ src: 'www.example.com', controller: this.controller }) - } - } - } - ``` ### saveCookie(deprecated) + saveCookie(): boolean 将当前存在内存中的cookie同步到磁盘中,该方法为同步方法。 + 从API version 9开始不再维护,建议使用[saveCookieAsync9+](../apis/js-apis-webview.md#savecookieasync)代替。 **返回值:** | 类型 | 说明 | | ------- | -------------------- | -| boolean | 同步内存cookie到磁盘操作是否成功。 | - -**示例:** - - ```ts - // xxx.ets - @Entry - @Component - struct WebComponent { - controller: WebController = new WebController() - - build() { - Column() { - Button('saveCookie') - .onClick(() => { - let result = this.controller.getCookieManager().saveCookie() - console.log("result: " + result) - }) - Web({ src: 'www.example.com', controller: this.controller }) - } - } - } - ``` \ No newline at end of file +| boolean | 同步内存cookie到磁盘操作是否成功。 | \ No newline at end of file diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-xcomponent.md b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-xcomponent.md index 4cf93660fbb7d1105f118dd8c40cbf2827f02476..9d38cf6fd26f8d3aef0c6e20ef3b79b5c7ede7f6 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-xcomponent.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-basic-components-xcomponent.md @@ -14,20 +14,39 @@ ## 接口 - XComponent(value: {id: string, type: string, libraryname?: string, controller?: XComponentController}) +**方法1:** XComponent(value: {id: string, type: string, libraryname?: string, controller?: XComponentController}) **参数:** -| 参数名 | 参数类型 | 必填 | 描述 | -| ----------- | ---------------------------------------- | ---- | ---------------------------------------- | -| id | string | 是 | 组件的唯一标识,支持最大的字符串长度128。 | -| type | string | 是 | 用于指定XComponent组件类型,可选值为:
-"surface":用于EGL/OpenGLES和媒体数据写入,组件内容单独送显,直接合成到屏幕。
-"component"9+ :XComponent将变成一个容器组件,并可在其中执行非UI逻辑以动态加载显示内容。 | -| libraryname | string | 否 | 应用Native层编译输出动态库名称,仅XComponent类型为"surface"时有效。 | -| controller | [XComponentcontroller](#xcomponentcontroller) | 否 | 给组件绑定一个控制器,通过控制器调用组件方法,仅XComponent类型为"surface"时有效。 | +| 参数名 | 参数类型 | 必填 | 描述 | +| ----------- | --------------------------------------------- | ---- | ------------------------------------------------------------ | +| id | string | 是 | 组件的唯一标识,支持最大的字符串长度128。 | +| type | string | 是 | 用于指定XComponent组件类型,可选值仅有两个为:
-"surface":用于EGL/OpenGLES和媒体数据写入,开发者定制的绘制内容单独展示到屏幕上。
-"component"9+ :XComponent将变成一个容器组件,并可在其中执行非UI逻辑以动态加载显示内容。
其他值均会被视为"surface"类型 | +| libraryname | string | 否 | 应用Native层编译输出动态库名称,仅XComponent类型为"surface"时有效。 | +| controller | [XComponentcontroller](#xcomponentcontroller) | 否 | 给组件绑定一个控制器,通过控制器调用组件方法,仅XComponent类型为"surface"时有效。 | + +**方法2:** XComponent(value: {id: string, type: XComponentType, libraryname?: string, controller?: XComponentController})10+ + +**参数:** + +| 参数名 | 参数类型 | 必填 | 描述 | +| ----------- | --------------------------------------------- | ---- | ------------------------------------------------------------ | +| id | string | 是 | 组件的唯一标识,支持最大的字符串长度128。 | +| type | [XComponentType](#xcomponenttype10枚举说明) | 是 | 用于指定XComponent组件类型。 | +| libraryname | string | 否 | 用Native层编译输出动态库名称,仅类型为SURFACE或TEXTURE时有效。 | +| controller | [XComponentcontroller](#xcomponentcontroller) | 否 | 给组件绑定一个控制器,通过控制器调用组件方法,仅类型为SURFACE或TEXTURE时有效。 | + +## XComponentType10+枚举说明 + +| 名称 | 描述 | +| --------- | ------------------------------------------------------------ | +| SURFACE | 用于EGL/OpenGLES和媒体数据写入,开发者定制的绘制内容单独展示到屏幕上。 | +| COMPONENT | XComponent将变成一个容器组件,并可在其中执行非UI逻辑以动态加载显示内容。 | +| TEXTURE | 用于EGL/OpenGLES和媒体数据写入,开发者定制的绘制内容会和XComponent组件的内容合成后展示到屏幕上。 | > **说明:** > -> type为"component"时,XComponent作为容器,子组件沿垂直方向布局: +> type为COMPONENT("component")时,XComponent作为容器,子组件沿垂直方向布局: > > - 垂直方向上对齐格式:[FlexAlign](ts-appendix-enums.md#flexalign).Start > - 水平方向上对齐格式:[FlexAlign](ts-appendix-enums.md#flexalign).Center @@ -39,13 +58,14 @@ > 内部所写的非UI逻辑需要封装在一个或多个函数内。 ## 属性 -- XComponent显示的内容,可由开发者自定义绘制,通用属性不支持[背景设置](./ts-universal-attributes-background.md)、[透明度设置](./ts-universal-attributes-opacity.md)和[图像效果](./ts-universal-attributes-image-effect.md)。 -- type为"surface"时建议使用EGL/OpenGLES提供的接口设置相关内容。 -- type为"component"时建议使用挂载子组件的方式进行设置相关内容。 +- XComponent显示的内容,可由开发者自定义绘制,通用属性中的[背景设置](./ts-universal-attributes-background.md)、[透明度设置](./ts-universal-attributes-opacity.md)和[图像效果](./ts-universal-attributes-image-effect.md)按照type类型有限支持。 +- type为SURFACE("surface")时上述通用属性均不支持,建议使用EGL/OpenGLES提供的接口设置相关内容。 +- type为COMPONENT("component")时上述通用属性均不支持,建议使用挂载子组件的方式进行设置相关内容。 +- type为TEXTURE时通用属性可以支持[背景颜色设置](./ts-universal-attributes-background.md)和[透明度设置](./ts-universal-attributes-opacity.md),[除颜色外的背景设置](./ts-universal-attributes-background.md)和[图像效果](./ts-universal-attributes-image-effect.md)暂不支持,建议使用EGL/OpenGLES提供的接口设置相关内容。 ## 事件 -仅type为"surface"时以下事件有效。不支持[通用事件](ts-universal-events-click.md)和[手势](ts-gesture-settings.md)。 +仅type为SURFACE("surface")或TEXTURE时以下事件有效。不支持[通用事件](ts-universal-events-click.md)和[手势](ts-gesture-settings.md)。 ### onLoad @@ -79,7 +99,7 @@ xcomponentController: XComponentController = new XComponentController() getXComponentSurfaceId(): string -获取XComponent对应Surface的ID,供@ohos接口使用,使用方式可参考[相机管理](../apis/js-apis-camera.md),仅XComponent类型为"surface"时有效。 +获取XComponent对应Surface的ID,供@ohos接口使用,使用方式可参考[相机管理](../apis/js-apis-camera.md),仅XComponent类型为SURFACE("surface")或TEXTURE时有效。 **返回值:** @@ -93,7 +113,7 @@ getXComponentSurfaceId(): string setXComponentSurfaceSize(value: {surfaceWidth: number, surfaceHeight: number}): void -设置XComponent持有Surface的宽度和高度,仅XComponent类型为"surface"时有效。 +设置XComponent持有Surface的宽度和高度,仅XComponent类型为SURFACE("surface")或TEXTURE时有效。 **参数:** @@ -108,7 +128,7 @@ setXComponentSurfaceSize(value: {surfaceWidth: number, surfaceHeight: number}): getXComponentContext(): Object -获取XComponent实例对象的context,仅XComponent类型为"surface"时有效。 +获取XComponent实例对象的context,仅XComponent类型为SURFACE("surface")或TEXTURE时有效。 **返回值:** diff --git a/zh-cn/application-dev/reference/arkui-ts/ts-container-listitem.md b/zh-cn/application-dev/reference/arkui-ts/ts-container-listitem.md index 5ea62d723c5ac73ba1caf623cc0709aa1886a322..b5aa4e9192abfc760b06096b5440e6ffad6776c2 100644 --- a/zh-cn/application-dev/reference/arkui-ts/ts-container-listitem.md +++ b/zh-cn/application-dev/reference/arkui-ts/ts-container-listitem.md @@ -62,7 +62,7 @@ List垂直布局,ListItem向右滑动,item左边的长距离滑动删除选 | onEntryDeleteArea | () => void | 否 | 在滑动条目进入删除区域时调用,只触发一次,当再次进入时仍触发。 | | onExitDeleteArea | () => void | 否 |当滑动条目退出删除区域时调用,只触发一次,当再次退出时仍触发。 | | builder | CustomBuilder | 否 |当列表项向右或向右滑动(当列表方向为“垂直”时),向下或向下滑动(当列方向为“水平”时)时显示的操作项。 | -| useDefaultDeleteAnimation | boolean | 否 |设置是否使用默认的删除动画。 | +| useDefaultDeleteAnimation | boolean | 否 |设置是否使用默认的删除动画。
默认值:true | ## 事件 | 名称 | 功能描述 | diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-filemanagement.md b/zh-cn/application-dev/reference/errorcodes/errorcode-filemanagement.md index 6b5de4d6fa6f3eef88121456a43dc8f47dc73bbf..1cfcdc8e8eff4278de16eca7d59d5d346a94c39a 100644 --- a/zh-cn/application-dev/reference/errorcodes/errorcode-filemanagement.md +++ b/zh-cn/application-dev/reference/errorcodes/errorcode-filemanagement.md @@ -4,7 +4,7 @@ > > 以下仅介绍本模块特有错误码,通用错误码请参考[通用错误码说明文档](errorcode-universal.md)。 -文件管理子系统错误码由四部分组成,分别是[基础文件IO错误码](#基础文件io错误码)、[用户数据管理错误码](#用户数据管理错误码)、[公共文件访问错误码](#公共文件访问错误码)和[空间统计错误码](#空间统计错误码)组成。 +文件管理子系统错误码由五部分组成,分别是[基础文件IO错误码](#基础文件io错误码)、[用户数据管理错误码](#用户数据管理错误码)、[公共文件访问错误码](#公共文件访问错误码)、[空间统计错误码](#空间统计错误码)和[端云同步错误码](#端云同步错误码)。 ## 基础文件IO错误码 @@ -921,3 +921,51 @@ Fail to notify agent **处理步骤** 检查client是否异常。 + +## 端云同步错误码 + +### 22400001 云端状态未ready + +**错误信息** + +Cloud status not ready + +**可能原因** + +1.未启用云。 + +2.应用云同步开关未打开。 + +**处理步骤** + +1.检查是否帐号登录。 + +2.检查云同步开关是否打开。 + +### 22400002 网络不可用 + +**错误信息** + +Network unavailable + +**可能原因** + +设备未联网或网络不可用。 + +**处理步骤** + +检查网络状态。 + +### 22400003 告警电量 + +**错误信息** + +Battery level warning + +**可能原因** + +电量过低。 + +**处理步骤** + +充电状态或电量恢复后再执行。 diff --git a/zh-cn/application-dev/reference/errorcodes/errorcode-router.md b/zh-cn/application-dev/reference/errorcodes/errorcode-router.md index 474adf54898b3af6e183e6ea6d9621294dc9c54b..bc0da2215d19593d16c21f4d0f2d59669620739b 100644 --- a/zh-cn/application-dev/reference/errorcodes/errorcode-router.md +++ b/zh-cn/application-dev/reference/errorcodes/errorcode-router.md @@ -24,7 +24,7 @@ NA ## 100002 路由页面跳转时输入的uri错误 -错误信息 +**错误信息** Uri error. The uri of router is not exist. @@ -58,6 +58,20 @@ Page stack error. The pages are pushed too much. 请清除多余或无效的页面。 +## 100004 命名路由页面跳转时输入的name错误 + +**错误信息** + +Named route error. The named route is not exist. + +**错误描述** + +当跳转命名路由页面输入的name错误或者不存在,系统会产生此错误码。 + +**可能原因** + +输入的命名路由name错误或者不存在。 + ## 200002 路由页面替换时输入的uri错误 **错误信息** diff --git a/zh-cn/application-dev/reference/native-lib/third_party_napi/napi.md b/zh-cn/application-dev/reference/native-lib/third_party_napi/napi.md index 8b4432e72e47685b70271bcff4f3f2a3b01078a8..afc5aa18d4d1c885670eebad2eafbce6e48b4d15 100644 --- a/zh-cn/application-dev/reference/native-lib/third_party_napi/napi.md +++ b/zh-cn/application-dev/reference/native-lib/third_party_napi/napi.md @@ -137,3 +137,13 @@ OpenHarmony的N-API组件对Node-API的接口进行了重新实现,底层对 |FUNC|napi_get_value_bigint_int64|获取给定js `BigInt`对应的C int64值。| |FUNC|napi_get_value_bigint_uint64|获取给定js `BigInt`对应的C uint64值。| |FUNC|napi_get_value_bigint_words|获取给定js `BigInt`对应的信息,包括符号位、64位小端序数组和数组中的元素个数。| +|FUNC|napi_create_buffer|创建并获取一个指定大小的js `Buffer`。| +|FUNC|napi_create_buffer_copy|创建并获取一个指定大小的js `Buffer`,并以给定数据进行初始化。| +|FUNC|napi_create_external_buffer|创建并获取一个指定大小的js `Buffer`,并以给定数据进行初始化,该接口可为`Buffer`附带额外数据。| +|FUNC|napi_get_buffer_info|获取js `Buffer`底层data及其长度。| +|FUNC|napi_is_buffer|判断给定js value是否为`Buffer`对象。| +|FUNC|napi_object_freeze|冻结给定的对象。| +|FUNC|napi_object_seal|密封给定的对象。| +|FUNC|napi_get_all_property_names|获取一个数组,其中包含此对象过滤后的属性名称。| +|FUNC|napi_detach_arraybuffer|分离给定`ArrayBuffer`的底层数据。| +|FUNC|napi_is_detached_arraybuffe|判断给定的`ArrayBuffer`是否已被分离过。| diff --git a/zh-cn/application-dev/security/huks-appendix.md b/zh-cn/application-dev/security/huks-appendix.md index 26c07191fac5afc75088bf879d6bd65eb83907c9..28df66618dbd9ba2bb53558f7ea014a2216b2d71 100644 --- a/zh-cn/application-dev/security/huks-appendix.md +++ b/zh-cn/application-dev/security/huks-appendix.md @@ -94,7 +94,7 @@ 以RSA密钥为例,应用需要申请一个Uint8Array,按照RSA密钥对材料内存格式,将各个变量赋值到对应的位置: -**图4** RSA密钥材料内存结构 +**图1** RSA密钥材料内存结构 ![huks_keymaterial_struct](figures/huks_keymaterial_struct.png) diff --git a/zh-cn/application-dev/task-management/background-task-overview.md b/zh-cn/application-dev/task-management/background-task-overview.md index a77cb0c2f1925f2008a72a868fb1a0f09f882512..4eefd27e3e836c51a38fd8a4deb696d9d0f4d889 100644 --- a/zh-cn/application-dev/task-management/background-task-overview.md +++ b/zh-cn/application-dev/task-management/background-task-overview.md @@ -29,6 +29,7 @@ OpenHarmony将后台任务分为四种类型,并提供了一个资源申请的 退到后台的应用有不可中断且短时间能完成的任务时,可以使用短时任务机制。该机制允许应用在后台短时间内完成任务,保障应用业务运行不受后台生命周期管理的影响。 > **说明:** +> > 短时任务仅针对应用的临时任务提供资源使用生命周期保障,限制单次最大使用时长为3分钟,全天使用配额默认为10分钟(具体时长系统根据应用场景和系统状态智能调整)。 @@ -45,9 +46,11 @@ OpenHarmony将后台任务分为四种类型,并提供了一个资源申请的 - **配额机制**:为了防止应用滥用保活,或者申请后不取消,每个应用每天都会有一定配额(会根据用户的使用习惯动态调整),其中单日配额默认为10分钟,单次配额最大为3分钟。配额消耗完就不再允许申请短时任务,所以应用完成短时任务后应立刻取消延迟挂起,避免消耗配额。(注:该配额指的是申请的时长,系统默认应用在后台运行的时间不计算在内)。 ## 长时任务 + 长时任务给用户能够直观感受到的且需要一直在后台运行的业务提供后台运行生命周期的保障。比如:业务需要在后台播放声音、需要在后台持续导航定位等。此类用户可以直观感知到的后台业务行为,可以通过使用长时任务对应的后台模式保障业务在后台的运行,支撑应用完成在后台的业务。 ### 后台模式分类 + OpenHarmony提供了九种后台模式,供需要在后台做长时任务的业务使用,具体的后台模式类型如下: **表1** 长时任务种类 @@ -65,6 +68,7 @@ OpenHarmony提供了九种后台模式,供需要在后台做长时任务的业 | taskKeeping | 计算任务 | 正在运行计算任务 | 仅在特定设备生效 | ### 长时任务使用约束 + - 如果用户选择可感知业务(如播音、导航等),触发对应后台模式,在任务启动时,系统会强制弹出通知提醒用户。 - 如果任务结束,应用应主动退出后台模式。若在后台运行期间,系统检测到应用并未使用对应后台模式的资源,则会被挂起(Suspend)。 - 避免不合理地申请后台长时任务,长时任务类型要与应用的业务类型匹配。如果执行的任务和申请的类型不匹配,也会被系统检测到并被挂起(Suspend)。 @@ -72,6 +76,7 @@ OpenHarmony提供了九种后台模式,供需要在后台做长时任务的业 - 一个Ability同一时刻只能申请运行一个长时任务。如果同一时刻需要申请多个长时任务,需要创建多个Ability,每个Ability申请一个长时任务。 ## 延迟任务 + 延迟任务调度给应用提供一个机制,允许应用根据系统安排,在系统空闲时执行实时性要求不高的任务,比如设备空闲时候做一次数据学习等场景。当应用申请延迟任务的时候,任务会被放入待调度队列,系统会根据当前状态,如内存、功耗、温度等统一决策最优的调度时机。同时支持任务的持久化,应用退出或者设备重启,设置的任务同样能够被触发。 ### 延迟任务调度约束 @@ -102,16 +107,18 @@ OpenHarmony提供了九种后台模式,供需要在后台做长时任务的业 - 携带参数信息支持number、string、bool三种类型。 ## 申请能效资源 + 供系统应用使用的能效资源可以分为两类:软件资源(WORK_SCHEDULER, COMMON_EVENT, TIMER),硬件资源(CPU, GPS, BLUETOOTH, AUDIO)。 应用申请不同的能效资源后可以执行相应的操作: * 申请CPU资源后可以不被挂起,直到任务完成。 * 申请WORK_SCHEDULER资源后不受延迟任务执行频率约束,且任务执行时间增加。 - * 申请COMMON_EVENT资源后,应用在后台处于挂起状态时,仍然能够接收到系统公共事件,申请TIMER资源后,应用能够使用定时器执行精确定时任务。 + * 申请COMMON_EVENT资源后,应用在后台处于挂起状态时,仍然能够接收到系统公共事件。 + * 申请TIMER资源后,应用能够使用定时器执行精确定时任务。 * 申请资源(GPS, BLUETOOTH, AUDIO)后,应用在后台被挂起后,依然能够被管理相关硬件的服务唤醒,执行相应的任务。 -**表1** 能效资源种类 +**表2** 能效资源种类 | 参数名 | 参数值 | 描述 | | -------------- | ---- | ------------------- | @@ -124,6 +131,7 @@ OpenHarmony提供了九种后台模式,供需要在后台做长时任务的业 | AUDIO | 64 | 音频资源,申请后挂起状态下不被代理掉 | ### 能效资源使用约束 + - 能效资源申请或者释放可以由进程或者应用发起,由应用发起的资源释放会释放属于它的同类型的所有资源,包括进程申请的资源。例如应用申请了CPU资源,进程申请了CPU和WORK_SCHEDULER资源,当应用释放CPU资源的时候,会将进程的CPU资源一同释放,同时不同类型的WORK_SCHEDULER资源不受影响。由进程发起的资源释放对应用申请的资源没有影响,例如当应用和进程同时申请了CPU,进程发起了CPU资源释放,应用的CPU资源不会被释放。 - 同时申请同一类持久资源和非持久资源,持久资源会覆盖非持久资源,在超时时不会释放资源。例如应用首先申请了10s的CPU资源,然后在第5s的时候申请了持久的CPU资源,那么资源会变成持久的,非持久的CPU资源记录会被持久化的CPU资源记录覆盖,到了第10s的时候资源不会被释放,如果在第8s的时候提前释放了资源,那么会将CPU资源释放,无法单独释放其中非持久的或者持久的CPU资源。 - WORK_SCHEDULER资源只能由应用申请和释放,不能由进程申请和释放。 diff --git a/zh-cn/application-dev/tools/packing-tool.md b/zh-cn/application-dev/tools/packing-tool.md index d5e09bee7e33899f2707c13cc8956a69f448c7d8..4801c438d95e56eef275fbaa5373158271b566f2 100644 --- a/zh-cn/application-dev/tools/packing-tool.md +++ b/zh-cn/application-dev/tools/packing-tool.md @@ -15,7 +15,7 @@ ``` -java -jar app_packing_tool.jar --mode hap --json-path