From 604184a1c9ba93a15e74e35dbf4a65c4555b3a9e Mon Sep 17 00:00:00 2001 From: sunchao Date: Wed, 28 May 2025 03:26:42 +0000 Subject: [PATCH 01/20] =?UTF-8?q?api=E6=95=B4=E6=94=B9=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sunchao --- api.diff | 372 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 372 insertions(+) create mode 100644 api.diff diff --git a/api.diff b/api.diff new file mode 100644 index 0000000000..59834b095f --- /dev/null +++ b/api.diff @@ -0,0 +1,372 @@ +From 6067ede4b8ea985fcebff201d4b4ac8fc5d7fe3d Mon Sep 17 00:00:00 2001 +From: l00905966 +Date: Mon, 26 May 2025 16:46:36 +0800 +Subject: [PATCH] =?UTF-8?q?TicketNo:=20Description:=E5=AF=B9=E5=BA=94?= + =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=AF=B9=E5=87=BD=E6=95=B0=E8=AF=B4=E6=98=8E?= + =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E4=BF=AE=E6=94=B9=20Team:=20Feature=20or=20B?= + =?UTF-8?q?ugfix:=20Binary=20Source:=20PrivateCode(Yes/No):?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: Id368cfb77b1145e7a83b3cf93c1f310d8184323e +--- + api/@ohos.multimedia.camera.d.ts | 92 ++++++++++++++++---------- + api/@ohos.multimedia.cameraPicker.d.ts | 2 +- + 2 files changed, 58 insertions(+), 36 deletions(-) + +diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts +index 89c9a7c5f4..5c03d8c797 100644 +--- a/api/@ohos.multimedia.camera.d.ts ++++ b/api/@ohos.multimedia.camera.d.ts +@@ -242,7 +242,7 @@ declare namespace camera { + * @since 10 + */ + /** +- * Picture size. ++ * Resolution. The settings are the width and height of the camera's resolution, not the width and height of the actual output image. + * + * @type { Size } + * @readonly +@@ -335,7 +335,7 @@ declare namespace camera { + * @since 10 + */ + /** +- * Frame rate in unit fps (frames per second). ++ * Frame rate range, in fps (frames per second). + * + * @type { FrameRateRange } + * @readonly +@@ -785,7 +785,7 @@ declare namespace camera { + * @since 10 + */ + /** +- * Camera manager object. ++ * Camera Manager class, you need to get the camera manager instance through getCameraManager interface before using it. + * + * @interface CameraManager + * @syscap SystemCapability.Multimedia.Camera.Core +@@ -801,7 +801,7 @@ declare namespace camera { + * @since 10 + */ + /** +- * Gets supported camera descriptions. ++ * Get the supported camera device objects and return the results synchronously. + * + * @returns { Array } An array of supported cameras. + * @syscap SystemCapability.Multimedia.Camera.Core +@@ -851,7 +851,7 @@ declare namespace camera { + * @since 11 + */ + /** +- * Gets supported output capability for specific camera. ++ * Queries the output capability supported by the camera device in the specified mode and returns the result synchronously. + * + * @param { CameraDevice } camera - Camera device. + * @param { SceneMode } mode - Scene mode. +@@ -870,7 +870,7 @@ declare namespace camera { + * @since 10 + */ + /** +- * Determine whether camera is muted. ++ * Queries whether the current camera is muted. + * + * @returns { boolean } Is camera muted. + * @syscap SystemCapability.Multimedia.Camera.Core +@@ -949,10 +949,15 @@ declare namespace camera { + */ + /** + * Creates a CameraInput instance by camera. ++ * ++ * Before using this interface, first through the getSupportedCameras interface to query the current list of camera devices supported by the device, ++ * the developer needs to be based on specific scenarios to choose the camera device that meets the needs of the developer, ++ * and then use this interface to create a CameraInput instance. + * + * @permission ohos.permission.CAMERA + * @param { CameraDevice } camera - Camera device used to create the instance. +- * @returns { CameraInput } The CameraInput instance. ++ * @returns { CameraInput } Returns a CameraInput instance. ++ * Failure of an interface call returns the corresponding error code,which is of type CameraErrorCode. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @throws { BusinessError } 7400201 - Camera service fatal error. +@@ -988,11 +993,17 @@ declare namespace camera { + */ + /** + * Creates a CameraInput instance by camera position and type. ++ * ++ * Before using this interface, the developer needs to specify the position and type of the camera according to the application's specific usage scenarios, ++ * for example, to open the front camera to enter the self-timer function. + * + * @permission ohos.permission.CAMERA +- * @param { CameraPosition } position - Target camera position. +- * @param { CameraType } type - Target camera type. +- * @returns { CameraInput } The CameraInput instance. ++ * @param { CameraPosition } position - Camera position, first get the supported camera device objects through the getSupportedCameras interface, ++ * and then get the device position information based on the returned camera device objects. ++ * @param { CameraType } type - camera type, first get the supported camera device object through the getSupportedCameras interface, ++ * then get the device type information based on the returned camera device object. ++ * @returns { CameraInput } Returns a CameraInput instance. Failure of an interface call returns the corresponding error code, ++ * which is of type CameraErrorCode. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400102 - Operation not allowed. + * @throws { BusinessError } 7400201 - Camera service fatal error. +@@ -1254,8 +1265,9 @@ declare namespace camera { + /** + * Gets a Session instance by specific scene mode. + * +- * @param { SceneMode } mode - Scene mode. +- * @returns { T } The specific Session instance by specific scene mode. ++ * @param { SceneMode } mode - The modes supported by the camera. If the passed parameters are abnormal (e.g. out of range, passed null or undefined, etc.), ++ * the actual interface will not take effect. ++ * @returns { T } Session instance. Failure of an interface call returns the appropriate error code, which is of type CameraErrorCode. + * @throws { BusinessError } 7400101 - Parameter error. Possible causes: + * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; + * 3. Parameter verification failed. +@@ -1359,7 +1371,7 @@ declare namespace camera { + * @since 12 + */ + /** +- * Subscribes fold status change event callback. ++ * Registers a listener for folding device fold state changes. Use callback asynchronous callback. + * + * @param { 'foldStatusChanged' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the fold status change. +@@ -1725,7 +1737,7 @@ declare namespace camera { + * @since 11 + */ + /** +- * is torch active ++ * Whether the flashlight is activated or not. true means the flashlight is activated, false means the flashlight is not activated. + * + * @type { boolean } + * @readonly +@@ -1744,7 +1756,7 @@ declare namespace camera { + * @since 11 + */ + /** +- * the current torch brightness level. ++ * Flashlight brightness level, value range is [0,1], the closer to 1, the brighter it is. + * + * @type { number } + * @readonly +@@ -1825,7 +1837,7 @@ declare namespace camera { + * @since 10 + */ + /** +- * Camera status info. ++ * An instance of the interface returned by the camera manager's callback that represents camera state information. + * + * @typedef CameraStatusInfo + * @syscap SystemCapability.Multimedia.Camera.Core +@@ -2271,7 +2283,7 @@ declare namespace camera { + * @since 10 + */ + /** +- * Camera id attribute. ++ * Camera ID attribute. + * + * @type { string } + * @readonly +@@ -2403,7 +2415,7 @@ declare namespace camera { + * @since 12 + */ + /** +- * Camera sensor orientation attribute. ++ * The camera mounting angle, which does not change with screen rotation, takes values from 0° to 360° in degrees. + * + * @type { number } + * @readonly +@@ -2484,7 +2496,7 @@ declare namespace camera { + * @since 10 + */ + /** +- * Point parameter. ++ * Point coordinates are used for focus and exposure configuration. + * + * @typedef Point + * @syscap SystemCapability.Multimedia.Camera.Core +@@ -2605,7 +2617,8 @@ declare namespace camera { + /** + * Open camera. + * +- * @param { boolean } isSecureEnabled - Enable secure camera. ++ * @param { boolean } isSecureEnabled - Setting true enables the camera to be opened in a safe way, ++ * setting false does the opposite. Failure of an interface call returns an error code of type CameraErrorCode. + * @returns { Promise } Promise used to return the result. + * @throws { BusinessError } 7400107 - Can not use camera cause of conflict. + * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. +@@ -3427,7 +3440,7 @@ declare namespace camera { + * @since 10 + */ + /** +- * Auto exposure mode. ++ * Auto exposure mode. Support exposure area center point setting, you can use AutoExposure.setMeteringPoint to set the exposure area center point. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice +@@ -3533,7 +3546,7 @@ declare namespace camera { + * @since 12 + */ + /** +- * Checks whether a specified exposure mode is supported. ++ * Check if the exposure mode is supported. + * Move to AutoExposureQuery interface from AutoExposure interface since 12. + * + * @param { ExposureMode } aeMode - Exposure mode +@@ -4181,7 +4194,8 @@ declare namespace camera { + /** + * Gets current focus point. + * +- * @returns { Point } The current focus point. ++ * @returns { Point } Used to get the current focus. ++ * Failure of the interface call will return the corresponding error code, which is of type CameraErrorCode. + * @throws { BusinessError } 7400103 - Session not config. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice +@@ -4922,7 +4936,7 @@ declare namespace camera { + * @since 10 + */ + /** +- * Camera HDF can select mode automatically. ++ * Selection of the stabilization algorithm is performed automatically. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice +@@ -6591,7 +6605,11 @@ declare namespace camera { + getMeteringPoint(): Point; + + /** +- * Set the center point of the metering area. ++ * Set the center point of the exposure area, the exposure point should be located in the 0-1 coordinate system, ++ * which is {0, 0} in the upper left corner and {1, 1} in the lower right corner. ++ * This coordinate system is based on the horizontal device orientation when the device charging port is on the right side, ++ * e.g. the preview interface layout of an application is based on the vertical direction when the device charging port is on the lower side, ++ * the layout width and height is {w, h}, and the touch point is {x, y}.Then the transformed coordinate point is {y/h, 1-x/w}. + * + * @param { Point } point - metering point + * @throws { BusinessError } 7400103 - Session not config. +@@ -6627,7 +6645,7 @@ declare namespace camera { + setExposureBias(exposureBias: number): void; + + /** +- * Query the exposure value. ++ * Query the current exposure value. + * + * @returns { number } The exposure value. + * @throws { BusinessError } 7400103 - Session not config. +@@ -6639,7 +6657,7 @@ declare namespace camera { + getExposureValue(): number; + + /** +- * Checks whether a specified focus mode is supported. ++ * Queries whether a specified focus mode is supported. + * + * @param { FocusMode } afMode - Focus mode. + * @returns { boolean } Is the focus mode supported. +@@ -7250,7 +7268,7 @@ declare namespace camera { + * @since 13 + */ + /** +- * Photo session object. ++ * The Normal Photo Mode session category provides operations for flash, exposure, focus, zoom, and color space. + * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorManagement, AutoDeviceSwitch, Macro + * @interface PhotoSession + * @syscap SystemCapability.Multimedia.Camera.Core +@@ -9766,7 +9784,7 @@ declare namespace camera { + * @since 18 + */ + /** +- * Add Secure output for camera. ++ * Marks one of the PreviewOutputs as safe. + * + * @param { PreviewOutput } previewOutput - Specify the output as a secure flow. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. +@@ -10564,6 +10582,7 @@ declare namespace camera { + */ + /** + * Set a frame rate range. ++ * The supported frame rate range can be queried via the getSupportedFrameRates interface before setting. + * + * @param { number } minFps - Minimum frame rate per second. + * @param { number } maxFps - Maximum frame rate per second. +@@ -10584,6 +10603,8 @@ declare namespace camera { + */ + /** + * Get active frame rate range which has been set before. ++ * ++ * Queryable after setting the frame rate for the preview stream using the setFrameRate interface. + * + * @returns { FrameRateRange } The active frame rate range. + * @syscap SystemCapability.Multimedia.Camera.Core +@@ -11319,7 +11340,7 @@ declare namespace camera { + * @since 13 + */ + /** +- * Codec type AVC. ++ * Video encoding type AVC. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice +@@ -11334,7 +11355,7 @@ declare namespace camera { + * @since 13 + */ + /** +- * Codec type HEVC. ++ * Video encoding type HEVC. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice +@@ -11727,7 +11748,7 @@ declare namespace camera { + * @since 12 + */ + /** +- * Unsubscribes photo asset event callback. ++ * Log out of photoAsset reporting. + * + * @param { 'photoAssetAvailable' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the asset. +@@ -11790,7 +11811,7 @@ declare namespace camera { + on(type: 'captureStart', callback: AsyncCallback): void; + + /** +- * Unsubscribes from capture start event callback. ++ * Logs off the listening for the start of the photo shoot. + * + * @param { 'captureStart' } type - Event type. + * @param { AsyncCallback } callback - Callback used to get the capture ID. +@@ -11926,7 +11947,8 @@ declare namespace camera { + /** + * Subscribes capture end event callback. + * +- * @param { 'captureEnd' } type - Event type. ++ * @param { 'captureEnd' } type - Listen to the event, fixed to 'captureEnd', when photoOutput is created successfully. ++ * This event can be triggered when the photoOutput is created successfully. + * @param { AsyncCallback } callback - Callback used to get the capture end information. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice +@@ -12925,7 +12947,7 @@ declare namespace camera { + * @since 10 + */ + /** +- * Unsubscribes from frame start event callback. ++ * Logs off the preview frame startup listener. + * + * @param { 'frameStart' } type - Event type. + * @param { AsyncCallback } callback - Callback used to return the result. +diff --git a/api/@ohos.multimedia.cameraPicker.d.ts b/api/@ohos.multimedia.cameraPicker.d.ts +index 0aaf06ab63..076c7dd1ab 100644 +--- a/api/@ohos.multimedia.cameraPicker.d.ts ++++ b/api/@ohos.multimedia.cameraPicker.d.ts +@@ -229,7 +229,7 @@ declare namespace cameraPicker { + * @param { Context } context - From UIExtensionAbility. + * @param { Array } mediaTypes - Pick media type. + * @param { PickerProfile } pickerProfile - Picker input Profile. +- * @returns { Promise } pick result. ++ * @returns { Promise } Get the result of the camera picker's processing using the Promise method. The return value is PickerResult. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 12 +-- +2.45.2.huawei.8 + -- Gitee From 0c17fa4c71d55724c196a115f22aac3db13229f9 Mon Sep 17 00:00:00 2001 From: sunchao Date: Wed, 28 May 2025 11:46:23 +0800 Subject: [PATCH 02/20] =?UTF-8?q?Jsdoc=E8=B4=A8=E9=87=8F=E6=8F=90=E5=8D=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: sunchao --- api.diff | 372 ------------------------- api/@ohos.multimedia.camera.d.ts | 92 +++--- api/@ohos.multimedia.cameraPicker.d.ts | 4 +- 3 files changed, 58 insertions(+), 410 deletions(-) delete mode 100644 api.diff diff --git a/api.diff b/api.diff deleted file mode 100644 index 59834b095f..0000000000 --- a/api.diff +++ /dev/null @@ -1,372 +0,0 @@ -From 6067ede4b8ea985fcebff201d4b4ac8fc5d7fe3d Mon Sep 17 00:00:00 2001 -From: l00905966 -Date: Mon, 26 May 2025 16:46:36 +0800 -Subject: [PATCH] =?UTF-8?q?TicketNo:=20Description:=E5=AF=B9=E5=BA=94?= - =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=AF=B9=E5=87=BD=E6=95=B0=E8=AF=B4=E6=98=8E?= - =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E4=BF=AE=E6=94=B9=20Team:=20Feature=20or=20B?= - =?UTF-8?q?ugfix:=20Binary=20Source:=20PrivateCode(Yes/No):?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Change-Id: Id368cfb77b1145e7a83b3cf93c1f310d8184323e ---- - api/@ohos.multimedia.camera.d.ts | 92 ++++++++++++++++---------- - api/@ohos.multimedia.cameraPicker.d.ts | 2 +- - 2 files changed, 58 insertions(+), 36 deletions(-) - -diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts -index 89c9a7c5f4..5c03d8c797 100644 ---- a/api/@ohos.multimedia.camera.d.ts -+++ b/api/@ohos.multimedia.camera.d.ts -@@ -242,7 +242,7 @@ declare namespace camera { - * @since 10 - */ - /** -- * Picture size. -+ * Resolution. The settings are the width and height of the camera's resolution, not the width and height of the actual output image. - * - * @type { Size } - * @readonly -@@ -335,7 +335,7 @@ declare namespace camera { - * @since 10 - */ - /** -- * Frame rate in unit fps (frames per second). -+ * Frame rate range, in fps (frames per second). - * - * @type { FrameRateRange } - * @readonly -@@ -785,7 +785,7 @@ declare namespace camera { - * @since 10 - */ - /** -- * Camera manager object. -+ * Camera Manager class, you need to get the camera manager instance through getCameraManager interface before using it. - * - * @interface CameraManager - * @syscap SystemCapability.Multimedia.Camera.Core -@@ -801,7 +801,7 @@ declare namespace camera { - * @since 10 - */ - /** -- * Gets supported camera descriptions. -+ * Get the supported camera device objects and return the results synchronously. - * - * @returns { Array } An array of supported cameras. - * @syscap SystemCapability.Multimedia.Camera.Core -@@ -851,7 +851,7 @@ declare namespace camera { - * @since 11 - */ - /** -- * Gets supported output capability for specific camera. -+ * Queries the output capability supported by the camera device in the specified mode and returns the result synchronously. - * - * @param { CameraDevice } camera - Camera device. - * @param { SceneMode } mode - Scene mode. -@@ -870,7 +870,7 @@ declare namespace camera { - * @since 10 - */ - /** -- * Determine whether camera is muted. -+ * Queries whether the current camera is muted. - * - * @returns { boolean } Is camera muted. - * @syscap SystemCapability.Multimedia.Camera.Core -@@ -949,10 +949,15 @@ declare namespace camera { - */ - /** - * Creates a CameraInput instance by camera. -+ * -+ * Before using this interface, first through the getSupportedCameras interface to query the current list of camera devices supported by the device, -+ * the developer needs to be based on specific scenarios to choose the camera device that meets the needs of the developer, -+ * and then use this interface to create a CameraInput instance. - * - * @permission ohos.permission.CAMERA - * @param { CameraDevice } camera - Camera device used to create the instance. -- * @returns { CameraInput } The CameraInput instance. -+ * @returns { CameraInput } Returns a CameraInput instance. -+ * Failure of an interface call returns the corresponding error code,which is of type CameraErrorCode. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400102 - Operation not allowed. - * @throws { BusinessError } 7400201 - Camera service fatal error. -@@ -988,11 +993,17 @@ declare namespace camera { - */ - /** - * Creates a CameraInput instance by camera position and type. -+ * -+ * Before using this interface, the developer needs to specify the position and type of the camera according to the application's specific usage scenarios, -+ * for example, to open the front camera to enter the self-timer function. - * - * @permission ohos.permission.CAMERA -- * @param { CameraPosition } position - Target camera position. -- * @param { CameraType } type - Target camera type. -- * @returns { CameraInput } The CameraInput instance. -+ * @param { CameraPosition } position - Camera position, first get the supported camera device objects through the getSupportedCameras interface, -+ * and then get the device position information based on the returned camera device objects. -+ * @param { CameraType } type - camera type, first get the supported camera device object through the getSupportedCameras interface, -+ * then get the device type information based on the returned camera device object. -+ * @returns { CameraInput } Returns a CameraInput instance. Failure of an interface call returns the corresponding error code, -+ * which is of type CameraErrorCode. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400102 - Operation not allowed. - * @throws { BusinessError } 7400201 - Camera service fatal error. -@@ -1254,8 +1265,9 @@ declare namespace camera { - /** - * Gets a Session instance by specific scene mode. - * -- * @param { SceneMode } mode - Scene mode. -- * @returns { T } The specific Session instance by specific scene mode. -+ * @param { SceneMode } mode - The modes supported by the camera. If the passed parameters are abnormal (e.g. out of range, passed null or undefined, etc.), -+ * the actual interface will not take effect. -+ * @returns { T } Session instance. Failure of an interface call returns the appropriate error code, which is of type CameraErrorCode. - * @throws { BusinessError } 7400101 - Parameter error. Possible causes: - * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; - * 3. Parameter verification failed. -@@ -1359,7 +1371,7 @@ declare namespace camera { - * @since 12 - */ - /** -- * Subscribes fold status change event callback. -+ * Registers a listener for folding device fold state changes. Use callback asynchronous callback. - * - * @param { 'foldStatusChanged' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the fold status change. -@@ -1725,7 +1737,7 @@ declare namespace camera { - * @since 11 - */ - /** -- * is torch active -+ * Whether the flashlight is activated or not. true means the flashlight is activated, false means the flashlight is not activated. - * - * @type { boolean } - * @readonly -@@ -1744,7 +1756,7 @@ declare namespace camera { - * @since 11 - */ - /** -- * the current torch brightness level. -+ * Flashlight brightness level, value range is [0,1], the closer to 1, the brighter it is. - * - * @type { number } - * @readonly -@@ -1825,7 +1837,7 @@ declare namespace camera { - * @since 10 - */ - /** -- * Camera status info. -+ * An instance of the interface returned by the camera manager's callback that represents camera state information. - * - * @typedef CameraStatusInfo - * @syscap SystemCapability.Multimedia.Camera.Core -@@ -2271,7 +2283,7 @@ declare namespace camera { - * @since 10 - */ - /** -- * Camera id attribute. -+ * Camera ID attribute. - * - * @type { string } - * @readonly -@@ -2403,7 +2415,7 @@ declare namespace camera { - * @since 12 - */ - /** -- * Camera sensor orientation attribute. -+ * The camera mounting angle, which does not change with screen rotation, takes values from 0° to 360° in degrees. - * - * @type { number } - * @readonly -@@ -2484,7 +2496,7 @@ declare namespace camera { - * @since 10 - */ - /** -- * Point parameter. -+ * Point coordinates are used for focus and exposure configuration. - * - * @typedef Point - * @syscap SystemCapability.Multimedia.Camera.Core -@@ -2605,7 +2617,8 @@ declare namespace camera { - /** - * Open camera. - * -- * @param { boolean } isSecureEnabled - Enable secure camera. -+ * @param { boolean } isSecureEnabled - Setting true enables the camera to be opened in a safe way, -+ * setting false does the opposite. Failure of an interface call returns an error code of type CameraErrorCode. - * @returns { Promise } Promise used to return the result. - * @throws { BusinessError } 7400107 - Can not use camera cause of conflict. - * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. -@@ -3427,7 +3440,7 @@ declare namespace camera { - * @since 10 - */ - /** -- * Auto exposure mode. -+ * Auto exposure mode. Support exposure area center point setting, you can use AutoExposure.setMeteringPoint to set the exposure area center point. - * - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice -@@ -3533,7 +3546,7 @@ declare namespace camera { - * @since 12 - */ - /** -- * Checks whether a specified exposure mode is supported. -+ * Check if the exposure mode is supported. - * Move to AutoExposureQuery interface from AutoExposure interface since 12. - * - * @param { ExposureMode } aeMode - Exposure mode -@@ -4181,7 +4194,8 @@ declare namespace camera { - /** - * Gets current focus point. - * -- * @returns { Point } The current focus point. -+ * @returns { Point } Used to get the current focus. -+ * Failure of the interface call will return the corresponding error code, which is of type CameraErrorCode. - * @throws { BusinessError } 7400103 - Session not config. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice -@@ -4922,7 +4936,7 @@ declare namespace camera { - * @since 10 - */ - /** -- * Camera HDF can select mode automatically. -+ * Selection of the stabilization algorithm is performed automatically. - * - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice -@@ -6591,7 +6605,11 @@ declare namespace camera { - getMeteringPoint(): Point; - - /** -- * Set the center point of the metering area. -+ * Set the center point of the exposure area, the exposure point should be located in the 0-1 coordinate system, -+ * which is {0, 0} in the upper left corner and {1, 1} in the lower right corner. -+ * This coordinate system is based on the horizontal device orientation when the device charging port is on the right side, -+ * e.g. the preview interface layout of an application is based on the vertical direction when the device charging port is on the lower side, -+ * the layout width and height is {w, h}, and the touch point is {x, y}.Then the transformed coordinate point is {y/h, 1-x/w}. - * - * @param { Point } point - metering point - * @throws { BusinessError } 7400103 - Session not config. -@@ -6627,7 +6645,7 @@ declare namespace camera { - setExposureBias(exposureBias: number): void; - - /** -- * Query the exposure value. -+ * Query the current exposure value. - * - * @returns { number } The exposure value. - * @throws { BusinessError } 7400103 - Session not config. -@@ -6639,7 +6657,7 @@ declare namespace camera { - getExposureValue(): number; - - /** -- * Checks whether a specified focus mode is supported. -+ * Queries whether a specified focus mode is supported. - * - * @param { FocusMode } afMode - Focus mode. - * @returns { boolean } Is the focus mode supported. -@@ -7250,7 +7268,7 @@ declare namespace camera { - * @since 13 - */ - /** -- * Photo session object. -+ * The Normal Photo Mode session category provides operations for flash, exposure, focus, zoom, and color space. - * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorManagement, AutoDeviceSwitch, Macro - * @interface PhotoSession - * @syscap SystemCapability.Multimedia.Camera.Core -@@ -9766,7 +9784,7 @@ declare namespace camera { - * @since 18 - */ - /** -- * Add Secure output for camera. -+ * Marks one of the PreviewOutputs as safe. - * - * @param { PreviewOutput } previewOutput - Specify the output as a secure flow. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. -@@ -10564,6 +10582,7 @@ declare namespace camera { - */ - /** - * Set a frame rate range. -+ * The supported frame rate range can be queried via the getSupportedFrameRates interface before setting. - * - * @param { number } minFps - Minimum frame rate per second. - * @param { number } maxFps - Maximum frame rate per second. -@@ -10584,6 +10603,8 @@ declare namespace camera { - */ - /** - * Get active frame rate range which has been set before. -+ * -+ * Queryable after setting the frame rate for the preview stream using the setFrameRate interface. - * - * @returns { FrameRateRange } The active frame rate range. - * @syscap SystemCapability.Multimedia.Camera.Core -@@ -11319,7 +11340,7 @@ declare namespace camera { - * @since 13 - */ - /** -- * Codec type AVC. -+ * Video encoding type AVC. - * - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice -@@ -11334,7 +11355,7 @@ declare namespace camera { - * @since 13 - */ - /** -- * Codec type HEVC. -+ * Video encoding type HEVC. - * - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice -@@ -11727,7 +11748,7 @@ declare namespace camera { - * @since 12 - */ - /** -- * Unsubscribes photo asset event callback. -+ * Log out of photoAsset reporting. - * - * @param { 'photoAssetAvailable' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the asset. -@@ -11790,7 +11811,7 @@ declare namespace camera { - on(type: 'captureStart', callback: AsyncCallback): void; - - /** -- * Unsubscribes from capture start event callback. -+ * Logs off the listening for the start of the photo shoot. - * - * @param { 'captureStart' } type - Event type. - * @param { AsyncCallback } callback - Callback used to get the capture ID. -@@ -11926,7 +11947,8 @@ declare namespace camera { - /** - * Subscribes capture end event callback. - * -- * @param { 'captureEnd' } type - Event type. -+ * @param { 'captureEnd' } type - Listen to the event, fixed to 'captureEnd', when photoOutput is created successfully. -+ * This event can be triggered when the photoOutput is created successfully. - * @param { AsyncCallback } callback - Callback used to get the capture end information. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice -@@ -12925,7 +12947,7 @@ declare namespace camera { - * @since 10 - */ - /** -- * Unsubscribes from frame start event callback. -+ * Logs off the preview frame startup listener. - * - * @param { 'frameStart' } type - Event type. - * @param { AsyncCallback } callback - Callback used to return the result. -diff --git a/api/@ohos.multimedia.cameraPicker.d.ts b/api/@ohos.multimedia.cameraPicker.d.ts -index 0aaf06ab63..076c7dd1ab 100644 ---- a/api/@ohos.multimedia.cameraPicker.d.ts -+++ b/api/@ohos.multimedia.cameraPicker.d.ts -@@ -229,7 +229,7 @@ declare namespace cameraPicker { - * @param { Context } context - From UIExtensionAbility. - * @param { Array } mediaTypes - Pick media type. - * @param { PickerProfile } pickerProfile - Picker input Profile. -- * @returns { Promise } pick result. -+ * @returns { Promise } Get the result of the camera picker's processing using the Promise method. The return value is PickerResult. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 12 --- -2.45.2.huawei.8 - diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts index 89c9a7c5f4..74a3e39b0b 100644 --- a/api/@ohos.multimedia.camera.d.ts +++ b/api/@ohos.multimedia.camera.d.ts @@ -234,7 +234,7 @@ declare namespace camera { readonly format: CameraFormat; /** - * Picture size. + * Resolution. The settings are the width and height of the camera's resolution, not the width and height of the actual output image. * * @type { Size } * @readonly @@ -327,7 +327,7 @@ declare namespace camera { */ interface VideoProfile extends Profile { /** - * Frame rate in unit fps (frames per second). + * Frame rate range, in fps (frames per second). * * @type { FrameRateRange } * @readonly @@ -778,7 +778,7 @@ declare namespace camera { } /** - * Camera manager object. + * Camera Manager class, you need to get the camera manager instance through getCameraManager interface before using it. * * @interface CameraManager * @syscap SystemCapability.Multimedia.Camera.Core @@ -794,7 +794,7 @@ declare namespace camera { */ interface CameraManager { /** - * Gets supported camera descriptions. + * Get the supported camera device objects and return the results synchronously. * * @returns { Array } An array of supported cameras. * @syscap SystemCapability.Multimedia.Camera.Core @@ -811,7 +811,7 @@ declare namespace camera { getSupportedCameras(): Array; /** - * Gets supported output capability for specific camera. + * Queries the output capability supported by the camera device in the specified mode and returns the result synchronously. * * @param { CameraDevice } camera - Camera device. * @returns { CameraOutputCapability } The camera output capability. @@ -863,7 +863,7 @@ declare namespace camera { getSupportedOutputCapability(camera: CameraDevice, mode: SceneMode): CameraOutputCapability; /** - * Determine whether camera is muted. + * Queries whether the current camera is muted. * * @returns { boolean } Is camera muted. * @syscap SystemCapability.Multimedia.Camera.Core @@ -937,10 +937,15 @@ declare namespace camera { */ /** * Creates a CameraInput instance by camera. + * + * Before using this interface, first through the getSupportedCameras interface to query the current list of camera devices supported by the device, + * the developer needs to be based on specific scenarios to choose the camera device that meets the needs of the developer, + * and then use this interface to create a CameraInput instance. * * @permission ohos.permission.CAMERA * @param { CameraDevice } camera - Camera device used to create the instance. - * @returns { CameraInput } The CameraInput instance. + * @returns { CameraInput } Returns a CameraInput instance. + * Failure of an interface call returns the corresponding error code, which is of type CameraErrorCode. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400102 - Operation not allowed. * @throws { BusinessError } 7400201 - Camera service fatal error. @@ -975,11 +980,17 @@ declare namespace camera { */ /** * Creates a CameraInput instance by camera position and type. + * + * Before using this interface, the developer needs to specify the position and type of the camera according to the application's specific usage scenarios, + * for example, to open the front camera to enter the self-timer function. * * @permission ohos.permission.CAMERA - * @param { CameraPosition } position - Target camera position. - * @param { CameraType } type - Target camera type. - * @returns { CameraInput } The CameraInput instance. + * @param { CameraPosition } position - Camera position, first get the supported camera device objects through the getSupportedCameras interface, + * and then get the device position information based on the returned camera device objects. + * @param { CameraType } type - camera type, first get the supported camera device object through the getSupportedCameras interface, + * then get the device type information based on the returned camera device object. + * @returns { CameraInput } Returns a CameraInput instance. Failure of an interface call returns the corresponding error code, + * which is of type CameraErrorCode. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. * @throws { BusinessError } 7400102 - Operation not allowed. * @throws { BusinessError } 7400201 - Camera service fatal error. @@ -1242,8 +1253,9 @@ declare namespace camera { /** * Gets a Session instance by specific scene mode. * - * @param { SceneMode } mode - Scene mode. - * @returns { T } The specific Session instance by specific scene mode. + * @param { SceneMode } mode - The modes supported by the camera. If the passed parameters are abnormal (e.g. out of range, passed null or undefined, etc.), + * the actual interface will not take effect. + * @returns { T } Session instance. Failure of an interface call returns the appropriate error code, which is of type CameraErrorCode. * @throws { BusinessError } 401 - Parameter error. Possible causes: * 1. Mandatory parameters are left unspecified; 2. Incorrect parameter types; * 3. Parameter verification failed. @@ -1351,7 +1363,7 @@ declare namespace camera { off(type: 'cameraStatus', callback?: AsyncCallback): void; /** - * Subscribes fold status change event callback. + * Registers a listener for folding device fold state changes. Use callback asynchronous callback. * * @param { 'foldStatusChanged' } type - Event type. * @param { AsyncCallback } callback - Callback used to get the fold status change. @@ -1717,7 +1729,7 @@ declare namespace camera { readonly isTorchAvailable: boolean; /** - * is torch active + * Whether the flashlight is activated or not. True means the flashlight is activated, false means the flashlight is not activated. * * @type { boolean } * @readonly @@ -1736,7 +1748,7 @@ declare namespace camera { readonly isTorchActive: boolean; /** - * the current torch brightness level. + * Flashlight brightness level, value range is [0,1], the closer to 1, the brighter it is. * * @type { number } * @readonly @@ -1818,7 +1830,7 @@ declare namespace camera { } /** - * Camera status info. + * An instance of the interface returned by the camera manager's callback that represents camera state information. * * @typedef CameraStatusInfo * @syscap SystemCapability.Multimedia.Camera.Core @@ -2263,7 +2275,7 @@ declare namespace camera { */ interface CameraDevice { /** - * Camera id attribute. + * Camera ID attribute. * * @type { string } * @readonly @@ -2395,7 +2407,7 @@ declare namespace camera { readonly hostDeviceType: HostDeviceType; /** - * Camera sensor orientation attribute. + * The camera mounting angle, which does not change with screen rotation, takes values from 0° to 360° in degrees. * * @type { number } * @readonly @@ -2477,7 +2489,7 @@ declare namespace camera { } /** - * Point parameter. + * Point coordinates are used for focus and exposure configuration. * * @typedef Point * @syscap SystemCapability.Multimedia.Camera.Core @@ -2594,7 +2606,8 @@ declare namespace camera { /** * Open camera. * - * @param { boolean } isSecureEnabled - Enable secure camera. + * @param { boolean } isSecureEnabled - Setting true enables the camera to be opened in a safe way, + * setting false does the opposite. Failure of an interface call returns an error code of type CameraErrorCode. * @returns { Promise } Promise used to return the result. * @throws { BusinessError } 7400107 - Can not use camera cause of conflict. * @throws { BusinessError } 7400108 - Camera disabled cause of security reason. @@ -3421,7 +3434,7 @@ declare namespace camera { EXPOSURE_MODE_LOCKED = 0, /** - * Auto exposure mode. + * Auto exposure mode. Support exposure area center point setting, you can use AutoExposure.setMeteringPoint to set the exposure area center point. * * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 @@ -3523,7 +3536,7 @@ declare namespace camera { * @since 11 */ /** - * Checks whether a specified exposure mode is supported. + * Check if the exposure mode is supported. * Move to AutoExposureQuery interface from AutoExposure interface since 12. * * @param { ExposureMode } aeMode - Exposure mode @@ -4173,7 +4186,7 @@ declare namespace camera { /** * Gets current focus point. * - * @returns { Point } The current focus point. + * @returns { Point } Used to get the current focus. Failure of the interface call will return the corresponding error code, which is of type CameraErrorCode. * @throws { BusinessError } 7400103 - Session not config. * @syscap SystemCapability.Multimedia.Camera.Core * @since 11 @@ -4916,7 +4929,7 @@ declare namespace camera { HIGH = 3, /** - * Camera HDF can select mode automatically. + * Selection of the stabilization algorithm is performed automatically. * * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 @@ -6591,7 +6604,11 @@ declare namespace camera { getMeteringPoint(): Point; /** - * Set the center point of the metering area. + * Set the center point of the exposure area, the exposure point should be located in the 0-1 coordinate system, + * which is {0, 0} in the upper left corner and {1, 1} in the lower right corner. + * This coordinate system is based on the horizontal device orientation when the device charging port is on the right side, + * e.g. the preview interface layout of an application is based on the vertical direction when the device charging port is on the lower side, + * the layout width and height is {w, h}, and the touch point is {x, y}.Then the transformed coordinate point is {y/h, 1-x/w}. * * @param { Point } point - metering point * @throws { BusinessError } 7400103 - Session not config. @@ -6627,7 +6644,7 @@ declare namespace camera { setExposureBias(exposureBias: number): void; /** - * Query the exposure value. + * Query the current exposure value. * * @returns { number } The exposure value. * @throws { BusinessError } 7400103 - Session not config. @@ -6639,7 +6656,7 @@ declare namespace camera { getExposureValue(): number; /** - * Checks whether a specified focus mode is supported. + * Queries whether a specified focus mode is supported. * * @param { FocusMode } afMode - Focus mode. * @returns { boolean } Is the focus mode supported. @@ -7243,7 +7260,7 @@ declare namespace camera { * @since 11 */ /** - * Photo session object. + * The Normal Photo Mode session category provides operations for flash, exposure, focus, zoom, and color space. * @extends Session, Flash, AutoExposure, Focus, Zoom, ColorManagement, AutoDeviceSwitch * @interface PhotoSession * @syscap SystemCapability.Multimedia.Camera.Core @@ -9747,7 +9764,7 @@ declare namespace camera { */ interface SecureSession extends Session, Flash, AutoExposure, Focus, Zoom { /** - * Add Secure output for camera. + * Marks one of the PreviewOutputs as safe. * * @param { PreviewOutput } previewOutput - Specify the output as a secure flow. * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. @@ -10554,6 +10571,7 @@ declare namespace camera { /** * Set a frame rate range. + * The supported frame rate range can be queried via the getSupportedFrameRates interface before setting. * * @param { number } minFps - Minimum frame rate per second. * @param { number } maxFps - Maximum frame rate per second. @@ -10577,7 +10595,8 @@ declare namespace camera { /** * Get active frame rate range which has been set before. - * + * Queryable after setting the frame rate for the preview stream using the setFrameRate interface. + * * @returns { FrameRateRange } The active frame rate range. * @syscap SystemCapability.Multimedia.Camera.Core * @since 12 @@ -11313,7 +11332,7 @@ declare namespace camera { */ enum VideoCodecType { /** - * Codec type AVC. + * Video encoding type AVC. * * @syscap SystemCapability.Multimedia.Camera.Core * @since 13 @@ -11328,7 +11347,7 @@ declare namespace camera { AVC = 0, /** - * Codec type HEVC. + * Video encoding type HEVC. * * @syscap SystemCapability.Multimedia.Camera.Core * @since 13 @@ -11719,7 +11738,7 @@ declare namespace camera { on(type: 'photoAssetAvailable', callback: AsyncCallback): void; /** - * Unsubscribes photo asset event callback. + * Log out of photoAsset reporting. * * @param { 'photoAssetAvailable' } type - Event type. * @param { AsyncCallback } callback - Callback used to get the asset. @@ -11790,7 +11809,7 @@ declare namespace camera { on(type: 'captureStart', callback: AsyncCallback): void; /** - * Unsubscribes from capture start event callback. + * Logs off the listening for the start of the photo shoot. * * @param { 'captureStart' } type - Event type. * @param { AsyncCallback } callback - Callback used to get the capture ID. @@ -11918,7 +11937,8 @@ declare namespace camera { /** * Subscribes capture end event callback. * - * @param { 'captureEnd' } type - Event type. + * @param { 'captureEnd' } type - Listen to the event, fixed to 'captureEnd', when photoOutput is created successfully. + * This event can be triggered when the photoOutput is created successfully. * @param { AsyncCallback } callback - Callback used to get the capture end information. * @syscap SystemCapability.Multimedia.Camera.Core * @since 10 @@ -12917,7 +12937,7 @@ declare namespace camera { on(type: 'frameStart', callback: AsyncCallback): void; /** - * Unsubscribes from frame start event callback. + * Logs off the preview frame startup listener. * * @param { 'frameStart' } type - Event type. * @param { AsyncCallback } callback - Callback used to return the result. diff --git a/api/@ohos.multimedia.cameraPicker.d.ts b/api/@ohos.multimedia.cameraPicker.d.ts index 0aaf06ab63..f60fabc362 100644 --- a/api/@ohos.multimedia.cameraPicker.d.ts +++ b/api/@ohos.multimedia.cameraPicker.d.ts @@ -224,12 +224,12 @@ declare namespace cameraPicker { * @since 11 */ /** - * Pick function to get a photo or video result. + * Launch the camera picker and configure it to photo or video mode base on the incoming media type. The photo or video result will be returned via a Promise upon completion of the operation. * * @param { Context } context - From UIExtensionAbility. * @param { Array } mediaTypes - Pick media type. * @param { PickerProfile } pickerProfile - Picker input Profile. - * @returns { Promise } pick result. + * @returns { Promise } Get the result of the camera picker's processing using the Promise method. The return value is PickerResult. * @syscap SystemCapability.Multimedia.Camera.Core * @atomicservice * @since 12 -- Gitee From 9c68a29e1b4b127ce949c183c3073798668af452 Mon Sep 17 00:00:00 2001 From: xiaye Date: Thu, 27 Mar 2025 15:45:59 +0800 Subject: [PATCH 03/20] =?UTF-8?q?=E8=A1=A5=E5=85=85=E9=81=97=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xiaye --- api/@internal/component/ets/web.d.ts | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index ade286994b..78d3e64d53 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -7170,6 +7170,12 @@ declare class WebAttribute extends CommonMethod { /** * Injects the JavaScript object into window and invoke the function in window. + *

API Note:
+ * Registers a JavaScript object with the window.APIs of this object can then be invoked in the window. + * The parameters cannot be updateed.This API can be used in synchronous or asynchronous mode,or in both modes. + * If the API can be used in both synchronous and asynchronous modes,it is called asynchronously by default. + * Only one object can be registered through this API.To register multiple objects,use registerJavaScriptProxy. + *

* * @param { object } javaScriptProxy - The JavaScript object to be injected. * @returns { WebAttribute } @@ -7178,6 +7184,12 @@ declare class WebAttribute extends CommonMethod { */ /** * Injects the JavaScript object into window and invoke the function in window. + *

API Note:
+ * Registers a JavaScript object with the window.APIs of this object can then be invoked in the window. + * The parameters cannot be updateed.This API can be used in synchronous or asynchronous mode,or in both modes. + * If the API can be used in both synchronous and asynchronous modes,it is called asynchronously by default. + * Only one object can be registered through this API.To register multiple objects,use registerJavaScriptProxy. + *

* * @param { object } javaScriptProxy - The JavaScript object to be injected. * @returns { WebAttribute } @@ -7186,6 +7198,12 @@ declare class WebAttribute extends CommonMethod { */ /** * Injects the JavaScript object into window and invoke the function in window. + *

API Note:
+ * Registers a JavaScript object with the window.APIs of this object can then be invoked in the window. + * The parameters cannot be updateed.This API can be used in synchronous or asynchronous mode,or in both modes. + * If the API can be used in both synchronous and asynchronous modes,it is called asynchronously by default. + * Only one object can be registered through this API.To register multiple objects,use registerJavaScriptProxy. + *

* * @param { object } javaScriptProxy - The JavaScript object to be injected. * @returns { WebAttribute } @@ -7194,9 +7212,13 @@ declare class WebAttribute extends CommonMethod { * @since 11 */ /** - * Registers the supplied ArkTs object in javaScriptProxy into this Web component. - * The object is registered into all frames of the web page, including all frames, using the specified name in javaScriptProxy. - * This allows the methods of the ArkTs object in javaScriptProxy to be accessed from JavaScript. + * Injects the JavaScript object into window and invoke the function in window. + *

API Note:
+ * Registers a JavaScript object with the window.APIs of this object can then be invoked in the window. + * The parameters cannot be updateed.This API can be used in synchronous or asynchronous mode,or in both modes. + * If the API can be used in both synchronous and asynchronous modes,it is called asynchronously by default. + * Only one object can be registered through this API.To register multiple objects,use registerJavaScriptProxy. + *

* *

API Note: * Performance Note: -- Gitee From 7dc024e5240e2b8597b95ae75bf994e53e3c9989 Mon Sep 17 00:00:00 2001 From: xiaye Date: Thu, 27 Mar 2025 16:50:04 +0800 Subject: [PATCH 04/20] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=A9=BA=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xiaye --- api/@internal/component/ets/web.d.ts | 94 +++++++++++++++++++--------- 1 file changed, 64 insertions(+), 30 deletions(-) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 78d3e64d53..2c7d528187 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -4492,10 +4492,9 @@ declare class WebController { * The result of the script execution will be returned through an asynchronous callback. * This method must be used on the UI thread, and the callback will also be invoked on the UI thread. *

API Note:
- * The state of JavaScript is no longer persisted across navigations like loadUrl. - * For example, global variables and functions defined before calling loadUrl will not exist in the loaded page. - * It is recommended that applications use registerJavaScriptProxy to ensure that the JavaScript state can be persisted across page navigations. - *

+ * Executes a JavaScript script. This API uses an asynchronous callback to return the script execution result. + * runJavaScript can be invoked only after loadUrl is executed. For example, it can be invoked in onPageEnd. + *

* * @param { object } options The options with a piece of code and a callback. * @syscap SystemCapability.Web.Webview.Core @@ -4549,6 +4548,10 @@ declare class WebController { /** * Registers the JavaScript object and method list. + *

API Note:
+ * You should register registerJavaScriptProxy either in synchronous list or in asynchronous list. Otherwise,this API fails to be registered. + * The registerJavaScriptProxy API must be used together with the deleteJavaScriptRegister API to prevent memory leak. + *

* * @param { object } options - The option with the JavaScript object and method list. * @syscap SystemCapability.Web.Webview.Core @@ -7083,6 +7086,9 @@ declare class WebAttribute extends CommonMethod { /** * Sets how to load HTTP and HTTPS content. + *

API Note:
+ * Sets wheater to enable loading of HTTP and HTTPS hybrid content can be loaded. By default, this feature is disabled. + *

* * @param { MixedMode } mixedMode - The mixed mode, which can be {@link MixedMode}. * @returns { WebAttribute } @@ -7091,6 +7097,9 @@ declare class WebAttribute extends CommonMethod { */ /** * Sets how to load HTTP and HTTPS content. + *

API Note:
+ * Sets wheater to enable loading of HTTP and HTTPS hybrid content can be loaded. By default, this feature is disabled. + *

* * @param { MixedMode } mixedMode - The mixed mode, which can be {@link MixedMode}. * @returns { WebAttribute } @@ -7099,9 +7108,10 @@ declare class WebAttribute extends CommonMethod { * @since 11 */ /** - * Sets the behavior when a secure origin attempts to load a resource from an insecure origin. - * The default is MixedMode.None, meaning not allow a secure origin to load content from an insecure origin. - * + * Sets how to load HTTP and HTTPS content. + *

API Note:
+ * Sets wheater to enable loading of HTTP and HTTPS hybrid content can be loaded. By default, this feature is disabled. + *

* * @param { MixedMode } mixedMode - The mixed mode, which can be {@link MixedMode}. * @returns { WebAttribute } @@ -7171,10 +7181,10 @@ declare class WebAttribute extends CommonMethod { /** * Injects the JavaScript object into window and invoke the function in window. *

API Note:
- * Registers a JavaScript object with the window.APIs of this object can then be invoked in the window. - * The parameters cannot be updateed.This API can be used in synchronous or asynchronous mode,or in both modes. - * If the API can be used in both synchronous and asynchronous modes,it is called asynchronously by default. - * Only one object can be registered through this API.To register multiple objects,use registerJavaScriptProxy. + * Registers a JavaScript object with the window. APIs of this object can then be invoked in the window. + * The parameters cannot be updateed. This API can be used in synchronous or asynchronous mode, or in both modes. + * If the API can be used in both synchronous and asynchronous modes, it is called asynchronously by default. + * Only one object can be registered through this API. To register multiple objects, use registerJavaScriptProxy. *

* * @param { object } javaScriptProxy - The JavaScript object to be injected. @@ -7185,10 +7195,10 @@ declare class WebAttribute extends CommonMethod { /** * Injects the JavaScript object into window and invoke the function in window. *

API Note:
- * Registers a JavaScript object with the window.APIs of this object can then be invoked in the window. - * The parameters cannot be updateed.This API can be used in synchronous or asynchronous mode,or in both modes. - * If the API can be used in both synchronous and asynchronous modes,it is called asynchronously by default. - * Only one object can be registered through this API.To register multiple objects,use registerJavaScriptProxy. + * Registers a JavaScript object with the window. APIs of this object can then be invoked in the window. + * The parameters cannot be updateed. This API can be used in synchronous or asynchronous mode, or in both modes. + * If the API can be used in both synchronous and asynchronous modes, it is called asynchronously by default. + * Only one object can be registered through this API. To register multiple objects,use registerJavaScriptProxy. *

* * @param { object } javaScriptProxy - The JavaScript object to be injected. @@ -7199,10 +7209,10 @@ declare class WebAttribute extends CommonMethod { /** * Injects the JavaScript object into window and invoke the function in window. *

API Note:
- * Registers a JavaScript object with the window.APIs of this object can then be invoked in the window. - * The parameters cannot be updateed.This API can be used in synchronous or asynchronous mode,or in both modes. - * If the API can be used in both synchronous and asynchronous modes,it is called asynchronously by default. - * Only one object can be registered through this API.To register multiple objects,use registerJavaScriptProxy. + * Registers a JavaScript object with the window. APIs of this object can then be invoked in the window. + * The parameters cannot be updateed. This API can be used in synchronous or asynchronous mode,or in both modes. + * If the API can be used in both synchronous and asynchronous modes, it is called asynchronously by default. + * Only one object can be registered through this API. To register multiple objects,use registerJavaScriptProxy. *

* * @param { object } javaScriptProxy - The JavaScript object to be injected. @@ -7214,10 +7224,10 @@ declare class WebAttribute extends CommonMethod { /** * Injects the JavaScript object into window and invoke the function in window. *

API Note:
- * Registers a JavaScript object with the window.APIs of this object can then be invoked in the window. - * The parameters cannot be updateed.This API can be used in synchronous or asynchronous mode,or in both modes. - * If the API can be used in both synchronous and asynchronous modes,it is called asynchronously by default. - * Only one object can be registered through this API.To register multiple objects,use registerJavaScriptProxy. + * Registers a JavaScript object with the window. APIs of this object can then be invoked in the window. + * The parameters cannot be updateed.This API can be used in synchronous or asynchronous mode, or in both modes. + * If the API can be used in both synchronous and asynchronous modes, it is called asynchronously by default. + * Only one object can be registered through this API. To register multiple objects, use registerJavaScriptProxy. *

* *

API Note: @@ -7594,6 +7604,9 @@ declare class WebAttribute extends CommonMethod { /** * Triggered at the begin of web page loading. + *

API Note:
+ * Called when the web page starts to be loaded. This API is called only for the main frame content, and not for the iframe or frameset content. + *

* * @param { function } callback The triggered function at the begin of web page loading. * @returns { WebAttribute } @@ -7602,6 +7615,9 @@ declare class WebAttribute extends CommonMethod { */ /** * Triggered at the begin of web page loading. + *

API Note:
+ * Called when the web page starts to be loaded. This API is called only for the main frame content, and not for the iframe or frameset content. + *

* * @param { function } callback The triggered function at the begin of web page loading. * @returns { WebAttribute } @@ -7611,6 +7627,9 @@ declare class WebAttribute extends CommonMethod { */ /** * Triggered at the begin of web page loading. + *

API Note:
+ * Called when the web page starts to be loaded. This API is called only for the main frame content, and not for the iframe or frameset content. + *

* * @param { function } callback The triggered function at the begin of web page loading. * @returns { WebAttribute } @@ -7620,8 +7639,10 @@ declare class WebAttribute extends CommonMethod { * @since 11 */ /** - * Called when the web page starts to be loaded. - * This API is called only for the main frame, and not for the iframe or frameset content. + * Triggered at the begin of web page loading. + *

API Note:
+ * Called when the web page starts to be loaded. This API is called only for the main frame content, and not for the iframe or frameset content. + *

* * @param { Callback } callback The triggered function at the begin of web page loading. * @returns { WebAttribute } @@ -7664,6 +7685,10 @@ declare class WebAttribute extends CommonMethod { /** * Triggered when the title of the main application document changes. + *

API Note:
+ * Called when the document title of a web page is changed. + * If the element is not set for an HTML5 page, the corresponding URL is returned. + * </p> * * @param { function } callback The triggered function when the title of the main application document changes. * @returns { WebAttribute } @@ -7672,6 +7697,10 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { */ /** * Triggered when the title of the main application document changes. + * <p><strong>API Note</strong>:<br> + * Called when the document title of a web page is changed. + * If the <title> element is not set for an HTML5 page, the corresponding URL is returned. + * </p> * * @param { function } callback The triggered function when the title of the main application document changes. * @returns { WebAttribute } @@ -7681,9 +7710,11 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 11 */ /** - * Notifies the application that the title has changed.. - * If the page being loaded does not specify a title via the <title> element, - * ArkWeb will generate a title baseed on the URL and return it to the application. + * Triggered when the title of the main application document changes. + * <p><strong>API Note</strong>:<br> + * Called when the document title of a web page is changed. + * If the <title> element is not set for an HTML5 page, the corresponding URL is returned. + * </p> * * @param { Callback<OnTitleReceiveEvent> } callback The triggered function when the title of the main application document changes. * @returns { WebAttribute } @@ -8556,6 +8587,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { /** * Called to notify users when an SSL error occurs with a request for the main frame. * To include errors with requests for subframes, use the OnSslErrorEvent API. + * </p> * * @param { function } callback The triggered callback when the Web page receives an ssl Error. * @returns { WebAttribute } @@ -8565,6 +8597,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { /** * Called to notify users when an SSL error occurs with a request for the main frame. * To include errors with requests for subframes, use the OnSslErrorEvent API. + * </p> * * @param { function } callback The triggered callback when the Web page receives an ssl Error. * @returns { WebAttribute } @@ -8575,6 +8608,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { /** * Called to notify users when an SSL error occurs with a request for the main frame. * To include errors with requests for subframes, use the OnSslErrorEvent API. + * </p> * * @param { Callback<OnSslErrorEventReceiveEvent> } callback The triggered callback when the Web page receives an ssl Error. * @returns { WebAttribute } @@ -8587,6 +8621,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { /** * Called to notify users when an SSL error occurs during the loading of resources (for the main frame and subframes). * To handle SSL errors for requests for the main frame, use the isMainFrame field to distinguish. + * </p> * * @param { OnSslErrorEventCallback } callback The triggered callback when the Web page receives an ssl Error. * @returns { WebAttribute } @@ -9396,8 +9431,7 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * When the specified page or document starts to be loaded, the script is executed on any page whose source matches scriptRules. * <p><strong>API Note</strong>:<br> * The script runs before any JavaScript code of the page, when the DOM tree may not have been loaded or rendered. - * The script is executed in the lexicographic order instead of array sequence. - * if the array sequemce is required, you are advised to use the runJavaScriptOnDocumentStart interface. + * The script is executed in the lexicographic order, not the array order.if the array sequemce is required, you are advised to use the runJavaScriptOnDocumentStart interface. * You are not advised to use this API together with runJavaScriptOnDocumentStart. * </p> * -- Gitee From 7b8584c6003502605701b90fe0a7947f32eef450 Mon Sep 17 00:00:00 2001 From: xiaye <xiaye1@huawei.com> Date: Fri, 25 Apr 2025 15:45:27 +0800 Subject: [PATCH 05/20] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=BC=8F=E5=90=88?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xiaye <xiaye1@huawei.com> --- api/@internal/component/ets/web.d.ts | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/api/@internal/component/ets/web.d.ts b/api/@internal/component/ets/web.d.ts index 2c7d528187..64f8da8d50 100644 --- a/api/@internal/component/ets/web.d.ts +++ b/api/@internal/component/ets/web.d.ts @@ -7222,13 +7222,9 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 11 */ /** - * Injects the JavaScript object into window and invoke the function in window. - * <p><strong>API Note</strong>:<br> - * Registers a JavaScript object with the window. APIs of this object can then be invoked in the window. - * The parameters cannot be updateed.This API can be used in synchronous or asynchronous mode, or in both modes. - * If the API can be used in both synchronous and asynchronous modes, it is called asynchronously by default. - * Only one object can be registered through this API. To register multiple objects, use registerJavaScriptProxy. - * </p> + * Registers the supplied ArkTs object in javaScriptProxy into this Web component. + * The object is registered into all frames of the web page, including all frames, using the specified name in javaScriptProxy. + * This allows the methods of the ArkTs object in javaScriptProxy to be accessed from JavaScript. * * <p><strong>API Note</strong>: * <strong>Performance Note</strong>: @@ -7710,11 +7706,8 @@ declare class WebAttribute extends CommonMethod<WebAttribute> { * @since 11 */ /** - * Triggered when the title of the main application document changes. - * <p><strong>API Note</strong>:<br> - * Called when the document title of a web page is changed. - * If the <title> element is not set for an HTML5 page, the corresponding URL is returned. - * </p> + * Notifies the application that the title has changed.. + * If the page being loaded does not specify a title via, the corresponding URL is returned. * * @param { Callback<OnTitleReceiveEvent> } callback The triggered function when the title of the main application document changes. * @returns { WebAttribute } -- Gitee From d9ad72b3fc7c9b7883bd71c571a69a4f3ef14e7a Mon Sep 17 00:00:00 2001 From: linghao <linghao12@huawei.com> Date: Sun, 27 Apr 2025 11:00:22 +0800 Subject: [PATCH 06/20] =?UTF-8?q?=E6=96=87=E6=A1=A3=E4=B8=93=E9=A1=B9-?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81=E6=95=B4=E6=94=B9=20Signed-off-by:?= =?UTF-8?q?=20linghao=20<linghao12@huawei.com>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/@ohos.window.d.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index 64697bf34d..f3ae68d994 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -4710,6 +4710,16 @@ declare namespace window { * @atomicservice * @since 11 */ + /** + * Destroy the window. + * + * @param { AsyncCallback<void> } callback - Callback used to return the result. + * @throws { BusinessError } 1300002 - This window state is abnormal. + * @syscap SystemCapability.WindowManager.WindowManager.Core + * @crossplatform + * @atomicservice + * @since 11 + */ destroyWindow(callback: AsyncCallback<void>): void; /** -- Gitee From 673a04ea6d7bdcb8c839c24ba0b0324f21e1606c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B6=E6=AD=A3=E7=9A=93?= <yezhenghao@h-partners.com> Date: Thu, 8 May 2025 19:49:15 +0800 Subject: [PATCH 07/20] sdk atomicservice Signed-off-by: linchengfeng <linchengfeng1@huawei.com> --- api/@ohos.multimedia.camera.d.ts | 136 ++++++++++++++++++++++++++++++- 1 file changed, 133 insertions(+), 3 deletions(-) diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts index 74a3e39b0b..6d4c54868b 100644 --- a/api/@ohos.multimedia.camera.d.ts +++ b/api/@ohos.multimedia.camera.d.ts @@ -103,6 +103,13 @@ declare namespace camera { * @atomicservice * @since 19 */ + /** + * Disappear status. + * + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ CAMERA_STATUS_DISAPPEAR = 1, /** @@ -3697,6 +3704,35 @@ declare namespace camera { */ setMeteringPoint(point: Point): void; + /** + * Set the center point of the metering area. + * + * @param { Point } point - metering point + * @throws { BusinessError } 7400103 - Session not config. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + /** + * Query the exposure compensation range. + * + * @returns { Array<number> } The array of compensation range. + * @throws { BusinessError } 7400103 - Session not config. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + /** + * Query the exposure compensation range. + * + * @returns { Array<number> } The array of compensation range. + * @throws { BusinessError } 7400103 - Session not config. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 19 + */ + getExposureBiasRange(): Array<number>; + /** * Set exposure compensation. * @@ -4348,6 +4384,14 @@ declare namespace camera { * @systemapi * @since 12 */ + /** + * Enumerates the camera white balance modes. + * + * @enum { number } + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ enum WhiteBalanceMode { /** * Automatic white balance mode. @@ -4355,6 +4399,12 @@ declare namespace camera { * @systemapi * @since 12 */ + /** + * Automatic white balance mode. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ AUTO = 0, /** @@ -4420,6 +4470,13 @@ declare namespace camera { * @systemapi * @since 12 */ + /** + * Implements white balance query. + * @interface WhiteBalanceQuery + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ interface WhiteBalanceQuery { /** * Checks whether a specified white balance mode is supported. @@ -4433,6 +4490,16 @@ declare namespace camera { * @systemapi * @since 12 */ + /** + * Checks whether the specified white balance mode is supported. + * @param { WhiteBalanceMode } mode White balance mode. + * @returns { boolean } Check result. + * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. + * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ isWhiteBalanceModeSupported(mode: WhiteBalanceMode): boolean; /** @@ -4457,6 +4524,14 @@ declare namespace camera { * @systemapi * @since 12 */ + /** + * Implements white balance. + * @extends WhiteBalanceQuery + * @interface WhiteBalance + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ interface WhiteBalance extends WhiteBalanceQuery { /** * Gets current white balance mode. @@ -4468,6 +4543,14 @@ declare namespace camera { * @systemapi * @since 12 */ + /** + * Obtains the white balance mode in use. + * @returns { WhiteBalanceMode } White balance mode. + * @throws { BusinessError } 7400103 - Session not config. + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ getWhiteBalanceMode(): WhiteBalanceMode; /** @@ -7274,7 +7357,16 @@ declare namespace camera { * @atomicservice * @since 19 */ - interface PhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorManagement, AutoDeviceSwitch, Macro { + /** + * Implements a photo capture session. + * @extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, ColorManagement, AutoDeviceSwitch, + * Macro + * @interface PhotoSession + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + interface PhotoSession extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, ColorManagement, AutoDeviceSwitch, Macro { /** * Gets whether the choosed preconfig type can be used to configure photo session. * Must choose preconfig type from {@link PreconfigType}. @@ -7702,7 +7794,16 @@ declare namespace camera { * @atomicservice * @since 19 */ - interface VideoSession extends Session, Flash, AutoExposure, Focus, Zoom, Stabilization, ColorManagement, AutoDeviceSwitch, Macro { + /** + * Video session object. + * + * @extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, Stabilization, ColorManagement, AutoDeviceSwitch, Macro + * @interface VideoSession + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + interface VideoSession extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, Stabilization, ColorManagement, AutoDeviceSwitch, Macro { /** * Gets whether the choosed preconfig type can be used to configure video session. * Must choose preconfig type from {@link PreconfigType}. @@ -9762,7 +9863,16 @@ declare namespace camera { * @atomicservice * @since 19 */ - interface SecureSession extends Session, Flash, AutoExposure, Focus, Zoom { + /** + * Secure camera session object. + * + * @extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom + * @interface SecureSession + * @syscap SystemCapability.Multimedia.Camera.Core + * @atomicservice + * @since 20 + */ + interface SecureSession extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom { /** * Marks one of the PreviewOutputs as safe. * @@ -12168,8 +12278,28 @@ declare namespace camera { * @systemapi * @since 10 */ + /** + * Subscribes to camera thumbnail events. + * This method is valid only after enableQuickThumbnail(true) is called. + * + * @param { 'quickThumbnail' } type - Event type. + * @param { AsyncCallback<image.PixelMap> } callback - Callback used to get the quick thumbnail. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 19 + */ on(type: 'quickThumbnail', callback: AsyncCallback<image.PixelMap>): void; + /** + * Unsubscribes from camera thumbnail events. + * This method is valid only after enableQuickThumbnail(true) is called. + * + * @param { 'quickThumbnail' } type - Event type. + * @param { AsyncCallback<image.PixelMap> } callback - Callback used to get the quick thumbnail. + * @syscap SystemCapability.Multimedia.Camera.Core + * @systemapi + * @since 10 + */ /** * Unsubscribes from camera thumbnail events. * This method is valid only after enableQuickThumbnail(true) is called. -- Gitee From 4f958e255fbca5666bb78b68eb4dcf6db26f24a2 Mon Sep 17 00:00:00 2001 From: quguiren <quguiren1@huawei-partners.com> Date: Sat, 12 Apr 2025 15:30:45 +0800 Subject: [PATCH 08/20] add crossplatform Signed-off-by: quguiren <quguiren1@huawei-partners.com> --- api/@internal/component/ets/xcomponent.d.ts | 119 ++++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/api/@internal/component/ets/xcomponent.d.ts b/api/@internal/component/ets/xcomponent.d.ts index c49c461306..e516179cf7 100644 --- a/api/@internal/component/ets/xcomponent.d.ts +++ b/api/@internal/component/ets/xcomponent.d.ts @@ -35,6 +35,15 @@ * @atomicservice * @since 20 */ +/** + * Surface Rectangle information. + * + * @interface SurfaceRect + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ declare interface SurfaceRect { /** * X coordinate of the surface rectangle relative to the upper left corner of the XComponent. @@ -46,6 +55,15 @@ declare interface SurfaceRect { * @atomicservice * @since 12 */ + /** + * The horizontal offset of the surface relative to XComponent. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 12 + */ /** * The horizontal offset of the surface relative to XComponent. * @@ -96,6 +114,15 @@ declare interface SurfaceRect { * @atomicservice * @since 20 */ + /** + * The width of the surface created by XComponent + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ surfaceWidth: number; /** @@ -266,6 +293,24 @@ declare class XComponentController { * @atomicservice * @since 20 */ + /** + * Set the rectangle information of surface created by XComponent. + * + * @param { SurfaceRect } rect - The surface rectangle information. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + /** + * Set the rectangle information of surface created by XComponent. + * + * @param { SurfaceRect } rect - The surface rectangle information. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ setXComponentSurfaceRect(rect: SurfaceRect): void; /** @@ -306,6 +351,24 @@ declare class XComponentController { * @atomicservice * @since 20 */ + /** + * Set the rotation options of the Surface created by XComponent. + * + * @param { SurfaceRotationOptions } rotationOptions - The surface rotation options. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + /** + * Set the rotation options of the Surface created by XComponent. + * + * @param { SurfaceRotationOptions } rotationOptions - The surface rotation options. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ setXComponentSurfaceRotation(rotationOptions: SurfaceRotationOptions): void; /** @@ -346,6 +409,24 @@ declare class XComponentController { * @atomicservice * @since 20 */ + /** + * Called after the surface is first created. + * + * @param { string } surfaceId - The id of the surface created by XComponent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + /** + * Called after the surface is first created. + * + * @param { string } surfaceId - The id of the surface created by XComponent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ onSurfaceCreated(surfaceId: string): void; /** @@ -368,6 +449,26 @@ declare class XComponentController { * @atomicservice * @since 20 */ + /** + * Called after the surface rectangle information is changed. + * + * @param { string } surfaceId - The id of the surface created by XComponent. + * @param { SurfaceRect } rect - The rectangle information of the surface created by XComponent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + /** + * Called after the surface rectangle information is changed. + * + * @param { string } surfaceId - The id of the surface created by XComponent. + * @param { SurfaceRect } rect - The rectangle information of the surface created by XComponent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ onSurfaceChanged(surfaceId: string, rect: SurfaceRect): void; /** @@ -388,6 +489,24 @@ declare class XComponentController { * @atomicservice * @since 20 */ + /** + * Called when the surface is about to be destroyed. + * + * @param { string } surfaceId - The id of the surface created by XComponent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + /** + * Called when the surface is about to be destroyed. + * + * @param { string } surfaceId - The id of the surface created by XComponent. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ onSurfaceDestroyed(surfaceId: string): void; /** -- Gitee From 65ca189747cc39d6cd0bc557110b7610b74bcc37 Mon Sep 17 00:00:00 2001 From: zhaoduo-ustc <zhaoduo4@huawei.com> Date: Mon, 12 May 2025 21:56:28 +0800 Subject: [PATCH 09/20] add 6.0 api to kits Signed-off-by: zhaoduo-ustc <zhaoduo4@huawei.com> --- kits/@kit.ArkGraphics3D.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kits/@kit.ArkGraphics3D.d.ts b/kits/@kit.ArkGraphics3D.d.ts index 5d9966069e..af80e54e8d 100644 --- a/kits/@kit.ArkGraphics3D.d.ts +++ b/kits/@kit.ArkGraphics3D.d.ts @@ -25,7 +25,7 @@ import { ToneMappingType, ToneMappingSettings, PostProcessSettings, BloomSetting SubMesh, Mesh, Animation, EnvironmentBackgroundType, Environment, Image, MeshResource, LayerMask, NodeType, Container, Node, Geometry, LightType, Light, SpotLight, DirectionalLight, Camera, SceneResourceParameters, SceneNodeParameters, SceneResourceFactory, Scene, RenderParameters, - RaycastResult, RaycastParameters, CullMode, Blend, RenderSort, MaterialProperty, MetallicRoughnessMaterial, + RaycastResult, RaycastParameters, CullMode, Blend, RenderSort, MaterialProperty, MetalicRoughnessMaterial, Morpher, Sampler, SamplerFilter, SamplerAddressMode, RenderResourceFactory, SceneComponent, RenderContext } from '@ohos.graphics.scene'; export { ToneMappingType, ToneMappingSettings, PostProcessSettings, BloomSettings, @@ -35,5 +35,5 @@ export { ToneMappingType, ToneMappingSettings, PostProcessSettings, BloomSetting SubMesh, Mesh, Animation, EnvironmentBackgroundType, Environment, Image, MeshResource, LayerMask, NodeType, Container, Node, Geometry, LightType, Light, SpotLight, DirectionalLight, Camera, SceneResourceParameters, SceneNodeParameters, SceneResourceFactory, Scene, RenderParameters, - RaycastResult, RaycastParameters, CullMode, Blend, RenderSort, MaterialProperty, MetallicRoughnessMaterial, + RaycastResult, RaycastParameters, CullMode, Blend, RenderSort, MaterialProperty, MetalicRoughnessMaterial, Morpher, Sampler, SamplerFilter, SamplerAddressMode, RenderResourceFactory, SceneComponent, RenderContext }; -- Gitee From 5a014c834702773965510b5f2d3adb7eae4aed73 Mon Sep 17 00:00:00 2001 From: ywx1415296 <yanjian33@h-partners.com> Date: Tue, 13 May 2025 17:16:51 +0800 Subject: [PATCH 10/20] =?UTF-8?q?doc=E5=92=8Cinterface=E6=8F=8F=E8=BF=B0?= =?UTF-8?q?=E4=B8=80=E8=87=B4=E6=80=A7=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ywx1415296 <yanjian33@h-partners.com> --- api/@internal/component/ets/common.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index a04713420c..66e0c2b1d6 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -8339,6 +8339,7 @@ declare enum RepeatMode { * @since 10 */ /** + * The source image's slices are tiled. Tiles beyond the border box will be clipped. * The source image's slices are tiled. Tiles beyond the border box will be clipped. * * @syscap SystemCapability.ArkUI.ArkUI.Full @@ -9411,7 +9412,7 @@ declare interface PickerTextStyle { * @since 10 */ /** - * Font color. + * Font color.. * * @type { ?ResourceColor } * @syscap SystemCapability.ArkUI.ArkUI.Full -- Gitee From a31bea9a19894935c9e11e9b3a1a26101348d14c Mon Sep 17 00:00:00 2001 From: wangxiuxiu96 <wangxiuxiu9@huawei-partners.com> Date: Mon, 31 Mar 2025 20:01:58 +0800 Subject: [PATCH 11/20] =?UTF-8?q?=E6=96=87=E6=9C=AC=E8=A1=8C=E9=97=B4?= =?UTF-8?q?=E8=B7=9Dlinespacing=E6=94=AF=E6=8C=81=E9=A6=96=E8=A1=8C?= =?UTF-8?q?=E6=97=A0=E9=97=B4=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangxiuxiu96 <wangxiuxiu9@huawei-partners.com> Change-Id: Ib8fd30fb76c939d6b8e8cb4a1802cabdc5821c82 --- api/@internal/component/ets/text_common.d.ts | 235 ------------------- 1 file changed, 235 deletions(-) diff --git a/api/@internal/component/ets/text_common.d.ts b/api/@internal/component/ets/text_common.d.ts index 8452d5831a..ed32d0cf0d 100644 --- a/api/@internal/component/ets/text_common.d.ts +++ b/api/@internal/component/ets/text_common.d.ts @@ -1505,123 +1505,6 @@ declare enum KeyboardAppearance { DARK_IMMERSIVE = 3, } -/** - * Defines shader style class. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -declare class ShaderStyle { -} - -/** - * Defines linear gradient class. - * - * @extends ShaderStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -declare class LinearGradientStyle extends ShaderStyle { - /** - * The constructor. - * - * @param { LinearGradientOptions } options - The options of the gradient. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options: LinearGradientOptions); - - /** - * The options of the gradient. - * angle: Angle of linear gradient. - * direction: Direction of Linear Gradient. - * colors: Color description for gradients. - * repeating: if the gradient colors with repeated coloring. - * - * @type { LinearGradientOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - options: LinearGradientOptions; -} - -/** - * Defines radial gradient class. - * - * @extends ShaderStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -declare class RadialGradientStyle extends ShaderStyle { - /** - * The constructor. - * - * @param { RadialGradientOptions } options - The options of the gradient. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(options: RadialGradientOptions); - - /** - * The options of the gradient. - * center: Center point of radial gradient - * radius: Radius of Radial Gradient. value range [0, +∞) - * colors: Color description for gradients - * repeating: Refill. The default value is false - * - * @type { RadialGradientOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - options: RadialGradientOptions; -} - -/** - * Defines a shader with single color. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -declare class ColorShaderStyle extends ShaderStyle { - /** - * The constructor. - * - * @param { ResourceColor } color - The color used by shader. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - constructor(color: ResourceColor); - - /** - * The color of the shader. - * - * @type { RadialGradientOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - color: ResourceColor; -} - /** * Defines the line spacing options. * @interface LineSpacingOptions @@ -1641,122 +1524,4 @@ declare class ColorShaderStyle extends ShaderStyle { * @since 20 */ onlyBetweenLines?: boolean; -} - -/** - * Defines the reason for text changes. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ -declare enum TextChangeReason { - /** - * Default value. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - UNKNOWN = 0, - - /** - * Reason for input from input method. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - IME_INPUT = 1, - - /** - * Reason for paste. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - PASTE = 2, - - /** - * Reason for cut. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - CUT = 3, - - /** - * Reason for drag. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - DRAG = 4, - - /** - * Reason for auto fill. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - AUTO_FILL = 5, - - /** - * Reason for ai write. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - AI_WRITE = 6, - - /** - * Reason for redo. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - REDO = 7, - - /** - * Reason for undo. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - UNDO = 8, - - /** - * Reason for controller methods. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - CONTROLLER = 9, - - /** - * Reason for accessibilty methods. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - ACCESSIBILITY = 10, - - /** - * Reason for input. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - INPUT = 1 } \ No newline at end of file -- Gitee From a029394e5eb6b562b600b47c4712a24d8ffcc60d Mon Sep 17 00:00:00 2001 From: xuzhihao <xuzhihao16@huawei.com> Date: Mon, 21 Apr 2025 15:58:42 +0800 Subject: [PATCH 12/20] =?UTF-8?q?Bugfix:=20abilityRunningInfo=20=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E4=B8=BA=E4=B8=89=E6=96=B9=E5=8F=AF=E7=94=A8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuzhihao <xuzhihao16@huawei.com> --- api/@ohos.app.ability.abilityManager.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/@ohos.app.ability.abilityManager.d.ts b/api/@ohos.app.ability.abilityManager.d.ts index 327e98bcf2..8e79700fea 100644 --- a/api/@ohos.app.ability.abilityManager.d.ts +++ b/api/@ohos.app.ability.abilityManager.d.ts @@ -543,7 +543,7 @@ declare namespace abilityManager { * * @typedef { _AbilityRunningInfo } * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @since 14 + * @since 9 */ export type AbilityRunningInfo = _AbilityRunningInfo; -- Gitee From 70ee4d7ab8e38f19edc73a1a36ee68ea9f1e8246 Mon Sep 17 00:00:00 2001 From: xuzhihao <xuzhihao16@huawei.com> Date: Mon, 12 May 2025 21:50:46 +0800 Subject: [PATCH 13/20] =?UTF-8?q?Feature:=20JS=20Doc=E6=B8=85=E6=99=B0?= =?UTF-8?q?=E6=98=93=E5=AD=A6=E6=95=B4=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuzhihao <xuzhihao16@huawei.com> --- api/@ohos.app.ability.AbilityStage.d.ts | 24 +++++------------------ api/@ohos.app.ability.abilityManager.d.ts | 1 + api/@ohos.app.ability.wantAgent.d.ts | 5 +++-- api/application/ApplicationContext.d.ts | 6 ++++-- api/application/Context.d.ts | 10 +++++++--- 5 files changed, 20 insertions(+), 26 deletions(-) diff --git a/api/@ohos.app.ability.AbilityStage.d.ts b/api/@ohos.app.ability.AbilityStage.d.ts index a4e2ace68e..33283d1778 100644 --- a/api/@ohos.app.ability.AbilityStage.d.ts +++ b/api/@ohos.app.ability.AbilityStage.d.ts @@ -39,6 +39,9 @@ import { Configuration } from './@ohos.app.ability.Configuration'; * @since 10 */ /** + * AbilityStage is a runtime class for HAP files. + * AbilityStage notifies you of when you can perform HAP initialization such as resource pre-loading and thread + * creation during the HAP loading. * AbilityStage is a runtime class for HAP files. * AbilityStage notifies you of when you can perform HAP initialization such as resource pre-loading and thread * creation during the HAP loading. @@ -138,20 +141,6 @@ export default class AbilityStage { */ onAcceptWant(want: Want): string; - /** - * Called back asynchronously upon starting specified ability. - * - * @param { Want } want - Indicates the want info of the started ability. - * @returns { Promise<string> } The user returns an ability string ID. If the ability of this ID has been started before, - * do not create a new instance and pull it back to the top of the stack. - * Otherwise, create a new instance and start it. - * @syscap SystemCapability.Ability.AbilityRuntime.Core - * @stagemodelonly - * @atomicservice - * @since 20 - */ - onAcceptWantAsync(want: Want): Promise<string>; - /** * Called when the UIAbility is started in the specified process. * @@ -226,11 +215,8 @@ export default class AbilityStage { * @since 9 */ /** - * Listens for changes in the system memory level status. - * When the system detects low memory resources, it will proactively invoke this callback. - * You can implement this callback to promptly release non-essential resources (such as cached data or temporary - * objects) upon receiving a memory shortage event, thereby preventing the application process from being forcibly - * terminated by the system. + * Called when the system has decided to adjust the memory level. + * For example, this API can be used when there is not enough memory to run as many background processes as possible. * * <p>**NOTE**: * <br>This API returns the result synchronously and does not support asynchronous callbacks. diff --git a/api/@ohos.app.ability.abilityManager.d.ts b/api/@ohos.app.ability.abilityManager.d.ts index 8e79700fea..2fba7c4200 100644 --- a/api/@ohos.app.ability.abilityManager.d.ts +++ b/api/@ohos.app.ability.abilityManager.d.ts @@ -543,6 +543,7 @@ declare namespace abilityManager { * * @typedef { _AbilityRunningInfo } * @syscap SystemCapability.Ability.AbilityRuntime.Core + * @systemapi * @since 9 */ export type AbilityRunningInfo = _AbilityRunningInfo; diff --git a/api/@ohos.app.ability.wantAgent.d.ts b/api/@ohos.app.ability.wantAgent.d.ts index 75cace35f5..c8b63160d9 100644 --- a/api/@ohos.app.ability.wantAgent.d.ts +++ b/api/@ohos.app.ability.wantAgent.d.ts @@ -27,6 +27,7 @@ import Context from './application/Context'; /** * Provide the method obtain trigger, cancel, and compare and to obtain * the bundle name, UID of an WantAgent object. + * the bundle name, UID of an WantAgent object. * * @namespace wantAgent * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -34,7 +35,7 @@ import Context from './application/Context'; */ /** * app.ability.WantAgent is a class that encapsulates a {@link Want} object and allows the application to execute the - * Want at a future time point. The module provides APIs for creating and comparing WantAgent objects, and obtaining + * Want at a future time point.The module provides APIs for creating and comparing WantAgent objects, and obtaining * the user ID and bundle name of a WantAgent object. * * A typical use scenario of WantAgent is notification processing. For example, when a user touches a notification, @@ -563,7 +564,7 @@ declare namespace wantAgent { * @since 9 */ /** - * Extra information of the existing WantAgent object is replaced with that of the new object. + * Extra information of the existing WantAgent object is replaced with that of the new object. * * @syscap SystemCapability.Ability.AbilityRuntime.Core * @atomicservice diff --git a/api/application/ApplicationContext.d.ts b/api/application/ApplicationContext.d.ts index e43a2c4eb4..802d51432a 100644 --- a/api/application/ApplicationContext.d.ts +++ b/api/application/ApplicationContext.d.ts @@ -45,6 +45,8 @@ import Want from '../@ohos.app.ability.Want'; * @since 10 */ /** + * The ApplicationContext module, inherited from Context, provides application-level context capabilities, including + * APIs for registering and unregistering the lifecycle of application components. * The ApplicationContext module, inherited from Context, provides application-level context capabilities, including * APIs for registering and unregistering the lifecycle of application components. * @@ -716,7 +718,7 @@ export default class ApplicationContext extends Context { * <br>This API can be called only by the main thread. * </P> * - * @param { string } font - Font, which can be registered by calling UIContext.registerFont. + * @param { string } font - Font, which can be registered by calling {@link font.registerFont}. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. * @throws { BusinessError } 16000011 - The context does not exist. @@ -732,7 +734,7 @@ export default class ApplicationContext extends Context { * * @returns { number } Index of the current application clone. * @throws { BusinessError } 16000011 - The context does not exist. - * @throws { BusinessError } 16000071 - App clone is not supported. + * @throws { BusinessError } 16000071 - The MultiAppMode is not APP_CLONE. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @atomicservice diff --git a/api/application/Context.d.ts b/api/application/Context.d.ts index b6a716927e..05e47e288b 100644 --- a/api/application/Context.d.ts +++ b/api/application/Context.d.ts @@ -47,7 +47,7 @@ import contextConstant from '../@ohos.app.ability.contextConstant'; */ /** * The Context module, inherited frome {@link BaseContext}, provides context for abilities or applications, including - * access to application-specific resources. + * accessto application-specific resources. * * @extends BaseContext * @syscap SystemCapability.Ability.AbilityRuntime.Core @@ -489,14 +489,16 @@ export default class Context extends BaseContext { createModuleContext(bundleName: string, moduleName: string): Context; /** - * This API allows OEM manufacturers to set up their own ResourceManager in the pre-installed system HSP. + * Creates a resource manager object for a module of the system-level HSP. * * @param { string } bundleName - Bundle name. * @param { string } moduleName - Module name. + * @param { string } bundleName - Bundle name. + * @param { string } moduleName - Module name. * @returns { resmgr.ResourceManager } Returns the system HSP module resource manager. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. * 2.Incorrect parameter types. - * @throws { BusinessError } 16400001 - The input bundleName is not a system HSP. + * @throws { BusinessError } 16400001 - If the input bundleName is not system hsp. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @systemapi * @stagemodelonly @@ -527,6 +529,8 @@ export default class Context extends BaseContext { * Obtains the context of this application. * * @returns { ApplicationContext } Application context obtained. + * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified. + * 2.Incorrect parameter types. * @syscap SystemCapability.Ability.AbilityRuntime.Core * @stagemodelonly * @crossplatform -- Gitee From 5f8cea5f877e2cdaa462f52f81a0b0959dbf8bcc Mon Sep 17 00:00:00 2001 From: zhanghang <zhanghang160@huawei-partners.com> Date: Thu, 15 May 2025 20:58:01 +0800 Subject: [PATCH 14/20] =?UTF-8?q?Select=E7=9A=84menu=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=AD=90=E7=AA=97=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhanghang <zhanghang160@huawei-partners.com> --- api/@internal/component/ets/select.d.ts | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/api/@internal/component/ets/select.d.ts b/api/@internal/component/ets/select.d.ts index 41fcdac73f..93ad43af7e 100644 --- a/api/@internal/component/ets/select.d.ts +++ b/api/@internal/component/ets/select.d.ts @@ -1224,20 +1224,9 @@ declare class SelectAttribute extends CommonMethod<SelectAttribute> { * @crossplatform * @atomicservice * @since 20 + * @arkts 1.1&1.2 */ showInSubWindow(showInSubWindow: Optional<boolean>): SelectAttribute; - - /** - * Set whether to display the default selected icon - * - * @param { boolean } show - whether to display the default selected icon. - * @returns { SelectAttribute } the attribute of the select. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - showDefaultSelectedIcon(show: boolean): SelectAttribute; } /** -- Gitee From 6c278c86442091f81f46a27a158346d80b491b0c Mon Sep 17 00:00:00 2001 From: Gisaac <gongjie13@huawei.com> Date: Tue, 1 Apr 2025 15:03:37 +0800 Subject: [PATCH 15/20] add code Signed-off-by: Gisaac <gongjie13@huawei.com> --- api/@ohos.multimedia.audio.d.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/api/@ohos.multimedia.audio.d.ts b/api/@ohos.multimedia.audio.d.ts index c9aea692a3..1c3523a64b 100644 --- a/api/@ohos.multimedia.audio.d.ts +++ b/api/@ohos.multimedia.audio.d.ts @@ -4827,30 +4827,25 @@ declare namespace audio { off(type: 'appVolumeChange', callback?: Callback<VolumeEvent>): void; /** - * Subscribes to active volume type changes. + * Listens for active volume type change events. This method uses a callback to get active volume type. * @param { 'activeVolumeTypeChange' } type - Type of the event to listen for. * Only the activeVolumeTypeChange event is supported. - * @param { Callback<AudioVolumeType> } callback - Callback used to return the active volume type. + * @param { Callback<AudioVolumeType> } callback - Callback used to get active volume type. * @throws { BusinessError } 202 - Not system App. - * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume - * @systemapi * @since 20 */ on(type: 'activeVolumeTypeChange', callback: Callback<AudioVolumeType>): void; /** - * Unsubscribes from active volume type changes. - * @param { 'activeVolumeTypeChange' } type - Type of the event to unregister. + * Unsubscribes to the active volume type change events. + * @param { 'activeVolumeTypeChange' } type - Type of the event to be unregistered. * Only the activeVolumeTypeChange event is supported. - * @param { Callback<AudioVolumeType> } callback - Callback used to return the active volume type. * @throws { BusinessError } 202 - Not system App. - * @throws { BusinessError } 6800101 - Parameter verification failed. * @syscap SystemCapability.Multimedia.Audio.Volume - * @systemapi * @since 20 */ - off(type: 'activeVolumeTypeChange', callback?: Callback<AudioVolumeType>): void; + off(type: 'activeVolumeTypeChange'): void; } /** -- Gitee From 9eae1e70286f3622574539452ee57c1b8931afb3 Mon Sep 17 00:00:00 2001 From: dr123 <dairui13@huawei.com> Date: Fri, 16 May 2025 22:47:47 +0800 Subject: [PATCH 16/20] =?UTF-8?q?EDM=E5=BC=80=E5=85=B3=E8=93=9D=E7=89=99ap?= =?UTF-8?q?i=E6=8C=91=E5=88=B0=E4=B8=BB=E5=B9=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dr123 <dairui13@huawei.com> --- api/@ohos.enterprise.bluetoothManager.d.ts | 54 ---------------------- 1 file changed, 54 deletions(-) diff --git a/api/@ohos.enterprise.bluetoothManager.d.ts b/api/@ohos.enterprise.bluetoothManager.d.ts index 4659ee3f9b..8e357cab22 100644 --- a/api/@ohos.enterprise.bluetoothManager.d.ts +++ b/api/@ohos.enterprise.bluetoothManager.d.ts @@ -225,60 +225,6 @@ declare namespace bluetoothManager { * @since 20 */ function turnOffBluetooth(admin: Want): void; - - /** - * Adds devices to the list of bluetooth devices that are disallowed to be connected. - * This function can be called by a super administrator. - * - * @permission ohos.permission.ENTERPRISE_MANAGE_BLUETOOTH - * @param { Want } admin - admin indicates the enterprise admin extension ability information. - * The admin must have the corresponding permission. - * @param { Array<string> } deviceIds - IDs of the bluetooth devices to be added to the list. - * The size of the array after setting cannot be greater than 1000. - * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. - * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. - * @throws { BusinessError } 9200010 - A conflict policy has been configured. - * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. - * @syscap SystemCapability.Customization.EnterpriseDeviceManager - * @stagemodelonly - * @since 20 - */ - function addDisallowedBluetoothDevices(admin: Want, deviceIds: Array<string>): void; - - /** - * Removes devices from the list of bluetooth devices that are disallowed to be connected. - * This function can be called by a super administrator. - * - * @permission ohos.permission.ENTERPRISE_MANAGE_BLUETOOTH - * @param { Want } admin - admin indicates the enterprise admin extension ability information. - * The admin must have the corresponding permission. - * @param { Array<string> } deviceIds - IDs of the bluetooth devices to be removed from the list. - * The size of the array after setting cannot be greater than 1000. - * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. - * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. - * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. - * @syscap SystemCapability.Customization.EnterpriseDeviceManager - * @stagemodelonly - * @since 20 - */ - function removeDisallowedBluetoothDevices(admin: Want, deviceIds: Array<string>): void; - - /** - * Gets the devices in the list of bluetooth devices that are disallowed to be connected. - * This function can be called by a super administrator. - * - * @permission ohos.permission.ENTERPRISE_MANAGE_BLUETOOTH - * @param { Want } admin - admin indicates the enterprise admin extension ability information. - * If the admin is not empty, it must have the corresponding permission. - * @returns { Array<string> } IDs of the bluetooth devices in the list. - * @throws { BusinessError } 9200001 - The application is not an administrator application of the device. - * @throws { BusinessError } 9200002 - The administrator application does not have permission to manage the device. - * @throws { BusinessError } 201 - Permission verification failed. The application does not have the permission required to call the API. - * @syscap SystemCapability.Customization.EnterpriseDeviceManager - * @stagemodelonly - * @since 20 - */ - function getDisallowedBluetoothDevices(admin: Want): Array<string>; } export default bluetoothManager; -- Gitee From ce1e528e143b18f912c6acee4446019ada20680b Mon Sep 17 00:00:00 2001 From: mobHot <hulei100@huawei.com> Date: Sun, 20 Apr 2025 21:05:49 +0800 Subject: [PATCH 17/20] add the support for trimming line end space Signed-off-by: mobHot <hulei100@huawei.com> Change-Id: I46ee77962648933f9dc086540376f4061e0b7d78 --- api/@ohos.graphics.text.d.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/api/@ohos.graphics.text.d.ts b/api/@ohos.graphics.text.d.ts index cdbb910aec..5ef412c6c7 100755 --- a/api/@ohos.graphics.text.d.ts +++ b/api/@ohos.graphics.text.d.ts @@ -1152,14 +1152,6 @@ declare namespace text { * @since 20 */ trailingSpaceOptimized?: boolean; - - /** - * Whether to enable automatic spacing between Chinese and English for paragraph. - * @type { ?boolean } - * @syscap SystemCapability.Graphics.Drawing - * @since 20 - */ - autoSpace?: boolean; } /** -- Gitee From f0a723a4070fe4be88685ed5947afcbaeba8c8ba Mon Sep 17 00:00:00 2001 From: lixiaoxiang <lixiaoxiang0608@163.com> Date: Sat, 17 May 2025 21:00:40 +0800 Subject: [PATCH 18/20] add baseTypeTs Signed-off-by: lixiaoxiang <lixiaoxiang0608@163.com> --- api/@ohos.graphics.drawing.d.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/api/@ohos.graphics.drawing.d.ts b/api/@ohos.graphics.drawing.d.ts index 5ef649ba82..4b5ea2c1e5 100644 --- a/api/@ohos.graphics.drawing.d.ts +++ b/api/@ohos.graphics.drawing.d.ts @@ -3582,6 +3582,7 @@ declare namespace drawing { /** * Enables anti-aliasing for this pen. Anti-aliasing makes the edges of the content smoother. + * If this API is not called, anti-aliasing is disabled by default. * * @param { boolean } aa - Whether to enable anti-aliasing. The value true means to enable anti-aliasing, and false means the opposite. * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; -- Gitee From ac556953d5ad449e4e2ffc08c2ac14d6f32f392c Mon Sep 17 00:00:00 2001 From: liuwei <liuwei793@h-partners.com> Date: Tue, 13 May 2025 03:51:26 +0000 Subject: [PATCH 19/20] =?UTF-8?q?=E7=AA=97=E5=8F=A3=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E8=B7=A8=E5=B9=B3=E5=8F=B0api=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuwei <liuwei793@h-partners.com> Change-Id: If5949e98123be8c4d7f0aea62aa862713ba01cc5 --- api/@ohos.window.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/@ohos.window.d.ts b/api/@ohos.window.d.ts index f3ae68d994..867cb99ee3 100644 --- a/api/@ohos.window.d.ts +++ b/api/@ohos.window.d.ts @@ -598,8 +598,8 @@ declare namespace window { * * @enum { number } * @syscap SystemCapability.Window.SessionManager - * @crossplatform * @atomicservice + * @crossplatform * @since 20 */ enum WindowStatusType { @@ -1580,7 +1580,7 @@ declare namespace window { * * @type { WindowStatusType } * @syscap SystemCapability.Window.SessionManager - * @crossplatform + * @crossPlatform * @since 20 */ windowStatusType: WindowStatusType; @@ -8145,8 +8145,8 @@ declare namespace window { * 2. Incorrect parameter types. * @throws { BusinessError } 1300002 - This window state is abnormal. * @syscap SystemCapability.WindowManager.WindowManager.Core - * @crossplatform * @atomicservice + * @crossplatform * @since 20 */ setWindowPrivacyMode(isPrivacyMode: boolean, callback: AsyncCallback<void>): void; -- Gitee From e37fa8444f7f3355c5c5e8a363509e884dc7eaab Mon Sep 17 00:00:00 2001 From: w00640748 <wangjian422@huawei.com> Date: Sat, 10 May 2025 16:58:31 +0800 Subject: [PATCH 20/20] Merge camera.d.ts Signed-off-by: jango <wangjian422@huawei.com> --- api/@ohos.multimedia.camera.d.ts | 129 +------------------------------ 1 file changed, 3 insertions(+), 126 deletions(-) diff --git a/api/@ohos.multimedia.camera.d.ts b/api/@ohos.multimedia.camera.d.ts index 6d4c54868b..7c1a3e2367 100644 --- a/api/@ohos.multimedia.camera.d.ts +++ b/api/@ohos.multimedia.camera.d.ts @@ -3704,35 +3704,6 @@ declare namespace camera { */ setMeteringPoint(point: Point): void; - /** - * Set the center point of the metering area. - * - * @param { Point } point - metering point - * @throws { BusinessError } 7400103 - Session not config. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 19 - */ - /** - * Query the exposure compensation range. - * - * @returns { Array<number> } The array of compensation range. - * @throws { BusinessError } 7400103 - Session not config. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 19 - */ - /** - * Query the exposure compensation range. - * - * @returns { Array<number> } The array of compensation range. - * @throws { BusinessError } 7400103 - Session not config. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 19 - */ - getExposureBiasRange(): Array<number>; - /** * Set exposure compensation. * @@ -4384,14 +4355,6 @@ declare namespace camera { * @systemapi * @since 12 */ - /** - * Enumerates the camera white balance modes. - * - * @enum { number } - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - */ enum WhiteBalanceMode { /** * Automatic white balance mode. @@ -4399,12 +4362,6 @@ declare namespace camera { * @systemapi * @since 12 */ - /** - * Automatic white balance mode. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - */ AUTO = 0, /** @@ -4470,13 +4427,6 @@ declare namespace camera { * @systemapi * @since 12 */ - /** - * Implements white balance query. - * @interface WhiteBalanceQuery - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - */ interface WhiteBalanceQuery { /** * Checks whether a specified white balance mode is supported. @@ -4490,16 +4440,6 @@ declare namespace camera { * @systemapi * @since 12 */ - /** - * Checks whether the specified white balance mode is supported. - * @param { WhiteBalanceMode } mode White balance mode. - * @returns { boolean } Check result. - * @throws { BusinessError } 7400101 - Parameter missing or parameter type incorrect. - * @throws { BusinessError } 7400103 - Session not config, only throw in session usage. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - */ isWhiteBalanceModeSupported(mode: WhiteBalanceMode): boolean; /** @@ -4524,14 +4464,6 @@ declare namespace camera { * @systemapi * @since 12 */ - /** - * Implements white balance. - * @extends WhiteBalanceQuery - * @interface WhiteBalance - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - */ interface WhiteBalance extends WhiteBalanceQuery { /** * Gets current white balance mode. @@ -4543,14 +4475,6 @@ declare namespace camera { * @systemapi * @since 12 */ - /** - * Obtains the white balance mode in use. - * @returns { WhiteBalanceMode } White balance mode. - * @throws { BusinessError } 7400103 - Session not config. - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - */ getWhiteBalanceMode(): WhiteBalanceMode; /** @@ -7357,16 +7281,7 @@ declare namespace camera { * @atomicservice * @since 19 */ - /** - * Implements a photo capture session. - * @extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, ColorManagement, AutoDeviceSwitch, - * Macro - * @interface PhotoSession - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - */ - interface PhotoSession extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, ColorManagement, AutoDeviceSwitch, Macro { + interface PhotoSession extends Session, Flash, AutoExposure, Focus, Zoom, ColorManagement, AutoDeviceSwitch, Macro { /** * Gets whether the choosed preconfig type can be used to configure photo session. * Must choose preconfig type from {@link PreconfigType}. @@ -7794,16 +7709,7 @@ declare namespace camera { * @atomicservice * @since 19 */ - /** - * Video session object. - * - * @extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, Stabilization, ColorManagement, AutoDeviceSwitch, Macro - * @interface VideoSession - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - */ - interface VideoSession extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom, Stabilization, ColorManagement, AutoDeviceSwitch, Macro { + interface VideoSession extends Session, Flash, AutoExposure, Focus, Zoom, Stabilization, ColorManagement, AutoDeviceSwitch, Macro { /** * Gets whether the choosed preconfig type can be used to configure video session. * Must choose preconfig type from {@link PreconfigType}. @@ -9863,16 +9769,7 @@ declare namespace camera { * @atomicservice * @since 19 */ - /** - * Secure camera session object. - * - * @extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom - * @interface SecureSession - * @syscap SystemCapability.Multimedia.Camera.Core - * @atomicservice - * @since 20 - */ - interface SecureSession extends Session, Flash, AutoExposure, WhiteBalance, Focus, Zoom { + interface SecureSession extends Session, Flash, AutoExposure, Focus, Zoom { /** * Marks one of the PreviewOutputs as safe. * @@ -12278,28 +12175,8 @@ declare namespace camera { * @systemapi * @since 10 */ - /** - * Subscribes to camera thumbnail events. - * This method is valid only after enableQuickThumbnail(true) is called. - * - * @param { 'quickThumbnail' } type - Event type. - * @param { AsyncCallback<image.PixelMap> } callback - Callback used to get the quick thumbnail. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 19 - */ on(type: 'quickThumbnail', callback: AsyncCallback<image.PixelMap>): void; - /** - * Unsubscribes from camera thumbnail events. - * This method is valid only after enableQuickThumbnail(true) is called. - * - * @param { 'quickThumbnail' } type - Event type. - * @param { AsyncCallback<image.PixelMap> } callback - Callback used to get the quick thumbnail. - * @syscap SystemCapability.Multimedia.Camera.Core - * @systemapi - * @since 10 - */ /** * Unsubscribes from camera thumbnail events. * This method is valid only after enableQuickThumbnail(true) is called. -- Gitee