From ead905a88bff82df4a963ce88fe16270983d23f0 Mon Sep 17 00:00:00 2001 From: zhouchaobo Date: Sat, 7 Jun 2025 09:30:48 +0800 Subject: [PATCH] CAPI: add two type HitTestMode Signed-off-by: zhouchaobo --- arkui/ace_engine/native/native_type.h | 15 ++++++++++++++- arkui/ace_engine/native/ui_input_event.h | 15 +++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/arkui/ace_engine/native/native_type.h b/arkui/ace_engine/native/native_type.h index 92126f66d..fe5815938 100644 --- a/arkui/ace_engine/native/native_type.h +++ b/arkui/ace_engine/native/native_type.h @@ -827,7 +827,20 @@ typedef enum { * considered during the hit test. */ ARKUI_HIT_TEST_MODE_TRANSPARENT, /** The node does not respond to the hit test of a touch event. */ - ARKUI_HIT_TEST_MODE_NONE + ARKUI_HIT_TEST_MODE_NONE, + /** + * Blocks all lower priority siblings and parents node from receiving the event. + * + * @since 20 + */ + ARKUI_HIT_TEST_MODE_BLOCK_HIERARCHY, + /** + * Self not respond to the hit test for touch events, + * and all descebdants (children, grandchildren, etc.) not respond to the hit test for touch events too. + * + * @since 20 + */ + ARKUI_HIT_TEST_MODE_BLOCK_DESCENDANTS, } ArkUI_HitTestMode; /** diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index fac4d040d..12eb78d1b 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -149,6 +149,21 @@ typedef enum { * during the hit test. */ HTM_NONE, + + /** + * Blocks all lower priority siblings and parents node from receiving the event. + * + * @since 20 + */ + HTMBLOCK_HIERARCHY, + + /** + * Self not respond to the hit test for touch events, + * and all descebdants (children, grandchildren, etc.) not respond to the hit test for touch events too. + * + * @since 20 + */ + HTMBLOCK_DESCENDANTS, } HitTestMode; /** -- Gitee