diff --git a/api/@ohos.arkui.advanced.FoldSplitContainer.d.ets b/api/@ohos.arkui.advanced.FoldSplitContainer.d.ets index 4c647daed5a1797c667e24fec8d7ccba7fc5499c..748ae064fed0a2e228a13f10a6673c1856f0957c 100644 --- a/api/@ohos.arkui.advanced.FoldSplitContainer.d.ets +++ b/api/@ohos.arkui.advanced.FoldSplitContainer.d.ets @@ -1,5 +1,5 @@ /* -* Copyright (C) 2024 Huawei Device Co., Ltd. +* Copyright (C) 2024-2025 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -31,6 +31,15 @@ import { Callback } from '@ohos.base'; * @atomicservice * @since 12 */ +/** + * Position enum of the extra region + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ export declare enum ExtraRegionPosition { /** * The extra region position is in the top. @@ -39,6 +48,14 @@ export declare enum ExtraRegionPosition { * @atomicservice * @since 12 */ + /** + * The extra region position is in the top. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ TOP = 1, /** * The extra region position is in the bottom. @@ -47,6 +64,14 @@ export declare enum ExtraRegionPosition { * @atomicservice * @since 12 */ + /** + * The extra region position is in the bottom. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ BOTTOM = 2 } /** @@ -57,6 +82,15 @@ export declare enum ExtraRegionPosition { * @atomicservice * @since 12 */ +/** + * The layout options for the container when the foldable screen is expanded. + * + * @interface ExpandedRegionLayoutOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ export interface ExpandedRegionLayoutOptions { /** * The ratio of the widths of two areas in the horizontal direction. @@ -66,6 +100,15 @@ export interface ExpandedRegionLayoutOptions { * @atomicservice * @since 12 */ + /** + * The ratio of the widths of two areas in the horizontal direction. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ horizontalSplitRatio?: number; /** * The ratio of the heights of two areas in the vertical direction. @@ -75,6 +118,15 @@ export interface ExpandedRegionLayoutOptions { * @atomicservice * @since 12 */ + /** + * The ratio of the heights of two areas in the vertical direction. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ verticalSplitRatio?: number; /** * Does the extended area span from top to bottom within the container? @@ -84,6 +136,15 @@ export interface ExpandedRegionLayoutOptions { * @atomicservice * @since 12 */ + /** + * Does the extended area span from top to bottom within the container? + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ isExtraRegionPerpendicular?: boolean; /** * Specify the position of the extra area when the extra area does not vertically span the container. @@ -93,6 +154,15 @@ export interface ExpandedRegionLayoutOptions { * @atomicservice * @since 12 */ + /** + * Specify the position of the extra area when the extra area does not vertically span the container. + * + * @type { ?ExtraRegionPosition } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ extraRegionPosition?: ExtraRegionPosition; } /** @@ -103,6 +173,15 @@ export interface ExpandedRegionLayoutOptions { * @atomicservice * @since 12 */ +/** + * The layout options for the container when the foldable screen is in hover mode. + * + * @typedef HoverModeRegionLayoutOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ export interface HoverModeRegionLayoutOptions { /** * The ratio of the widths of two areas in the horizontal direction. @@ -112,6 +191,15 @@ export interface HoverModeRegionLayoutOptions { * @atomicservice * @since 12 */ + /** + * The ratio of the widths of two areas in the horizontal direction. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ horizontalSplitRatio?: number; /** * Does the foldable screen display an extra area when it's in the half-folded state? @@ -121,6 +209,15 @@ export interface HoverModeRegionLayoutOptions { * @atomicservice * @since 12 */ + /** + * Does the foldable screen display an extra area when it's in the half-folded state? + * + * @type { ?boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ showExtraRegion?: boolean; /** * Specify the position of the extra area when the foldable screen is in the half-folded state. @@ -130,6 +227,15 @@ export interface HoverModeRegionLayoutOptions { * @atomicservice * @since 12 */ + /** + * Specify the position of the extra area when the foldable screen is in the half-folded state. + * + * @type { ?ExtraRegionPosition } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ extraRegionPosition?: ExtraRegionPosition; } /** @@ -140,6 +246,15 @@ export interface HoverModeRegionLayoutOptions { * @atomicservice * @since 12 */ +/** + * The layout options for the container when the foldable screen is folded. + * + * @interface FoldedRegionLayoutOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ export interface FoldedRegionLayoutOptions { /** * The ratio of the heights of two areas in the vertical direction. @@ -149,6 +264,15 @@ export interface FoldedRegionLayoutOptions { * @atomicservice * @since 12 */ + /** + * The ratio of the heights of two areas in the vertical direction. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ verticalSplitRatio?: number; } /** @@ -159,6 +283,15 @@ export interface FoldedRegionLayoutOptions { * @atomicservice * @since 12 */ +/** + * Preset split ratio. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ export declare enum PresetSplitRatio { /** * 1:1 @@ -167,6 +300,14 @@ export declare enum PresetSplitRatio { * @atomicservice * @since 12 */ + /** + * 1:1 + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ LAYOUT_1V1 = 1, /** * 2:3 @@ -175,6 +316,14 @@ export declare enum PresetSplitRatio { * @atomicservice * @since 12 */ + /** + * 2:3 + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ LAYOUT_2V3 = 0.6666666666666666, /** * 3:2 @@ -183,6 +332,14 @@ export declare enum PresetSplitRatio { * @atomicservice * @since 12 */ + /** + * 3:2 + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ LAYOUT_3V2 = 1.5 } /** @@ -193,6 +350,15 @@ export declare enum PresetSplitRatio { * @atomicservice * @since 12 */ +/** + * The status of hover mode. + * + * @interface HoverStatus + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ export interface HoverModeStatus { /** * The fold status of devices. @@ -202,6 +368,15 @@ export interface HoverModeStatus { * @atomicservice * @since 12 */ + /** + * The fold status of devices. + * + * @type { display.FoldStatus } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ foldStatus: display.FoldStatus; /** * Is the app currently in hover mode? @@ -212,6 +387,16 @@ export interface HoverModeStatus { * @atomicservice * @since 12 */ + /** + * Is the app currently in hover mode? + * In hover mode, the upper half of the screen is used for display, and the lower half is used for operation. + * + * @type { boolean } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ isHoverMode: boolean; /** * The angle of rotation applied. @@ -221,6 +406,15 @@ export interface HoverModeStatus { * @atomicservice * @since 12 */ + /** + * The angle of rotation applied. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ appRotation: number; /** * The status of window. @@ -230,6 +424,15 @@ export interface HoverModeStatus { * @atomicservice * @since 12 */ + /** + * The status of window. + * + * @type { window.WindowStatusType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ windowStatusType: window.WindowStatusType; } /** @@ -241,6 +444,16 @@ export interface HoverModeStatus { * @atomicservice * @since 12 */ +/** + * The handler of onHoverStatusChange event + * + * @typedef { function } OnHoverStatusChangeHandler + * @param { HoverModeStatus } status - The status of hover mode + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ export type OnHoverStatusChangeHandler = (status: HoverModeStatus) => void; /** * Defines FoldSplitContainer container. @@ -250,6 +463,15 @@ export type OnHoverStatusChangeHandler = (status: HoverModeStatus) => void; * @atomicservice * @since 12 */ +/** + * Defines FoldSplitContainer container. + * + * @interface FoldSplitContainer + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ @Component export declare struct FoldSplitContainer { /** @@ -260,6 +482,15 @@ export declare struct FoldSplitContainer { * @atomicservice * @since 12 */ + /** + * The builder function which will be rendered in the major region of container. + * + * @type { Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ @BuilderParam primary: Callback; /** @@ -270,6 +501,15 @@ export declare struct FoldSplitContainer { * @atomicservice * @since 12 */ + /** + * The builder function which will be rendered in the minor region of container. + * + * @type { Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ @BuilderParam secondary: Callback; /** @@ -280,6 +520,15 @@ export declare struct FoldSplitContainer { * @atomicservice * @since 12 */ + /** + * The builder function which will be rendered in the extra region of container. + * + * @type { ?Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ @BuilderParam extra?: Callback; /** @@ -290,6 +539,15 @@ export declare struct FoldSplitContainer { * @atomicservice * @since 12 */ + /** + * The layout options for the container when the foldable screen is expanded. + * + * @type { ExpandedRegionLayoutOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ @Prop expandedLayoutOptions: ExpandedRegionLayoutOptions; /** @@ -300,6 +558,15 @@ export declare struct FoldSplitContainer { * @atomicservice * @since 12 */ + /** + * The layout options for the container when the foldable screen is in hover mode. + * + * @type { HoverModeRegionLayoutOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ @Prop hoverModeLayoutOptions: HoverModeRegionLayoutOptions; /** @@ -310,6 +577,15 @@ export declare struct FoldSplitContainer { * @atomicservice * @since 12 */ + /** + * The layout options for the container when the foldable screen is folded. + * + * @type { FoldedRegionLayoutOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ @Prop foldedLayoutOptions: FoldedRegionLayoutOptions; /** @@ -320,6 +596,15 @@ export declare struct FoldSplitContainer { * @atomicservice * @since 12 */ + /** + * The animation options of layout + * + * @type { ?(AnimateParam | null) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ @Prop animationOptions?: AnimateParam | null; /** @@ -331,5 +616,15 @@ export declare struct FoldSplitContainer { * @atomicservice * @since 12 */ + /** + * The callback function that is triggered when the foldable screen enters or exits hover mode. + * In hover mode, the upper half of the screen is used for display, and the lower half is used for operation. + * + * @type { ?OnHoverStatusChangeHandler } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 22 + */ onHoverStatusChange?: OnHoverStatusChangeHandler; }