From 64ebc5dd15097b1394f63df13b4a2f1a22a61ff6 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Wed, 27 Nov 2024 15:58:05 +0800 Subject: [PATCH] NODE_ON_AXIS capi add Signed-off-by: zhouchaobo --- arkui/ace_engine/native/native_node.h | 10 ++++++++++ arkui/ace_engine/native/ui_input_event.h | 21 +++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f83f1a181..5b26bf003 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5713,6 +5713,16 @@ typedef enum { * @since 14 */ NODE_ON_KEY_PRE_IME = 22, + /** + * @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 = 24, /** * @brief Triggers onDetectResultUpdate callback diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 9b5aa63fb..ee7249f79 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -740,6 +740,27 @@ int32_t OH_ArkUI_UIInputEvent_GetDeviceId(const ArkUI_UIInputEvent* event); */ int32_t OH_ArkUI_UIInputEvent_GetPressedKeys(const ArkUI_UIInputEvent* event, int32_t* pressedKeyCodes, int32_t length); +/** + * @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