From 47026a158adb9ae40c90e8410a3c4c0eb03e3f9f Mon Sep 17 00:00:00 2001 From: wangweiyuan Date: Wed, 22 Jan 2025 20:33:14 +0800 Subject: [PATCH] add axis event interface --- arkui/ace_engine/native/native_node.h | 11 +++++++++++ arkui/ace_engine/native/ui_input_event.h | 22 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index 1b751b6d0..1570fad62 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -6471,6 +6471,17 @@ typedef enum { */ NODE_DISPATCH_KEY_EVENT = 24, + /** + * @brief Defines the event triggered when the bound component receives an axis event. + * + * The event callback is triggered when the bound component receives an axis event. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_UIInputEvent}. \n + * + * @since 16 + */ + NODE_ON_AXIS = 25, + /** * @brief Triggers onDetectResultUpdate callback * when the text is set to TextDataDetectorConfig and recognized successfully. diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 1cc31e0f2..ab9c0a095 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -887,6 +887,28 @@ int32_t OH_ArkUI_MouseEvent_GetPressedButtons( */ int32_t OH_ArkUI_UIInputEvent_GetTargetDisplayId(const ArkUI_UIInputEvent* event); +/** + * @brief Sets whether to active event bubbling. + * + * @param event Indicates the pointer to the current UI input event. + * @param propagation Indicates whether the event is activated from bubbling. + * @return Returns the status code of the execution. + * Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if the operation is successful. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if the event parameter is abnormal, such as a null pointer. + * @since 16 + */ +int32_t OH_ArkUI_AxisEvent_SetPropagation(const ArkUI_UIInputEvent* event, bool propagation); + +/** + * @brief Obtains the mouse wheel axis scroll step configuration. + * + * @param event Pointer to an ArkUI_UIInputEvent object. + * @return Returns the mouse wheel axis scroll step configuration. + * @since 16 + */ +int32_t OH_ArkUI_AxisEvent_GetScrollStep(const ArkUI_UIInputEvent* event); + + #ifdef __cplusplus }; #endif -- Gitee