diff --git a/BUILD.gn b/BUILD.gn index 735000f5be05504a381da91de572826d9c6d021b..39dcd12045fa29a86b593903f370675d4885894a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1,4 +1,4 @@ -# Copyright (c) 2021 Huawei Device Co., Ltd. +# Copyright (c) 2021-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 @@ -83,6 +83,7 @@ ohos_copy("ets_component") { "api/@internal/component/ets/rating.d.ts", "api/@internal/component/ets/rect.d.ts", "api/@internal/component/ets/refresh.d.ts", + "api/@internal/component/ets/remote_window.d.ts", "api/@internal/component/ets/rich_text.d.ts", "api/@internal/component/ets/row.d.ts", "api/@internal/component/ets/row_split.d.ts", diff --git a/api/@internal/component/ets/index-full.d.ts b/api/@internal/component/ets/index-full.d.ts index 25e737704ec1431e8d9a54197941dfc40709c9f0..ab46069b72d2cc708803ace67074a87b2258d0aa 100644 --- a/api/@internal/component/ets/index-full.d.ts +++ b/api/@internal/component/ets/index-full.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-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 @@ -99,3 +99,4 @@ /// /// /// +/// diff --git a/api/@internal/component/ets/middle_class.d.ts b/api/@internal/component/ets/middle_class.d.ts index adad7410a1fd41cc46380f309ee2a7f55e65b15a..4da58c2be02ccffa6560d5605e03e921f987a00a 100644 --- a/api/@internal/component/ets/middle_class.d.ts +++ b/api/@internal/component/ets/middle_class.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021 Huawei Device Co., Ltd. + * Copyright (c) 2021-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 @@ -2349,3 +2349,27 @@ declare class TSGestureGroupInterface { */ pop(): GestureGroupInterface; } + +/** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ +declare class TSRemoteWindowAttribute extends CommonMethod { + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + create(target?: WindowAnimationTarget): RemoteWindowAttribute; + + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 8 + */ + pop(): RemoteWindowAttribute; +} diff --git a/api/@internal/component/ets/remote_window.d.ts b/api/@internal/component/ets/remote_window.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..b4c7ca1d049146e90d9f6a360acbd4859d411ab2 --- /dev/null +++ b/api/@internal/component/ets/remote_window.d.ts @@ -0,0 +1,35 @@ +/* + * 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. + */ +import {windowAnimationManager.WindowAnimationTarget as WindowAnimationTarget} from "../../@ohos.animation.windowAnimationManager"; +/** + * Create RemoteWindow. + * @since 7 + */ +interface RemoteWindowInterface { + /** + * Window Animation Target. + * @since 7 + */ + (target?: WindowAnimationTarget): RemoteWindowAttribute; +} + +/** + * Inheritance CommonMethod Set Styles + * @since 7 + */ +declare class RemoteWindowAttribute extends CommonMethod {} + +declare const RemoteWindow: RemoteWindowInterface; +declare const RemoteWindowInstance: RemoteWindowAttribute; diff --git a/api/@ohos.animation.windowAnimationManager.d.ts b/api/@ohos.animation.windowAnimationManager.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..f4f4e2b4c955f29362ad9174bcdde165fb18473c --- /dev/null +++ b/api/@ohos.animation.windowAnimationManager.d.ts @@ -0,0 +1,68 @@ +/* + * 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. + */ + +/** + * Window AnimationManager. + * @syscap SystemCapability.WindowManager.WindowManager.Core + */ +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; + } + + 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;