未验证 提交 5384f23b 编写于 作者: K king_he 提交者: Gitee

update en/application-dev/reference/apis/js-apis-accessibility.md.

Signed-off-by: Nking_he <6384784@qq.com>
上级 b7629416
# Accessibility # Accessibility
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**<br>
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. > The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
## Modules to Import ## Modules to Import
...@@ -15,11 +15,11 @@ Enumerates the states of an accessibility application. ...@@ -15,11 +15,11 @@ Enumerates the states of an accessibility application.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core **System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| enable | The accessibility application is enabled.| | enable | The accessibility application is enabled. |
| disable | The accessibility application is disabled.| | disable | The accessibility application is disabled. |
| install | The accessibility application has been installed.| | install | The accessibility application has been installed. |
## AbilityType ## AbilityType
...@@ -27,13 +27,13 @@ Enumerates the types of accessibility applications. ...@@ -27,13 +27,13 @@ Enumerates the types of accessibility applications.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core **System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| audible | The accessibility application provides audible feedback.| | audible | The accessibility application provides audible feedback. |
| generic | The accessibility application provides generic feedback.| | generic | The accessibility application provides generic feedback. |
| haptic | The accessibility application provides haptic feedback.| | haptic | The accessibility application provides haptic feedback. |
| spoken | The accessibility application provides spoken feedback.| | spoken | The accessibility application provides spoken feedback. |
| visual | The accessibility application provides visual feedback.| | visual | The accessibility application provides visual feedback. |
## AccessibilityAbilityInfo ## AccessibilityAbilityInfo
...@@ -43,15 +43,15 @@ Provides information about an accessibility application. ...@@ -43,15 +43,15 @@ Provides information about an accessibility application.
### Attributes ### Attributes
| Name| Type| Readable| Writable| Description| | Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| id | number | Yes| No| Ability ID.| | id | number | Yes | No | Ability ID. |
| name | string | Yes| No| Ability name.| | name | string | Yes | No | Ability name. |
| bundleName | string | Yes| No| Bundle name.| | bundleName | string | Yes | No | Bundle name. |
| abilityTypes | Array&lt;[AbilityType](#abilitytype)&gt; | Yes| No| Accessibility application type.| | abilityTypes | Array&lt;[AbilityType](#abilitytype)&gt; | Yes | No | Accessibility application type. |
| capabilities | Array&lt;[Capability](#capability)&gt; | Yes| No| Capabilities list of the accessibility application.| | capabilities | Array&lt;[Capability](#capability)&gt; | Yes | No | Capabilities list of the accessibility application. |
| description | string | Yes| No| Description of the accessibility application.| | description | string | Yes | No | Description of the accessibility application. |
| eventTypes | Array&lt;[EventType](#eventtype)&gt; | Yes| No| List of events that the accessibility application focuses on.| | eventTypes | Array&lt;[EventType](#eventtype)&gt; | Yes | No | List of events that the accessibility application focuses on. |
## Action ## Action
...@@ -59,24 +59,24 @@ Describes the target action supported by an accessibility application. ...@@ -59,24 +59,24 @@ Describes the target action supported by an accessibility application.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core **System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| click | Clicking.| | click | Clicking. |
| longClick | Long pressing.| | longClick | Long pressing. |
| scrollForward | Scrolling forward.| | scrollForward | Scrolling forward. |
| scrollBackward | Scrolling backward.| | scrollBackward | Scrolling backward. |
| focus | Obtaining focus.| | focus | Obtaining focus. |
| clearFocus | Clearing focus.| | clearFocus | Clearing focus. |
| clearSelection | Clearing selection.| | clearSelection | Clearing selection. |
| accessibilityFocus | Obtaining the accessibility focus.| | accessibilityFocus | Obtaining the accessibility focus. |
| clearAccessibilityFocus | Clearing the accessibility focus.| | clearAccessibilityFocus | Clearing the accessibility focus. |
| cut | Cut.| | cut | Cut. |
| copy | Copy.| | copy | Copy. |
| paste | Paste.| | paste | Paste. |
| select | Select.| | select | Select. |
| setText | Setting the text.| | setText | Setting the text. |
| delete | Delete.| | delete | Delete. |
| setSelection | Setting the selection.| | setSelection | Setting the selection. |
## Capability ## Capability
...@@ -84,13 +84,13 @@ Enumerates the capabilities of an auxiliary application. ...@@ -84,13 +84,13 @@ Enumerates the capabilities of an auxiliary application.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core **System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| retrieve | Capability to retrieve the window content.| | retrieve | Capability to retrieve the window content. |
| touchGuide | Capability of touch guide mode.| | touchGuide | Capability of touch guide mode. |
| keyEventObserver | Capability to filter key events.| | keyEventObserver | Capability to filter key events. |
| zoom | Capability to control the display zoom level.| | zoom | Capability to control the display zoom level. |
| gesture | Capability to perform gesture actions.| | gesture | Capability to perform gesture actions. |
## CaptionsFontEdgeType<sup>8+</sup> ## CaptionsFontEdgeType<sup>8+</sup>
...@@ -98,13 +98,13 @@ Enumerates the caption font edge type. ...@@ -98,13 +98,13 @@ Enumerates the caption font edge type.
**System capability**: SystemCapability.Barrierfree.Accessibility.Hearing **System capability**: SystemCapability.Barrierfree.Accessibility.Hearing
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| none | No effect.| | none | No effect. |
| raised | Raised effect.| | raised | Raised effect. |
| depressed | Depressed effect.| | depressed | Depressed effect. |
| uniform | Uniform effect.| | uniform | Uniform effect. |
| dropShadow | Drop shadow effect.| | dropShadow | Drop shadow effect. |
## CaptionsFontFamily<sup>8+</sup> ## CaptionsFontFamily<sup>8+</sup>
...@@ -112,16 +112,16 @@ Enumerates the caption font families. ...@@ -112,16 +112,16 @@ Enumerates the caption font families.
**System capability**: SystemCapability.Barrierfree.Accessibility.Hearing **System capability**: SystemCapability.Barrierfree.Accessibility.Hearing
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| default | Default font family.| | default | Default font family. |
| monospacedSerif | Monospaced Serif fonts, which use the same width for each character.| | monospacedSerif | Monospaced Serif fonts, which use the same width for each character. |
| serif | Serif fonts.| | serif | Serif fonts. |
| monospacedSansSerif | Monospaced Sans Serif fonts, which use the same width for each character.| | monospacedSansSerif | Monospaced Sans Serif fonts, which use the same width for each character. |
| sansSerif | Sans Serif fonts.| | sansSerif | Sans Serif fonts. |
| casual | Casual fonts.| | casual | Casual fonts. |
| cursive | Cursive fonts.| | cursive | Cursive fonts. |
| smallCapitals | Small caps fonts.| | smallCapitals | Small caps fonts. |
## CaptionsStyle<sup>8+</sup> ## CaptionsStyle<sup>8+</sup>
...@@ -129,14 +129,14 @@ Describes the caption style. ...@@ -129,14 +129,14 @@ Describes the caption style.
**System capability**: SystemCapability.Barrierfree.Accessibility.Hearing **System capability**: SystemCapability.Barrierfree.Accessibility.Hearing
| Name| Type| Readable| Writable| Description| | Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| fontFamily | [CaptionsFontFamily](#captionsfontfamily8) | Yes| No| Font family of the captions.| | fontFamily | [CaptionsFontFamily](#captionsfontfamily8) | Yes | No | Font family of the captions. |
| fontScale | number | Yes| No| Font scale of the captions.| | fontScale | number | Yes | No | Font scale of the captions. |
| fontColor | number \| string | Yes| No| Font color of the captions.| | fontColor | number \ | string | Yes | No | Font color of the captions. |
| fontEdgeType | [CaptionsFontEdgeType](#captionsfontedgetype8) | Yes| No| Font edge type of the captions.| | fontEdgeType | [CaptionsFontEdgeType](#captionsfontedgetype8) | Yes | No | Font edge type of the captions. |
| backgroundColor | number \| string | Yes| No| Background color of the captions.| | backgroundColor | number \ | string | Yes | No | Background color of the captions. |
| windowColor | number \| string | Yes| No| Window color of the captions.| | windowColor | number \ | string | Yes | No | Window color of the captions. |
## CaptionsManager<sup>8+</sup> ## CaptionsManager<sup>8+</sup>
...@@ -144,10 +144,10 @@ Implements caption configuration management. ...@@ -144,10 +144,10 @@ Implements caption configuration management.
### Attributes ### Attributes
| Name| Type| Readable| Writable| Description| | Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| enabled | boolean | Yes| No| Whether to enable caption configuration.| | enabled | boolean | Yes | No | Whether to enable caption configuration. |
| style | [CaptionsStyle](#captionsstyle8) | Yes| No| Caption style.| | style | [CaptionsStyle](#captionsstyle8) | Yes | No | Caption style. |
### Methods ### Methods
...@@ -163,10 +163,10 @@ Enables listening for enable status changes of caption configuration. ...@@ -163,10 +163,10 @@ Enables listening for enable status changes of caption configuration.
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for, which is set to **enableChange** in this API.| | type | string | Yes | Type of the event to listen for, which is set to **enableChange** in this API. |
| callback | Callback&lt;boolean&gt; | Yes| Callback invoked when the enable status of caption configuration changes.| | callback | Callback&lt;boolean&gt; | Yes | Callback invoked when the enable status of caption configuration changes. |
- Example - Example
...@@ -186,10 +186,10 @@ Enables listening for caption style changes. ...@@ -186,10 +186,10 @@ Enables listening for caption style changes.
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for, which is set to **styleChange** in this API.| | type | string | Yes | Type of the event to listen for, which is set to **styleChange** in this API. |
| callback | Callback&lt;[CaptionsStyle](#captionsstyle8)&gt; | Yes| Callback invoked when the caption style changes.| | callback | Callback&lt;[CaptionsStyle](#captionsstyle8)&gt; | Yes | Callback invoked when the caption style changes. |
- Example - Example
...@@ -209,10 +209,10 @@ Disables listening for enable status changes of caption configuration. ...@@ -209,10 +209,10 @@ Disables listening for enable status changes of caption configuration.
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for, which is set to **enableChange** in this API.| | type | string | Yes | Type of the event to listen for, which is set to **enableChange** in this API. |
| callback | Callback&lt;boolean&gt; | No| Callback invoked when the enable status of caption configuration changes.| | callback | Callback&lt;boolean&gt; | No | Callback invoked when the enable status of caption configuration changes. |
- Example - Example
...@@ -230,10 +230,10 @@ Disables listening for caption style changes.s is removed. ...@@ -230,10 +230,10 @@ Disables listening for caption style changes.s is removed.
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for, which is set to **styleChange** in this API.| | type | string | Yes | Type of the event to listen for, which is set to **styleChange** in this API. |
| callback | Callback&lt;[CaptionsStyle](#captionsstyle8)&gt; | No| Callback invoked when the caption style changes.| | callback | Callback&lt;[CaptionsStyle](#captionsstyle8)&gt; | No | Callback invoked when the caption style changes. |
- Example - Example
...@@ -249,22 +249,22 @@ Describes a GUI change event. ...@@ -249,22 +249,22 @@ Describes a GUI change event.
### Attributes ### Attributes
| Name| Type| Readable| Writable| Description| | Name | Type | Readable | Writable | Description |
| -------- | -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- | -------- |
| type | [EventType](#eventtype) | Yes| Yes| Accessibility event type.| | type | [EventType](#eventtype) | Yes | Yes | Accessibility event type. |
| windowUpdateType | [WindowUpdateType](#windowupdatetype) | Yes| Yes| Window update type.| | windowUpdateType | [WindowUpdateType](#windowupdatetype) | Yes | Yes | Window update type. |
| bundleName | string | Yes| Yes| Target application name.| | bundleName | string | Yes | Yes | Target application name. |
| componentType | string | Yes| Yes| Type of the event source component, for example, button or chart.| | componentType | string | Yes | Yes | Type of the event source component, for example, button or chart. |
| pageId | number | Yes| Yes| Page ID of the event source.| | pageId | number | Yes | Yes | Page ID of the event source. |
| description | string | Yes| Yes| Event description.| | description | string | Yes | Yes | Event description. |
| triggerAction | [Action](#action) | Yes| Yes| Action that triggers the event.| | triggerAction | [Action](#action) | Yes | Yes | Action that triggers the event. |
| textMoveUnit | [TextMoveUnit](#textmoveunit) | Yes| Yes| Text movement unit.| | textMoveUnit | [TextMoveUnit](#textmoveunit) | Yes | Yes | Text movement unit. |
| contents | Array&lt;string&gt; | Yes| Yes| Array of contents.| | contents | Array&lt;string&gt; | Yes | Yes | Array of contents. |
| lastContent | string | Yes| Yes| Latest content.| | lastContent | string | Yes | Yes | Latest content. |
| beginIndex | number | Yes| Yes| Sequence number of the first item displayed on the page.| | beginIndex | number | Yes | Yes | Sequence number of the first item displayed on the page. |
| currentIndex | number | Yes| Yes| Sequence number of the current item.| | currentIndex | number | Yes | Yes | Sequence number of the current item. |
| endIndex | number | Yes| Yes| Sequence number of the last item displayed on the page.| | endIndex | number | Yes | Yes | Sequence number of the last item displayed on the page. |
| itemCount | number | Yes| Yes| Total number of items.| | itemCount | number | Yes | Yes | Total number of items. |
## EventType ## EventType
...@@ -272,19 +272,19 @@ Enumerates accessibility event types. ...@@ -272,19 +272,19 @@ Enumerates accessibility event types.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core **System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| click | Event of clicking a component.| | click | Event of clicking a component. |
| longClick | Event of long-pressing a component.| | longClick | Event of long-pressing a component. |
| select | Event of selecting a component.| | select | Event of selecting a component. |
| focus | Event indicating that the component obtains the focus.| | focus | Event indicating that the component obtains the focus. |
| textUpdate | Event indicating that the component text has been updated.| | textUpdate | Event indicating that the component text has been updated. |
| hoverEnter | Event indicating that the hover enters a component.| | hoverEnter | Event indicating that the hover enters a component. |
| hoverExit | Event indicating that the hover exits a component.| | hoverExit | Event indicating that the hover exits a component. |
| scroll | Event of the scroll view.| | scroll | Event of the scroll view. |
| textSelectionUpdate | Event indicating that the selected text has been updated.| | textSelectionUpdate | Event indicating that the selected text has been updated. |
| accessibilityFocus | Event indicating that the accessibility focus has been obtained.| | accessibilityFocus | Event indicating that the accessibility focus has been obtained. |
| accessibilityFocusClear | Event indicating that the accessibility focus has been cleared.| | accessibilityFocusClear | Event indicating that the accessibility focus has been cleared. |
## TextMoveUnit ## TextMoveUnit
...@@ -292,13 +292,13 @@ Enumerates the movement units for traversing the node text. ...@@ -292,13 +292,13 @@ Enumerates the movement units for traversing the node text.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core **System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| char | The movement unit for traversing the node text is by character.| | char | The movement unit for traversing the node text is by character. |
| word | The movement unit for traversing the node text is by word.| | word | The movement unit for traversing the node text is by word. |
| line | The movement unit for traversing the node text is by line.| | line | The movement unit for traversing the node text is by line. |
| page | The movement unit for traversing the node text is by page.| | page | The movement unit for traversing the node text is by page. |
| paragraph | The movement unit for traversing the node text is by paragraph.| | paragraph | The movement unit for traversing the node text is by paragraph. |
## WindowUpdateType ## WindowUpdateType
...@@ -306,19 +306,19 @@ Enumerates window update types. ...@@ -306,19 +306,19 @@ Enumerates window update types.
**System capability**: SystemCapability.Barrierfree.Accessibility.Core **System capability**: SystemCapability.Barrierfree.Accessibility.Core
| Name| Description| | Name | Description |
| -------- | -------- | | -------- | -------- |
| add | Window adding.| | add | Window adding. |
| remove | Window deletion.| | remove | Window deletion. |
| title | Window title change.| | title | Window title change. |
| bounds | Window boundary change.| | bounds | Window boundary change. |
| layer | Window layer change.| | layer | Window layer change. |
| active | Window activity change.| | active | Window activity change. |
| focus | Window focus change.| | focus | Window focus change. |
| accessibilityFocus | Window accessibility focus change.| | accessibilityFocus | Window accessibility focus change. |
| parent | Parent window change.| | parent | Parent window change. |
| children | Child window change.| | children | Child window change. |
| pip | Picture-in-picture (PIP) mode change.| | pip | Picture-in-picture (PIP) mode change. |
## accessibility.getAbilityLists ## accessibility.getAbilityLists
...@@ -330,16 +330,16 @@ Obtains the accessibility application list. This API uses a promise to return th ...@@ -330,16 +330,16 @@ Obtains the accessibility application list. This API uses a promise to return th
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| abilityType | [AbilityType](#abilitytype) | Yes| Accessibility application type.| | abilityType | [AbilityType](#abilitytype) | Yes | Accessibility application type. |
| stateType | [AbilityState](#abilitystate) | Yes| Accessibility application status.| | stateType | [AbilityState](#abilitystate) | Yes | Accessibility application status. |
- Return value - Return value
| Type| Description| | Type | Description |
| -------- | -------- | | -------- | -------- |
| Promise&lt;Array&lt;[AccessibilityAbilityInfo](#accessibilityabilityinfo)&gt;&gt; | Promise used to return the accessibility application list.| | Promise&lt;Array&lt;[AccessibilityAbilityInfo](#accessibilityabilityinfo)&gt;&gt; | Promise used to return the accessibility application list. |
- Example - Example
...@@ -373,11 +373,11 @@ Obtains the accessibility application list. This API uses an asynchronous callba ...@@ -373,11 +373,11 @@ Obtains the accessibility application list. This API uses an asynchronous callba
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| abilityType | [AbilityType](#abilitytype) | Yes| Accessibility application type.| | abilityType | [AbilityType](#abilitytype) | Yes | Accessibility application type. |
| stateType | [AbilityState](#abilitystate) | Yes| Accessibility application status.| | stateType | [AbilityState](#abilitystate) | Yes | Accessibility application status. |
| callback | AsyncCallback&lt;Array&lt;[AccessibilityAbilityInfo](#accessibilityabilityinfo)&gt;&gt; | Yes| Callback used to return the accessibility application list.| | callback | AsyncCallback&lt;Array&lt;[AccessibilityAbilityInfo](#accessibilityabilityinfo)&gt;&gt; | Yes | Callback used to return the accessibility application list. |
- Example - Example
...@@ -412,9 +412,9 @@ Obtains the accessibility caption configuration. ...@@ -412,9 +412,9 @@ Obtains the accessibility caption configuration.
- Return value - Return value
| Type| Description| | Type | Description |
| -------- | -------- | | -------- | -------- |
| [CaptionsManager](#captionsmanager8) | Accessibility caption configuration.| | [CaptionsManager](#captionsmanager8) | Accessibility caption configuration. |
- Example - Example
...@@ -430,10 +430,10 @@ Enables listening for the accessibility application or touch guide mode status c ...@@ -430,10 +430,10 @@ Enables listening for the accessibility application or touch guide mode status c
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for.<br>-&nbsp;**accessibilityStateChange** means to listen for enable status changes of the accessibility application.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Core<br>-&nbsp;**touchGuideStateChange** means to listen for enable status changes of the touch guide mode.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Vision| | type | string | Yes | Type of the event to listen for.<br>-&nbsp;**accessibilityStateChange** means to listen for enable status changes of the accessibility application.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Core<br>-&nbsp;**touchGuideStateChange** means to listen for enable status changes of the touch guide mode.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Vision |
| callback | Callback&lt;boolean&gt; | Yes| Callback invoked when the enable status changes.| | callback | Callback&lt;boolean&gt; | Yes | Callback invoked when the enable status changes. |
- Example - Example
...@@ -453,10 +453,10 @@ Disables listening for the accessibility application or touch guide mode status ...@@ -453,10 +453,10 @@ Disables listening for the accessibility application or touch guide mode status
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| type | string | No| Type of the event to listen for.<br>-&nbsp;**accessibilityStateChange** means to listen for enable status changes of the accessibility application.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Core<br>-&nbsp;**touchGuideStateChange** means to listen for enable status changes of the touch guide mode.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Vision| | type | string | No | Type of the event to listen for.<br>-&nbsp;**accessibilityStateChange** means to listen for enable status changes of the accessibility application.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Core<br>-&nbsp;**touchGuideStateChange** means to listen for enable status changes of the touch guide mode.<br>**System capability**: SystemCapability.Barrierfree.Accessibility.Vision |
| callback | Callback&lt;boolean&gt; | No| Callback invoked when the enable status changes.| | callback | Callback&lt;boolean&gt; | No | Callback invoked when the enable status changes. |
- Example - Example
...@@ -476,9 +476,9 @@ Checks whether accessibility is enabled. This API uses a promise to return the r ...@@ -476,9 +476,9 @@ Checks whether accessibility is enabled. This API uses a promise to return the r
- Return value - Return value
| Type| Description| | Type | Description |
| -------- | -------- | | -------- | -------- |
| Promise&lt;boolean&gt; | Returns **true** if accessibility is enabled; returns **false** otherwise.| | Promise&lt;boolean&gt; | Returns **true** if accessibility is enabled; returns **false** otherwise. |
- Example - Example
...@@ -501,9 +501,9 @@ Checks whether accessibility is enabled. This API uses an asynchronous callback ...@@ -501,9 +501,9 @@ Checks whether accessibility is enabled. This API uses an asynchronous callback
- Parameters - Parameters
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | Yes| Callback used to return the result. Returns **true** if accessibility is enabled; returns **false** otherwise.| | callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return the result. Returns **true** if accessibility is enabled; returns **false** otherwise. |
- Example - Example
...@@ -527,9 +527,9 @@ Checks whether touch guide mode is enabled. This API uses a promise to return th ...@@ -527,9 +527,9 @@ Checks whether touch guide mode is enabled. This API uses a promise to return th
- Return value - Return value
| Type| Description| | Type | Description |
| -------- | -------- | | -------- | -------- |
| Promise&lt;boolean&gt; | Returns **true** if touch guide mode is enabled; returns **false** otherwise.| | Promise&lt;boolean&gt; | Returns **true** if touch guide mode is enabled; returns **false** otherwise. |
- Example - Example
...@@ -552,9 +552,9 @@ Checks whether touch guide mode is enabled. This API uses an asynchronous callba ...@@ -552,9 +552,9 @@ Checks whether touch guide mode is enabled. This API uses an asynchronous callba
- Parameters - Parameters
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | Yes| Callback used to return the result. Returns **true** if touch guide mode is enabled; returns **false** otherwise.| | callback | AsyncCallback&lt;boolean&gt; | Yes | Callback used to return the result. Returns **true** if touch guide mode is enabled; returns **false** otherwise. |
- Example - Example
...@@ -578,15 +578,15 @@ Sends an accessibility event. This API uses a promise to return the result. ...@@ -578,15 +578,15 @@ Sends an accessibility event. This API uses a promise to return the result.
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| event | [EventInfo](#eventinfo) | Yes| Accessibility event.| | event | [EventInfo](#eventinfo) | Yes | Accessibility event. |
- Return value - Return value
| Type| Description| | Type | Description |
| -------- | -------- | | -------- | -------- |
| Promise&lt;void&gt; | Promise used to return the result. Returns data if the accessibility event is sent successfully; returns an error otherwise.| | Promise&lt;void&gt; | Promise used to return the result. Returns data if the accessibility event is sent successfully; returns an error otherwise. |
- Example - Example
...@@ -609,10 +609,10 @@ Sends an accessibility event. This API uses an asynchronous callback to return t ...@@ -609,10 +609,10 @@ Sends an accessibility event. This API uses an asynchronous callback to return t
- **Parameters** - **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| event | [EventInfo](#eventinfo) | Yes| Accessibility event.| | event | [EventInfo](#eventinfo) | Yes | Accessibility event. |
| callback | AsyncCallback&lt;void&gt; | Yes| Callback used to return the result. Returns data if the accessibility event is sent successfully; returns an error otherwise.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result. Returns data if the accessibility event is sent successfully; returns an error otherwise. |
- Example - Example
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册