diff --git a/api/@ohos.app.form.FormExtensionAbility.d.ts b/api/@ohos.app.form.FormExtensionAbility.d.ts index 8eb3e5f9f94f33061bd7543bbfc5f7d8c46164cc..65f224550023b837a93ec42fb915d0c1d73c3c75 100644 --- a/api/@ohos.app.form.FormExtensionAbility.d.ts +++ b/api/@ohos.app.form.FormExtensionAbility.d.ts @@ -338,5 +338,20 @@ declare class FormExtensionAbility { * @since 20 */ onFormLocationChanged(formId: string, newLocation: formInfo.FormLocation): void; + + /** + * Called to notify the form provider that the size of the form has been changed. Override this method if + * you want to know the form size be changed, used for data continuity and layout refresh. + * + * @param { string } formId - Indicates the ID of the form. + * @param { string } newDimension - Indicates the new dimension of the form. + * @param { formInfo.Rect } newRect - Indicates the new rect(vp) of the form. + * + * @syscap SystemCapability.Ability.Form + * @stagemodelonly + * @since 20 + * @arkts 1.1&1.2 + */ + onSizeChanged(formId: string, newDimension: string, newRect: formInfo.Rect): void; } export default FormExtensionAbility; diff --git a/api/@ohos.app.form.formHost.d.ts b/api/@ohos.app.form.formHost.d.ts index cb7a9402a3de617a456a10315fbae2ee9f30e7bf..60469fbdd6955bec94b1bf4097b14c9582afb131 100644 --- a/api/@ohos.app.form.formHost.d.ts +++ b/api/@ohos.app.form.formHost.d.ts @@ -1274,5 +1274,23 @@ declare namespace formHost { * @since 12 */ function updateFormLocation(formId: string, location: formInfo.FormLocation): void; + + /** + * Update size of the form. + * + * @permission ohos.permission.REQUIRE_FORM + * @param { string } formId - Indicates the form id. + * @param { string } newDimension - The new dimension of the form. + * @param { formInfo.Rect } newRect - The new size of the form. + * @throws { BusinessError } 201 - Permissions denied. + * @throws { BusinessError } 202 - caller is not system app. + * @throws { BusinessError } 801 - Capability not supported.function requestOverRange can not work correctly + * due to limited device capabilities. + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 20 + * @arkts 1.2 + */ + function updateFormSize(formId: string, newDimension: string, newRect: formInfo.Rect): void; } export default formHost; diff --git a/api/@ohos.app.form.formInfo.d.ts b/api/@ohos.app.form.formInfo.d.ts index c6c6e9245bc506618b3bef00cfa9932114d7438f..51400ba478e88f8dce1a2c3224b5fceb06343177 100644 --- a/api/@ohos.app.form.formInfo.d.ts +++ b/api/@ohos.app.form.formInfo.d.ts @@ -472,6 +472,30 @@ declare namespace formInfo { * @since 20 */ readonly sceneAnimationParams?: SceneAnimationParams; + + /** + * Obtains the resizable of the form. + * + * @type { ?boolean } + * @readonly + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 20 + * @arkts 1.2 + */ + readonly resizable?: boolean; + + /** + * Obtains the group id of the form. + * + * @type { ?string } + * @readonly + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 20 + * @arkts 1.2 + */ + readonly groupId?: string; } /**