1e41f4b71Sopenharmony_ci# hiappevent_event.h 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci 4e41f4b71Sopenharmony_ci## 概述 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ci定义所有预定义事件的事件名称。 7e41f4b71Sopenharmony_ci 8e41f4b71Sopenharmony_ci除了与特定应用关联的自定义事件之外,您还可以使用预定义事件进行打点。 9e41f4b71Sopenharmony_ci 10e41f4b71Sopenharmony_ci示例代码: 11e41f4b71Sopenharmony_ci 12e41f4b71Sopenharmony_ci``` 13e41f4b71Sopenharmony_ciParamList list = OH_HiAppEvent_CreateParamList(); 14e41f4b71Sopenharmony_ciOH_HiAppEvent_AddInt32Param(list, PARAM_USER_ID, 123); 15e41f4b71Sopenharmony_ciint res = OH_HiAppEvent_Write("user_domain", EVENT_USER_LOGIN, BEHAVIOR, list); 16e41f4b71Sopenharmony_ciOH_HiAppEvent_DestroyParamList(list); 17e41f4b71Sopenharmony_ci``` 18e41f4b71Sopenharmony_ci 19e41f4b71Sopenharmony_ci**引用文件:** <hiappevent/hiappevent_event.h> 20e41f4b71Sopenharmony_ci 21e41f4b71Sopenharmony_ci**起始版本:** 8 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ci**相关模块:**[HiAppEvent](_hi_app_event.md) 24e41f4b71Sopenharmony_ci 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ci## 汇总 27e41f4b71Sopenharmony_ci 28e41f4b71Sopenharmony_ci 29e41f4b71Sopenharmony_ci### 宏定义 30e41f4b71Sopenharmony_ci 31e41f4b71Sopenharmony_ci| 名称 | 描述 | 32e41f4b71Sopenharmony_ci| -------- | -------- | 33e41f4b71Sopenharmony_ci| [EVENT_USER_LOGIN](_hi_app_event.md#event_user_login) "hiappevent.user_login" | 用户登录事件。 | 34e41f4b71Sopenharmony_ci| [EVENT_USER_LOGOUT](_hi_app_event.md#event_user_logout) "hiappevent.user_logout" | 用户登出事件。 | 35e41f4b71Sopenharmony_ci| [EVENT_DISTRIBUTED_SERVICE_START](_hi_app_event.md#event_distributed_service_start) "hiappevent.distributed_service_start" | 分布式服务事件。 | 36e41f4b71Sopenharmony_ci| [EVENT_APP_CRASH](_hi_app_event.md#event_app_crash) "APP_CRASH" | 应用崩溃事件。 | 37e41f4b71Sopenharmony_ci| [EVENT_APP_FREEZE](_hi_app_event.md#event_app_freeze) "APP_FREEZE" | 应用卡顿事件。 | 38e41f4b71Sopenharmony_ci| [EVENT_APP_LAUNCH](_hi_app_event.md#event_app_launch) "APP_LAUNCH" | 应用加载事件。 | 39e41f4b71Sopenharmony_ci| [EVENT_SCROLL_JANK](_hi_app_event.md#event_scroll_jank) "SCROLL_JANK" | 应用滑动卡顿事件。 | 40e41f4b71Sopenharmony_ci| [EVENT_CPU_USAGE_HIGH](_hi_app_event.md#event_cpu_usage_high) "CPU_USAGE_HIGH" | 应用CPU资源占用高事件。 | 41e41f4b71Sopenharmony_ci| [EVENT_BATTERY_USAGE](_hi_app_event.md#event_battery_usage) "BATTERY_USAGE" | 应用电源使用率事件。 | 42e41f4b71Sopenharmony_ci| [EVENT_RESOURCE_OVERLIMIT](_hi_app_event.md#event_resource_overlimit) "RESOURCE_OVERLIMIT" | 应用资源超限事件。 | 43e41f4b71Sopenharmony_ci| [DOMAIN_OS](_hi_app_event.md#domain_os) "OS" | OS作用域。 | 44