1/* 2 * Copyright (c) 2020 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 16export interface AppResponse { 17 /** 18 * Application bundleName. 19 * @since 6 20 */ 21 appID: string; 22 23 /** 24 * Application name. 25 * @since 3 26 */ 27 appName: string; 28 29 /** 30 * Application version name. 31 * @since 3 32 */ 33 versionName: string; 34 35 /** 36 * Application version. 37 * @since 3 38 */ 39 versionCode: number; 40} 41 42export interface RequestFullWindowOptions { 43 /** 44 * Duration for transition from non-full window to full window, in milliseconds. 45 * By default, the value is in direct proportion to the distance between the non-full window and the full window. 46 * @devices phone, tablet 47 * @since 3 48 */ 49 duration?: number 50} 51 52/** 53 * @Syscap SysCap.ACE.UIEngine 54 */ 55export default class App { 56 /** 57 * Obtains the declared information in the config.json file of an application. 58 */ 59 static getInfo(): AppResponse; 60 61 /** 62 * Destroys the current ability. 63 */ 64 static terminate(): void; 65 66 /** 67 * Requests the application to run in full window. 68 * In some scenarios, such as semi-modal FA, the FA runs in non-full window. 69 * In this case, you can call this API. 70 * This API is invalid for an application already in full-window mode. 71 * @param obj Transition time from non-full window to full window, in milliseconds. 72 * By default, the value is in direct proportion to the distance between the non-full window and the full window. 73 */ 74 static requestFullWindow(options?: RequestFullWindowOptions): void; 75} 76