From 04c16fd05dbf926b9ac620acd004db6515c3c37f Mon Sep 17 00:00:00 2001 From: fanby01 Date: Fri, 11 Feb 2022 17:55:47 +0800 Subject: [PATCH] add wide gamut support for window interface Signed-off-by: fanby01 Change-Id: I6b1d27068a5529351816c2cc999f0528501780b7 --- api/@ohos.window.d.ts | 55 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index f7c964c64a..b1bfab22e6 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -323,7 +323,22 @@ declare namespace window { * Whether the window is touchable. The default value is false * @since 6 */ - isFullScreen: boolean + touchable: boolean + } + + /** + * Type of allowing the specified of color space. + * @since 8 + */ + enum ColorSpace { + /** + * Default color space. + */ + DEFAULT, + /** + * Wide gamut color space. The specific wide color gamut depends on thr screen. + */ + WIDE_GAMUT, } interface Window { @@ -581,6 +596,44 @@ declare namespace window { * @since 7 */ off(type: 'systemAvoidAreaChange', callback?: Callback): void; + + /** + * Whether the window supports thr wide gamut setting. + * @since 8 + */ + isSupportWideGamut(): Promise; + + /** + * Whether the window supports thr wide gamut setting. + * @since 8 + */ + isSupportWideGamut(callback: AsyncCallback): void; + + /** + * Sets the specified color space. + * @param colorSpace the specified color space. + * @since 8 + */ + setColorSpace(colorSpace:ColorSpace): Promise; + + /** + * Sets the specified color space. + * @param colorSpace the specified color space. + * @since 8 + */ + setColorSpace(colorSpace:ColorSpace, callback: AsyncCallback): void; + + /** + * Obtains thr set color space. + * @since 8 + */ + getColorSpace(): Promise; + + /** + * Obtains thr set color space. + * @since 8 + */ + getColorSpace(callback: AsyncCallback): void; } enum WindowStageEventType { -- Gitee