@@ -18,61 +17,97 @@ Provides the native window capability for connection to the EGL.
...
@@ -18,61 +17,97 @@ Provides the native window capability for connection to the EGL.
### Files
### Files
| Name| Description|
| Name| Description|
| -------- | -------- |
| -------- | -------- |
| [external_window.h](external__window_8h.md) | Defines the functions for obtaining and using a native window.<br>File to include: <native_window/external_window.h>|
| [external_window.h](external__window_8h.md) | Declares the functions for obtaining and using **NativeWindow**.<br>File to include: <native_window/external_window.h> |
### Structs
### Structs
| Name| Description|
| Name| Description|
| -------- | -------- |
| -------- | -------- |
| [Region](_region.md) | Defines the rectangle (dirty region) where the content is to be updated in the local native window.|
| [Region](_region.md) | Defines the rectangle (dirty region) where the content is to be updated in the local **OHNativeWindow**.|
| [OHHDRMetaData<sup>(deprecated)](_o_h_h_d_r_meta_data.md) | Defines the HDR metadata. This struct is deprecated since API version 9 and is expected to be deleted from API version 14.|
| [OHHDRMetaData](_o_h_h_d_r_meta_data.md) | Defines the HDR metadata.|
| [OHExtDataHandle<sup>(deprecated)](_o_h_ext_data_handle.md) | Defines the extended data handle. This struct is deprecated since API version 9 and is expected to be deleted from API version 14.|
| [OHExtDataHandle](_o_h_ext_data_handle.md) | Defines the extended data handle.|
### Types
### Types
| Name| Description|
| Name| Description|
| -------- | -------- |
| -------- | -------- |
| OHNativeWindow | Provides the function of accessing the **NativeWindow**.|
| [OHNativeWindow](#ohnativewindow) | Provides the capability of accessing the **OHNativeWindow**.|
| OHNativeWindowBuffer | Provides the function of accessing the **NativeWindow**.|
| [OHNativeWindowBuffer](#ohnativewindowbuffer) | Provides the capability of accessing the **OHNativeWindowBuffer**.|
| Region | Defines the rectangle (dirty region) where the content is to be updated in the local native window.|
| [Region](#region) | Defines the rectangle (dirty region) where the content is to be updated in the local **OHNativeWindow**.|
### Enums
### Enums
| Name| Description|
| Name| Description|
| -------- | -------- |
| -------- | -------- |
| [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 } | Enumerates the operation codes in the **OH_NativeWindow_NativeWindowHandleOpt** function.|
| [NativeWindowOperation](#nativewindowoperation) {<br>SET_BUFFER_GEOMETRY, GET_BUFFER_GEOMETRY, GET_FORMAT, SET_FORMAT,<br>GET_USAGE, SET_USAGE, SET_STRIDE, GET_STRIDE,<br>SET_SWAP_INTERVAL, GET_SWAP_INTERVAL, SET_TIMEOUT, GET_TIMEOUT,<br>SET_COLOR_GAMUT, GET_COLOR_GAMUT, SET_TRANSFORM, GET_TRANSFORM,<br>SET_UI_TIMESTAMP<br>} | Enumerates the operation codes in the **OH_NativeWindow_NativeWindowHandleOpt** function.|
| [OHScalingMode<sup>(deprecated)](#ohscalingmode) { OH_SCALING_MODE_FREEZE = 0, OH_SCALING_MODE_SCALE_TO_WINDOW, OH_SCALING_MODE_SCALE_CROP, OH_SCALING_MODE_NO_SCALE_CROP } | Enumerates the scaling modes. This enum is deprecated since API version 9 and is expected to be deleted from API version 14.|
| [OH_NativeWindow_CreateNativeWindow](#oh_nativewindow_createnativewindow)(void\*pSurface) | Creates a**NativeWindow** instance. A new **NativeWindow** instance is created each time this function is called.|
| [OH_NativeWindow_CreateNativeWindow](#oh_nativewindow_createnativewindow)(void\*pSurface) | Creates an **OHNativeWindow** instance. A new **OHNativeWindow** instance is created each time this function is called.|
| [OH_NativeWindow_DestroyNativeWindow](#oh_nativewindow_destroynativewindow)(OHNativeWindow\*window) | Decreases the reference count of a**NativeWindow** instance by 1 and when the reference count reaches 0, destroys the instance.|
| [OH_NativeWindow_DestroyNativeWindow](#oh_nativewindow_destroynativewindow)(OHNativeWindow\*window) | Decreases the reference count of an **OHNativeWindow** instance by 1 and when the reference count reaches 0, destroys the instance.|
| [OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer](#oh_nativewindow_createnativewindowbufferfromsurfacebuffer)(void\*pSurfaceBuffer) | Creates a**NativeWindowBuffer** instance. A new **NativeWindowBuffer** instance is created each time this function is called.|
| [OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer](#oh_nativewindow_createnativewindowbufferfromsurfacebuffer)(void\*pSurfaceBuffer) | Creates an **OHNativeWindowBuffer** instance. A new **OHNativeWindowBuffer** instance is created each time this function is called.|
| [OH_NativeWindow_DestroyNativeWindowBuffer](#oh_nativewindow_destroynativewindowbuffer)(OHNativeWindowBuffer\*buffer) | Decreases the reference count of a**NativeWindowBuffer** instance by 1 and when the reference count reaches 0, destroys the instance.|
| [OH_NativeWindow_DestroyNativeWindowBuffer](#oh_nativewindow_destroynativewindowbuffer)(OHNativeWindowBuffer\*buffer) | Decreases the reference count of an **OHNativeWindowBuffer** instance by 1 and when the reference count reaches 0, destroys the instance.|
| [OH_NativeWindow_NativeWindowRequestBuffer](#oh_nativewindow_nativewindowrequestbuffer)(OHNativeWindow\*window, OHNativeWindowBuffer \*\*buffer, int \*fenceFd) | Requests a**NativeWindowBuffer** through a **NativeWindow** instance for content production.|
| [OH_NativeWindow_NativeWindowRequestBuffer](#oh_nativewindow_nativewindowrequestbuffer)(OHNativeWindow\*window, OHNativeWindowBuffer \*\*buffer, int \*fenceFd) | Requests an **OHNativeWindowBuffer** through an **OHNativeWindow** instance for content production.|
| [OH_NativeWindow_NativeWindowFlushBuffer](#oh_nativewindow_nativewindowflushbuffer)(OHNativeWindow\*window, OHNativeWindowBuffer \*buffer, int fenceFd, [Region](_region.md) region) | Flushes the **NativeWindowBuffer** filled with the content to the buffer queue through a **NativeWindow** instance for content consumption.|
| [OH_NativeWindow_NativeWindowFlushBuffer](#oh_nativewindow_nativewindowflushbuffer)(OHNativeWindow\*window, OHNativeWindowBuffer \*buffer, int fenceFd, Region region) | Flushes the **OHNativeWindowBuffer** filled with the content to the buffer queue through an **OHNativeWindow** instance for content consumption.|
| [OH_NativeWindow_NativeWindowAbortBuffer](#oh_nativewindow_nativewindowabortbuffer)(OHNativeWindow\*window, OHNativeWindowBuffer \*buffer) | Returns the **NativeWindowBuffer** to the buffer queue through a **NativeWindow** instance, without filling in any content. The **NativeWindowBuffer** can be used for another request.|
| [OH_NativeWindow_NativeWindowAbortBuffer](#oh_nativewindow_nativewindowabortbuffer)(OHNativeWindow\*window, OHNativeWindowBuffer \*buffer) | Returns the **OHNativeWindowBuffer** to the buffer queue through an **OHNativeWindow** instance, without filling in any content. The **OHNativeWindowBuffer** can be used for a new request.|
| [OH_NativeWindow_NativeWindowHandleOpt](#oh_nativewindow_nativewindowhandleopt)(OHNativeWindow\*window, int code,...) | Sets or obtains the attributes of a native window, including the width, height, and content format.|
| [OH_NativeWindow_NativeWindowHandleOpt](#oh_nativewindow_nativewindowhandleopt)(OHNativeWindow\*window, int code,...) | Sets or obtains the attributes of an **OHNativeWindow**, including the width, height, and content format.|
| [OH_NativeWindow_GetBufferHandleFromNative](#oh_nativewindow_getbufferhandlefromnative)(OHNativeWindowBuffer\*buffer) | Obtains the pointer to a **BufferHandle** of a**NativeWindowBuffer** instance.|
| [OH_NativeWindow_GetBufferHandleFromNative](#oh_nativewindow_getbufferhandlefromnative)(OHNativeWindowBuffer\*buffer) | Obtains the pointer to a **BufferHandle** of an **OHNativeWindowBuffer** instance.|
| [OH_NativeWindow_NativeObjectReference](#oh_nativewindow_nativeobjectreference)(void\*obj) | Adds the reference count of a native object.|
| [OH_NativeWindow_NativeObjectReference](#oh_nativewindow_nativeobjectreference)(void\*obj) | Adds the reference count of a native object.|
| [OH_NativeWindow_NativeObjectUnreference](#oh_nativewindow_nativeobjectunreference)(void\*obj) | Decreases the reference count of a native object and when the reference count reaches 0, destroys this object.|
| [OH_NativeWindow_NativeObjectUnreference](#oh_nativewindow_nativeobjectunreference)(void\*obj) | Decreases the reference count of a native object and when the reference count reaches 0, destroys this object.|
| [OH_NativeWindow_GetNativeObjectMagic](#oh_nativewindow_getnativeobjectmagic)(void\*obj) | Obtains the magic ID of a native object.|
| [OH_NativeWindow_GetNativeObjectMagic](#oh_nativewindow_getnativeobjectmagic)(void\*obj) | Obtains the magic ID of a native object.|
| [OH_NativeWindow_NativeWindowSetScalingMode<sup>(deprecated)](#oh_nativewindow_nativewindowsetscalingmode)(OHNativeWindow\*window, uint32_t sequence, [OHScalingMode](#ohscalingmode) scalingMode) | Sets the scaling mode for a native window. This function is deprecated since API version 9 and is expected to be deleted from API version 14.|
| [OH_NativeWindow_NativeWindowSetScalingMode](#oh_nativewindow_nativewindowsetscalingmode)(OHNativeWindow\*window, uint32_t sequence, OHScalingMode scalingMode) | Sets a scaling mode for an **OHNativeWindow**.|
| [OH_NativeWindow_NativeWindowSetMetaData<sup>(deprecated)](#oh_nativewindow_nativewindowsetmetadata)(OHNativeWindow\*window, uint32_t sequence, int32_t size, const [OHHDRMetaData](_o_h_h_d_r_meta_data.md)\*metaData) | Sets the metadata for a native window. This function is deprecated since API version 9 and is expected to be deleted from API version 14.|
| [OH_NativeWindow_NativeWindowSetMetaData](#oh_nativewindow_nativewindowsetmetadata)(OHNativeWindow\*window, uint32_t sequence, int32_t size, const OHHDRMetaData \*metaData) | Sets metadata for an **OHNativeWindow**.|
| [OH_NativeWindow_NativeWindowSetMetaDataSet<sup>(deprecated)](#oh_nativewindow_nativewindowsetmetadataset)(OHNativeWindow\*window, uint32_t sequence, [OHHDRMetadataKey](#ohhdrmetadatakey) key, int32_t size, const uint8_t \*metaData) | Sets the metadata set for a native window. This function is deprecated since API version 9 and is expected to be deleted from API version 14.|
| [OH_NativeWindow_NativeWindowSetMetaDataSet](#oh_nativewindow_nativewindowsetmetadataset)(OHNativeWindow*window, uint32_t sequence, OHHDRMetadataKey key, int32_t size, const uint8_t \*metaData) | Sets a metadata set for an **OHNativeWindow**.|
| [OH_NativeWindow_NativeWindowSetTunnelHandle<sup>(deprecated)](#oh_nativewindow_nativewindowsettunnelhandle)(OHNativeWindow\*window, const [OHExtDataHandle](_o_h_ext_data_handle.md)\*handle) | Sets a tunnel handle for a native window. This function is deprecated since API version 9 and is expected to be deleted from API version 14.|
| [OH_NativeWindow_NativeWindowSetTunnelHandle](#oh_nativewindow_nativewindowsettunnelhandle)(OHNativeWindow\*window, const OHExtDataHandle \*handle) | Sets a tunnel handle to an **OHNativeWindow**.|
## Type Description
### OHNativeWindow
```
typedef struct NativeWindow OHNativeWindow
```
**Description**
Provides the capability of accessing the **OHNativeWindow**.
Provides the capability of accessing the **OHNativeWindowBuffer**.
### Region
```
typedef struct Region Region
```
**Description**
Defines the rectangle (dirty region) where the content is to be updated in the local **OHNativeWindow**.
## Enum Description
## Enum Description
...
@@ -89,14 +124,14 @@ enum NativeWindowOperation
...
@@ -89,14 +124,14 @@ enum NativeWindowOperation
Enumerates the operation codes in the **OH_NativeWindow_NativeWindowHandleOpt** function.
Enumerates the operation codes in the **OH_NativeWindow_NativeWindowHandleOpt** function.
| Value| Description|
| Value| Description|
| -------- | -------- |
| -------- | -------- |
| SET_BUFFER_GEOMETRY | Setting the geometry for the local window buffer.<br>Variable arguments in the function: [Input] int32_t height and [Input] int32_t width.|
| SET_BUFFER_GEOMETRY | Setting the geometry for the local window buffer.<br>Variable arguments in the function: [Input] int32_t height and [Input] int32_t width.|
| GET_BUFFER_GEOMETRY | Obtaining the geometry of the local window buffer.<br>Variable arguments in the function: [Output] int32_t *height and [Output] int32_t *width.|
| GET_BUFFER_GEOMETRY | Obtaining the geometry of the local window buffer.<br>Variable arguments in the function: [Output] int32_t *height and [Output] int32_t *width.|
| GET_FORMAT | Obtaining the format of the local window buffer.<br>Variable argument in the function: [Output] int32_t *format.|
| GET_FORMAT | Obtaining the format of the local window buffer.<br>Variable argument in the function: [Output] int32_t *format.|
| SET_FORMAT | Setting the format for the local window buffer.<br>Variable argument in the function: [Input] int32_t format.|
| SET_FORMAT | Setting the format for the local window buffer.<br>Variable argument in the function: [Input] int32_t format.|
| GET_USAGE | Obtaining the usage mode of the local window buffer.<br>Variable argument in the function: [Output] int32_t *usage.|
| GET_USAGE | Obtaining the usage mode of the local window buffer.<br>Variable argument in the function: [Output] int32_t *usage.|
| SET_USAGE | Setting the usage mode of the local window buffer.<br>Variable argument in the function: [Input] int32_t usage.|
| SET_USAGE | Setting the usage mode for the local window buffer.<br>Variable argument in the function: [Input] int32_t usage.|
| SET_STRIDE | Setting the stride for the local window buffer.<br>Variable argument in the function: [Input] int32_t stride.|
| SET_STRIDE | Setting the stride for the local window buffer.<br>Variable argument in the function: [Input] int32_t stride.|
| GET_STRIDE | Obtaining the stride of the local window buffer.<br>Variable argument in the function: [Output] int32_t *stride.|
| GET_STRIDE | Obtaining the stride of the local window buffer.<br>Variable argument in the function: [Output] int32_t *stride.|
| SET_SWAP_INTERVAL | Setting the swap interval for the local window buffer.<br>Variable argument in the function: [Input] int32_t interval.|
| SET_SWAP_INTERVAL | Setting the swap interval for the local window buffer.<br>Variable argument in the function: [Input] int32_t interval.|
...
@@ -110,7 +145,7 @@ Enumerates the operation codes in the **OH_NativeWindow_NativeWindowHandleOpt**
...
@@ -110,7 +145,7 @@ Enumerates the operation codes in the **OH_NativeWindow_NativeWindowHandleOpt**
| SET_UI_TIMESTAMP | Setting the UI timestamp for the local window buffer.<br>Variable argument in the function: [Input] uint64_t uiTimestamp.|
| SET_UI_TIMESTAMP | Setting the UI timestamp for the local window buffer.<br>Variable argument in the function: [Input] uint64_t uiTimestamp.|
### OHHDRMetadataKey<sup>(deprecated)
### OHHDRMetadataKey
```
```
...
@@ -119,9 +154,17 @@ enum OHHDRMetadataKey
...
@@ -119,9 +154,17 @@ enum OHHDRMetadataKey
**Description**
**Description**
Enumerates the HDR metadata keys. This enum is deprecated since API version 9 and is expected to be deleted from API version 14.
Enumerates the HDR metadata keys.
**Since**
9
**Deprecated**
| Value| Description|
This enum is deprecated since API version 10. No substitute enum is provided.
| Value| Description|
| -------- | -------- |
| -------- | -------- |
| OH_METAKEY_RED_PRIMARY_X | X coordinate of the red primary color.|
| OH_METAKEY_RED_PRIMARY_X | X coordinate of the red primary color.|
| OH_METAKEY_RED_PRIMARY_Y | Y coordinate of the red primary color.|
| OH_METAKEY_RED_PRIMARY_Y | Y coordinate of the red primary color.|
...
@@ -139,7 +182,7 @@ Enumerates the HDR metadata keys. This enum is deprecated since API version 9 an
...
@@ -139,7 +182,7 @@ Enumerates the HDR metadata keys. This enum is deprecated since API version 9 an
| OH_METAKEY_HDR_VIVID | Vivid |
| OH_METAKEY_HDR_VIVID | Vivid |
### OHScalingMode<sup>(deprecated)
### OHScalingMode
```
```
...
@@ -148,9 +191,17 @@ enum OHScalingMode
...
@@ -148,9 +191,17 @@ enum OHScalingMode
**Description**
**Description**
Enumerates the scaling modes. This enum is deprecated since API version 9 and is expected to be deleted from API version 14.
Enumerates the scaling modes.
**Since**
9
**Deprecated**
This enum is deprecated since API version 10. No substitute enum is provided.
| Value| Description|
| Value| Description|
| -------- | -------- |
| -------- | -------- |
| OH_SCALING_MODE_FREEZE | The window content cannot be updated before the buffer of the window size is received.|
| OH_SCALING_MODE_FREEZE | The window content cannot be updated before the buffer of the window size is received.|
| OH_SCALING_MODE_SCALE_TO_WINDOW | The buffer is scaled in two dimensions to match the window size.|
| OH_SCALING_MODE_SCALE_TO_WINDOW | The buffer is scaled in two dimensions to match the window size.|
Returns the **NativeWindowBuffer** to the buffer queue through a **NativeWindow** instance, without filling in any content. The **NativeWindowBuffer** can be used for another request.
Returns the **OHNativeWindowBuffer** to the buffer queue through an **OHNativeWindow** instance, without filling in any content. The **OHNativeWindowBuffer** can be used for a new request.
Defines the rectangle (dirty region) where the content is to be updated in the local native window.
The **Region** module defines the rectangle (dirty region) where the content is to be updated in the local NativeWindow.
**Related Modules:**
**Since**
8
**Related Modules**
[NativeWindow](_native_window.md)
[NativeWindow](_native_window.md)
...
@@ -13,16 +17,12 @@ Defines the rectangle (dirty region) where the content is to be updated in the l
...
@@ -13,16 +17,12 @@ Defines the rectangle (dirty region) where the content is to be updated in the l
## Summary
## Summary
### Member Variables
### Member Variables
| Name | Description |
| Name| Description|
| -------- | -------- |
| -------- | -------- |
| [rects](#rects) | If **rects** is a null pointer, the buffer size is the same as the size of the dirty region by default. |
| [*rects](#rects) | If **rects** is a null pointer, the buffer size is the same as the size of the dirty region by default.|
| [rectNumber](#rectnumber) | If **rectNumber** is **0**, the buffer size is the same as the size of the dirty region by default. |
| [rectNumber](#rectnumber) | If **rectNumber** is **0**, the buffer size is the same as the size of the dirty region by default.|
## Member Variable Description
### rectNumber
### rectNumber
...
@@ -31,17 +31,19 @@ Defines the rectangle (dirty region) where the content is to be updated in the l
...
@@ -31,17 +31,19 @@ Defines the rectangle (dirty region) where the content is to be updated in the l
```
```
int32_t Region::rectNumber
int32_t Region::rectNumber
```
```
**Description**<br>
**Description**
If **rectNumber** is **0**, the buffer size is the same as the size of the dirty region by default.
If **rectNumber** is **0**, the buffer size is the same as the size of the dirty region by default.
### *rects
### \*rects
```
```
struct Rect Region::*rects
struct Rect Region::*rects
```
```
**Description**<br>
**Description**
If **rects** is a null pointer, the buffer size is the same as the size of the dirty region by default.
<!--no_check-->
Pointer to the struct. The type is [Rect](_rect.md). If **rects** is a null pointer, the buffer size is the same as the size of the dirty region by default.
| [OH_NativeWindow_CreateNativeWindow](_native_window.md#oh_nativewindow_createnativewindow)(void\*pSurface) | [OHNativeWindow](_native_window.md)\*<br/>Creates a **NativeWindow** instance. A new **NativeWindow** instance is created each time this function is called. |
| [OH_NativeWindow_CreateNativeWindow](_native_window.md#oh_nativewindow_createnativewindow)(void\*pSurface) | Creates an **OHNativeWindow** instance. A new **OHNativeWindow** instance is created each time this function is called.|
| [OH_NativeWindow_DestroyNativeWindow](_native_window.md#oh_nativewindow_destroynativewindow)([OHNativeWindow](_native_window.md)\*window) | Decreases the reference count of a **NativeWindow** instance by 1 and when the reference count reaches 0, destroys the instance. |
| [OH_NativeWindow_DestroyNativeWindow](_native_window.md#oh_nativewindow_destroynativewindow)(OHNativeWindow\*window) | Decreases the reference count of an **OHNativeWindow** instance by 1 and when the reference count reaches 0, destroys the instance.|
| [OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer](_native_window.md#oh_nativewindow_createnativewindowbufferfromsurfacebuffer)(void\*pSurfaceBuffer) | [OHNativeWindowBuffer](_native_window.md)\*<br/>Creates a **NativeWindowBuffer** instance. A new **NativeWindowBuffer** instance is created each time this function is called. |
| [OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBuffer](_native_window.md#oh_nativewindow_createnativewindowbufferfromsurfacebuffer)(void\*pSurfaceBuffer) | Creates an **OHNativeWindowBuffer** instance. A new **OHNativeWindowBuffer** instance is created each time this function is called.|
| [OH_NativeWindow_DestroyNativeWindowBuffer](_native_window.md#oh_nativewindow_destroynativewindowbuffer)([OHNativeWindowBuffer](_native_window.md)\*buffer) | Decreases the reference count of a **NativeWindowBuffer** instance by 1 and when the reference count reaches 0, destroys the instance. |
| [OH_NativeWindow_DestroyNativeWindowBuffer](_native_window.md#oh_nativewindow_destroynativewindowbuffer)(OHNativeWindowBuffer\*buffer) | Decreases the reference count of an **OHNativeWindowBuffer** instance by 1 and when the reference count reaches 0, destroys the instance.|
| [OH_NativeWindow_NativeWindowRequestBuffer](_native_window.md#oh_nativewindow_nativewindowrequestbuffer)([OHNativeWindow](_native_window.md)\*window, [OHNativeWindowBuffer](_native_window.md)\*\*buffer, int \*fenceFd) | Requests a **NativeWindowBuffer** through a **NativeWindow** instance for content production. |
| [OH_NativeWindow_NativeWindowRequestBuffer](_native_window.md#oh_nativewindow_nativewindowrequestbuffer)(OHNativeWindow\*window, OHNativeWindowBuffer \*\*buffer, int \*fenceFd) | Requests an **OHNativeWindowBuffer** through an **OHNativeWindow** instance for content production.|
| [OH_NativeWindow_NativeWindowFlushBuffer](_native_window.md#oh_nativewindow_nativewindowflushbuffer)([OHNativeWindow](_native_window.md)\*window, [OHNativeWindowBuffer](_native_window.md)\*buffer, int fenceFd, [Region](_region.md) region) | Flushes the **NativeWindowBuffer** filled with the content to the buffer queue through a **NativeWindow** instance for content consumption. |
| [OH_NativeWindow_NativeWindowFlushBuffer](_native_window.md#oh_nativewindow_nativewindowflushbuffer)(OHNativeWindow\*window, OHNativeWindowBuffer \*buffer, int fenceFd, Region region) | Flushes the **OHNativeWindowBuffer** filled with the content to the buffer queue through an **OHNativeWindow** instance for content consumption.|
| [OH_NativeWindow_NativeWindowAbortBuffer](_native_window.md#oh_nativewindow_nativewindowabortbuffer)([OHNativeWindow](_native_window.md)\*window, [OHNativeWindowBuffer](_native_window.md)\*buffer) | Returns the **NativeWindowBuffer** to the buffer queue through a **NativeWindow** instance, without filling in any content. The **NativeWindowBuffer** can be used for another request. |
| [OH_NativeWindow_NativeWindowAbortBuffer](_native_window.md#oh_nativewindow_nativewindowabortbuffer)(OHNativeWindow\*window, OHNativeWindowBuffer \*buffer) | Returns the **OHNativeWindowBuffer** to the buffer queue through an **OHNativeWindow** instance, without filling in any content. The **OHNativeWindowBuffer** can be used for a new request.|
| [OH_NativeWindow_NativeWindowHandleOpt](_native_window.md#oh_nativewindow_nativewindowhandleopt)([OHNativeWindow](_native_window.md)\*window, int code,...) | Sets or obtains the attributes of a native window, including the width, height, and content format. |
| [OH_NativeWindow_NativeWindowHandleOpt](_native_window.md#oh_nativewindow_nativewindowhandleopt)(OHNativeWindow*window, int code,...) | Sets or obtains the attributes of an **OHNativeWindow**, including the width, height, and content format.|
| [OH_NativeWindow_GetBufferHandleFromNative](_native_window.md#oh_nativewindow_getbufferhandlefromnative)([OHNativeWindowBuffer](_native_window.md)\*buffer) | Obtains the pointer to a **BufferHandle** of a **NativeWindowBuffer** instance. |
| [OH_NativeWindow_GetBufferHandleFromNative](_native_window.md#oh_nativewindow_getbufferhandlefromnative)(OHNativeWindowBuffer\*buffer) | Obtains the pointer to a **BufferHandle** of an **OHNativeWindowBuffer** instance.|
| [OH_NativeWindow_NativeObjectReference](_native_window.md#oh_nativewindow_nativeobjectreference)(void\*obj) | Adds the reference count of a native object. |
| [OH_NativeWindow_NativeObjectReference](_native_window.md#oh_nativewindow_nativeobjectreference)(void\*obj) | Adds the reference count of a native object.|
| [OH_NativeWindow_NativeObjectUnreference](_native_window.md#oh_nativewindow_nativeobjectunreference)(void\*obj) | Decreases the reference count of a native object and when the reference count reaches 0, destroys this object. |
| [OH_NativeWindow_NativeObjectUnreference](_native_window.md#oh_nativewindow_nativeobjectunreference)(void\*obj) | Decreases the reference count of a native object and when the reference count reaches 0, destroys this object.|
| [OH_NativeWindow_GetNativeObjectMagic](_native_window.md#oh_nativewindow_getnativeobjectmagic)(void\*obj) | Obtains the magic ID of a native object. |
| [OH_NativeWindow_GetNativeObjectMagic](_native_window.md#oh_nativewindow_getnativeobjectmagic)(void\*obj) | Obtains the magic ID of a native object.|
| [OH_NativeWindow_NativeWindowSetScalingMode](_native_window.md#oh_nativewindow_nativewindowsetscalingmode)([OHNativeWindow](_native_window.md)\*window, uint32_t sequence, [OHScalingMode](_native_window.md#ohscalingmode) scalingMode) | Sets the scaling mode for a native window. |
| [OH_NativeWindow_NativeWindowSetScalingMode](_native_window.md#oh_nativewindow_nativewindowsetscalingmode)(OHNativeWindownative_window.md#ohscalingmode) scalingMode) | Sets a scaling mode for an **OHNativeWindow**.|
| [OH_NativeWindow_NativeWindowSetMetaData](_native_window.md#oh_nativewindow_nativewindowsetmetadata)([OHNativeWindow](_native_window.md)\*window, uint32_t sequence, int32_t size, const [OHHDRMetaData](_o_h_h_d_r_meta_data.md)\*metaData) | Sets the metadata for a native window. |
| [OH_NativeWindow_NativeWindowSetMetaData](_native_window.md#oh_nativewindow_nativewindowsetmetadata)(OHNativeWindow\*window, uint32_t sequence, int32_t size, const OHHDRMetaData \*metaData) | Sets metadata for an **OHNativeWindow**.|
| [OH_NativeWindow_NativeWindowSetMetaDataSet](_native_window.md#oh_nativewindow_nativewindowsetmetadataset)([OHNativeWindow](_native_window.md)\*window, uint32_t sequence, [OHHDRMetadataKey](_native_window.md#ohhdrmetadatakey) key, int32_t size, const uint8_t \*metaData) | Sets the metadata set for a native window. |
| [OH_NativeWindow_NativeWindowSetMetaDataSet](_native_window.md#oh_nativewindow_nativewindowsetmetadataset)(OHNativeWindow\*window, uint32_t sequence, OHHDRMetadataKey key, int32_t size, const uint8_t \*metaData) | Sets a metadata set for an **OHNativeWindow**.|
| [OH_NativeWindow_NativeWindowSetTunnelHandle](_native_window.md#oh_nativewindow_nativewindowsettunnelhandle)([OHNativeWindow](_native_window.md)\*window, const [OHExtDataHandle](_o_h_ext_data_handle.md)\*handle) | Sets a tunnel handle for a native window. |
| [OH_NativeWindow_NativeWindowSetTunnelHandle](_native_window.md#oh_nativewindow_nativewindowsettunnelhandle)(OHNativeWindow\*window, const OHExtDataHandle \*handle) | Sets a tunnel handle to an **OHNativeWindow**.|