From e1b36a52361319f4ca3cb142efeaa575214d3ef9 Mon Sep 17 00:00:00 2001 From: zengqingyu Date: Fri, 1 Apr 2022 17:46:29 +0800 Subject: [PATCH] fix docs of js interfaces. Signed-off-by: zengqingyu Change-Id: I3f7be2cae4b25a800af10f0e2e9dc57dd83c1434 --- api/@ohos.display.d.ts | 58 +++++++++++++++++++-------------------- api/@ohos.screenshot.d.ts | 20 +++++++------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/api/@ohos.display.d.ts b/api/@ohos.display.d.ts index 024a10daef..332ab04ba3 100644 --- a/api/@ohos.display.d.ts +++ b/api/@ohos.display.d.ts @@ -16,153 +16,153 @@ import { AsyncCallback, Callback } from './basic'; /** - * interface of display manager + * Interface of display manager. * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ declare namespace display { /** - * get the default display + * Obtain the default display. * @since 7 */ function getDefaultDisplay(callback: AsyncCallback): void; /** - * get the default display + * Obtain the default display. * @since 7 */ function getDefaultDisplay(): Promise; /** - * get all displays + * Obtain all displays. * @since 7 */ function getAllDisplay(callback: AsyncCallback>): void; /** - * get all displays + * Obtain all displays. * @since 7 */ function getAllDisplay(): Promise>; /** - * register the callback of display change + * Register the callback for display changes. * @param type: type of callback * @since 7 */ function on(type: 'add' | 'remove' | 'change', callback: Callback): void; /** - * unregister the callback of display change + * Unregister the callback for display changes. * @param type: type of callback * @since 7 */ function off(type: 'add' | 'remove' | 'change', callback?: Callback): void; /** - * the state of display + * Enumerates the display states. * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ enum DisplayState { /** - * unknown + * Unknown. */ STATE_UNKNOWN = 0, /** - * screen off + * Screen off. */ STATE_OFF, /** - * screen on + * Screen on. */ STATE_ON, /** - * doze, but it will update for some important system messages + * Doze, but it will update for some important system messages. */ STATE_DOZE, /** - * doze and not update + * Doze and not update. */ STATE_DOZE_SUSPEND, /** - * VR node + * VR node. */ STATE_VR, /** - * screen on and not update + * Screen on and not update. */ STATE_ON_SUSPEND, } /** - * Properties of display, it couldn't update automatically + * Define properties of the display. They cannot be updated automatically. * @syscap SystemCapability.WindowManager.WindowManager.Core * @since 7 */ interface Display { /** - * display id + * Display ID. */ id: number; /** - * display name + * Display name. */ name: string; /** - * the display is alive + * The display is alive. */ alive: boolean; /** - * the state of display + * The state of display. */ state: DisplayState; /** - * refresh rate, unit: Hz + * Refresh rate, in Hz. */ refreshRate: number; /** - * the rotation degrees of the display + * Rotation degrees of the display. */ rotation: number; /** - * the width of display, unit: pixel + * Display width, in pixels. */ width: number; /** - * the height of display, unit: pixel + * Display height, in pixels. */ height: number; /** - * indicates the display resolution. + * Display resolution. */ densityDPI: number; /** - * indicates the display density in pixels. The value of a low-resolution display is 1.0 + * Display density, in pixels. The value for a low-resolution display is 1.0. */ densityPixels: number; /** - * indicates the text scale density of a display. + * Text scale density of the display. */ scaledDensity: number; /** - * the DPI on X-axis. + * DPI on the x-axis. */ xDPI: number; /** - * the DPI on Y-axis. + * DPI on the y-axis. */ yDPI: number; } diff --git a/api/@ohos.screenshot.d.ts b/api/@ohos.screenshot.d.ts index 0e91364d1e..4928ee300f 100644 --- a/api/@ohos.screenshot.d.ts +++ b/api/@ohos.screenshot.d.ts @@ -17,14 +17,14 @@ import { AsyncCallback, ErrorCallback } from './basic'; import image from './@ohos.multimedia.image'; /** - * interface for screenshot + * Declares the screenshot APIs. * @syscap SystemCapability.WindowManager.WindowManager.Core * @systemapi Hide this for inner system use. * @since 7 */ declare namespace screenshot { /** - * Takes a screenshot and saves it as a PixelMap object + * Takes a screenshot and saves it as a PixelMap object. * @param options Screenshot options, which consist of screenRect, imageSize, and rotation. You need to set these parameters * @permission ohos.permission.CAPTURE_SCREEN * @since 7 @@ -32,7 +32,7 @@ declare namespace screenshot { function save(options?: ScreenshotOptions, callback: AsyncCallback): void; /** - * Takes a screenshot and saves it as a PixelMap object + * Takes a screenshot and saves it as a PixelMap object. * @param options Screenshot options, which consist of screenRect, imageSize, and rotation. You need to set these parameters * @permission ohos.permission.CAPTURE_SCREEN * @since 7 @@ -40,7 +40,7 @@ declare namespace screenshot { function save(options?: ScreenshotOptions): Promise; /** - * Describes the region of the screen to capture + * Describes the region of the screen to capture. * @since 7 */ interface Rect { @@ -51,7 +51,7 @@ declare namespace screenshot { } /** - * Describes the size of the screen region to capture + * Describes the size of the screen region to capture. * @since 7 */ interface Size { @@ -60,24 +60,24 @@ declare namespace screenshot { } /** - * Describes screenshot options + * Describes screenshot options. * @since 7 */ interface ScreenshotOptions { /** - * Region of the screen to capture. If this parameter is null, the full screen will be captured + * Region of the screen to capture. If this parameter is null, the full screen will be captured. */ screenRect?: Rect; /** - * Region of the screen to capture. If this parameter is null, the full screen will be captured + * Region of the screen to capture. If this parameter is null, the full screen will be captured. */ imageSize?: Size; /** - * Rotation angle of the screenshot. The value can be 0, 90, 180, or 270. The default value is 0 + * Rotation angle of the screenshot. The value can be 0, 90, 180, or 270. The default value is 0. */ rotation?: number; /** - * The specify screen to be captured. + * ID of the screen to be captured. * @since 8 */ displayId?: number; -- Gitee