diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 788f80454702a862b8e02b42a73ade278b7afe3e..42fc120956811bcc0c6390f2e3f4a87834c5b99a 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -2491,6 +2491,22 @@ typedef enum { */ NODE_TEXT_VERTICAL_ALIGN = 1035, + /** + * @brief Sets the content align of the text. + * 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].i32: content align of the text, specified using the {@link ArkUI_TextContentAlign} + * enum. The default value is ARKUI_TEXT_CONTENT_ALIGN_TOP. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: content align of the text, specified using the {@link ArkUI_TextContentAlign} + * enum. \n + * + * @since 21 + */ + NODE_TEXT_CONTENT_ALIGN = 1036, + /** * @brief Defines the text content attribute, which can be set, reset, and obtained as required through APIs. * diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index f7b72cc37d01d1e2fdf67c70598a42194058fb72..94c0735120e088c9bb56f84ec1ccec99e831caa7 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -405,6 +405,20 @@ typedef enum { ARKUI_TEXT_VERTICAL_ALIGNMENT_TOP, } ArkUI_TextVerticalAlignment; +/** + * @brief Enumerates text content align styles. + * + * @since 21 + */ +typedef enum { + /** Top aligned. */ + ARKUI_TEXT_CONTENT_ALIGN_TOP = 0, + /** Center aligned. */ + ARKUI_TEXT_CONTENT_ALIGN_CENTER, + /** Bottom aligned. */ + ARKUI_TEXT_CONTENT_ALIGN_BOTTOM, +} ArkUI_TextContentAlign; + /** * @brief Enumerates the types of the Enter key for a single-line text box. *