diff --git a/api/application/AccessibilityExtensionContext.d.ts b/api/application/AccessibilityExtensionContext.d.ts index c4bce8b967108bba922a72516050a1c9851df73e..13522488182722a18ee7bef578b2c72ce56bda73 100644 --- a/api/application/AccessibilityExtensionContext.d.ts +++ b/api/application/AccessibilityExtensionContext.d.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import { Callback, AsyncCallback } from "../basic"; +import { AsyncCallback } from "../basic"; import ExtensionContext from "./ExtensionContext"; import accessibility from "../@ohos.accessibility"; import { GesturePath } from "../@ohos.application.AccessibilityExtensionAbility"; @@ -25,19 +25,12 @@ import { GesturePath } from "../@ohos.application.AccessibilityExtensionAbility" * @syscap SystemCapability.BarrierFree.Accessibility.Core */ export default class AccessibilityExtensionContext extends ExtensionContext { - /** - * Set the accessibility event type which is wanted. - * @param type Indicates the type of event. - */ - setEventTypeFilter(type: Array): Promise; - setEventTypeFilter(type: Array, callback: AsyncCallback): boolean; - /** * Set the name of the bundle name that is interested in sending the event. * @param targetNames */ - setTargetBundleName(targetNames: Array): Promise; - setTargetBundleName(targetNames: Array, callback: AsyncCallback): boolean; + setTargetBundleName(targetNames: Array): Promise; + setTargetBundleName(targetNames: Array, callback: AsyncCallback): void; /** * Get focus element. @@ -66,11 +59,9 @@ export default class AccessibilityExtensionContext extends ExtensionContext { /** * Inject gesture path events. * @param gesturePath Indicates the gesture path. - * @param listener It is used to receive the result of gesture injection, - * true means success, otherwise means failure. */ - gestureInject(gesturePath: GesturePath, listener: Callback): Promise; - gestureInject(gesturePath: GesturePath, listener: Callback, callback: AsyncCallback): void; + injectGesture(gesturePath: GesturePath): Promise; + injectGesture(gesturePath: GesturePath, callback: AsyncCallback): void; } /** @@ -141,6 +132,10 @@ declare interface AccessibilityElement { * @syscap SystemCapability.BarrierFree.Accessibility.Core */ type ElementAttributeValues = { + /** + * Indicates accessibility focus state. + */ + 'accessibilityFocused': boolean; /** * Indicates the bundle name to which it belongs. */ @@ -189,6 +184,10 @@ type ElementAttributeValues = { * Indicates the list index of the last item displayed on the screen. */ 'endIndex': number; + /** + * Indicates the string of error state. + */ + 'error': string; /** * Indicates whether the element is focusable. */ @@ -213,6 +212,10 @@ type ElementAttributeValues = { * Indicates whether the element is enable or not. */ 'isEnable': boolean; + /** + * Indicates whether the element is hint state or not. + */ + 'isHint': boolean; /** * Indicates whether the element is focused or not. */ @@ -241,6 +244,10 @@ type ElementAttributeValues = { * Indicates whether the element is long clickable. */ 'longClickable': boolean; + /** + * Indicates the page id. + */ + 'pageId': number; /** * Indicates the parent of the element. */ @@ -297,6 +304,22 @@ type ElementAttributeValues = { * Indicates the window type of the element. */ 'type': WindowType; + /** + * Indicates the maximum value. + */ + 'valueMax': number; + /** + * Indicates the minimum value. + */ + 'valueMin': number; + /** + * Indicates the current value. + */ + 'valueNow': number; + /** + * Indicates the window id. + */ + 'windowId': number; } /**