openharmony 鸿蒙 capi-oh-nativexcomponent-native-xcomponent-oh-nativexcomponent-mouseevent-callback

2026-08-25 浏览 (1)

OH_NativeXComponent_MouseEvent_Callback

typedef struct OH_NativeXComponent_MouseEvent_Callback {...} OH_NativeXComponent_MouseEvent_Callback

Overview

Registers callbacks for the mouse event.

Since: 9

Related module: OH_NativeXComponent Native XComponent

Header file: native_interface_xcomponent.h

Summary

Member Functions

NameDescription
void (*DispatchMouseEvent)(OH_NativeXComponent* component, void* window)Invoked when a mouse event is triggered.
void (*DispatchHoverEvent)(OH_NativeXComponent* component, bool isHover)Invoked when a hover event is triggered.

Member Function Description

DispatchMouseEvent()

void (*DispatchMouseEvent)(OH_NativeXComponent* component, void* window)

Description

Invoked when a mouse event is triggered.

Since: 9

Parameters

NameDescription
OH_NativeXComponent* componentPointer to an OH_NativeXComponent instance.
void* windowHandle to the NativeWindow instance.

DispatchHoverEvent()

void (*DispatchHoverEvent)(OH_NativeXComponent* component, bool isHover)

Description

Invoked when a hover event is triggered.

Since: 9

Parameters

NameDescription
OH_NativeXComponent* componentPointer to an OH_NativeXComponent instance.
bool isHoverWhether the mouse pointer or stylus is hovering over the component. true: The mouse pointer or stylus has entered the component. false: The mouse pointer or stylus has left the component.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 arkts-apis-uicontext-contextmenucontroller

openharmony 鸿蒙 errorcode-canvas

openharmony 鸿蒙 capi-oh-nativexcomponent-native-xcomponent-oh-nativexcomponent

openharmony 鸿蒙 errorcode-bindSheet

openharmony 鸿蒙 js-apis-arkui-uiExtension-sys

openharmony 鸿蒙 capi-arkui-accessibility-arkui-accessibilityeventinfo

openharmony 鸿蒙 capi-arkui-rendernodeutils

openharmony 鸿蒙 js-apis-arkui-node

openharmony 鸿蒙 capi-native-node-h

openharmony 鸿蒙 capi-arkui-nativemodule-arkui-listitemswipeactionitem

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