1/* 2 * Copyright (c) 2021-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 16class WindowStage { 17 constructor(obj) { 18 this.__window_stage__ = obj; 19 } 20 21 setUIContent(context, url, storage) { 22 return this.__window_stage__.setUIContent(context, url, storage); 23 } 24 25 loadContent(url, storage, asyncCallback) { 26 return this.__window_stage__.loadContent(url, storage, asyncCallback); 27 } 28 29 loadContentByName(name, storage, asyncCallback) { 30 return this.__window_stage__.loadContentByName(name, storage, asyncCallback); 31 } 32 33 getWindowMode(asyncCallback) { 34 return this.__window_stage__.getWindowMode(asyncCallback); 35 } 36 37 getMainWindow(asyncCallback) { 38 return this.__window_stage__.getMainWindow(asyncCallback); 39 } 40 41 getMainWindowSync() { 42 return this.__window_stage__.getMainWindowSync(); 43 } 44 45 createSubWindow(windowName, asyncCallback) { 46 return this.__window_stage__.createSubWindow(windowName, asyncCallback); 47 } 48 49 createSubWindowWithOptions(windowName, options, asyncCallback) { 50 return this.__window_stage__.createSubWindowWithOptions(windowName, options, asyncCallback); 51 } 52 53 getSubWindow(asyncCallback) { 54 return this.__window_stage__.getSubWindow(asyncCallback); 55 } 56 57 setWindowModal(isModal) { 58 return this.__window_stage__.setWindowModal(isModal); 59 } 60 61 on(type, callback) { 62 return this.__window_stage__.on(type, callback); 63 } 64 65 off(type, callback) { 66 return this.__window_stage__.off(type, callback); 67 } 68 69 setShowOnLockScreen(showOnLockScreen) { 70 return this.__window_stage__.setShowOnLockScreen(showOnLockScreen); 71 } 72 73 disableWindowDecor() { 74 return this.__window_stage__.disableWindowDecor(); 75 } 76 77 setDefaultDensityEnabled(enabled) { 78 return this.__window_stage__.setDefaultDensityEnabled(enabled); 79 } 80 81 removeStartingWindow() { 82 return this.__window_stage__.removeStartingWindow(); 83 } 84 85 setWindowRectAutoSave(enabled) { 86 return this.__window_stage__.setWindowRectAutoSave(enabled); 87 } 88 89 isWindowRectAutoSave() { 90 return this.__window_stage__.isWindowRectAutoSave(); 91 } 92} 93 94export default WindowStage; 95