mirror of
https://gitee.com/openharmony/accessibility
synced 2024-11-23 15:01:17 +00:00
commit
fe32ad1d70
@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { GesturePoint } from './@ohos.accessibility.GesturePoint';
|
||||
import type { GesturePoint } from './@ohos.accessibility.GesturePoint';
|
||||
|
||||
/**
|
||||
* Indicates the path of the gesture.
|
||||
|
@ -13,8 +13,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import accessibility from './@ohos.accessibility';
|
||||
import { AsyncCallback, Callback } from './basic';
|
||||
import type accessibility from './@ohos.accessibility';
|
||||
import type { AsyncCallback, Callback } from './basic';
|
||||
|
||||
/**
|
||||
* Configuration of the accessibility.
|
||||
@ -32,7 +32,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var highContrastText: Config<boolean>;
|
||||
let highContrastText: Config<boolean>;
|
||||
/**
|
||||
* Indicates the configuration of invert color.
|
||||
*
|
||||
@ -40,7 +40,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var invertColor: Config<boolean>;
|
||||
let invertColor: Config<boolean>;
|
||||
/**
|
||||
* Indicates the configuration of daltonization color filter.
|
||||
*
|
||||
@ -48,7 +48,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var daltonizationColorFilter: Config<DaltonizationColorFilter>;
|
||||
let daltonizationColorFilter: Config<DaltonizationColorFilter>;
|
||||
/**
|
||||
* Indicates the configuration of content timeout.
|
||||
*
|
||||
@ -56,7 +56,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var contentTimeout: Config<number>;
|
||||
let contentTimeout: Config<number>;
|
||||
/**
|
||||
* Indicates the configuration of animation state.
|
||||
*
|
||||
@ -64,7 +64,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var animationOff: Config<boolean>;
|
||||
let animationOff: Config<boolean>;
|
||||
/**
|
||||
* Indicates the configuration of brightness discount.
|
||||
*
|
||||
@ -72,7 +72,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var brightnessDiscount: Config<number>;
|
||||
let brightnessDiscount: Config<number>;
|
||||
/**
|
||||
* Indicates the configuration of screen magnifier.
|
||||
*
|
||||
@ -80,7 +80,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var screenMagnifier: Config<boolean>;
|
||||
let screenMagnifier: Config<boolean>;
|
||||
/**
|
||||
* Indicates the configuration of audio mono.
|
||||
*
|
||||
@ -88,7 +88,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var audioMono: Config<boolean>;
|
||||
let audioMono: Config<boolean>;
|
||||
/**
|
||||
* Indicates the configuration of audio balance.
|
||||
*
|
||||
@ -96,7 +96,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var audioBalance: Config<number>;
|
||||
let audioBalance: Config<number>;
|
||||
/**
|
||||
* Indicates the configuration of mouse key state.
|
||||
*
|
||||
@ -104,7 +104,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var mouseKey: Config<boolean>;
|
||||
let mouseKey: Config<boolean>;
|
||||
/**
|
||||
* Indicates the configuration of mouse auto click.
|
||||
*
|
||||
@ -112,7 +112,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var mouseAutoClick: Config<number>;
|
||||
let mouseAutoClick: Config<number>;
|
||||
/**
|
||||
* Indicates the configuration of short key state.
|
||||
*
|
||||
@ -120,7 +120,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var shortkey: Config<boolean>;
|
||||
let shortkey: Config<boolean>;
|
||||
/**
|
||||
* Indicates the configuration of short key target.
|
||||
*
|
||||
@ -128,7 +128,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var shortkeyTarget: Config<string>;
|
||||
let shortkeyTarget: Config<string>;
|
||||
/**
|
||||
* Indicates the configuration of captions state.
|
||||
*
|
||||
@ -136,7 +136,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var captions: Config<boolean>;
|
||||
let captions: Config<boolean>;
|
||||
/**
|
||||
* Indicates the configuration of captions style.
|
||||
*
|
||||
@ -144,7 +144,7 @@ declare namespace config {
|
||||
* @systemapi
|
||||
* @since 9
|
||||
*/
|
||||
var captionsStyle: Config<accessibility.CaptionsStyle>;
|
||||
let captionsStyle: Config<accessibility.CaptionsStyle>;
|
||||
|
||||
/**
|
||||
* Enable the accessibility extension ability.
|
||||
|
4
interfaces/kits/js/@ohos.accessibility.d.ts
vendored
4
interfaces/kits/js/@ohos.accessibility.d.ts
vendored
@ -13,8 +13,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AsyncCallback } from './basic';
|
||||
import { Callback } from './basic';
|
||||
import type { AsyncCallback } from './basic';
|
||||
import type { Callback } from './basic';
|
||||
|
||||
/**
|
||||
* Accessibility
|
||||
|
@ -13,9 +13,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import accessibility from './@ohos.accessibility';
|
||||
import AccessibilityExtensionContext, { AccessibilityElement } from './application/AccessibilityExtensionContext';
|
||||
import { KeyEvent } from './@ohos.multimodalInput.keyEvent';
|
||||
import type accessibility from './@ohos.accessibility';
|
||||
import type AccessibilityExtensionContext, { AccessibilityElement } from './application/AccessibilityExtensionContext';
|
||||
import type { KeyEvent } from './@ohos.multimodalInput.keyEvent';
|
||||
|
||||
/**
|
||||
* class of accessibility extension ability.
|
||||
|
@ -13,10 +13,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { AsyncCallback } from '../basic';
|
||||
import type { AsyncCallback } from '../basic';
|
||||
import ExtensionContext from './ExtensionContext';
|
||||
import accessibility from '../@ohos.accessibility';
|
||||
import { GesturePath } from '../@ohos.accessibility.GesturePath';
|
||||
import type accessibility from '../@ohos.accessibility';
|
||||
import type { GesturePath } from '../@ohos.accessibility.GesturePath';
|
||||
|
||||
/**
|
||||
* The accessibility extension context. Used to configure, query information, and inject gestures.
|
||||
|
@ -14,22 +14,22 @@
|
||||
*/
|
||||
|
||||
class AccessibilityExtensionAbility {
|
||||
onConnect() {
|
||||
console.log('onConnect');
|
||||
}
|
||||
onConnect() {
|
||||
console.log('onConnect');
|
||||
}
|
||||
|
||||
onDisconnect() {
|
||||
console.log('onDisconnect');
|
||||
}
|
||||
onDisconnect() {
|
||||
console.log('onDisconnect');
|
||||
}
|
||||
|
||||
onAccessibilityEvent(accessibilityEvent) {
|
||||
console.log('onAccessibilityEvent');
|
||||
}
|
||||
onAccessibilityEvent(accessibilityEvent) {
|
||||
console.log('onAccessibilityEvent');
|
||||
}
|
||||
|
||||
onKeyEvent(keyEvent) {
|
||||
console.log('onKeyEvent');
|
||||
return false;
|
||||
}
|
||||
onKeyEvent(keyEvent) {
|
||||
console.log('onKeyEvent');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export default AccessibilityExtensionAbility
|
||||
export default AccessibilityExtensionAbility;
|
||||
|
@ -13,37 +13,37 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
var ExtensionContext = requireNapi("application.ExtensionContext")
|
||||
let ExtensionContext = requireNapi('application.ExtensionContext');
|
||||
|
||||
class AccessibilityExtensionContext extends ExtensionContext {
|
||||
constructor(obj) {
|
||||
super(obj);
|
||||
}
|
||||
constructor(obj) {
|
||||
super(obj);
|
||||
}
|
||||
|
||||
setTargetBundleName(targetNames, callback) {
|
||||
console.log('setTargetBundleName');
|
||||
return this.__context_impl__.setTargetBundleName(targetNames, callback);
|
||||
}
|
||||
setTargetBundleName(targetNames, callback) {
|
||||
console.log('setTargetBundleName');
|
||||
return this.__context_impl__.setTargetBundleName(targetNames, callback);
|
||||
}
|
||||
|
||||
getFocusElement(isAccessibilityFocus, callback) {
|
||||
console.log('getFocusElement');
|
||||
return this.__context_impl__.getFocusElement(isAccessibilityFocus, callback);
|
||||
}
|
||||
getFocusElement(isAccessibilityFocus, callback) {
|
||||
console.log('getFocusElement');
|
||||
return this.__context_impl__.getFocusElement(isAccessibilityFocus, callback);
|
||||
}
|
||||
|
||||
getWindowRootElement(windowId, callback) {
|
||||
console.log('getWindowRootElement');
|
||||
return this.__context_impl__.getWindowRootElement(windowId, callback);
|
||||
}
|
||||
getWindowRootElement(windowId, callback) {
|
||||
console.log('getWindowRootElement');
|
||||
return this.__context_impl__.getWindowRootElement(windowId, callback);
|
||||
}
|
||||
|
||||
getWindows(displayId, callback) {
|
||||
console.log('getWindows');
|
||||
return this.__context_impl__.getWindows(displayId, callback);
|
||||
}
|
||||
getWindows(displayId, callback) {
|
||||
console.log('getWindows');
|
||||
return this.__context_impl__.getWindows(displayId, callback);
|
||||
}
|
||||
|
||||
injectGesture(gesture, callback) {
|
||||
console.log('injectGesture');
|
||||
return this.__context_impl__.injectGesture(gesture, callback);
|
||||
}
|
||||
injectGesture(gesture, callback) {
|
||||
console.log('injectGesture');
|
||||
return this.__context_impl__.injectGesture(gesture, callback);
|
||||
}
|
||||
}
|
||||
|
||||
export default AccessibilityExtensionContext
|
||||
export default AccessibilityExtensionContext;
|
Loading…
Reference in New Issue
Block a user