1 /*
2  * Copyright (c) 2024 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @addtogroup OH_DisplayCapture
18  * @{
19  *
20  * @brief Defines the data structures for the C APIs of the display module.
21  *
22  * @syscap SystemCapability.WindowManager.WindowManager.Core
23  * @since 14
24  * @version 1.0
25  */
26 
27 /**
28  * @file oh_display_capture.h
29  *
30  * @brief Defines the data structures for the C APIs of the display capture.
31  *
32  * @kit ArkUI
33  * @library libnative_display_manager.so
34  * @syscap SystemCapability.WindowManager.WindowManager.Core
35  * @since 14
36  * @version 1.0
37  */
38 
39 #ifndef OH_NATIVE_DISPLAY_CAPTURE_H
40 #define OH_NATIVE_DISPLAY_CAPTURE_H
41 
42 #include "image/pixelmap_native.h"
43 #include "oh_display_info.h"
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
49 /**
50  * @brief Capture a screen pixelmap of the specified display.
51  *
52  * @param displayId The ID of the display to be captured.
53  * @param pixelMap The output pixel map of the captured display.
54  * @return { @link DISPLAY_MANAGER_OK } If the operation is successful.
55  *         { @link DISPLAY_MANAGER_ERROR_NO_PERMISSION } If no permission.
56  *         { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
57  *         { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } If device not support.
58  *         { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
59  * @syscap SystemCapability.Window.SessionManager.Core
60  * @since 14
61  */
62 NativeDisplayManager_ErrorCode OH_NativeDisplayManager_CaptureScreenPixelmap(uint32_t displayId,
63     OH_PixelmapNative **pixelMap);
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 /** @} */
69 #endif // OH_NATIVE_DISPLAY_CAPTURE_H
70