From abb3ec5d8459b9bb5b2de446f993383222e62723 Mon Sep 17 00:00:00 2001 From: wangxiuxiu96 Date: Tue, 13 May 2025 13:55:30 +0800 Subject: [PATCH] textInput and textArea add CAPI Signed-off-by: wangxiuxiu96 --- arkui/ace_engine/native/native_node.h | 79 +++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 1ae255fea..5d5bf16f7 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -3184,6 +3184,20 @@ typedef enum { * @since 20 */ NODE_TEXT_INPUT_ENABLE_FILL_ANIMATION = 7036, + + /** + * @brief Set the line height of the input node. + * 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: line height value. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}: \n + * .value[0].i32: line height value. \n + * + * @since 20 + */ + NODE_TEXT_INPUT_LINE_HEIGHT = 7037, /** * @brief Defines the default placeholder text for the multi-line text box. @@ -3533,6 +3547,45 @@ typedef enum { */ NODE_TEXT_AREA_KEYBOARD_APPEARANCE = 8026, + /** + * @brief Set the max lines of the node. This attrilbute 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: max lines count. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: max lines count. \n + * + * @since 20 + */ + NODE_TEXT_AREA_MAX_LINES = 8027, + + /** + * @brief Set line spacing of the node. 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: line spacing value. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: line spacing value. \n + * + * @since 20 + */ + NODE_TEXT_AREA_LINE_SPACING = 8028, + + /** + * @brief Set the line height of the node. 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: line height value. \n + * \n + * Format of the return value {@link ArkUI_AttributeItem}: \n + * .value[0].i32: line height value. \n + * + * @since 20 + */ + NODE_TEXT_AREA_LINE_HEIGHT = 8031, + /** * @brief Defines the button text content. This attribute can be set, reset, and obtained as required through APIs. * @@ -7068,6 +7121,19 @@ typedef enum { */ NODE_TEXT_INPUT_ON_CHANGE_WITH_PREVIEW_TEXT = 7013, + /** + * @brief Defines the event triggered before content changes. + * + * 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 20 + */ + NODE_TEXT_INPUT_ON_WILL_CHANGE = 7014, + /** * @brief Defines the event triggered when the input in the text box changes. * @@ -7234,6 +7300,19 @@ typedef enum { */ NODE_TEXT_AREA_ON_CHANGE_WITH_PREVIEW_TEXT = 8012, + /** + * @brief Defines the event triggered before content changes + * + * 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 20 + */ + NODE_TEXT_AREA_ON_WILL_CHANGE = 8013, + /** * @brief Defines the event triggered when the selected status of the ARKUI_NODE_CHECKBOX component changes. * -- Gitee