pub unsafe extern "C" fn OH_NativeWindow_NativeWindowHandleOpt(
window: *mut OHNativeWindow,
code: c_int,
...
) -> i32Expand description
@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
API Note
Performance Note
By default, the window buffer in the current operating system is accessed via the CPU. If an application does not need to access the window buffer data using the CPU, it can proactively disable CPU access to enhance energy efficiency and reduce power consumption.
For details about how to optimize power consumption for data read/write operations in data buffers, see [How do I proactively disable CPU access to window buffers to reduce power consumption?]{@link https://developer.huawei.com/consumer/en/doc/harmonyos-faqs/faqs-arkgraphics-2d-14}.
@syscap SystemCapability.Graphic.Graphic2D.NativeWindow @param window Indicates the pointer to a OHNativeWindow instance. @param code Indicates the operation code, pointer to NativeWindowOperation. @param … variable parameter, must correspond to code one-to-one. @return Returns an error code, 0 is success, otherwise, failed. @since 8 @version 1.0