From b0357636b6dbd83cfe09510e356ec58b133762c2 Mon Sep 17 00:00:00 2001 From: hct95 Date: Wed, 27 Nov 2024 17:38:48 +0800 Subject: [PATCH] add stylues rotation angle in capi Signed-off-by: hct95 --- arkui/ace_engine/native/ui_input_event.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 9b5aa63fb..56ab37ddc 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -432,6 +432,17 @@ float OH_ArkUI_PointerEvent_GetTiltX(const ArkUI_UIInputEvent* event, uint32_t p */ float OH_ArkUI_PointerEvent_GetTiltY(const ArkUI_UIInputEvent* event, uint32_t pointerIndex); +/** + * @brief Obtains the angle at which the stylus rotates around the Z-axis. + * + * @param event Indicates the pointer to the current UI input event. + * @param rollAngle the angle at which the stylus rotates around the Z-axis. + * @return Returns {@link ARKUI_ERROR_CODE_NO_ERROR} if success. + * Returns {@link ARKUI_ERROR_CODE_PARAM_INVALID} if a parameter exception occurs. + * @since 16 + */ +int32_t OH_ArkUI_PointerEvent_GetRollAngle(const ArkUI_UIInputEvent* event, double* rollAngle); + /** * @brief Obtains the width of the touch area from a directional input event (for example, a touch event). * -- Gitee