From aedfc191b8a0721fb62123aa7abf187fd6b14a5a Mon Sep 17 00:00:00 2001 From: zhou-chaobo Date: Sat, 13 Sep 2025 14:58:09 +0800 Subject: [PATCH] capi enchancement Signed-off-by: zhou-chaobo --- arkui/ace_engine/native/native_node.h | 82 +++++++++++++++++++++++++++ arkui/ace_engine/native/native_type.h | 30 ++++++++++ 2 files changed, 112 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 6f23e494c7e..9315e5757bc 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -7135,6 +7135,88 @@ typedef enum { * @since 20 */ NODE_EMBEDDED_COMPONENT_OPTION, + + /** + * @brief Defines the monopolize events attribute, 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 parameter type is 1 or 0. + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: The parameter type is 1 or 0. + * + * @since 23 + */ + NODE_MONOPOLIZE_EVENTS, + + /** + * @brief Defines the effect when the component is hovered. 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: Hover effect of the component in hover state. + * The parameter type is {@link ArkUI_Hoverffect}. The default value is ARKUI_HOVER_EFFECT_AUTO.\n + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].i32: Hover effect of the component in hover state. + * The parameter type is {@link ArkUI_Hoverffect}. \n + * + * @since 23 + */ + NODE_HOVER_EFFECT, + + /** + * @brief Set container as a focus group with a specific identifier, supports attribute setting, + * attribute reset, and attribute acquisition interfaces. + * + * Attribute setting method parameter {@link ArkUI_AttributeItem} format:\n + * .string: The focus scope identifier.\n + * .value[0]?.i32:Whether this scope is a focus group, the default value is 0. The parameter type is 1 or 0.\n + * .value[1]?.i32:whether the arrow keys can move focus from inside the focus group to outside, + * only effective when isGroup is true, the default value is 1. The parameter type is 1 or 0.\n + * \n + * Attribute acquisition method return value {@link ArkUI_AttributeItem} format:\n + * .string: The focus scope identifier.\n + * .value[0]?.i32:Whether this scope is a focus group, the default value is 0. The parameter type is 1 or 0.\n + * .value[1]?.i32:whether the arrow keys can move focus from inside the focus group to outside, + * only effective when isGroup is true, the default value is 1. The parameter type is 1 or 0.\n + * + * @since 23 + */ + NODE_FOCUS_SCOPE_ID, + + /** + * @brief Set the focus priority of component in a specific focus scope, supports attribute setting, + * attribute reset, and attribute acquisition interfaces. + * + * Attribute setting method parameter {@link ArkUI_AttributeItem} format:\n + * .string: The focus scope identifier.\n + * .value[0]?.i32:The focus scope priority. The parameter type is {@link ArkUI_FocusPriority}. + * The default value is ARKUI_FOCUS_PRIORITY_AUTO.\n + * \n + * Attribute acquisition method return value {@link ArkUI_AttributeItem} format:\n + * .string: The focus scope identifier.\n + * .value[0]?.i32:The focus scope priority. The parameter type is {@link ArkUI_FocusPriority}.\n + * + * @since 23 + */ + NODE_FOCUS_SCOPE_PRIORITY, + + /** + * @brief Sets the distance threshold for on click events, supports attribute setting, + * attribute reset, and attribute acquisition interfaces. + * + * @note If the finger moves beyond the preset distance limit, on click event recognition fails. + * + * Format of the {@link ArkUI_AttributeItem} parameter for setting the attribute:\n + * .value[0].f32: The distance threshold for on click events. + * \n + * Format of the return value {@link ArkUI_AttributeItem}:\n + * .value[0].f32: The distance threshold for on click events.\n + * + * @since 23 + */ + NODE_ON_CLICK_EVENT_DISTANCE_THRESHOLD, } ArkUI_NodeAttributeType; /** diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 06813a6f04f..50c0299faf9 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -2879,6 +2879,36 @@ typedef enum { ARKUI_LIST_ITEM_SWIPE_ACTION_DIRECTION_END = 1, } ArkUI_ListItemSwipeActionDirection; +/** + * @brief Enumerates the effects when the component is hovered. + * + * @since 23 + */ +typedef enum { + /** Default effect. */ + ARKUI_HOVER_EFFECT_AUTO = 0, + /** Zoom in and out effect. */ + ARKUI_HOVER_EFFECT_SCALE, + /** Highlight effect. */ + ARKUI_HOVER_EFFECT_HIGHLIGHT, + /** None effect. */ + ARKUI_HOVER_EFFECT_NONE, +} ArkUI_HoverEffect; + +/** + * @brief Enumerates the effects when the component is hovered. + * + * @since 23 + */ +typedef enum { + /** Default priority. */ + ARKUI_FOCUS_PRIORITY_AUTO = 0, + /** Prior priority. */ + ARKUI_FOCUS_PRIORITY_PRIOR = 2000, + /** Previous focus priority. */ + ARKUI_FOCUS_PRIORITY_PREVIOUS = 3000, +} ArkUI_FocusPriority; + /** * @brief Defines parameter used by the system font style callback event. * -- Gitee