鸿蒙OpenHarmony Native API【native_interface_bundle.h与native_interface_xcompo】 头文件

native_interface_bundle.h

Overview

Related Modules:

Native_Bundle

Description:

Declares the Bundle-specific function, including function for obtaining application ID.

Since: 9 Version: 1.0

Summary

Functions

Function Description
[OH_NativeBundle_GetAppIdByBundleName] (const char *bundleName) char * Obtains the application ID based on the given bundle name.

native_interface_xcomponent.h

Overview

Related Modules:

Native XComponent

Description:

Declares APIs for accessing a Native XComponent.

Since: 8 Version: 1.0

Summary

Classes

Classe Name Description
[OH_NativeXComponent_TouchPoint]
[OH_NativeXComponent_TouchEvent]
[OH_NativeXComponent_Callback] Registers the surface lifecycle and touch event callbacks.

Macros

Macro Name and Value Description
OH_NATIVE_XCOMPONENT_OBJ ("NATIVE_XCOMPONENT_OBJ")

Typedefs

Typedef Name Description
[OH_NativeXComponent] typedef struct [OH_NativeXComponent] Provides an encapsulated OH_NativeXComponent instance.
[OH_NativeXComponent_Callback] typedef struct [OH_NativeXComponent_Callback] Registers the surface lifecycle and touch event callbacks.

Enumerations

Enumeration Name Description
{ [OH_NATIVEXCOMPONENT_RESULT_SUCCESS] = 0, [OH_NATIVEXCOMPONENT_RESULT_FAILED] = -1, [OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER] = -2 } Enumerates the API access states.
[OH_NativeXComponent_TouchEventType] { [OH_NATIVEXCOMPONENT_DOWN] = 0, [OH_NATIVEXCOMPONENT_UP], [OH_NATIVEXCOMPONENT_MOVE], [OH_NATIVEXCOMPONENT_CANCEL], [OH_NATIVEXCOMPONENT_UNKNOWN] }

Functions

Function Description
[OH_NativeXComponent_GetXComponentId] ([OH_NativeXComponent] *component, char *id, uint64_t *size) int32_t Obtains the ID of the ArkUI XComponent.
[OH_NativeXComponent_GetXComponentSize] ([OH_NativeXComponent] *component, const void *window, uint64_t *width, uint64_t *height) int32_t Obtains the size of the surface held by the ArkUI XComponent.
[OH_NativeXComponent_GetXComponentOffset] ([OH_NativeXComponent] *component, const void *window, double *x, double *y) int32_t Obtains the offset of the surface held by the ArkUI XComponent.
[OH_NativeXComponent_GetTouchEvent] ([OH_NativeXComponent] *component, const void *window, [OH_NativeXComponent_TouchEvent] *touchEvent) int32_t Obtains the touch event dispatched by the ArkUI XComponent.
[OH_NativeXComponent_RegisterCallback] ([OH_NativeXComponent] *component, [OH_NativeXComponent_Callback] *callback) int32_t Regis
以上就是本篇文章所带来的鸿蒙开发中一小部分技术讲解;想要学习完整的鸿蒙全栈技术。可以在结尾找我可全部拿到!
下面是鸿蒙的完整学习路线,展示如下:

除此之外,根据这个学习鸿蒙全栈学习路线,也附带一整套完整的学习【文档+视频】,内容包含如下

内容包含了:(ArkTS、ArkUI、Stage模型、多端部署、分布式应用开发、音频、视频、WebGL、OpenHarmony多媒体技术、Napi组件、OpenHarmony内核、鸿蒙南向开发、鸿蒙项目实战)等技术知识点。帮助大家在学习鸿蒙路上快速成长!

鸿蒙【北向应用开发+南向系统层开发】文档笔记

鸿蒙【基础+实战项目】视频

鸿蒙面经

为了避免大家在学习过程中产生更多的时间成本,对比我把以上内容全部放在了↓↓↓想要的可以自取喔!谢谢大家观看!

相关推荐
加农炮手Jinx9 小时前
Flutter 组件 ubuntu_service 适配鸿蒙 HarmonyOS 实战:底层系统服务治理,构建鸿蒙 Linux 子系统与守护进程交互架构
flutter·harmonyos·鸿蒙·openharmony·ubuntu_service
里欧跑得慢9 小时前
Flutter 三方库 mobx_codegen — 自动化驱动的高性能响应式状态管理(适配鸿蒙 HarmonyOS Next ohos)
flutter·自动化·harmonyos
王码码20359 小时前
Flutter 三方库 login_client 的鸿蒙化适配指南 - 打造工业级安全登录、OAuth2 自动化鉴权、鸿蒙级身份守门员
flutter·harmonyos·鸿蒙·openharmony·login_client
星辰徐哥9 小时前
鸿蒙金融理财全栈项目——上线与运维、用户反馈、持续迭代
运维·金融·harmonyos
加农炮手Jinx9 小时前
Flutter 三方库 cloudflare 鸿蒙云边协同分发流适配精讲:直连全球高速存储网关阵列无缝吞吐海量动静态画像资源,构筑大吞吐业务级网络负载安全分流-适配鸿蒙 HarmonyOS ohos
网络·flutter·harmonyos
Jumdata11 小时前
短网址生成-短链接生成-ShortUrl生成-ShortLink生产接口API-永久短网址
api·短网址
阳火锅13 小时前
34岁前端倒计时:老板用AI手搓系统那天,我知道我的“体面退休”是个笑话
前端·后端·程序员
码路飞13 小时前
GPT-5.4 mini 和 nano 昨天刚发,我连夜测了一下,说说真实感受
gpt·openai·api
大雷神14 小时前
HarmonyOS APP<玩转React>开源教程十一:组件化开发概述
前端·react.js·harmonyos
国医中兴17 小时前
Flutter 三方库 dson 的鸿蒙化适配指南 - 极简的序列化魔法、在鸿蒙端实现反射式 JSON 映射实战
flutter·harmonyos·鸿蒙·openharmony