diff --git a/api/@ohos.app.form.FormExtensionAbility.d.ts b/api/@ohos.app.form.FormExtensionAbility.d.ts index f106f0c109bdec3c311236b84e249dbbf4de4c99..64bcd8ca3fdfcc1b361077b272186f267ebde878 100644 --- a/api/@ohos.app.form.FormExtensionAbility.d.ts +++ b/api/@ohos.app.form.FormExtensionAbility.d.ts @@ -338,5 +338,18 @@ declare class FormExtensionAbility { * @since 20 */ onFormLocationChanged(formId: string, newFormLocation: 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 { formInfo.FormDimension } 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 + */ + onSizeChanged(formId: string, newDimension: formInfo.FormDimension, 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 421eb36c6e8552bfb90b34dc66406e1e7a961906..5db0f7bb26dba6c42d80ea85d8913d8f15f79764 100644 --- a/api/@ohos.app.form.formHost.d.ts +++ b/api/@ohos.app.form.formHost.d.ts @@ -1318,5 +1318,23 @@ declare namespace formHost { */ function off(type: 'getLiveFormStatus', callback?: formInfo.GetLiveFormStatusCallback): void; + + /** + * Update size of the form. + * + * @permission ohos.permission.REQUIRE_FORM + * @param { string } formId - Indicates the form id. + * @param { formInfo.FormDimension } 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 } 16501000 - An internal functional error occurred. + * @throws { BusinessError } 16501001 - The ID of the form to be operated does not exist. + * @throws { BusinessError } 16501012 - The dimension parameter is incorrect + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 20 + */ + function updateFormSize(formId: string, newDimension: formInfo.FormDimension, 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 f6f9d43c383da0079efb42cb8762910a8a82877c..5c59c1182c3580f3f46b059fca2dcdbd91350a42 100644 --- a/api/@ohos.app.form.formInfo.d.ts +++ b/api/@ohos.app.form.formInfo.d.ts @@ -472,6 +472,28 @@ declare namespace formInfo { * @since 20 */ readonly sceneAnimationParams?: SceneAnimationParams; + + /** + * Obtains the resizable of the form. + * + * @type { ?boolean } + * @readonly + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 20 + */ + readonly resizable?: boolean; + + /** + * Obtains the group id of the form. + * + * @type { ?string } + * @readonly + * @syscap SystemCapability.Ability.Form + * @systemapi + * @since 20 + */ + readonly groupId?: string; } /**