diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json
index 1d822febf19e96061bd901ce00ee3268610c5be3..f47136bf1f04f91c5192a0019b34ff103d4bdc6d 100644
--- a/arkui/ace_engine/native/libace.ndk.json
+++ b/arkui/ace_engine/native/libace.ndk.json
@@ -2470,5 +2470,9 @@
{
"first_introduced": "14",
"name": "OH_ArkUI_KeyEvent_SetConsumed"
+ },
+ {
+ "first_introduced": "16",
+ "name": "OH_ArkUI_NodeEvent_GetTextChangeEvent"
}
]
\ No newline at end of file
diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h
index f83f1a181ac76ff83c6715222ed08f405ff01032..290591dfee64176547b6becad40b4e14af506490 100644
--- a/arkui/ace_engine/native/native_node.h
+++ b/arkui/ace_engine/native/native_node.h
@@ -2966,6 +2966,32 @@ typedef enum {
*
*/
NODE_TEXT_INPUT_NUMBER_OF_LINES,
+ /**
+ * @brief Sets the letter spacing of the TextInput component.
+ * 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].f32: letter spacing. The default unit is fp. \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].f32: letter spacing. The default unit is fp. \n
+ *
+ * @since 16
+ */
+ NODE_TEXT_INPUT_LETTER_SPACING = 7032,
+ /**
+ * @brief Sets whether to enable preview text for the TextInput component.
+ * 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: whether to enable preview tex. \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].i32: whether to enable preview tex. \n
+ *
+ * @since 16
+ */
+ NODE_TEXT_INPUT_ENABLE_PREVIEW_TEXT = 7033,
/**
* @brief Defines the default placeholder text for the multi-line text box.
* This attribute can be set, reset, and obtained as required through APIs.
@@ -3260,6 +3286,32 @@ typedef enum {
*
*/
NODE_TEXT_AREA_NUMBER_OF_LINES,
+ /**
+ * @brief Sets the letter spacing of the TextArea component.
+ * 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].f32: letter spacing. The default unit is fp. \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].f32: letter spacing. The default unit is fp. \n
+ *
+ * @since 16
+ */
+ NODE_TEXT_AREA_LETTER_SPACING = 8023,
+ /**
+ * @brief Sets whether to enable preview text for the TextArea component.
+ * 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: whether to enable preview tex. \n
+ * \n
+ * Format of the return value {@link ArkUI_AttributeItem}:\n
+ * .value[0].i32: whether to enable preview tex. \n
+ *
+ * @since 16
+ */
+ NODE_TEXT_AREA_ENABLE_PREVIEW_TEXT = 8024,
/**
* @brief Defines the button text content. This attribute can be set, reset, and obtained as required through APIs.
*
@@ -5443,6 +5495,20 @@ typedef struct {
const char* pStr;
} ArkUI_StringAsyncEvent;
+/**
+ * @brief Defines a hybrid data structure for component events.
+ *
+ * @since 16
+ */
+typedef struct {
+ /** String data */
+ const char* pStr;
+ /** Extended string data */
+ const char* pExtendStr;
+ /** Numeric data */
+ int32_t number;
+} ArkUI_TextChangeEvent;
+
/**
* @brief Enumerates the event types supported by the NativeNode component.
*
@@ -5955,6 +6021,20 @@ typedef enum {
*/
NODE_TEXT_INPUT_ON_DID_DELETE = 7012,
+ /**
+ * @brief Defines the event triggered when content (including preview text) changes in the TextInput
+ * component.
+ *
+ * When the event callback occurs, the union type {@link ArkUI_NodeEvent} is {@link ArkUI_TextChangeEvent}. \n
+ * {@link ArkUI_TextChangeEvent} contains the following parameters: \n
+ * ArkUI_TextChangeEvent.pStr: content in the TextInput component.
+ * ArkUI_TextChangeEvent.pExtendStr: content of the preview text in the TextInput component.
+ * ArkUI_TextChangeEvent.number: start position of the preview text in the TextInput component.
+ *
+ * @since 16
+ */
+ NODE_TEXT_INPUT_ON_CHANGE_WITH_PREVIEW_TEXT = 7013,
+
/**
* @brief Defines the event triggered when the input in the text box changes.
*
@@ -6107,6 +6187,20 @@ typedef enum {
*/
NODE_TEXT_AREA_ON_DID_DELETE = 8011,
+ /**
+ * @brief Defines the event triggered when content (including preview text) changes in the TextArea
+ * component.
+ *
+ * When the event callback occurs, the union type {@link ArkUI_NodeEvent} is {@link ArkUI_TextChangeEvent}. \n
+ * {@link ArkUI_TextChangeEvent} contains the following parameters: \n
+ * ArkUI_TextChangeEvent.pStr: content in the TextArea component.
+ * ArkUI_TextChangeEvent.pExtendStr: content of the preview text in the TextArea component.
+ * ArkUI_TextChangeEvent.number: start position of the preview text in the TextArea component.
+ *
+ * @since 16
+ */
+ NODE_TEXT_AREA_ON_CHANGE_WITH_PREVIEW_TEXT = 8012,
+
/**
* @brief Defines the event triggered when the selected status of the ARKUI_NODE_CHECKBOX component changes.
*
@@ -6653,6 +6747,15 @@ ArkUI_NodeComponentEvent* OH_ArkUI_NodeEvent_GetNodeComponentEvent(ArkUI_NodeEve
*/
ArkUI_StringAsyncEvent* OH_ArkUI_NodeEvent_GetStringAsyncEvent(ArkUI_NodeEvent* event);
+/**
+ * @brief Obtains the ArkUI_TextChangeEvent data from a component event.
+ *
+ * @param event Pointer to a component event. It cannot be null.
+ * @return Returns the pointer to the ArkUI_TextChangeEvent object.
+ * @since 16
+ */
+ArkUI_TextChangeEvent* OH_ArkUI_NodeEvent_GetTextChangeEvent(ArkUI_NodeEvent* event);
+
/**
* @brief Obtains the custom data in a component event.
*