鸿蒙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内核、鸿蒙南向开发、鸿蒙项目实战)等技术知识点。帮助大家在学习鸿蒙路上快速成长!

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

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

鸿蒙面经

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

相关推荐
HwJack2023 分钟前
HarmonyOS 开发终结“盲盒式”调试:用 hiAppEvent 的 Watcher 接口拿捏应用行为监控
华为·harmonyos
互联网散修27 分钟前
鸿蒙实战:用 want.param 实现视频播放器跨端迁移续播
华为·音视频·harmonyos·跨端迁移续播
石榴树下的七彩鱼37 分钟前
OCR 识别接口哪个好?2026 年主流 OCR API 对比评测(附免费在线体验)
图像处理·人工智能·后端·计算机视觉·ocr·api·文字识别
特立独行的猫a1 小时前
HarmonyOS / OpenHarmony 平台三方库移植:使用 vcpkg 移植 libzen(ZenLib)和 libmediainfo 实践指南
harmonyos·移植·三方库·libmediainfo·libzen·openharmnoy
枫叶丹41 小时前
【HarmonyOS 6.0】ArkWeb 私有网络访问控制接口详解
开发语言·网络·华为·harmonyos
HwJack201 小时前
告别冷启动“白屏焦虑”:HarmonyOS应用 aboutToAppear 高性能优化全攻略
华为·性能优化·harmonyos
互联网散修1 小时前
鸿蒙实战:分布式数据对象实现本地、网络视频跨端迁移续播
分布式·harmonyos·跨端迁移
CodeSheep1 小时前
同事偷偷给我介绍私活,说1万报酬全给我,结果甲方私下告诉我说,同事在当中白拿了2万,我觉得被耍了,媳妇却让我要知足,说我一点不亏
前端·后端·程序员
前端不太难2 小时前
鸿蒙游戏中的 Service 层应该怎么拆?
游戏·状态模式·harmonyos
枫叶丹42 小时前
【HarmonyOS 6.0】ArkWeb:Web组件销毁模式深度解析
开发语言·前端·华为·harmonyos