From ecbe5dfb4e96d0c4fdcaa95766cd914cc86b5509 Mon Sep 17 00:00:00 2001 From: hejunfei Date: Mon, 16 Jun 2025 20:18:47 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=BA=9F=E5=BC=83makeExpand=E5=92=8CstopEx?= =?UTF-8?q?pand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hejunfei --- api/@ohos.screen.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/@ohos.screen.d.ts b/api/@ohos.screen.d.ts index 4ae3c4b796..e832a1397e 100644 --- a/api/@ohos.screen.d.ts +++ b/api/@ohos.screen.d.ts @@ -102,6 +102,7 @@ declare namespace screen { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. * @since 9 + * @deprecated since 20 */ function makeExpand(options: Array, callback: AsyncCallback): void; @@ -118,6 +119,7 @@ declare namespace screen { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. * @since 9 + * @deprecated since 20 */ function makeExpand(options: Array): Promise; @@ -134,6 +136,7 @@ declare namespace screen { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. * @since 10 + * @deprecated since 20 */ function stopExpand(expandScreen: Array, callback: AsyncCallback): void; @@ -150,6 +153,7 @@ declare namespace screen { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. * @since 10 + * @deprecated since 20 */ function stopExpand(expandScreen: Array): Promise; -- Gitee From 2b11ed60bcdd9d79f24b425106e782510e7bc765 Mon Sep 17 00:00:00 2001 From: hejunfei Date: Mon, 16 Jun 2025 21:19:55 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=BA=9F=E5=BC=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hejunfei --- api/@ohos.screen.d.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/@ohos.screen.d.ts b/api/@ohos.screen.d.ts index e832a1397e..a7dc8852ca 100644 --- a/api/@ohos.screen.d.ts +++ b/api/@ohos.screen.d.ts @@ -103,6 +103,7 @@ declare namespace screen { * @systemapi Hide this for inner system use. * @since 9 * @deprecated since 20 + * @useinstead ohos.screen#setMultiScreenMode */ function makeExpand(options: Array, callback: AsyncCallback): void; @@ -120,6 +121,7 @@ declare namespace screen { * @systemapi Hide this for inner system use. * @since 9 * @deprecated since 20 + * @useinstead ohos.screen#setMultiScreenMode */ function makeExpand(options: Array): Promise; @@ -137,6 +139,7 @@ declare namespace screen { * @systemapi Hide this for inner system use. * @since 10 * @deprecated since 20 + * @useinstead ohos.screen#setMultiScreenMode */ function stopExpand(expandScreen: Array, callback: AsyncCallback): void; @@ -154,6 +157,7 @@ declare namespace screen { * @systemapi Hide this for inner system use. * @since 10 * @deprecated since 20 + * @useinstead ohos.screen#setMultiScreenMode */ function stopExpand(expandScreen: Array): Promise; -- Gitee From 7c6bd4e050bfa48aeb323007718a5ac08261e4ac Mon Sep 17 00:00:00 2001 From: hejunfei Date: Fri, 20 Jun 2025 09:49:23 +0800 Subject: [PATCH 3/4] =?UTF-8?q?hdr=E6=88=AA=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hejunfei --- api/@ohos.screenshot.d.ts | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/api/@ohos.screenshot.d.ts b/api/@ohos.screenshot.d.ts index 9e1ecf8c65..8f32a8b17c 100644 --- a/api/@ohos.screenshot.d.ts +++ b/api/@ohos.screenshot.d.ts @@ -89,6 +89,25 @@ declare namespace screenshot { */ function save(options?: ScreenshotOptions): Promise; + /** + * Screen capture, supporting HDR screenshots when there is HDR content. + * + * @permission ohos.permission.CAPTURE_SCREEN + * @param { HdrScreenshotOptions } options - Screenshot parameters. + * @returns { Promise> } Promise used to return a PixelMap array. When HDR content is available, + * return two PixelMap objects: the first one as SDR and the second one as HDR. When no HDR content is available, only return one SDR PixelMap object. + * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. + * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. + * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. + * @throws { BusinessError } 1400001 - Invalid display or screen. + * @throws { BusinessError } 1400003 - This display manager service works abnormally. + * @throws { BusinessError } 1400004 - Parameter error. Possible cause: 1.Invalid parameter range. + * @syscap SystemCapability.Window.SessionManager + * @systemapi Hide this for inner system use. + * @since 20 + */ + function saveHdrPicture(options?: HdrScreenshotOptions): Promise>; + /** * Takes a capture and return as a PixelMap object. * @@ -312,6 +331,44 @@ declare namespace screenshot { */ isCaptureFullOfScreen?: boolean; } + + /** + * Describes hdr screenshot options. + * + * @interface HdrScreenshotOptions + * @syscap SystemCapability.Window.SessionManager + * @systemapi Hide this for inner system use. + * @since 20 + */ + interface HdrScreenshotOptions { + /** + * ID of the screen to be captured. + * + * @type { ?number } + * @syscap SystemCapability.Window.SessionManager + * @systemapi Hide this for inner system use. + * @since 20 + */ + displayId?: number; + /** + * The capture action is need notification. + * + * @type { ?boolean } + * @syscap SystemCapability.Window.SessionManager + * @systemapi Hide this for inner system use. + * @since 20 + */ + isNotificationNeeded?: boolean; + /** + * The capture action is need take screenshots of all displays on this screen. + * + * @type { ?boolean } + * @syscap SystemCapability.Window.SessionManager + * @systemapi Hide this for inner system use. + * @since 20 + */ + isCaptureFullOfScreen?: boolean; + } } export default screenshot; -- Gitee From 6465e65d791d16724a6556d9f895202e7b53a3f5 Mon Sep 17 00:00:00 2001 From: hejunfei Date: Fri, 20 Jun 2025 16:02:33 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=88=A0=E9=99=A4makeExpand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hejunfei --- api/@ohos.screen.d.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/api/@ohos.screen.d.ts b/api/@ohos.screen.d.ts index a7dc8852ca..4ae3c4b796 100644 --- a/api/@ohos.screen.d.ts +++ b/api/@ohos.screen.d.ts @@ -102,8 +102,6 @@ declare namespace screen { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. * @since 9 - * @deprecated since 20 - * @useinstead ohos.screen#setMultiScreenMode */ function makeExpand(options: Array, callback: AsyncCallback): void; @@ -120,8 +118,6 @@ declare namespace screen { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. * @since 9 - * @deprecated since 20 - * @useinstead ohos.screen#setMultiScreenMode */ function makeExpand(options: Array): Promise; @@ -138,8 +134,6 @@ declare namespace screen { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. * @since 10 - * @deprecated since 20 - * @useinstead ohos.screen#setMultiScreenMode */ function stopExpand(expandScreen: Array, callback: AsyncCallback): void; @@ -156,8 +150,6 @@ declare namespace screen { * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. * @since 10 - * @deprecated since 20 - * @useinstead ohos.screen#setMultiScreenMode */ function stopExpand(expandScreen: Array): Promise; -- Gitee