提交 389187f4 编写于 作者: G Gloria

Updated APIs against multiple PRs and corrected link errors

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 7cc2d293
...@@ -56,20 +56,20 @@ Users often need to share data (such as a text or an image) from one application ...@@ -56,20 +56,20 @@ Users often need to share data (such as a text or an image) from one application
} }
} }
} }
``` ```
In the preceding code, the custom field **parameters** is used. The **ability.picker.\*** fields in the first-layer **parameters** are used to pass the information to be displayed on the application selector. The following fields are involved: In the preceding code, the custom field **parameters** is used. The **ability.picker.\*** fields in the first-layer **parameters** are used to pass the information to be displayed on the application selector. The following fields are involved:
- **"ability.picker.type"**: The application selector renders the file type icon based on this field. - **"ability.picker.type"**: The application selector renders the file type icon based on this field.
- **"ability.picker.fileNames"**: The application selector displays the file name based on this field. - **"ability.picker.fileNames"**: The application selector displays the file name based on this field.
- **"ability.picker.fileSizes"**: The application selector displays the file size based on this field. The unit is byte. - **"ability.picker.fileSizes"**: The application selector displays the file size based on this field. The unit is byte.
- **"ability.picker.fileNames"** and **"ability.picker.fileSizes"** are arrays and have a one-to-one mapping. - **"ability.picker.fileNames"** and **"ability.picker.fileSizes"** are arrays and have a one-to-one mapping.
For example, when **"ability.picker.type"** is **"application/pdf"**, **"ability.picker.fileNames"** is **"["APIs.pdf"]"**, and **"ability.picker.fileSizes"** is **"[350 \* 1024]"**, the application selector is displayed as follows: For example, when **"ability.picker.type"** is **"application/pdf"**, **"ability.picker.fileNames"** is **"["APIs.pdf"]"**, and **"ability.picker.fileSizes"** is **"[350 \* 1024]"**, the application selector is displayed as follows:
<img src="figures/stage-want2.png" alt="stage-want2" style="zoom:50%;" /> <img src="figures/stage-want2.png" alt="stage-want2" style="zoom:50%;" />
In the preceding code, the **ability.want.params.INTENT** field is nested Want. In this field, **action** and **type** are used for implicit matching by the application selector. For details about implicit matching, see [Implicit Want Matching Rules](explicit-implicit-want-mappings.md#interpretation-of-implicit-want-matching-rules). After the user selects an application, the nested Want of the **ability.want.params.INTENT** field is passed to that application. In the preceding code, the **ability.want.params.INTENT** field is nested Want. In this field, **action** and **type** are used for implicit matching by the application selector. For details about implicit matching, see [Matching Rules of Implicit Want](explicit-implicit-want-mappings.md#matching-rules-of-implicit-want). After the user selects an application, the nested Want of the **ability.want.params.INTENT** field is passed to that application.
- Shared party - Shared party
1. As mentioned above, the application selector performs implicit matching based on the **ability.want.params.INTENT** field. Therefore, you must set **skills** in the ability configuration file (**module.json5** file in the stage model) of the shared party as follows: 1. As mentioned above, the application selector performs implicit matching based on the **ability.want.params.INTENT** field. Therefore, you must set **skills** in the ability configuration file (**module.json5** file in the stage model) of the shared party as follows:
......
...@@ -33,4 +33,4 @@ To enable an ability to be called by any application, configure the **config.jso ...@@ -33,4 +33,4 @@ To enable an ability to be called by any application, configure the **config.jso
``` ```
If the ability contains **skills**, you are advised to set **visible** to **true** so that the ability can be [implicitly started](explicit-implicit-want-mappings.md#interpretation-of-implicit-want-matching-rules) by other applications. If this attribute is set to **false**, the system returns **PERMISSION_DENIED** when other applications attempt to start the ability. In this case, a system application can request the [START_INVISIBLE_ABILITY](../security/permission-list.md) permission to start the ability. Example abilities with **visible** set to **false** are home screen, voice assistant, or search assistant. If the ability contains **skills**, you are advised to set **visible** to **true** so that the ability can be [implicitly started](explicit-implicit-want-mappings.md#matching-rules-of-implicit-want) by other applications. If this attribute is set to **false**, the system returns **PERMISSION_DENIED** when other applications attempt to start the ability. In this case, a system application can request the [START_INVISIBLE_ABILITY](../security/permission-list.md) permission to start the ability. Example abilities with **visible** set to **false** are home screen, voice assistant, or search assistant.
# @ohos.enterprise.EnterpriseAdminExtensionAbility # @ohos.enterprise.EnterpriseAdminExtensionAbility (EnterpriseAdminExtensionAbility)
The **EnterpriseAdminExtensionAbility** module provides Extension abilities for enterprise administrators. The **EnterpriseAdminExtensionAbility** module provides Extension abilities for enterprise administrators.
......
# Work Scheduler Callbacks # @ohos.WorkSchedulerExtensionAbility (Work Scheduler Callbacks)
The **WorkSchedulerExtensionAbility** module provides callbacks for Work Scheduler tasks. The **WorkSchedulerExtensionAbility** module provides callbacks for Work Scheduler tasks.
......
...@@ -22,8 +22,8 @@ import Want from '@ohos.app.ability.Want'; ...@@ -22,8 +22,8 @@ import Want from '@ohos.app.ability.Want';
| bundleName | string | No | Bundle name of the ability.| | bundleName | string | No | Bundle name of the ability.|
| moduleName | string | No| Name of the module to which the ability belongs.| | moduleName | string | No| Name of the module to which the ability belongs.|
| abilityName | string | No | Name of the ability. If both **bundleName** and **abilityName** are specified in a **Want** object, the **Want** object can match a specific ability. The value of **abilityName** must be unique in an application.| | abilityName | string | No | Name of the ability. If both **bundleName** and **abilityName** are specified in a **Want** object, the **Want** object can match a specific ability. The value of **abilityName** must be unique in an application.|
| [action](js-apis-app-ability-wantConstant.md#wantConstant.Action) | string | No | Action to take, such as viewing and sharing application details. In implicit Want, you can define this field and use it together with **uri** or **parameters** to specify the operation to be performed on the data. For details about the definition and matching rules of implicit Want, see [Matching Rules of Explicit Want and Implicit Want](application-models/explicit-implicit-want-mappings.md). | | [action](js-apis-app-ability-wantConstant.md#wantconstantaction) | string | No | Action to take, such as viewing and sharing application details. In implicit Want, you can define this field and use it together with **uri** or **parameters** to specify the operation to be performed on the data. For details about the definition and matching rules of implicit Want, see [Matching Rules of Explicit Want and Implicit Want](../../application-models/explicit-implicit-want-mappings.md). |
| [entities](js-apis-app-ability-wantConstant.md#wantConstant.Entity) | Array\<string> | No| Additional category information (such as browser and video player) of the ability. It is a supplement to the **action** field for implicit Want. and is used to filter ability types.| | [entities](js-apis-app-ability-wantConstant.md#wantconstantentity) | Array\<string> | No| Additional category information (such as browser and video player) of the ability. It is a supplement to the **action** field for implicit Want. and is used to filter ability types.|
| uri | string | No| Data carried. This field is used together with **type** to specify the data type. If **uri** is specified in a Want, the Want will match the specified URI information, including **scheme**, **schemeSpecificPart**, **authority**, and **path**.| | uri | string | No| Data carried. This field is used together with **type** to specify the data type. If **uri** is specified in a Want, the Want will match the specified URI information, including **scheme**, **schemeSpecificPart**, **authority**, and **path**.|
| type | string | No| MIME type, that is, the type of the file to open, for example, **text/xml** and **image/***. For details about the MIME type definition, see https://www.iana.org/assignments/media-types/media-types.xhtml?utm_source=ld246.com.| | type | string | No| MIME type, that is, the type of the file to open, for example, **text/xml** and **image/***. For details about the MIME type definition, see https://www.iana.org/assignments/media-types/media-types.xhtml?utm_source=ld246.com.|
| parameters | {[key: string]: any} | No | Want parameters in the form of custom key-value (KV) pairs. By default, the following keys are carried:<br>- **ohos.aafwk.callerPid**: PID of the caller.<br>- **ohos.aafwk.param.callerToken**: token of the caller.<br>- **ohos.aafwk.param.callerUid**: UID in [BundleInfo](js-apis-bundleManager-bundleInfo.md#bundleinfo-1), that is, the application UID in the bundle information. | | parameters | {[key: string]: any} | No | Want parameters in the form of custom key-value (KV) pairs. By default, the following keys are carried:<br>- **ohos.aafwk.callerPid**: PID of the caller.<br>- **ohos.aafwk.param.callerToken**: token of the caller.<br>- **ohos.aafwk.param.callerUid**: UID in [BundleInfo](js-apis-bundleManager-bundleInfo.md#bundleinfo-1), that is, the application UID in the bundle information. |
...@@ -133,4 +133,4 @@ import Want from '@ohos.app.ability.Want'; ...@@ -133,4 +133,4 @@ import Want from '@ohos.app.ability.Want';
- For more details and examples, see [Want](../../application-models/want-overview.md). - For more details and examples, see [Want](../../application-models/want-overview.md).
<!--no_check-->
...@@ -41,8 +41,8 @@ Creates a media session. This API uses a promise to return the result. An abilit ...@@ -41,8 +41,8 @@ Creates a media session. This API uses a promise to return the result. An abilit
| --------------------------------- | ------------------------------------------------------------ | | --------------------------------- | ------------------------------------------------------------ |
| Promise<[AVSession](#avsession)\> | Promise used to return the media session obtained, which can be used to obtain the session ID, set the metadata and playback state information, and send key events.| | Promise<[AVSession](#avsession)\> | Promise used to return the media session obtained, which can be used to obtain the session ID, set the metadata and playback state information, and send key events.|
**Error codes**
**Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -84,7 +84,6 @@ Creates a media session. This API uses an asynchronous callback to return the re ...@@ -84,7 +84,6 @@ Creates a media session. This API uses an asynchronous callback to return the re
| callback | AsyncCallback<[AVSession](#avsession)\> | Yes | Callback used to return the media session obtained, which can be used to obtain the session ID, set the metadata and playback state information, and send key events.| | callback | AsyncCallback<[AVSession](#avsession)\> | Yes | Callback used to return the media session obtained, which can be used to obtain the session ID, set the metadata and playback state information, and send key events.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -129,7 +128,6 @@ Obtains the descriptors of all sessions. This API uses a promise to return the r ...@@ -129,7 +128,6 @@ Obtains the descriptors of all sessions. This API uses a promise to return the r
| Promise\<Array\<Readonly\<[AVSessionDescriptor](#avsessiondescriptor)\>\>\> | Promise used to return an array of **AVSessionDescriptor** objects, each of which is read only.| | Promise\<Array\<Readonly\<[AVSessionDescriptor](#avsessiondescriptor)\>\>\> | Promise used to return an array of **AVSessionDescriptor** objects, each of which is read only.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -170,7 +168,6 @@ Obtains the descriptors of all sessions. This API uses an asynchronous callback ...@@ -170,7 +168,6 @@ Obtains the descriptors of all sessions. This API uses an asynchronous callback
| callback | AsyncCallback<Array<Readonly<[AVSessionDescriptor](#avsessiondescriptor)\>\>\> | Yes | Callback used to return an array of **AVSessionDescriptor** objects, each of which is read only.| | callback | AsyncCallback<Array<Readonly<[AVSessionDescriptor](#avsessiondescriptor)\>\>\> | Yes | Callback used to return an array of **AVSessionDescriptor** objects, each of which is read only.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -219,7 +216,6 @@ Creates a session controller based on the session ID. Multiple session controlle ...@@ -219,7 +216,6 @@ Creates a session controller based on the session ID. Multiple session controlle
| Promise<[AVSessionController](#avsessioncontroller)\> | Promise used to return the session controller created, which can be used to obtain the session ID,<br>send commands and events to sessions, and obtain metadata and playback state information.| | Promise<[AVSessionController](#avsessioncontroller)\> | Promise used to return the session controller created, which can be used to obtain the session ID,<br>send commands and events to sessions, and obtain metadata and playback state information.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -272,7 +268,6 @@ Creates a session controller based on the session ID. Multiple session controlle ...@@ -272,7 +268,6 @@ Creates a session controller based on the session ID. Multiple session controlle
| callback | AsyncCallback<[AVSessionController](#avsessioncontroller)\> | Yes | Callback used to return the session controller created, which can be used to obtain the session ID,<br>send commands and events to sessions, and obtain metadata and playback state information.| | callback | AsyncCallback<[AVSessionController](#avsessioncontroller)\> | Yes | Callback used to return the session controller created, which can be used to obtain the session ID,<br>send commands and events to sessions, and obtain metadata and playback state information.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -335,7 +330,6 @@ Before calling this API, import the **ohos.multimedia.audio** module to obtain t ...@@ -335,7 +330,6 @@ Before calling this API, import the **ohos.multimedia.audio** module to obtain t
| Promise<void\> | Promise used to return the result. If the cast is successful, no value is returned; otherwise, an error object is returned.| | Promise<void\> | Promise used to return the result. If the cast is successful, no value is returned; otherwise, an error object is returned.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -388,7 +382,6 @@ Before calling this API, import the **ohos.multimedia.audio** module to obtain t ...@@ -388,7 +382,6 @@ Before calling this API, import the **ohos.multimedia.audio** module to obtain t
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the casting is successful, **err** is **undefined**; otherwise, **err** is an error object. | | callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the casting is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -440,7 +433,6 @@ Subscribes to session creation, session destruction, and top session change even ...@@ -440,7 +433,6 @@ Subscribes to session creation, session destruction, and top session change even
| callback | (session: [AVSessionDescriptor](#avsessiondescriptor)) => void | Yes | Callback used to report the session descriptor. | | callback | (session: [AVSessionDescriptor](#avsessiondescriptor)) => void | Yes | Callback used to report the session descriptor. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -489,7 +481,6 @@ Unsubscribes from session creation, session destruction, and top session change ...@@ -489,7 +481,6 @@ Unsubscribes from session creation, session destruction, and top session change
| callback | (session: [AVSessionDescriptor](#avsessiondescriptor)) => void | No | Callback used for unsubscription. If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The **session** parameter in the callback describes a media session. The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. | | callback | (session: [AVSessionDescriptor](#avsessiondescriptor)) => void | No | Callback used for unsubscription. If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The **session** parameter in the callback describes a media session. The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -520,7 +511,6 @@ Subscribes to session service death events. ...@@ -520,7 +511,6 @@ Subscribes to session service death events.
| callback | callback: () => void | Yes | Callback used for subscription. If the subscription is successful, **err** is **undefined**; otherwise, **err** is an error object. | | callback | callback: () => void | Yes | Callback used for subscription. If the subscription is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -551,7 +541,6 @@ Unsubscribes from session service death events. ...@@ -551,7 +541,6 @@ Unsubscribes from session service death events.
| callback | callback: () => void | No | Callback used for unsubscription. If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. | | callback | callback: () => void | No | Callback used for unsubscription. If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -589,7 +578,6 @@ Sends a system key event to the top session. This API uses a promise to return t ...@@ -589,7 +578,6 @@ Sends a system key event to the top session. This API uses a promise to return t
| Promise<void\> | Promise used to return the result. If the event is sent, no value is returned; otherwise, an error object is returned.| | Promise<void\> | Promise used to return the result. If the event is sent, no value is returned; otherwise, an error object is returned.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -632,7 +620,6 @@ Sends a system key event to the top session. This API uses an asynchronous callb ...@@ -632,7 +620,6 @@ Sends a system key event to the top session. This API uses an asynchronous callb
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the event is sent, **err** is **undefined**; otherwise, **err** is an error object.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the event is sent, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -680,7 +667,6 @@ Sends a system control command to the top session. This API uses a promise to re ...@@ -680,7 +667,6 @@ Sends a system control command to the top session. This API uses a promise to re
| Promise<void\> | Promise used to return the result. If the command is sent, no value is returned; otherwise, an error object is returned.| | Promise<void\> | Promise used to return the result. If the command is sent, no value is returned; otherwise, an error object is returned.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -735,7 +721,6 @@ Sends a system control command to the top session. This API uses an asynchronous ...@@ -735,7 +721,6 @@ Sends a system control command to the top session. This API uses an asynchronous
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the command is sent, **err** is **undefined**; otherwise, **err** is an error object.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the command is sent, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -812,7 +797,6 @@ Sets session metadata. This API uses a promise to return the result. ...@@ -812,7 +797,6 @@ Sets session metadata. This API uses a promise to return the result.
| Promise<void\> | Promise used to return the result. If the setting is successful, no value is returned; otherwise, an error object is returned.| | Promise<void\> | Promise used to return the result. If the setting is successful, no value is returned; otherwise, an error object is returned.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -862,7 +846,6 @@ Sets session metadata. This API uses an asynchronous callback to return the resu ...@@ -862,7 +846,6 @@ Sets session metadata. This API uses an asynchronous callback to return the resu
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the setting is successful, **err** is **undefined**; otherwise, **err** is an error object.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the setting is successful, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -919,7 +902,6 @@ Sets information related to the session playback state. This API uses a promise ...@@ -919,7 +902,6 @@ Sets information related to the session playback state. This API uses a promise
| Promise<void\> | Promise used to return the result. If the setting is successful, no value is returned; otherwise, an error object is returned.| | Promise<void\> | Promise used to return the result. If the setting is successful, no value is returned; otherwise, an error object is returned.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -961,7 +943,6 @@ Sets information related to the session playback state. This API uses an asynchr ...@@ -961,7 +943,6 @@ Sets information related to the session playback state. This API uses an asynchr
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the setting is successful, **err** is **undefined**; otherwise, **err** is an error object. | | callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the setting is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1010,7 +991,6 @@ Sets a launcher ability. This API uses a promise to return the result. ...@@ -1010,7 +991,6 @@ Sets a launcher ability. This API uses a promise to return the result.
| Promise<void\> | Promise used to return the result. If the setting is successful, no value is returned; otherwise, an error object is returned.| | Promise<void\> | Promise used to return the result. If the setting is successful, no value is returned; otherwise, an error object is returned.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1028,8 +1008,8 @@ let wantAgentInfo = { ...@@ -1028,8 +1008,8 @@ let wantAgentInfo = {
wants: [ wants: [
{ {
deviceId: "deviceId", deviceId: "deviceId",
bundleName: "com.neu.setResultOnAbilityResultTest1", bundleName: "com.example.myapplication",
abilityName: "com.example.test.MainAbility", abilityName: "EntryAbility",
action: "action1", action: "action1",
entities: ["entity1"], entities: ["entity1"],
type: "MIMETYPE", type: "MIMETYPE",
...@@ -1076,7 +1056,6 @@ Sets a launcher ability. This API uses an asynchronous callback to return the re ...@@ -1076,7 +1056,6 @@ Sets a launcher ability. This API uses an asynchronous callback to return the re
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the setting is successful, **err** is **undefined**; otherwise, **err** is an error object.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the setting is successful, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1094,8 +1073,8 @@ let wantAgentInfo = { ...@@ -1094,8 +1073,8 @@ let wantAgentInfo = {
wants: [ wants: [
{ {
deviceId: "deviceId", deviceId: "deviceId",
bundleName: "com.neu.setResultOnAbilityResultTest1", bundleName: "com.example.myapplication",
abilityName: "com.example.test.MainAbility", abilityName: "EntryAbility",
action: "action1", action: "action1",
entities: ["entity1"], entities: ["entity1"],
type: "MIMETYPE", type: "MIMETYPE",
...@@ -1143,7 +1122,6 @@ Obtains the controller corresponding to this session. This API uses a promise to ...@@ -1143,7 +1122,6 @@ Obtains the controller corresponding to this session. This API uses a promise to
| Promise<[AVSessionController](#avsessioncontroller)> | Promise used to return the session controller.| | Promise<[AVSessionController](#avsessioncontroller)> | Promise used to return the session controller.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1178,7 +1156,6 @@ Obtains the controller corresponding to this session. This API uses an asynchron ...@@ -1178,7 +1156,6 @@ Obtains the controller corresponding to this session. This API uses an asynchron
| callback | AsyncCallback<[AVSessionController](#avsessioncontroller)\> | Yes | Callback used to return the session controller.| | callback | AsyncCallback<[AVSessionController](#avsessioncontroller)\> | Yes | Callback used to return the session controller.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1215,7 +1192,6 @@ Obtains information about the output device for this session. This API uses a pr ...@@ -1215,7 +1192,6 @@ Obtains information about the output device for this session. This API uses a pr
| Promise<[OutputDeviceInfo](#outputdeviceinfo)> | Promise used to return the output device information.| | Promise<[OutputDeviceInfo](#outputdeviceinfo)> | Promise used to return the output device information.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1248,7 +1224,6 @@ Obtains information about the output device for this session. This API uses an a ...@@ -1248,7 +1224,6 @@ Obtains information about the output device for this session. This API uses an a
| callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo)\> | Yes | Callback used to return the information obtained.| | callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo)\> | Yes | Callback used to return the information obtained.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1283,7 +1258,6 @@ Activates this session. A session can be used only after being activated. This A ...@@ -1283,7 +1258,6 @@ Activates this session. A session can be used only after being activated. This A
| Promise<void\> | Promise used to return the result. If the session is activated, no value is returned; otherwise, an error object is returned.| | Promise<void\> | Promise used to return the result. If the session is activated, no value is returned; otherwise, an error object is returned.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1316,7 +1290,6 @@ Activates this session. A session can be used only after being activated. This A ...@@ -1316,7 +1290,6 @@ Activates this session. A session can be used only after being activated. This A
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the session is activated, **err** is **undefined**; otherwise, **err** is an error object.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the session is activated, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1351,7 +1324,6 @@ Deactivates this session. You can use [activate](#activate) to activate the sess ...@@ -1351,7 +1324,6 @@ Deactivates this session. You can use [activate](#activate) to activate the sess
| Promise<void\> | Promise used to return the result. If the session is deactivated, no value is returned; otherwise, an error object is returned.| | Promise<void\> | Promise used to return the result. If the session is deactivated, no value is returned; otherwise, an error object is returned.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1386,7 +1358,6 @@ Deactivates this session. You can use [activate](#activate) to activate the sess ...@@ -1386,7 +1358,6 @@ Deactivates this session. You can use [activate](#activate) to activate the sess
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the session is deactivated, **err** is **undefined**; otherwise, **err** is an error object.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the session is deactivated, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1421,7 +1392,6 @@ Destroys this session. This API uses a promise to return the result. ...@@ -1421,7 +1392,6 @@ Destroys this session. This API uses a promise to return the result.
| Promise<void\> | Promise used to return the result. If the session is destroyed, no value is returned; otherwise, an error object is returned.| | Promise<void\> | Promise used to return the result. If the session is destroyed, no value is returned; otherwise, an error object is returned.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1455,7 +1425,6 @@ Destroys this session. This API uses an asynchronous callback to return the resu ...@@ -1455,7 +1425,6 @@ Destroys this session. This API uses an asynchronous callback to return the resu
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the session is destroyed, **err** is **undefined**; otherwise, **err** is an error object.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the session is destroyed, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1491,7 +1460,6 @@ Subscribes to playback command events. ...@@ -1491,7 +1460,6 @@ Subscribes to playback command events.
| callback | callback: () => void | Yes | Callback used for subscription. If the subscription is successful, **err** is **undefined**; otherwise, **err** is an error object. | | callback | callback: () => void | Yes | Callback used for subscription. If the subscription is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1541,7 +1509,6 @@ Subscribes to the seek event. ...@@ -1541,7 +1509,6 @@ Subscribes to the seek event.
| callback | (time: number) => void | Yes | Callback used for subscription. The **time** parameter in the callback indicates the time to seek to, in milliseconds. | | callback | (time: number) => void | Yes | Callback used for subscription. The **time** parameter in the callback indicates the time to seek to, in milliseconds. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1573,7 +1540,6 @@ Subscribes to the event for setting the playback speed. ...@@ -1573,7 +1540,6 @@ Subscribes to the event for setting the playback speed.
| callback | (speed: number) => void | Yes | Callback used for subscription. The **speed** parameter in the callback indicates the playback speed. | | callback | (speed: number) => void | Yes | Callback used for subscription. The **speed** parameter in the callback indicates the playback speed. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1605,7 +1571,6 @@ Subscribes to the event for setting the loop mode. ...@@ -1605,7 +1571,6 @@ Subscribes to the event for setting the loop mode.
| callback | (mode: [LoopMode](#loopmode)) => void | Yes | Callback used for subscription. The **mode** parameter in the callback indicates the loop mode. | | callback | (mode: [LoopMode](#loopmode)) => void | Yes | Callback used for subscription. The **mode** parameter in the callback indicates the loop mode. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1637,7 +1602,6 @@ Subscribes to the event for favoriting a media asset. ...@@ -1637,7 +1602,6 @@ Subscribes to the event for favoriting a media asset.
| callback | (assetId: string) => void | Yes | Callback used for subscription. The **assetId** parameter in the callback indicates the media asset ID. | | callback | (assetId: string) => void | Yes | Callback used for subscription. The **assetId** parameter in the callback indicates the media asset ID. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1669,7 +1633,6 @@ Subscribes to the key event. ...@@ -1669,7 +1633,6 @@ Subscribes to the key event.
| callback | (event: [KeyEvent](js-apis-keyevent.md)) => void | Yes | Callback used for subscription. The **event** parameter in the callback indicates the key event. | | callback | (event: [KeyEvent](js-apis-keyevent.md)) => void | Yes | Callback used for subscription. The **event** parameter in the callback indicates the key event. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1701,7 +1664,6 @@ Subscribes to output device changes. ...@@ -1701,7 +1664,6 @@ Subscribes to output device changes.
| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | Yes | Callback used for subscription. The **device** parameter in the callback indicates the output device information. | | callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | Yes | Callback used for subscription. The **device** parameter in the callback indicates the output device information. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1733,7 +1695,6 @@ Unsubscribes from playback command events. ...@@ -1733,7 +1695,6 @@ Unsubscribes from playback command events.
| callback | callback: () => void | No | Callback used for unsubscription. If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. | | callback | callback: () => void | No | Callback used for unsubscription. If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1769,7 +1730,6 @@ Unsubscribes from the seek event. ...@@ -1769,7 +1730,6 @@ Unsubscribes from the seek event.
| callback | (time: number) => void | No | Callback used for unsubscription. The **time** parameter in the callback indicates the time to seek to, in milliseconds.<br>If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. | | callback | (time: number) => void | No | Callback used for unsubscription. The **time** parameter in the callback indicates the time to seek to, in milliseconds.<br>If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1799,7 +1759,6 @@ Unsubscribes from the event for setting the playback speed. ...@@ -1799,7 +1759,6 @@ Unsubscribes from the event for setting the playback speed.
| callback | (speed: number) => void | No | Callback used for unsubscription. The **speed** parameter in the callback indicates the playback speed.<br>If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. | | callback | (speed: number) => void | No | Callback used for unsubscription. The **speed** parameter in the callback indicates the playback speed.<br>If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1829,7 +1788,6 @@ Unsubscribes from the event for setting loop mode. ...@@ -1829,7 +1788,6 @@ Unsubscribes from the event for setting loop mode.
| callback | (mode: [LoopMode](#loopmode)) => void | No | Callback used for unsubscription. The **mode** parameter in the callback indicates the loop mode.<br>If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions.| | callback | (mode: [LoopMode](#loopmode)) => void | No | Callback used for unsubscription. The **mode** parameter in the callback indicates the loop mode.<br>If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1859,7 +1817,6 @@ Unsubscribes from the event for favoriting a media asset. ...@@ -1859,7 +1817,6 @@ Unsubscribes from the event for favoriting a media asset.
| callback | (assetId: string) => void | No | Callback used for unsubscription. The **assetId** parameter in the callback indicates the media asset ID.<br>If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. | | callback | (assetId: string) => void | No | Callback used for unsubscription. The **assetId** parameter in the callback indicates the media asset ID.<br>If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1889,7 +1846,6 @@ Unsubscribes from the key event. ...@@ -1889,7 +1846,6 @@ Unsubscribes from the key event.
| callback | (event: [KeyEvent](js-apis-keyevent.md)) => void | No | Callback used for unsubscription. The **event** parameter in the callback indicates the key event.<br>If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. | | callback | (event: [KeyEvent](js-apis-keyevent.md)) => void | No | Callback used for unsubscription. The **event** parameter in the callback indicates the key event.<br>If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1919,7 +1875,6 @@ Unsubscribes from playback device changes. ...@@ -1919,7 +1875,6 @@ Unsubscribes from playback device changes.
| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | No | Callback used for unsubscription. The **device** parameter in the callback indicates the output device information.<br>If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. | | callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | No | Callback used for unsubscription. The **device** parameter in the callback indicates the output device information.<br>If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -1974,7 +1929,6 @@ Obtains the information related to the playback state. This API uses a promise t ...@@ -1974,7 +1929,6 @@ Obtains the information related to the playback state. This API uses a promise t
| Promise<[AVPlaybackState](#avplaybackstate)\> | Promise used to return the **AVPlaybackState** object.| | Promise<[AVPlaybackState](#avplaybackstate)\> | Promise used to return the **AVPlaybackState** object.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2007,7 +1961,6 @@ Obtains the information related to the playback state. This API uses an asynchro ...@@ -2007,7 +1961,6 @@ Obtains the information related to the playback state. This API uses an asynchro
| callback | AsyncCallback<[AVPlaybackState](#avplaybackstate)\> | Yes | Callback used to return the **AVPlaybackState** object.| | callback | AsyncCallback<[AVPlaybackState](#avplaybackstate)\> | Yes | Callback used to return the **AVPlaybackState** object.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2042,7 +1995,6 @@ Obtains the session metadata. This API uses a promise to return the result. ...@@ -2042,7 +1995,6 @@ Obtains the session metadata. This API uses a promise to return the result.
| Promise<[AVMetadata](#avmetadata)\> | Promise used to return the metadata obtained.| | Promise<[AVMetadata](#avmetadata)\> | Promise used to return the metadata obtained.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2075,7 +2027,6 @@ Obtains the session metadata. This API uses an asynchronous callback to return t ...@@ -2075,7 +2027,6 @@ Obtains the session metadata. This API uses an asynchronous callback to return t
| callback | AsyncCallback<[AVMetadata](#avmetadata)\> | Yes | Callback used to return the metadata obtained.| | callback | AsyncCallback<[AVMetadata](#avmetadata)\> | Yes | Callback used to return the metadata obtained.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2110,7 +2061,6 @@ Obtains the output device information. This API uses a promise to return the res ...@@ -2110,7 +2061,6 @@ Obtains the output device information. This API uses a promise to return the res
| Promise<[OutputDeviceInfo](#outputdeviceinfo)\> | Promise used to return the information obtained.| | Promise<[OutputDeviceInfo](#outputdeviceinfo)\> | Promise used to return the information obtained.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2142,7 +2092,6 @@ Obtains the output device information. This API uses an asynchronous callback to ...@@ -2142,7 +2092,6 @@ Obtains the output device information. This API uses an asynchronous callback to
| callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo)\> | Yes | Callback used to return the information obtained.| | callback | AsyncCallback<[OutputDeviceInfo](#outputdeviceinfo)\> | Yes | Callback used to return the information obtained.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2177,7 +2126,6 @@ Sends a key event to the session corresponding to this controller. This API uses ...@@ -2177,7 +2126,6 @@ Sends a key event to the session corresponding to this controller. This API uses
| event | [KeyEvent](js-apis-keyevent.md) | Yes | Key event.| | event | [KeyEvent](js-apis-keyevent.md) | Yes | Key event.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2223,7 +2171,6 @@ Sends a key event to the session corresponding to this controller. This API uses ...@@ -2223,7 +2171,6 @@ Sends a key event to the session corresponding to this controller. This API uses
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the event is sent, **err** is **undefined**; otherwise, **err** is an error object.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the event is sent, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2264,7 +2211,6 @@ Obtains the **WantAgent** object saved by the application in the session. This A ...@@ -2264,7 +2211,6 @@ Obtains the **WantAgent** object saved by the application in the session. This A
| Promise<[WantAgent](js-apis-app-ability-wantAgent.md)\> | Promise used to return the object saved by calling [setLaunchAbility](#setlaunchability). The object includes the application attribute, such as the bundle name, ability name, and device ID.| | Promise<[WantAgent](js-apis-app-ability-wantAgent.md)\> | Promise used to return the object saved by calling [setLaunchAbility](#setlaunchability). The object includes the application attribute, such as the bundle name, ability name, and device ID.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2300,7 +2246,6 @@ Obtains the **WantAgent** object saved by the application in the session. This A ...@@ -2300,7 +2246,6 @@ Obtains the **WantAgent** object saved by the application in the session. This A
| callback | AsyncCallback<[WantAgent](js-apis-app-ability-wantAgent.md)\> | Yes | Callback used to return the object saved by calling [setLaunchAbility](#setlaunchability). The object includes the application attribute, such as the bundle name, ability name, and device ID.| | callback | AsyncCallback<[WantAgent](js-apis-app-ability-wantAgent.md)\> | Yes | Callback used to return the object saved by calling [setLaunchAbility](#setlaunchability). The object includes the application attribute, such as the bundle name, ability name, and device ID.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2338,7 +2283,6 @@ Obtains the playback position. ...@@ -2338,7 +2283,6 @@ Obtains the playback position.
| number | Playback position, in milliseconds.| | number | Playback position, in milliseconds.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2367,7 +2311,6 @@ Checks whether the session is activated. This API uses a promise to return the r ...@@ -2367,7 +2311,6 @@ Checks whether the session is activated. This API uses a promise to return the r
| Promise<boolean\> | Promise used to return the activation state. If the session is activated, **true** is returned; otherwise, **false** is returned.| | Promise<boolean\> | Promise used to return the activation state. If the session is activated, **true** is returned; otherwise, **false** is returned.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2401,7 +2344,6 @@ Checks whether the session is activated. This API uses an asynchronous callback ...@@ -2401,7 +2344,6 @@ Checks whether the session is activated. This API uses an asynchronous callback
| callback | AsyncCallback<boolean\> | Yes | Callback used to return the activation state. If the session is activated, **true** is returned; otherwise, **false** is returned.| | callback | AsyncCallback<boolean\> | Yes | Callback used to return the activation state. If the session is activated, **true** is returned; otherwise, **false** is returned.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2437,7 +2379,6 @@ Destroys this controller. A controller can no longer be used after being destroy ...@@ -2437,7 +2379,6 @@ Destroys this controller. A controller can no longer be used after being destroy
| Promise<void\> | Promise used to return the result. If the controller is destroyed, no value is returned; otherwise, an error object is returned.| | Promise<void\> | Promise used to return the result. If the controller is destroyed, no value is returned; otherwise, an error object is returned.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2470,7 +2411,6 @@ Destroys this controller. A controller can no longer be used after being destroy ...@@ -2470,7 +2411,6 @@ Destroys this controller. A controller can no longer be used after being destroy
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the controller is destroyed, **err** is **undefined**; otherwise, **err** is an error object.| | callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the controller is destroyed, **err** is **undefined**; otherwise, **err** is an error object.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2505,7 +2445,6 @@ Obtains valid commands supported by the session. This API uses a promise to retu ...@@ -2505,7 +2445,6 @@ Obtains valid commands supported by the session. This API uses a promise to retu
| Promise<Array<[AVControlCommandType](#avcontrolcommandtype)\>\> | Promise used to return a set of valid commands.| | Promise<Array<[AVControlCommandType](#avcontrolcommandtype)\>\> | Promise used to return a set of valid commands.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2539,7 +2478,6 @@ Obtains valid commands supported by the session. This API uses an asynchronous c ...@@ -2539,7 +2478,6 @@ Obtains valid commands supported by the session. This API uses an asynchronous c
| callback | AsyncCallback\<Array\<[AVControlCommandType](#avcontrolcommandtype)\>\> | Yes | Callback used to return a set of valid commands.| | callback | AsyncCallback\<Array\<[AVControlCommandType](#avcontrolcommandtype)\>\> | Yes | Callback used to return a set of valid commands.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2581,7 +2519,6 @@ Sends a control command to the session through the controller. This API uses a p ...@@ -2581,7 +2519,6 @@ Sends a control command to the session through the controller. This API uses a p
| Promise<void\> | Promise used to return the result. If the command is sent, no value is returned; otherwise, an error object is returned.| | Promise<void\> | Promise used to return the result. If the command is sent, no value is returned; otherwise, an error object is returned.|
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2630,7 +2567,6 @@ Sends a control command to the session through the controller. This API uses an ...@@ -2630,7 +2567,6 @@ Sends a control command to the session through the controller. This API uses an
| callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the command is sent, **err** is **undefined**; otherwise, **err** is an error object. | | callback | AsyncCallback<void\> | Yes | Callback used to return the result. If the command is sent, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2682,7 +2618,6 @@ Subscribes to the metadata change event. ...@@ -2682,7 +2618,6 @@ Subscribes to the metadata change event.
| callback | (data: [AVMetadata](#avmetadata)) => void | Yes | Callback used for subscription. The **data** parameter in the callback indicates the changed metadata. | | callback | (data: [AVMetadata](#avmetadata)) => void | Yes | Callback used for subscription. The **data** parameter in the callback indicates the changed metadata. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2720,7 +2655,6 @@ Subscribes to the playback state change event. ...@@ -2720,7 +2655,6 @@ Subscribes to the playback state change event.
| callback | (state: [AVPlaybackState](#avplaybackstate)) => void | Yes | Callback used for subscription. The **state** parameter in the callback indicates the changed playback state. | | callback | (state: [AVPlaybackState](#avplaybackstate)) => void | Yes | Callback used for subscription. The **state** parameter in the callback indicates the changed playback state. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2757,7 +2691,6 @@ Subscribes to the session destruction event. ...@@ -2757,7 +2691,6 @@ Subscribes to the session destruction event.
| callback | () => void | Yes | Callback used for subscription. If the subscription is successful, **err** is **undefined**; otherwise, **err** is an error object. | | callback | () => void | Yes | Callback used for subscription. If the subscription is successful, **err** is **undefined**; otherwise, **err** is an error object. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2789,7 +2722,6 @@ Subscribes to the session activation state change event. ...@@ -2789,7 +2722,6 @@ Subscribes to the session activation state change event.
| callback | (isActive: boolean) => void | Yes | Callback used for subscription. The **isActive** parameter in the callback specifies whether the session is activated. The value **true** means that the service is activated, and **false** means the opposite. | | callback | (isActive: boolean) => void | Yes | Callback used for subscription. The **isActive** parameter in the callback specifies whether the session is activated. The value **true** means that the service is activated, and **false** means the opposite. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2821,7 +2753,6 @@ Subscribes to valid command changes. ...@@ -2821,7 +2753,6 @@ Subscribes to valid command changes.
| callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype)\>) => void | Yes | Callback used for subscription. The **commands** parameter in the callback is a set of valid commands. | | callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype)\>) => void | Yes | Callback used for subscription. The **commands** parameter in the callback is a set of valid commands. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2854,7 +2785,6 @@ Subscribes to output device changes. ...@@ -2854,7 +2785,6 @@ Subscribes to output device changes.
| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | Yes | Callback used for subscription. The **device** parameter in the callback indicates the output device information. | | callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | Yes | Callback used for subscription. The **device** parameter in the callback indicates the output device information. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2886,7 +2816,6 @@ Unsubscribes from metadata changes. ...@@ -2886,7 +2816,6 @@ Unsubscribes from metadata changes.
| callback | (data: [AVMetadata](#avmetadata)) => void | No | Callback used for subscription. The **data** parameter in the callback indicates the changed metadata.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. | | callback | (data: [AVMetadata](#avmetadata)) => void | No | Callback used for subscription. The **data** parameter in the callback indicates the changed metadata.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2915,7 +2844,6 @@ Unsubscribes from playback state changes. ...@@ -2915,7 +2844,6 @@ Unsubscribes from playback state changes.
| callback | (state: [AVPlaybackState](#avplaybackstate)) => void | No | Callback used for subscription. The **state** parameter in the callback indicates the changed playback state.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. | | callback | (state: [AVPlaybackState](#avplaybackstate)) => void | No | Callback used for subscription. The **state** parameter in the callback indicates the changed playback state.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2944,7 +2872,6 @@ Unsubscribes from the session destruction event. ...@@ -2944,7 +2872,6 @@ Unsubscribes from the session destruction event.
| callback | () => void | No | Callback used for unsubscription. If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. | | callback | () => void | No | Callback used for unsubscription. If the unsubscription is successful, **err** is **undefined**; otherwise, **err** is an error object.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -2973,7 +2900,6 @@ Unsubscribes from session activation state changes. ...@@ -2973,7 +2900,6 @@ Unsubscribes from session activation state changes.
| callback | (isActive: boolean) => void | No | Callback used for unsubscription. The **isActive** parameter in the callback specifies whether the session is activated. The value **true** means that the session is activated, and **false** means the opposite.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. | | callback | (isActive: boolean) => void | No | Callback used for unsubscription. The **isActive** parameter in the callback specifies whether the session is activated. The value **true** means that the session is activated, and **false** means the opposite.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message| | ID| Error Message|
...@@ -3002,7 +2928,6 @@ Unsubscribes from valid command changes. ...@@ -3002,7 +2928,6 @@ Unsubscribes from valid command changes.
| callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype)\>) => void | No | Callback used for unsubscription. The **commands** parameter in the command is a set of valid commands.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. | | callback | (commands: Array<[AVControlCommandType](#avcontrolcommandtype)\>) => void | No | Callback used for unsubscription. The **commands** parameter in the command is a set of valid commands.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID| Error Message | | ID| Error Message |
...@@ -3031,7 +2956,6 @@ Unsubscribes from output device changes. ...@@ -3031,7 +2956,6 @@ Unsubscribes from output device changes.
| callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | No | Callback used for unsubscription. The **device** parameter in the callback indicates the output device information.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. | | callback | (device: [OutputDeviceInfo](#outputdeviceinfo)) => void | No | Callback used for unsubscription. The **device** parameter in the callback indicates the output device information.<br>The callback parameter is optional. If it is not specified, the specified event is no longer listened for all sessions. |
**Error codes** **Error codes**
For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md). For details about the error codes, see [AVSession Management Error Codes](../errorcodes/errorcode-avsession.md).
| ID | Error Message | | ID | Error Message |
......
...@@ -159,12 +159,12 @@ Requests a continuous task from the system. This API uses an asynchronous callba ...@@ -159,12 +159,12 @@ Requests a continuous task from the system. This API uses an asynchronous callba
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory| Description |
| --------- | ---------------------------------- | ---- | ---------------------------------------- | | --------- | --------------------------------------------- | ---- | ------------------------------------------------------------ |
| context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-ability-context.md).| | context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-ability-context.md).|
| bgMode | [BackgroundMode](#backgroundmode8) | Yes | Background mode requested. | | bgMode | [BackgroundMode](#backgroundmode8) | Yes | Background mode requested. |
| wantAgent | [WantAgent](js-apis-wantAgent.md) | Yes | Notification parameter, which is used to specify the target page that is redirected to when a continuous task notification is clicked. | | wantAgent | [WantAgent](js-apis-app-ability-wantAgent.md) | Yes | Notification parameter, which is used to specify the target page that is redirected to when a continuous task notification is clicked. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -187,7 +187,7 @@ let wantAgentInfo = { ...@@ -187,7 +187,7 @@ let wantAgentInfo = {
wants: [ wants: [
{ {
bundleName: "com.example.myapplication", bundleName: "com.example.myapplication",
abilityName: "com.example.myapplication.MainAbility" abilityName: "EntryAbility"
} }
], ],
operationType: wantAgent.OperationType.START_ABILITY, operationType: wantAgent.OperationType.START_ABILITY,
...@@ -205,7 +205,7 @@ wantAgent.getWantAgent(wantAgentInfo).then((wantAgentObj) => { ...@@ -205,7 +205,7 @@ wantAgent.getWantAgent(wantAgentInfo).then((wantAgentObj) => {
Stage model: Stage model:
```ts ```ts
import Ability from '@ohos.application.Ability' import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.backgroundTaskManager'; import backgroundTaskManager from '@ohos.backgroundTaskManager';
import wantAgent from '@ohos.wantAgent'; import wantAgent from '@ohos.wantAgent';
...@@ -217,13 +217,13 @@ function callback(err, data) { ...@@ -217,13 +217,13 @@ function callback(err, data) {
} }
} }
export default class MainAbility extends Ability { export default class EntryAbility extends UIAbility {
onCreate(want, launchParam) { onCreate(want, launchParam) {
let wantAgentInfo = { let wantAgentInfo = {
wants: [ wants: [
{ {
bundleName: "com.example.myapplication", bundleName: "com.example.myapplication",
abilityName: "com.example.myapplication.MainAbility" abilityName: "EntryAbility"
} }
], ],
operationType: wantAgent.OperationType.START_ABILITY, operationType: wantAgent.OperationType.START_ABILITY,
...@@ -251,11 +251,11 @@ Requests a continuous task from the system. This API uses a promise to return th ...@@ -251,11 +251,11 @@ Requests a continuous task from the system. This API uses a promise to return th
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory| Description |
| --------- | ---------------------------------- | ---- | ---------------------------------------- | | --------- | --------------------------------------------- | ---- | ------------------------------------------------------------ |
| context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-ability-context.md).| | context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-ability-context.md).|
| bgMode | [BackgroundMode](#backgroundmode8) | Yes | Background mode requested. | | bgMode | [BackgroundMode](#backgroundmode8) | Yes | Background mode requested. |
| wantAgent | [WantAgent](js-apis-wantAgent.md) | Yes | Notification parameter, which is used to specify the target page that is redirected to when a continuous task notification is clicked. | | wantAgent | [WantAgent](js-apis-app-ability-wantAgent.md) | Yes | Notification parameter, which is used to specify the target page that is redirected to when a continuous task notification is clicked. |
**Return value** **Return value**
...@@ -276,7 +276,7 @@ let wantAgentInfo = { ...@@ -276,7 +276,7 @@ let wantAgentInfo = {
wants: [ wants: [
{ {
bundleName: "com.example.myapplication", bundleName: "com.example.myapplication",
abilityName: "com.example.myapplication.MainAbility" abilityName: "EntryAbility"
} }
], ],
operationType: wantAgent.OperationType.START_ABILITY, operationType: wantAgent.OperationType.START_ABILITY,
...@@ -297,17 +297,17 @@ wantAgent.getWantAgent(wantAgentInfo).then((wantAgentObj) => { ...@@ -297,17 +297,17 @@ wantAgent.getWantAgent(wantAgentInfo).then((wantAgentObj) => {
Stage model: Stage model:
```ts ```ts
import Ability from '@ohos.application.Ability' import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.backgroundTaskManager'; import backgroundTaskManager from '@ohos.backgroundTaskManager';
import wantAgent from '@ohos.wantAgent'; import wantAgent from '@ohos.wantAgent';
export default class MainAbility extends Ability { export default class EntryAbility extends UIAbility {
onCreate(want, launchParam) { onCreate(want, launchParam) {
let wantAgentInfo = { let wantAgentInfo = {
wants: [ wants: [
{ {
bundleName: "com.example.myapplication", bundleName: "com.example.myapplication",
abilityName: "com.example.myapplication.MainAbility" abilityName: "EntryAbility"
} }
], ],
operationType: wantAgent.OperationType.START_ABILITY, operationType: wantAgent.OperationType.START_ABILITY,
...@@ -365,7 +365,7 @@ backgroundTaskManager.stopBackgroundRunning(featureAbility.getContext(), callbac ...@@ -365,7 +365,7 @@ backgroundTaskManager.stopBackgroundRunning(featureAbility.getContext(), callbac
Stage model: Stage model:
```ts ```ts
import Ability from '@ohos.application.Ability' import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.backgroundTaskManager'; import backgroundTaskManager from '@ohos.backgroundTaskManager';
function callback(err, data) { function callback(err, data) {
...@@ -376,7 +376,7 @@ function callback(err, data) { ...@@ -376,7 +376,7 @@ function callback(err, data) {
} }
} }
export default class MainAbility extends Ability { export default class EntryAbility extends UIAbility {
onCreate(want, launchParam) { onCreate(want, launchParam) {
backgroundTaskManager.stopBackgroundRunning(this.context, callback); backgroundTaskManager.stopBackgroundRunning(this.context, callback);
} }
...@@ -422,10 +422,10 @@ backgroundTaskManager.stopBackgroundRunning(featureAbility.getContext()).then(() ...@@ -422,10 +422,10 @@ backgroundTaskManager.stopBackgroundRunning(featureAbility.getContext()).then(()
Stage model: Stage model:
```ts ```ts
import Ability from '@ohos.application.Ability' import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.backgroundTaskManager'; import backgroundTaskManager from '@ohos.backgroundTaskManager';
export default class MainAbility extends Ability { export default class EntryAbility extends UIAbility {
onCreate(want, launchParam) { onCreate(want, launchParam) {
backgroundTaskManager.stopBackgroundRunning(this.context).then(() => { backgroundTaskManager.stopBackgroundRunning(this.context).then(() => {
console.info("Operation stopBackgroundRunning succeeded"); console.info("Operation stopBackgroundRunning succeeded");
......
# Color Space Management # @ohos.graphics.colorSpaceManager (Color Space Management)
The **colorSpaceManager** module provides APIs for creating and managing color space objects and obtaining basic color space attributes. The **colorSpaceManager** module provides APIs for creating and managing color space objects and obtaining basic color space attributes.
......
...@@ -297,9 +297,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -297,9 +297,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
```ts ```ts
import defaultAppMgr from '@ohos.bundle.defaultAppManager'; import defaultAppMgr from '@ohos.bundle.defaultAppManager';
defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, { defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, {
bundleName: "com.test.app", bundleName: "com.example.myapplication",
moduleName: "module01", moduleName: "module01",
abilityName: "MainAbility" abilityName: "EntryAbility"
}).then((data) => { }).then((data) => {
console.info('Operation successful.'); console.info('Operation successful.');
}).catch((error) => { }).catch((error) => {
...@@ -308,9 +308,9 @@ defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, { ...@@ -308,9 +308,9 @@ defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, {
let userId = 100; let userId = 100;
defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, { defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, {
bundleName: "com.test.app", bundleName: "com.example.myapplication",
moduleName: "module01", moduleName: "module01",
abilityName: "MainAbility" abilityName: "EntryAbility"
}, userId).then((data) => { }, userId).then((data) => {
console.info('Operation successful.'); console.info('Operation successful.');
}).catch((error) => { }).catch((error) => {
...@@ -318,9 +318,9 @@ defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, { ...@@ -318,9 +318,9 @@ defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, {
}); });
defaultAppMgr.setDefaultApplication("image/png", { defaultAppMgr.setDefaultApplication("image/png", {
bundleName: "com.test.app", bundleName: "com.example.myapplication",
moduleName: "module01", moduleName: "module01",
abilityName: "MainAbility" abilityName: "EntryAbility"
}, userId).then((data) => { }, userId).then((data) => {
console.info('Operation successful.'); console.info('Operation successful.');
}).catch((error) => { }).catch((error) => {
...@@ -365,9 +365,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -365,9 +365,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
import defaultAppMgr from '@ohos.bundle.defaultAppManager'; import defaultAppMgr from '@ohos.bundle.defaultAppManager';
let userId = 100; let userId = 100;
defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, { defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, {
bundleName: "com.test.app", bundleName: "com.example.myapplication",
moduleName: "module01", moduleName: "module01",
abilityName: "MainAbility" abilityName: "EntryAbility"
}, userId, (err, data) => { }, userId, (err, data) => {
if (err) { if (err) {
console.error('Operation failed. Cause: ' + JSON.stringify(err)); console.error('Operation failed. Cause: ' + JSON.stringify(err));
...@@ -377,9 +377,9 @@ defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, { ...@@ -377,9 +377,9 @@ defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, {
}); });
defaultAppMgr.setDefaultApplication("image/png", { defaultAppMgr.setDefaultApplication("image/png", {
bundleName: "com.test.app", bundleName: "com.example.myapplication",
moduleName: "module01", moduleName: "module01",
abilityName: "MainAbility" abilityName: "EntryAbility"
}, userId, (err, data) => { }, userId, (err, data) => {
if (err) { if (err) {
console.error('Operation failed. Cause: ' + JSON.stringify(err)); console.error('Operation failed. Cause: ' + JSON.stringify(err));
...@@ -424,9 +424,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc ...@@ -424,9 +424,9 @@ For details about the error codes, see [Bundle Error Codes](../errorcodes/errorc
```ts ```ts
import defaultAppMgr from '@ohos.bundle.defaultAppManager'; import defaultAppMgr from '@ohos.bundle.defaultAppManager';
defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, { defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, {
bundleName: "com.test.app", bundleName: "com.example.myapplication",
moduleName: "module01", moduleName: "module01",
abilityName: "MainAbility" abilityName: "EntryAbility"
}, (err, data) => { }, (err, data) => {
if (err) { if (err) {
console.error('Operation failed. Cause: ' + JSON.stringify(err)); console.error('Operation failed. Cause: ' + JSON.stringify(err));
...@@ -436,9 +436,9 @@ defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, { ...@@ -436,9 +436,9 @@ defaultAppMgr.setDefaultApplication(defaultAppMgr.ApplicationType.BROWSER, {
}); });
defaultAppMgr.setDefaultApplication("image/png", { defaultAppMgr.setDefaultApplication("image/png", {
bundleName: "com.test.app", bundleName: "com.example.myapplication",
moduleName: "module01", moduleName: "module01",
abilityName: "MainAbility" abilityName: "EntryAbility"
}, (err, data) => { }, (err, data) => {
if (err) { if (err) {
console.error('Operation failed. Cause: ' + JSON.stringify(err)); console.error('Operation failed. Cause: ' + JSON.stringify(err));
......
# @ohos.display # @ohos.display (Display)
The **Display** module provides APIs for managing displays, such as obtaining information about the default display, obtaining information about all displays, and listening for the addition and removal of displays. The **Display** module provides APIs for managing displays, such as obtaining information about the default display, obtaining information about all displays, and listening for the addition and removal of displays.
...@@ -189,7 +189,7 @@ Checks whether there is a visible privacy window on a display. The privacy windo ...@@ -189,7 +189,7 @@ Checks whether there is a visible privacy window on a display. The privacy windo
| Type | Description | | Type | Description |
| -------------------------------- |-----------------------------------------------------------------------| | -------------------------------- |-----------------------------------------------------------------------|
|boolean | Whether there is a visible privacy window on the display. The value **true** means that there is a visible privacy window on the display, and **false** means the opposite. | |boolean | Whether there is a visible privacy window on the display. The value **true** means that there is a visible privacy window on the display, and **false** means the opposite.|
**Error codes** **Error codes**
......
# Image Effect # @ohos.effectKit (Image Effects)
The **EffectKit** module provides basic image processing capabilities, including brightness adjustment, blurring, grayscale adjustment, and color picker. The **EffectKit** module provides basic image processing capabilities, including brightness adjustment, blurring, grayscale adjustment, and color picker.
......
# @ohos.faultLogger (Fault Logger) # @ohos.faultLogger (FaultLogger)
The **faultLogger** module implements fault logging functions. > **NOTE**
>
> **NOTE**<br/>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import ## Modules to Import
......
# @ohos.bundle.freeInstall # @ohos.bundle.freeInstall (freeInstall)
The **Bundle.freeInstall** module provides APIs for setting and obtaining installation-free information and APIs for obtaining **BundlePackInfo** and **DispatchInfo**. The **Bundle.freeInstall** module provides APIs for setting and obtaining installation-free information and APIs for obtaining **BundlePackInfo** and **DispatchInfo**.
...@@ -63,7 +63,7 @@ Sets an upgrade flag for a module. This API uses an asynchronous callback to ret ...@@ -63,7 +63,7 @@ Sets an upgrade flag for a module. This API uses an asynchronous callback to ret
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------- | --------------------------- | ---- | ---------------------------- | | ----------- | --------------------------- | ---- | ---------------------------- |
| bundleName | string | Yes | Bundle name. | | bundleName | string | Yes | Bundle name. |
| moduleName | string | Yes | Module name. | | moduleName | string | Yes | Module name. |
| upgradeFlag | [UpgradeFlag](#upgradeflag) | Yes | Upgrade flag, which is for internal use only. | | upgradeFlag | [UpgradeFlag](#upgradeflag) | Yes | Upgrade flag, which is for internal use only. |
| callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**; otherwise, **err** is an error object.| | callback | AsyncCallback\<void> | Yes | Callback used to return the result. If the operation is successful, **err** is **null**; otherwise, **err** is an error object.|
...@@ -113,7 +113,7 @@ Sets an upgrade flag for a module. This API uses a promise to return the result. ...@@ -113,7 +113,7 @@ Sets an upgrade flag for a module. This API uses a promise to return the result.
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ----------- | --------------------------- | ---- | ---------------------- | | ----------- | --------------------------- | ---- | ---------------------- |
| bundleName | string | Yes | Bundle name. | | bundleName | string | Yes | Bundle name.|
| moduleName | string | Yes | Module name. | | moduleName | string | Yes | Module name. |
| upgradeFlag | [UpgradeFlag](#upgradeflag) | Yes | Upgrade flag, which is for internal use only.| | upgradeFlag | [UpgradeFlag](#upgradeflag) | Yes | Upgrade flag, which is for internal use only.|
...@@ -166,7 +166,7 @@ Checks whether a module can be removed. This API uses an asynchronous callback t ...@@ -166,7 +166,7 @@ Checks whether a module can be removed. This API uses an asynchronous callback t
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------- | ---------------------- | ---- | --------------------------------------------- | | ---------- | ---------------------- | ---- | --------------------------------------------- |
| bundleName | string | Yes | Bundle name. | | bundleName | string | Yes | Bundle name. |
| moduleName | string | Yes | Module name. | | moduleName | string | Yes | Module name. |
| callback | AsyncCallback\<boolean> | Yes | Callback used to return the result. If the module can be removed, **true** is returned; otherwise, **false** is returned.| | callback | AsyncCallback\<boolean> | Yes | Callback used to return the result. If the module can be removed, **true** is returned; otherwise, **false** is returned.|
...@@ -266,7 +266,7 @@ Obtains **bundlePackInfo** based on **bundleName** and **bundlePackFlag**. This ...@@ -266,7 +266,7 @@ Obtains **bundlePackInfo** based on **bundleName** and **bundlePackFlag**. This
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ | | -------------- | ------------------------------------------------------------ | ---- | ------------------------------------------------------------ |
| bundleName | string | Yes | Bundle name. | | bundleName | string | Yes | Bundle name. |
| bundlePackFlag | [BundlePackFlag](#bundlepackflag) | Yes | Flag of the bundle package. | | bundlePackFlag | [BundlePackFlag](#bundlepackflag) | Yes | Flag of the bundle package. |
| callback | AsyncCallback<[BundlePackInfo](js-apis-bundleManager-packInfo.md)> | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is the **BundlePackInfo** object obtained; otherwise, **err** is an error object.| | callback | AsyncCallback<[BundlePackInfo](js-apis-bundleManager-packInfo.md)> | Yes | Callback used to return the result. If the operation is successful, **err** is **null** and **data** is the **BundlePackInfo** object obtained; otherwise, **err** is an error object.|
**Error codes** **Error codes**
...@@ -311,7 +311,7 @@ Obtains **bundlePackInfo** based on **bundleName** and **bundleFlag**. This API ...@@ -311,7 +311,7 @@ Obtains **bundlePackInfo** based on **bundleName** and **bundleFlag**. This API
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| -------------- | --------------------------------- | ---- | ---------------------- | | -------------- | --------------------------------- | ---- | ---------------------- |
| bundleName | string | Yes | Bundle name. | | bundleName | string | Yes | Bundle name.|
| bundlePackFlag | [BundlePackFlag](#bundlepackflag) | Yes | Flag of the bundle package.| | bundlePackFlag | [BundlePackFlag](#bundlepackflag) | Yes | Flag of the bundle package.|
**Return value** **Return value**
......
...@@ -15,10 +15,10 @@ Want is a carrier for information transfer between objects (application componen ...@@ -15,10 +15,10 @@ Want is a carrier for information transfer between objects (application componen
| abilityName | string | No | Name of the ability. If both **bundleName** and **abilityName** are specified in a **Want** object, the **Want** object can match a specific ability. The value of **abilityName** must be unique in an application.| | abilityName | string | No | Name of the ability. If both **bundleName** and **abilityName** are specified in a **Want** object, the **Want** object can match a specific ability. The value of **abilityName** must be unique in an application.|
| uri | string | No | URI. If **uri** is specified in a **Want** object, the **Want** object will match the specified URI information, including **scheme**, **schemeSpecificPart**, **authority**, and **path**.| | uri | string | No | URI. If **uri** is specified in a **Want** object, the **Want** object will match the specified URI information, including **scheme**, **schemeSpecificPart**, **authority**, and **path**.|
| type | string | No | MIME type, that is, the type of the file to open, for example, **text/xml** and **image/***. For details about the MIME type definition, see https://www.iana.org/assignments/media-types/media-types.xhtml?utm_source=ld246.com. | | type | string | No | MIME type, that is, the type of the file to open, for example, **text/xml** and **image/***. For details about the MIME type definition, see https://www.iana.org/assignments/media-types/media-types.xhtml?utm_source=ld246.com. |
| flags | number | No | How the **Want** object will be handled. By default, numbers are passed in. For details, see [flags](js-apis-ability-wantConstant.md#wantConstant.Flags).| | flags | number | No | How the **Want** object will be handled. By default, numbers are passed in. For details, see [flags](js-apis-ability-wantConstant.md#wantconstantflags). |
| action | string | No | Action to take, such as viewing and sharing application details. In implicit Want, you can define this field and use it together with **uri** or **parameters** to specify the operation to be performed on the data. For details, see [action](js-apis-app-ability-wantConstant.md#wantConstant.Action). For details about the definition and matching rules of implicit Want, see [Matching Rules of Explicit Want and Implicit Want](application-models/explicit-implicit-want-mappings.md). | | action | string | No | Action to take, such as viewing and sharing application details. In implicit Want, you can define this field and use it together with **uri** or **parameters** to specify the operation to be performed on the data. For details, see [action](js-apis-app-ability-wantConstant.md#wantconstantaction). For details about the definition and matching rules of implicit Want, see [Matching Rules of Explicit Want and Implicit Want](../../application-models/explicit-implicit-want-mappings.md). |
| parameters | {[key: string]: any} | No | Want parameters in the form of custom key-value (KV) pairs. By default, the following keys are carried:<br>**ohos.aafwk.callerPid**: PID of the caller.<br>**ohos.aafwk.param.callerToken**: token of the caller.<br>**ohos.aafwk.param.callerUid**: UID in [bundleInfo](js-apis-bundle-BundleInfo.md#bundleinfo-1), that is, the application UID in the bundle information. | | parameters | {[key: string]: any} | No | Want parameters in the form of custom key-value (KV) pairs. By default, the following keys are carried:<br>**ohos.aafwk.callerPid**: PID of the caller.<br>**ohos.aafwk.param.callerToken**: token of the caller.<br>**ohos.aafwk.param.callerUid**: UID in [bundleInfo](js-apis-bundle-BundleInfo.md#bundleinfo-1), that is, the application UID in the bundle information. |
| entities | Array\<string> | No | Additional category information (such as browser and video player) of the target ability. It is a supplement to **action** in implicit Want and is used to filter ability types. For details, see [entity](js-apis-app-ability-wantConstant.md#wantConstant.Entity). | | entities | Array\<string> | No | Additional category information (such as browser and video player) of the target ability. It is a supplement to **action** in implicit Want and is used to filter ability types. For details, see [entity](js-apis-app-ability-wantConstant.md#wantconstantentity). |
| moduleName<sup>9+</sup> | string | No | Module to which the ability belongs.| | moduleName<sup>9+</sup> | string | No | Module to which the ability belongs.|
**Example** **Example**
...@@ -68,4 +68,4 @@ Want is a carrier for information transfer between objects (application componen ...@@ -68,4 +68,4 @@ Want is a carrier for information transfer between objects (application componen
- For more details and examples, see [Want](../../application-models/want-overview.md). - For more details and examples, see [Want](../../application-models/want-overview.md).
<!--no_check-->
# @ohos.bundle.installer # @ohos.bundle.installer (installer)
The **bundle.installer** module provides APIs for you to install, uninstall, and recover bundles on devices. The **bundle.installer** module provides APIs for you to install, uninstall, and recover bundles on devices.
......
# Media # @ohos.multimedia.media (Media)
> **NOTE** > **NOTE**
>
> The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
The multimedia subsystem provides a set of simple and easy-to-use APIs for you to access the system and use media resources. The multimedia subsystem provides a set of simple and easy-to-use APIs for you to access the system and use media resources.
...@@ -1917,12 +1916,12 @@ Sets video recording parameters. This API uses an asynchronous callback to retur ...@@ -1917,12 +1916,12 @@ Sets video recording parameters. This API uses an asynchronous callback to retur
For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md). For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md).
| ID| Error Message | | ID| Error Message |
| -------- | --------------------------------------- | | -------- | ------------------------------------------ |
| 201 | Permission denied. Return by callback. | | 201 | Permission denied. Return by callback. |
| 401 | Parameter error. Return by callback. | | 401 | Parameter error. Return by callback. |
| 5400102 | Operate not permit. Return by callback. | | 5400102 | Operation not allowed. Return by callback. |
| 5400105 | Service died. Return by callback. | | 5400105 | Service died. Return by callback. |
**Example** **Example**
...@@ -1987,12 +1986,12 @@ Sets video recording parameters. This API uses a promise to return the result. ...@@ -1987,12 +1986,12 @@ Sets video recording parameters. This API uses a promise to return the result.
For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md). For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------- | | -------- | ----------------------------------------- |
| 201 | Permission denied. Return by promise. | | 201 | Permission denied. Return by promise. |
| 401 | Parameter error. Return by promise. | | 401 | Parameter error. Return by promise. |
| 5400102 | Operate not permit. Return by promise. | | 5400102 | Operation not allowed. Return by promise. |
| 5400105 | Service died. Return by promise. | | 5400105 | Service died. Return by promise. |
**Example** **Example**
...@@ -2051,11 +2050,11 @@ This API can be called only after [prepare()](#videorecorder_prepare1) is called ...@@ -2051,11 +2050,11 @@ This API can be called only after [prepare()](#videorecorder_prepare1) is called
For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md). For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md).
| ID| Error Message | | ID| Error Message |
| -------- | --------------------------------------- | | -------- | ------------------------------------------ |
| 5400102 | Operate not permit. Return by callback. | | 5400102 | Operation not allowed. Return by callback. |
| 5400103 | IO error. Return by callback. | | 5400103 | I/O error. Return by callback. |
| 5400105 | Service died. Return by callback. | | 5400105 | Service died. Return by callback. |
**Example** **Example**
...@@ -2096,11 +2095,11 @@ This API can be called only after [prepare()](#videorecorder_prepare1) is called ...@@ -2096,11 +2095,11 @@ This API can be called only after [prepare()](#videorecorder_prepare1) is called
For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md). For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------- | | -------- | ----------------------------------------- |
| 5400102 | Operate not permit. Return by promise. | | 5400102 | Operation not allowed. Return by promise. |
| 5400103 | IO error. Return by promise. | | 5400103 | I/O error. Return by promise. |
| 5400105 | Service died. Return by promise. | | 5400105 | Service died. Return by promise. |
**Example** **Example**
...@@ -2137,11 +2136,11 @@ This API can be called only after [prepare()](#videorecorder_prepare1) and [getI ...@@ -2137,11 +2136,11 @@ This API can be called only after [prepare()](#videorecorder_prepare1) and [getI
For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md). For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md).
| ID| Error Message | | ID| Error Message |
| -------- | --------------------------------------- | | -------- | ------------------------------------------ |
| 5400102 | Operate not permit. Return by callback. | | 5400102 | Operation not allowed. Return by callback. |
| 5400103 | IO error. Return by callback. | | 5400103 | I/O error. Return by callback. |
| 5400105 | Service died. Return by callback. | | 5400105 | Service died. Return by callback. |
**Example** **Example**
...@@ -2178,11 +2177,11 @@ This API can be called only after [prepare()](#videorecorder_prepare1) and [getI ...@@ -2178,11 +2177,11 @@ This API can be called only after [prepare()](#videorecorder_prepare1) and [getI
For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md). For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------- | | -------- | ----------------------------------------- |
| 5400102 | Operate not permit. Return by promise. | | 5400102 | Operation not allowed. Return by promise. |
| 5400103 | IO error. Return by promise. | | 5400103 | I/O error. Return by promise. |
| 5400105 | Service died. Return by promise. | | 5400105 | Service died. Return by promise. |
**Example** **Example**
...@@ -2217,11 +2216,11 @@ This API can be called only after [start()](#videorecorder_start1) is called. Yo ...@@ -2217,11 +2216,11 @@ This API can be called only after [start()](#videorecorder_start1) is called. Yo
For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md). For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md).
| ID| Error Message | | ID| Error Message |
| -------- | --------------------------------------- | | -------- | ------------------------------------------ |
| 5400102 | Operate not permit. Return by callback. | | 5400102 | Operation not allowed. Return by callback. |
| 5400103 | IO error. Return by callback. | | 5400103 | I/O error. Return by callback. |
| 5400105 | Service died. Return by callback. | | 5400105 | Service died. Return by callback. |
**Example** **Example**
...@@ -2258,11 +2257,11 @@ This API can be called only after [start()](#videorecorder_start1) is called. Yo ...@@ -2258,11 +2257,11 @@ This API can be called only after [start()](#videorecorder_start1) is called. Yo
For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md). For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------- | | -------- | ----------------------------------------- |
| 5400102 | Operate not permit. Return by promise. | | 5400102 | Operation not allowed. Return by promise. |
| 5400103 | IO error. Return by promise. | | 5400103 | I/O error. Return by promise. |
| 5400105 | Service died. Return by promise. | | 5400105 | Service died. Return by promise. |
**Example** **Example**
...@@ -2295,11 +2294,11 @@ Resumes video recording. This API uses an asynchronous callback to return the re ...@@ -2295,11 +2294,11 @@ Resumes video recording. This API uses an asynchronous callback to return the re
For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md). For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md).
| ID| Error Message | | ID| Error Message |
| -------- | --------------------------------------- | | -------- | ------------------------------------------ |
| 5400102 | Operate not permit. Return by callback. | | 5400102 | Operation not allowed. Return by callback. |
| 5400103 | IO error. Return by callback. | | 5400103 | I/O error. Return by callback. |
| 5400105 | Service died. Return by callback. | | 5400105 | Service died. Return by callback. |
**Example** **Example**
...@@ -2334,11 +2333,11 @@ Resumes video recording. This API uses a promise to return the result. ...@@ -2334,11 +2333,11 @@ Resumes video recording. This API uses a promise to return the result.
For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md). For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------- | | -------- | ----------------------------------------- |
| 5400102 | Operate not permit. Return by promise. | | 5400102 | Operation not allowed. Return by promise. |
| 5400103 | IO error. Return by promise. | | 5400103 | I/O error. Return by promise. |
| 5400105 | Service died. Return by promise. | | 5400105 | Service died. Return by promise. |
**Example** **Example**
...@@ -2373,11 +2372,11 @@ To start another recording, you must call [prepare()](#videorecorder_prepare1) a ...@@ -2373,11 +2372,11 @@ To start another recording, you must call [prepare()](#videorecorder_prepare1) a
For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md). For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md).
| ID| Error Message | | ID| Error Message |
| -------- | --------------------------------------- | | -------- | ------------------------------------------ |
| 5400102 | Operate not permit. Return by callback. | | 5400102 | Operation not allowed. Return by callback. |
| 5400103 | IO error. Return by callback. | | 5400103 | I/O error. Return by callback. |
| 5400105 | Service died. Return by callback. | | 5400105 | Service died. Return by callback. |
**Example** **Example**
...@@ -2414,11 +2413,11 @@ To start another recording, you must call [prepare()](#videorecorder_prepare1) a ...@@ -2414,11 +2413,11 @@ To start another recording, you must call [prepare()](#videorecorder_prepare1) a
For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md). For details about the error codes, see [Media Error Codes](../errorcodes/errorcode-media.md).
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------------- | | -------- | ----------------------------------------- |
| 5400102 | Operate not permit. Return by promise. | | 5400102 | Operation not allowed. Return by promise. |
| 5400103 | IO error. Return by promise. | | 5400103 | I/O error. Return by promise. |
| 5400105 | Service died. Return by promise. | | 5400105 | Service died. Return by promise. |
**Example** **Example**
...@@ -2527,7 +2526,7 @@ For details about the error codes, see [Media Error Codes](../errorcodes/errorco ...@@ -2527,7 +2526,7 @@ For details about the error codes, see [Media Error Codes](../errorcodes/errorco
| ID| Error Message | | ID| Error Message |
| -------- | --------------------------------- | | -------- | --------------------------------- |
| 5400103 | IO error. Return by callback. | | 5400103 | I/O error. Return by callback. |
| 5400105 | Service died. Return by callback. | | 5400105 | Service died. Return by callback. |
**Example** **Example**
...@@ -2567,7 +2566,7 @@ For details about the error codes, see [Media Error Codes](../errorcodes/errorco ...@@ -2567,7 +2566,7 @@ For details about the error codes, see [Media Error Codes](../errorcodes/errorco
| ID| Error Message | | ID| Error Message |
| -------- | -------------------------------- | | -------- | -------------------------------- |
| 5400103 | IO error. Return by promise. | | 5400103 | I/O error. Return by promise. |
| 5400105 | Service died. Return by promise. | | 5400105 | Service died. Return by promise. |
**Example** **Example**
...@@ -2602,7 +2601,7 @@ For details about the error codes, see [Media Error Codes](../errorcodes/errorco ...@@ -2602,7 +2601,7 @@ For details about the error codes, see [Media Error Codes](../errorcodes/errorco
| ID| Error Message | | ID| Error Message |
| -------- | --------------------------------- | | -------- | --------------------------------- |
| 5400103 | IO error. Return by callback. | | 5400103 | I/O error. Return by callback. |
| 5400105 | Service died. Return by callback. | | 5400105 | Service died. Return by callback. |
**Example** **Example**
......
...@@ -202,7 +202,7 @@ Subscribes to the media library changes. This API uses an asynchronous callback ...@@ -202,7 +202,7 @@ Subscribes to the media library changes. This API uses an asynchronous callback
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | -------------------- | ---- | ---------------------------------------- | | -------- | -------------------- | ---- | ---------------------------------------- |
| type | 'deviceChange'&#124;'albumChange'&#124;'imageChange'&#124;'audioChange'&#124;'videoChange'&#124;'fileChange'&#124;'remoteFileChange' | Yes | Media type.<br>'deviceChange': registered device change<br>'albumChange': album change<br>'imageChange': image file change<br>'audioChange': audio file change<br>'videoChange': video file change<br>'fileChange': file change<br>'remoteFileChange': file change on the registered device| | type | 'deviceChange'&#124;<br>'albumChange'&#124;<br>'imageChange'&#124;<br>'audioChange'&#124;<br>'videoChange'&#124;<br>'fileChange'&#124;<br>'remoteFileChange' | Yes | Media type.<br>'deviceChange': registered device change<br>'albumChange': album change<br>'imageChange': image file change<br>'audioChange': audio file change<br>'videoChange': video file change<br>'fileChange': file change<br>'remoteFileChange': file change on the registered device|
| callback | Callback&lt;void&gt; | Yes | Void callback. | | callback | Callback&lt;void&gt; | Yes | Void callback. |
**Example** **Example**
...@@ -224,7 +224,7 @@ Unsubscribes from the media library changes. This API uses an asynchronous callb ...@@ -224,7 +224,7 @@ Unsubscribes from the media library changes. This API uses an asynchronous callb
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | -------------------- | ---- | ---------------------------------------- | | -------- | -------------------- | ---- | ---------------------------------------- |
| type | 'deviceChange'&#124;'albumChange'&#124;'imageChange'&#124;'audioChange'&#124;'videoChange'&#124;'fileChange'&#124;'remoteFileChange' | Yes | Media type.<br>'deviceChange': registered device change<br>'albumChange': album change<br>'imageChange': image file change<br>'audioChange': audio file change<br>'videoChange': video file change<br>'fileChange': file change<br>'remoteFileChange': file change on the registered device| | type | 'deviceChange'&#124;<br>'albumChange'&#124;<br>'imageChange'&#124;<br>'audioChange'&#124;<br>'videoChange'&#124;<br>'fileChange'&#124;<br>'remoteFileChange' | Yes | Media type.<br>'deviceChange': registered device change<br>'albumChange': album change<br>'imageChange': image file change<br>'audioChange': audio file change<br>'videoChange': video file change<br>'fileChange': file change<br>'remoteFileChange': file change on the registered device|
| callback | Callback&lt;void&gt; | No | Void callback. | | callback | Callback&lt;void&gt; | No | Void callback. |
**Example** **Example**
......
# @ohos.reminderAgent # @ohos.reminderAgent (reminderAgent)
The **reminderAgent** module provides APIs for publishing scheduled reminders through the reminder agent. The **reminderAgent** module provides APIs for publishing scheduled reminders through the reminder agent.
......
# @ohos.reminderAgentManager # @ohos.reminderAgentManager (reminderAgentManager)
The **reminderAgentManager** module provides APIs for publishing scheduled reminders through the reminder agent. The **reminderAgentManager** module provides APIs for publishing scheduled reminders through the reminder agent.
......
...@@ -236,7 +236,7 @@ Requests a continuous task from the system. This API uses an asynchronous callba ...@@ -236,7 +236,7 @@ Requests a continuous task from the system. This API uses an asynchronous callba
| --------- | ---------------------------------- | ---- | ---------------------------------------- | | --------- | ---------------------------------- | ---- | ---------------------------------------- |
| context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-ability-context.md).| | context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-ability-context.md).|
| bgMode | [BackgroundMode](#backgroundmode) | Yes | Background mode requested. | | bgMode | [BackgroundMode](#backgroundmode) | Yes | Background mode requested. |
| wantAgent | [WantAgent](js-apis-wantAgent.md) | Yes | Notification parameter, which is used to specify the target page that is redirected to when a continuous task notification is clicked. | | wantAgent | [WantAgent](js-apis-app-ability-wantAgent.md) | Yes | Notification parameter, which is used to specify the target page that is redirected to when a continuous task notification is clicked. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result. | | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result. |
**Error codes** **Error codes**
...@@ -256,7 +256,7 @@ For details about the error codes, see [backgroundTaskManager Error Codes](../er ...@@ -256,7 +256,7 @@ For details about the error codes, see [backgroundTaskManager Error Codes](../er
**Example** **Example**
```js ```js
import Ability from '@ohos.application.Ability' import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager'; import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager';
import wantAgent from '@ohos.wantAgent'; import wantAgent from '@ohos.wantAgent';
...@@ -268,13 +268,13 @@ function callback(error, data) { ...@@ -268,13 +268,13 @@ function callback(error, data) {
} }
} }
export default class MainAbility extends Ability { export default class EntryAbility extends UIAbility {
onCreate(want, launchParam) { onCreate(want, launchParam) {
let wantAgentInfo = { let wantAgentInfo = {
wants: [ wants: [
{ {
bundleName: "com.example.myapplication", bundleName: "com.example.myapplication",
abilityName: "MainAbility" abilityName: "EntryAbility"
} }
], ],
operationType: wantAgent.OperationType.START_ABILITY, operationType: wantAgent.OperationType.START_ABILITY,
...@@ -310,7 +310,7 @@ Requests a continuous task from the system. This API uses a promise to return th ...@@ -310,7 +310,7 @@ Requests a continuous task from the system. This API uses a promise to return th
| --------- | ---------------------------------- | ---- | ---------------------------------------- | | --------- | ---------------------------------- | ---- | ---------------------------------------- |
| context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-ability-context.md).| | context | Context | Yes | Application context.<br>For details about the application context of the FA model, see [Context](js-apis-inner-app-context.md).<br>For details about the application context of the stage model, see [Context](js-apis-ability-context.md).|
| bgMode | [BackgroundMode](#backgroundmode) | Yes | Background mode requested. | | bgMode | [BackgroundMode](#backgroundmode) | Yes | Background mode requested. |
| wantAgent | [WantAgent](js-apis-wantAgent.md) | Yes | Notification parameter, which is used to specify the target page that is redirected to when a continuous task notification is clicked. | | wantAgent | [WantAgent](js-apis-app-ability-wantAgent.md) | Yes | Notification parameter, which is used to specify the target page that is redirected to when a continuous task notification is clicked. |
**Return value** **Return value**
...@@ -335,17 +335,17 @@ For details about the error codes, see [backgroundTaskManager Error Codes](../er ...@@ -335,17 +335,17 @@ For details about the error codes, see [backgroundTaskManager Error Codes](../er
**Example** **Example**
```js ```js
import Ability from '@ohos.application.Ability' import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager'; import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager';
import wantAgent from '@ohos.wantAgent'; import wantAgent from '@ohos.wantAgent';
export default class MainAbility extends Ability { export default class EntryAbility extends UIAbility {
onCreate(want, launchParam) { onCreate(want, launchParam) {
let wantAgentInfo = { let wantAgentInfo = {
wants: [ wants: [
{ {
bundleName: "com.example.myapplication", bundleName: "com.example.myapplication",
abilityName: "MainAbility" abilityName: "EntryAbility"
} }
], ],
operationType: wantAgent.OperationType.START_ABILITY, operationType: wantAgent.OperationType.START_ABILITY,
...@@ -401,7 +401,7 @@ For details about the error codes, see [backgroundTaskManager Error Codes](../er ...@@ -401,7 +401,7 @@ For details about the error codes, see [backgroundTaskManager Error Codes](../er
**Example** **Example**
```js ```js
import Ability from '@ohos.application.Ability' import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager'; import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager';
function callback(error, data) { function callback(error, data) {
...@@ -412,7 +412,7 @@ function callback(error, data) { ...@@ -412,7 +412,7 @@ function callback(error, data) {
} }
} }
export default class MainAbility extends Ability { export default class EntryAbility extends UIAbility {
onCreate(want, launchParam) { onCreate(want, launchParam) {
try { try {
backgroundTaskManager.stopBackgroundRunning(this.context, callback); backgroundTaskManager.stopBackgroundRunning(this.context, callback);
...@@ -462,10 +462,10 @@ For details about the error codes, see [backgroundTaskManager Error Codes](../er ...@@ -462,10 +462,10 @@ For details about the error codes, see [backgroundTaskManager Error Codes](../er
**Example** **Example**
```js ```js
import Ability from '@ohos.application.Ability' import UIAbility from '@ohos.app.ability.UIAbility';
import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager'; import backgroundTaskManager from '@ohos.resourceschedule.backgroundTaskManager';
export default class MainAbility extends Ability { export default class EntryAbility extends UIAbility {
onCreate(want, launchParam) { onCreate(want, launchParam) {
try { try {
backgroundTaskManager.stopBackgroundRunning(this.context).then(() => { backgroundTaskManager.stopBackgroundRunning(this.context).then(() => {
......
...@@ -219,8 +219,8 @@ Queries the application usage duration statistics based on the specified start t ...@@ -219,8 +219,8 @@ Queries the application usage duration statistics based on the specified start t
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | --------------------------------------- | | -------- | ---------------------------------------- | ---- | --------------------------------------- |
| begin | number | Yes | Start time. | | begin | number | Yes | Start time, in milliseconds. |
| end | number | Yes | End time. | | end | number | Yes | End time, in milliseconds. |
| callback | AsyncCallback&lt;[BundleStatsMap](#bundlestatsmap)&gt; | Yes | Callback used to return the application usage duration statistics.| | callback | AsyncCallback&lt;[BundleStatsMap](#bundlestatsmap)&gt; | Yes | Callback used to return the application usage duration statistics.|
**Error codes** **Error codes**
...@@ -274,8 +274,8 @@ Queries the application usage duration statistics based on the specified start t ...@@ -274,8 +274,8 @@ Queries the application usage duration statistics based on the specified start t
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----- | | ----- | ------ | ---- | ----- |
| begin | number | Yes | Start time.| | begin | number | Yes | Start time, in milliseconds.|
| end | number | Yes | End time.| | end | number | Yes | End time, in milliseconds.|
**Return value** **Return value**
...@@ -333,8 +333,8 @@ Queries the application usage duration statistics in the specified time frame at ...@@ -333,8 +333,8 @@ Queries the application usage duration statistics in the specified time frame at
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---------- | ---------------------------------------- | ---- | ---------------------------------------- | | ---------- | ---------------------------------------- | ---- | ---------------------------------------- |
| byInterval | [IntervalType](#intervaltype) | Yes | Type of information to be queried. | | byInterval | [IntervalType](#intervaltype) | Yes | Type of information to be queried. |
| begin | number | Yes | Start time. | | begin | number | Yes | Start time, in milliseconds. |
| end | number | Yes | End time. | | end | number | Yes | End time, in milliseconds. |
| callback | AsyncCallback&lt;Array&lt;[BundleStatsInfo](#bundlestatsinfo)&gt;&gt; | Yes | Callback used to return the application usage duration statistics.| | callback | AsyncCallback&lt;Array&lt;[BundleStatsInfo](#bundlestatsinfo)&gt;&gt; | Yes | Callback used to return the application usage duration statistics.|
**Error codes** **Error codes**
...@@ -387,8 +387,8 @@ Queries the application usage duration statistics in the specified time frame at ...@@ -387,8 +387,8 @@ Queries the application usage duration statistics in the specified time frame at
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ---------- | ----------------------------- | ---- | ----- | | ---------- | ----------------------------- | ---- | ----- |
| byInterval | [IntervalType](#intervaltype) | Yes | Type of information to be queried.| | byInterval | [IntervalType](#intervaltype) | Yes | Type of information to be queried.|
| begin | number | Yes | Start time.| | begin | number | Yes | Start time, in milliseconds.|
| end | number | Yes | End time.| | end | number | Yes | End time, in milliseconds.|
**Return value** **Return value**
...@@ -443,8 +443,8 @@ Queries events of all applications based on the specified start time and end tim ...@@ -443,8 +443,8 @@ Queries events of all applications based on the specified start time and end tim
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | --------------------------------------- | | -------- | ---------------------------------------- | ---- | --------------------------------------- |
| begin | number | Yes | Start time. | | begin | number | Yes | Start time, in milliseconds. |
| end | number | Yes | End time. | | end | number | Yes | End time, in milliseconds. |
| callback | AsyncCallback&lt;Array&lt;[BundleEvents](#bundleevents)&gt;&gt; | Yes | Callback used to return the events obtained.| | callback | AsyncCallback&lt;Array&lt;[BundleEvents](#bundleevents)&gt;&gt; | Yes | Callback used to return the events obtained.|
**Error codes** **Error codes**
...@@ -496,8 +496,8 @@ Queries events of all applications based on the specified start time and end tim ...@@ -496,8 +496,8 @@ Queries events of all applications based on the specified start time and end tim
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----- | | ----- | ------ | ---- | ----- |
| begin | number | Yes | Start time.| | begin | number | Yes | Start time, in milliseconds.|
| end | number | Yes | End time.| | end | number | Yes | End time, in milliseconds.|
**Return value** **Return value**
...@@ -548,8 +548,8 @@ Queries events of this application based on the specified start time and end tim ...@@ -548,8 +548,8 @@ Queries events of this application based on the specified start time and end tim
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | --------------------------------------- | | -------- | ---------------------------------------- | ---- | --------------------------------------- |
| begin | number | Yes | Start time. | | begin | number | Yes | Start time, in milliseconds. |
| end | number | Yes | End time. | | end | number | Yes | End time, in milliseconds. |
| callback | AsyncCallback&lt;Array&lt;[BundleEvents](#bundleevents)&gt;&gt; | Yes | Callback used to return the events obtained.| | callback | AsyncCallback&lt;Array&lt;[BundleEvents](#bundleevents)&gt;&gt; | Yes | Callback used to return the events obtained.|
**Error codes** **Error codes**
...@@ -597,8 +597,8 @@ Queries events of this application based on the specified start time and end tim ...@@ -597,8 +597,8 @@ Queries events of this application based on the specified start time and end tim
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----- | | ----- | ------ | ---- | ----- |
| begin | number | Yes | Start time.| | begin | number | Yes | Start time, in milliseconds.|
| end | number | Yes | End time.| | end | number | Yes | End time, in milliseconds.|
**Return value** **Return value**
...@@ -1276,8 +1276,8 @@ Queries statistics about system events (hibernation, wakeup, unlocking, and scre ...@@ -1276,8 +1276,8 @@ Queries statistics about system events (hibernation, wakeup, unlocking, and scre
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----- | | ----- | ------ | ---- | ----- |
| begin | number | Yes | Start time.| | begin | number | Yes | Start time, in milliseconds.|
| end | number | Yes | End time.| | end | number | Yes | End time, in milliseconds.|
**Return value** **Return value**
...@@ -1329,8 +1329,8 @@ queryDeviceEventStats(begin: number, end: number, callback: AsyncCallback&lt;Arr ...@@ -1329,8 +1329,8 @@ queryDeviceEventStats(begin: number, end: number, callback: AsyncCallback&lt;Arr
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ---------------------------------------- | | -------- | ---------------------------------------- | ---- | ---------------------------------------- |
| begin | number | Yes | Start time. | | begin | number | Yes | Start time, in milliseconds. |
| end | number | Yes | End time. | | end | number | Yes | End time, in milliseconds. |
| callback | AsyncCallback&lt;Array&lt;[DeviceEventStats](#deviceeventstats)&gt;&gt; | Yes | Callback used to return the result. | | callback | AsyncCallback&lt;Array&lt;[DeviceEventStats](#deviceeventstats)&gt;&gt; | Yes | Callback used to return the result. |
**Error codes** **Error codes**
...@@ -1379,8 +1379,8 @@ Queries the number of notifications from all applications based on the specified ...@@ -1379,8 +1379,8 @@ Queries the number of notifications from all applications based on the specified
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----- | ------ | ---- | ----- | | ----- | ------ | ---- | ----- |
| begin | number | Yes | Start time.| | begin | number | Yes | Start time, in milliseconds.|
| end | number | Yes | End time.| | end | number | Yes | End time, in milliseconds.|
**Return value** **Return value**
...@@ -1432,8 +1432,8 @@ Queries the number of notifications from all applications based on the specified ...@@ -1432,8 +1432,8 @@ Queries the number of notifications from all applications based on the specified
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | ---------------------------------------- | ---- | ---------------------------------------- | | -------- | ---------------------------------------- | ---- | ---------------------------------------- |
| begin | number | Yes | Start time. | | begin | number | Yes | Start time, in milliseconds. |
| end | number | Yes | End time. | | end | number | Yes | End time, in milliseconds. |
| callback | AsyncCallback&lt;Array&lt;[DeviceEventStats](#deviceeventstats)&gt;&gt; | Yes | Callback used to return the result. | | callback | AsyncCallback&lt;Array&lt;[DeviceEventStats](#deviceeventstats)&gt;&gt; | Yes | Callback used to return the result. |
**Error codes** **Error codes**
...@@ -1476,7 +1476,7 @@ Provides the information about the FA usage. ...@@ -1476,7 +1476,7 @@ Provides the information about the FA usage.
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------------------- | ---------------------------------------- | ---- | ----------------------------- | | -------------------- | ---------------------------------------- | ---- | ----------------------------- |
| deviceId | string | No | ID of the device to which the FA belongs. | | deviceId | string | No | ID of the device to which the FA belongs. |
| bundleName | string | Yes | Name of the application bundle to which the FA belongs. | | bundleName | string | Yes | Name of the bundle to which the FA belongs. |
| moduleName | string | Yes | Name of the module to which the FA belongs. | | moduleName | string | Yes | Name of the module to which the FA belongs. |
| abilityName | string | No | **MainAbility** name of the FA. | | abilityName | string | No | **MainAbility** name of the FA. |
| appLabelId | number | No | Application label ID of the FA. | | appLabelId | number | No | Application label ID of the FA. |
......
# @ohos.resourceschedule.workScheduler # @ohos.resourceschedule.workScheduler (workScheduler)
The **workScheduler** module provides the APIs for registering, canceling, and querying Work Scheduler tasks, which do not have real-time constraints. The **workScheduler** module provides the APIs for registering, canceling, and querying Work Scheduler tasks, which do not have real-time constraints.
......
# @ohos.screen (Screen) # @ohos.screen (Screen)
The **screen** module implements basic screen management. You can use the APIs of this module to obtain a **Screen** object, listen for screen changes, and create and destroy virtual screens. The **Screen** module implements basic screen management. You can use the APIs of this module to obtain a **Screen** object, listen for screen changes, and create and destroy virtual screens.
> **NOTE** > **NOTE**
> >
......
# Sensor # @ohos.sensor (Sensor)
The **Sensor** module provides APIs for obtaining the sensor list and subscribing to sensor data. It also provides some common sensor algorithms. The **Sensor** module provides APIs for obtaining the sensor list and subscribing to sensor data. It also provides some common sensor algorithms.
> **NOTE** > **NOTE**
>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
...@@ -3495,9 +3496,9 @@ Describes the acceleration sensor data. It extends from [Response](#response). ...@@ -3495,9 +3496,9 @@ Describes the acceleration sensor data. It extends from [Response](#response).
| Name| Type | Readable| Writable| Description | | Name| Type | Readable| Writable| Description |
| ---- | ------ | ---- | ---- | ------------------------------------ | | ---- | ------ | ---- | ---- | ------------------------------------ |
| x | number | Yes | Yes | Acceleration along the x-axis of the device, in m/s2.| | x | number | Yes | Yes | Acceleration along the x-axis of the device, in m/s². |
| y | number | Yes | Yes | Acceleration along the y-axis of the device, in m/s2.| | y | number | Yes | Yes | Acceleration along the y-axis of the device, in m/s². |
| z | number | Yes | Yes | Acceleration along the z-axis of the device, in m/s2.| | z | number | Yes | Yes | Acceleration along the z-axis of the device, in m/s². |
## LinearAccelerometerResponse ## LinearAccelerometerResponse
...@@ -3509,9 +3510,9 @@ Describes the linear acceleration sensor data. It extends from [Response](#respo ...@@ -3509,9 +3510,9 @@ Describes the linear acceleration sensor data. It extends from [Response](#respo
| Name| Type | Readable| Writable| Description | | Name| Type | Readable| Writable| Description |
| ---- | ------ | ---- | ---- | ---------------------------------------- | | ---- | ------ | ---- | ---- | ---------------------------------------- |
| x | number | Yes | Yes | Linear acceleration along the x-axis of the device, in m/s2.| | x | number | Yes | Yes | Linear acceleration along the x-axis of the device, in m/s². |
| y | number | Yes | Yes | Linear acceleration along the y-axis of the device, in m/s2.| | y | number | Yes | Yes | Linear acceleration along the y-axis of the device, in m/s². |
| z | number | Yes | Yes | Linear acceleration along the z-axis of the device, in m/s2.| | z | number | Yes | Yes | Linear acceleration along the z-axis of the device, in m/s². |
## AccelerometerUncalibratedResponse ## AccelerometerUncalibratedResponse
...@@ -3523,12 +3524,12 @@ Describes the uncalibrated acceleration sensor data. It extends from [Response]( ...@@ -3523,12 +3524,12 @@ Describes the uncalibrated acceleration sensor data. It extends from [Response](
| Name | Type | Readable| Writable| Description | | Name | Type | Readable| Writable| Description |
| ----- | ------ | ---- | ---- | ------------------------------------------------ | | ----- | ------ | ---- | ---- | ------------------------------------------------ |
| x | number | Yes | Yes | Uncalibrated acceleration along the x-axis of the device, in m/s2. | | x | number | Yes | Yes | Uncalibrated acceleration along the x-axis of the device, in m/s². |
| y | number | Yes | Yes | Uncalibrated acceleration along the y-axis of the device, in m/s2. | | y | number | Yes | Yes | Uncalibrated acceleration along the y-axis of the device, in m/s². |
| z | number | Yes | Yes | Uncalibrated acceleration along the z-axis of the device, in m/s2. | | z | number | Yes | Yes | Uncalibrated acceleration along the z-axis of the device, in m/s². |
| biasX | number | Yes | Yes | Uncalibrated acceleration bias along the x-axis of the device, in m/s2. | | biasX | number | Yes | Yes | Uncalibrated acceleration bias along the x-axis of the device, in m/s². |
| biasY | number | Yes | Yes | Uncalibrated acceleration bias along the y-axis of the device, in m/s2.| | biasY | number | Yes | Yes | Uncalibrated acceleration bias along the y-axis of the device, in m/s². |
| biasZ | number | Yes | Yes | Uncalibrated acceleration bias along the z-axis of the device, in m/s2. | | biasZ | number | Yes | Yes | Uncalibrated acceleration bias along the z-axis of the device, in m/s². |
## GravityResponse ## GravityResponse
...@@ -3540,9 +3541,9 @@ Describes the gravity sensor data. It extends from [Response](#response). ...@@ -3540,9 +3541,9 @@ Describes the gravity sensor data. It extends from [Response](#response).
| Name| Type | Readable| Writable| Description | | Name| Type | Readable| Writable| Description |
| ---- | ------ | ---- | ---- | ---------------------------------------- | | ---- | ------ | ---- | ---- | ---------------------------------------- |
| x | number | Yes | Yes | Gravitational acceleration along the x-axis of the device, in m/s2.| | x | number | Yes | Yes | Gravitational acceleration along the x-axis of the device, in m/s². |
| y | number | Yes | Yes | Gravitational acceleration along the y-axis of the device, in m/s2.| | y | number | Yes | Yes | Gravitational acceleration along the y-axis of the device, in m/s². |
| z | number | Yes | Yes | Gravitational acceleration along the z-axis of the device, in m/s2.| | z | number | Yes | Yes | Gravitational acceleration along the z-axis of the device, in m/s². |
## OrientationResponse ## OrientationResponse
......
# @system.app # @system.app (Application Context)
> **NOTE** > **NOTE**
> - The APIs of this module are no longer maintained since API version 7. You are advised to use the new APIs. > - The APIs of this module are no longer maintained since API version 7. You are advised to use the new APIs.
......
# Sensor # @system.sensor (Sensor)
The **Sensor** module provides APIs for querying the sensor list, subscribing to or unsubscribing from sensor data, and executing control commands. The **Sensor** module provides APIs for querying the sensor list, subscribing to or unsubscribing from sensor data, and executing control commands.
...@@ -21,9 +21,9 @@ import sensor from '@system.sensor'; ...@@ -21,9 +21,9 @@ import sensor from '@system.sensor';
## Error Codes ## Error Codes
| Error Code | Description | | Error Code | Description |
| ---------- | ---------------------------------------- | | ---- | -------------- |
| 900 | The current device does not support the corresponding sensor. | | 900 | The current device does not support the corresponding sensor.|
## sensor.subscribeAccelerometer ## sensor.subscribeAccelerometer
...@@ -37,19 +37,19 @@ Subscribes to data changes of the acceleration sensor. If this API is called mul ...@@ -37,19 +37,19 @@ Subscribes to data changes of the acceleration sensor. If this API is called mul
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | -------- | --------- | ---------------------------------------- | | -------- | -------- | ---- | ---------------------------------------- |
| interval | string | Yes | Execution frequency of the callback for returning the acceleration sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios. | | interval | string | Yes | Execution frequency of the callback for returning the acceleration sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios.|
| success | Function | Yes | Called when the acceleration sensor data changes. | | success | Function | Yes | Called when the acceleration sensor data changes. |
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| ---- | ------ | --------------------------- | | ---- | ------ | ------- |
| x | number | Acceleration on the x-axis. | | x | number | Acceleration on the x-axis.|
| y | number | Acceleration on the y-axis. | | y | number | Acceleration on the y-axis.|
| z | number | Acceleration on the z-axis. | | z | number | Acceleration on the z-axis.|
**Example** **Example**
...@@ -68,7 +68,6 @@ sensor.subscribeAccelerometer({ ...@@ -68,7 +68,6 @@ sensor.subscribeAccelerometer({
``` ```
> **NOTE** > **NOTE**
>
> To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback. > To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback.
## sensor.unsubscribeAccelerometer ## sensor.unsubscribeAccelerometer
...@@ -97,16 +96,16 @@ Subscribes to data changes of the compass sensor. If this API is called multiple ...@@ -97,16 +96,16 @@ Subscribes to data changes of the compass sensor. If this API is called multiple
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | -------- | --------- | ---------------------------------------- | | ------- | -------- | ---- | --------------- |
| success | Function | Yes | Called when the compass sensor data changes. | | success | Function | Yes | Called when the compass sensor data changes.|
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| --------- | ------ | ------------------------------------ | | --------- | ------ | ---------- |
| direction | number | Direction of the device, in degrees. | | direction | number | Direction of the device, in degrees.|
**Example** **Example**
...@@ -122,7 +121,6 @@ sensor.subscribeCompass({ ...@@ -122,7 +121,6 @@ sensor.subscribeCompass({
``` ```
> **NOTE** > **NOTE**
>
> To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback. > To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback.
## sensor.unsubscribeCompass ## sensor.unsubscribeCompass
...@@ -149,16 +147,16 @@ Subscribes to data changes of the proximity sensor. If this API is called multip ...@@ -149,16 +147,16 @@ Subscribes to data changes of the proximity sensor. If this API is called multip
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | -------- | --------- | ---------------------------------------- | | ------- | -------- | ---- | ----------------- |
| success | Function | Yes | Called when the proximity sensor data changes. | | success | Function | Yes | Called when the proximity sensor data changes.|
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| -------- | ------ | ---------------------------------------- | | -------- | ------ | --------------------- |
| distance | number | Distance between a visible object and the device screen. | | distance | number | Distance between a visible object and the device screen.|
**Example** **Example**
...@@ -174,7 +172,6 @@ sensor.subscribeProximity({ ...@@ -174,7 +172,6 @@ sensor.subscribeProximity({
``` ```
> **NOTE** > **NOTE**
>
> To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback. > To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback.
## sensor.unsubscribeProximity ## sensor.unsubscribeProximity
...@@ -201,16 +198,16 @@ Subscribes to data changes of the ambient light sensor. If this API is called mu ...@@ -201,16 +198,16 @@ Subscribes to data changes of the ambient light sensor. If this API is called mu
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | -------- | --------- | ---------------------------------------- | | ------- | -------- | ---- | --------------- |
| success | Function | Yes | Called when the ambient light sensor data changes | | success | Function | Yes | Called when the ambient light sensor data changes|
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| --------- | ------ | ------------------------ | | --------- | ------ | ------------ |
| intensity | number | Light intensity, in lux. | | intensity | number | Light intensity, in lux.|
**Example** **Example**
...@@ -226,7 +223,6 @@ sensor.subscribeLight({ ...@@ -226,7 +223,6 @@ sensor.subscribeLight({
``` ```
> **NOTE** > **NOTE**
>
> To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback. > To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback.
## sensor.unsubscribeLight ## sensor.unsubscribeLight
...@@ -255,16 +251,16 @@ Subscribes to data changes of the step counter sensor. If this API is called mul ...@@ -255,16 +251,16 @@ Subscribes to data changes of the step counter sensor. If this API is called mul
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | -------- | --------- | ---------------------------------------- | | ------- | -------- | ---- | ---------------- |
| success | Function | Yes | Called when the step counter sensor data changes. | | success | Function | Yes | Called when the step counter sensor data changes.|
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| ----- | ------ | ---------------------------------------- | | ----- | ------ | --------------------- |
| steps | number | Number of counted steps after the sensor is restarted.<br> | | steps | number | Number of counted steps after the sensor is restarted.<br>|
**Example** **Example**
...@@ -280,7 +276,6 @@ sensor.subscribeStepCounter({ ...@@ -280,7 +276,6 @@ sensor.subscribeStepCounter({
``` ```
> **NOTE** > **NOTE**
>
> To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback. > To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback.
## sensor.unsubscribeStepCounter ## sensor.unsubscribeStepCounter
...@@ -310,16 +305,16 @@ Subscribes to data changes of the barometer sensor. If this API is called multip ...@@ -310,16 +305,16 @@ Subscribes to data changes of the barometer sensor. If this API is called multip
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | -------- | --------- | ---------------------------------------- | | ------- | -------- | ---- | ---------------- |
| success | Function | Yes | Called when the barometer sensor data changes. | | success | Function | Yes | Called when the barometer sensor data changes.|
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| -------- | ------ | -------------------- | | -------- | ------ | ----------- |
| pressure | number | Pressure, in pascal. | | pressure | number | Pressure, in pascal.|
**Example** **Example**
...@@ -335,7 +330,6 @@ sensor.subscribeBarometer({ ...@@ -335,7 +330,6 @@ sensor.subscribeBarometer({
``` ```
> **NOTE** > **NOTE**
>
> To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback. > To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback.
...@@ -366,16 +360,16 @@ Subscribes to data changes of the heart rate sensor. If this API is called multi ...@@ -366,16 +360,16 @@ Subscribes to data changes of the heart rate sensor. If this API is called multi
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | -------- | --------- | ---------------------------------------- | | ------- | -------- | ---- | ------------------------- |
| success | Function | Yes | Called when the heart rate sensor data changes. This callback is invoked every five seconds. | | success | Function | Yes | Called when the heart rate sensor data changes. This callback is invoked every five seconds.|
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| --------- | ------ | ----------- | | --------- | ------ | ---- |
| heartRate | number | Heart rate. | | heartRate | number | Heart rate.|
**Example** **Example**
...@@ -391,7 +385,6 @@ sensor.subscribeHeartRate({ ...@@ -391,7 +385,6 @@ sensor.subscribeHeartRate({
``` ```
> **NOTE** > **NOTE**
>
> To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback. > To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback.
...@@ -421,16 +414,16 @@ Subscribes to changes of the wearing state of a wearable device. If this API is ...@@ -421,16 +414,16 @@ Subscribes to changes of the wearing state of a wearable device. If this API is
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ------- | -------- | --------- | -------------------------------------- | | ------- | -------- | ---- | ------------- |
| success | Function | Yes | Called when the wearing state changes. | | success | Function | Yes | Called when the wearing state changes.|
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| ----- | ------- | ------------------------------------ | | ----- | ------- | ------ |
| value | boolean | Whether the wearable device is worn. | | value | boolean | Whether the wearable device is worn.|
**Example** **Example**
...@@ -446,7 +439,6 @@ sensor.subscribeOnBodyState({ ...@@ -446,7 +439,6 @@ sensor.subscribeOnBodyState({
``` ```
> **NOTE** > **NOTE**
>
> To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback. > To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback.
## sensor.unsubscribeOnBodyState ## sensor.unsubscribeOnBodyState
...@@ -473,17 +465,17 @@ Obtains the wearing state of a wearable device. ...@@ -473,17 +465,17 @@ Obtains the wearing state of a wearable device.
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | -------- | --------- | -------------------------------------- | | -------- | -------- | ---- | ------------ |
| success | Function | No | Callback upon success. | | success | Function | No | Callback upon success.|
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure.|
| complete | Function | No | Called when the execution is complete. | | complete | Function | No | Called when the execution is complete.|
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| ----- | ------- | ------------------------------------ | | ----- | ------- | ------ |
| value | boolean | Whether the wearable device is worn. | | value | boolean | Whether the wearable device is worn.|
**Example** **Example**
...@@ -510,18 +502,18 @@ If this API is called multiple times for the same application, the last call tak ...@@ -510,18 +502,18 @@ If this API is called multiple times for the same application, the last call tak
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | -------- | --------- | ---------------------------------------- | | -------- | -------- | ---- | ---------------------------------------- |
| interval | string | Yes | Interval at which the callback is invoked to return the device orientation sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios. | | interval | string | Yes | Interval at which the callback is invoked to return the device orientation sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios.|
| success | Function | Yes | Called when the device orientation sensor data changes. | | success | Function | Yes | Called when the device orientation sensor data changes. |
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| ----- | ------ | ---------------------------------------- | | ----- | ------ | ---------------------------------------- |
| alpha | number | Rotation angle around the Z axis when the X/Y axis of the device coincides with the X/Y axis of the earth. | | alpha | number | Rotation angle around the Z axis when the X/Y axis of the device coincides with the X/Y axis of the earth.|
| beta | number | Rotation angle around the X axis when the Y/Z axis of the device coincides with the Y/Z axis of the earth. | | beta | number | Rotation angle around the X axis when the Y/Z axis of the device coincides with the Y/Z axis of the earth.|
| gamma | number | Rotation angle around the Y axis when the X/Z axis of the device coincides with the X/Z axis of the earth. | | gamma | number | Rotation angle around the Y axis when the X/Z axis of the device coincides with the X/Z axis of the earth.|
**Example** **Example**
...@@ -540,7 +532,6 @@ sensor.subscribeDeviceOrientation({ ...@@ -540,7 +532,6 @@ sensor.subscribeDeviceOrientation({
``` ```
> **NOTE** > **NOTE**
>
> To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback. > To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback.
## sensor.unsubscribeDeviceOrientation<sup>6+</sup> ## sensor.unsubscribeDeviceOrientation<sup>6+</sup>
...@@ -571,19 +562,19 @@ If this API is called multiple times for the same application, the last call tak ...@@ -571,19 +562,19 @@ If this API is called multiple times for the same application, the last call tak
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------- | -------- | --------- | ---------------------------------------- | | -------- | -------- | ---- | ---------------------------------------- |
| interval | string | Yes | Interval at which the callback is invoked to return the gyroscope sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios. | | interval | string | Yes | Interval at which the callback is invoked to return the gyroscope sensor data.<br>The default value is **normal**. The options are as follows:<br>- **game**: called at an interval of 20 ms, which is applicable to gaming scenarios.<br>- **ui**: called at an interval of 60 ms, which is applicable to UI updating scenarios.<br>- **normal**: called at an interval of 200 ms, which is applicable to power-saving scenarios.|
| success | Function | Yes | Called when the gyroscope sensor data changes. | | success | Function | Yes | Called when the gyroscope sensor data changes. |
| fail | Function | No | Callback upon failure. | | fail | Function | No | Callback upon failure. |
Return values of the success callback Return values of the success callback
| Name | Type | Description | | Name | Type | Description |
| ---- | ------ | ---------------------------------------- | | ---- | ------ | --------- |
| x | number | Rotation angular velocity of the X axis. | | x | number | Rotation angular velocity of the X axis.|
| y | number | Rotation angular velocity of the Y axis. | | y | number | Rotation angular velocity of the Y axis.|
| z | number | Rotation angular velocity of the Z axis. | | z | number | Rotation angular velocity of the Z axis.|
**Example** **Example**
...@@ -602,7 +593,6 @@ sensor.subscribeGyroscope({ ...@@ -602,7 +593,6 @@ sensor.subscribeGyroscope({
``` ```
> **NOTE** > **NOTE**
>
> To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback. > To reduce performance overhead, you are advised to unsubscribe from the sensor data in the **onDestory** callback.
## sensor.unsubscribeGyroscope<sup>6+</sup> ## sensor.unsubscribeGyroscope<sup>6+</sup>
......
# Vibrator # @system.vibrator (Vibrator)
The **Vibrate** module provides APIs for controlling LED lights and vibrators. You can use the APIs to query the LED light list, turn on and off the LED light, query the vibrator list, query the vibrator effect, and trigger and turn off the vibrator.
The **Vibrator** module provides APIs for controlling LED lights and vibrators. You can use the APIs to query the LED light list, turn on and off the LED light, query the vibrator list, query the vibrator effect, and trigger and turn off the vibrator.
Misc devices refer to LED lights and vibrators on devices. LED lights are mainly used for indication (for example, indicating the charging state) and blinking (such as tri-colored lights). Vibrators are mainly used in scenarios such as the alarm clock, power-on/off, and incoming call vibration. Misc devices refer to LED lights and vibrators on devices. LED lights are mainly used for indication (for example, indicating the charging state) and blinking (such as tri-colored lights). Vibrators are mainly used in scenarios such as the alarm clock, power-on/off, and incoming call vibration.
......
# Vibrator # @ohos.vibrator (Vibrator)
The **vibrator** module provides APIs for starting or stopping vibration. The **vibrator** module provides APIs for starting or stopping vibration.
......
...@@ -43,9 +43,9 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0); ...@@ -43,9 +43,9 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
**Table 1** Type **Table 1** Type
| Name| Type| | Name| Type|
| -------- | -------- | | -------- | -------- |
| GLenum | number | | GLenum | number |
| GLboolean | boolean | | GLboolean | boolean |
| GLbitfield | number | | GLbitfield | number |
| GLbyte | number | | GLbyte | number |
...@@ -58,7 +58,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0); ...@@ -58,7 +58,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
| GLushort | number | | GLushort | number |
| GLuint | number | | GLuint | number |
| GLfloat | number | | GLfloat | number |
| GLclampf | number | | GLclampf | number |
| TexImageSource | ImageData | | TexImageSource | ImageData |
| Float32List | array | | Float32List | array |
| Int32List | array | | Int32List | array |
...@@ -81,7 +81,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0); ...@@ -81,7 +81,7 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
| WebGLShader | | WebGLShader |
| WebGLTexture | | WebGLTexture |
| WebGLUniformLocation | | WebGLUniformLocation |
| [WebGLActiveInfo](#webglactiveinfo) | | [WebGLActiveInfo](#webglactiveinfo) |
| [WebGLShaderPrecisionFormat](#webglshaderprecisionformat) | | [WebGLShaderPrecisionFormat](#webglshaderprecisionformat) |
| [WebGLRenderingContextBase](#webglrenderingcontextbase) | | [WebGLRenderingContextBase](#webglrenderingcontextbase) |
| [WebGLRenderingContextOverloads](#webglrenderingcontextoverloads) | | [WebGLRenderingContextOverloads](#webglrenderingcontextoverloads) |
...@@ -92,39 +92,39 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0); ...@@ -92,39 +92,39 @@ gl.clearColor(0.0, 0.0, 0.0, 1.0);
WebGLContextAttributes WebGLContextAttributes
| Name| Type| Mandatory| | Name| Type| Mandatory|
| -------- | -------- | -------- | | -------- | -------- | -------- |
| alpha | boolean | No| | alpha | boolean | No|
| depth | boolean | No| | depth | boolean | No|
| stencil | boolean | No| | stencil | boolean | No|
| antialias | boolean | No| | antialias | boolean | No|
| premultipliedAlpha | boolean | No| | premultipliedAlpha | boolean | No|
| preserveDrawingBuffer | boolean | No| | preserveDrawingBuffer | boolean | No|
| powerPreference | WebGLPowerPreference | No| | powerPreference | WebGLPowerPreference | No|
| failIfMajorPerformanceCaveat | boolean | No| | failIfMajorPerformanceCaveat | boolean | No|
| desynchronized | boolean | No| | desynchronized | boolean | No|
## WebGLActiveInfo ## WebGLActiveInfo
WebGLActiveInfo WebGLActiveInfo
| Name| Type| Mandatory| | Name| Type| Mandatory|
| -------- | -------- | -------- | | -------- | -------- | -------- |
| size | GLint | Yes| | size | GLint | Yes|
| type | GLenum | Yes| | type | GLenum | Yes|
| name | string | Yes| | name | string | Yes|
## WebGLShaderPrecisionFormat ## WebGLShaderPrecisionFormat
WebGLShaderPrecisionFormat WebGLShaderPrecisionFormat
| Name| Type| Mandatory| | Name| Type| Mandatory|
| -------- | -------- | -------- | | -------- | -------- | -------- |
| rangeMin | GLint | Yes| | rangeMin | GLint | Yes|
| rangeMax | GLint | Yes| | rangeMax | GLint | Yes|
| precision | GLint | Yes| | precision | GLint | Yes|
## WebGLRenderingContextBase ## WebGLRenderingContextBase
...@@ -134,455 +134,455 @@ WebGLRenderingContextBase ...@@ -134,455 +134,455 @@ WebGLRenderingContextBase
### Attributes ### Attributes
| Name| Type| Mandatory| | Name| Type| Mandatory|
| -------- | -------- | -------- | | -------- | -------- | -------- |
| DEPTH_BUFFER_BIT | GLenum | Yes| | DEPTH_BUFFER_BIT | GLenum | Yes|
| STENCIL_BUFFER_BIT | GLenum | Yes| | STENCIL_BUFFER_BIT | GLenum | Yes|
| COLOR_BUFFER_BIT | GLenum | Yes| | COLOR_BUFFER_BIT | GLenum | Yes|
| POINTS | GLenum | Yes| | POINTS | GLenum | Yes|
| LINES | GLenum | Yes| | LINES | GLenum | Yes|
| LINE_LOOP | GLenum | Yes| | LINE_LOOP | GLenum | Yes|
| LINE_STRIP | GLenum | Yes| | LINE_STRIP | GLenum | Yes|
| TRIANGLES | GLenum | Yes| | TRIANGLES | GLenum | Yes|
| TRIANGLE_STRIP | GLenum | Yes| | TRIANGLE_STRIP | GLenum | Yes|
| TRIANGLE_FAN | GLenum | Yes| | TRIANGLE_FAN | GLenum | Yes|
| ZERO | GLenum | Yes| | ZERO | GLenum | Yes|
| ONE | GLenum | Yes| | ONE | GLenum | Yes|
| SRC_COLOR | GLenum | Yes| | SRC_COLOR | GLenum | Yes|
| ONE_MINUS_SRC_COLOR | GLenum | Yes| | ONE_MINUS_SRC_COLOR | GLenum | Yes|
| SRC_ALPHA | GLenum | Yes| | SRC_ALPHA | GLenum | Yes|
| ONE_MINUS_SRC_ALPHA | GLenum | Yes| | ONE_MINUS_SRC_ALPHA | GLenum | Yes|
| DST_ALPHA | GLenum | Yes| | DST_ALPHA | GLenum | Yes|
| ONE_MINUS_DST_ALPHA | GLenum | Yes| | ONE_MINUS_DST_ALPHA | GLenum | Yes|
| DST_COLOR | GLenum | Yes| | DST_COLOR | GLenum | Yes|
| ONE_MINUS_DST_COLOR | GLenum | Yes| | ONE_MINUS_DST_COLOR | GLenum | Yes|
| SRC_ALPHA_SATURATE | GLenum | Yes| | SRC_ALPHA_SATURATE | GLenum | Yes|
| FUNC_ADD | GLenum | Yes| | FUNC_ADD | GLenum | Yes|
| BLEND_EQUATION | GLenum | Yes| | BLEND_EQUATION | GLenum | Yes|
| BLEND_EQUATION_RGB | GLenum | Yes| | BLEND_EQUATION_RGB | GLenum | Yes|
| BLEND_EQUATION_ALPHA | GLenum | Yes| | BLEND_EQUATION_ALPHA | GLenum | Yes|
| FUNC_SUBTRACT | GLenum | Yes| | FUNC_SUBTRACT | GLenum | Yes|
| FUNC_REVERSE_SUBTRACT | GLenum | Yes| | FUNC_REVERSE_SUBTRACT | GLenum | Yes|
| BLEND_DST_RGB | GLenum | Yes| | BLEND_DST_RGB | GLenum | Yes|
| BLEND_SRC_RGB | GLenum | Yes| | BLEND_SRC_RGB | GLenum | Yes|
| BLEND_DST_ALPHA | GLenum | Yes| | BLEND_DST_ALPHA | GLenum | Yes|
| BLEND_SRC_ALPHA | GLenum | Yes| | BLEND_SRC_ALPHA | GLenum | Yes|
| CONSTANT_COLOR | GLenum | Yes| | CONSTANT_COLOR | GLenum | Yes|
| ONE_MINUS_CONSTANT_COLOR | GLenum | Yes| | ONE_MINUS_CONSTANT_COLOR | GLenum | Yes|
| CONSTANT_ALPHA | GLenum | Yes| | CONSTANT_ALPHA | GLenum | Yes|
| ONE_MINUS_CONSTANT_ALPHA | GLenum | Yes| | ONE_MINUS_CONSTANT_ALPHA | GLenum | Yes|
| BLEND_COLOR | GLenum | Yes| | BLEND_COLOR | GLenum | Yes|
| ARRAY_BUFFER | GLenum | Yes| | ARRAY_BUFFER | GLenum | Yes|
| ELEMENT_ARRAY_BUFFER | GLenum | Yes| | ELEMENT_ARRAY_BUFFER | GLenum | Yes|
| ARRAY_BUFFER_BINDING | GLenum | Yes| | ARRAY_BUFFER_BINDING | GLenum | Yes|
| ELEMENT_ARRAY_BUFFER_BINDING | GLenum | Yes| | ELEMENT_ARRAY_BUFFER_BINDING | GLenum | Yes|
| STREAM_DRAW | GLenum | Yes| | STREAM_DRAW | GLenum | Yes|
| STATIC_DRAW | GLenum | Yes| | STATIC_DRAW | GLenum | Yes|
| DYNAMIC_DRAW | GLenum | Yes| | DYNAMIC_DRAW | GLenum | Yes|
| BUFFER_SIZE | GLenum | Yes| | BUFFER_SIZE | GLenum | Yes|
| BUFFER_USAGE | GLenum | Yes| | BUFFER_USAGE | GLenum | Yes|
| CURRENT_VERTEX_ATTRIB | GLenum | Yes| | CURRENT_VERTEX_ATTRIB | GLenum | Yes|
| FRONT | GLenum | Yes| | FRONT | GLenum | Yes|
| BACK | GLenum | Yes| | BACK | GLenum | Yes|
| FRONT_AND_BACK | GLenum | Yes| | FRONT_AND_BACK | GLenum | Yes|
| CULL_FACE | GLenum | Yes| | CULL_FACE | GLenum | Yes|
| BLEND | GLenum | Yes| | BLEND | GLenum | Yes|
| DITHER | GLenum | Yes| | DITHER | GLenum | Yes|
| STENCIL_TEST | GLenum | Yes| | STENCIL_TEST | GLenum | Yes|
| DEPTH_TEST | GLenum | Yes| | DEPTH_TEST | GLenum | Yes|
| SCISSOR_TEST | GLenum | Yes| | SCISSOR_TEST | GLenum | Yes|
| POLYGON_OFFSET_FILL | GLenum | Yes| | POLYGON_OFFSET_FILL | GLenum | Yes|
| SAMPLE_ALPHA_TO_COVERAGE | GLenum | Yes| | SAMPLE_ALPHA_TO_COVERAGE | GLenum | Yes|
| SAMPLE_COVERAGE | GLenum | Yes| | SAMPLE_COVERAGE | GLenum | Yes|
| NO_ERROR | GLenum | Yes| | NO_ERROR | GLenum | Yes|
| INVALID_ENUM | GLenum | Yes| | INVALID_ENUM | GLenum | Yes|
| INVALID_VALUE | GLenum | Yes| | INVALID_VALUE | GLenum | Yes|
| INVALID_OPERATION | GLenum | Yes| | INVALID_OPERATION | GLenum | Yes|
| OUT_OF_MEMORY | GLenum | Yes| | OUT_OF_MEMORY | GLenum | Yes|
| CW | GLenum | Yes| | CW | GLenum | Yes|
| CCW | GLenum | Yes| | CCW | GLenum | Yes|
| LINE_WIDTH | GLenum | Yes| | LINE_WIDTH | GLenum | Yes|
| ALIASED_POINT_SIZE_RANGE | GLenum | Yes| | ALIASED_POINT_SIZE_RANGE | GLenum | Yes|
| ALIASED_LINE_WIDTH_RANGE | GLenum | Yes| | ALIASED_LINE_WIDTH_RANGE | GLenum | Yes|
| CULL_FACE_MODE | GLenum | Yes| | CULL_FACE_MODE | GLenum | Yes|
| FRONT_FACE | GLenum | Yes| | FRONT_FACE | GLenum | Yes|
| DEPTH_RANGE | GLenum | Yes| | DEPTH_RANGE | GLenum | Yes|
| DEPTH_WRITEMASK | GLenum | Yes| | DEPTH_WRITEMASK | GLenum | Yes|
| DEPTH_CLEAR_VALUE | GLenum | Yes| | DEPTH_CLEAR_VALUE | GLenum | Yes|
| DEPTH_FUNC | GLenum | Yes| | DEPTH_FUNC | GLenum | Yes|
| STENCIL_CLEAR_VALUE | GLenum | Yes| | STENCIL_CLEAR_VALUE | GLenum | Yes|
| STENCIL_FUNC | GLenum | Yes| | STENCIL_FUNC | GLenum | Yes|
| STENCIL_FAIL | GLenum | Yes| | STENCIL_FAIL | GLenum | Yes|
| STENCIL_PASS_DEPTH_FAIL | GLenum | Yes| | STENCIL_PASS_DEPTH_FAIL | GLenum | Yes|
| STENCIL_PASS_DEPTH_PASS | GLenum | Yes| | STENCIL_PASS_DEPTH_PASS | GLenum | Yes|
| STENCIL_REF | GLenum | Yes| | STENCIL_REF | GLenum | Yes|
| STENCIL_VALUE_MASK | GLenum | Yes| | STENCIL_VALUE_MASK | GLenum | Yes|
| STENCIL_WRITEMASK | GLenum | Yes| | STENCIL_WRITEMASK | GLenum | Yes|
| STENCIL_BACK_FUNC | GLenum | Yes| | STENCIL_BACK_FUNC | GLenum | Yes|
| STENCIL_BACK_FAIL | GLenum | Yes| | STENCIL_BACK_FAIL | GLenum | Yes|
| STENCIL_BACK_PASS_DEPTH_FAIL | GLenum | Yes| | STENCIL_BACK_PASS_DEPTH_FAIL | GLenum | Yes|
| STENCIL_BACK_PASS_DEPTH_PASS | GLenum | Yes| | STENCIL_BACK_PASS_DEPTH_PASS | GLenum | Yes|
| STENCIL_BACK_REF | GLenum | Yes| | STENCIL_BACK_REF | GLenum | Yes|
| STENCIL_BACK_VALUE_MASK | GLenum | Yes| | STENCIL_BACK_VALUE_MASK | GLenum | Yes|
| STENCIL_BACK_WRITEMASK | GLenum | Yes| | STENCIL_BACK_WRITEMASK | GLenum | Yes|
| VIEWPORT | GLenum | Yes| | VIEWPORT | GLenum | Yes|
| SCISSOR_BOX | GLenum | Yes| | SCISSOR_BOX | GLenum | Yes|
| COLOR_CLEAR_VALUE | GLenum | Yes| | COLOR_CLEAR_VALUE | GLenum | Yes|
| COLOR_WRITEMASK | GLenum | Yes| | COLOR_WRITEMASK | GLenum | Yes|
| UNPACK_ALIGNMENT | GLenum | Yes| | UNPACK_ALIGNMENT | GLenum | Yes|
| PACK_ALIGNMENT | GLenum | Yes| | PACK_ALIGNMENT | GLenum | Yes|
| MAX_TEXTURE_SIZE | GLenum | Yes| | MAX_TEXTURE_SIZE | GLenum | Yes|
| MAX_VIEWPORT_DIMS | GLenum | Yes| | MAX_VIEWPORT_DIMS | GLenum | Yes|
| SUBPIXEL_BITS | GLenum | Yes| | SUBPIXEL_BITS | GLenum | Yes|
| RED_BITS | GLenum | Yes| | RED_BITS | GLenum | Yes|
| GREEN_BITS | GLenum | Yes| | GREEN_BITS | GLenum | Yes|
| BLUE_BITS | GLenum | Yes| | BLUE_BITS | GLenum | Yes|
| ALPHA_BITS | GLenum | Yes| | ALPHA_BITS | GLenum | Yes|
| DEPTH_BITS | GLenum | Yes| | DEPTH_BITS | GLenum | Yes|
| STENCIL_BITS | GLenum | Yes| | STENCIL_BITS | GLenum | Yes|
| POLYGON_OFFSET_UNITS | GLenum | Yes| | POLYGON_OFFSET_UNITS | GLenum | Yes|
| POLYGON_OFFSET_FACTOR | GLenum | Yes| | POLYGON_OFFSET_FACTOR | GLenum | Yes|
| TEXTURE_BINDING_2D | GLenum | Yes| | TEXTURE_BINDING_2D | GLenum | Yes|
| SAMPLE_BUFFERS | GLenum | Yes| | SAMPLE_BUFFERS | GLenum | Yes|
| SAMPLES | GLenum | Yes| | SAMPLES | GLenum | Yes|
| SAMPLE_COVERAGE_VALUE | GLenum | Yes| | SAMPLE_COVERAGE_VALUE | GLenum | Yes|
| SAMPLE_COVERAGE_INVERT | GLenum | Yes| | SAMPLE_COVERAGE_INVERT | GLenum | Yes|
| COMPRESSED_TEXTURE_FORMATS | GLenum | Yes| | COMPRESSED_TEXTURE_FORMATS | GLenum | Yes|
| DONT_CARE | GLenum | Yes| | DONT_CARE | GLenum | Yes|
| FASTEST | GLenum | Yes| | FASTEST | GLenum | Yes|
| NICEST | GLenum | Yes| | NICEST | GLenum | Yes|
| GENERATE_MIPMAP_HINT | GLenum | Yes| | GENERATE_MIPMAP_HINT | GLenum | Yes|
| BYTE | GLenum | Yes| | BYTE | GLenum | Yes|
| UNSIGNED_BYTE | GLenum | Yes| | UNSIGNED_BYTE | GLenum | Yes|
| SHORT | GLenum | Yes| | SHORT | GLenum | Yes|
| UNSIGNED_SHORT | GLenum | Yes| | UNSIGNED_SHORT | GLenum | Yes|
| INT | GLenum | Yes| | INT | GLenum | Yes|
| UNSIGNED_INT | GLenum | Yes| | UNSIGNED_INT | GLenum | Yes|
| FLOAT | GLenum | Yes| | FLOAT | GLenum | Yes|
| DEPTH_COMPONENT | GLenum | Yes| | DEPTH_COMPONENT | GLenum | Yes|
| ALPHA | GLenum | Yes| | ALPHA | GLenum | Yes|
| RGB | GLenum | Yes| | RGB | GLenum | Yes|
| RGBA | GLenum | Yes| | RGBA | GLenum | Yes|
| LUMINANCE | GLenum | Yes| | LUMINANCE | GLenum | Yes|
| LUMINANCE_ALPHA | GLenum | Yes| | LUMINANCE_ALPHA | GLenum | Yes|
| UNSIGNED_SHORT_4_4_4_4 | GLenum | Yes| | UNSIGNED_SHORT_4_4_4_4 | GLenum | Yes|
| UNSIGNED_SHORT_5_5_5_1 | GLenum | Yes| | UNSIGNED_SHORT_5_5_5_1 | GLenum | Yes|
| UNSIGNED_SHORT_5_6_5 | GLenum | Yes| | UNSIGNED_SHORT_5_6_5 | GLenum | Yes|
| FRAGMENT_SHADER | GLenum | Yes| | FRAGMENT_SHADER | GLenum | Yes|
| VERTEX_SHADER | GLenum | Yes| | VERTEX_SHADER | GLenum | Yes|
| MAX_VERTEX_ATTRIBS | GLenum | Yes| | MAX_VERTEX_ATTRIBS | GLenum | Yes|
| MAX_VERTEX_UNIFORM_VECTORS | GLenum | Yes| | MAX_VERTEX_UNIFORM_VECTORS | GLenum | Yes|
| MAX_VARYING_VECTORS | GLenum | Yes| | MAX_VARYING_VECTORS | GLenum | Yes|
| MAX_COMBINED_TEXTURE_IMAGE_UNITS | GLenum | Yes| | MAX_COMBINED_TEXTURE_IMAGE_UNITS | GLenum | Yes|
| MAX_VERTEX_TEXTURE_IMAGE_UNITS | GLenum | Yes| | MAX_VERTEX_TEXTURE_IMAGE_UNITS | GLenum | Yes|
| MAX_TEXTURE_IMAGE_UNITS | GLenum | Yes| | MAX_TEXTURE_IMAGE_UNITS | GLenum | Yes|
| MAX_FRAGMENT_UNIFORM_VECTORS | GLenum | Yes| | MAX_FRAGMENT_UNIFORM_VECTORS | GLenum | Yes|
| SHADER_TYPE | GLenum | Yes| | SHADER_TYPE | GLenum | Yes|
| DELETE_STATUS | GLenum | Yes| | DELETE_STATUS | GLenum | Yes|
| LINK_STATUS | GLenum | Yes| | LINK_STATUS | GLenum | Yes|
| VALIDATE_STATUS | GLenum | Yes| | VALIDATE_STATUS | GLenum | Yes|
| ATTACHED_SHADERS | GLenum | Yes| | ATTACHED_SHADERS | GLenum | Yes|
| ACTIVE_UNIFORMS | GLenum | Yes| | ACTIVE_UNIFORMS | GLenum | Yes|
| ACTIVE_ATTRIBUTES | GLenum | Yes| | ACTIVE_ATTRIBUTES | GLenum | Yes|
| SHADING_LANGUAGE_VERSION | GLenum | Yes| | SHADING_LANGUAGE_VERSION | GLenum | Yes|
| CURRENT_PROGRAM | GLenum | Yes| | CURRENT_PROGRAM | GLenum | Yes|
| NEVER | GLenum | Yes| | NEVER | GLenum | Yes|
| LESS | GLenum | Yes| | LESS | GLenum | Yes|
| EQUAL | GLenum | Yes| | EQUAL | GLenum | Yes|
| LEQUAL | GLenum | Yes| | LEQUAL | GLenum | Yes|
| GREATER | GLenum | Yes| | GREATER | GLenum | Yes|
| NOTEQUAL | GLenum | Yes| | NOTEQUAL | GLenum | Yes|
| GEQUAL | GLenum | Yes| | GEQUAL | GLenum | Yes|
| ALWAYS | GLenum | Yes| | ALWAYS | GLenum | Yes|
| KEEP | GLenum | Yes| | KEEP | GLenum | Yes|
| REPLACE | GLenum | Yes| | REPLACE | GLenum | Yes|
| INCR | GLenum | Yes| | INCR | GLenum | Yes|
| DECR | GLenum | Yes| | DECR | GLenum | Yes|
| INVERT | GLenum | Yes| | INVERT | GLenum | Yes|
| INCR_WRAP | GLenum | Yes| | INCR_WRAP | GLenum | Yes|
| DECR_WRAP | GLenum | Yes| | DECR_WRAP | GLenum | Yes|
| VENDOR | GLenum | Yes| | VENDOR | GLenum | Yes|
| RENDERER | GLenum | Yes| | RENDERER | GLenum | Yes|
| VERSION | GLenum | Yes| | VERSION | GLenum | Yes|
| NEAREST | GLenum | Yes| | NEAREST | GLenum | Yes|
| LINEAR | GLenum | Yes| | LINEAR | GLenum | Yes|
| NEAREST_MIPMAP_NEAREST | GLenum | Yes| | NEAREST_MIPMAP_NEAREST | GLenum | Yes|
| LINEAR_MIPMAP_NEAREST | GLenum | Yes| | LINEAR_MIPMAP_NEAREST | GLenum | Yes|
| NEAREST_MIPMAP_LINEAR | GLenum | Yes| | NEAREST_MIPMAP_LINEAR | GLenum | Yes|
| LINEAR_MIPMAP_LINEAR | GLenum | Yes| | LINEAR_MIPMAP_LINEAR | GLenum | Yes|
| TEXTURE_MIN_FILTER | GLenum | Yes| | TEXTURE_MIN_FILTER | GLenum | Yes|
| TEXTURE_WRAP_S | GLenum | Yes| | TEXTURE_WRAP_S | GLenum | Yes|
| TEXTURE_WRAP_T | GLenum | Yes| | TEXTURE_WRAP_T | GLenum | Yes|
| TEXTURE_2D | GLenum | Yes| | TEXTURE_2D | GLenum | Yes|
| TEXTURE | GLenum | Yes| | TEXTURE | GLenum | Yes|
| TEXTURE_CUBE_MAP | GLenum | Yes| | TEXTURE_CUBE_MAP | GLenum | Yes|
| TEXTURE_BINDING_CUBE_MAP | GLenum | Yes| | TEXTURE_BINDING_CUBE_MAP | GLenum | Yes|
| TEXTURE_CUBE_MAP_POSITIVE_X | GLenum | Yes| | TEXTURE_CUBE_MAP_POSITIVE_X | GLenum | Yes|
| TEXTURE_CUBE_MAP_NEGATIVE_X | GLenum | Yes| | TEXTURE_CUBE_MAP_NEGATIVE_X | GLenum | Yes|
| TEXTURE_CUBE_MAP_POSITIVE_Y | GLenum | Yes| | TEXTURE_CUBE_MAP_POSITIVE_Y | GLenum | Yes|
| TEXTURE_CUBE_MAP_NEGATIVE_Y | GLenum | Yes| | TEXTURE_CUBE_MAP_NEGATIVE_Y | GLenum | Yes|
| TEXTURE_CUBE_MAP_POSITIVE_Z | GLenum | Yes| | TEXTURE_CUBE_MAP_POSITIVE_Z | GLenum | Yes|
| TEXTURE_CUBE_MAP_NEGATIVE_Z | GLenum | Yes| | TEXTURE_CUBE_MAP_NEGATIVE_Z | GLenum | Yes|
| MAX_CUBE_MAP_TEXTURE_SIZE | GLenum | Yes| | MAX_CUBE_MAP_TEXTURE_SIZE | GLenum | Yes|
| TEXTURE0 | GLenum | Yes| | TEXTURE0 | GLenum | Yes|
| TEXTURE1 | GLenum | Yes| | TEXTURE1 | GLenum | Yes|
| TEXTURE2 | GLenum | Yes| | TEXTURE2 | GLenum | Yes|
| TEXTURE3 | GLenum | Yes| | TEXTURE3 | GLenum | Yes|
| TEXTURE4 | GLenum | Yes| | TEXTURE4 | GLenum | Yes|
| TEXTURE5 | GLenum | Yes| | TEXTURE5 | GLenum | Yes|
| TEXTURE6 | GLenum | Yes| | TEXTURE6 | GLenum | Yes|
| TEXTURE7 | GLenum | Yes| | TEXTURE7 | GLenum | Yes|
| TEXTURE8 | GLenum | Yes| | TEXTURE8 | GLenum | Yes|
| TEXTURE9 | GLenum | Yes| | TEXTURE9 | GLenum | Yes|
| TEXTURE10 | GLenum | Yes| | TEXTURE10 | GLenum | Yes|
| TEXTURE11 | GLenum | Yes| | TEXTURE11 | GLenum | Yes|
| TEXTURE12 | GLenum | Yes| | TEXTURE12 | GLenum | Yes|
| TEXTURE13 | GLenum | Yes| | TEXTURE13 | GLenum | Yes|
| TEXTURE14 | GLenum | Yes| | TEXTURE14 | GLenum | Yes|
| TEXTURE15 | GLenum | Yes| | TEXTURE15 | GLenum | Yes|
| TEXTURE16 | GLenum | Yes| | TEXTURE16 | GLenum | Yes|
| TEXTURE17 | GLenum | Yes| | TEXTURE17 | GLenum | Yes|
| TEXTURE18 | GLenum | Yes| | TEXTURE18 | GLenum | Yes|
| TEXTURE19 | GLenum | Yes| | TEXTURE19 | GLenum | Yes|
| TEXTURE20 | GLenum | Yes| | TEXTURE20 | GLenum | Yes|
| TEXTURE21 | GLenum | Yes| | TEXTURE21 | GLenum | Yes|
| TEXTURE22 | GLenum | Yes| | TEXTURE22 | GLenum | Yes|
| TEXTURE23 | GLenum | Yes| | TEXTURE23 | GLenum | Yes|
| TEXTURE24 | GLenum | Yes| | TEXTURE24 | GLenum | Yes|
| TEXTURE25 | GLenum | Yes| | TEXTURE25 | GLenum | Yes|
| TEXTURE26 | GLenum | Yes| | TEXTURE26 | GLenum | Yes|
| TEXTURE27 | GLenum | Yes| | TEXTURE27 | GLenum | Yes|
| TEXTURE28 | GLenum | Yes| | TEXTURE28 | GLenum | Yes|
| TEXTURE29 | GLenum | Yes| | TEXTURE29 | GLenum | Yes|
| TEXTURE30 | GLenum | Yes| | TEXTURE30 | GLenum | Yes|
| TEXTURE31 | GLenum | Yes| | TEXTURE31 | GLenum | Yes|
| ACTIVE_TEXTURE | GLenum | Yes| | ACTIVE_TEXTURE | GLenum | Yes|
| REPEAT | GLenum | Yes| | REPEAT | GLenum | Yes|
| CLAMP_TO_EDGE | GLenum | Yes| | CLAMP_TO_EDGE | GLenum | Yes|
| MIRRORED_REPEAT | GLenum | Yes| | MIRRORED_REPEAT | GLenum | Yes|
| FLOAT_VEC2 | GLenum | Yes| | FLOAT_VEC2 | GLenum | Yes|
| FLOAT_VEC3 | GLenum | Yes| | FLOAT_VEC3 | GLenum | Yes|
| FLOAT_VEC4 | GLenum | Yes| | FLOAT_VEC4 | GLenum | Yes|
| INT_VEC2 | GLenum | Yes| | INT_VEC2 | GLenum | Yes|
| INT_VEC3 | GLenum | Yes| | INT_VEC3 | GLenum | Yes|
| INT_VEC4 | GLenum | Yes| | INT_VEC4 | GLenum | Yes|
| BOOL | GLenum | Yes| | BOOL | GLenum | Yes|
| BOOL_VEC2 | GLenum | Yes| | BOOL_VEC2 | GLenum | Yes|
| BOOL_VEC3 | GLenum | Yes| | BOOL_VEC3 | GLenum | Yes|
| BOOL_VEC4 | GLenum | Yes| | BOOL_VEC4 | GLenum | Yes|
| FLOAT_MAT2 | GLenum | Yes| | FLOAT_MAT2 | GLenum | Yes|
| FLOAT_MAT3 | GLenum | Yes| | FLOAT_MAT3 | GLenum | Yes|
| FLOAT_MAT4 | GLenum | Yes| | FLOAT_MAT4 | GLenum | Yes|
| SAMPLER_2D | GLenum | Yes| | SAMPLER_2D | GLenum | Yes|
| SAMPLER_CUBE | GLenum | Yes| | SAMPLER_CUBE | GLenum | Yes|
| VERTEX_ATTRIB_ARRAY_ENABLED | GLenum | Yes| | VERTEX_ATTRIB_ARRAY_ENABLED | GLenum | Yes|
| VERTEX_ATTRIB_ARRAY_SIZE | GLenum | Yes| | VERTEX_ATTRIB_ARRAY_SIZE | GLenum | Yes|
| VERTEX_ATTRIB_ARRAY_STRIDE | GLenum | Yes| | VERTEX_ATTRIB_ARRAY_STRIDE | GLenum | Yes|
| VERTEX_ATTRIB_ARRAY_TYPE | GLenum | Yes| | VERTEX_ATTRIB_ARRAY_TYPE | GLenum | Yes|
| VERTEX_ATTRIB_ARRAY_NORMALIZED | GLenum | Yes| | VERTEX_ATTRIB_ARRAY_NORMALIZED | GLenum | Yes|
| VERTEX_ATTRIB_ARRAY_POINTER | GLenum | Yes| | VERTEX_ATTRIB_ARRAY_POINTER | GLenum | Yes|
| VERTEX_ATTRIB_ARRAY_BUFFER_BINDING | GLenum | Yes| | VERTEX_ATTRIB_ARRAY_BUFFER_BINDING | GLenum | Yes|
| IMPLEMENTATION_COLOR_READ_TYPE | GLenum | Yes| | IMPLEMENTATION_COLOR_READ_TYPE | GLenum | Yes|
| IMPLEMENTATION_COLOR_READ_FORMAT | GLenum | Yes| | IMPLEMENTATION_COLOR_READ_FORMAT | GLenum | Yes|
| COMPILE_STATUS | GLenum | Yes| | COMPILE_STATUS | GLenum | Yes|
| LOW_FLOAT | GLenum | Yes| | LOW_FLOAT | GLenum | Yes|
| MEDIUM_FLOAT | GLenum | Yes| | MEDIUM_FLOAT | GLenum | Yes|
| HIGH_FLOAT | GLenum | Yes| | HIGH_FLOAT | GLenum | Yes|
| LOW_INT | GLenum | Yes| | LOW_INT | GLenum | Yes|
| MEDIUM_INT | GLenum | Yes| | MEDIUM_INT | GLenum | Yes|
| HIGH_INT | GLenum | Yes| | HIGH_INT | GLenum | Yes|
| FRAMEBUFFER | GLenum | Yes| | FRAMEBUFFER | GLenum | Yes|
| RENDERBUFFER | GLenum | Yes| | RENDERBUFFER | GLenum | Yes|
| RGBA4 | GLenum | Yes| | RGBA4 | GLenum | Yes|
| RGB5_A1 | GLenum | Yes| | RGB5_A1 | GLenum | Yes|
| RGB565 | GLenum | Yes| | RGB565 | GLenum | Yes|
| DEPTH_COMPONENT16 | GLenum | Yes| | DEPTH_COMPONENT16 | GLenum | Yes|
| STENCIL_INDEX8 | GLenum | Yes| | STENCIL_INDEX8 | GLenum | Yes|
| DEPTH_STENCIL | GLenum | Yes| | DEPTH_STENCIL | GLenum | Yes|
| RENDERBUFFER_WIDTH | GLenum | Yes| | RENDERBUFFER_WIDTH | GLenum | Yes|
| RENDERBUFFER_HEIGHT | GLenum | Yes| | RENDERBUFFER_HEIGHT | GLenum | Yes|
| RENDERBUFFER_INTERNAL_FORMAT | GLenum | Yes| | RENDERBUFFER_INTERNAL_FORMAT | GLenum | Yes|
| RENDERBUFFER_RED_SIZE | GLenum | Yes| | RENDERBUFFER_RED_SIZE | GLenum | Yes|
| RENDERBUFFER_GREEN_SIZE | GLenum | Yes| | RENDERBUFFER_GREEN_SIZE | GLenum | Yes|
| RENDERBUFFER_BLUE_SIZE | GLenum | Yes| | RENDERBUFFER_BLUE_SIZE | GLenum | Yes|
| RENDERBUFFER_ALPHA_SIZE | GLenum | Yes| | RENDERBUFFER_ALPHA_SIZE | GLenum | Yes|
| RENDERBUFFER_DEPTH_SIZE | GLenum | Yes| | RENDERBUFFER_DEPTH_SIZE | GLenum | Yes|
| RENDERBUFFER_STENCIL_SIZE | GLenum | Yes| | RENDERBUFFER_STENCIL_SIZE | GLenum | Yes|
| FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE | GLenum | Yes| | FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE | GLenum | Yes|
| FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL | GLenum | Yes| | FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL | GLenum | Yes|
| FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE | GLenum | Yes| | FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE | GLenum | Yes|
| COLOR_ATTACHMENT0 | GLenum | Yes| | COLOR_ATTACHMENT0 | GLenum | Yes|
| DEPTH_ATTACHMENT | GLenum | Yes| | DEPTH_ATTACHMENT | GLenum | Yes|
| STENCIL_ATTACHMENT | GLenum | Yes| | STENCIL_ATTACHMENT | GLenum | Yes|
| DEPTH_STENCIL_ATTACHMENT | GLenum | Yes| | DEPTH_STENCIL_ATTACHMENT | GLenum | Yes|
| NONE | GLenum | Yes| | NONE | GLenum | Yes|
| FRAMEBUFFER_COMPLETE | GLenum | Yes| | FRAMEBUFFER_COMPLETE | GLenum | Yes|
| FRAMEBUFFER_INCOMPLETE_ATTACHMENT | GLenum | Yes| | FRAMEBUFFER_INCOMPLETE_ATTACHMENT | GLenum | Yes|
| FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT | GLenum | Yes| | FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT | GLenum | Yes|
| FRAMEBUFFER_INCOMPLETE_DIMENSIONS | GLenum | Yes| | FRAMEBUFFER_INCOMPLETE_DIMENSIONS | GLenum | Yes|
| FRAMEBUFFER_UNSUPPORTED | GLenum | Yes| | FRAMEBUFFER_UNSUPPORTED | GLenum | Yes|
| FRAMEBUFFER_BINDING | GLenum | Yes| | FRAMEBUFFER_BINDING | GLenum | Yes|
| RENDERBUFFER_BINDING | GLenum | Yes| | RENDERBUFFER_BINDING | GLenum | Yes|
| MAX_RENDERBUFFER_SIZE | GLenum | Yes| | MAX_RENDERBUFFER_SIZE | GLenum | Yes|
| INVALID_FRAMEBUFFER_OPERATION | GLenum | Yes| | INVALID_FRAMEBUFFER_OPERATION | GLenum | Yes|
| UNPACK_FLIP_Y_WEBGL | GLenum | Yes| | UNPACK_FLIP_Y_WEBGL | GLenum | Yes|
| UNPACK_PREMULTIPLY_ALPHA_WEBGL | GLenum | Yes| | UNPACK_PREMULTIPLY_ALPHA_WEBGL | GLenum | Yes|
| CONTEXT_LOST_WEBGL | GLenum | Yes| | CONTEXT_LOST_WEBGL | GLenum | Yes|
| UNPACK_COLORSPACE_CONVERSION_WEBGL | GLenum | Yes| | UNPACK_COLORSPACE_CONVERSION_WEBGL | GLenum | Yes|
| BROWSER_DEFAULT_WEBGL | GLenum | Yes| | BROWSER_DEFAULT_WEBGL | GLenum | Yes|
| canvas | HTMLCanvasElement \| OffscreenCanvas | Yes| | canvas | HTMLCanvasElement \| OffscreenCanvas | Yes|
| drawingBufferWidth | GLsizei | Yes| | drawingBufferWidth | GLsizei | Yes|
| drawingBufferHeight | GLsizei | Yes| | drawingBufferHeight | GLsizei | Yes|
### Methods ### Methods
| Method| Return Value Type| | Method| Return Value Type|
| -------- | -------- | | -------- | -------- |
| getContextAttributes() | WebGLContextAttributes \| null | | getContextAttributes() | WebGLContextAttributes \| null |
| isContextLost() | boolean | | isContextLost() | boolean |
| getSupportedExtensions() | string[] \| null | | getSupportedExtensions() | string[] \| null |
| getExtension(name: string) | any | | getExtension(name: string) | any |
| activeTexture(texture: GLenum) | void | | activeTexture(texture: GLenum) | void |
| attachShader(program: WebGLProgram, shader: WebGLShader) | void | | attachShader(program: WebGLProgram, shader: WebGLShader) | void |
| bindAttribLocation(program: WebGLProgram, index: GLuint, name: string) | void | | bindAttribLocation(program: WebGLProgram, index: GLuint, name: string) | void |
| bindBuffer(target: GLenum, buffer: WebGLBuffer \| null) | void | | bindBuffer(target: GLenum, buffer: WebGLBuffer \| null) | void |
| bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer \| null) | void | | bindFramebuffer(target: GLenum, framebuffer: WebGLFramebuffer \| null) | void |
| bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer \| null) | void | | bindRenderbuffer(target: GLenum, renderbuffer: WebGLRenderbuffer \| null) | void |
| bindTexture(target: GLenum, texture: WebGLTexture \| null) | void | | bindTexture(target: GLenum, texture: WebGLTexture \| null) | void |
| blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) | void | | blendColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) | void |
| blendEquation(mode: GLenum) | void | | blendEquation(mode: GLenum) | void |
| blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum) | void | | blendEquationSeparate(modeRGB: GLenum, modeAlpha: GLenum) | void |
| blendFunc(sfactor: GLenum, dfactor: GLenum) | void | | blendFunc(sfactor: GLenum, dfactor: GLenum) | void |
| blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum) | void | | blendFuncSeparate(srcRGB: GLenum, dstRGB: GLenum, srcAlpha: GLenum, dstAlpha: GLenum) | void |
| checkFramebufferStatus(target: GLenum) | GLenum | | checkFramebufferStatus(target: GLenum) | GLenum |
| clear(mask: GLbitfield) | void | | clear(mask: GLbitfield) | void |
| clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) | void | | clearColor(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclampf) | void |
| clearDepth(depth: GLclampf) | void | | clearDepth(depth: GLclampf) | void |
| clearStencil(s: GLint) | void | | clearStencil(s: GLint) | void |
| colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean) | void | | colorMask(red: GLboolean, green: GLboolean, blue: GLboolean, alpha: GLboolean) | void |
| compileShader(shader: WebGLShader) | void | | compileShader(shader: WebGLShader) | void |
| copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint) | void | | copyTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, x: GLint, y: GLint, width: GLsizei, height: GLsizei, border: GLint) | void |
| copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei) | void | | copyTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei) | void |
| createBuffer() | WebGLBuffer \| null | | createBuffer() | WebGLBuffer \| null |
| createFramebuffer() | WebGLFramebuffer \| null | | createFramebuffer() | WebGLFramebuffer \| null |
| createProgram() | WebGLProgram \| null | | createProgram() | WebGLProgram \| null |
| createRenderbuffer() | WebGLRenderbuffer \| null | | createRenderbuffer() | WebGLRenderbuffer \| null |
| createShader(type: GLenum) | WebGLShader \| null | | createShader(type: GLenum) | WebGLShader \| null |
| createTexture() | WebGLTexture \| null | | createTexture() | WebGLTexture \| null |
| cullFace(mode: GLenum) | void | | cullFace(mode: GLenum) | void |
| deleteBuffer(buffer: WebGLBuffer \| null) | void | | deleteBuffer(buffer: WebGLBuffer \| null) | void |
| deleteFramebuffer(framebuffer: WebGLFramebuffer \| null) | void | | deleteFramebuffer(framebuffer: WebGLFramebuffer \| null) | void |
| deleteProgram(program: WebGLProgram \| null) | void | | deleteProgram(program: WebGLProgram \| null) | void |
| deleteRenderbuffer(renderbuffer: WebGLRenderbuffer \| null) | void | | deleteRenderbuffer(renderbuffer: WebGLRenderbuffer \| null) | void |
| deleteShader(shader: WebGLShader \| null) | void | | deleteShader(shader: WebGLShader \| null) | void |
| deleteTexture(texture: WebGLTexture \| null) | void | | deleteTexture(texture: WebGLTexture \| null) | void |
| depthFunc(func: GLenum) | void | | depthFunc(func: GLenum) | void |
| depthMask(flag: GLboolean) | void | | depthMask(flag: GLboolean) | void |
| depthRange(zNear: GLclampf, zFar: GLclampf) | void | | depthRange(zNear: GLclampf, zFar: GLclampf) | void |
| detachShader(program: WebGLProgram, shader: WebGLShader) | void | | detachShader(program: WebGLProgram, shader: WebGLShader) | void |
| disable(cap: GLenum) | void | | disable(cap: GLenum) | void |
| disableVertexAttribArray(index: GLuint) | void | | disableVertexAttribArray(index: GLuint) | void |
| drawArrays(mode: GLenum, first: GLint, count: GLsizei) | void | | drawArrays(mode: GLenum, first: GLint, count: GLsizei) | void |
| drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr) | void | | drawElements(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr) | void |
| enable(cap: GLenum) | void | | enable(cap: GLenum) | void |
| enableVertexAttribArray(index: GLuint) | void | | enableVertexAttribArray(index: GLuint) | void |
| finish() | void | | finish() | void |
| flush() | void | | flush() | void |
| framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer \| null) | void | | framebufferRenderbuffer(target: GLenum, attachment: GLenum, renderbuffertarget: GLenum, renderbuffer: WebGLRenderbuffer \| null) | void |
| framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture \| null, level: GLint) | void | | framebufferTexture2D(target: GLenum, attachment: GLenum, textarget: GLenum, texture: WebGLTexture \| null, level: GLint) | void |
| frontFace(mode: GLenum) | void | | frontFace(mode: GLenum) | void |
| generateMipmap(target: GLenum) | void | | generateMipmap(target: GLenum) | void |
| getActiveAttrib(program: WebGLProgram, index: GLuint) | WebGLActiveInfo \| null | | getActiveAttrib(program: WebGLProgram, index: GLuint) | WebGLActiveInfo \| null |
| getActiveUniform(program: WebGLProgram, index: GLuint) | WebGLActiveInfo \| null | | getActiveUniform(program: WebGLProgram, index: GLuint) | WebGLActiveInfo \| null |
| getAttachedShaders(program: WebGLProgram) | WebGLShader[] \| null | | getAttachedShaders(program: WebGLProgram) | WebGLShader[] \| null |
| getAttribLocation(program: WebGLProgram, name: string) | GLint | | getAttribLocation(program: WebGLProgram, name: string) | GLint |
| getBufferParameter(target: GLenum, pname: GLenum) | any | | getBufferParameter(target: GLenum, pname: GLenum) | any |
| getParameter(pname: GLenum) | any | | getParameter(pname: GLenum) | any |
| getError() | GLenum | | getError() | GLenum |
| getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum) | any | | getFramebufferAttachmentParameter(target: GLenum, attachment: GLenum, pname: GLenum) | any |
| getProgramParameter(program: WebGLProgram, pname: GLenum) | any | | getProgramParameter(program: WebGLProgram, pname: GLenum) | any |
| getProgramInfoLog(program: WebGLProgram) | string \| null | | getProgramInfoLog(program: WebGLProgram) | string \| null |
| getRenderbufferParameter(target: GLenum, pname: GLenum) | any | | getRenderbufferParameter(target: GLenum, pname: GLenum) | any |
| getShaderParameter(shader: WebGLShader, pname: GLenum) | any | | getShaderParameter(shader: WebGLShader, pname: GLenum) | any |
| getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum) | WebGLShaderPrecisionFormat \| null | | getShaderPrecisionFormat(shadertype: GLenum, precisiontype: GLenum) | WebGLShaderPrecisionFormat \| null |
| getShaderInfoLog(shader: WebGLShader) | string \| null | | getShaderInfoLog(shader: WebGLShader) | string \| null |
| getShaderSource(shader: WebGLShader) | string \| null | | getShaderSource(shader: WebGLShader) | string \| null |
| getTexParameter(target: GLenum, pname: GLenum) | any | | getTexParameter(target: GLenum, pname: GLenum) | any |
| getUniform(program: WebGLProgram, location: WebGLUniformLocation) | any | | getUniform(program: WebGLProgram, location: WebGLUniformLocation) | any |
| getUniformLocation(program: WebGLProgram, name: string) | WebGLUniformLocation \| null | | getUniformLocation(program: WebGLProgram, name: string) | WebGLUniformLocation \| null |
| getVertexAttrib(index: GLuint, pname: GLenum) | any | | getVertexAttrib(index: GLuint, pname: GLenum) | any |
| getVertexAttribOffset(index: GLuint, pname: GLenum) | GLintptr | | getVertexAttribOffset(index: GLuint, pname: GLenum) | GLintptr |
| hint(target: GLenum, mode: GLenum) | void | | hint(target: GLenum, mode: GLenum) | void |
| isBuffer(buffer: WebGLBuffer \| null) | GLboolean | | isBuffer(buffer: WebGLBuffer \| null) | GLboolean |
| isEnabled(cap: GLenum) | GLboolean | | isEnabled(cap: GLenum) | GLboolean |
| isFramebuffer(framebuffer: WebGLFramebuffer \| null) | GLboolean | | isFramebuffer(framebuffer: WebGLFramebuffer \| null) | GLboolean |
| isProgram(program: WebGLProgram \| null) | GLboolean | | isProgram(program: WebGLProgram \| null) | GLboolean |
| isRenderbuffer(renderbuffer: WebGLRenderbuffer \| null) | GLboolean | | isRenderbuffer(renderbuffer: WebGLRenderbuffer \| null) | GLboolean |
| isShader(shader: WebGLShader \| null) | GLboolean | | isShader(shader: WebGLShader \| null) | GLboolean |
| isTexture(texture: WebGLTexture \| null) | GLboolean | | isTexture(texture: WebGLTexture \| null) | GLboolean |
| lineWidth(width: GLfloat) | void | | lineWidth(width: GLfloat) | void |
| linkProgram(program: WebGLProgram) | void | | linkProgram(program: WebGLProgram) | void |
| pixelStorei(pname: GLenum, param: GLint \| GLboolean) | void | | pixelStorei(pname: GLenum, param: GLint \| GLboolean) | void |
| polygonOffset(factor: GLfloat, units: GLfloat) | void | | polygonOffset(factor: GLfloat, units: GLfloat) | void |
| renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei) | void | | renderbufferStorage(target: GLenum, internalformat: GLenum, width: GLsizei, height: GLsizei) | void |
| sampleCoverage(value: GLclampf, invert: GLboolean) | void | | sampleCoverage(value: GLclampf, invert: GLboolean) | void |
| scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei) | void | | scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei) | void |
| shaderSource(shader: WebGLShader, source: string) | void | | shaderSource(shader: WebGLShader, source: string) | void |
| stencilFunc(func: GLenum, ref: GLint, mask: GLuint) | void | | stencilFunc(func: GLenum, ref: GLint, mask: GLuint) | void |
| stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint) | void | | stencilFuncSeparate(face: GLenum, func: GLenum, ref: GLint, mask: GLuint) | void |
| stencilMask(mask: GLuint) | void | | stencilMask(mask: GLuint) | void |
| stencilMaskSeparate(face: GLenum, mask: GLuint) | void | | stencilMaskSeparate(face: GLenum, mask: GLuint) | void |
| stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum) | void | | stencilOp(fail: GLenum, zfail: GLenum, zpass: GLenum) | void |
| stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum) | void | | stencilOpSeparate(face: GLenum, fail: GLenum, zfail: GLenum, zpass: GLenum) | void |
| texParameterf(target: GLenum, pname: GLenum, param: GLfloat) | void | | texParameterf(target: GLenum, pname: GLenum, param: GLfloat) | void |
| texParameteri(target: GLenum, pname: GLenum, param: GLint) | void | | texParameteri(target: GLenum, pname: GLenum, param: GLint) | void |
| uniform1f(location: WebGLUniformLocation \| null, x: GLfloat) | void | | uniform1f(location: WebGLUniformLocation \| null, x: GLfloat) | void |
| uniform2f(location: WebGLUniformLocation \| null, x: GLfloat, y: GLfloat) | void | | uniform2f(location: WebGLUniformLocation \| null, x: GLfloat, y: GLfloat) | void |
| uniform3f(location: WebGLUniformLocation \| null, x: GLfloat, y: GLfloat, z: GLfloat) | void | | uniform3f(location: WebGLUniformLocation \| null, x: GLfloat, y: GLfloat, z: GLfloat) | void |
| uniform4f(location: WebGLUniformLocation \| null, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) | void | | uniform4f(location: WebGLUniformLocation \| null, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) | void |
| uniform1i(location: WebGLUniformLocation \| null, x: GLint) | void | | uniform1i(location: WebGLUniformLocation \| null, x: GLint) | void |
| uniform2i(location: WebGLUniformLocation \| null, x: GLint, y: GLint) | void | | uniform2i(location: WebGLUniformLocation \| null, x: GLint, y: GLint) | void |
| uniform3i(location: WebGLUniformLocation \| null, x: GLint, y: GLint, z: GLint) | void | | uniform3i(location: WebGLUniformLocation \| null, x: GLint, y: GLint, z: GLint) | void |
| uniform4i(location: WebGLUniformLocation \| null, x: GLint, y: GLint, z: GLint, w: GLint) | void | | uniform4i(location: WebGLUniformLocation \| null, x: GLint, y: GLint, z: GLint, w: GLint) | void |
| useProgram(program: WebGLProgram \| null) | void | | useProgram(program: WebGLProgram \| null) | void |
| validateProgram(program: WebGLProgram) | void | | validateProgram(program: WebGLProgram) | void |
| vertexAttrib1f(index: GLuint, x: GLfloat) | void | | vertexAttrib1f(index: GLuint, x: GLfloat) | void |
| vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat) | void | | vertexAttrib2f(index: GLuint, x: GLfloat, y: GLfloat) | void |
| vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat) | void | | vertexAttrib3f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat) | void |
| vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) | void | | vertexAttrib4f(index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat) | void |
| vertexAttrib1fv(index: GLuint, values: Float32List) | void | | vertexAttrib1fv(index: GLuint, values: Float32List) | void |
| vertexAttrib2fv(index: GLuint, values: Float32List) | void | | vertexAttrib2fv(index: GLuint, values: Float32List) | void |
| vertexAttrib3fv(index: GLuint, values: Float32List) | void | | vertexAttrib3fv(index: GLuint, values: Float32List) | void |
| vertexAttrib4fv(index: GLuint, values: Float32List) | void | | vertexAttrib4fv(index: GLuint, values: Float32List) | void |
| vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr) | void | | vertexAttribPointer(index: GLuint, size: GLint, type: GLenum, normalized: GLboolean, stride: GLsizei, offset: GLintptr) | void |
| viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei) | void | | viewport(x: GLint, y: GLint, width: GLsizei, height: GLsizei) | void |
## WebGLRenderingContextOverloads ## WebGLRenderingContextOverloads
WebGLRenderingContextOverloads WebGLRenderingContextOverloads
| Method| Return Value Type| | Method| Return Value Type|
| -------- | -------- | | -------- | -------- |
| bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum) | void | | bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum) | void |
| bufferData(target: GLenum, data: BufferSource \| null, usage: GLenum) | void | | bufferData(target: GLenum, data: BufferSource \| null, usage: GLenum) | void |
| bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource) | void | | bufferSubData(target: GLenum, offset: GLintptr, data: BufferSource) | void |
| compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView) | void | | compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, data: ArrayBufferView) | void |
| compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView) | void | | compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, data: ArrayBufferView) | void |
| readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView \| null) | void | | readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView \| null) | void |
| texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView \| null) | void | | texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView \| null) | void |
| texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource) | void | | texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource) | void |
| texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView \| null) | void | | texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView \| null) | void |
| texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource) | void | | texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource) | void |
| uniform1fv(location: WebGLUniformLocation \| null, v: Float32List) | void | | uniform1fv(location: WebGLUniformLocation \| null, v: Float32List) | void |
| uniform2fv(location: WebGLUniformLocation \| null, v: Float32List) | void | | uniform2fv(location: WebGLUniformLocation \| null, v: Float32List) | void |
| uniform3fv(location: WebGLUniformLocation \| null, v: Float32List) | void | | uniform3fv(location: WebGLUniformLocation \| null, v: Float32List) | void |
| uniform4fv(location: WebGLUniformLocation \| null, v: Float32List) | void | | uniform4fv(location: WebGLUniformLocation \| null, v: Float32List) | void |
| uniform1iv(location: WebGLUniformLocation \| null, v: Int32List) | void | | uniform1iv(location: WebGLUniformLocation \| null, v: Int32List) | void |
| uniform2iv(location: WebGLUniformLocation \| null, v: Int32List) | void | | uniform2iv(location: WebGLUniformLocation \| null, v: Int32List) | void |
| uniform3iv(location: WebGLUniformLocation \| null, v: Int32List) | void | | uniform3iv(location: WebGLUniformLocation \| null, v: Int32List) | void |
| uniform4iv(location: WebGLUniformLocation \| null, v: Int32List) | void | | uniform4iv(location: WebGLUniformLocation \| null, v: Int32List) | void |
| uniformMatrix2fv(location: WebGLUniformLocation \| null, transpose: GLboolean, value: Float32List) | void | | uniformMatrix2fv(location: WebGLUniformLocation \| null, transpose: GLboolean, value: Float32List) | void |
| uniformMatrix3fv(location: WebGLUniformLocation \| null, transpose: GLboolean, value: Float32List) | void | | uniformMatrix3fv(location: WebGLUniformLocation \| null, transpose: GLboolean, value: Float32List) | void |
| uniformMatrix4fv(location: WebGLUniformLocation \| null, transpose: GLboolean, value: Float32List) | void | | uniformMatrix4fv(location: WebGLUniformLocation \| null, transpose: GLboolean, value: Float32List) | void |
...@@ -75,409 +75,409 @@ WebGL2RenderingContextBase ...@@ -75,409 +75,409 @@ WebGL2RenderingContextBase
### Attributes ### Attributes
| Name| Type| Mandatory| | Name| Type| Mandatory|
| -------- | -------- | -------- | | -------- | -------- | -------- |
| READ_BUFFER | GLenum | Yes| | READ_BUFFER | GLenum | Yes|
| UNPACK_ROW_LENGTH | GLenum | Yes| | UNPACK_ROW_LENGTH | GLenum | Yes|
| UNPACK_SKIP_ROWS | GLenum | Yes| | UNPACK_SKIP_ROWS | GLenum | Yes|
| UNPACK_SKIP_PIXELS | GLenum | Yes| | UNPACK_SKIP_PIXELS | GLenum | Yes|
| PACK_ROW_LENGTH | GLenum | Yes| | PACK_ROW_LENGTH | GLenum | Yes|
| PACK_SKIP_ROWS | GLenum | Yes| | PACK_SKIP_ROWS | GLenum | Yes|
| PACK_SKIP_PIXELS | GLenum | Yes| | PACK_SKIP_PIXELS | GLenum | Yes|
| COLOR | GLenum | Yes| | COLOR | GLenum | Yes|
| DEPTH | GLenum | Yes| | DEPTH | GLenum | Yes|
| STENCIL | GLenum | Yes| | STENCIL | GLenum | Yes|
| RED | GLenum | Yes| | RED | GLenum | Yes|
| RGB8 | GLenum | Yes| | RGB8 | GLenum | Yes|
| RGBA8 | GLenum | Yes| | RGBA8 | GLenum | Yes|
| RGB10_A2 | GLenum | Yes| | RGB10_A2 | GLenum | Yes|
| TEXTURE_BINDING_3D | GLenum | Yes| | TEXTURE_BINDING_3D | GLenum | Yes|
| UNPACK_SKIP_IMAGES | GLenum | Yes| | UNPACK_SKIP_IMAGES | GLenum | Yes|
| UNPACK_IMAGE_HEIGHT | GLenum | Yes| | UNPACK_IMAGE_HEIGHT | GLenum | Yes|
| TEXTURE_3D | GLenum | Yes| | TEXTURE_3D | GLenum | Yes|
| TEXTURE_WRAP_R | GLenum | Yes| | TEXTURE_WRAP_R | GLenum | Yes|
| MAX_3D_TEXTURE_SIZE | GLenum | Yes| | MAX_3D_TEXTURE_SIZE | GLenum | Yes|
| UNSIGNED_INT_2_10_10_10_REV | GLenum | Yes| | UNSIGNED_INT_2_10_10_10_REV | GLenum | Yes|
| MAX_ELEMENTS_VERTICES | GLenum | Yes| | MAX_ELEMENTS_VERTICES | GLenum | Yes|
| MAX_ELEMENTS_INDICES | GLenum | Yes| | MAX_ELEMENTS_INDICES | GLenum | Yes|
| TEXTURE_MIN_LOD | GLenum | Yes| | TEXTURE_MIN_LOD | GLenum | Yes|
| TEXTURE_MAX_LOD | GLenum | Yes| | TEXTURE_MAX_LOD | GLenum | Yes|
| TEXTURE_BASE_LEVEL | GLenum | Yes| | TEXTURE_BASE_LEVEL | GLenum | Yes|
| TEXTURE_MAX_LEVEL | GLenum | Yes| | TEXTURE_MAX_LEVEL | GLenum | Yes|
| MIN | GLenum | Yes| | MIN | GLenum | Yes|
| MAX | GLenum | Yes| | MAX | GLenum | Yes|
| DEPTH_COMPONENT24 | GLenum | Yes| | DEPTH_COMPONENT24 | GLenum | Yes|
| MAX_TEXTURE_LOD_BIAS | GLenum | Yes| | MAX_TEXTURE_LOD_BIAS | GLenum | Yes|
| TEXTURE_COMPARE_MODE | GLenum | Yes| | TEXTURE_COMPARE_MODE | GLenum | Yes|
| TEXTURE_COMPARE_FUNC | GLenum | Yes| | TEXTURE_COMPARE_FUNC | GLenum | Yes|
| CURRENT_QUERY | GLenum | Yes| | CURRENT_QUERY | GLenum | Yes|
| QUERY_RESULT | GLenum | Yes| | QUERY_RESULT | GLenum | Yes|
| QUERY_RESULT_AVAILABLE | GLenum | Yes| | QUERY_RESULT_AVAILABLE | GLenum | Yes|
| STREAM_READ | GLenum | Yes| | STREAM_READ | GLenum | Yes|
| STREAM_COPY | GLenum | Yes| | STREAM_COPY | GLenum | Yes|
| STATIC_READ | GLenum | Yes| | STATIC_READ | GLenum | Yes|
| STATIC_COPY | GLenum | Yes| | STATIC_COPY | GLenum | Yes|
| DYNAMIC_READ | GLenum | Yes| | DYNAMIC_READ | GLenum | Yes|
| DYNAMIC_COPY | GLenum | Yes| | DYNAMIC_COPY | GLenum | Yes|
| MAX_DRAW_BUFFERS | GLenum | Yes| | MAX_DRAW_BUFFERS | GLenum | Yes|
| DRAW_BUFFER0 | GLenum | Yes| | DRAW_BUFFER0 | GLenum | Yes|
| DRAW_BUFFER1 | GLenum | Yes| | DRAW_BUFFER1 | GLenum | Yes|
| DRAW_BUFFER2 | GLenum | Yes| | DRAW_BUFFER2 | GLenum | Yes|
| DRAW_BUFFER3 | GLenum | Yes| | DRAW_BUFFER3 | GLenum | Yes|
| DRAW_BUFFER4 | GLenum | Yes| | DRAW_BUFFER4 | GLenum | Yes|
| DRAW_BUFFER5 | GLenum | Yes| | DRAW_BUFFER5 | GLenum | Yes|
| DRAW_BUFFER6 | GLenum | Yes| | DRAW_BUFFER6 | GLenum | Yes|
| DRAW_BUFFER7 | GLenum | Yes| | DRAW_BUFFER7 | GLenum | Yes|
| DRAW_BUFFER8 | GLenum | Yes| | DRAW_BUFFER8 | GLenum | Yes|
| DRAW_BUFFER9 | GLenum | Yes| | DRAW_BUFFER9 | GLenum | Yes|
| DRAW_BUFFER10 | GLenum | Yes| | DRAW_BUFFER10 | GLenum | Yes|
| DRAW_BUFFER11 | GLenum | Yes| | DRAW_BUFFER11 | GLenum | Yes|
| DRAW_BUFFER12 | GLenum | Yes| | DRAW_BUFFER12 | GLenum | Yes|
| DRAW_BUFFER13 | GLenum | Yes| | DRAW_BUFFER13 | GLenum | Yes|
| DRAW_BUFFER14 | GLenum | Yes| | DRAW_BUFFER14 | GLenum | Yes|
| DRAW_BUFFER15 | GLenum | Yes| | DRAW_BUFFER15 | GLenum | Yes|
| MAX_FRAGMENT_UNIFORM_COMPONENTS | GLenum | Yes| | MAX_FRAGMENT_UNIFORM_COMPONENTS | GLenum | Yes|
| MAX_VERTEX_UNIFORM_COMPONENTS | GLenum | Yes| | MAX_VERTEX_UNIFORM_COMPONENTS | GLenum | Yes|
| SAMPLER_3D | GLenum | Yes| | SAMPLER_3D | GLenum | Yes|
| SAMPLER_2D_SHADOW | GLenum | Yes| | SAMPLER_2D_SHADOW | GLenum | Yes|
| FRAGMENT_SHADER_DERIVATIVE_HINT | GLenum | Yes| | FRAGMENT_SHADER_DERIVATIVE_HINT | GLenum | Yes|
| PIXEL_PACK_BUFFER | GLenum | Yes| | PIXEL_PACK_BUFFER | GLenum | Yes|
| PIXEL_UNPACK_BUFFER | GLenum | Yes| | PIXEL_UNPACK_BUFFER | GLenum | Yes|
| PIXEL_PACK_BUFFER_BINDING | GLenum | Yes| | PIXEL_PACK_BUFFER_BINDING | GLenum | Yes|
| PIXEL_UNPACK_BUFFER_BINDING | GLenum | Yes| | PIXEL_UNPACK_BUFFER_BINDING | GLenum | Yes|
| FLOAT_MAT2x3 | GLenum | Yes| | FLOAT_MAT2x3 | GLenum | Yes|
| FLOAT_MAT2x4 | GLenum | Yes| | FLOAT_MAT2x4 | GLenum | Yes|
| FLOAT_MAT3x2 | GLenum | Yes| | FLOAT_MAT3x2 | GLenum | Yes|
| FLOAT_MAT3x4 | GLenum | Yes| | FLOAT_MAT3x4 | GLenum | Yes|
| FLOAT_MAT4x2 | GLenum | Yes| | FLOAT_MAT4x2 | GLenum | Yes|
| FLOAT_MAT4x3 | GLenum | Yes| | FLOAT_MAT4x3 | GLenum | Yes|
| SRGB | GLenum | Yes| | SRGB | GLenum | Yes|
| SRGB8 | GLenum | Yes| | SRGB8 | GLenum | Yes|
| SRGB8_ALPHA8 | GLenum | Yes| | SRGB8_ALPHA8 | GLenum | Yes|
| COMPARE_REF_TO_TEXTURE | GLenum | Yes| | COMPARE_REF_TO_TEXTURE | GLenum | Yes|
| RGBA32F | GLenum | Yes| | RGBA32F | GLenum | Yes|
| RGB32F | GLenum | Yes| | RGB32F | GLenum | Yes|
| RGBA16F | GLenum | Yes| | RGBA16F | GLenum | Yes|
| RGB16F | GLenum | Yes| | RGB16F | GLenum | Yes|
| VERTEX_ATTRIB_ARRAY_INTEGER | GLenum | Yes| | VERTEX_ATTRIB_ARRAY_INTEGER | GLenum | Yes|
| MAX_ARRAY_TEXTURE_LAYERS | GLenum | Yes| | MAX_ARRAY_TEXTURE_LAYERS | GLenum | Yes|
| MIN_PROGRAM_TEXEL_OFFSET | GLenum | Yes| | MIN_PROGRAM_TEXEL_OFFSET | GLenum | Yes|
| MAX_PROGRAM_TEXEL_OFFSET | GLenum | Yes| | MAX_PROGRAM_TEXEL_OFFSET | GLenum | Yes|
| MAX_VARYING_COMPONENTS | GLenum | Yes| | MAX_VARYING_COMPONENTS | GLenum | Yes|
| TEXTURE_2D_ARRAY | GLenum | Yes| | TEXTURE_2D_ARRAY | GLenum | Yes|
| TEXTURE_BINDING_2D_ARRAY | GLenum | Yes| | TEXTURE_BINDING_2D_ARRAY | GLenum | Yes|
| R11F_G11F_B10F | GLenum | Yes| | R11F_G11F_B10F | GLenum | Yes|
| UNSIGNED_INT_10F_11F_11F_REV | GLenum | Yes| | UNSIGNED_INT_10F_11F_11F_REV | GLenum | Yes|
| RGB9_E5 | GLenum | Yes| | RGB9_E5 | GLenum | Yes|
| UNSIGNED_INT_5_9_9_9_REV | GLenum | Yes| | UNSIGNED_INT_5_9_9_9_REV | GLenum | Yes|
| TRANSFORM_FEEDBACK_BUFFER_MODE | GLenum | Yes| | TRANSFORM_FEEDBACK_BUFFER_MODE | GLenum | Yes|
| MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS | GLenum | Yes| | MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS | GLenum | Yes|
| TRANSFORM_FEEDBACK_VARYINGS | GLenum | Yes| | TRANSFORM_FEEDBACK_VARYINGS | GLenum | Yes|
| TRANSFORM_FEEDBACK_BUFFER_START | GLenum | Yes| | TRANSFORM_FEEDBACK_BUFFER_START | GLenum | Yes|
| TRANSFORM_FEEDBACK_BUFFER_SIZE | GLenum | Yes| | TRANSFORM_FEEDBACK_BUFFER_SIZE | GLenum | Yes|
| TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN | GLenum | Yes| | TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN | GLenum | Yes|
| RASTERIZER_DISCARD | GLenum | Yes| | RASTERIZER_DISCARD | GLenum | Yes|
| MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS | GLenum | Yes| | MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS | GLenum | Yes|
| MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS | GLenum | Yes| | MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS | GLenum | Yes|
| INTERLEAVED_ATTRIBS | GLenum | Yes| | INTERLEAVED_ATTRIBS | GLenum | Yes|
| SEPARATE_ATTRIBS | GLenum | Yes| | SEPARATE_ATTRIBS | GLenum | Yes|
| TRANSFORM_FEEDBACK_BUFFER | GLenum | Yes| | TRANSFORM_FEEDBACK_BUFFER | GLenum | Yes|
| TRANSFORM_FEEDBACK_BUFFER_BINDING | GLenum | Yes| | TRANSFORM_FEEDBACK_BUFFER_BINDING | GLenum | Yes|
| RGBA32UI | GLenum | Yes| | RGBA32UI | GLenum | Yes|
| RGB32UI | GLenum | Yes| | RGB32UI | GLenum | Yes|
| RGBA16UI | GLenum | Yes| | RGBA16UI | GLenum | Yes|
| RGB16UI | GLenum | Yes| | RGB16UI | GLenum | Yes|
| RGBA8UI | GLenum | Yes| | RGBA8UI | GLenum | Yes|
| RGB8UI | GLenum | Yes| | RGB8UI | GLenum | Yes|
| RGBA32I | GLenum | Yes| | RGBA32I | GLenum | Yes|
| RGB32I | GLenum | Yes| | RGB32I | GLenum | Yes|
| RGBA16I | GLenum | Yes| | RGBA16I | GLenum | Yes|
| RGB16I | GLenum | Yes| | RGB16I | GLenum | Yes|
| RGBA8I | GLenum | Yes| | RGBA8I | GLenum | Yes|
| RGB8I | GLenum | Yes| | RGB8I | GLenum | Yes|
| RED_INTEGER | GLenum | Yes| | RED_INTEGER | GLenum | Yes|
| RGB_INTEGER | GLenum | Yes| | RGB_INTEGER | GLenum | Yes|
| RGBA_INTEGER | GLenum | Yes| | RGBA_INTEGER | GLenum | Yes|
| SAMPLER_2D_ARRAY | GLenum | Yes| | SAMPLER_2D_ARRAY | GLenum | Yes|
| SAMPLER_2D_ARRAY_SHADOW | GLenum | Yes| | SAMPLER_2D_ARRAY_SHADOW | GLenum | Yes|
| SAMPLER_CUBE_SHADOW | GLenum | Yes| | SAMPLER_CUBE_SHADOW | GLenum | Yes|
| UNSIGNED_INT_VEC2 | GLenum | Yes| | UNSIGNED_INT_VEC2 | GLenum | Yes|
| UNSIGNED_INT_VEC3 | GLenum | Yes| | UNSIGNED_INT_VEC3 | GLenum | Yes|
| UNSIGNED_INT_VEC4 | GLenum | Yes| | UNSIGNED_INT_VEC4 | GLenum | Yes|
| INT_SAMPLER_2D | GLenum | Yes| | INT_SAMPLER_2D | GLenum | Yes|
| INT_SAMPLER_3D | GLenum | Yes| | INT_SAMPLER_3D | GLenum | Yes|
| INT_SAMPLER_CUBE | GLenum | Yes| | INT_SAMPLER_CUBE | GLenum | Yes|
| INT_SAMPLER_2D_ARRAY | GLenum | Yes| | INT_SAMPLER_2D_ARRAY | GLenum | Yes|
| UNSIGNED_INT_SAMPLER_2D | GLenum | Yes| | UNSIGNED_INT_SAMPLER_2D | GLenum | Yes|
| UNSIGNED_INT_SAMPLER_3D | GLenum | Yes| | UNSIGNED_INT_SAMPLER_3D | GLenum | Yes|
| UNSIGNED_INT_SAMPLER_CUBE | GLenum | Yes| | UNSIGNED_INT_SAMPLER_CUBE | GLenum | Yes|
| UNSIGNED_INT_SAMPLER_2D_ARRAY | GLenum | Yes| | UNSIGNED_INT_SAMPLER_2D_ARRAY | GLenum | Yes|
| DEPTH_COMPONENT32F | GLenum | Yes| | DEPTH_COMPONENT32F | GLenum | Yes|
| DEPTH32F_STENCIL8 | GLenum | Yes| | DEPTH32F_STENCIL8 | GLenum | Yes|
| FLOAT_32_UNSIGNED_INT_24_8_REV | GLenum | Yes| | FLOAT_32_UNSIGNED_INT_24_8_REV | GLenum | Yes|
| FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING | GLenum | Yes| | FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING | GLenum | Yes|
| FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE | GLenum | Yes| | FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE | GLenum | Yes|
| FRAMEBUFFER_ATTACHMENT_RED_SIZE | GLenum | Yes| | FRAMEBUFFER_ATTACHMENT_RED_SIZE | GLenum | Yes|
| FRAMEBUFFER_ATTACHMENT_GREEN_SIZE | GLenum | Yes| | FRAMEBUFFER_ATTACHMENT_GREEN_SIZE | GLenum | Yes|
| FRAMEBUFFER_ATTACHMENT_BLUE_SIZE | GLenum | Yes| | FRAMEBUFFER_ATTACHMENT_BLUE_SIZE | GLenum | Yes|
| FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE | GLenum | Yes| | FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE | GLenum | Yes|
| FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE | GLenum | Yes| | FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE | GLenum | Yes|
| FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE | GLenum | Yes| | FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE | GLenum | Yes|
| FRAMEBUFFER_DEFAULT | GLenum | Yes| | FRAMEBUFFER_DEFAULT | GLenum | Yes|
| UNSIGNED_INT_24_8 | GLenum | Yes| | UNSIGNED_INT_24_8 | GLenum | Yes|
| DEPTH24_STENCIL8 | GLenum | Yes| | DEPTH24_STENCIL8 | GLenum | Yes|
| UNSIGNED_NORMALIZED | GLenum | Yes| | UNSIGNED_NORMALIZED | GLenum | Yes|
| DRAW_FRAMEBUFFER_BINDING | GLenum | Yes| | DRAW_FRAMEBUFFER_BINDING | GLenum | Yes|
| READ_FRAMEBUFFER | GLenum | Yes| | READ_FRAMEBUFFER | GLenum | Yes|
| DRAW_FRAMEBUFFER | GLenum | Yes| | DRAW_FRAMEBUFFER | GLenum | Yes|
| READ_FRAMEBUFFER_BINDING | GLenum | Yes| | READ_FRAMEBUFFER_BINDING | GLenum | Yes|
| RENDERBUFFER_SAMPLES | GLenum | Yes| | RENDERBUFFER_SAMPLES | GLenum | Yes|
| FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER | GLenum | Yes| | FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER | GLenum | Yes|
| MAX_COLOR_ATTACHMENTS | GLenum | Yes| | MAX_COLOR_ATTACHMENTS | GLenum | Yes|
| COLOR_ATTACHMENT1 | GLenum | Yes| | COLOR_ATTACHMENT1 | GLenum | Yes|
| COLOR_ATTACHMENT2 | GLenum | Yes| | COLOR_ATTACHMENT2 | GLenum | Yes|
| COLOR_ATTACHMENT3 | GLenum | Yes| | COLOR_ATTACHMENT3 | GLenum | Yes|
| COLOR_ATTACHMENT4 | GLenum | Yes| | COLOR_ATTACHMENT4 | GLenum | Yes|
| COLOR_ATTACHMENT5 | GLenum | Yes| | COLOR_ATTACHMENT5 | GLenum | Yes|
| COLOR_ATTACHMENT6 | GLenum | Yes| | COLOR_ATTACHMENT6 | GLenum | Yes|
| COLOR_ATTACHMENT7 | GLenum | Yes| | COLOR_ATTACHMENT7 | GLenum | Yes|
| COLOR_ATTACHMENT8 | GLenum | Yes| | COLOR_ATTACHMENT8 | GLenum | Yes|
| COLOR_ATTACHMENT9 | GLenum | Yes| | COLOR_ATTACHMENT9 | GLenum | Yes|
| COLOR_ATTACHMENT10 | GLenum | Yes| | COLOR_ATTACHMENT10 | GLenum | Yes|
| COLOR_ATTACHMENT11 | GLenum | Yes| | COLOR_ATTACHMENT11 | GLenum | Yes|
| COLOR_ATTACHMENT12 | GLenum | Yes| | COLOR_ATTACHMENT12 | GLenum | Yes|
| COLOR_ATTACHMENT13 | GLenum | Yes| | COLOR_ATTACHMENT13 | GLenum | Yes|
| COLOR_ATTACHMENT14 | GLenum | Yes| | COLOR_ATTACHMENT14 | GLenum | Yes|
| COLOR_ATTACHMENT15 | GLenum | Yes| | COLOR_ATTACHMENT15 | GLenum | Yes|
| FRAMEBUFFER_INCOMPLETE_MULTISAMPLE | GLenum | Yes| | FRAMEBUFFER_INCOMPLETE_MULTISAMPLE | GLenum | Yes|
| MAX_SAMPLES | GLenum | Yes| | MAX_SAMPLES | GLenum | Yes|
| HALF_FLOAT | GLenum | Yes| | HALF_FLOAT | GLenum | Yes|
| RG | GLenum | Yes| | RG | GLenum | Yes|
| RG_INTEGER | GLenum | Yes| | RG_INTEGER | GLenum | Yes|
| R8 | GLenum | Yes| | R8 | GLenum | Yes|
| RG8 | GLenum | Yes| | RG8 | GLenum | Yes|
| R16F | GLenum | Yes| | R16F | GLenum | Yes|
| R32F | GLenum | Yes| | R32F | GLenum | Yes|
| RG16F | GLenum | Yes| | RG16F | GLenum | Yes|
| RG32F | GLenum | Yes| | RG32F | GLenum | Yes|
| R8I | GLenum | Yes| | R8I | GLenum | Yes|
| R8UI | GLenum | Yes| | R8UI | GLenum | Yes|
| R16I | GLenum | Yes| | R16I | GLenum | Yes|
| R16UI | GLenum | Yes| | R16UI | GLenum | Yes|
| R32I | GLenum | Yes| | R32I | GLenum | Yes|
| R32UI | GLenum | Yes| | R32UI | GLenum | Yes|
| RG8I | GLenum | Yes| | RG8I | GLenum | Yes|
| RG8UI | GLenum | Yes| | RG8UI | GLenum | Yes|
| RG16I | GLenum | Yes| | RG16I | GLenum | Yes|
| RG16UI | GLenum | Yes| | RG16UI | GLenum | Yes|
| RG32I | GLenum | Yes| | RG32I | GLenum | Yes|
| RG32UI | GLenum | Yes| | RG32UI | GLenum | Yes|
| VERTEX_ARRAY_BINDING | GLenum | Yes| | VERTEX_ARRAY_BINDING | GLenum | Yes|
| R8_SNORM | GLenum | Yes| | R8_SNORM | GLenum | Yes|
| RG8_SNORM | GLenum | Yes| | RG8_SNORM | GLenum | Yes|
| RGB8_SNORM | GLenum | Yes| | RGB8_SNORM | GLenum | Yes|
| SIGNED_NORMALIZED | GLenum | Yes| | SIGNED_NORMALIZED | GLenum | Yes|
| COPY_READ_BUFFER | GLenum | Yes| | COPY_READ_BUFFER | GLenum | Yes|
| COPY_WRITE_BUFFER | GLenum | Yes| | COPY_WRITE_BUFFER | GLenum | Yes|
| COPY_READ_BUFFER_BINDING | GLenum | Yes| | COPY_READ_BUFFER_BINDING | GLenum | Yes|
| COPY_WRITE_BUFFER_BINDING | GLenum | Yes| | COPY_WRITE_BUFFER_BINDING | GLenum | Yes|
| UNIFORM_BUFFER | GLenum | Yes| | UNIFORM_BUFFER | GLenum | Yes|
| UNIFORM_BUFFER_BINDING | GLenum | Yes| | UNIFORM_BUFFER_BINDING | GLenum | Yes|
| UNIFORM_BUFFER_START | GLenum | Yes| | UNIFORM_BUFFER_START | GLenum | Yes|
| UNIFORM_BUFFER_SIZE | GLenum | Yes| | UNIFORM_BUFFER_SIZE | GLenum | Yes|
| MAX_VERTEX_UNIFORM_BLOCKS | GLenum | Yes| | MAX_VERTEX_UNIFORM_BLOCKS | GLenum | Yes|
| MAX_FRAGMENT_UNIFORM_BLOCKS | GLenum | Yes| | MAX_FRAGMENT_UNIFORM_BLOCKS | GLenum | Yes|
| MAX_COMBINED_UNIFORM_BLOCKS | GLenum | Yes| | MAX_COMBINED_UNIFORM_BLOCKS | GLenum | Yes|
| MAX_UNIFORM_BUFFER_BINDINGS | GLenum | Yes| | MAX_UNIFORM_BUFFER_BINDINGS | GLenum | Yes|
| MAX_UNIFORM_BLOCK_SIZE | GLenum | Yes| | MAX_UNIFORM_BLOCK_SIZE | GLenum | Yes|
| MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS | GLenum | Yes| | MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS | GLenum | Yes|
| MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS | GLenum | Yes| | MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS | GLenum | Yes|
| UNIFORM_BUFFER_OFFSET_ALIGNMENT | GLenum | Yes| | UNIFORM_BUFFER_OFFSET_ALIGNMENT | GLenum | Yes|
| ACTIVE_UNIFORM_BLOCKS | GLenum | Yes| | ACTIVE_UNIFORM_BLOCKS | GLenum | Yes|
| UNIFORM_TYPE | GLenum | Yes| | UNIFORM_TYPE | GLenum | Yes|
| UNIFORM_SIZE | GLenum | Yes| | UNIFORM_SIZE | GLenum | Yes|
| UNIFORM_BLOCK_INDEX | GLenum | Yes| | UNIFORM_BLOCK_INDEX | GLenum | Yes|
| UNIFORM_OFFSET | GLenum | Yes| | UNIFORM_OFFSET | GLenum | Yes|
| UNIFORM_ARRAY_STRIDE | GLenum | Yes| | UNIFORM_ARRAY_STRIDE | GLenum | Yes|
| UNIFORM_MATRIX_STRIDE | GLenum | Yes| | UNIFORM_MATRIX_STRIDE | GLenum | Yes|
| UNIFORM_IS_ROW_MAJOR | GLenum | Yes| | UNIFORM_IS_ROW_MAJOR | GLenum | Yes|
| UNIFORM_BLOCK_BINDING | GLenum | Yes| | UNIFORM_BLOCK_BINDING | GLenum | Yes|
| UNIFORM_BLOCK_DATA_SIZE | GLenum | Yes| | UNIFORM_BLOCK_DATA_SIZE | GLenum | Yes|
| UNIFORM_BLOCK_ACTIVE_UNIFORMS | GLenum | Yes| | UNIFORM_BLOCK_ACTIVE_UNIFORMS | GLenum | Yes|
| UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES | GLenum | Yes| | UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES | GLenum | Yes|
| UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER | GLenum | Yes| | UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER | GLenum | Yes|
| UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER | GLenum | Yes| | UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER | GLenum | Yes|
| INVALID_INDEX | GLenum | Yes| | INVALID_INDEX | GLenum | Yes|
| MAX_VERTEX_OUTPUT_COMPONENTS | GLenum | Yes| | MAX_VERTEX_OUTPUT_COMPONENTS | GLenum | Yes|
| MAX_FRAGMENT_INPUT_COMPONENTS | GLenum | Yes| | MAX_FRAGMENT_INPUT_COMPONENTS | GLenum | Yes|
| MAX_SERVER_WAIT_TIMEOUT | GLenum | Yes| | MAX_SERVER_WAIT_TIMEOUT | GLenum | Yes|
| OBJECT_TYPE | GLenum | Yes| | OBJECT_TYPE | GLenum | Yes|
| SYNC_CONDITION | GLenum | Yes| | SYNC_CONDITION | GLenum | Yes|
| SYNC_STATUS | GLenum | Yes| | SYNC_STATUS | GLenum | Yes|
| SYNC_FLAGS | GLenum | Yes| | SYNC_FLAGS | GLenum | Yes|
| SYNC_FENCE | GLenum | Yes| | SYNC_FENCE | GLenum | Yes|
| SYNC_GPU_COMMANDS_COMPLETE | GLenum | Yes| | SYNC_GPU_COMMANDS_COMPLETE | GLenum | Yes|
| UNSIGNALED | GLenum | Yes| | UNSIGNALED | GLenum | Yes|
| SIGNALED | GLenum | Yes| | SIGNALED | GLenum | Yes|
| ALREADY_SIGNALED | GLenum | Yes| | ALREADY_SIGNALED | GLenum | Yes|
| TIMEOUT_EXPIRED | GLenum | Yes| | TIMEOUT_EXPIRED | GLenum | Yes|
| CONDITION_SATISFIED | GLenum | Yes| | CONDITION_SATISFIED | GLenum | Yes|
| WAIT_FAILED | GLenum | Yes| | WAIT_FAILED | GLenum | Yes|
| SYNC_FLUSH_COMMANDS_BIT | GLenum | Yes| | SYNC_FLUSH_COMMANDS_BIT | GLenum | Yes|
| VERTEX_ATTRIB_ARRAY_DIVISOR | GLenum | Yes| | VERTEX_ATTRIB_ARRAY_DIVISOR | GLenum | Yes|
| ANY_SAMPLES_PASSED | GLenum | Yes| | ANY_SAMPLES_PASSED | GLenum | Yes|
| ANY_SAMPLES_PASSED_CONSERVATIVE | GLenum | Yes| | ANY_SAMPLES_PASSED_CONSERVATIVE | GLenum | Yes|
| SAMPLER_BINDING | GLenum | Yes| | SAMPLER_BINDING | GLenum | Yes|
| RGB10_A2UI | GLenum | Yes| | RGB10_A2UI | GLenum | Yes|
| INT_2_10_10_10_REV | GLenum | Yes| | INT_2_10_10_10_REV | GLenum | Yes|
| TRANSFORM_FEEDBACK | GLenum | Yes| | TRANSFORM_FEEDBACK | GLenum | Yes|
| TRANSFORM_FEEDBACK_PAUSED | GLenum | Yes| | TRANSFORM_FEEDBACK_PAUSED | GLenum | Yes|
| TRANSFORM_FEEDBACK_ACTIVE | GLenum | Yes| | TRANSFORM_FEEDBACK_ACTIVE | GLenum | Yes|
| TRANSFORM_FEEDBACK_BINDING | GLenum | Yes| | TRANSFORM_FEEDBACK_BINDING | GLenum | Yes|
| TEXTURE_IMMUTABLE_FORMAT | GLenum | Yes| | TEXTURE_IMMUTABLE_FORMAT | GLenum | Yes|
| MAX_ELEMENT_INDEX | GLenum | Yes| | MAX_ELEMENT_INDEX | GLenum | Yes|
| TEXTURE_IMMUTABLE_LEVELS | GLenum | Yes| | TEXTURE_IMMUTABLE_LEVELS | GLenum | Yes|
| TIMEOUT_IGNORED | GLint64 | Yes| | TIMEOUT_IGNORED | GLint64 | Yes|
| MAX_CLIENT_WAIT_TIMEOUT_WEBGL | GLenum | Yes| | MAX_CLIENT_WAIT_TIMEOUT_WEBGL | GLenum | Yes|
### Methods ### Methods
| Method| Return Value Type| | Method| Return Value Type|
| -------- | -------- | | -------- | -------- |
| copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr) | void | | copyBufferSubData(readTarget: GLenum, writeTarget: GLenum, readOffset: GLintptr, writeOffset: GLintptr, size: GLsizeiptr) | void |
| getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: GLuint, length?: GLuint) | void | | getBufferSubData(target: GLenum, srcByteOffset: GLintptr, dstBuffer: ArrayBufferView, dstOffset?: GLuint, length?: GLuint) | void |
| blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum) | void | | blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum) | void |
| framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture \| null, level: GLint, layer: GLint) | void | | framebufferTextureLayer(target: GLenum, attachment: GLenum, texture: WebGLTexture \| null, level: GLint, layer: GLint) | void |
| invalidateFramebuffer(target: GLenum, attachments: GLenum[]) | void | | invalidateFramebuffer(target: GLenum, attachments: GLenum[]) | void |
| invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei) | void | | invalidateSubFramebuffer(target: GLenum, attachments: GLenum[], x: GLint, y: GLint, width: GLsizei, height: GLsizei) | void |
| readBuffer(src: GLenum) | void | | readBuffer(src: GLenum) | void |
| getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum) | any | | getInternalformatParameter(target: GLenum, internalformat: GLenum, pname: GLenum) | any |
| renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei) | void | | renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei) | void |
| texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei) | void | | texStorage2D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei) | void |
| texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei) | void | | texStorage3D(target: GLenum, levels: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei) | void |
| texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr) | void | | texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr) | void |
| texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource) | void | | texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource) | void |
| texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView \| null) | void | | texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView \| null) | void |
| texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) | void | | texImage3D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) | void |
| texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr) | void | | texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr) | void |
| texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource) | void | | texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, source: TexImageSource) | void |
| texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView \| null, srcOffset?: GLuint) | void | | texSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView \| null, srcOffset?: GLuint) | void |
| copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei) | void | | copyTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, x: GLint, y: GLint, width: GLsizei, height: GLsizei) | void |
| compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr) | void | | compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr) | void |
| compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint) | void | | compressedTexImage3D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, depth: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint) | void |
| compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr) | void | | compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr) | void |
| compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint) | void | | compressedTexSubImage3D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, zoffset: GLint, width: GLsizei, height: GLsizei, depth: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint) | void |
| getFragDataLocation(program: WebGLProgram, name: string) | GLint | | getFragDataLocation(program: WebGLProgram, name: string) | GLint |
| uniform1ui(location: WebGLUniformLocation \| null, v0: GLuint) | void | | uniform1ui(location: WebGLUniformLocation \| null, v0: GLuint) | void |
| uniform2ui(location: WebGLUniformLocation \| null, v0: GLuint, v1: GLuint) | void | | uniform2ui(location: WebGLUniformLocation \| null, v0: GLuint, v1: GLuint) | void |
| uniform3ui(location: WebGLUniformLocation \| null, v0: GLuint, v1: GLuint, v2: GLuint) | void | | uniform3ui(location: WebGLUniformLocation \| null, v0: GLuint, v1: GLuint, v2: GLuint) | void |
| uniform4ui(location: WebGLUniformLocation \| null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint) | void | | uniform4ui(location: WebGLUniformLocation \| null, v0: GLuint, v1: GLuint, v2: GLuint, v3: GLuint) | void |
| uniform1uiv(location: WebGLUniformLocation \| null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniform1uiv(location: WebGLUniformLocation \| null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniform2uiv(location: WebGLUniformLocation \| null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniform2uiv(location: WebGLUniformLocation \| null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniform3uiv(location: WebGLUniformLocation \| null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniform3uiv(location: WebGLUniformLocation \| null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniform4uiv(location: WebGLUniformLocation \| null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniform4uiv(location: WebGLUniformLocation \| null, data: Uint32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniformMatrix3x2fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniformMatrix3x2fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniformMatrix4x2fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniformMatrix4x2fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniformMatrix2x3fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniformMatrix2x3fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniformMatrix4x3fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniformMatrix4x3fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniformMatrix2x4fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniformMatrix2x4fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniformMatrix3x4fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniformMatrix3x4fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint) | void | | vertexAttribI4i(index: GLuint, x: GLint, y: GLint, z: GLint, w: GLint) | void |
| vertexAttribI4iv(index: GLuint, values: Int32List) | void | | vertexAttribI4iv(index: GLuint, values: Int32List) | void |
| vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint) | void | | vertexAttribI4ui(index: GLuint, x: GLuint, y: GLuint, z: GLuint, w: GLuint) | void |
| vertexAttribI4uiv(index: GLuint, values: Uint32List) | void | | vertexAttribI4uiv(index: GLuint, values: Uint32List) | void |
| vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr) | void | | vertexAttribIPointer(index: GLuint, size: GLint, type: GLenum, stride: GLsizei, offset: GLintptr) | void |
| vertexAttribDivisor(index: GLuint, divisor: GLuint) | void | | vertexAttribDivisor(index: GLuint, divisor: GLuint) | void |
| drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei) | void | | drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei) | void |
| drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei) | void | | drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei) | void |
| drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr) | void | | drawRangeElements(mode: GLenum, start: GLuint, end: GLuint, count: GLsizei, type: GLenum, offset: GLintptr) | void |
| drawBuffers(buffers: GLenum[]) | void | | drawBuffers(buffers: GLenum[]) | void |
| clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: GLuint) | void | | clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Float32List, srcOffset?: GLuint) | void |
| clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: GLuint) | void | | clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Int32List, srcOffset?: GLuint) | void |
| clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: GLuint) | void | | clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Uint32List, srcOffset?: GLuint) | void |
| clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint) | void | | clearBufferfi(buffer: GLenum, drawbuffer: GLint, depth: GLfloat, stencil: GLint) | void |
| createQuery() | WebGLQuery \| null | | createQuery() | WebGLQuery \| null |
| deleteQuery(query: WebGLQuery \| null) | void | | deleteQuery(query: WebGLQuery \| null) | void |
| isQuery(query: WebGLQuery \| null) | GLboolean | | isQuery(query: WebGLQuery \| null) | GLboolean |
| beginQuery(target: GLenum, query: WebGLQuery) | void | | beginQuery(target: GLenum, query: WebGLQuery) | void |
| endQuery(target: GLenum) | void | | endQuery(target: GLenum) | void |
| getQuery(target: GLenum, pname: GLenum) | WebGLQuery \| null | | getQuery(target: GLenum, pname: GLenum) | WebGLQuery \| null |
| getQueryParameter(query: WebGLQuery, pname: GLenum) | any | | getQueryParameter(query: WebGLQuery, pname: GLenum) | any |
| createSampler() | WebGLSampler \| null | | createSampler() | WebGLSampler \| null |
| deleteSampler(sampler: WebGLSampler \| null) | void | | deleteSampler(sampler: WebGLSampler \| null) | void |
| isSampler(sampler: WebGLSampler \| null) | GLboolean | | isSampler(sampler: WebGLSampler \| null) | GLboolean |
| bindSampler(unit: GLuint, sampler: WebGLSampler \| null) | void | | bindSampler(unit: GLuint, sampler: WebGLSampler \| null) | void |
| samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint) | void | | samplerParameteri(sampler: WebGLSampler, pname: GLenum, param: GLint) | void |
| samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat) | void; | | samplerParameterf(sampler: WebGLSampler, pname: GLenum, param: GLfloat) | void; |
| getSamplerParameter(sampler: WebGLSampler, pname: GLenum) | any | | getSamplerParameter(sampler: WebGLSampler, pname: GLenum) | any |
| fenceSync(condition: GLenum, flags: GLbitfield) | WebGLSync \| null | | fenceSync(condition: GLenum, flags: GLbitfield) | WebGLSync \| null |
| isSync(sync: WebGLSync \| null) | GLboolean | | isSync(sync: WebGLSync \| null) | GLboolean |
| deleteSync(sync: WebGLSync \| null) | void | | deleteSync(sync: WebGLSync \| null) | void |
| clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64) | GLenum | | clientWaitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLuint64) | GLenum |
| waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64) | void | | waitSync(sync: WebGLSync, flags: GLbitfield, timeout: GLint64) | void |
| getSyncParameter(sync: WebGLSync, pname: GLenum) | any | | getSyncParameter(sync: WebGLSync, pname: GLenum) | any |
| createTransformFeedback() | WebGLTransformFeedback \| null | | createTransformFeedback() | WebGLTransformFeedback \| null |
| deleteTransformFeedback(tf: WebGLTransformFeedback \| null) | void | | deleteTransformFeedback(tf: WebGLTransformFeedback \| null) | void |
| isTransformFeedback(tf: WebGLTransformFeedback \| null) | GLboolean | | isTransformFeedback(tf: WebGLTransformFeedback \| null) | GLboolean |
| bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback \| null) | void | | bindTransformFeedback(target: GLenum, tf: WebGLTransformFeedback \| null) | void |
| beginTransformFeedback(primitiveMode: GLenum) | void | | beginTransformFeedback(primitiveMode: GLenum) | void |
| endTransformFeedback() | void | | endTransformFeedback() | void |
| transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum) | void | | transformFeedbackVaryings(program: WebGLProgram, varyings: string[], bufferMode: GLenum) | void |
| getTransformFeedbackVarying(program: WebGLProgram, index: GLuint) | WebGLActiveInfo \| null | | getTransformFeedbackVarying(program: WebGLProgram, index: GLuint) | WebGLActiveInfo \| null |
| pauseTransformFeedback() | void | | pauseTransformFeedback() | void |
| resumeTransformFeedback() | void | | resumeTransformFeedback() | void |
| bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer \| null) | void | | bindBufferBase(target: GLenum, index: GLuint, buffer: WebGLBuffer \| null) | void |
| bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer \| null, offset: GLintptr, size: GLsizeiptr) | void | | bindBufferRange(target: GLenum, index: GLuint, buffer: WebGLBuffer \| null, offset: GLintptr, size: GLsizeiptr) | void |
| getIndexedParameter(target: GLenum, index: GLuint) | any | | getIndexedParameter(target: GLenum, index: GLuint) | any |
| getUniformIndices(program: WebGLProgram, uniformNames: string[]) | GLuint[] \| null | | getUniformIndices(program: WebGLProgram, uniformNames: string[]) | GLuint[] \| null |
| getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum) | any | | getActiveUniforms(program: WebGLProgram, uniformIndices: GLuint[], pname: GLenum) | any |
| getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string) | GLuint | | getUniformBlockIndex(program: WebGLProgram, uniformBlockName: string) | GLuint |
| getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum) | any | | getActiveUniformBlockParameter(program: WebGLProgram, uniformBlockIndex: GLuint, pname: GLenum) | any |
| getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint) | string \| null | | getActiveUniformBlockName(program: WebGLProgram, uniformBlockIndex: GLuint) | string \| null |
| uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint) | void | | uniformBlockBinding(program: WebGLProgram, uniformBlockIndex: GLuint, uniformBlockBinding: GLuint) | void |
| createVertexArray() | WebGLVertexArrayObject \| null | | createVertexArray() | WebGLVertexArrayObject \| null |
| deleteVertexArray(vertexArray: WebGLVertexArrayObject \| null) | void | | deleteVertexArray(vertexArray: WebGLVertexArrayObject \| null) | void |
| isVertexArray(vertexArray: WebGLVertexArrayObject \| null) | GLboolean | | isVertexArray(vertexArray: WebGLVertexArrayObject \| null) | GLboolean |
| bindVertexArray(array: WebGLVertexArrayObject \| null) | void | | bindVertexArray(array: WebGLVertexArrayObject \| null) | void |
## WebGL2RenderingContextOverloads ## WebGL2RenderingContextOverloads
WebGL2RenderingContextOverloads WebGL2RenderingContextOverloads
| Method| Return Value Type| | Method| Return Value Type|
| -------- | -------- | | -------- | -------- |
| bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum) | void | | bufferData(target: GLenum, size: GLsizeiptr, usage: GLenum) | void |
| bufferData(target: GLenum, srcData: BufferSource \| null, usage: GLenum) | void | | bufferData(target: GLenum, srcData: BufferSource \| null, usage: GLenum) | void |
| bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource) | void | | bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: BufferSource) | void |
| bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length?: GLuint) | void | | bufferData(target: GLenum, srcData: ArrayBufferView, usage: GLenum, srcOffset: GLuint, length?: GLuint) | void |
| bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length?: GLuint) | void | | bufferSubData(target: GLenum, dstByteOffset: GLintptr, srcData: ArrayBufferView, srcOffset: GLuint, length?: GLuint) | void |
| texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView \| null) | void | | texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pixels: ArrayBufferView \| null) | void |
| texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource) | void | | texImage2D(target: GLenum, level: GLint, internalformat: GLint, format: GLenum, type: GLenum, source: TexImageSource) | void |
| texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView \| null) | void | | texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pixels: ArrayBufferView \| null) | void |
| texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource) | void | | texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, format: GLenum, type: GLenum, source: TexImageSource) | void |
| texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr) | void | | texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, pboOffset: GLintptr) | void |
| texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource) | void | | texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, source: TexImageSource) | void |
| texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) | void | | texImage2D(target: GLenum, level: GLint, internalformat: GLint, width: GLsizei, height: GLsizei, border: GLint, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) | void |
| texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr) | void | | texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, pboOffset: GLintptr) | void |
| texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource) | void | | texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, source: TexImageSource) | void |
| texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) | void | | texSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, srcData: ArrayBufferView, srcOffset: GLuint) | void |
| compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr) | void | | compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, imageSize: GLsizei, offset: GLintptr) | void |
| compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint) | void | | compressedTexImage2D(target: GLenum, level: GLint, internalformat: GLenum, width: GLsizei, height: GLsizei, border: GLint, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint) | void |
| compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr) | void | | compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, imageSize: GLsizei, offset: GLintptr) | void |
| compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint) | void | | compressedTexSubImage2D(target: GLenum, level: GLint, xoffset: GLint, yoffset: GLint, width: GLsizei, height: GLsizei, format: GLenum, srcData: ArrayBufferView, srcOffset?: GLuint, srcLengthOverride?: GLuint) | void |
| uniform1fv(location: WebGLUniformLocation \| null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniform1fv(location: WebGLUniformLocation \| null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniform2fv(location: WebGLUniformLocation \| null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniform2fv(location: WebGLUniformLocation \| null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniform3fv(location: WebGLUniformLocation \| null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniform3fv(location: WebGLUniformLocation \| null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniform4fv(location: WebGLUniformLocation \| null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniform4fv(location: WebGLUniformLocation \| null, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniform1iv(location: WebGLUniformLocation \| null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniform1iv(location: WebGLUniformLocation \| null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniform2iv(location: WebGLUniformLocation \| null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniform2iv(location: WebGLUniformLocation \| null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniform3iv(location: WebGLUniformLocation \| null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniform3iv(location: WebGLUniformLocation \| null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniform4iv(location: WebGLUniformLocation \| null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniform4iv(location: WebGLUniformLocation \| null, data: Int32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniformMatrix2fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniformMatrix2fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniformMatrix3fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniformMatrix3fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| uniformMatrix4fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void | | uniformMatrix4fv(location: WebGLUniformLocation \| null, transpose: GLboolean, data: Float32List, srcOffset?: GLuint, srcLength?: GLuint) | void |
| readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView \| null) | void | | readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView \| null) | void |
| readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr) | void | | readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, offset: GLintptr) | void |
| readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint) | void | | readPixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format: GLenum, type: GLenum, dstData: ArrayBufferView, dstOffset: GLuint) | void |
...@@ -248,7 +248,7 @@ Enumerates the color spaces. ...@@ -248,7 +248,7 @@ Enumerates the color spaces.
| Name | Value| Description | | Name | Value| Description |
| ---------- | ------ | -------------- | | ---------- | ------ | -------------- |
| DEFAULT | 0 | Default gamut.| | DEFAULT | 0 | Default SRGB gamut.|
| WIDE_GAMUT | 1 | Wide-gamut. | | WIDE_GAMUT | 1 | Wide-gamut. |
## ScaleOptions<sup>9+</sup> ## ScaleOptions<sup>9+</sup>
...@@ -1544,6 +1544,8 @@ moveWindowTo(x: number, y: number, callback: AsyncCallback&lt;void&gt;): void ...@@ -1544,6 +1544,8 @@ moveWindowTo(x: number, y: number, callback: AsyncCallback&lt;void&gt;): void
Moves this window. This API uses an asynchronous callback to return the result. Moves this window. This API uses an asynchronous callback to return the result.
This operation is not supported in a window in full-screen mode.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
...@@ -1585,6 +1587,8 @@ moveWindowTo(x: number, y: number): Promise&lt;void&gt; ...@@ -1585,6 +1587,8 @@ moveWindowTo(x: number, y: number): Promise&lt;void&gt;
Moves this window. This API uses a promise to return the result. Moves this window. This API uses a promise to return the result.
This operation is not supported in a window in full-screen mode.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
...@@ -1636,6 +1640,8 @@ The system window has the following size limits: [0, 2560] in width and [0, 2560 ...@@ -1636,6 +1640,8 @@ The system window has the following size limits: [0, 2560] in width and [0, 2560
The new width and height you set must meet the limits. The new width and height you set must meet the limits.
This operation is not supported in a window in full-screen mode.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
...@@ -1683,6 +1689,8 @@ The system window has the following size limits: [0, 2560] in width and [0, 2560 ...@@ -1683,6 +1689,8 @@ The system window has the following size limits: [0, 2560] in width and [0, 2560
The new width and height you set must meet the limits. The new width and height you set must meet the limits.
This operation is not supported in a window in full-screen mode.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters** **Parameters**
...@@ -3721,6 +3729,41 @@ try { ...@@ -3721,6 +3729,41 @@ try {
### snapshot<sup>9+</sup> ### snapshot<sup>9+</sup>
snapshot(callback: AsyncCallback&lt;image.PixelMap&gt;): void
Captures this window. This API uses an asynchronous callback to return the result.
**System capability**: SystemCapability.WindowManager.WindowManager.Core
**Parameters**
| Name | Type | Mandatory | Description |
| -------- | ------------------------------------------------------------ | --------- | ----------------------------------- |
| callback | AsyncCallback&lt;[image.PixelMap](js-apis-image.md#pixelmap7)&gt; | Yes | Callback used to return the result. |
**Error codes**
For details about the error codes, see [Window Error Codes](../errorcodes/errorcode-window.md).
| ID | Error Message |
| ------- | ------------------------------ |
| 1300002 | This window state is abnormal. |
**Example**
```js
windowClass.snapshot((err, pixelMap) => {
if (err.code) {
console.error('Failed to snapshot window. Cause:' + JSON.stringify(err));
return;
}
console.info('Succeeded in snapshotting window. Pixel bytes number: ' + pixelMap.getPixelBytesNumber());
pixelMap.release(); // Release the memory in time after the PixelMap is used.
});
```
### snapshot<sup>9+</sup>
snapshot(): Promise&lt;image.PixelMap&gt; snapshot(): Promise&lt;image.PixelMap&gt;
Captures this window. This API uses a promise to return the result. Captures this window. This API uses a promise to return the result.
...@@ -4041,6 +4084,7 @@ try { ...@@ -4041,6 +4084,7 @@ try {
} catch (exception) { } catch (exception) {
console.error('Failed to set backdrop blur. Cause: ' + JSON.stringify(exception)); console.error('Failed to set backdrop blur. Cause: ' + JSON.stringify(exception));
} }
``` ```
### setBackdropBlurStyle<sup>9+</sup> ### setBackdropBlurStyle<sup>9+</sup>
...@@ -4282,6 +4326,8 @@ moveTo(x: number, y: number, callback: AsyncCallback&lt;void&gt;): void ...@@ -4282,6 +4326,8 @@ moveTo(x: number, y: number, callback: AsyncCallback&lt;void&gt;): void
Moves this window. This API uses an asynchronous callback to return the result. Moves this window. This API uses an asynchronous callback to return the result.
This operation is not supported in a window in full-screen mode.
> **NOTE** > **NOTE**
> >
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [moveWindowTo()](#movewindowto9) instead. > This API is supported since API version 7 and deprecated since API version 9. You are advised to use [moveWindowTo()](#movewindowto9) instead.
...@@ -4315,6 +4361,8 @@ moveTo(x: number, y: number): Promise&lt;void&gt; ...@@ -4315,6 +4361,8 @@ moveTo(x: number, y: number): Promise&lt;void&gt;
Moves this window. This API uses a promise to return the result. Moves this window. This API uses a promise to return the result.
This operation is not supported in a window in full-screen mode.
> **NOTE** > **NOTE**
> >
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [moveWindowTo()](#movewindowto9-1) instead. > This API is supported since API version 7 and deprecated since API version 9. You are advised to use [moveWindowTo()](#movewindowto9-1) instead.
...@@ -4358,6 +4406,8 @@ The system window has the following size limits: [0, 2560] in width and [0, 2560 ...@@ -4358,6 +4406,8 @@ The system window has the following size limits: [0, 2560] in width and [0, 2560
The new width and height you set must meet the limits. The new width and height you set must meet the limits.
This operation is not supported in a window in full-screen mode.
> **NOTE** > **NOTE**
> >
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [resize()](#resize9) instead. > This API is supported since API version 7 and deprecated since API version 9. You are advised to use [resize()](#resize9) instead.
...@@ -4397,6 +4447,8 @@ The system window has the following size limits: [0, 2560] in width and [0, 2560 ...@@ -4397,6 +4447,8 @@ The system window has the following size limits: [0, 2560] in width and [0, 2560
The new width and height you set must meet the limits. The new width and height you set must meet the limits.
This operation is not supported in a window in full-screen mode.
> **NOTE** > **NOTE**
> >
> This API is supported since API version 7 and deprecated since API version 9. You are advised to use [resize()](#resize9-1) instead. > This API is supported since API version 7 and deprecated since API version 9. You are advised to use [resize()](#resize9-1) instead.
...@@ -5864,12 +5916,12 @@ Describes the lifecycle of a window stage. ...@@ -5864,12 +5916,12 @@ Describes the lifecycle of a window stage.
**System capability**: SystemCapability.WindowManager.WindowManager.Core **System capability**: SystemCapability.WindowManager.WindowManager.Core
| Name | Value | Description | | Name | Value | Description |
| ---------- | ----- | ---------------------------------------------- | | -------- | ----- | ---------------------------------------------- |
| FOREGROUND | 1 | The window stage is running in the foreground. | | SHOWN | 1 | The window stage is running in the foreground. |
| ACTIVE | 2 | The window stage gains focus. | | ACTIVE | 2 | The window stage gains focus. |
| INACTIVE | 3 | The window stage loses focus. | | INACTIVE | 3 | The window stage loses focus. |
| BACKGROUND | 4 | The window stage is running in the background. | | HIDDEN | 4 | The window stage is running in the background. |
## WindowStage<sup>9+</sup> ## WindowStage<sup>9+</sup>
...@@ -5905,9 +5957,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -5905,9 +5957,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
class myAbility extends Ability {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -5952,9 +6006,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -5952,9 +6006,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
class myAbility extends Ability {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -5998,9 +6054,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -5998,9 +6054,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
class myAbility extends Ability {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
...@@ -6042,9 +6100,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6042,9 +6100,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
class myAbility extends Ability {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -6100,9 +6160,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6100,9 +6160,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
class myAbility extends Ability {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -6149,9 +6211,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6149,9 +6211,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
class myAbility extends Ability {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -6195,9 +6259,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6195,9 +6259,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
class myAbility extends Ability {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -6243,9 +6309,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6243,9 +6309,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
class myAbility extends Ability {
storage : LocalStorage storage : LocalStorage
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
this.storage = new LocalStorage(); this.storage = new LocalStorage();
...@@ -6302,9 +6370,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6302,9 +6370,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
class myAbility extends Ability {
storage : LocalStorage storage : LocalStorage
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
this.storage = new LocalStorage(); this.storage = new LocalStorage();
...@@ -6354,9 +6424,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6354,9 +6424,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
class myAbility extends Ability {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
...@@ -6404,9 +6476,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6404,9 +6476,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
class myAbility extends Ability {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
...@@ -6452,9 +6526,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6452,9 +6526,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
class myAbility extends Ability {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
...@@ -6492,9 +6568,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6492,9 +6568,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
class myAbility extends Ability {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('disableWindowDecor'); console.log('disableWindowDecor');
windowStage.disableWindowDecor(); windowStage.disableWindowDecor();
...@@ -6533,9 +6611,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6533,9 +6611,11 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc
**Example** **Example**
```ts ```ts
import Ability from '@ohos.application.Ability'; import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
// ...
class myAbility extends Ability {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
...@@ -6659,6 +6739,7 @@ controller.animationForShown = (context : window.TransitionContext) => { ...@@ -6659,6 +6739,7 @@ controller.animationForShown = (context : window.TransitionContext) => {
); );
console.info('complete transition end'); console.info('complete transition end');
}; };
``` ```
### animationForHidden<sup>9+</sup> ### animationForHidden<sup>9+</sup>
...@@ -6705,5 +6786,4 @@ controller.animationForHidden = (context : window.TransitionContext) => { ...@@ -6705,5 +6786,4 @@ controller.animationForHidden = (context : window.TransitionContext) => {
) )
console.info('complete transition end'); console.info('complete transition end');
}; };
``` ```
\ No newline at end of file
# Window Animation Management # @ohos.animation.windowAnimationManager (Window Animation Management)
The **WindowAnimationManager** module provides APIs to listen for application start/exit events and window minimization/maximization events and associate animations with these events. The **WindowAnimationManager** module provides APIs to listen for application start/exit events and window minimization/maximization events and associate animations with these events.
> **NOTE** > **NOTE**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册