From 1505e92e6239beef246bd3e5d069a84a40fad277 Mon Sep 17 00:00:00 2001 From: ustclc Date: Fri, 8 Apr 2022 10:38:50 +0800 Subject: [PATCH] remote animation Signed-off-by: ustclc Change-Id: Ia9bf048f9cb8d6e817cfa648ec91f0baadb63990 --- ...ohos.animation.windowAnimationManager.d.ts | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 api/@ohos.animation.windowAnimationManager.d.ts diff --git a/api/@ohos.animation.windowAnimationManager.d.ts b/api/@ohos.animation.windowAnimationManager.d.ts new file mode 100644 index 0000000000..d8baf4fb1c --- /dev/null +++ b/api/@ohos.animation.windowAnimationManager.d.ts @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +declare namespace windowAnimationManager { + function setController(controller: WindowAnimationController): void; + + export enum WindowAnimationTargetType { + NORMAL_APP = 0, + LAUNCHER, + SCREEN_LOCK, + SYSTEM_UI, + } + + export interface RRect { + left: number; + + top: number; + + width: number; + + height: number; + + radius: number; + } + + export interface WindowAnimationTarget { + readonly type: WindowAnimationTargetType; + + readonly bundleName: string; + + readonly abilityName: string; + + readonly windowBounds: RRect; + + readonly windowId: number; + + readonly surfaceNodeId: number; + } + + export interface WindowAnimationFinishedCallback { + onAnimationFinish(): void; + } + + export interface WindowAnimationController { + onTransition(fromWindow: WindowAnimationTarget, toWindow: WindowAnimationTarget, + finishCallback: WindowAnimationFinishedCallback): void; + + onMinimizeWindow(minimizingWindow: WindowAnimationTarget, finishCallback: WindowAnimationFinishedCallback): void; + + onCloseWindow(closingWindow: WindowAnimationTarget, finishCallback: WindowAnimationFinishedCallback): void + } +} + +export default windowAnimationManager; -- Gitee