From ac2a9931b6bdf4272eb78d884eaaaad7a5ec75dc Mon Sep 17 00:00:00 2001 From: dubj Date: Tue, 26 Apr 2022 12:03:00 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Extension=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dubj Change-Id: I3c9d0ba49b5841d104fe9aab23d7c3718dde064f --- api/@ohos.bundle.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 8a45e0a354..25021a5b63 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -289,6 +289,7 @@ declare namespace bundle { * @syscap SystemCapability.BundleManager.BundleFramework */ BACKUP = 9, + WINDOW = 10, /** * @default Indicates extension info with type of unspecified * @since 9 -- Gitee From 90bd6ae516e7312cd9d1ee2ed363a9414e45b7ed Mon Sep 17 00:00:00 2001 From: dubj Date: Tue, 26 Apr 2022 14:01:43 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0Extension=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dubj Change-Id: I2da7a85802ddbf9fee3753e5c1780f65393f5fab --- api/@ohos.bundle.d.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/@ohos.bundle.d.ts b/api/@ohos.bundle.d.ts index 25021a5b63..e7ac76ed92 100644 --- a/api/@ohos.bundle.d.ts +++ b/api/@ohos.bundle.d.ts @@ -289,6 +289,11 @@ declare namespace bundle { * @syscap SystemCapability.BundleManager.BundleFramework */ BACKUP = 9, + /** + * @default Indicates extension info with type of window + * @since 9 + * @syscap SystemCapability.BundleManager.BundleFramework + */ WINDOW = 10, /** * @default Indicates extension info with type of unspecified -- Gitee From 7fe82ac0e0a0a4ebf74162cec3320e96b2bbad94 Mon Sep 17 00:00:00 2001 From: dubj Date: Tue, 26 Apr 2022 14:31:17 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0WindowExtension?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dubj Change-Id: I0e2b1b0984f2b3cb7182dc04e78f80835005ee18 --- ...os.application.WindowExtensionAbility.d.ts | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 api/@ohos.application.WindowExtensionAbility.d.ts diff --git a/api/@ohos.application.WindowExtensionAbility.d.ts b/api/@ohos.application.WindowExtensionAbility.d.ts new file mode 100644 index 0000000000..bcc7fa882f --- /dev/null +++ b/api/@ohos.application.WindowExtensionAbility.d.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2022-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 rpc from "./@ohos.rpc"; +import ExtensionContext from "./application/ExtensionContext"; +import Want from './@ohos.application.Want'; + +/** + * class of window extension ability. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi hide for inner use. + * @StageModelOnly + */ +export default class WindowExtensionAbility { + /** + * Indicates window extension ability context. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi hide for inner use. + * @StageModelOnly + */ + context: ExtensionContext; + + /** + * Called back when a window extension is first connected to an ability. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @param want Indicates connection information about the Window ability. + * @systemapi hide for inner use. + * @return Returns the proxy of the Window ability. + * @StageModelOnly + */ + onConnect(want: Want): rpc.RemoteObject; + + /** + * Called back when all abilities connected to a window extension are disconnected. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @param want Indicates disconnection information about the window extension. + * @systemapi hide for inner use. + * @return - + * @StageModelOnly + */ + onDisconnect(want: Want): void; +} + -- Gitee From 93c99a5555b6ce7358f08420d713128b8db9f6f8 Mon Sep 17 00:00:00 2001 From: dubj Date: Tue, 26 Apr 2022 16:04:12 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=B7=BB=E5=8A=A0onWindowReady=20=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dubj Change-Id: Iae7ba6190512387451868269ac6700d9aa84711d --- api/@ohos.application.WindowExtensionAbility.d.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/api/@ohos.application.WindowExtensionAbility.d.ts b/api/@ohos.application.WindowExtensionAbility.d.ts index bcc7fa882f..6d24e6bbdf 100644 --- a/api/@ohos.application.WindowExtensionAbility.d.ts +++ b/api/@ohos.application.WindowExtensionAbility.d.ts @@ -59,5 +59,16 @@ export default class WindowExtensionAbility { * @StageModelOnly */ onDisconnect(want: Want): void; + + /** + * Called back when window is created. + * + * @since 9 + * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi hide for inner use. + * @return - + * @StageModelOnly + */ + onWindowReady(window: Window): void; } -- Gitee