提交 12a799f0 编写于 作者: E ester.zhou

update docs (8602)

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 9c828ced
......@@ -9,10 +9,18 @@ You can use the APIs of this module to configure the concerned information, obta
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> The APIs of this module can be used only in the stage model.
## Modules to Import
## Usage
Before using the **AccessibilityExtensionContext** module, you must define a child class that inherits from **AccessibilityExtensionAbility**.
```js
import AccessibilityExtensionAbility from '@ohos.application.AccessibilityExtensionAbility'
class MainAbility extends AccessibilityExtensionAbility {
onConnect(): void {
console.log("AxExtensionAbility onConnect");
let axContext = this.context;
}
}
```
## FocusDirection
......@@ -203,9 +211,9 @@ this.context.getWindows().then(windows => {
})
```
## AccessibilityExtensionContext.gestureInject
## AccessibilityExtensionContext.injectGesture
gestureInject(gesturePath: GesturePath, listener: Callback\<boolean>): Promise\<boolean
injectGesture(gesturePath: GesturePath, listener: Callback\<boolean>): Promise\<boolean
Injects a gesture.
......
......@@ -162,7 +162,7 @@ In the following API examples, you must first use the [accessibility.getCaptions
on(type: 'enableChange', callback: Callback&lt;boolean&gt;): void;
Enables listening for enabled status changes of captions configuration.
Enables listening for the enabled status changes of captions configuration.
- **Parameters**
......@@ -204,7 +204,7 @@ Enables listening for captions style changes.
off(type: 'enableChange', callback?: Callback&lt;boolean&gt;): void;
Disables listening for enabled status changes of captions configuration.
Disables listening for the enabled status changes of captions configuration.
- **Parameters**
......@@ -269,6 +269,8 @@ constructor(jsonObject)
Implements a constructor.
**System capability**: SystemCapability.BarrierFree.Accessibility.Core
- **Parameters**
| Name| Type| Mandatory| Description|
......@@ -435,14 +437,16 @@ Obtains the captions configuration.
on(type: 'accessibilityStateChange' | 'touchGuideStateChange', callback: Callback&lt;boolean&gt;): void
Enables listening for the accessibility application or touch guide mode status changes.
Enables listening for the enabled status changes of the accessibility application or touch guide mode.
- **Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the event to listen for.<br>- **'accessibilityStateChange'** means to listen for enabled status changes of the accessibility application.<br>**System capability**: SystemCapability.BarrierFree.Accessibility.Core<br>- **'touchGuideStateChange'** means to listen for enabled status changes of the touch guide mode.<br>**System capability**: SystemCapability.BarrierFree.Accessibility.Vision|
| callback | Callback&lt;boolean&gt; | Yes| Callback invoked when the enabled status of captions configuration changes.|
| type | string | Yes| Type of the event to listen for.<br>- **'accessibilityStateChange'** means to listen for the enabled status changes of the accessibility application.<br>**System capability**: SystemCapability.BarrierFree.Accessibility.Core<br>- **'touchGuideStateChange'** means to listen for the enabled status changes of the touch guide mode.<br>**System capability**: SystemCapability.BarrierFree.Accessibility.Vision|
| callback | Callback\<boolean> | Yes| Callback invoked when the enabled status of captions configuration changes.|
- **Example**
......@@ -456,13 +460,15 @@ Enables listening for the accessibility application or touch guide mode status c
off(type: 'accessibilityStateChange ' | 'touchGuideStateChange', callback?: Callback&lt;boolean&gt;): void
Disables listening for the accessibility application or touch guide mode status changes.
Disables listening for the enabled status changes of the accessibility application or touch guide mode.
- **Parameters**
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | No| Type of the event to listen for.<br>- **'accessibilityStateChange'** means to listen for enabled status changes of the accessibility application.<br>**System capability**: SystemCapability.BarrierFree.Accessibility.Core<br>- **'touchGuideStateChange'** means to listen for enabled 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>- **'accessibilityStateChange'** means to listen for the enabled status changes of the accessibility application.<br>**System capability**: SystemCapability.BarrierFree.Accessibility.Core<br>- **'touchGuideStateChange'** means to listen for the enabled status changes of the touch guide mode.<br>**System capability**: SystemCapability.BarrierFree.Accessibility.Vision|
| callback | Callback&lt;boolean&gt; | No| Callback invoked when the enabled status changes.|
- **Example**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册