From 0e014709ad152480552bbd52069c548aee524a87 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Sat, 22 Mar 2025 15:58:24 +0800 Subject: [PATCH] axis cpai Signed-off-by: zhouchaobo --- arkui/ace_engine/native/libace.ndk.json | 8 ++++++++ arkui/ace_engine/native/native_node.h | 10 ++++++++++ arkui/ace_engine/native/ui_input_event.h | 21 +++++++++++++++++++++ 3 files changed, 39 insertions(+) diff --git a/arkui/ace_engine/native/libace.ndk.json b/arkui/ace_engine/native/libace.ndk.json index 34e04ae3c..a25ae8df8 100644 --- a/arkui/ace_engine/native/libace.ndk.json +++ b/arkui/ace_engine/native/libace.ndk.json @@ -2733,5 +2733,13 @@ { "first_introduced": "15", "name": "OH_ArkUI_NodeUtils_GetPositionToParent" + }, + { + "first_introduced": "17", + "name": "OH_ArkUI_AxisEvent_SetPropagation" + }, + { + "first_introduced": "17", + "name": "OH_ArkUI_AxisEvent_GetScrollStep" } ] \ 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 fe0c86240..98a9711e7 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -6161,6 +6161,16 @@ typedef enum { */ NODE_DISPATCH_KEY_EVENT = 24, + /** + * @brief Defines the event triggered when the bound component receives an axis event. + * + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_UIInputEvent}. \n + * + * @since 17 + */ + NODE_ON_AXIS = 25, + /** * @brief Defines the hover event. * diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 608841059..78de1c509 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -1046,6 +1046,27 @@ int32_t OH_ArkUI_PointerEvent_SetClonedEventFingerIdByIndex( */ int32_t OH_ArkUI_PointerEvent_PostClonedEvent(ArkUI_NodeHandle node, const ArkUI_UIInputEvent* event); +/** + * @brief Sets whether to enable axis event propagation. + * + * @param event Pointer to the UI input event. + * @param propagation Whether to enable event propagation. + * @return Returns the result code. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter error occurs. + * @since 17 + */ +int32_t OH_ArkUI_AxisEvent_SetPropagation(const ArkUI_UIInputEvent* event, bool propagation); + +/** + * @brief Obtains the scroll step configuration of the mouse wheel axis event. + * + * @param event Pointer to the UI input event. + * @return Returns the scroll step configuration of the mouse wheel axis event. + * @since 17 + */ +int32_t OH_ArkUI_AxisEvent_GetScrollStep(const ArkUI_UIInputEvent* event); + #ifdef __cplusplus }; #endif -- Gitee