diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 46baa3376379700c91e22e393a7cf13a70a7e5a8..3e00d235fb8448709d47bd62c30ad3f1a7ea592a 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -2538,6 +2538,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 25626e7d1e55564fd2e95e73297879c25e942bcf..5796e2d6cdf4552f74a06b10e37a5c9292680424 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -412,6 +412,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 = 1, + /** Bottom aligned. */ + ARKUI_TEXT_CONTENT_ALIGN_BOTTOM = 2, +} ArkUI_TextContentAlign; + /** * @brief Enumerates the types of the Enter key for a single-line text box. *