提交 5980dc33 编写于 作者: G Gloria

Update docs against 14784+14482

Signed-off-by: wusongqing<wusongqing@huawei.com>
上级 080bf723
...@@ -724,8 +724,8 @@ Defines virtual screen parameters. ...@@ -724,8 +724,8 @@ Defines virtual screen parameters.
| Name | Type| Readable| Writable| Description | | Name | Type| Readable| Writable| Description |
| --------- | -------- | ---- | ---- | ------------------------- | | --------- | -------- | ---- | ---- | ------------------------- |
| name | string | Yes | Yes | Name of a virtual screen. | | name | string | Yes | Yes | Name of a virtual screen. |
| width | number | Yes | Yes | Width of the virtual screen. | | width | number | Yes | Yes | Width of the virtual screen, in pixels.|
| height | number | Yes | Yes | Height of the virtual screen. | | height | number | Yes | Yes | Height of the virtual screen, in pixels.|
| density | number | Yes | Yes | Density of the virtual screen. | | density | number | Yes | Yes | Density of the virtual screen. |
| surfaceId | string | Yes | Yes | Surface ID of the virtual screen.| | surfaceId | string | Yes | Yes | Surface ID of the virtual screen.|
...@@ -1006,6 +1006,6 @@ Defines the screen mode information. ...@@ -1006,6 +1006,6 @@ Defines the screen mode information.
| Name | Type| Readable| Writable| Description | | Name | Type| Readable| Writable| Description |
| ----------- | -------- | ---- | ---- | -------------------------------------------------- | | ----------- | -------- | ---- | ---- | -------------------------------------------------- |
| id | number | Yes | Yes | Mode ID. The supported mode is determined by the device resolution and refresh rate.| | id | number | Yes | Yes | Mode ID. The supported mode is determined by the device resolution and refresh rate.|
| width | number | Yes | Yes | Screen width. | | width | number | Yes | Yes | Width of the screen, in pixels. |
| height | number | Yes | Yes | Screen height. | | height | number | Yes | Yes | Height of the screen, in pixels. |
| refreshRate | number | Yes | Yes | Screen refresh rate. | | refreshRate | number | Yes | Yes | Screen refresh rate. |
...@@ -2876,7 +2876,7 @@ Transforms a rotation vector based on the coordinate system. This API uses an as ...@@ -2876,7 +2876,7 @@ Transforms a rotation vector based on the coordinate system. This API uses an as
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------------- | ----------------------------------------- | ---- | ---------------------- | | ---------------- | ----------------------------------------- | ---- | ---------------------- |
| inRotationVector | Array&lt;number&gt; | Yes | Rotation matrix. | | inRotationVector | Array&lt;number&gt; | Yes | Rotation vector. |
| coordinates | [CoordinatesOptions](#coordinatesoptions) | Yes | Rotation vector to transform. | | coordinates | [CoordinatesOptions](#coordinatesoptions) | Yes | Rotation vector to transform. |
| callback | AsyncCallback&lt;Array&lt;number&gt;&gt; | Yes | Callback used to return the rotation vector after being transformed.| | callback | AsyncCallback&lt;Array&lt;number&gt;&gt; | Yes | Callback used to return the rotation vector after being transformed.|
...@@ -2923,7 +2923,7 @@ Transforms a rotation vector based on the coordinate system. This API uses a pro ...@@ -2923,7 +2923,7 @@ Transforms a rotation vector based on the coordinate system. This API uses a pro
| Name | Type | Mandatory| Description | | Name | Type | Mandatory| Description |
| ---------------- | ----------------------------------------- | ---- | ---------------- | | ---------------- | ----------------------------------------- | ---- | ---------------- |
| inRotationVector | Array&lt;number&gt; | Yes | Rotation matrix. | | inRotationVector | Array&lt;number&gt; | Yes | Rotation vector. |
| coordinates | [CoordinatesOptions](#coordinatesoptions) | Yes | Rotation vector to transform.| | coordinates | [CoordinatesOptions](#coordinatesoptions) | Yes | Rotation vector to transform.|
**Return value** **Return value**
...@@ -3179,7 +3179,7 @@ For details about the following error codes, see [Error Codes of sensor.getRotat ...@@ -3179,7 +3179,7 @@ For details about the following error codes, see [Error Codes of sensor.getRotat
try { try {
let gravity = [-0.27775216, 0.5351276, 9.788099]; let gravity = [-0.27775216, 0.5351276, 9.788099];
let geomagnetic = [210.87253, -78.6096, -111.44444]; let geomagnetic = [210.87253, -78.6096, -111.44444];
sensor.getRotationMatrix(gravity, geomagnetic, function (err, data) => { sensor.getRotationMatrix(gravity, geomagnetic, function (err, data) {
if (err) { if (err) {
console.error('Get rotationMatrix failed. Error code: ' + err.code + '; message: ' + err.message); console.error('Get rotationMatrix failed. Error code: ' + err.code + '; message: ' + err.message);
return; return;
...@@ -3496,9 +3496,9 @@ Describes the acceleration sensor data. It extends from [Response](#response). ...@@ -3496,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/s². | | 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/s². | | 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/s². | | z | number | Yes | Yes | Acceleration along the z-axis of the device, in m/s².|
## LinearAccelerometerResponse ## LinearAccelerometerResponse
...@@ -3510,9 +3510,9 @@ Describes the linear acceleration sensor data. It extends from [Response](#respo ...@@ -3510,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/s². | | 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/s². | | 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/s². | | z | number | Yes | Yes | Linear acceleration along the z-axis of the device, in m/s².|
## AccelerometerUncalibratedResponse ## AccelerometerUncalibratedResponse
...@@ -3528,7 +3528,7 @@ Describes the uncalibrated acceleration sensor data. It extends from [Response]( ...@@ -3528,7 +3528,7 @@ Describes the uncalibrated acceleration sensor data. It extends from [Response](
| y | number | Yes | Yes | Uncalibrated acceleration along the y-axis of the device, in m/s². | | 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/s². | | 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/s². | | 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/s². | | 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/s². | | biasZ | number | Yes | Yes | Uncalibrated acceleration bias along the z-axis of the device, in m/s². |
...@@ -3541,9 +3541,9 @@ Describes the gravity sensor data. It extends from [Response](#response). ...@@ -3541,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/s². | | 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/s². | | 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/s². | | z | number | Yes | Yes | Gravitational acceleration along the z-axis of the device, in m/s².|
## OrientationResponse ## OrientationResponse
...@@ -3831,6 +3831,18 @@ Describes the geographical location. ...@@ -3831,6 +3831,18 @@ Describes the geographical location.
| longitude | number | Yes | Yes | Longitude. | | longitude | number | Yes | Yes | Longitude. |
| altitude | number | Yes | Yes | Altitude.| | altitude | number | Yes | Yes | Altitude.|
## LocationOptions
Describes the geographical location.
**System capability**: SystemCapability.Sensors.Sensor
| Name | Type | Readable | Writable | Description |
| --------- | ------ | -------- | -------- | ----------- |
| latitude | number | Yes | Yes | Latitude. |
| longitude | number | Yes | Yes | Longitude. |
| altitude | number | Yes | Yes | Altitude. |
## sensor.on<sup>(deprecated)</sup> ## sensor.on<sup>(deprecated)</sup>
### ACCELEROMETER<sup>(deprecated)</sup> ### ACCELEROMETER<sup>(deprecated)</sup>
...@@ -6231,7 +6243,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.getRo ...@@ -6231,7 +6243,6 @@ This API is deprecated since API version 9. You are advised to use [sensor.getRo
} }
console.info(JSON.stringify(data)); console.info(JSON.stringify(data));
}) })
``` ```
......
...@@ -188,10 +188,10 @@ Describes the rectangular area of the window. ...@@ -188,10 +188,10 @@ Describes the rectangular area of the window.
| Name | Type| Readable| Writable| Description | | Name | Type| Readable| Writable| Description |
| ------ | -------- | ---- | ---- | ------------------ | | ------ | -------- | ---- | ---- | ------------------ |
| left | number | Yes | Yes | Left boundary of the rectangle.| | left | number | Yes | Yes | Left boundary of the rectangle, in pixels.|
| top | number | Yes | Yes | Top boundary of the rectangle.| | top | number | Yes | Yes | Top boundary of the rectangle, in pixels.|
| width | number | Yes | Yes | Width of the rectangle. | | width | number | Yes | Yes | Width of the rectangle, in pixels.|
| height | number | Yes | Yes | Height of the rectangle. | | height | number | Yes | Yes | Height of the rectangle, in pixels.|
## AvoidArea<sup>7+</sup> ## AvoidArea<sup>7+</sup>
...@@ -215,8 +215,8 @@ Describes the window size. ...@@ -215,8 +215,8 @@ Describes the window size.
| Name | Type| Readable| Writable| Description | | Name | Type| Readable| Writable| Description |
| ------ | -------- | ---- | ---- | ---------- | | ------ | -------- | ---- | ---- | ---------- |
| width | number | Yes | Yes | Window width.| | width | number | Yes | Yes | Window width, in pixels.|
| height | number | Yes | Yes | Window height.| | height | number | Yes | Yes | Window height, in pixels.|
## WindowProperties ## WindowProperties
...@@ -5903,9 +5903,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -5903,9 +5903,9 @@ 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';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -5949,9 +5949,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -5949,9 +5949,9 @@ 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';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -5994,9 +5994,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -5994,9 +5994,9 @@ 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';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
...@@ -6037,9 +6037,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6037,9 +6037,9 @@ 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';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -6093,9 +6093,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6093,9 +6093,9 @@ 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';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -6141,9 +6141,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6141,9 +6141,9 @@ 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';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -6185,9 +6185,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6185,9 +6185,9 @@ 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';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
let windowClass = null; let windowClass = null;
...@@ -6231,9 +6231,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6231,9 +6231,9 @@ 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';
class myAbility extends Ability { class myAbility extends UIAbility {
storage : LocalStorage storage : LocalStorage
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
this.storage = new LocalStorage(); this.storage = new LocalStorage();
...@@ -6289,9 +6289,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6289,9 +6289,9 @@ 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';
class myAbility extends Ability { class myAbility extends UIAbility {
storage : LocalStorage storage : LocalStorage
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
this.storage = new LocalStorage(); this.storage = new LocalStorage();
...@@ -6340,9 +6340,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6340,9 +6340,9 @@ 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';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
...@@ -6389,9 +6389,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6389,9 +6389,9 @@ 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';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
...@@ -6436,9 +6436,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6436,9 +6436,9 @@ 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';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
...@@ -6475,9 +6475,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6475,9 +6475,9 @@ 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';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('disableWindowDecor'); console.log('disableWindowDecor');
windowStage.disableWindowDecor(); windowStage.disableWindowDecor();
...@@ -6515,9 +6515,9 @@ For details about the error codes, see [Window Error Codes](../errorcodes/errorc ...@@ -6515,9 +6515,9 @@ 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';
class myAbility extends Ability { class myAbility extends UIAbility {
onWindowStageCreate(windowStage) { onWindowStageCreate(windowStage) {
console.log('onWindowStageCreate'); console.log('onWindowStageCreate');
try { try {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册