external_window.h


external_window.h

Overview

Related Modules:

NativeWindow

Description:

定义获取和使用NativeWindow的相关函数

Since: 8 Version: 1.0

Summary

Functions

Function Description
OH_NativeWindow_CreateNativeWindowFromSurface (void *pSurface) struct NativeWindow *
创建NativeWindow实例,每次调用都会产生一个新的NativeWindow实例
OH_NativeWindow_DestroyNativeWindow (struct NativeWindow *window) void
将NativeWindow对象的引用计数减1,当引用计数为0的时候,该NativeWindow对象会被析构掉
OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer (void *pSurfaceBuffer) struct NativeWindowBuffer *
创建NativeWindowBuffer实例,每次调用都会产生一个新的NativeWindowBuffer实例
OH_NativeWindow_DestroyNativeWindowBuffer (struct NativeWindowBuffer *buffer) void
将NativeWindowBuffer对象的引用计数减1,当引用计数为0的时候,该NativeWindowBuffer对象会被析构掉
OH_NativeWindow_NativeWindowRequestBuffer (struct NativeWindow *window, struct NativeWindowBuffer **buffer, int *fenceFd) int32_t
通过NativeWindow对象申请一块NativeWindowBuffer,用以内容生产
OH_NativeWindow_NativeWindowFlushBuffer (struct NativeWindow *window, struct NativeWindowBuffer *buffer, int fenceFd, Region region) int32_t
通过NativeWindow将生产好内容的NativeWindowBuffer放回到Buffer队列中,用以内容消费
OH_NativeWindow_NativeWindowCancelBuffer (struct NativeWindow *window, struct NativeWindowBuffer *buffer) int32_t
通过NativeWindow将之前申请出来的NativeWindowBuffer返还到Buffer队列中,供下次再申请
OH_NativeWindow_NativeWindowHandleOpt (struct NativeWindow *window, int code,...) int32_t
设置/获取NativeWindow的属性,包括设置/获取宽高、内容格式等
OH_NativeWindow_GetBufferHandleFromNative (struct NativeWindowBuffer *buffer) BufferHandle *
通过NativeWindowBuffer获取该buffer的BufferHandle指针
OH_NativeWindow_NativeObjectReference (void *obj) int32_t
增加一个NativeObject的引用计数
OH_NativeWindow_NativeObjectUnreference (void *obj) int32_t
减少一个NativeObject的引用计数,当引用计数减少为0时,该NativeObject将被析构掉
OH_NativeWindow_GetNativeObjectMagic (void *obj) int32_t
获取NativeObject的MagicId