mirror of
https://gitee.com/openharmony/interface_sdk-js
synced 2024-11-27 09:22:53 +00:00
Description: 新增EmbeddedUI接口
IssueNo: #I926M3 Sig: SIG_ApplicationFramework Feature or Bugfix: Feature Binary Source: No Signed-off-by: yangzk <yangzhongkai@huawei.com> Change-Id: If1bdfb14102c9abcdf2311fad17fe29dac475af9
This commit is contained in:
parent
8c1552d912
commit
a35270292d
32
api/@ohos.app.ability.EmbeddedUIExtensionAbility.d.ts
vendored
Normal file
32
api/@ohos.app.ability.EmbeddedUIExtensionAbility.d.ts
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2024 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file
|
||||
* @kit AbilityKit
|
||||
*/
|
||||
|
||||
import UIExtensionAbility from './@ohos.app.ability.UIExtensionAbility';
|
||||
|
||||
/**
|
||||
* The class of embedded UI extension ability.
|
||||
*
|
||||
* @extends UIExtensionAbility
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.Core
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
export default class EmbeddedUIExtensionAbility extends UIExtensionAbility {
|
||||
}
|
8
api/@ohos.bundle.bundleManager.d.ts
vendored
8
api/@ohos.bundle.bundleManager.d.ts
vendored
@ -577,6 +577,14 @@ declare namespace bundleManager {
|
||||
*/
|
||||
ADS_SERVICE = 20,
|
||||
|
||||
/**
|
||||
* Indicates extension info with type of embedded UI
|
||||
*
|
||||
* @syscap SystemCapability.BundleManager.BundleFramework.Core
|
||||
* @since 12
|
||||
*/
|
||||
EMBEDDED_UI = 21,
|
||||
|
||||
/**
|
||||
* Indicates extension info with type of unspecified
|
||||
*
|
||||
|
47
api/application/UIExtensionContext.d.ts
vendored
47
api/application/UIExtensionContext.d.ts
vendored
@ -294,4 +294,49 @@ export default class UIExtensionContext extends ExtensionContext {
|
||||
* @since 12
|
||||
*/
|
||||
reportDrawnCompleted(callback: AsyncCallback<void>): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroys the UI extension.
|
||||
*
|
||||
* @param { AsyncCallback<void> } callback - The callback of terminateSelf.
|
||||
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.Core
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
terminateSelf(callback: AsyncCallback<void>): void;
|
||||
|
||||
/**
|
||||
* Destroys the UI extension.
|
||||
*
|
||||
* @returns { Promise<void> } The promise returned by the function.
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.Core
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
terminateSelf(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Destroys the UI extension while returning the specified result code and data to the caller.
|
||||
*
|
||||
* @param { AbilityResult } parameter - Indicates the result to return.
|
||||
* @param { AsyncCallback<void> } callback - The callback of terminateSelfWithResult.
|
||||
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.Core
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
terminateSelfWithResult(parameter: AbilityResult, callback: AsyncCallback<void>): void;
|
||||
|
||||
/**
|
||||
* Destroys the UI extension while returning the specified result code and data to the caller.
|
||||
*
|
||||
* @param { AbilityResult } parameter - Indicates the result to return.
|
||||
* @returns { Promise<void> } The promise returned by the function.
|
||||
* @throws { BusinessError } 401 - If the input parameter is not valid parameter.
|
||||
* @syscap SystemCapability.Ability.AbilityRuntime.Core
|
||||
* @StageModelOnly
|
||||
* @since 12
|
||||
*/
|
||||
terminateSelfWithResult(parameter: AbilityResult): Promise<void>;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user