!18273 getvisibleWIndowInfo修改为public API

Merge pull request !18273 from zzz/visible_public
This commit is contained in:
openharmony_ci 2025-03-31 15:40:26 +00:00 committed by Gitee
commit df64cf288f
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

11
api/@ohos.window.d.ts vendored
View File

@ -3072,6 +3072,17 @@ declare namespace window {
* @systemapi Hide this for inner system use.
* @since 12
*/
/**
* Get info of visible windows.
*
* @permission ohos.permission.VISIBLE_WINDOW_INFO
* @returns { Promise<Array<WindowInfo>> } - Promise that returns windowInfo list.
* @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API.
* @throws { BusinessError } 801 - Capability not supported. Function getVisibleWindowInfo can not work correctly due to limited device capabilities.
* @throws { BusinessError } 1300003 - This window manager service works abnormally.
* @syscap SystemCapability.Window.SessionManager
* @since 18
*/
function getVisibleWindowInfo(): Promise<Array<WindowInfo>>;
/**