OH_NativeDisplayManager_CaptureScreenPixelmap

Function OH_NativeDisplayManager_CaptureScreenPixelmap 

Source
pub unsafe extern "C" fn OH_NativeDisplayManager_CaptureScreenPixelmap(
    displayId: u32,
    pixelMap: *mut *mut OH_PixelmapNative,
) -> NativeDisplayManagerResult
Available on crate feature api-14 only.
Expand description

Capture a screen pixelmap of the specified display.

ohos.permission.CUSTOM_SCREEN_CAPTURE

§Arguments

  • displayId - The ID of the display to be captured.

  • pixelMap - The output pixel map of the captured display.

§Returns

  • { DISPLAY_MANAGER_OK } If the operation is successful. { DISPLAY_MANAGER_ERROR_NO_PERMISSION } If no permission. { DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. { DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } If device not support. { DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.

Available since API-level: 14