From 8f8554c6e95fc88687fecdc6498da36a0ec3260b Mon Sep 17 00:00:00 2001 From: f00918780 Date: Thu, 4 Sep 2025 19:50:30 +0800 Subject: [PATCH] start vertical panel api1.2 --- ...ohos.app.ability.verticalPanelManager.d.ts | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/api/@ohos.app.ability.verticalPanelManager.d.ts b/api/@ohos.app.ability.verticalPanelManager.d.ts index 1eee332b1a..817b3278f7 100644 --- a/api/@ohos.app.ability.verticalPanelManager.d.ts +++ b/api/@ohos.app.ability.verticalPanelManager.d.ts @@ -20,6 +20,9 @@ import type common from './@ohos.app.ability.common'; import { AbilityResult } from './ability/abilityResult'; +/*** if arkts 1.2 */ +import { RecordData } from './@ohos.base'; +/*** endif */ /** * Defines a OnError function. @@ -32,6 +35,7 @@ import { AbilityResult } from './ability/abilityResult'; * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ type OnErrorFn = (code: number, name: string, message: string) => void; @@ -44,6 +48,7 @@ type OnErrorFn = (code: number, name: string, message: string) => void; * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ type OnResultFn = (parameter: AbilityResult) => void; @@ -55,6 +60,7 @@ type OnResultFn = (parameter: AbilityResult) => void; * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ declare namespace verticalPanelManager { @@ -83,6 +89,33 @@ declare namespace verticalPanelManager { panelConfig: PanelConfig, panelStartCallback: PanelStartCallback ): Promise; + + /** + * Starts the vertical domain picker with panel config. + * If the target ability is visible, you can start the target ability; If the target ability is invisible, + * you need to apply for permission:ohos.permission.START_INVISIBLE_ABILITY to start target invisible ability. + * If the caller application is in the background, it is not allowed to call this interface. + * + * @param { common.UIAbilityContext } context - Indicates the ui ability context of the application. + * @param { Record } wantParam - Indicates the want parameter. + * @param { PanelConfig } panelConfig - Indicates the panel config. + * @param { PanelStartCallback } panelStartCallback - indicates the panelStartCallback. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 202 - The application is not a system application. + * @throws { BusinessError } 16000050 - Failed to connect to the system service or system server handle failed. + * @throws { BusinessError } 16000135 - The main window of this ability of this context does not exits. + * @syscap SystemCapability.Ability.AppExtension.VerticalPanel + * @systemapi + * @stagemodelonly + * @since 20 + * @arkts 1.2 + */ + function startVerticalPanel( + context: common.UIAbilityContext, + wantParam: Record, + panelConfig: PanelConfig, + panelStartCallback: PanelStartCallback + ): Promise; /** * Indicates the panel config @@ -92,6 +125,7 @@ declare namespace verticalPanelManager { * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ interface PanelConfig { /** @@ -102,6 +136,7 @@ declare namespace verticalPanelManager { * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ type: VerticalType; @@ -121,6 +156,7 @@ declare namespace verticalPanelManager { * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ sourceAppInfo: Record; } @@ -133,6 +169,7 @@ declare namespace verticalPanelManager { * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ export enum VerticalType { /** @@ -142,6 +179,7 @@ declare namespace verticalPanelManager { * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ NAVIGATION = 'navigation', } @@ -154,6 +192,7 @@ declare namespace verticalPanelManager { * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ interface PanelStartCallback { /** @@ -164,6 +203,7 @@ declare namespace verticalPanelManager { * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ onError: OnErrorFn; @@ -175,6 +215,7 @@ declare namespace verticalPanelManager { * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ onResult?: OnResultFn; } @@ -186,6 +227,7 @@ declare namespace verticalPanelManager { * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ export const SOURCE_APP_BUNDLE_NAME = 'bundleName'; @@ -196,6 +238,7 @@ declare namespace verticalPanelManager { * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ export const SOURCE_APP_MODULE_NAME = 'moduleName'; @@ -206,6 +249,7 @@ declare namespace verticalPanelManager { * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ export const SOURCE_APP_ABILITY_NAME = 'abilityName'; @@ -216,6 +260,7 @@ declare namespace verticalPanelManager { * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ export const SOURCE_APP_WINDOW_ID = 'windowId'; @@ -226,6 +271,7 @@ declare namespace verticalPanelManager { * @systemapi * @stagemodelonly * @since 20 + * @arkts 1.1&1.2 */ export const SOURCE_APP_SCREEN_MODE = 'screenMode'; } -- Gitee