Module native_window

Module native_window 

Source
Available on crate feature native_window only.
Expand description

Native Window bindings

The native window module is a local platform-based window that represents the producer of a graphics queue. It provides APIs for you to request and flush a buffer and configure buffer attributes. The following scenarios are common for native window development:

  • Request a graphics buffer by using the native window API, write the produced graphics content to the buffer, and flush the buffer to the graphics queue.
  • Request and flush a buffer when adapting to the eglswapbuffer interface at the EGL.

Source:

English Documentation Chinese Documentation

Modules§

NativeWindowOperation

Structs§

BufferHandle
Buffer handle used to transfer and obtain information about the buffer.
OHExtDataHandle
Defines the ExtData Handle
OHHDRMetaData
Defines the HDR metadata.
OHHDRMetadataKey
Enumerates the HDR metadata keys.
OHScalingMode
Indicates Scaling Mode.
OHScalingModeV2api-12
Indicates Scaling Mode.
OHSurfaceSourceapi-12
Indicates the source type of surface.
Region
indicates a dirty region where content is updated.
Region_Rect
if rects is nullptr, fill the Buffer dirty size by default
__IncompleteArrayField

Functions§

OH_NativeWindow_CleanCacheapi-19
Clean all OHNativeWindowBuffer caches of this OHNativeWindow This interface is a non-thread-safe type interface.
OH_NativeWindow_CreateNativeWindowDeprecated
Creates a OHNativeWindow instance. A new OHNativeWindow instance is created each time this function is called.
OH_NativeWindow_CreateNativeWindowBufferFromNativeBufferapi-11
Creates a OHNativeWindowBuffer instance.
OH_NativeWindow_CreateNativeWindowBufferFromSurfaceBufferDeprecated
Creates a OHNativeWindowBuffer instance. A new OHNativeWindowBuffer instance is created each time this function is called.
OH_NativeWindow_CreateNativeWindowFromSurfaceIdapi-12
Creates an OHNativeWindow instance.
OH_NativeWindow_DestroyNativeWindow
Decreases the reference count of a OHNativeWindow instance by 1, and when the reference count reaches 0, destroys the instance.
OH_NativeWindow_DestroyNativeWindowBuffer
Decreases the reference count of a OHNativeWindowBuffer instance by 1 and, when the reference count reaches 0, destroys the instance.
OH_NativeWindow_GetBufferHandleFromNative
Obtains the pointer to a BufferHandle of a OHNativeWindowBuffer instance.
OH_NativeWindow_GetColorSpaceapi-12
Get the color space of the native window.
OH_NativeWindow_GetLastFlushedBufferDeprecatedapi-11
Get the last flushed OHNativeWindowBuffer from a OHNativeWindow instance.
OH_NativeWindow_GetLastFlushedBufferV2api-12
Get the last flushed OHNativeWindowBuffer from an OHNativeWindow instance.
OH_NativeWindow_GetMetadataValueapi-12
Set the metadata type of the native window.
OH_NativeWindow_GetNativeObjectMagic
Obtains the magic ID of a native object.
OH_NativeWindow_GetSurfaceIdapi-12
Get surfaceId from native window.
OH_NativeWindow_NativeObjectReference
Adds the reference count of a native object.
OH_NativeWindow_NativeObjectUnreference
Decreases the reference count of a native object and, when the reference count reaches 0, destroys this object.
OH_NativeWindow_NativeWindowAbortBuffer
Returns the OHNativeWindowBuffer to the buffer queue through a OHNativeWindow instance, without filling in any content. The OHNativeWindowBuffer can be used for another request.
OH_NativeWindow_NativeWindowAttachBufferapi-12
Attach a buffer to an OHNativeWindow instance.
OH_NativeWindow_NativeWindowDetachBufferapi-12
Detach a buffer from an OHNativeWindow instance.
OH_NativeWindow_NativeWindowFlushBuffer
Flushes the OHNativeWindowBuffer filled with the content to the buffer queue through a OHNativeWindow instance for content consumption.
OH_NativeWindow_NativeWindowHandleOpt
Sets or obtains the attributes of a native window, including the width, height, and content format.
OH_NativeWindow_NativeWindowRequestBuffer
Requests a OHNativeWindowBuffer through a OHNativeWindow instance for content production.
OH_NativeWindow_NativeWindowSetMetaData
Sets metaData of a native window.
OH_NativeWindow_NativeWindowSetMetaDataSet
Sets metaDataSet of a native window.
OH_NativeWindow_NativeWindowSetScalingMode
Sets scalingMode of a native window.
OH_NativeWindow_NativeWindowSetScalingModeV2api-12
Sets scalingMode of a native window.
OH_NativeWindow_NativeWindowSetTunnelHandle
Sets tunnel handle of a native window.
OH_NativeWindow_ReadFromParcelapi-12
Read an OHNativeWindow from an OHIPCParcel.
OH_NativeWindow_SetBufferHoldapi-12
Set native window buffer hold.
OH_NativeWindow_SetColorSpaceapi-12
Set the color space of the native window.
OH_NativeWindow_SetMetadataValueapi-12
Set the metadata type of the native window.
OH_NativeWindow_WriteToParcelapi-12
Write an OHNativeWindow to an OHIPCParcel.