From b45914514fef3ce65b6336585cd8ef1301b92200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E5=AE=87=E8=B1=AA?= Date: Wed, 10 Sep 2025 12:18:20 +0800 Subject: [PATCH] change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 卢宇豪 --- api/@ohos.screenshot.d.ts | 6 +++++- api/@ohos.window.d.ts | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/api/@ohos.screenshot.d.ts b/api/@ohos.screenshot.d.ts index 462bfc94e5..2a80c83899 100644 --- a/api/@ohos.screenshot.d.ts +++ b/api/@ohos.screenshot.d.ts @@ -62,9 +62,10 @@ declare namespace screenshot { /** * Screen capture, supporting HDR screenshots when there is HDR content. + * If HdrScreenshotOptions is null, save primary display Hdr picture. * * @permission ohos.permission.CAPTURE_SCREEN - * @param { HdrScreenshotOptions } [options] - Screenshot parameters. + * @param { HdrScreenshotOptions } [options] - Screenshot parameters. Default value is null. * @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. @@ -345,6 +346,7 @@ declare namespace screenshot { * ID of the screen to be captured. * * @type { ?number } + * @default The ID of current display. The value is a positive integer greater than or equal to 0. * @syscap SystemCapability.Window.SessionManager * @systemapi Hide this for inner system use. * @since 20 @@ -354,6 +356,7 @@ declare namespace screenshot { * The capture action is need notification. * * @type { ?boolean } + * @default true * @syscap SystemCapability.Window.SessionManager * @systemapi Hide this for inner system use. * @since 20 @@ -363,6 +366,7 @@ declare namespace screenshot { * The capture action is need take screenshots of all displays on this screen. * * @type { ?boolean } + * @default false * @syscap SystemCapability.Window.SessionManager * @systemapi Hide this for inner system use. * @since 20 diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 6dc429c950..04ddbe0525 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -3805,7 +3805,8 @@ declare namespace window { /** * List the window modes of the foreground window on the specified display. * - * @param { number } displayId - Indicate the id of display. + * @param { number } [displayId] - Indicate the id of display. + * Not passing or passing a value of null or undefined indicates querying all screens. * @returns { Promise } Promise used to return the window modes. * @throws { BusinessError } 801 - Capability not supported. function getGlobalWindowMode can not work correctly due to limited device capabilities. * @throws { BusinessError } 1300003 - This window manager service works abnormally. @@ -5619,11 +5620,15 @@ declare namespace window { * @param { boolean } enabled - The value true means the first level sub window supports maintaining * the same relative position with the main window, and false means the opposite. * @param { WindowAnchor } [anchor] - Window anchor point that setting - * when the relative position between the primary sub window and the main window remains unchanged. + * when the relative position between the primary sub window and the main window remains unchanged. The + * default value is window.WindowAnchor.TOP_Start, meaning the default anchor point is the top-left corner + * of the window. * @param { number } [offsetX] - The x-axis offset * between the anchor point of the first level sub window and the anchor point of the main window. + * The default value is 0. * @param { number } [offsetY] - The y-axis offset * between the anchor point of the first level sub window and the anchor point of the main window. + * The default value is 0. * @returns { Promise } Promise that returns no value. * @throws { BusinessError } 801 - Capability not supported. * Function setRelativePositionToParentWindowEnabled can not work correctly due to limited device capabilities. @@ -12139,6 +12144,7 @@ declare namespace window { * * @param { number } density - the specified custom density value. * @param { boolean } [applyToSubWindow] - whether to apply the custom density to already created subwindows. + * The default value is false. * @throws { BusinessError } 801 - Capability not supported. Failed to call the API due to limited device capabilities. * @throws { BusinessError } 1300002 - This window state is abnormal. * @throws { BusinessError } 1300005 - This window stage is abnormal. -- Gitee