pub unsafe extern "C" fn OH_NativeWindow_NativeWindowAttachBuffer(
window: *mut NativeWindow,
buffer: *mut NativeWindowBuffer,
) -> i32Available on crate features
native_window and api-12 only.Expand description
Attach a buffer to an OHNativeWindow instance.
This interface needs to be used in conjunction with OH_NativeWindow_NativeWindowDetachBuffer, otherwise buffer management will be chaotic.
This interface is a non-thread-safe type interface.
Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeWindow
§Arguments
-
window- Indicates the pointer to an OHNativeWindow instance. -
buffer- Indicates the pointer to a OHNativeWindowBuffer instance.
§Returns
- Returns an error code, 0 is success, otherwise, failed.
Available since API-level: 12
Version: 1.0