harmony 鸿蒙Input_InterceptorEventCallback

2025-06-12 浏览 (1)

Input_InterceptorEventCallback

Overview

Defines the structure of the interceptor for callback events, including mouse events, touch events, and axis events.

Since: 12

Related module: input

Header file: oh_input_manager.h

Summary

Member Variables

NameDescription
Input_MouseEventCallback mouseCallbackCallback for mouse events.
Since: 12
Input_TouchEventCallback touchCallbackCallback for touch events.
Since: 12
Input_AxisEventCallback axisCallbackCallback for axis events.
Since: 12

Member Functions

Nametypedef KeywordDescription
typedef void (*Input_KeyEventCallback)(const Input_KeyEvent* keyEvent)Input_KeyEventCallback()Defines a lifecycle callback for keyEvent. If the callback is triggered, keyEvent will be destroyed.
Since: 12
typedef void (*Input_MouseEventCallback)(const Input_MouseEvent* mouseEvent)Input_MouseEventCallback()Defines a lifecycle callback for mouseEvent. If the callback is triggered, mouseEvent will be destroyed.
Since: 12
typedef void (*Input_TouchEventCallback)(const Input_TouchEvent* touchEvent)Input_TouchEventCallback()Defines a lifecycle callback for touchEvent. If the callback is triggered, touchEvent will be destroyed.
Since: 12
typedef void (*Input_AxisEventCallback)(const Input_AxisEvent* axisEvent)Input_AxisEventCallback()Defines a lifecycle callback for axisEvent. If the callback is triggered, axisEvent will be destroyed.
Since: 12
typedef void (*Input_DeviceAddedCallback)(int32_t deviceId)Input_DeviceAddedCallback()Defines a callback used to receive device insertion events.
Since: 13
typedef void (*Input_DeviceRemovedCallback)(int32_t deviceId)Input_DeviceRemovedCallback()Defines a callback used to receive device removal events.
Since: 13

Member Function Description

Input_KeyEventCallback()

typedef void (*Input_KeyEventCallback)(const Input_KeyEvent* keyEvent)

Description

Defines a lifecycle callback for keyEvent. If the callback is triggered, keyEvent will be destroyed.

Since: 12

Parameters

ParameterDescription
const Input_KeyEvent* keyEventKey event object.

Input_MouseEventCallback()

typedef void (*Input_MouseEventCallback)(const Input_MouseEvent* mouseEvent)

Description

Defines a lifecycle callback for mouseEvent. If the callback is triggered, mouseEvent will be destroyed.

Since: 12

Parameters

ParameterDescription
const Input_MouseEvent* mouseEventMouse event object.

Input_TouchEventCallback()

typedef void (*Input_TouchEventCallback)(const Input_TouchEvent* touchEvent)

Description

Defines a lifecycle callback for touchEvent. If the callback is triggered, touchEvent will be destroyed.

Since: 12

Parameters

ParameterDescription
const Input_TouchEvent* touchEventTouch event object.

Input_AxisEventCallback()

typedef void (*Input_AxisEventCallback)(const Input_AxisEvent* axisEvent)

Description

Defines a lifecycle callback for axisEvent. If the callback is triggered, axisEvent will be destroyed.

Since: 12

Parameters

ParameterDescription
const Input_AxisEvent* axisEventAxis event object.

Input_DeviceAddedCallback()

typedef void (*Input_DeviceAddedCallback)(int32_t deviceId)

Description

Defines a callback used to receive device insertion events.

Since: 13

Parameters

ParameterDescription
int32_t deviceIdDevice ID.

Input_DeviceRemovedCallback()

typedef void (*Input_DeviceRemovedCallback)(int32_t deviceId)

Description

Defines a callback used to receive device removal events.

Since: 13

Parameters

ParameterDescription
int32_t deviceIdDevice ID.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Input Kit

harmony 鸿蒙Input_DeviceListener

harmony 鸿蒙Input_InterceptorEventCallback

harmony 鸿蒙Input_AxisEvent

harmony 鸿蒙Input_DeviceInfo

harmony 鸿蒙Input_DeviceListener

harmony 鸿蒙Input_Hotkey

harmony 鸿蒙Input_InterceptorOptions

harmony 鸿蒙Input_KeyEvent

harmony 鸿蒙Input_KeyState

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/KrnQJ1