目录

ArkUI_ContextCallback

typedef struct {...} ArkUI_ContextCallback

Overview

Defines an event callback type, which is used to define the callback function and its user-defined data. When an API of this type is called to trigger a callback, the callback is invoked and userData is passed as a parameter.

Since: 12

Related module: ArkUI_NativeModule

Header file: native_type.h

Summary

[h2]Member Variables

Name Description
void* userData Pointer to the user-defined data, which is passed as a parameter during callback.

[h2]Member Functions

Name Description
void (*callback)(void* userData) Pointer to the callback executed when an event is triggered. The user-defined data pointed to by userData is passed when the callback is invoked.

Member Function Description

[h2]callback()

void (*callback)(void* userData)

Description

Pointer to the callback executed when an event is triggered. This callback does not return any value. When the callback is triggered, the user-defined data pointed to by userData is passed as a parameter to execute the custom processing logic. The specific triggering time is defined by the API of this type.