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
eglswapbufferinterface at the EGL.
Source:
Modules§
Structs§
- Buffer
Handle - Buffer handle used to transfer and obtain information about the buffer.
- OHExt
Data Handle - Defines the ExtData Handle
- OHHDR
Meta Data - Defines the HDR metadata.
- OHHDR
Metadata Key - Enumerates the HDR metadata keys.
- OHScaling
Mode - Indicates Scaling Mode.
- OHScaling
Mode V2 api-12 - Indicates Scaling Mode.
- OHSurface
Source api-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
- __
Incomplete Array Field
Functions§
- OH_
Native ⚠Window_ Clean Cache api-19 - Clean all OHNativeWindowBuffer caches of this OHNativeWindow This interface is a non-thread-safe type interface.
- OH_
Native ⚠Window_ Create Native Window Deprecated - Creates a OHNativeWindow instance. A new OHNativeWindow instance is created each time this function is called.
- OH_
Native ⚠Window_ Create Native Window Buffer From Native Buffer api-11 - Creates a OHNativeWindowBuffer instance.
- OH_
Native ⚠Window_ Create Native Window Buffer From Surface Buffer Deprecated - Creates a OHNativeWindowBuffer instance. A new OHNativeWindowBuffer instance is created each time this function is called.
- OH_
Native ⚠Window_ Create Native Window From Surface Id api-12 - Creates an OHNativeWindow instance.
- OH_
Native ⚠Window_ Destroy Native Window - Decreases the reference count of a OHNativeWindow instance by 1, and when the reference count reaches 0, destroys the instance.
- OH_
Native ⚠Window_ Destroy Native Window Buffer - Decreases the reference count of a OHNativeWindowBuffer instance by 1 and, when the reference count reaches 0, destroys the instance.
- OH_
Native ⚠Window_ GetBuffer Handle From Native - Obtains the pointer to a BufferHandle of a OHNativeWindowBuffer instance.
- OH_
Native ⚠Window_ GetColor Space api-12 - Get the color space of the native window.
- OH_
Native ⚠Window_ GetLast Flushed Buffer Deprecated api-11 - Get the last flushed OHNativeWindowBuffer from a OHNativeWindow instance.
- OH_
Native ⚠Window_ GetLast Flushed Buffer V2 api-12 - Get the last flushed OHNativeWindowBuffer from an OHNativeWindow instance.
- OH_
Native ⚠Window_ GetMetadata Value api-12 - Set the metadata type of the native window.
- OH_
Native ⚠Window_ GetNative Object Magic - Obtains the magic ID of a native object.
- OH_
Native ⚠Window_ GetSurface Id api-12 - Get surfaceId from native window.
- OH_
Native ⚠Window_ Native Object Reference - Adds the reference count of a native object.
- OH_
Native ⚠Window_ Native Object Unreference - Decreases the reference count of a native object and, when the reference count reaches 0, destroys this object.
- OH_
Native ⚠Window_ Native Window Abort Buffer - 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_
Native ⚠Window_ Native Window Attach Buffer api-12 - Attach a buffer to an OHNativeWindow instance.
- OH_
Native ⚠Window_ Native Window Detach Buffer api-12 - Detach a buffer from an OHNativeWindow instance.
- OH_
Native ⚠Window_ Native Window Flush Buffer - Flushes the OHNativeWindowBuffer filled with the content to the buffer queue through a OHNativeWindow instance for content consumption.
- OH_
Native ⚠Window_ Native Window Handle Opt - Sets or obtains the attributes of a native window, including the width, height, and content format.
- OH_
Native ⚠Window_ Native Window Request Buffer - Requests a OHNativeWindowBuffer through a OHNativeWindow instance for content production.
- OH_
Native ⚠Window_ Native Window SetMeta Data - Sets metaData of a native window.
- OH_
Native ⚠Window_ Native Window SetMeta Data Set - Sets metaDataSet of a native window.
- OH_
Native ⚠Window_ Native Window SetScaling Mode - Sets scalingMode of a native window.
- OH_
Native ⚠Window_ Native Window SetScaling Mode V2 api-12 - Sets scalingMode of a native window.
- OH_
Native ⚠Window_ Native Window SetTunnel Handle - Sets tunnel handle of a native window.
- OH_
Native ⚠Window_ Read From Parcel api-12 - Read an OHNativeWindow from an OHIPCParcel.
- OH_
Native ⚠Window_ SetBuffer Hold api-12 - Set native window buffer hold.
- OH_
Native ⚠Window_ SetColor Space api-12 - Set the color space of the native window.
- OH_
Native ⚠Window_ SetMetadata Value api-12 - Set the metadata type of the native window.
- OH_
Native ⚠Window_ Write ToParcel api-12 - Write an OHNativeWindow to an OHIPCParcel.