add ability of setting window grayScale

Signed-off-by: yuantianzhu1@huawei.com <yuantianzhu1@huawei.com>
This commit is contained in:
yuantianzhu1@huawei.com 2024-04-19 15:36:44 +08:00
parent 291fe60eef
commit 39237955c9

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

@ -5726,6 +5726,20 @@ declare namespace window {
* @since 12
*/
off(type: 'windowRectChange', callback?: Callback<RectChangeOptions>): void;
/**
* Set gray scale of window.
*
* @param { number } grayScale - The value of gray scale.
* @returns { Promise<void> } - The promise returned by the function.
* @throws { BusinessError } 401 - Parameter error.
* @throws { BusinessError } 801 - Capability not supported.
* @throws { BusinessError } 1300002 - This window state is abnormal.
* @throws { BusinessError } 1300003 - This window manager service works abnormally.
* @syscap SystemCapability.Window.SessionManager
* @since 12
*/
setWindowGrayScale(grayScale: number): Promise<void>;
}
/**