diff --git a/zh-cn/application-dev/reference/native-apis/_native_vsync.md b/zh-cn/application-dev/reference/native-apis/_native_vsync.md
index d6ac9d7952b94df30da0c0337afa03240f9f40db..0487dbc7c286827dd833fb9798d592dc5ee84718 100644
--- a/zh-cn/application-dev/reference/native-apis/_native_vsync.md
+++ b/zh-cn/application-dev/reference/native-apis/_native_vsync.md
@@ -1,38 +1,78 @@
# NativeVsync
+## 概述
+
提供NativeVsync功能。
+\@syscap SystemCapability.Graphic.Graphic2D.NativeVsync
-@syscap SystemCapability.Graphic.Graphic2D.NativeVsync
+**起始版本:**
+9
-**起始版本:**
+## 汇总
-8
+### 文件
-## 汇总
+| 名称 | 描述 |
+| -------- | -------- |
+| [native_vsync.h](native__vsync_8h.md) | 定义获取和使用NativeVsync的相关函数
引用文件:<native_vsync/native_vsync.h> |
-### 文件
+### 类型定义
-| 文件名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| [native_vsync.h](native__vsync_8h.md) | 定义获取和使用NativeVsync的相关函数
引用文件: |
+| [OH_NativeVSync](#oh_nativevsync) | 提供OH_NativeVSync结构体声明 |
+| (\*[OH_NativeVSync_FrameCallback](#oh_nativevsync_framecallback)) (long long timestamp, void \*data) | VSync回调函数类型 |
### 函数
-| 函数名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
| [OH_NativeVSync_Create](#oh_nativevsync_create) (const char \*name, unsigned int length) | 创建一个OH_NativeVSync实例,每次调用都会产生一个新的实例 |
-| [OH_NativeVSync_Destroy](#oh_nativevsync_destroy) (OH_NativeVSync \*nativeVsync) | 销毁OH_NativeVSync实例 |
-| [OH_NativeVSync_RequestFrame](#oh_nativevsync_requestframe) (OH_NativeVSync \*nativeVsync, OH_NativeVSync_FrameCallback callback, void \*data) | 请求下一次vsync信号,当信号到来时,调用回调函数callback |
+| [OH_NativeVSync_Destroy](#oh_nativevsync_destroy) ([OH_NativeVSync](#oh_nativevsync) \*nativeVsync) | 销毁OH_NativeVSync实例 |
+| [OH_NativeVSync_RequestFrame](#oh_nativevsync_requestframe) ([OH_NativeVSync](#oh_nativevsync) \*nativeVsync, [OH_NativeVSync_FrameCallback](#oh_nativevsync_framecallback) callback, void \*data) | 请求下一次vsync信号,当信号到来时,调用回调函数callback |
+
+
+## 类型定义说明
+
+
+### OH_NativeVSync
+
+
+```
+typedef struct OH_NativeVSync OH_NativeVSync
+```
+
+**描述:**
+
+提供OH_NativeVSync结构体声明
-## 详细描述
+### OH_NativeVSync_FrameCallback
+
+
+```
+typedef void(* OH_NativeVSync_FrameCallback) (long long timestamp, void *data)
+```
+
+**描述:**
+
+VSync回调函数类型
+
+\@syscap SystemCapability.Graphic.Graphic2D.NativeVsync
+
+**参数:**
+
+| 名称 | 描述 |
+| -------- | -------- |
+| timestamp | VSync时间戳 |
+| data | 用户自定义数据 |
## 函数说明
@@ -45,27 +85,23 @@
OH_NativeVSync* OH_NativeVSync_Create (const char * name, unsigned int length )
```
-**描述:**
+**描述:**
创建一个OH_NativeVSync实例,每次调用都会产生一个新的实例
-@syscap SystemCapability.Graphic.Graphic2D.NativeVsync
+\@syscap SystemCapability.Graphic.Graphic2D.NativeVsync
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| name | 参数表示一个vsync连接的名字 |
-| length | 参数是name的长度 |
+| name | 表示一个名字,与创建的OH_NativeVSync实例关联 |
+| length | name的长度 |
-**返回:**
+**返回:**
返回一个指向OH_NativeVSync实例的指针
-**起始版本:**
-
-8
-
### OH_NativeVSync_Destroy()
@@ -74,21 +110,17 @@ OH_NativeVSync* OH_NativeVSync_Create (const char * name, unsigned int length )
void OH_NativeVSync_Destroy (OH_NativeVSync * nativeVsync)
```
-**描述:**
+**描述:**
销毁OH_NativeVSync实例
-@syscap SystemCapability.Graphic.Graphic2D.NativeVsync
+\@syscap SystemCapability.Graphic.Graphic2D.NativeVsync
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| nativeVsync | 参数是一个指向OH_NativeVSync实例的指针 |
-
-**起始版本:**
-
-8
+| nativeVsync | 一个指向OH_NativeVSync实例的指针 |
### OH_NativeVSync_RequestFrame()
@@ -98,24 +130,20 @@ void OH_NativeVSync_Destroy (OH_NativeVSync * nativeVsync)
int OH_NativeVSync_RequestFrame (OH_NativeVSync * nativeVsync, OH_NativeVSync_FrameCallback callback, void * data )
```
-**描述:**
+**描述:**
请求下一次vsync信号,当信号到来时,调用回调函数callback
-@syscap SystemCapability.Graphic.Graphic2D.NativeVsync
+\@syscap SystemCapability.Graphic.Graphic2D.NativeVsync
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| nativeVsync | 参数是一个指向OH_NativeVSync实例的指针 |
-| callback | 参数是一个OH_NativeVSync_FrameCallback类型的函数指针,当下一次vsync信号到来时会被调用 |
-| data | 参数是一个指向用户自定义数据结构的指针,类型是void\* |
-
-**返回:**
-
-返回一个由GSError定义的int32_t类型的错误码
+| nativeVsync | 一个指向OH_NativeVSync实例的指针 |
+| callback | 一个OH_NativeVSync_FrameCallback类型的函数指针,当下一次vsync信号到来时会被调用 |
+| data | 一个指向用户自定义数据结构的指针,类型是void\* |
-**起始版本:**
+**返回:**
-8
+返回值为0表示执行成功
diff --git a/zh-cn/application-dev/reference/native-apis/_native_window.md b/zh-cn/application-dev/reference/native-apis/_native_window.md
index 8685a6ae1dab9e0d6fe96069afa24edb84f1f3c6..75822166dc8b2fb46e6f241b6f946d4d29363343 100644
--- a/zh-cn/application-dev/reference/native-apis/_native_window.md
+++ b/zh-cn/application-dev/reference/native-apis/_native_window.md
@@ -1,14 +1,13 @@
# NativeWindow
-提供NativeWindow功能,主要用来和egl对接。
+## 概述
+提供NativeWindow功能,作为数据生产者,可用来和egl对接
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-
-**起始版本:**
-
+**起始版本:**
8
@@ -18,61 +17,97 @@
### 文件
- | 文件名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| [external_window.h](external__window_8h.md) | 定义获取和使用NativeWindow的相关函数
引用文件: |
+| [external_window.h](external__window_8h.md) | 定义获取和使用NativeWindow的相关函数
引用文件:<native_window/external_window.h> |
### 结构体
- | 结构体名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| [Region](_region.md) | 表示本地窗口NativeWindow需要更新内容的矩形区域(脏区) |
-| [OHHDRMetaData(deprecated)](_o_h_h_d_r_meta_data.md) | HDR元数据结构体定义,从API9开始废弃,预计API14删除 |
-| [OHExtDataHandle(deprecated)](_o_h_ext_data_handle.md) | 扩展数据句柄结构体定义,从API9开始废弃,预计API14删除 |
+| [Region](_region.md) | 表示本地窗口OHNativeWindow需要更新内容的矩形区域(脏区) |
+| [OHHDRMetaData](_o_h_h_d_r_meta_data.md) | HDR元数据结构体定义 |
+| [OHExtDataHandle](_o_h_ext_data_handle.md) | 扩展数据句柄结构体定义 |
### 类型定义
- | 类型定义名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| OHNativeWindow | 提供对NativeWindow的访问功能 |
-| OHNativeWindowBuffer | 提供对NativeWindow的访问功能 |
-| Region | 表示本地窗口NativeWindow需要更新内容的矩形区域(脏区) |
+| [OHNativeWindow](#ohnativewindow) | 提供对OHNativeWindow的访问功能 |
+| [OHNativeWindowBuffer](#ohnativewindowbuffer) | 提供对OHNativeWindowBuffer的访问功能 |
+| [Region](#region) | 表示本地窗口OHNativeWindow需要更新内容的矩形区域(脏区) |
### 枚举
- | 枚举名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| [NativeWindowOperation](#nativewindowoperation) { SET_BUFFER_GEOMETRY, GET_BUFFER_GEOMETRY, GET_FORMAT, SET_FORMAT, GET_USAGE, SET_USAGE, SET_STRIDE, GET_STRIDE, SET_SWAP_INTERVAL, GET_SWAP_INTERVAL, SET_TIMEOUT, GET_TIMEOUT, SET_COLOR_GAMUT, GET_COLOR_GAMUT, SET_TRANSFORM, GET_TRANSFORM, SET_UI_TIMESTAMP } | OH_NativeWindow_NativeWindowHandleOpt函数中的操作码 |
-| [OHScalingMode(deprecated)](#ohscalingmode) { OH_SCALING_MODE_FREEZE = 0, OH_SCALING_MODE_SCALE_TO_WINDOW, OH_SCALING_MODE_SCALE_CROP, OH_SCALING_MODE_NO_SCALE_CROP } | 缩放模式 Scaling Mode,从API9开始废弃,预计API14删除 |
-| [OHHDRMetadataKey(deprecated)](#ohhdrmetadatakey) { OH_METAKEY_RED_PRIMARY_X = 0, OH_METAKEY_RED_PRIMARY_Y = 1, OH_METAKEY_GREEN_PRIMARY_X = 2, OH_METAKEY_GREEN_PRIMARY_Y = 3, OH_METAKEY_BLUE_PRIMARY_X = 4, OH_METAKEY_BLUE_PRIMARY_Y = 5, OH_METAKEY_WHITE_PRIMARY_X = 6, OH_METAKEY_WHITE_PRIMARY_Y = 7, OH_METAKEY_MAX_LUMINANCE = 8, OH_METAKEY_MIN_LUMINANCE = 9, OH_METAKEY_MAX_CONTENT_LIGHT_LEVEL = 10, OH_METAKEY_MAX_FRAME_AVERAGE_LIGHT_LEVEL = 11, OH_METAKEY_HDR10_PLUS = 12, OH_METAKEY_HDR_VIVID = 13 } | 枚举HDR元数据关键字,从API9开始废弃,预计API14删除 |
+| [NativeWindowOperation](#nativewindowoperation) {
SET_BUFFER_GEOMETRY, GET_BUFFER_GEOMETRY, GET_FORMAT, SET_FORMAT,
GET_USAGE, SET_USAGE, SET_STRIDE, GET_STRIDE,
SET_SWAP_INTERVAL, GET_SWAP_INTERVAL, SET_TIMEOUT, GET_TIMEOUT,
SET_COLOR_GAMUT, GET_COLOR_GAMUT, SET_TRANSFORM, GET_TRANSFORM,
SET_UI_TIMESTAMP
} | OH_NativeWindow_NativeWindowHandleOpt函数中的操作码 |
+| [OHScalingMode](#ohscalingmode) { OH_SCALING_MODE_FREEZE = 0, OH_SCALING_MODE_SCALE_TO_WINDOW, OH_SCALING_MODE_SCALE_CROP, OH_SCALING_MODE_NO_SCALE_CROP } | 缩放模式 Scaling Mode |
+| [OHHDRMetadataKey](#ohhdrmetadatakey) {
OH_METAKEY_RED_PRIMARY_X = 0, OH_METAKEY_RED_PRIMARY_Y = 1, OH_METAKEY_GREEN_PRIMARY_X = 2, OH_METAKEY_GREEN_PRIMARY_Y = 3,
OH_METAKEY_BLUE_PRIMARY_X = 4, OH_METAKEY_BLUE_PRIMARY_Y = 5, OH_METAKEY_WHITE_PRIMARY_X = 6, OH_METAKEY_WHITE_PRIMARY_Y = 7,
OH_METAKEY_MAX_LUMINANCE = 8, OH_METAKEY_MIN_LUMINANCE = 9, OH_METAKEY_MAX_CONTENT_LIGHT_LEVEL = 10, OH_METAKEY_MAX_FRAME_AVERAGE_LIGHT_LEVEL = 11,
OH_METAKEY_HDR10_PLUS = 12, OH_METAKEY_HDR_VIVID = 13
} | 枚举HDR元数据关键字 |
### 函数
-| 函数名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| [OH_NativeWindow_CreateNativeWindow](#oh_nativewindow_createnativewindow) (void \*pSurface) | 创建NativeWindow实例,每次调用都会产生一个新的NativeWindow实例 |
-| [OH_NativeWindow_DestroyNativeWindow](#oh_nativewindow_destroynativewindow) (OHNativeWindow \*window) | 将NativeWindow对象的引用计数减1,当引用计数为0的时候,该NativeWindow对象会被析构掉 |
-| [OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer](#oh_nativewindow_createnativewindowbufferfromsurfacebuffer) (void \*pSurfaceBuffer) | 创建NativeWindowBuffer实例,每次调用都会产生一个新的NativeWindowBuffer实例 |
-| [OH_NativeWindow_DestroyNativeWindowBuffer](#oh_nativewindow_destroynativewindowbuffer) (OHNativeWindowBuffer \*buffer) | 将NativeWindowBuffer对象的引用计数减1,当引用计数为0的时候,该NativeWindowBuffer对象会被析构掉 |
-| [OH_NativeWindow_NativeWindowRequestBuffer](#oh_nativewindow_nativewindowrequestbuffer) (OHNativeWindow \*window, OHNativeWindowBuffer \*\*buffer, int \*fenceFd) | 通过NativeWindow对象申请一块NativeWindowBuffer,用以内容生产 |
-| [OH_NativeWindow_NativeWindowFlushBuffer](#oh_nativewindow_nativewindowflushbuffer) (OHNativeWindow \*window, OHNativeWindowBuffer \*buffer, int fenceFd, [Region](_region.md) region) | 通过NativeWindow将生产好内容的NativeWindowBuffer放回到Buffer队列中,用以内容消费 |
-| [OH_NativeWindow_NativeWindowAbortBuffer](#oh_nativewindow_nativewindowabortbuffer) (OHNativeWindow \*window, OHNativeWindowBuffer \*buffer) | 通过NativeWindow将之前申请出来的NativeWindowBuffer返还到Buffer队列中,供下次再申请 |
-| [OH_NativeWindow_NativeWindowHandleOpt](#oh_nativewindow_nativewindowhandleopt) (OHNativeWindow \*window, int code,...) | 设置/获取NativeWindow的属性,包括设置/获取宽高、内容格式等 |
-| [OH_NativeWindow_GetBufferHandleFromNative](#oh_nativewindow_getbufferhandlefromnative) (OHNativeWindowBuffer \*buffer) | 通过NativeWindowBuffer获取该buffer的BufferHandle指针 |
-| [OH_NativeWindow_NativeObjectReference](#oh_nativewindow_nativeobjectreference) (void \*obj) | 增加一个NativeObject的引用计数 |
-| [OH_NativeWindow_NativeObjectUnreference](#oh_nativewindow_nativeobjectunreference) (void \*obj) | 减少一个NativeObject的引用计数,当引用计数减少为0时,该NativeObject将被析构掉 |
-| [OH_NativeWindow_GetNativeObjectMagic](#oh_nativewindow_getnativeobjectmagic) (void \*obj) | 获取NativeObject的MagicId |
-| [OH_NativeWindow_NativeWindowSetScalingMode(deprecated)](#oh_nativewindow_nativewindowsetscalingmode) (OHNativeWindow \*window, uint32_t sequence, [OHScalingMode](#ohscalingmode) scalingMode) | 设置NativeWindow的ScalingMode,从API9开始废弃,预计API14删除 |
-| [OH_NativeWindow_NativeWindowSetMetaData(deprecated)](#oh_nativewindow_nativewindowsetmetadata) (OHNativeWindow \*window, uint32_t sequence, int32_t size, const [OHHDRMetaData](_o_h_h_d_r_meta_data.md) \*metaData) | 设置NativeWindow的元数据,从API9开始废弃,预计API14删除 |
-| [OH_NativeWindow_NativeWindowSetMetaDataSet(deprecated)](#oh_nativewindow_nativewindowsetmetadataset) (OHNativeWindow \*window, uint32_t sequence, [OHHDRMetadataKey](#ohhdrmetadatakey) key, int32_t size, const uint8_t \*metaData) | 设置NativeWindow的元数据集,从API9开始废弃,预计API14删除 |
-| [OH_NativeWindow_NativeWindowSetTunnelHandle(deprecated)](#oh_nativewindow_nativewindowsettunnelhandle) (OHNativeWindow \*window, const [OHExtDataHandle](_o_h_ext_data_handle.md) \*handle) | 设置NativeWindow的TunnelHandle,从API9开始废弃,预计API14删除 |
-
-
-## 详细描述
+| [OH_NativeWindow_CreateNativeWindow](#oh_nativewindow_createnativewindow) (void \*pSurface) | 创建OHNativeWindow实例,每次调用都会产生一个新的OHNativeWindow实例 |
+| [OH_NativeWindow_DestroyNativeWindow](#oh_nativewindow_destroynativewindow) (OHNativeWindow \*window) | 将OHNativeWindow对象的引用计数减1,当引用计数为0的时候,该OHNativeWindow对象会被析构掉 |
+| [OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer](#oh_nativewindow_createnativewindowbufferfromsurfacebuffer) (void \*pSurfaceBuffer) | 创建OHNativeWindowBuffer实例,每次调用都会产生一个新的OHNativeWindowBuffer实例 |
+| [OH_NativeWindow_DestroyNativeWindowBuffer](#oh_nativewindow_destroynativewindowbuffer) (OHNativeWindowBuffer \*buffer) | 将OHNativeWindowBuffer对象的引用计数减1,当引用计数为0的时候,该OHNativeWindowBuffer对象会被析构掉 |
+| [OH_NativeWindow_NativeWindowRequestBuffer](#oh_nativewindow_nativewindowrequestbuffer) (OHNativeWindow \*window, OHNativeWindowBuffer \*\*buffer, int \*fenceFd) | 通过OHNativeWindow对象申请一块OHNativeWindowBuffer,用以内容生产 |
+| [OH_NativeWindow_NativeWindowFlushBuffer](#oh_nativewindow_nativewindowflushbuffer) (OHNativeWindow \*window, OHNativeWindowBuffer \*buffer, int fenceFd, Region region) | 通过OHNativeWindow将生产好内容的OHNativeWindowBuffer放回到Buffer队列中,用以内容消费 |
+| [OH_NativeWindow_NativeWindowAbortBuffer](#oh_nativewindow_nativewindowabortbuffer) (OHNativeWindow \*window, OHNativeWindowBuffer \*buffer) | 通过OHNativeWindow将之前申请出来的OHNativeWindowBuffer返还到Buffer队列中,供下次再申请 |
+| [OH_NativeWindow_NativeWindowHandleOpt](#oh_nativewindow_nativewindowhandleopt) (OHNativeWindow \*window, int code,...) | 设置/获取OHNativeWindow的属性,包括设置/获取宽高、内容格式等 |
+| [OH_NativeWindow_GetBufferHandleFromNative](#oh_nativewindow_getbufferhandlefromnative) (OHNativeWindowBuffer \*buffer) | 通过OHNativeWindowBuffer获取该buffer的BufferHandle指针 |
+| [OH_NativeWindow_NativeObjectReference](#oh_nativewindow_nativeobjectreference) (void \*obj) | 增加一个NativeObject的引用计数 |
+| [OH_NativeWindow_NativeObjectUnreference](#oh_nativewindow_nativeobjectunreference) (void \*obj) | 减少一个NativeObject的引用计数,当引用计数减少为0时,该NativeObject将被析构掉 |
+| [OH_NativeWindow_GetNativeObjectMagic](#oh_nativewindow_getnativeobjectmagic) (void \*obj) | 获取NativeObject的MagicId |
+| [OH_NativeWindow_NativeWindowSetScalingMode](#oh_nativewindow_nativewindowsetscalingmode) (OHNativeWindow \*window, uint32_t sequence, OHScalingMode scalingMode) | 设置OHNativeWindow的ScalingMode |
+| [OH_NativeWindow_NativeWindowSetMetaData](#oh_nativewindow_nativewindowsetmetadata) (OHNativeWindow \*window, uint32_t sequence, int32_t size, const OHHDRMetaData \*metaData) | 设置OHNativeWindow的元数据 |
+| [OH_NativeWindow_NativeWindowSetMetaDataSet](#oh_nativewindow_nativewindowsetmetadataset) (OHNativeWindow*window, uint32_t sequence, OHHDRMetadataKey key, int32_t size, const uint8_t \*metaData) | 设置OHNativeWindow的元数据集。 |
+| [OH_NativeWindow_NativeWindowSetTunnelHandle](#oh_nativewindow_nativewindowsettunnelhandle) (OHNativeWindow \*window, const OHExtDataHandle \*handle) | 设置OHNativeWindow的TunnelHandle。 |
+
+
+## 类型定义说明
+
+
+### OHNativeWindow
+
+
+```
+typedef struct NativeWindow OHNativeWindow
+```
+
+**描述:**
+
+提供对OHNativeWindow的访问功能
+
+
+### OHNativeWindowBuffer
+
+
+```
+typedef struct NativeWindowBuffer OHNativeWindowBuffer
+```
+
+**描述:**
+
+提供对OHNativeWindowBuffer的访问功能
+
+
+### Region
+
+
+```
+typedef struct Region Region
+```
+
+**描述:**
+
+表示本地窗口OHNativeWindow需要更新内容的矩形区域(脏区)
## 枚举类型说明
@@ -80,82 +115,98 @@
### NativeWindowOperation
-
+
```
enum NativeWindowOperation
```
-**描述:**
+**描述:**
OH_NativeWindow_NativeWindowHandleOpt函数中的操作码
- | 枚举值 | 说明 |
+| 枚举值 | 描述 |
| -------- | -------- |
-| SET_BUFFER_GEOMETRY | 设置本地窗口缓冲区几何图形, 函数中的可变参数是 [输入] int32_t height,[输入] int32_t width。 |
-| GET_BUFFER_GEOMETRY | 获取本地窗口缓冲区几何图形, 函数中的可变参数是 [输出] int32_t \*height, [输出] int32_t \*width。 |
-| GET_FORMAT | 获取本地窗口缓冲区格式, 函数中的可变参数是 [输出] int32_t \*format。 |
-| SET_FORMAT | 设置本地窗口缓冲区格式, 函数中的可变参数是 [输入] int32_t format。 |
-| GET_USAGE | 获取本地窗口缓冲区格式, 函数中的可变参数是 [输出] int32_t \*usage。 |
-| SET_USAGE | 设置本地窗口缓冲区使用方式, 函数中的可变参数是 [输入] int32_t usage。 |
-| SET_STRIDE | 设置本地窗口缓冲区步幅, 函数中的可变参数是 [输入] int32_t stride。 |
-| GET_STRIDE | 获取本地窗口缓冲区步幅, 函数中的可变参数是 [输出] int32_t \*stride。 |
-| SET_SWAP_INTERVAL | 设置本地窗口缓冲区交换间隔, 函数中的可变参数是 [输入] int32_t interval。 |
-| GET_SWAP_INTERVAL | 获取本地窗口缓冲区交换间隔, 函数中的可变参数是 [输出] int32_t \*interval。 |
-| SET_TIMEOUT | 设置请求本地窗口缓冲区的超时等待时间, 函数中的可变参数是 [输入] int32_t timeout。 |
-| GET_TIMEOUT | 获取请求本地窗口缓冲区的超时等待时间, 函数中的可变参数是 [输出] int32_t \*timeout。 |
-| SET_COLOR_GAMUT | 设置本地窗口缓冲区色彩空间, 函数中的可变参数是 [输入] int32_t colorGamut。 |
-| GET_COLOR_GAMUT | 获取本地窗口缓冲区色彩空间, 函数中的可变参数是 [out int32_t \*colorGamut]。 |
-| SET_TRANSFORM | 设置本地窗口缓冲区变换, 函数中的可变参数是 [输入] int32_t transform。 |
-| GET_TRANSFORM | 获取本地窗口缓冲区变换, 函数中的可变参数是 [输出] int32_t \*transform。 |
-| SET_UI_TIMESTAMP | 设置本地窗口缓冲区UI时间戳, 函数中的可变参数是 [输入] uint64_t uiTimestamp。 |
-
-
-### OHHDRMetadataKey(deprecated)
-
-
+| SET_BUFFER_GEOMETRY | 设置本地窗口缓冲区几何图形, 函数中的可变参数是 [输入] int32_t height,[输入] int32_t width。 |
+| GET_BUFFER_GEOMETRY | 获取本地窗口缓冲区几何图形, 函数中的可变参数是 [输出] int32_t \*height, [输出] int32_t \*width。 |
+| GET_FORMAT | 获取本地窗口缓冲区格式, 函数中的可变参数是 [输出] int32_t \*format。 |
+| SET_FORMAT | 设置本地窗口缓冲区格式, 函数中的可变参数是 [输入] int32_t format。 |
+| GET_USAGE | 获取本地窗口读写方式, 函数中的可变参数是 [输出] int32_t \*usage。 |
+| SET_USAGE | 设置本地窗口缓冲区读写方式, 函数中的可变参数是 [输入] int32_t usage。 |
+| SET_STRIDE | 设置本地窗口缓冲区步幅, 函数中的可变参数是 [输入] int32_t stride。 |
+| GET_STRIDE | 获取本地窗口缓冲区步幅, 函数中的可变参数是 [输出] int32_t \*stride。 |
+| SET_SWAP_INTERVAL | 设置本地窗口缓冲区交换间隔, 函数中的可变参数是 [输入] int32_t interval。 |
+| GET_SWAP_INTERVAL | 获取本地窗口缓冲区交换间隔, 函数中的可变参数是 [输出] int32_t \*interval。 |
+| SET_TIMEOUT | 设置请求本地窗口缓冲区的超时等待时间, 函数中的可变参数是 [输入] int32_t timeout。 |
+| GET_TIMEOUT | 获取请求本地窗口缓冲区的超时等待时间, 函数中的可变参数是 [输出] int32_t \*timeout。 |
+| SET_COLOR_GAMUT | 设置本地窗口缓冲区色彩空间, 函数中的可变参数是 [输入] int32_t colorGamut。 |
+| GET_COLOR_GAMUT | 获取本地窗口缓冲区色彩空间, 函数中的可变参数是 [out int32_t \*colorGamut]。 |
+| SET_TRANSFORM | 设置本地窗口缓冲区变换, 函数中的可变参数是 [输入] int32_t transform。 |
+| GET_TRANSFORM | 获取本地窗口缓冲区变换, 函数中的可变参数是 [输出] int32_t \*transform。 |
+| SET_UI_TIMESTAMP | 设置本地窗口缓冲区UI时间戳, 函数中的可变参数是 [输入] uint64_t uiTimestamp。 |
+
+
+### OHHDRMetadataKey
+
+
```
enum OHHDRMetadataKey
```
-**描述:**
+**描述:**
+
+枚举HDR元数据关键字
-枚举HDR元数据关键字,从API9开始废弃,预计API14删除
+**起始版本:**
- | 枚举值 | 描述 |
+9
+
+**弃用:**
+
+从API version 10开始废弃,不再提供替代接口
+
+| 枚举值 | 描述 |
| -------- | -------- |
-| OH_METAKEY_RED_PRIMARY_X | 红基色X坐标 |
-| OH_METAKEY_RED_PRIMARY_Y | 红基色Y坐标 |
-| OH_METAKEY_GREEN_PRIMARY_X | 绿基色X坐标 |
-| OH_METAKEY_GREEN_PRIMARY_Y | 绿基色Y坐标 |
-| OH_METAKEY_BLUE_PRIMARY_X | 蓝基色X坐标 |
-| OH_METAKEY_BLUE_PRIMARY_Y | 蓝基色Y坐标 |
-| OH_METAKEY_WHITE_PRIMARY_X | 白点X坐标 |
-| OH_METAKEY_WHITE_PRIMARY_Y | 白点Y坐标 |
-| OH_METAKEY_MAX_LUMINANCE | 最大的光亮度 |
-| OH_METAKEY_MIN_LUMINANCE | 最小的光亮度 |
-| OH_METAKEY_MAX_CONTENT_LIGHT_LEVEL | 最大的内容亮度水平 |
-| OH_METAKEY_MAX_FRAME_AVERAGE_LIGHT_LEVEL | 最大的帧平均亮度水平 |
-| OH_METAKEY_HDR10_PLUS | HDR10 Plus |
-| OH_METAKEY_HDR_VIVID | Vivid |
-
-
-### OHScalingMode(deprecated)
-
-
+| OH_METAKEY_RED_PRIMARY_X | 红基色X坐标 |
+| OH_METAKEY_RED_PRIMARY_Y | 红基色Y坐标 |
+| OH_METAKEY_GREEN_PRIMARY_X | 绿基色X坐标 |
+| OH_METAKEY_GREEN_PRIMARY_Y | 绿基色Y坐标 |
+| OH_METAKEY_BLUE_PRIMARY_X | 蓝基色X坐标 |
+| OH_METAKEY_BLUE_PRIMARY_Y | 蓝基色Y坐标 |
+| OH_METAKEY_WHITE_PRIMARY_X | 白点X坐标 |
+| OH_METAKEY_WHITE_PRIMARY_Y | 白点Y坐标 |
+| OH_METAKEY_MAX_LUMINANCE | 最大的光亮度 |
+| OH_METAKEY_MIN_LUMINANCE | 最小的光亮度 |
+| OH_METAKEY_MAX_CONTENT_LIGHT_LEVEL | 最大的内容亮度水平 |
+| OH_METAKEY_MAX_FRAME_AVERAGE_LIGHT_LEVEL | 最大的帧平均亮度水平 |
+| OH_METAKEY_HDR10_PLUS | HDR10 Plus |
+| OH_METAKEY_HDR_VIVID | Vivid |
+
+
+### OHScalingMode
+
+
```
enum OHScalingMode
```
-**描述:**
+**描述:**
+
+缩放模式 Scaling Mode
+
+**起始版本:**
+
+9
+
+**弃用:**
-缩放模式 Scaling Mode,从API9开始废弃,预计API14删除
+从API version 10开始废弃,不再提供替代接口
- | 枚举值 | 描述 |
+| 枚举值 | 描述 |
| -------- | -------- |
-| OH_SCALING_MODE_FREEZE | 在接收到窗口大小的缓冲区之前,不可以更新窗口内容 |
-| OH_SCALING_MODE_SCALE_TO_WINDOW | 缓冲区在二维中缩放以匹配窗口大小 |
-| OH_SCALING_MODE_SCALE_CROP | 缓冲区被统一缩放,使得缓冲区的较小尺寸与窗口大小匹配 |
-| OH_SCALING_MODE_NO_SCALE_CROP | 窗口被裁剪为缓冲区裁剪矩形的大小,裁剪矩形之外的像素被视为完全透明 |
+| OH_SCALING_MODE_FREEZE | 在接收到窗口大小的缓冲区之前,不可以更新窗口内容 |
+| OH_SCALING_MODE_SCALE_TO_WINDOW | 缓冲区在二维中缩放以匹配窗口大小 |
+| OH_SCALING_MODE_SCALE_CROP | 缓冲区被统一缩放,使得缓冲区的较小尺寸与窗口大小匹配 |
+| OH_SCALING_MODE_NO_SCALE_CROP | 窗口被裁剪为缓冲区裁剪矩形的大小,裁剪矩形之外的像素被视为完全透明 |
## 函数说明
@@ -163,461 +214,425 @@ enum OHScalingMode
### OH_NativeWindow_CreateNativeWindow()
-
+
```
OHNativeWindow* OH_NativeWindow_CreateNativeWindow (void * pSurface)
```
-**描述:**
+**描述:**
-创建NativeWindow实例,每次调用都会产生一个新的NativeWindow实例
+创建OHNativeWindow实例,每次调用都会产生一个新的OHNativeWindow实例
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| pSurface | 参数是一个指向生产者ProduceSurface的指针,类型为sptr<OHOS::Surface> |
-
-**返回:**
-
-返回一个指针,指向NativeWindow的结构体实例
+| pSurface | 一个指向生产者ProduceSurface的指针,类型为sptr<OHOS::Surface> |
-**起始版本:**
+**返回:**
-8
+返回一个指针,指向OHNativeWindow的结构体实例
### OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer()
-
+
```
OHNativeWindowBuffer* OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer (void * pSurfaceBuffer)
```
-**描述:**
+**描述:**
-创建NativeWindowBuffer实例,每次调用都会产生一个新的NativeWindowBuffer实例
+创建OHNativeWindowBuffer实例,每次调用都会产生一个新的OHNativeWindowBuffer实例
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| pSurfaceBuffer | 参数是一个指向生产者buffer的指针,类型为sptr<OHOS::SurfaceBuffer> |
+| pSurfaceBuffer | 一个指向生产者buffer的指针,类型为sptr<OHOS::SurfaceBuffer> |
-**返回:**
+**返回:**
-返回一个指针,指向NativeWindowBuffer的结构体实例
-
-**起始版本:**
-
-8
+返回一个指针,指向OHNativeWindowBuffer的结构体实例
### OH_NativeWindow_DestroyNativeWindow()
-
+
```
-void OH_NativeWindow_DestroyNativeWindow (OHNativeWindow * window)
+void OH_NativeWindow_DestroyNativeWindow (OHNativeWindow * window)
```
-**描述:**
+**描述:**
-将NativeWindow对象的引用计数减1,当引用计数为0的时候,该NativeWindow对象会被析构掉
+将OHNativeWindow对象的引用计数减1,当引用计数为0的时候,该OHNativeWindow对象会被析构掉
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| window | 参数是一个NativeWindow的结构体实例的指针 |
-
-**起始版本:**
-
-8
+| window | 一个OHNativeWindow的结构体实例的指针 |
### OH_NativeWindow_DestroyNativeWindowBuffer()
-
+
```
-void OH_NativeWindow_DestroyNativeWindowBuffer (OHNativeWindowBuffer * buffer)
+void OH_NativeWindow_DestroyNativeWindowBuffer (OHNativeWindowBuffer * buffer)
```
-**描述:**
+**描述:**
-将NativeWindowBuffer对象的引用计数减1,当引用计数为0的时候,该NativeWindowBuffer对象会被析构掉
+将OHNativeWindowBuffer对象的引用计数减1,当引用计数为0的时候,该OHNativeWindowBuffer对象会被析构掉
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| buffer | 参数是一个NativeWindowBuffer的结构体实例的指针 |
-
-**起始版本:**
-
-8
+| buffer | 一个OHNativeWindowBuffer的结构体实例的指针 |
### OH_NativeWindow_GetBufferHandleFromNative()
-
+
```
-BufferHandle* OH_NativeWindow_GetBufferHandleFromNative (OHNativeWindowBuffer * buffer)
+BufferHandle* OH_NativeWindow_GetBufferHandleFromNative (OHNativeWindowBuffer * buffer)
```
-**描述:**
+**描述:**
-通过NativeWindowBuffer获取该buffer的BufferHandle指针
+通过OHNativeWindowBuffer获取该buffer的BufferHandle指针
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| buffer | 参数是一个NativeWindowBuffer的结构体实例的指针 |
+| buffer | 一个OHNativeWindowBuffer的结构体实例的指针 |
-**返回:**
+**返回:**
BufferHandle 返回一个指针,指向BufferHandle的结构体实例
-**起始版本:**
-
-8
-
### OH_NativeWindow_GetNativeObjectMagic()
-
+
```
int32_t OH_NativeWindow_GetNativeObjectMagic (void * obj)
```
-**描述:**
+**描述:**
获取NativeObject的MagicId
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| obj | 参数是一个NativeWindow or NativeWindowBuffer的结构体实例的指针 |
+| obj | 一个OHNativeWindow或者OHNativeWindowBuffer的结构体实例的指针 |
-**返回:**
+**返回:**
MagicId 返回值为魔鬼数字,每个NativeObject唯一
-**起始版本:**
-
-8
-
### OH_NativeWindow_NativeObjectReference()
-
+
```
int32_t OH_NativeWindow_NativeObjectReference (void * obj)
```
-**描述:**
+**描述:**
增加一个NativeObject的引用计数
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| obj | 参数是一个NativeWindow or NativeWindowBuffer的结构体实例的指针 |
+| obj | 一个OHNativeWindow或者OHNativeWindowBuffer的结构体实例的指针 |
-**返回:**
+**返回:**
-GSError 返回值为错误码
-
-**起始版本:**
-
-8
+返回值为0表示执行成功
### OH_NativeWindow_NativeObjectUnreference()
-
+
```
int32_t OH_NativeWindow_NativeObjectUnreference (void * obj)
```
-**描述:**
+**描述:**
减少一个NativeObject的引用计数,当引用计数减少为0时,该NativeObject将被析构掉
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| obj | 参数是一个NativeWindow or NativeWindowBuffer的结构体实例的指针 |
+| obj | 一个OHNativeWindow或者OHNativeWindowBuffer的结构体实例的指针 |
-**返回:**
+**返回:**
-GSError 返回值为错误码
-
-**起始版本:**
-
-8
+返回值为0表示执行成功
### OH_NativeWindow_NativeWindowAbortBuffer()
-
+
```
-int32_t OH_NativeWindow_NativeWindowAbortBuffer (OHNativeWindow * window, OHNativeWindowBuffer * buffer )
+int32_t OH_NativeWindow_NativeWindowAbortBuffer (OHNativeWindow * window, OHNativeWindowBuffer * buffer )
```
-**描述:**
+**描述:**
-通过NativeWindow将之前申请出来的NativeWindowBuffer返还到Buffer队列中,供下次再申请
+通过OHNativeWindow将之前申请出来的OHNativeWindowBuffer返还到Buffer队列中,供下次再申请
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| window | 参数是一个NativeWindow的结构体实例的指针 |
-| buffer | 参数是一个NativeWindowBuffer的结构体实例的指针 |
-
-**返回:**
+| window | 一个OHNativeWindow的结构体实例的指针 |
+| buffer | 一个OHNativeWindowBuffer的结构体实例的指针 |
-GSError 返回值为错误码
+**返回:**
-**起始版本:**
-
-8
+返回值为0表示执行成功
### OH_NativeWindow_NativeWindowFlushBuffer()
-
+
```
-int32_t OH_NativeWindow_NativeWindowFlushBuffer (OHNativeWindow * window, OHNativeWindowBuffer * buffer, int fenceFd, Region region )
+int32_t OH_NativeWindow_NativeWindowFlushBuffer (OHNativeWindow * window, OHNativeWindowBuffer * buffer, int fenceFd, Region region )
```
-**描述:**
+**描述:**
-通过NativeWindow将生产好内容的NativeWindowBuffer放回到Buffer队列中,用以内容消费
+通过OHNativeWindow将生产好内容的OHNativeWindowBuffer放回到Buffer队列中,用以内容消费
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| window | 参数是一个NativeWindow的结构体实例的指针 |
-| buffer | 参数是一个NativeWindowBuffer的结构体实例的指针 |
-| fenceFd | 参数是一个文件描述符句柄,用以同步时序 |
-| region | 参数表示一块脏区域,该区域有内容更新 |
-
-**返回:**
+| window | 一个OHNativeWindow的结构体实例的指针 |
+| buffer | 一个OHNativeWindowBuffer的结构体实例的指针 |
+| fenceFd | 一个文件描述符句柄,用以同步时序 |
+| region | 表示一块脏区域,该区域有内容更新 |
-GSError 返回值为错误码
+**返回:**
-**起始版本:**
-
-8
+返回值为0表示执行成功
### OH_NativeWindow_NativeWindowHandleOpt()
-
+
```
-int32_t OH_NativeWindow_NativeWindowHandleOpt (OHNativeWindow * window, int code, ... )
+int32_t OH_NativeWindow_NativeWindowHandleOpt (OHNativeWindow * window, int code, ... )
```
-**描述:**
+**描述:**
-设置/获取NativeWindow的属性,包括设置/获取宽高、内容格式等
+设置/获取OHNativeWindow的属性,包括设置/获取宽高、内容格式等
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| window | 参数是一个NativeWindow的结构体实例的指针 |
-| code | 表示操作码,详见[NativeWindowOperation](#nativewindowoperation) |
-| ... | 可变参数,必须与操作码一一对应 |
-
-**返回:**
+| window | 一个OHNativeWindow的结构体实例的指针 |
+| code | 表示操作码,详见[NativeWindowOperation](#nativewindowoperation) |
+| ... | 可变参数,必须与操作码一一对应 |
-GSError 返回值为错误码
+**返回:**
-**起始版本:**
-
-8
+返回值为0表示执行成功
### OH_NativeWindow_NativeWindowRequestBuffer()
-
+
```
-int32_t OH_NativeWindow_NativeWindowRequestBuffer (OHNativeWindow * window, OHNativeWindowBuffer ** buffer, int * fenceFd )
+int32_t OH_NativeWindow_NativeWindowRequestBuffer (OHNativeWindow * window, OHNativeWindowBuffer ** buffer, int * fenceFd )
```
-**描述:**
+**描述:**
-通过NativeWindow对象申请一块NativeWindowBuffer,用以内容生产
+通过OHNativeWindow对象申请一块OHNativeWindowBuffer,用以内容生产
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| window | 参数是一个NativeWindow的结构体实例的指针 |
-| buffer | 参数是一个NativeWindowBuffer的结构体实例的二级指针 |
-| fenceFd | 参数是一个文件描述符句柄 |
+| window | 一个OHNativeWindow的结构体实例的指针 |
+| buffer | 一个OHNativeWindowBuffer的结构体实例的二级指针 |
+| fenceFd | 一个文件描述符句柄 |
-**返回:**
+**返回:**
-GSError 返回值为错误码
+返回值为0表示执行成功
-**起始版本:**
-
-8
+### OH_NativeWindow_NativeWindowSetMetaData()
-### OH_NativeWindow_NativeWindowSetMetaData()(deprecated)
-
```
-int32_t OH_NativeWindow_NativeWindowSetMetaData (OHNativeWindow * window, uint32_t sequence, int32_t size, const OHHDRMetaData * metaData )
+int32_t OH_NativeWindow_NativeWindowSetMetaData (OHNativeWindow * window, uint32_t sequence, int32_t size, const OHHDRMetaData * metaData )
```
-**描述:**
+**描述:**
-设置NativeWindow的元数据。
-从API9开始废弃,预计API14删除。
+设置OHNativeWindow的元数据
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| window | 参数是一个NativeWindow的结构体实例的指针 |
-| sequence | 生产缓冲区的序列 |
-| size | OHHDRMetaData数组的大小 |
-| metaDate | 指向OHHDRMetaData数组的指针 |
+| window | 一个OHNativeWindow的结构体实例的指针 |
+| sequence | 生产缓冲区的序列 |
+| size | OHHDRMetaData数组的大小 |
+| metaDate | 指向OHHDRMetaData数组的指针 |
-**返回:**
+**返回:**
-GSError 返回值为错误码
+返回值为0表示执行成功
-**起始版本:**
+**起始版本:**
9
+**弃用:**
+
+从API version 10开始废弃,不再提供替代接口
+
+
+### OH_NativeWindow_NativeWindowSetMetaDataSet()
-### OH_NativeWindow_NativeWindowSetMetaDataSet()(deprecated)
-
```
-int32_t OH_NativeWindow_NativeWindowSetMetaDataSet (OHNativeWindow * window, uint32_t sequence, OHHDRMetadataKey key, int32_t size, const uint8_t * metaData )
+int32_t OH_NativeWindow_NativeWindowSetMetaDataSet (OHNativeWindow * window, uint32_t sequence, OHHDRMetadataKey key, int32_t size, const uint8_t * metaData )
```
-**描述:**
+**描述:**
-设置NativeWindow的元数据集。
-从API9开始废弃,预计API14删除。
+设置OHNativeWindow的元数据集。
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| window | 参数是一个NativeWindow的结构体实例的指针。 |
-| sequence | 生产缓冲区的序列。 |
-| key | 枚举值OHHDRMetadataKey |
-| size | uint8_t向量的大小 |
-| metaDate | 指向uint8_t向量的指针 |
+| window | 一个OHNativeWindow的结构体实例的指针。 |
+| sequence | 生产缓冲区的序列。 |
+| key | 枚举值OHHDRMetadataKey |
+| size | uint8_t向量的大小 |
+| metaDate | 指向uint8_t向量的指针 |
-**返回:**
+**返回:**
-GSError 返回值为错误码
+返回值为0表示执行成功
-**起始版本:**
+**起始版本:**
9
+**弃用:**
+
+从API version 10开始废弃,不再提供替代接口
+
+
+### OH_NativeWindow_NativeWindowSetScalingMode()
-### OH_NativeWindow_NativeWindowSetScalingMode()(deprecated)
-
```
-int32_t OH_NativeWindow_NativeWindowSetScalingMode (OHNativeWindow * window, uint32_t sequence, OHScalingMode scalingMode )
+int32_t OH_NativeWindow_NativeWindowSetScalingMode (OHNativeWindow * window, uint32_t sequence, OHScalingMode scalingMode )
```
-**描述:**
+**描述:**
-设置NativeWindow的ScalingMode。
-从API9开始废弃,预计API14删除。
+设置OHNativeWindow的ScalingMode
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| window | 参数是一个NativeWindow的结构体实例的指针 |
-| sequence | 生产缓冲区的序列 |
-| scalingMode | 枚举值OHScalingMode |
+| window | 一个OHNativeWindow的结构体实例的指针 |
+| sequence | 生产缓冲区的序列 |
+| scalingMode | 枚举值OHScalingMode |
-**返回:**
+**返回:**
-GSError 返回值为错误码
+返回值为0表示执行成功
-**起始版本:**
+**起始版本:**
9
+**弃用:**
+
+从API version 10开始废弃,不再提供替代接口
+
+
+### OH_NativeWindow_NativeWindowSetTunnelHandle()
-### OH_NativeWindow_NativeWindowSetTunnelHandle()(deprecated)
-
```
-int32_t OH_NativeWindow_NativeWindowSetTunnelHandle (OHNativeWindow * window, const OHExtDataHandle * handle )
+int32_t OH_NativeWindow_NativeWindowSetTunnelHandle (OHNativeWindow * window, const OHExtDataHandle * handle )
```
-**描述:**
+**描述:**
-设置NativeWindow的TunnelHandle。
-从API9开始废弃,预计API14删除。
+设置OHNativeWindow的TunnelHandle。
\@syscap SystemCapability.Graphic.Graphic2D.NativeWindow
-**参数:**
+**参数:**
- | 名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| window | 参数是一个NativeWindow的结构体实例的指针 |
-| handle | 指向OHExtDataHandle的指针 |
+| window | 一个OHNativeWindow的结构体实例的指针 |
+| handle | 指向OHExtDataHandle的指针 |
-**返回:**
+**返回:**
-GSError 返回值为错误码
+返回值为0表示执行成功
-**起始版本:**
+**起始版本:**
9
+
+**弃用:**
+
+从API version 10开始废弃,不再提供替代接口
diff --git a/zh-cn/application-dev/reference/native-apis/_o_h___native_buffer.md b/zh-cn/application-dev/reference/native-apis/_o_h___native_buffer.md
index 5c21208cc31682c61b4aadeb9fdc7f384261402b..18e79e28c1f3733d0074f5b1ff0f408db1da5bc7 100644
--- a/zh-cn/application-dev/reference/native-apis/_o_h___native_buffer.md
+++ b/zh-cn/application-dev/reference/native-apis/_o_h___native_buffer.md
@@ -1,14 +1,13 @@
# OH_NativeBuffer
-提供NativeBuffer功能
+## 概述
+提供NativeBuffer功能,通过提供的接口,可以实现共享内存的申请、使用、属性查询、释放等操作。
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
-
-
-**起始版本:**
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
+**起始版本:**
9
@@ -18,32 +17,51 @@
### 文件
-| 文件名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| [native_buffer.h](native__buffer_8h.md) | 定义获取和使用NativeBuffer的相关函数
引用文件: |
+| [native_buffer.h](native__buffer_8h.md) | 定义获取和使用NativeBuffer的相关函数。
引用文件:<native_buffer/native_buffer.h> |
### 结构体
-| 结构体名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| [OH_NativeBuffer_Config](_o_h___native_buffer___config.md) | OH_NativeBuffer的属性配置,用于申请新的OH_NativeBuffer实例或查询现有实例的相关属性 |
+| [OH_NativeBuffer_Config](_o_h___native_buffer___config.md) | OH_NativeBuffer的属性配置,用于申请新的OH_NativeBuffer实例或查询现有实例的相关属性。 |
+
+
+### 类型定义
+
+| 名称 | 描述 |
+| -------- | -------- |
+| [OH_NativeBuffer](#oh_nativebuffer) | 提供OH_NativeBuffer结构体声明。 |
### 函数
-| 函数名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| [OH_NativeBuffer_Alloc](#oh_nativebuffer_alloc) (const [OH_NativeBuffer_Config](_o_h___native_buffer___config.md) \*config) | 通过OH_NativeBuffer_Config创建OH_NativeBuffer实例,每次调用都会产生一个新的OH_NativeBuffer实例 |
-| [OH_NativeBuffer_Reference](#oh_nativebuffer_reference) (OH_NativeBuffer \*buffer) | 将OH_NativeBuffer对象的引用计数加1 |
-| [OH_NativeBuffer_Unreference](#oh_nativebuffer_unreference) (OH_NativeBuffer \*buffer) | 将OH_NativeBuffer对象的引用计数减1,当引用计数为0的时候,该NativeBuffer对象会被析构掉 |
-| [OH_NativeBuffer_GetConfig](#oh_nativebuffer_getconfig) (OH_NativeBuffer \*buffer, [OH_NativeBuffer_Config](_o_h___native_buffer___config.md) \*config) | 用于获取OH_NativeBuffer的属性 |
-| [OH_NativeBuffer_Map](#oh_nativebuffer_map) (OH_NativeBuffer \*buffer, void \*\*virAddr) | 将OH_NativeBuffer对应的ION内存映射到进程空间 |
-| [OH_NativeBuffer_Unmap](#oh_nativebuffer_unmap) (OH_NativeBuffer \*buffer) | 将OH_NativeBuffer对应的ION内存从进程空间移除 |
-| [OH_NativeBuffer_GetSeqNum](#oh_nativebuffer_getseqnum) (OH_NativeBuffer \*buffer) | 获取OH_NativeBuffer的序列号 |
+| [OH_NativeBuffer_Alloc](#oh_nativebuffer_alloc) (const [OH_NativeBuffer_Config](_o_h___native_buffer___config.md) \*config) | 通过OH_NativeBuffer_Config创建OH_NativeBuffer实例,每次调用都会产生一个新的OH_NativeBuffer实例。 |
+| [OH_NativeBuffer_Reference](#oh_nativebuffer_reference) ([OH_NativeBuffer](#oh_nativebuffer) \*buffer) | 将OH_NativeBuffer对象的引用计数加1。 |
+| [OH_NativeBuffer_Unreference](#oh_nativebuffer_unreference) ([OH_NativeBuffer](#oh_nativebuffer) \*buffer) | 将OH_NativeBuffer对象的引用计数减1,当引用计数为0的时候,该NativeBuffer对象会被析构掉。 |
+| [OH_NativeBuffer_GetConfig](#oh_nativebuffer_getconfig) ([OH_NativeBuffer](#oh_nativebuffer) \*buffer, [OH_NativeBuffer_Config](_o_h___native_buffer___config.md) \*config) | 用于获取OH_NativeBuffer的属性。 |
+| [OH_NativeBuffer_Map](#oh_nativebuffer_map) ([OH_NativeBuffer](#oh_nativebuffer) \*buffer, void \*\*virAddr) | 将OH_NativeBuffer对应的ION内存映射到进程空间。 |
+| [OH_NativeBuffer_Unmap](#oh_nativebuffer_unmap) ([OH_NativeBuffer](#oh_nativebuffer) \*buffer) | 将OH_NativeBuffer对应的ION内存从进程空间移除。 |
+| [OH_NativeBuffer_GetSeqNum](#oh_nativebuffer_getseqnum) ([OH_NativeBuffer](#oh_nativebuffer) \*buffer) | 获取OH_NativeBuffer的序列号。 |
+
+
+## 类型定义说明
+
+### OH_NativeBuffer
-## 详细描述
+
+```
+typedef struct OH_NativeBuffer OH_NativeBuffer
+```
+
+**描述:**
+
+提供OH_NativeBuffer结构体声明。
## 函数说明
@@ -56,25 +74,21 @@
OH_NativeBuffer* OH_NativeBuffer_Alloc (const OH_NativeBuffer_Config * config)
```
-**描述:**
+**描述:**
-通过OH_NativeBuffer_Config创建OH_NativeBuffer实例,每次调用都会产生一个新的OH_NativeBuffer实例
+通过OH_NativeBuffer_Config创建OH_NativeBuffer实例,每次调用都会产生一个新的OH_NativeBuffer实例。
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| config | 参数是一个指向OH_NativeBuffer属性的指针,类型为OH_NativeBuffer_Config |
+| config | 一个指向OH_NativeBuffer_Config类型的指针。 |
-**返回:**
+**返回:**
-创建成功则返回一个指向OH_NativeBuffer结构体实例的指针,否则返回NULL
-
-**起始版本:**
-
-9
+创建成功则返回一个指向OH_NativeBuffer结构体实例的指针,否则返回NULL。
### OH_NativeBuffer_GetConfig()
@@ -84,22 +98,18 @@ OH_NativeBuffer* OH_NativeBuffer_Alloc (const OH_NativeBuffer_Config * config)
void OH_NativeBuffer_GetConfig (OH_NativeBuffer * buffer, OH_NativeBuffer_Config * config )
```
-**描述:**
+**描述:**
-用于获取OH_NativeBuffer的属性
+用于获取OH_NativeBuffer的属性。
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| buffer | 参数是一个指向OH_NativeBuffer实例的指针 |
-| config | 参数是一个指向OH_NativeBuffer_Config的指针,用于接收OH_NativeBuffer的属性 |
-
-**起始版本:**
-
-9
+| buffer | 一个指向OH_NativeBuffer实例的指针。 |
+| config | 一个指向OH_NativeBuffer_Config的指针,用于接收OH_NativeBuffer的属性。 |
### OH_NativeBuffer_GetSeqNum()
@@ -109,25 +119,21 @@ void OH_NativeBuffer_GetConfig (OH_NativeBuffer * buffer, OH_NativeBuffer_Config
uint32_t OH_NativeBuffer_GetSeqNum (OH_NativeBuffer * buffer)
```
-**描述:**
+**描述:**
-获取OH_NativeBuffer的序列号
+获取OH_NativeBuffer的序列号。
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| buffer | 参数是一个指向OH_NativeBuffer实例的指针 |
-
-**返回:**
+| buffer | 一个指向OH_NativeBuffer实例的指针。 |
-返回对应OH_NativeBuffer的唯一序列号
+**返回:**
-**起始版本:**
-
-9
+返回对应OH_NativeBuffer的唯一序列号。
### OH_NativeBuffer_Map()
@@ -137,26 +143,22 @@ uint32_t OH_NativeBuffer_GetSeqNum (OH_NativeBuffer * buffer)
int32_t OH_NativeBuffer_Map (OH_NativeBuffer * buffer, void ** virAddr )
```
-**描述:**
+**描述:**
-将OH_NativeBuffer对应的ION内存映射到进程空间
+将OH_NativeBuffer对应的ION内存映射到进程空间。
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| buffer | 参数是一个指向OH_NativeBuffer实例的指针 |
-| virAddr | 参数是一个二级指针,二级指针指向虚拟内存的地址 |
+| buffer | 一个指向OH_NativeBuffer实例的指针。 |
+| virAddr | 一个二级指针,二级指针指向映射到当前进程的虚拟内存的地址。 |
-**返回:**
+**返回:**
-返回一个由GSError定义的int32_t类型的错误码
-
-**起始版本:**
-
-9
+返回值为0表示执行成功。
### OH_NativeBuffer_Reference()
@@ -166,25 +168,21 @@ int32_t OH_NativeBuffer_Map (OH_NativeBuffer * buffer, void ** virAddr )
int32_t OH_NativeBuffer_Reference (OH_NativeBuffer * buffer)
```
-**描述:**
+**描述:**
-将OH_NativeBuffer对象的引用计数加1
+将OH_NativeBuffer对象的引用计数加1。
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| buffer | 参数是一个指向OH_NativeBuffer实例的指针 |
+| buffer | 一个指向OH_NativeBuffer实例的指针。 |
-**返回:**
+**返回:**
-返回一个由GSError定义的int32_t类型的错误码
-
-**起始版本:**
-
-9
+返回值为0表示执行成功。
### OH_NativeBuffer_Unmap()
@@ -194,25 +192,21 @@ int32_t OH_NativeBuffer_Reference (OH_NativeBuffer * buffer)
int32_t OH_NativeBuffer_Unmap (OH_NativeBuffer * buffer)
```
-**描述:**
+**描述:**
-将OH_NativeBuffer对应的ION内存从进程空间移除
+将OH_NativeBuffer对应的ION内存从进程空间移除。
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| buffer | 参数是一个指向OH_NativeBuffer实例的指针 |
-
-**返回:**
-
-返回一个由GSError定义的int32_t类型的错误码
+| buffer | 一个指向OH_NativeBuffer实例的指针。 |
-**起始版本:**
+**返回:**
-9
+返回值为0表示执行成功。
### OH_NativeBuffer_Unreference()
@@ -222,22 +216,18 @@ int32_t OH_NativeBuffer_Unmap (OH_NativeBuffer * buffer)
int32_t OH_NativeBuffer_Unreference (OH_NativeBuffer * buffer)
```
-**描述:**
+**描述:**
-将OH_NativeBuffer对象的引用计数减1,当引用计数为0的时候,该NativeBuffer对象会被析构掉
+将OH_NativeBuffer对象的引用计数减1,当引用计数为0的时候,该NativeBuffer对象会被析构掉。
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| buffer | 参数是一个指向OH_NativeBuffer实例的指针 |
-
-**返回:**
+| buffer | 一个指向OH_NativeBuffer实例的指针。 |
-返回一个由GSError定义的int32_t类型的错误码
+**返回:**
-**起始版本:**
-
-9
+返回值为0表示执行成功。
diff --git a/zh-cn/application-dev/reference/native-apis/_o_h___native_buffer___config.md b/zh-cn/application-dev/reference/native-apis/_o_h___native_buffer___config.md
index 72e675e7712fa1213cb5c6897995005d5a73add8..73dcff7c6944290528f4ff7ba6bf4be3197dbedf 100644
--- a/zh-cn/application-dev/reference/native-apis/_o_h___native_buffer___config.md
+++ b/zh-cn/application-dev/reference/native-apis/_o_h___native_buffer___config.md
@@ -5,11 +5,13 @@
OH_NativeBuffer的属性配置,用于申请新的OH_NativeBuffer实例或查询现有实例的相关属性。
-**起始版本:**
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeBuffer
+
+**起始版本:**
9
-**相关模块:**
+**相关模块:**
[OH_NativeBuffer](_o_h___native_buffer.md)
@@ -19,9 +21,9 @@ OH_NativeBuffer的属性配置,用于申请新的OH_NativeBuffer实例或查
### 成员变量
- | 成员变量名称 | 描述 |
+| 成员变量名称 | 描述 |
| -------- | -------- |
-| width | 宽度(像素) |
-| height | 高度(像素) |
-| format | 像素格式 |
-| usage | buffer的用途说明 |
+| width | 宽度(像素)。 |
+| height | 高度(像素)。 |
+| format | 像素格式。 |
+| usage | buffer的用途说明。 |
diff --git a/zh-cn/application-dev/reference/native-apis/_o_h___native_image.md b/zh-cn/application-dev/reference/native-apis/_o_h___native_image.md
index 4c9dfe176dc05c614a3cf700d0d54daff5ae2feb..5f94b93251012bef35b437aacc72a385b84446e9 100644
--- a/zh-cn/application-dev/reference/native-apis/_o_h___native_image.md
+++ b/zh-cn/application-dev/reference/native-apis/_o_h___native_image.md
@@ -1,14 +1,13 @@
# OH_NativeImage
-提供NativeImage功能。
+## 概述
+提供NativeImage功能,作为数据消费者,主要用来将数据和OpenGL纹理对接,需在OpenGL环境下使用
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
-
-
-**起始版本:**
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
+**起始版本:**
9
@@ -18,26 +17,58 @@
### 文件
-| 文件名称 | 描述 |
+| 名称 | 描述 |
+| -------- | -------- |
+| [native_image.h](native__image_8h.md) | 定义获取和使用NativeImage的相关函数
引用文件:<native_image/native_image.h> |
+
+
+### 类型定义
+
+| 名称 | 描述 |
| -------- | -------- |
-| [native_image.h](native__image_8h.md) | 定义获取和使用NativeImage的相关函数。
引用文件: |
+| [OH_NativeImage](#oh_nativeimage) | 提供OH_NativeImage结构体声明 |
+| [OHNativeWindow](#ohnativewindow) | 提供对NativeWindow的访问功能 |
### 函数
-| 函数名称 | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| [OH_NativeImage_Create]( #oh_nativeimage_create) (uint32_t textureId, uint32_t textureTarget) | 创建一个**OH_NativeImage**实例,该实例与OPENGL ES的纹理ID和纹理目标相关联。 |
-| [OH_NativeImage_AcquireNativeWindow]( #oh_nativeimage_acquirenativewindow) (OH_NativeImage \*image) | 获取与OH_NativeImage相关联的OHNativeWindow指针. 该OHNativeWindow后续不再需要时需要调用 OH_NativeWindow_DestroyNativeWindow释放。 |
-| [OH_NativeImage_AttachContext]( #oh_nativeimage_attachcontext) (OH_NativeImage \*image, uint32_t textureId) | 将OH_NativeImage实例附加到当前OPENGL ES上下文, 且该OPENGL ES纹理会绑定到 GL_TEXTURE_EXTERNAL_OES, 并通过OH_NativeImage进行更新。 |
-| [OH_NativeImage_DetachContext]( #oh_nativeimage_detachcontext) (OH_NativeImage \*image) | 将OH_NativeImage实例从当前OPENGL ES上下文分离。 |
-| [OH_NativeImage_UpdateSurfaceImage]( #oh_nativeimage_updatesurfaceimage) (OH_NativeImage \*image) | 通过OH_NativeImage获取最新帧更新相关联的OPENGL ES纹理。 |
-| [OH_NativeImage_GetTimestamp]( #oh_nativeimage_gettimestamp) (OH_NativeImage \*image) | 获取最近调用OH_NativeImage_UpdateSurfaceImage的纹理图像的相关时间戳。 |
-| [OH_NativeImage_GetTransformMatrix]( #oh_nativeimage_gettransformmatrix) (OH_NativeImage \*image, float matrix[16]) | 获取最近调用OH_NativeImage_UpdateSurfaceImage的纹理图像的变化矩阵。 |
-| [OH_NativeImage_Destroy]( #oh_nativeimage_destroy) (OH_NativeImage \*\*image) | 销毁通过OH_NativeImage_Create创建的**OH_NativeImage**实例, 销毁后该 **OH_NativeImage**指针会被赋值为空。 |
+| [OH_NativeImage_Create](#oh_nativeimage_create) (uint32_t textureId, uint32_t textureTarget) | 创建一个**OH_NativeImage**实例,该实例与OpenGL ES的纹理ID和纹理目标相关联 |
+| [OH_NativeImage_AcquireNativeWindow](#oh_nativeimage_acquirenativewindow) (OH_NativeImage \*image) | 获取与OH_NativeImage相关联的OHNativeWindow指针. 该OHNativeWindow后续不再需要时需要调用
OH_NativeWindow_DestroyNativeWindow释放 |
+| [OH_NativeImage_AttachContext](#oh_nativeimage_attachcontext) (OH_NativeImage \*image, uint32_t textureId) | 将OH_NativeImage实例附加到当前OpenGL ES上下文, 且该OpenGL ES纹理会绑定到
GL_TEXTURE_EXTERNAL_OES, 并通过OH_NativeImage进行更新 |
+| [OH_NativeImage_DetachContext](#oh_nativeimage_detachcontext) (OH_NativeImage \*image) | 将OH_NativeImage实例从当前OpenGL ES上下文分离 |
+| [OH_NativeImage_UpdateSurfaceImage](#oh_nativeimage_updatesurfaceimage) (OH_NativeImage \*image) | 通过OH_NativeImage获取最新帧更新相关联的OpenGL ES纹理 |
+| [OH_NativeImage_GetTimestamp](#oh_nativeimage_gettimestamp) (OH_NativeImage*image) | 获取最近调用OH_NativeImage_UpdateSurfaceImage的纹理图像的相关时间戳 |
+| [OH_NativeImage_GetTransformMatrix](#oh_nativeimage_gettransformmatrix) (OH_NativeImage \*image, float matrix[16]) | 获取最近调用OH_NativeImage_UpdateSurfaceImage的纹理图像的变化矩阵 |
+| [OH_NativeImage_Destroy](#oh_nativeimage_destroy) (OH_NativeImage \*\*image) | 销毁通过OH_NativeImage_Create创建的**OH_NativeImage**实例, 销毁后该
**OH_NativeImage**指针会被赋值为空 |
-## 详细描述
+## 类型定义说明
+
+
+### OH_NativeImage
+
+
+```
+typedef struct OH_NativeImage OH_NativeImage
+```
+
+**描述:**
+
+提供OH_NativeImage结构体声明
+
+
+### OHNativeWindow
+
+
+```
+typedef struct NativeWindow OHNativeWindow
+```
+
+**描述:**
+
+提供对NativeWindow的访问功能
## 函数说明
@@ -50,25 +81,23 @@
OHNativeWindow* OH_NativeImage_AcquireNativeWindow (OH_NativeImage * image)
```
-**描述:**
+**描述:**
+
+获取与OH_NativeImage相关联的OHNativeWindow指针. 该OHNativeWindow后续不再需要时需要调用
-获取与OH_NativeImage相关联的OHNativeWindow指针。该OHNativeWindow后续不再需要时需要调用 OH_NativeWindow_DestroyNativeWindow释放。
+OH_NativeWindow_DestroyNativeWindow释放
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
| image | 指向OH_NativeImage实例的指针。 |
-**返回:**
+**返回:**
-成功则返回一个指向OHNativeWindow实例的指针,否则返回**NULL**。
-
-**起始版本:**
-
-9
+成功则返回一个指向OHNativeWindow实例的指针,否则返回**NULL**
### OH_NativeImage_AttachContext()
@@ -78,26 +107,24 @@ OHNativeWindow* OH_NativeImage_AcquireNativeWindow (OH_NativeImage * image)
int32_t OH_NativeImage_AttachContext (OH_NativeImage * image, uint32_t textureId )
```
-**描述:**
+**描述:**
-将OH_NativeImage实例附加到当前OPENGL ES上下文,且该OPENGL ES纹理会绑定到 GL_TEXTURE_EXTERNAL_OES,并通过OH_NativeImage进行更新。
+将OH_NativeImage实例附加到当前OpenGL ES上下文, 且该OpenGL ES纹理会绑定到
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
+GL_TEXTURE_EXTERNAL_OES, 并通过OH_NativeImage进行更新
-**参数:**
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
-| Name | 描述 |
+**参数:**
+
+| 名称 | 描述 |
| -------- | -------- |
| image | 指向OH_NativeImage实例的指针。 |
-| textureId | OH_NativeImage要附加到的OPENGL ES纹理的id。 |
-
-**返回:**
-
-返回一个由**SurfaceError**定义的int32_t类型的错误码。
+| textureId | OH_NativeImage要附加到的OpenGL ES纹理的id。 |
-**起始版本:**
+**返回:**
-9
+返回值为0表示执行成功
### OH_NativeImage_Create()
@@ -107,26 +134,22 @@ int32_t OH_NativeImage_AttachContext (OH_NativeImage * image, uint32_t textureId
OH_NativeImage* OH_NativeImage_Create (uint32_t textureId, uint32_t textureTarget )
```
-**描述:**
+**描述:**
-创建一个**OH_NativeImage**实例,该实例与OPENGL ES的纹理ID和纹理目标相关联。
+创建一个**OH_NativeImage**实例,该实例与OpenGL ES的纹理ID和纹理目标相关联
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
-| textureId | OPENGL ES的纹理ID,OH_NativeImage实例会与之相关联。 |
-| textureTarget | OPENGL ES的纹理目标。 |
-
-**返回:**
-
-返回一个指向**OH_NativeImage**实例的指针,否则返回**NULL**。
+| textureId | OpenGL ES的纹理ID,OH_NativeImage实例会与之相关联 |
+| textureTarget | OpenGL ES的纹理目标 |
-**起始版本:**
+**返回:**
-9
+返回一个指向**OH_NativeImage**实例的指针 returns **NULL** otherwise
### OH_NativeImage_Destroy()
@@ -136,15 +159,17 @@ OH_NativeImage* OH_NativeImage_Create (uint32_t textureId, uint32_t textureTarge
void OH_NativeImage_Destroy (OH_NativeImage ** image)
```
-**描述:**
+**描述:**
+
+销毁通过OH_NativeImage_Create创建的**OH_NativeImage**实例, 销毁后该
-销毁通过OH_NativeImage_Create创建的**OH_NativeImage**实例, 销毁后该 **OH_NativeImage**指针会被赋值为空.
+**OH_NativeImage**指针会被赋值为空
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
| image | 指向OH_NativeImage实例的指针。 |
@@ -156,25 +181,21 @@ void OH_NativeImage_Destroy (OH_NativeImage ** image)
int32_t OH_NativeImage_DetachContext (OH_NativeImage * image)
```
-**描述:**
+**描述:**
-将OH_NativeImage实例从当前OPENGL ES上下文分离。
+将OH_NativeImage实例从当前OpenGL ES上下文分离
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
| image | 指向OH_NativeImage实例的指针。 |
-**返回:**
+**返回:**
-返回一个由**SurfaceError**定义的int32_t类型的错误码。
-
-**起始版本:**
-
-9
+返回值为0表示执行成功
### OH_NativeImage_GetTimestamp()
@@ -184,25 +205,21 @@ int32_t OH_NativeImage_DetachContext (OH_NativeImage * image)
int64_t OH_NativeImage_GetTimestamp (OH_NativeImage * image)
```
-**描述:**
+**描述:**
-获取最近调用OH_NativeImage_UpdateSurfaceImage的纹理图像的相关时间戳。
+获取最近调用OH_NativeImage_UpdateSurfaceImage的纹理图像的相关时间戳
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
| image | 指向OH_NativeImage实例的指针。 |
-**返回:**
-
-返回纹理图像的相关时间戳。
+**返回:**
-**起始版本:**
-
-9
+返回纹理图像的相关时间戳
### OH_NativeImage_GetTransformMatrix()
@@ -212,26 +229,22 @@ int64_t OH_NativeImage_GetTimestamp (OH_NativeImage * image)
int32_t OH_NativeImage_GetTransformMatrix (OH_NativeImage * image, float matrix[16] )
```
-**描述:**
+**描述:**
-获取最近调用OH_NativeImage_UpdateSurfaceImage的纹理图像的变化矩阵。
+获取最近调用OH_NativeImage_UpdateSurfaceImage的纹理图像的变化矩阵
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
| image | 指向OH_NativeImage实例的指针。 |
| matrix | 用来存储要获取的4\*4的变化矩阵。 |
-**返回:**
+**返回:**
-返回一个由**SurfaceError**定义的int32_t类型的错误码。
-
-**起始版本:**
-
-9
+返回值为0表示执行成功
### OH_NativeImage_UpdateSurfaceImage()
@@ -241,22 +254,18 @@ int32_t OH_NativeImage_GetTransformMatrix (OH_NativeImage * image, float matrix[
int32_t OH_NativeImage_UpdateSurfaceImage (OH_NativeImage * image)
```
-**描述:**
+**描述:**
-通过OH_NativeImage获取最新帧更新相关联的OPENGL ES纹理。
+通过OH_NativeImage获取最新帧更新相关联的OpenGL ES纹理
-@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
+\@syscap SystemCapability.Graphic.Graphic2D.OH_NativeImage
-**参数:**
+**参数:**
-| Name | 描述 |
+| 名称 | 描述 |
| -------- | -------- |
| image | 指向OH_NativeImage实例的指针。 |
-**返回:**
-
-返回一个由**SurfaceError**定义的int32_t类型的错误码。
+**返回:**
-**起始版本:**
-
-9
+返回值为0表示执行成功
diff --git a/zh-cn/application-dev/reference/native-apis/_o_h_ext_data_handle.md b/zh-cn/application-dev/reference/native-apis/_o_h_ext_data_handle.md
index 5a43af86e3e1b52297e436aa079a951d86098cc0..7dead6ae605f6e2b3f5f2478ddd0b6081169957a 100644
--- a/zh-cn/application-dev/reference/native-apis/_o_h_ext_data_handle.md
+++ b/zh-cn/application-dev/reference/native-apis/_o_h_ext_data_handle.md
@@ -3,9 +3,17 @@
## 概述
-扩展数据句柄结构体定义。
+扩展数据句柄结构体定义
-**相关模块:**
+**起始版本:**
+
+9
+
+**弃用:**
+
+从API version 10开始废弃,不再提供替代接口
+
+**相关模块:**
[NativeWindow](_native_window.md)
@@ -15,11 +23,11 @@
### 成员变量
- | 成员变量名称 | 描述 |
+| 成员变量名称 | 描述 |
| -------- | -------- |
-| [fd](#fd) | 句柄 Fd, -1代表不支持 |
-| [reserveInts](#reserveints) | Reserve数组的个数 |
-| [reserve](#reserve) [0] | Reserve数组 |
+| [fd](#fd) | 句柄 Fd, -1代表不支持 |
+| [reserveInts](#reserveints) | Reserve数组的个数 |
+| [reserve](#reserve) [0] | Reserve数组 |
## 结构体成员变量说明
@@ -27,35 +35,35 @@
### fd
-
+
```
int32_t OHExtDataHandle::fd
```
-**描述:**
+**描述:**
句柄 Fd, -1代表不支持
### reserve
-
+
```
int32_t OHExtDataHandle::reserve[0]
```
-**描述:**
+**描述:**
Reserve数组
### reserveInts
-
+
```
uint32_t OHExtDataHandle::reserveInts
```
-**描述:**
+**描述:**
Reserve数组的个数
diff --git a/zh-cn/application-dev/reference/native-apis/_o_h_h_d_r_meta_data.md b/zh-cn/application-dev/reference/native-apis/_o_h_h_d_r_meta_data.md
index 11567d6b3fc98f7bb5ff9686dcf088349d534980..e570ad4ce5e62e6e7fef4cb2b7645d4519b2a0bb 100644
--- a/zh-cn/application-dev/reference/native-apis/_o_h_h_d_r_meta_data.md
+++ b/zh-cn/application-dev/reference/native-apis/_o_h_h_d_r_meta_data.md
@@ -3,9 +3,17 @@
## 概述
-扩展数据句柄结构体定义。
+HDR元数据结构体定义
-**相关模块:**
+**起始版本:**
+
+9
+
+**弃用:**
+
+从API version 10开始废弃,不再提供替代接口
+
+**相关模块:**
[NativeWindow](_native_window.md)
@@ -15,10 +23,10 @@
### 成员变量
- | 成员变量名称 | 描述 |
+| 成员变量名称 | 描述 |
| -------- | -------- |
-| [key](#key) | HDR元数据关键字 |
-| [value](#value) | 关键字对应的值 |
+| [key](#key) | HDR元数据关键字 |
+| [value](#value) | 关键字对应的值 |
## 结构体成员变量说明
@@ -26,23 +34,23 @@
### key
-
+
```
OHHDRMetadataKey OHHDRMetaData::key
```
-**描述:**
+**描述:**
HDR元数据关键字
### value
-
+
```
float OHHDRMetaData::value
```
-**描述:**
+**描述:**
关键字对应的值
diff --git a/zh-cn/application-dev/reference/native-apis/_rect.md b/zh-cn/application-dev/reference/native-apis/_rect.md
index 148c2fd55e1aeba0331e7c3faecb20af1709f957..e7c4da3e196e82cfb6dfb8e3b671952f7fb8b417 100644
--- a/zh-cn/application-dev/reference/native-apis/_rect.md
+++ b/zh-cn/application-dev/reference/native-apis/_rect.md
@@ -5,6 +5,10 @@
矩形区域。
+**起始版本:**
+
+8
+
**相关模块:**
[NativeWindow](_native_window.md)
diff --git a/zh-cn/application-dev/reference/native-apis/_region.md b/zh-cn/application-dev/reference/native-apis/_region.md
index 2123c25359fd86d73b2a6450582ff68eba1b1089..a7005f9af049c9f22ff6d571d6afaf6dcf71f084 100644
--- a/zh-cn/application-dev/reference/native-apis/_region.md
+++ b/zh-cn/application-dev/reference/native-apis/_region.md
@@ -5,6 +5,10 @@
表示本地窗口NativeWindow需要更新内容的矩形区域(脏区)。
+**起始版本:**
+
+8
+
**相关模块:**
[NativeWindow](_native_window.md)
diff --git a/zh-cn/application-dev/reference/native-apis/external__window_8h.md b/zh-cn/application-dev/reference/native-apis/external__window_8h.md
index 94fcbf3d1c1bc148d9c55c43ceba6e67a736779c..5771dac43608dd08443f2aa3194a7872bcc197a0 100644
--- a/zh-cn/application-dev/reference/native-apis/external__window_8h.md
+++ b/zh-cn/application-dev/reference/native-apis/external__window_8h.md
@@ -3,13 +3,13 @@
## 概述
-定义获取和使用NativeWindow的相关函数。
+定义获取和使用NativeWindow的相关函数
-**起始版本:**
+**起始版本:**
8
-**相关模块:**
+**相关模块:**
[NativeWindow](_native_window.md)
@@ -19,49 +19,49 @@
### 结构体
- | 结构体名称 | 描述 |
+| 结构体名称 | 描述 |
| -------- | -------- |
-| [Region](_region.md) | 表示本地窗口NativeWindow需要更新内容的矩形区域(脏区)。 |
-| [Region::Rect](_rect.md) | 矩形区域。 |
-| [OHHDRMetaData](_o_h_h_d_r_meta_data.md) | HDR元数据结构体定义 。 |
-| [OHExtDataHandle](_o_h_ext_data_handle.md) | 扩展数据句柄结构体定义 。 |
+| [Region](_region.md) | 表示本地窗口OHNativeWindow需要更新内容的矩形区域(脏区) |
+| [Region::Rect](_rect.md) | 矩形区域 |
+| [OHHDRMetaData](_o_h_h_d_r_meta_data.md) | HDR元数据结构体定义 |
+| [OHExtDataHandle](_o_h_ext_data_handle.md) | 扩展数据句柄结构体定义 |
### 类型定义
- | 类型定义名称 | 描述 |
+| 类型名称 | 描述 |
| -------- | -------- |
-| OHNativeWindow | 提供对NativeWindow的访问功能 |
-| OHNativeWindowBuffer | 提供对NativeWindowBuffer的访问功能 |
-| [Region](_region.md) | 表示本地窗口NativeWindow需要更新内容的矩形区域(脏区) |
+| [OHNativeWindow](_native_window.md#ohnativewindow) | 提供对OHNativeWindow的访问功能 |
+| [OHNativeWindowBuffer](_native_window.md#ohnativewindowbuffer) | 提供对OHNativeWindowBuffer的访问功能 |
+| [Region](_native_window.md#region) | 表示本地窗口OHNativeWindow需要更新内容的矩形区域(脏区) |
### 枚举
- | 枚举名称 | 描述 |
+| 枚举名称 | 描述 |
| -------- | -------- |
-| [NativeWindowOperation](_native_window.md#nativewindowoperation) { SET_BUFFER_GEOMETRY, GET_BUFFER_GEOMETRY, GET_FORMAT, SET_FORMAT, GET_USAGE, SET_USAGE, SET_STRIDE, GET_STRIDE, SET_SWAP_INTERVAL, GET_SWAP_INTERVAL, SET_TIMEOUT, GET_TIMEOUT, SET_COLOR_GAMUT, GET_COLOR_GAMUT, SET_TRANSFORM, GET_TRANSFORM, SET_UI_TIMESTAMP } | OH_NativeWindow_NativeWindowHandleOpt函数中的操作码 |
-| [OHScalingMode](_native_window.md#ohscalingmode) { OH_SCALING_MODE_FREEZE = 0, OH_SCALING_MODE_SCALE_TO_WINDOW, OH_SCALING_MODE_SCALE_CROP, OH_SCALING_MODE_NO_SCALE_CROP } | 缩放模式 Scaling Mode |
-| [OHHDRMetadataKey](_native_window.md#ohhdrmetadatakey) { OH_METAKEY_RED_PRIMARY_X = 0, OH_METAKEY_RED_PRIMARY_Y = 1, OH_METAKEY_GREEN_PRIMARY_X = 2, OH_METAKEY_GREEN_PRIMARY_Y = 3, OH_METAKEY_BLUE_PRIMARY_X = 4, OH_METAKEY_BLUE_PRIMARY_Y = 5, OH_METAKEY_WHITE_PRIMARY_X = 6, OH_METAKEY_WHITE_PRIMARY_Y = 7, OH_METAKEY_MAX_LUMINANCE = 8, OH_METAKEY_MIN_LUMINANCE = 9, OH_METAKEY_MAX_CONTENT_LIGHT_LEVEL = 10, OH_METAKEY_MAX_FRAME_AVERAGE_LIGHT_LEVEL = 11, OH_METAKEY_HDR10_PLUS = 12, OH_METAKEY_HDR_VIVID = 13 } | 枚举HDR元数据关键字 |
+| [NativeWindowOperation](_native_window.md#nativewindowoperation) {
[SET_BUFFER_GEOMETRY](_native_window.md), [GET_BUFFER_GEOMETRY](_native_window.md), [GET_FORMAT](_native_window.md), [SET_FORMAT](_native_window.md),
[GET_USAGE](_native_window.md), [SET_USAGE](_native_window.md), [SET_STRIDE](_native_window.md), [GET_STRIDE](_native_window.md),
[SET_SWAP_INTERVAL](_native_window.md), [GET_SWAP_INTERVAL](_native_window.md), [SET_TIMEOUT](_native_window.md), [GET_TIMEOUT](_native_window.md),
[SET_COLOR_GAMUT](_native_window.md), [GET_COLOR_GAMUT](_native_window.md), [SET_TRANSFORM](_native_window.md), [GET_TRANSFORM](_native_window.md),
[SET_UI_TIMESTAMP](_native_window.md)
} | OH_NativeWindow_NativeWindowHandleOpt函数中的操作码 |
+| [OHScalingMode](_native_window.md#ohscalingmode) { [OH_SCALING_MODE_FREEZE](_native_window.md) = 0, [OH_SCALING_MODE_SCALE_TO_WINDOW](_native_window.md), [OH_SCALING_MODE_SCALE_CROP](_native_window.md), [OH_SCALING_MODE_NO_SCALE_CROP](_native_window.md) } | 缩放模式 Scaling Mode |
+| [OHHDRMetadataKey](_native_window.md#ohhdrmetadatakey) {
[OH_METAKEY_RED_PRIMARY_X](_native_window.md) = 0, [OH_METAKEY_RED_PRIMARY_Y](_native_window.md) = 1, [OH_METAKEY_GREEN_PRIMARY_X](_native_window.md) = 2, [OH_METAKEY_GREEN_PRIMARY_Y](_native_window.md) = 3,
[OH_METAKEY_BLUE_PRIMARY_X](_native_window.md) = 4, [OH_METAKEY_BLUE_PRIMARY_Y](_native_window.md) = 5, [OH_METAKEY_WHITE_PRIMARY_X](_native_window.md) = 6, [OH_METAKEY_WHITE_PRIMARY_Y](_native_window.md) = 7,
[OH_METAKEY_MAX_LUMINANCE](_native_window.md) = 8, [OH_METAKEY_MIN_LUMINANCE](_native_window.md) = 9, [OH_METAKEY_MAX_CONTENT_LIGHT_LEVEL](_native_window.md) = 10, [OH_METAKEY_MAX_FRAME_AVERAGE_LIGHT_LEVEL](_native_window.md) = 11,
[OH_METAKEY_HDR10_PLUS](_native_window.md) = 12, [OH_METAKEY_HDR_VIVID](_native_window.md) = 13
} | 枚举HDR元数据关键字 |
### 函数
-| 函数名称 | 描述 |
+| 函数名称 | 描述 |
| -------- | -------- |
-| [OH_NativeWindow_CreateNativeWindow](_native_window.md#oh_nativewindow_createnativewindow) (void \*pSurface) | 创建NativeWindow实例,每次调用都会产生一个新的NativeWindow实例 |
-| [OH_NativeWindow_DestroyNativeWindow](_native_window.md#oh_nativewindow_destroynativewindow) (OHNativeWindow \*window) | 将NativeWindow对象的引用计数减1,当引用计数为0的时候,该NativeWindow对象会被析构掉 |
-| [OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer](_native_window.md#oh_nativewindow_createnativewindowbufferfromsurfacebuffer) (void \*pSurfaceBuffer) | 创建NativeWindowBuffer实例,每次调用都会产生一个新的NativeWindowBuffer实例 |
-| [OH_NativeWindow_DestroyNativeWindowBuffer](_native_window.md#oh_nativewindow_destroynativewindowbuffer) (OHNativeWindowBuffer \*buffer) | 将NativeWindowBuffer对象的引用计数减1,当引用计数为0的时候,该NativeWindowBuffer对象会被析构掉 |
-| [OH_NativeWindow_NativeWindowRequestBuffer](_native_window.md#oh_nativewindow_nativewindowrequestbuffer) (OHNativeWindow \*window, OHNativeWindowBuffer \*\*buffer, int \*fenceFd) | 通过NativeWindow对象申请一块NativeWindowBuffer,用以内容生产 |
-| [OH_NativeWindow_NativeWindowFlushBuffer](_native_window.md#oh_nativewindow_nativewindowflushbuffer) (OHNativeWindow \*window, OHNativeWindowBuffer \*buffer, int fenceFd, [Region](_region.md) region) | 通过NativeWindow将生产好内容的NativeWindowBuffer放回到Buffer队列中,用以内容消费 |
-| [OH_NativeWindow_NativeWindowAbortBuffer](_native_window.md#oh_nativewindow_nativewindowabortbuffer) (OHNativeWindow \*window, OHNativeWindowBuffer \*buffer) | 通过NativeWindow将之前申请出来的NativeWindowBuffer返还到Buffer队列中,供下次再申请 |
-| [OH_NativeWindow_NativeWindowHandleOpt](_native_window.md#oh_nativewindow_nativewindowhandleopt) (OHNativeWindow \*window, int code,...) | 设置/获取NativeWindow的属性,包括设置/获取宽高、内容格式等 |
-| [OH_NativeWindow_GetBufferHandleFromNative](_native_window.md#oh_nativewindow_getbufferhandlefromnative) (OHNativeWindowBuffer \*buffer) | 通过NativeWindowBuffer获取该buffer的BufferHandle指针 |
-| [OH_NativeWindow_NativeObjectReference](_native_window.md#oh_nativewindow_nativeobjectreference) (void \*obj) | 增加一个NativeObject的引用计数 |
-| [OH_NativeWindow_NativeObjectUnreference](_native_window.md#oh_nativewindow_nativeobjectunreference) (void \*obj) | 减少一个NativeObject的引用计数,当引用计数减少为0时,该NativeObject将被析构掉 |
-| [OH_NativeWindow_GetNativeObjectMagic](_native_window.md#oh_nativewindow_getnativeobjectmagic) (void \*obj) | 获取NativeObject的MagicId |
-| [OH_NativeWindow_NativeWindowSetScalingMode](_native_window.md#oh_nativewindow_nativewindowsetscalingmode) (OHNativeWindow \*window, uint32_t sequence, [OHScalingMode](_native_window.md#ohscalingmode) scalingMode) | 设置NativeWindow的ScalingMode |
-| [OH_NativeWindow_NativeWindowSetMetaData](_native_window.md#oh_nativewindow_nativewindowsetmetadata) (OHNativeWindow \*window, uint32_t sequence, int32_t size, const [OHHDRMetaData](_o_h_h_d_r_meta_data.md) \*metaData) | 设置NativeWindow的元数据 |
-| [OH_NativeWindow_NativeWindowSetMetaDataSet](_native_window.md#oh_nativewindow_nativewindowsetmetadataset) (OHNativeWindow \*window, uint32_t sequence, [OHHDRMetadataKey](_native_window.md#ohhdrmetadatakey) key, int32_t size, const uint8_t \*metaData) | 设置NativeWindow的元数据集。 |
-| [OH_NativeWindow_NativeWindowSetTunnelHandle](_native_window.md#oh_nativewindow_nativewindowsettunnelhandle) (OHNativeWindow \*window, const [OHExtDataHandle](_o_h_ext_data_handle.md) \*handle) | 设置NativeWindow的TunnelHandle。 |
\ No newline at end of file
+| [OH_NativeWindow_CreateNativeWindow](_native_window.md#oh_nativewindow_createnativewindow) (void \*pSurface) | 创建OHNativeWindow实例,每次调用都会产生一个新的OHNativeWindow实例 |
+| [OH_NativeWindow_DestroyNativeWindow](_native_window.md#oh_nativewindow_destroynativewindow) (OHNativeWindow \*window) | 将OHNativeWindow对象的引用计数减1,当引用计数为0的时候,该OHNativeWindow对象会被析构掉 |
+| [OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer](_native_window.md#oh_nativewindow_createnativewindowbufferfromsurfacebuffer) (void \*pSurfaceBuffer) | 创建OHNativeWindowBuffer实例,每次调用都会产生一个新的OHNativeWindowBuffer实例 |
+| [OH_NativeWindow_DestroyNativeWindowBuffer](_native_window.md#oh_nativewindow_destroynativewindowbuffer) (OHNativeWindowBuffer \*buffer) | 将OHNativeWindowBuffer对象的引用计数减1,当引用计数为0的时候,该OHNativeWindowBuffer对象会被析构掉 |
+| [OH_NativeWindow_NativeWindowRequestBuffer](_native_window.md#oh_nativewindow_nativewindowrequestbuffer) (OHNativeWindow \*window, OHNativeWindowBuffer \*\*buffer, int \*fenceFd) | 通过OHNativeWindow对象申请一块OHNativeWindowBuffer,用以内容生产 |
+| [OH_NativeWindow_NativeWindowFlushBuffer](_native_window.md#oh_nativewindow_nativewindowflushbuffer) (OHNativeWindow \*window, OHNativeWindowBuffer \*buffer, int fenceFd, Region region) | 通过OHNativeWindow将生产好内容的OHNativeWindowBuffer放回到Buffer队列中,用以内容消费 |
+| [OH_NativeWindow_NativeWindowAbortBuffer](_native_window.md#oh_nativewindow_nativewindowabortbuffer) (OHNativeWindow \*window, OHNativeWindowBuffer \*buffer) | 通过OHNativeWindow将之前申请出来的OHNativeWindowBuffer返还到Buffer队列中,供下次再申请 |
+| [OH_NativeWindow_NativeWindowHandleOpt](_native_window.md#oh_nativewindow_nativewindowhandleopt) (OHNativeWindow*window, int code,...) | 设置/获取OHNativeWindow的属性,包括设置/获取宽高、内容格式等 |
+| [OH_NativeWindow_GetBufferHandleFromNative](_native_window.md#oh_nativewindow_getbufferhandlefromnative) (OHNativeWindowBuffer \*buffer) | 通过OHNativeWindowBuffer获取该buffer的BufferHandle指针 |
+| [OH_NativeWindow_NativeObjectReference](_native_window.md#oh_nativewindow_nativeobjectreference) (void \*obj) | 增加一个NativeObject的引用计数 |
+| [OH_NativeWindow_NativeObjectUnreference](_native_window.md#oh_nativewindow_nativeobjectunreference) (void \*obj) | 减少一个NativeObject的引用计数,当引用计数减少为0时,该NativeObject将被析构 |
+| [OH_NativeWindow_GetNativeObjectMagic](_native_window.md#oh_nativewindow_getnativeobjectmagic) (void \*obj) | 获取NativeObject的MagicId |
+| [OH_NativeWindow_NativeWindowSetScalingMode](_native_window.md#oh_nativewindow_nativewindowsetscalingmode) (OHNativeWindownative_window.md#ohscalingmode) scalingMode) | 设置OHNativeWindow的ScalingMode |
+| [OH_NativeWindow_NativeWindowSetMetaData](_native_window.md#oh_nativewindow_nativewindowsetmetadata) (OHNativeWindow \*window, uint32_t sequence, int32_t size, const OHHDRMetaData \*metaData) | 设置OHNativeWindow的元数据 |
+| [OH_NativeWindow_NativeWindowSetMetaDataSet](_native_window.md#oh_nativewindow_nativewindowsetmetadataset) (OHNativeWindow \*window, uint32_t sequence, OHHDRMetadataKey key, int32_t size, const uint8_t \*metaData) | 设置OHNativeWindow的元数据集。 |
+| [OH_NativeWindow_NativeWindowSetTunnelHandle](_native_window.md#oh_nativewindow_nativewindowsettunnelhandle) (OHNativeWindow \*window, const OHExtDataHandle \*handle) | 设置OHNativeWindow的TunnelHandle。 |
diff --git a/zh-cn/application-dev/reference/native-apis/native__buffer_8h.md b/zh-cn/application-dev/reference/native-apis/native__buffer_8h.md
index 8e1b4877f4c3c071566ed5cedc9147f5b46837e1..07e37cf965ea928fa016826e10e6600621fe67e0 100644
--- a/zh-cn/application-dev/reference/native-apis/native__buffer_8h.md
+++ b/zh-cn/application-dev/reference/native-apis/native__buffer_8h.md
@@ -3,13 +3,13 @@
## 概述
-定义获取和使用NativeBuffer的相关函数。
+定义获取和使用NativeBuffer的相关函数
-**起始版本:**
+**起始版本:**
9
-**相关模块:**
+**相关模块:**
[OH_NativeBuffer](_o_h___native_buffer.md)
@@ -21,17 +21,24 @@
| 结构体名称 | 描述 |
| -------- | -------- |
-| [OH_NativeBuffer_Config](_o_h___native_buffer___config.md) | OH_NativeBuffer的属性配置,用于申请新的OH_NativeBuffer实例或查询现有实例的相关属性。 |
+| [OH_NativeBuffer_Config](_o_h___native_buffer___config.md) | OH_NativeBuffer的属性配置,用于申请新的OH_NativeBuffer实例或查询现有实例的相关属性 |
+
+
+### 类型定义
+
+| 类型名称 | 描述 |
+| -------- | -------- |
+| [OH_NativeBuffer](_o_h___native_buffer.md#oh_nativebuffer) | 提供OH_NativeBuffer结构体声明 |
### 函数
| 函数名称 | 描述 |
| -------- | -------- |
-| [OH_NativeBuffer_Alloc](_o_h___native_buffer.md#oh_nativebuffer_alloc) (const [OH_NativeBuffer_Config](_o_h___native_buffer___config.md) \*config) | 通过OH_NativeBuffer_Config创建OH_NativeBuffer实例,每次调用都会产生一个新的OH_NativeBuffer实例。 |
-| [OH_NativeBuffer_Reference](_o_h___native_buffer.md#oh_nativebuffer_reference) (OH_NativeBuffer \*buffer) | 将OH_NativeBuffer对象的引用计数加1。 |
-| [OH_NativeBuffer_Unreference](_o_h___native_buffer.md#oh_nativebuffer_unreference) (OH_NativeBuffer \*buffer) | 将OH_NativeBuffer对象的引用计数减1,当引用计数为0的时候,该NativeBuffer对象会被析构掉。 |
-| [OH_NativeBuffer_GetConfig](_o_h___native_buffer.md#oh_nativebuffer_getconfig) (OH_NativeBuffer \*buffer, [OH_NativeBuffer_Config](_o_h___native_buffer___config.md) \*config) | 用于获取OH_NativeBuffer的属性。 |
-| [OH_NativeBuffer_Map](_o_h___native_buffer.md#oh_nativebuffer_map) (OH_NativeBuffer \*buffer, void \*\*virAddr) | 将OH_NativeBuffer对应的ION内存映射到进程空间。 |
-| [OH_NativeBuffer_Unmap](_o_h___native_buffer.md#oh_nativebuffer_unmap) (OH_NativeBuffer \*buffer) | 将OH_NativeBuffer对应的ION内存从进程空间移除。 |
-| [OH_NativeBuffer_GetSeqNum](_o_h___native_buffer.md#oh_nativebuffer_getseqnum) (OH_NativeBuffer \*buffer) | 获取OH_NativeBuffer的序列号。 |
+| [OH_NativeBuffer_Alloc](_o_h___native_buffer.md#oh_nativebuffer_alloc) (const OH_NativeBuffer_Config \*config) | 通过OH_NativeBuffer_Config创建OH_NativeBuffer实例,每次调用都会产生一个新的OH_NativeBuffer实例 |
+| [OH_NativeBuffer_Reference](_o_h___native_buffer.md#oh_nativebuffer_reference) (OH_NativeBuffer \*buffer) | 将OH_NativeBuffer对象的引用计数加1 |
+| [OH_NativeBuffer_Unreference](_o_h___native_buffer.md#oh_nativebuffer_unreference) (OH_NativeBuffer \*buffer) | 将OH_NativeBuffer对象的引用计数减1,当引用计数为0的时候,该NativeBuffer对象会被析构掉 |
+| [OH_NativeBuffer_GetConfig](_o_h___native_buffer.md#oh_nativebuffer_getconfig) (OH_NativeBuffer \*buffer, OH_NativeBuffer_Config \*config) | 用于获取OH_NativeBuffer的属性 |
+| [OH_NativeBuffer_Map](_o_h___native_buffer.md#oh_nativebuffer_map) (OH_NativeBuffer \*buffer, void \*\*virAddr) | 将OH_NativeBuffer对应的ION内存映射到进程空间 |
+| [OH_NativeBuffer_Unmap](_o_h___native_buffer.md#oh_nativebuffer_unmap) (OH_NativeBuffer \*buffer) | 将OH_NativeBuffer对应的ION内存从进程空间移除 |
+| [OH_NativeBuffer_GetSeqNum](_o_h___native_buffer.md#oh_nativebuffer_getseqnum) (OH_NativeBuffer \*buffer) | 获取OH_NativeBuffer的序列号 |
diff --git a/zh-cn/application-dev/reference/native-apis/native__image_8h.md b/zh-cn/application-dev/reference/native-apis/native__image_8h.md
index 31bfde04487840095a205231e8e39427460b5778..bf18575d371b89d9f757680b70e309160a793e00 100644
--- a/zh-cn/application-dev/reference/native-apis/native__image_8h.md
+++ b/zh-cn/application-dev/reference/native-apis/native__image_8h.md
@@ -3,13 +3,13 @@
## 概述
-定义获取和使用NativeImage的相关函数。
+定义获取和使用NativeImage的相关函数
-**起始版本:**
+**起始版本:**
9
-**相关模块:**
+**相关模块:**
[OH_NativeImage](_o_h___native_image.md)
@@ -17,15 +17,23 @@
## 汇总
+### 类型定义
+
+| 类型名称 | 描述 |
+| -------- | -------- |
+| [OH_NativeImage](_o_h___native_image.md#oh_nativeimage) | 提供OH_NativeImage结构体声明 |
+| [OHNativeWindow](_o_h___native_image.md#ohnativewindow) | 提供对NativeWindow的访问功能 |
+
+
### 函数
| 函数名称 | 描述 |
| -------- | -------- |
-| [OH_NativeImage_Create](_o_h___native_image.md#oh_nativeimage_create) (uint32_t textureId, uint32_t textureTarget) | 创建一个**OH_NativeImage**实例,该实例与OPENGL ES的纹理ID和纹理目标相关联. |
-| [OH_NativeImage_AcquireNativeWindow](_o_h___native_image.md#oh_nativeimage_acquirenativewindow) (OH_NativeImage \*image) | 获取与OH_NativeImage相关联的OHNativeWindow指针. 该OHNativeWindow后续不再需要时需要调用 OH_NativeWindow_DestroyNativeWindow释放. |
-| [OH_NativeImage_AttachContext](_o_h___native_image.md#oh_nativeimage_attachcontext) (OH_NativeImage \*image, uint32_t textureId) | 将OH_NativeImage实例附加到当前OPENGL ES上下文, 且该OPENGL ES纹理会绑定到 GL_TEXTURE_EXTERNAL_OES, 并通过OH_NativeImage进行更新. |
-| [OH_NativeImage_DetachContext](_o_h___native_image.md#oh_nativeimage_detachcontext) (OH_NativeImage \*image) | 将OH_NativeImage实例从当前OPENGL ES上下文分离. |
-| [OH_NativeImage_UpdateSurfaceImage](_o_h___native_image.md#oh_nativeimage_updatesurfaceimage) (OH_NativeImage \*image) | 通过OH_NativeImage获取最新帧更新相关联的OPENGL ES纹理. |
-| [OH_NativeImage_GetTimestamp](_o_h___native_image.md#oh_nativeimage_gettimestamp) (OH_NativeImage \*image) | 获取最近调用OH_NativeImage_UpdateSurfaceImage的纹理图像的相关时间戳. |
-| [OH_NativeImage_GetTransformMatrix](_o_h___native_image.md#oh_nativeimage_gettransformmatrix) (OH_NativeImage \*image, float matrix[16]) | 获取最近调用OH_NativeImage_UpdateSurfaceImage的纹理图像的变化矩阵. |
-| [OH_NativeImage_Destroy](_o_h___native_image.md#oh_nativeimage_destroy) (OH_NativeImage \*\*image) | 销毁通过OH_NativeImage_Create创建的**OH_NativeImage**实例, 销毁后该 **OH_NativeImage**指针会被赋值为空. |
+| [OH_NativeImage_Create](_o_h___native_image.md#oh_nativeimage_create) (uint32_t textureId, uint32_t textureTarget) | 创建一个**OH_NativeImage**实例,该实例与OpenGL ES的纹理ID和纹理目标相关联 |
+| [OH_NativeImage_AcquireNativeWindow](_o_h___native_image.md#oh_nativeimage_acquirenativewindow) (OH_NativeImage \*image) | 获取与OH_NativeImage相关联的OHNativeWindow指针. 该OHNativeWindow后续不再需要时需要调用
OH_NativeWindow_DestroyNativeWindow释放 |
+| [OH_NativeImage_AttachContext](_o_h___native_image.md#oh_nativeimage_attachcontext) (OH_NativeImage \*image, uint32_t textureId) | 将OH_NativeImage实例附加到当前OpenGL ES上下文, 且该OpenGL ES纹理会绑定到
GL_TEXTURE_EXTERNAL_OES, 并通过OH_NativeImage进行更新 |
+| [OH_NativeImage_DetachContext](_o_h___native_image.md#oh_nativeimage_detachcontext) (OH_NativeImage \*image) | 将OH_NativeImage实例从当前OpenGL ES上下文分离 |
+| [OH_NativeImage_UpdateSurfaceImage](_o_h___native_image.md#oh_nativeimage_updatesurfaceimage) (OH_NativeImage \*image) | 通过OH_NativeImage获取最新帧更新相关联的OpenGL ES纹理 |
+| [OH_NativeImage_GetTimestamp](_o_h___native_image.md#oh_nativeimage_gettimestamp) (OH_NativeImage \*image) | 获取最近调用OH_NativeImage_UpdateSurfaceImage的纹理图像的相关时间戳 |
+| [OH_NativeImage_GetTransformMatrix](_o_h___native_image.md#oh_nativeimage_gettransformmatrix) (OH_NativeImage \*image, float matrix[16]) | 获取最近调用OH_NativeImage_UpdateSurfaceImage的纹理图像的变化矩阵 |
+| [OH_NativeImage_Destroy](_o_h___native_image.md#oh_nativeimage_destroy) (OH_NativeImage \*\*image) | 销毁通过OH_NativeImage_Create创建的**OH_NativeImage**实例, 销毁后该
**OH_NativeImage**指针会被赋值为空 |
diff --git a/zh-cn/application-dev/reference/native-apis/native__vsync_8h.md b/zh-cn/application-dev/reference/native-apis/native__vsync_8h.md
index ff8a87ffac15a545774042280b1b93f8793ff3eb..f127e04ce8e7028d9ce1a9d27547577d59df05c2 100644
--- a/zh-cn/application-dev/reference/native-apis/native__vsync_8h.md
+++ b/zh-cn/application-dev/reference/native-apis/native__vsync_8h.md
@@ -3,13 +3,13 @@
## 概述
-定义获取和使用NativeVsync的相关函数。
+定义获取和使用NativeVsync的相关函数
-**起始版本:**
+**起始版本:**
-8
+9
-**相关模块:**
+**相关模块:**
[NativeVsync](_native_vsync.md)
@@ -17,10 +17,18 @@
## 汇总
+### 类型定义
+
+| 类型名称 | 描述 |
+| -------- | -------- |
+| [OH_NativeVSync](_native_vsync.md#oh_nativevsync) | 提供OH_NativeVSync结构体声明 |
+| (\*[OH_NativeVSync_FrameCallback](_native_vsync.md#oh_nativevsync_framecallback)) (long long timestamp, void \*data) | VSync回调函数类型 |
+
+
### 函数
| 函数名称 | 描述 |
| -------- | -------- |
-| [OH_NativeVSync_Create](_native_vsync.md#oh_nativevsync_create) (const char \*name, unsigned int length) | 创建一个OH_NativeVSync实例,每次调用都会产生一个新的实例。 |
-| [OH_NativeVSync_Destroy](_native_vsync.md#oh_nativevsync_destroy) (OH_NativeVSync \*nativeVsync) | 销毁OH_NativeVSync实例。 |
-| [OH_NativeVSync_RequestFrame](_native_vsync.md#oh_nativevsync_requestframe) (OH_NativeVSync \*nativeVsync, OH_NativeVSync_FrameCallback callback, void \*data) | 请求下一次vsync信号,当信号到来时,调用回调函数callback。 |
+| [OH_NativeVSync_Create](_native_vsync.md#oh_nativevsync_create) (const char \*name, unsigned int length) | 创建一个OH_NativeVSync实例,每次调用都会产生一个新的实例 |
+| [OH_NativeVSync_Destroy](_native_vsync.md#oh_nativevsync_destroy) (OH_NativeVSync \*nativeVsync) | 销毁OH_NativeVSync实例 |
+| [OH_NativeVSync_RequestFrame](_native_vsync.md#oh_nativevsync_requestframe) (OH_NativeVSync \*nativeVsync, OH_NativeVSync_FrameCallback callback, void \*data) | 请求下一次vsync信号,当信号到来时,调用回调函数callback |