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 43c35f1f8e9b0fafa765d7511cad4287b97c20b8..fc8018b69024dfc7abc05262bdfe1467f78999ff 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,4 +99,5 @@ /// /// /// -/// \ No newline at end of file +/// +/// diff --git a/api/@internal/component/ets/middle_class.d.ts b/api/@internal/component/ets/middle_class.d.ts index adad7410a1fd41cc46380f309ee2a7f55e65b15a..bc2c03770d6b32147aa4ec493bd1b6b8f62b9e87 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 9 + */ +declare class TSRemoteWindowAttribute extends CommonMethod { + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 9 + */ + create(target?: WindowAnimationTarget | undefined): RemoteWindowAttribute; + + /** + * Used for TS compiler. + * @ignore + * @systemapi + * @since 9 + */ + 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..b6d9ef2395404de78dc492a8dbfe967a50c6d5cf --- /dev/null +++ b/api/@internal/component/ets/remote_window.d.ts @@ -0,0 +1,43 @@ +/* + * 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 from "../../@ohos.animation.windowAnimationManager"; + +/** + * Provides an interface for controlling the remote window. + * + * @systemapi + * @since 9 + */ +interface RemoteWindowInterface { + /** + * Called when the remote window interface is used. + * + * @systemapi + * @since 9 + */ + (target: windowAnimationManager.WindowAnimationTarget | undefined): RemoteWindowAttribute; +} + +/** + * Inheritance CommonMethod Set Styles + * + * @systemapi + * @since 9 + */ +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..990d3622fe1a6361d35d6baceec2ca28d6001b5c --- /dev/null +++ b/api/@ohos.animation.windowAnimationManager.d.ts @@ -0,0 +1,164 @@ +/* + * 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 animation manager. + * + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @systemapi Hide this for inner system use. + * @since 9 + */ + declare namespace windowAnimationManager { + /** + * Set the window animation controller. + * + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @param controller Window animation controller. + * @systemapi Hide this for inner system use. + * @since 9 + */ + function setController(controller: WindowAnimationController): void; + + /** + * Round rect. + * + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @systemapi Hide this for inner system use. + * @since 9 + */ + export interface RRect { + left: number; + + top: number; + + width: number; + + height: number; + + radius: number; + } + + /** + * Window animation target. + * + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @systemapi Hide this for inner system use. + * @since 9 + */ + export interface WindowAnimationTarget { + readonly bundleName: string; + + readonly abilityName: string; + + readonly windowBounds: RRect; + } + + /** + * Window animation finished callback. + * + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @systemapi Hide this for inner system use. + * @since 9 + */ + export interface WindowAnimationFinishedCallback { + onAnimationFinish(): void; + } + + /** + * Window animation controller. + * + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @systemapi Hide this for inner system use. + * @since 9 + */ + export interface WindowAnimationController { + /** + * Called on starting an application form launcher. + * + * @param startingWindowTarget Window target of the starting application. + * @param finishCallback Animation finished callback. + * @systemapi Hide this for inner system use. + * @since 9 + */ + onStartAppFromLauncher(startingWindowTarget: WindowAnimationTarget, + finishCallback: WindowAnimationFinishedCallback): void; + + /** + * Called on starting an application form recent. + * + * @param startingWindowTarget Window target of the starting application. + * @param finishCallback Animation finished callback. + * @systemapi Hide this for inner system use. + * @since 9 + */ + onStartAppFromRecent(startingWindowTarget: WindowAnimationTarget, + finishCallback: WindowAnimationFinishedCallback): void; + + /** + * Called on starting an application form other. + * + * @param startingWindowTarget Window target of the starting application. + * @param finishCallback Animation finished callback. + * @systemapi Hide this for inner system use. + * @since 9 + */ + onStartAppFromOther(startingWindowTarget: WindowAnimationTarget, + finishCallback: WindowAnimationFinishedCallback): void; + + /** + * Called on application transition. + * + * @param fromWindowTarget Window target of the source application. + * @param toWindowTarget Window target of the destination application. + * @param finishCallback Animation finished callback. + * @systemapi Hide this for inner system use. + * @since 9 + */ + onAppTransition(fromWindowTarget: WindowAnimationTarget, toWindowTarget: WindowAnimationTarget, + finishCallback: WindowAnimationFinishedCallback): void; + + /** + * Called on minimizing a window. + * + * @param minimizingWindowTarget Window target of the minimizing window. + * @param finishCallback Animation finished callback. + * @systemapi Hide this for inner system use. + * @since 9 + */ + onMinimizeWindow(minimizingWindowTarget: WindowAnimationTarget, + finishCallback: WindowAnimationFinishedCallback): void; + + /** + * Called on closing a window. + * + * @param closingWindowTarget Window target of the closing window. + * @param finishCallback Animation finished callback. + * @systemapi Hide this for inner system use. + * @since 9 + */ + onCloseWindow(closingWindowTarget: WindowAnimationTarget, finishCallback: WindowAnimationFinishedCallback): void; + + /** + * Called on unlocking the screen. + * + * @param finishCallback Animation finished callback. + * @systemapi Hide this for inner system use. + * @since 9 + */ + onScreenUnlock(finishCallback: WindowAnimationFinishedCallback): void; + } +} + +export default windowAnimationManager;