get native window buffer colorGamut,
variable parameter in function is
[out] int32_t *colorGamut, the enumeration value refers to {@link OH_NativeBuffer_ColorGamut}.
get native window buffer format,
variable parameter in function is
[out] int32_t *format, the enumeration value refers to {@link OH_NativeBuffer_Format}.
get surface source type,
variable parameter in function is
[out] int32_t *sourceType, the enumeration value refers to {@link OHSurfaceSource}.
@since 12
get native window buffer stride,
variable parameter in function is
[out] int32_t *stride.
@deprecated since 16
@useinstead Use {@link OH_NativeWindow_GetBufferHandleFromNative} to get a {@link BufferHandleand} from a buffer
and then retrieve the stride from the {@link BufferHandle}.
get the timeout in milliseconds when the native window requests a buffer,
the default value is 3000 milliseconds when not set,
variable parameter in function is
[out] int32_t *timeout, in milliseconds.
get native window buffer transform,
variable parameter in function is
[out] int32_t *transform, the enumeration value refers to {@link OH_NativeBuffer_TransformType}.
get native window buffer usage,
variable parameter in function is
[out] uint64_t *usage, the enumeration value refers to {@link OH_NativeBuffer_Usage}.
set native window buffer colorGamut,
variable parameter in function is
[in] int32_t colorGamut, the enumeration value refers to {@link OH_NativeBuffer_ColorGamut}.
set native window buffer format,
variable parameter in function is
[in] int32_t format, the enumeration value refers to {@link OH_NativeBuffer_Format}.
set the timeout in milliseconds when the native window requests a buffer,
the default value is 3000 milliseconds when not set,
variable parameter in function is
[in] int32_t timeout, in milliseconds.
set native window buffer transform,
variable parameter in function is
[in] int32_t transform, the enumeration value refers to {@link OH_NativeBuffer_TransformType}.
Adapt to the buffer and scale proportionally to the buffer size. Prioritize displaying all buffer content.
If the size is not the same as the window size, fill the unfilled area of the window with a background color.
@brief Creates a OHNativeWindowBuffer instance.\n
A new OHNativeWindowBuffer instance is created each time this function is called.\n
This interface needs to be used in conjunction with OH_NativeWindow_DestroyNativeWindowBuffer,
otherwise memory leaks will occur.\n
This interface is a non-thread-safe type interface.\n
@brief Creates an OHNativeWindow instance.\n
This interface needs to be used in conjunction with OH_NativeWindow_DestroyNativeWindow,
otherwise memory leaks will occur.\n
If there is a concurrent destroy OHNativeWindow, you need to add once and decrement once to the
OHNativeWindow reference count through OH_NativeWindow_NativeObjectReference and
OH_NativeWindow_NativeObjectUnreference.\n
If the surface obtained through surfaceId is created in this process, the surface cannot be obtained
across processes.\n
This interface is a non-thread-safe type interface.\n
@brief Decreases the reference count of a OHNativeWindow instance by 1,
and when the reference count reaches 0, destroys the instance.\n
This interface is a non-thread-safe type interface.\n
@brief Decreases the reference count of a OHNativeWindowBuffer instance by 1 and,
when the reference count reaches 0, destroys the instance.\n
This interface is a non-thread-safe type interface.\n
@brief Get the last flushed OHNativeWindowBuffer from an OHNativeWindow instance.\n
When the fenceFd is used up, you need to close it.\n
This interface needs to be used in conjunction with OH_NativeWindow_NativeObjectUnreference,
otherwise memory leaks will occur.\n
This interface is a non-thread-safe type interface.\n
@brief Adds the reference count of a native object.\n
This interface needs to be used in conjunction with OH_NativeWindow_NativeObjectUnreference,
otherwise memory leaks will occur.\n
This interface is a non-thread-safe type interface.\n
@brief Decreases the reference count of a native object and,
when the reference count reaches 0, destroys this object.\n
This interface is a non-thread-safe type interface.\n
@brief Returns the OHNativeWindowBuffer to the buffer queue through a OHNativeWindow instance,
without filling in any content. The OHNativeWindowBuffer can be used for another request.\n
This interface is a non-thread-safe type interface.\n
@brief Attach a buffer to an OHNativeWindow instance.\n
This interface needs to be used in conjunction with OH_NativeWindow_NativeWindowDetachBuffer,
otherwise buffer management will be chaotic.\n
This interface is a non-thread-safe type interface.\n
@brief Flushes the OHNativeWindowBuffer filled with the content to the buffer queue
through a OHNativeWindow instance for content consumption.\n
The fenceFd will be close by system.\n
This interface is a non-thread-safe type interface.\n
@brief Sets or obtains the attributes of a native window, including the width, height, and content format.\n
This interface is a non-thread-safe type interface.\n
@brief Requests a OHNativeWindowBuffer through a OHNativeWindow instance for content production.\n
Before calling this interface, you need to set the width and height of
OHNativeWindow through SET_BUFFER_GEOMETRY.\n
This interface needs to be used in conjunction with OH_NativeWindow_NativeWindowFlushBuffer,
otherwise buffer will be exhausted.\n
When the fenceFd is used up, you need to close it.\n
This interface is a non-thread-safe type interface.\n