diff --git a/interfaces/native/native_node.h b/interfaces/native/native_node.h index 4a42289a2b8203430962f3e8f0e314ea2400f5e4..c172eb6440acf72d43e2288d604d9e2c6b39f29e 100644 --- a/interfaces/native/native_node.h +++ b/interfaces/native/native_node.h @@ -2001,6 +2001,60 @@ typedef enum { */ NODE_ROTATE_ANGLE = 104, + /** + * @brief Defines the width attribute with param type LayoutPolicy, which can be set, reset, and obtained + * as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: the LayoutPolicy that the width of the component follows.\n + * The parameter type is {@link ArkUI_LayoutPolicy}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: the LayoutPolicy that the width of the component follows.\n + * The parameter type is {@link ArkUI_LayoutPolicy}. \n + * + * @since 20 + */ + NODE_WIDTH_LAYOUTPOLICY = 105, + + /** + * @brief Defines the height attribute with param type LayoutPolicy, which can be set, reset, and obtained + * as required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].i32: the LayoutPolicy that the height of the component follows.\n + * The parameter type is {@link ArkUI_LayoutPolicy}. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: the LayoutPolicy that the height of the component follows.\n + * The parameter type is {@link ArkUI_LayoutPolicy}. \n + * + * @since 20 + */ + NODE_HEIGHT_LAYOUTPOLICY = 106, + + /** + * @brief Defines the position attribute in param type Edges, which specifies the position of the component + * by the distance relative to the parent container's four edges. This attribute can be set, reset, and obtained as + * required through APIs. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].u32: set of edge directions {@link ArkUI_Position_EdgeDirection}, in form of Bitwise-OR. \n + * .value[1].f32: top, in vp. \n + * .value[2].f32: right, in vp. \n + * .value[3].f32: bottom, in vp. \n + * .value[4].f32: left, in vp. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].u32: set of edge directions {@link ArkUI_Position_EdgeDirection}, in form of Bitwise-OR. \n + * .value[1].f32: top, in vp. \n + * .value[2].f32: right, in vp. \n + * .value[3].f32: bottom, in vp. \n + * .value[4].f32: left, in vp. \n + * + */ + NODE_POSITION_EDGES = 107, + /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * diff --git a/interfaces/native/native_type.h b/interfaces/native/native_type.h index 45dd8220d13fba644b737e7efb49476a0555bd5e..941efbad191c1a61a38ed2936e2e355aa334c920 100644 --- a/interfaces/native/native_type.h +++ b/interfaces/native/native_type.h @@ -2557,6 +2557,37 @@ typedef enum { ARKUI_CORNER_DIRECTION_BOTTOM_RIGHT, } ArkUI_CornerDirection; +/** + * @brief Enumerates the LayoutPolicy. + * + * @since 20 + */ +typedef enum { + /** The component fills its parent, which means its size is as large as its parent */ + ARKUI_LAYOUTPOLICY_MATCHPARENT = 0, + /** + * The component fills its content, which means its size is as large as its children but it is constrained + * by its parent. + * */ + ARKUI_LAYOUTPOLICY_WRAPCONTENT, + /** The component fills its content which means its size is as large as its children. */ + ARKUI_LAYOUTPOLICY_FIXATIDEALSIZE, +} ArkUI_LayoutPolicy; + +/** + * @brief Enumerates of the direction of the edges of Position. + */ +typedef enum { + /** Left edge. */ + ARKUI_POSITION_EDGE_TOP = 1, + /** Right edge. */ + ARKUI_POSITION_EDGE_LEFT = 1 << 1, + /** Top edge. */ + ARKUI_POSITION_EDGE_BOTTOM = 1 << 2, + /** Bottom edge. */ + ARKUI_POSITION_EDGE_RIGHT = 1 << 3, +} ArkUI_Position_EdgeDirection; + /** * @brief Defines parameter used by the system font style callback event. *