diff --git a/arkui/ace_engine/native/ui_input_event.h b/arkui/ace_engine/native/ui_input_event.h index 9b5aa63fb4325fb3738daad39944ebdfe1fcc7fa..38e9c184353ad365d9ae99a850d8d465166a6924 100644 --- a/arkui/ace_engine/native/ui_input_event.h +++ b/arkui/ace_engine/native/ui_input_event.h @@ -196,6 +196,24 @@ typedef enum { ARKUI_MODIFIER_KEY_FN = 1 << 3, } ArkUI_ModifierKeyName; +/** + * @brief Define the Action Code for axis events. + * + * @since 16 + */ +enum { + /** None. */ + UI_AXIS_EVENT_ACTION_NONE = 0, + /** Begin. */ + UI_AXIS_EVENT_ACTION_BEGIN = 1, + /** Update. */ + UI_AXIS_EVENT_ACTION_UPDATE = 2, + /** End. */ + UI_AXIS_EVENT_ACTION_END = 3, + /** Cancel. */ + UI_AXIS_EVENT_ACTION_CANCEL = 4, +}; + /** * @brief Obtains the type of this UI input event. * @@ -740,6 +758,15 @@ 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 Get the value of the axis action type for axis events. + * + * @param event Represents a pointer to the current UI input event. + * @return Returns the type of axis action. + * @since 16 + */ +int32_t OH_ArkUI_AxisEvent_GetAxisAction(const ArkUI_UIInputEvent* event); + #ifdef __cplusplus }; #endif