From fed20b87b5202c4acbe9adedfd64d8fd3dfb4513 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Tue, 26 Nov 2024 16:20:14 +0800 Subject: [PATCH] NODE_ON_CLICK_EVENT interface add Signed-off-by: zhouchaobo --- arkui/ace_engine/native/native_node.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arkui/ace_engine/native/native_node.h b/arkui/ace_engine/native/native_node.h index f83f1a181..d87b55c53 100644 --- a/arkui/ace_engine/native/native_node.h +++ b/arkui/ace_engine/native/native_node.h @@ -5713,6 +5713,33 @@ typedef enum { * @since 14 */ NODE_ON_KEY_PRE_IME = 22, + /** + * @brief Defines the click event. + * + * This event is triggered when the component is clicked. \n + * When the event callback occurs, the union type in the {@link ArkUI_NodeEvent} object is + * {@link ArkUI_NodeComponentEvent}. \n + * {@link ArkUI_NodeComponentEvent} contains 12 parameters:\n + * ArkUI_NodeComponentEvent.data[0].f32: X coordinate of the click relative to the upper left corner of the + * clicked component's original area, in vp. \n + * ArkUI_NodeComponentEvent.data[1].f32: Y coordinate of the click relative to the upper left corner of the + * clicked component's original area, in vp. \n + * ArkUI_NodeComponentEvent.data[2].f32: event timestamp. It is the interval between the time when the event + * is triggered and the time when the system starts, in microseconds. \n + * ArkUI_NodeComponentEvent.data[3].i32: event input device. The value 1 indicates the mouse, + * 2 indicates the touchscreen, and 4 indicates the key. \n + * ArkUI_NodeComponentEvent.data[4].f32: X coordinate of the click relative to the upper left corner of the + * application window, in vp. \n + * ArkUI_NodeComponentEvent.data[5].f32: Y coordinate of the click relative to the upper left corner of the + * application window, in vp. \n + * ArkUI_NodeComponentEvent.data[6].f32: X coordinate of the click relative to the upper left corner of the + * application screen, in vp. \n + * ArkUI_NodeComponentEvent.data[7].f32: Y coordinate of the click relative to the upper left corner of the + * application screen, in vp. \n + * + * @since 16 + */ + NODE_ON_CLICK_EVENT = 25, /** * @brief Triggers onDetectResultUpdate callback -- Gitee