OH_NativeWindow_SetColorSpace

Function OH_NativeWindow_SetColorSpace 

Source
pub unsafe extern "C" fn OH_NativeWindow_SetColorSpace(
    window: *mut NativeWindow,
    colorSpace: OH_NativeBuffer_ColorSpace,
) -> i32
Available on crate features native_window and api-12 only.
Expand description

Set the color space of the native window.

This interface is a non-thread-safe type interface.

Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeWindow

§Arguments

  • window - Indicates the pointer to a OHNativeWindow instance.

  • colorSpace - Indicates the color space of native window, see OH_NativeBuffer_ColorSpace.

§Returns

  • [NATIVE_ERROR_OK] 0 - Success. [NATIVE_ERROR_INVALID_ARGUMENTS] 40001000 - window is NULL. [NATIVE_ERROR_BUFFER_STATE_INVALID] 41207000 - Incorrect colorSpace state.

Available since API-level: 12

Version: 1.0