external_window.h
Overview
Defines the functions for obtaining and using a native window.
Since: 8
Related Modules:
Summary
Structs
Name | Description |
---|---|
Region | Defines the rectangle (dirty region) where the content is to be updated in the local native window. |
Region::Rect | Rectangular area. |
OHHDRMetaData | Defines the HDR metadata. |
OHExtDataHandle | Defines the extended data handle. |
Types
Name | Description |
---|---|
OHNativeWindow | Provides the function of accessing the NativeWindow. |
OHNativeWindowBuffer | Provides the function of accessing the NativeWindowBuffer. |
Region | Defines the rectangle (dirty region) where the content is to be updated in the local native window. |
Enums
Functions
Name | Description |
---|---|
OH_NativeWindow_CreateNativeWindow (void *pSurface) | OHNativeWindow * Creates a NativeWindow instance. A new NativeWindow instance is created each time this function is called. |
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_CreateNativeWindowBufferFromSurfaceBuffer (void *pSurfaceBuffer) | OHNativeWindowBuffer * Creates a NativeWindowBuffer instance. A new NativeWindowBuffer instance is created each time this function is called. |
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_NativeWindowRequestBuffer (OHNativeWindow *window, OHNativeWindowBuffer **buffer, int *fenceFd) | Requests a NativeWindowBuffer through a NativeWindow instance for content production. |
OH_NativeWindow_NativeWindowFlushBuffer (OHNativeWindow *window, OHNativeWindowBuffer *buffer, int fenceFd, Region region) | Flushes the NativeWindowBuffer filled with the content to the buffer queue through a NativeWindow instance for content consumption. |
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_NativeWindowHandleOpt (OHNativeWindow *window, int code,...) | Sets or obtains the attributes of a native window, including the width, height, and content format. |
OH_NativeWindow_GetBufferHandleFromNative (OHNativeWindowBuffer *buffer) | Obtains the pointer to a BufferHandle of a NativeWindowBuffer instance. |
OH_NativeWindow_NativeObjectReference (void *obj) | Adds the reference count of a native object. |
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 (void *obj) | Obtains the magic ID of a native object. |
OH_NativeWindow_NativeWindowSetScalingMode (OHNativeWindow *window, uint32_t sequence, OHScalingMode scalingMode) | Sets the scaling mode for a native window. |
OH_NativeWindow_NativeWindowSetMetaData (OHNativeWindow *window, uint32_t sequence, int32_t size, const OHHDRMetaData *metaData) | Sets the metadata for a native window. |
OH_NativeWindow_NativeWindowSetMetaDataSet (OHNativeWindow *window, uint32_t sequence, OHHDRMetadataKey key, int32_t size, const uint8_t *metaData) | Sets the metadata set for a native window. |
OH_NativeWindow_NativeWindowSetTunnelHandle (OHNativeWindow *window, const OHExtDataHandle *handle) | Sets a tunnel handle for a native window. |