1/* 2 * Copyright (C) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16let ExtensionContext = requireNapi('application.ExtensionContext'); 17 18class AccessibilityExtensionContext extends ExtensionContext { 19 constructor(obj) { 20 super(obj); 21 } 22 23 setTargetBundleName(targetNames, callback) { 24 console.log('setTargetBundleName'); 25 return this.__context_impl__.setTargetBundleName(targetNames, callback); 26 } 27 28 getFocusElement(isAccessibilityFocus, callback) { 29 console.log('getFocusElement'); 30 return this.__context_impl__.getFocusElement(isAccessibilityFocus, callback); 31 } 32 33 getWindowRootElement(windowId, callback) { 34 console.log('getWindowRootElement'); 35 return this.__context_impl__.getWindowRootElement(windowId, callback); 36 } 37 38 getWindows(displayId, callback) { 39 console.log('getWindows'); 40 return this.__context_impl__.getWindows(displayId, callback); 41 } 42 43 injectGesture(gesture, callback) { 44 console.log('injectGesture'); 45 return this.__context_impl__.injectGesture(gesture, callback); 46 } 47 48 injectGestureSync(gesture, callback) { 49 console.log('injectGestureSync'); 50 return this.__context_impl__.injectGestureSync(gesture, callback); 51 } 52 53 startAbility(want, callback) { 54 console.log('startAbility'); 55 return this.__context_impl__.startAbility(want, callback); 56 } 57 58 enableScreenCurtain(isEnable) { 59 console.log('enableScreenCurtain'); 60 return this.__context_impl__.enableScreenCurtain(isEnable); 61 } 62} 63 64export default AccessibilityExtensionContext;