!10030 添加接口支持系统应用窗口置顶

Merge pull request !10030 from Zark0626/master
This commit is contained in:
openharmony_ci 2024-04-01 11:30:24 +00:00 committed by Gitee
commit c51b99b5ad
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

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

@ -4264,6 +4264,23 @@ declare namespace window {
*/
setBrightness(brightness: number, callback: AsyncCallback<void>): void;
/**
* Set whether the main window is topmost.
*
* @param { boolean } isTopmost - Main window is topmost if true.
* @returns { Promise<void> } Promise that returns no value.
* @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 801 - Capability not supported on this device.
* @throws { BusinessError } 1300002 - This window state is abnormal.
* @throws { BusinessError } 1300003 - This window manager service works abnormally.
* @throws { BusinessError } 1300004 - Unauthorized operation.
* @syscap SystemCapability.Window.SessionManager
* @systemapi
* @since 12
*/
setTopmost(isTopmost: boolean): Promise<void>;
/**
* Sets the brightness of window.
*