diff --git a/api/@ohos.sceneSessionManager.d.ts b/api/@ohos.sceneSessionManager.d.ts index c48f6404d390851ce4c520ce4777301ab33535c1..ebe902b18c242ccf5ebc67dba59afd9a86db0467 100644 --- a/api/@ohos.sceneSessionManager.d.ts +++ b/api/@ohos.sceneSessionManager.d.ts @@ -24,9 +24,9 @@ import ServiceExtensionContext from './application/ServiceExtensionContext'; * @since 10 */ declare namespace sceneSessionManager { - /** - * The information of a scene. - */ +/** + * The information of a scene. + */ interface SceneInfo { /** * The bundle name of the scene. @@ -38,6 +38,174 @@ declare namespace sceneSessionManager { abilityName: string; } + enum SessionState { + /** + * Session is disconnect. + */ + STATE_DISCONNECT, + /** + * Session is on connect. + */ + STATE_CONNECT, + /** + * Session is on foregrounf. + */ + STATE_FOREGROUND, + + /** + * Session is active. + */ + STATE_ACTIVE, + + /** + * Session is inactive. + */ + STATE_INACTIVE, + + /** + * Session is background. + */ + STATE_BACKGROUND, + + /** + * Session is end. + */ + STATE_END, + } + + /** + * Round rect. + * + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @systemapi Hide this for inner system use. + */ + interface SessionRect { + posX_: number; + + posY_: number; + + width: number; + + height: number; + } + + /** + * The type of a session. + * @syscap SystemCapability.SessionManager.SessionManager.Core + * @since 7 + */ + + enum SessionType { + /** + * App main window. + */ + TYPE_APP_MAIN_WINDOW, + /** + * Media window. + */ + TYPE_MEDIA, + /** + * App sub window. + */ + TYPE_APP_SUB_WINDOW, + /** + * Component window. + */ + TYPE_APP_COMPONENT, + /** + * Wallpaper window. + */ + TYPE_WALLPAPER, + /** + * Desktop window. + */ + TYPE_DESKTOP, + /** + * Launcher window. + */ + TYPE_APP_LAUNCHING, + /** + * Incoming call window. + */ + TYPE_INCOMING_CALL, + /** + * Searching bar window. + */ + TYPE_SEARCHING_BAR, + /** + * System alarm window. + */ + TYPE_SYSTEM_ALARM_WINDOW, + /** + * Input method window. + */ + TYPE_INPUT_METHOD_FLOAT, + /** + * System float window. + */ + TYPE_FLOAT, + /** + * System toast window. + */ + TYPE_TOAST, + /** + * System panel window. + */ + TYPE_PANEL, + /** + * Keyguard window. + */ + TYPE_KEYGUARD, + /** + * Volume overlay window. + */ + TYPE_VOLUME_OVERLAY, + /** + * Dragging effect window. + */ + TYPE_DRAGGING_EFFECT, + /** + * Launcher recent window. + */ + TYPE_LAUNCHER_RECENT, + /** + * Launcher dock window. + */ + TYPE_LAUNCHER_DOCK, + /** + * Boot animation window. + */ + TYPE_BOOT_ANIMATION, + /** + * Freeze display window. + */ + TYPE_FREEZE_DISPLAY, + /** + * Voice interaction window. + */ + TYPE_VOICE_INTERACTION, + /** + * Float camera window. + */ + TYPE_FLOAT_CAMERA, + /** + * Place holder window. + */ + TYPE_PLACEHOLDER, + /** + * Dialog window. + */ + TYPE_DIALOG, + /** + * Screenshot window. + */ + TYPE_SCREENSHOT, + /** + * System sub window. + */ + TYPE_SYSTEM_SUB_WINDOW + } + /** * The session of a scene. */ @@ -47,11 +215,36 @@ declare namespace sceneSessionManager { */ readonly persistentId: number; + /** + * Type of the session. + */ + readonly sessionType: SessionType; + + readonly sessionRect: SessionRect; + /** * Register the callback of pending another scene session activation from this scene session. * @param type: 'pendingSceneSessionActivation' */ on(type: 'pendingSceneSessionActivation', callback: Callback): void; + + /** + * Register the callback of creating specific session from this scene session. + * @param type: 'createSpecificSession' + */ + on(type: 'createSpecificSession', callback: Callback): void; + + /** + * Register the callback of state change of this scene session. + * @param type: 'pendingSceneSessionActivation' + */ + on(type: 'sessionStateChange', callback: Callback): void; + + /** + * Register the callback of state change of this scene session. + * @param type: 'pendingSceneSessionActivation' + */ + on(type: 'sessionRectChange', callback: Callback): void; } /**