diff --git a/arkui/display_manager/BUILD.gn b/arkui/display_manager/BUILD.gn
index bfdc284acda20515b269782ea6ddcaebf769b548..ba052e0a375ab34f32e1e43c3952fcf931ad1bd3 100644
--- a/arkui/display_manager/BUILD.gn
+++ b/arkui/display_manager/BUILD.gn
@@ -17,6 +17,7 @@ import("//build/ohos/ndk/ndk.gni")
ohos_ndk_headers("display_manager_header") {
dest_dir = "$ndk_headers_out_dir/window_manager"
sources = [
+ "oh_display_capture.h",
"oh_display_info.h",
"oh_display_manager.h",
]
@@ -28,6 +29,7 @@ ohos_ndk_library("native_display_manager") {
ndk_description_file = "./libdm.ndk.json"
system_capability = "SystemCapability.Window.SessionManager"
system_capability_headers = [
+ "oh_display_capture.h",
"oh_display_info.h",
"oh_display_manager.h",
]
diff --git a/arkui/display_manager/libdm.ndk.json b/arkui/display_manager/libdm.ndk.json
index 5efd5356188e93a41c7d2873114918b8a8747932..1ef345cfd5b6eed1ca332d76bb365746d652aa15 100644
--- a/arkui/display_manager/libdm.ndk.json
+++ b/arkui/display_manager/libdm.ndk.json
@@ -78,5 +78,29 @@
{
"first_instroduced":"12",
"name":"OH_NativeDisplayManager_UnregisterDisplayChangeListener"
- }
+ },
+ {
+ "first_instroduced":"14",
+ "name":"OH_NativeDisplayManager_CreatePrimaryDisplay"
+ },
+ {
+ "first_instroduced":"14",
+ "name":"OH_NativeDisplayManager_CreateDisplayById"
+ },
+ {
+ "first_instroduced":"14",
+ "name":"OH_NativeDisplayManager_CreateDisplay"
+ },
+ {
+ "first_instroduced":"14",
+ "name":"OH_NativeDisplayManager_CreateAllDisplays"
+ },
+ {
+ "first_instroduced":"14",
+ "name":"OH_NativeDisplayManager_DestroyAllDisplays"
+ },
+ {
+ "first_instroduced":"14",
+ "name":"OH_NativeDisplayManager_CaptureScreenPixelmap"
+ }
]
\ No newline at end of file
diff --git a/arkui/display_manager/oh_display_capture.h b/arkui/display_manager/oh_display_capture.h
new file mode 100644
index 0000000000000000000000000000000000000000..908b28b223ee363c2b88938241d03e3e3469b71b
--- /dev/null
+++ b/arkui/display_manager/oh_display_capture.h
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2024 Huawei Device Co., Ltd.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @addtogroup OH_DisplayCapture
+ * @{
+ *
+ * @brief Defines the data structures for the C APIs of the display module.
+ *
+ * @syscap SystemCapability.WindowManager.WindowManager.Core
+ * @since 14
+ * @version 1.0
+ */
+
+/**
+ * @file oh_display_capture.h
+ *
+ * @brief Defines the data structures for the C APIs of the display capture.
+ *
+ * @kit ArkUI
+ * @library libnative_display_manager.so
+ * @syscap SystemCapability.WindowManager.WindowManager.Core
+ * @since 14
+ * @version 1.0
+ */
+
+#ifndef OH_NATIVE_DISPLAY_CAPTURE_H
+#define OH_NATIVE_DISPLAY_CAPTURE_H
+
+#include "multimedia/image_framework/image/pixelmap_native.h"
+#include "oh_display_info.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Capture a screen pixelmap of the specified display.
+ *
+ * @permission {@code ohos.permission.CUSTOM_SCREEN_CAPTURE}
+ * @param displayId The ID of the display to be captured.
+ * @param pixelMap The output pixel map of the captured display.
+ * @return { @link DISPLAY_MANAGER_OK } If the operation is successful.
+ * { @link DISPLAY_MANAGER_ERROR_NO_PERMISSION } If no permission.
+ * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
+ * { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } If device not support.
+ * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
+ * @syscap SystemCapability.Window.SessionManager.Core
+ * @since 14
+ */
+NativeDisplayManager_ErrorCode OH_NativeDisplayManager_CaptureScreenPixelmap(uint32_t displayId,
+ OH_PixelmapNative **pixelMap);
+
+#ifdef __cplusplus
+}
+#endif
+/** @} */
+#endif // OH_NATIVE_DISPLAY_CAPTURE_H
\ No newline at end of file
diff --git a/arkui/display_manager/oh_display_info.h b/arkui/display_manager/oh_display_info.h
index 3b61758845a8af4f163934a599c10274284c99c8..82b38a098a0f8cb1d432206cead97a07f1bbaa4a 100644
--- a/arkui/display_manager/oh_display_info.h
+++ b/arkui/display_manager/oh_display_info.h
@@ -13,9 +13,6 @@
* limitations under the License.
*/
-#ifndef OH_NATIVE_DISPLAY_INFO_H
-#define OH_NATIVE_DISPLAY_INFO_H
-
/**
* @addtogroup OH_DisplayInfo
* @{
@@ -39,12 +36,23 @@
* @version 1.0
*/
+
+#ifndef OH_NATIVE_DISPLAY_INFO_H
+#define OH_NATIVE_DISPLAY_INFO_H
+
+
#include "stdint.h"
#ifdef __cplusplus
extern "C" {
#endif
+/**
+ * @brief display name length
+ * @since 14
+ */
+#define OH_DISPLAY_NAME_LENGTH 32
+
/**
* @brief Enumerates rotations.
*
@@ -197,6 +205,145 @@ typedef struct {
NativeDisplayManager_WaterfallDisplayAreaRects waterfallDisplayAreaRects;
} NativeDisplayManager_CutoutInfo;
+/**
+ * @brief Enumerates of the display state.
+ *
+ * @since 14
+ * @version 1.0
+ */
+typedef enum {
+ /** display state unknown */
+ DISPLAY_MANAGER_DISPLAY_STATE_UNKNOWN = 0,
+
+ /** display state off */
+ DISPLAY_MANAGER_DISPLAY_STATE_OFF = 1,
+
+ /** display state on */
+ DISPLAY_MANAGER_DISPLAY_STATE_ON = 2,
+
+ /** display state doze */
+ DISPLAY_MANAGER_DISPLAY_STATE_DOZE = 3,
+
+ /** display state doze suspend */
+ DISPLAY_MANAGER_DISPLAY_STATE_DOZE_SUSPEND = 4,
+
+ /** display state vr */
+ DISPLAY_MANAGER_DISPLAY_STATE_VR = 5,
+
+ /** display state on suspend */
+ DISPLAY_MANAGER_DISPLAY_STATE_ON_SUSPEND = 6,
+} NativeDisplayManager_DisplayState;
+
+/**
+ * @brief Defines the display hdr structure.
+ *
+ * @since 14
+ * @version 1.0
+ */
+typedef struct {
+ /** hdrFormat length */
+ uint32_t hdrFormatLength;
+
+ /** hdrFormat pointer */
+ uint32_t *hdrFormats;
+} NativeDisplayManager_DisplayHdrFormat;
+
+/**
+ * @brief Defines the display color space structure.
+ *
+ * @since 14
+ * @version 1.0
+ */
+typedef struct {
+ /** color space length */
+ uint32_t colorSpaceLength;
+
+ /** color space pointer */
+ uint32_t *colorSpaces;
+} NativeDisplayManager_DisplayColorSpace;
+
+/**
+ * @brief Defines the display structure.
+ *
+ * @since 14
+ * @version 1.0
+ */
+typedef struct {
+ /** display id */
+ uint32_t id;
+
+ /** display name */
+ char name[OH_DISPLAY_NAME_LENGTH + 1];
+
+ /** display is alive */
+ bool isAlive;
+
+ /** display width */
+ int32_t width;
+
+ /** display height */
+ int32_t height;
+
+ /** display physical width */
+ int32_t physicalWidth;
+
+ /** display physical height */
+ int32_t physicalHeight;
+
+ /** display refresh rate */
+ uint32_t refreshRate;
+
+ /** display available width */
+ uint32_t availableWidth;
+
+ /** display available height */
+ uint32_t availableHeight;
+
+ /** display density dpi */
+ float densityDPI;
+
+ /** display density pixels */
+ float densityPixels;
+
+ /** display scale density */
+ float scaledDensity;
+
+ /** display xdpi*/
+ float xDPI;
+
+ /** display ydpi */
+ float yDPI;
+
+ /** display rotation */
+ NativeDisplayManager_Rotation rotation;
+
+ /** display state */
+ NativeDisplayManager_DisplayState state;
+
+ /** display orientation */
+ NativeDisplayManager_Orientation orientation;
+
+ /** display hdr format */
+ NativeDisplayManager_DisplayHdrFormat *hdrFormat;
+
+ /** display color space */
+ NativeDisplayManager_DisplayColorSpace *colorSpace;
+} NativeDisplayManager_DisplayInfo;
+
+/**
+ * @brief Defines the displays structure.
+ *
+ * @since 14
+ * @version 1.0
+ */
+typedef struct {
+ /** displays length */
+ uint32_t displaysLength;
+
+ /** displays pointer */
+ NativeDisplayManager_DisplayInfo *displaysInfo;
+} NativeDisplayManager_DisplaysInfo;
+
#ifdef __cplusplus
}
#endif
diff --git a/arkui/display_manager/oh_display_manager.h b/arkui/display_manager/oh_display_manager.h
index a3b9f3444d7d260e3468ad680c15a941ebf3dc60..7f8e45c2b2c36a941c732a87c3a013c50db0eea8 100644
--- a/arkui/display_manager/oh_display_manager.h
+++ b/arkui/display_manager/oh_display_manager.h
@@ -13,9 +13,6 @@
* limitations under the License.
*/
-#ifndef OH_NATIVE_DISPLAY_MANAGER_H
-#define OH_NATIVE_DISPLAY_MANAGER_H
-
/**
* @addtogroup OH_DisplayManager
* @{
@@ -33,12 +30,16 @@
* @brief Defines the data structures for the C APIs of the display module.
*
* @kit ArkUI
- * @library libnative_display_manager.so.
+ * @library libnative_display_manager.so
* @syscap SystemCapability.WindowManager.WindowManager.Core
* @since 12
* @version 1.0
*/
+#ifndef OH_NATIVE_DISPLAY_MANAGER_H
+#define OH_NATIVE_DISPLAY_MANAGER_H
+
+
#include "oh_display_info.h"
#ifdef __cplusplus
@@ -48,7 +49,7 @@ extern "C" {
/**
* @brief Obtain the default display Id.
*
- * @param { *displayId } Indicates the pointer to an uint64_t object.
+ * @param displayId Indicates the pointer to an uint64_t object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -60,7 +61,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayId(uint6
/**
* @brief Obtain the default display width.
*
- * @param { *displayWidth } Indicates the pointer to an int32_t object.
+ * @param displayWidth Indicates the pointer to an int32_t object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -72,7 +73,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayWidth(in
/**
* @brief Obtain the default display height.
*
- * @param { *displayHeight } Indicates the pointer to an int32_t object.
+ * @param displayHeight Indicates the pointer to an int32_t object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -84,7 +85,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayHeight(i
/**
* @brief Obtain the default display rotation.
*
- * @param { *displayRotation } Indicates the pointer to an NativeDisplayManager_Rotation object.
+ * @param displayRotation Indicates the pointer to an NativeDisplayManager_Rotation object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -97,7 +98,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayRotation
/**
* @brief Obtain the default display orientation.
*
- * @param { *displayOrientation } Indicates the pointer to an NativeDisplayManager_Orientation object.
+ * @param displayOrientation Indicates the pointer to an NativeDisplayManager_Orientation object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -110,7 +111,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayOrientat
/**
* @brief Obtain the default display virtualPixels.
*
- * @param { *virtualPixels } Indicates the pointer to an float object.
+ * @param virtualPixels Indicates the pointer to an float object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -122,7 +123,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayVirtualP
/**
* @brief Obtain the default display refreshRate.
*
- * @param { *refreshRate } Indicates the pointer to an uint32_t object.
+ * @param refreshRate Indicates the pointer to an uint32_t object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -134,7 +135,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayRefreshR
/**
* @brief Obtain the default display densityDpi.
*
- * @param { *densityDpi } Indicates the pointer to an int32_t object.
+ * @param densityDpi Indicates the pointer to an int32_t object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -146,7 +147,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayDensityD
/**
* @brief Obtain the default display densityPixels.
*
- * @param { *densityPixels } Indicates the pointer to an float object.
+ * @param densityPixels Indicates the pointer to an float object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -158,7 +159,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayDensityP
/**
* @brief Obtain the default display scaledDensity.
*
- * @param { *scaledDensity } Indicates the pointer to an float object.
+ * @param scaledDensity Indicates the pointer to an float object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -170,7 +171,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayScaledDe
/**
* @brief Obtain the default display xDpi.
*
- * @param { *xDpi } Indicates the pointer to an float object.
+ * @param xDpi Indicates the pointer to an float object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -182,7 +183,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayDensityX
/**
* @brief Obtain the default display yDpi.
*
- * @param { *yDpi } Indicates the pointer to an float object.
+ * @param yDpi Indicates the pointer to an float object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -194,7 +195,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayDensityY
/**
* @brief Create the cutout info of the device.
*
- * @param { **cutoutInfo } Indicates the pointer to an NativeDisplayManager_CutoutInfo object.
+ * @param cutoutInfo Indicates the pointer to an NativeDisplayManager_CutoutInfo object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -207,7 +208,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_CreateDefaultDisplayCutou
/**
* @brief Destroy an NativeDisplayManager_CutoutInfo object and reclaims the memory occupied by the object.
*
- * @param { **cutoutInfo } Indicates the pointer to an NativeDisplayManager_CutoutInfo object.
+ * @param cutoutInfo Indicates the pointer to an NativeDisplayManager_CutoutInfo object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* @syscap SystemCapability.WindowManager.WindowManager.Core
@@ -228,7 +229,7 @@ bool OH_NativeDisplayManager_IsFoldable();
/**
* @brief Get the display mode of the foldable device.
*
- * @param { *displayMode } Indicates the pointer to an NativeDisplayManager_FoldDisplayMode object.
+ * @param displayMode Indicates the pointer to an NativeDisplayManager_FoldDisplayMode object.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support.
@@ -241,7 +242,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetFoldDisplayMode(
/**
* @brief the callback function type when display change.
*
- * @param { *displayId } change display id.
+ * @param displayId change display id.
* @syscap SystemCapability.Window.SessionManager
* @since 12
*/
@@ -250,8 +251,8 @@ typedef void (*OH_NativeDisplayManager_DisplayChangeCallback)(uint64_t displayId
/**
* @brief Register the callback for display change listener.
*
- * @param { displayChangeCallback } display change callback.
- * @param { *listenerIndex } Indicates the pointer to an uint32_t object. used in unregister call.
+ * @param displayChangeCallback display change callback.
+ * @param listenerIndex Indicates the pointer to an uint32_t object. used in unregister call.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -264,7 +265,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_RegisterDisplayChangeList
/**
* @brief Unregister the callback for display changes listener.
*
- * @param { listenerIndex } display changed listener index.
+ * @param listenerIndex display changed listener index.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
@@ -276,7 +277,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_UnregisterDisplayChangeLi
/**
* @brief the callback function type when display fold change.
*
- * @param { displayMode } current fold display mode.
+ * @param displayMode current fold display mode.
* @syscap SystemCapability.Window.SessionManager
* @since 12
*/
@@ -286,8 +287,8 @@ typedef void (*OH_NativeDisplayManager_FoldDisplayModeChangeCallback)(
/**
* @brief Register the callback for display mode change listener.
*
- * @param { displayModeChangeCallback } display mode change callback.
- * @param { *listenerIndex } Indicates the pointer to an uint32_t object. used in unregister call.
+ * @param displayModeChangeCallback display mode change callback.
+ * @param listenerIndex Indicates the pointer to an uint32_t object. used in unregister call.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support.
@@ -301,7 +302,7 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_RegisterFoldDisplayModeCh
/**
* @brief Unregister the callback for display mode change listener.
*
- * @param { listenerIndex } display mode change listener index.
+ * @param listenerIndex display mode change listener index.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
* { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support.
@@ -311,6 +312,64 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_RegisterFoldDisplayModeCh
*/
NativeDisplayManager_ErrorCode OH_NativeDisplayManager_UnregisterFoldDisplayModeChangeListener(uint32_t listenerIndex);
+/**
+ * @brief Create all displays.
+ *
+ * @param allDisplays Output parameter for all displays information.
+ * @return { @link DISPLAY_MANAGER_OK } If the operation is successful.
+ * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
+ * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
+ * @syscap SystemCapability.Window.SessionManager.Core
+ * @since 14
+ */
+NativeDisplayManager_ErrorCode OH_NativeDisplayManager_CreateAllDisplays(
+ NativeDisplayManager_DisplaysInfo **allDisplays);
+
+/**
+ * @brief Destroy all displays.
+ *
+ * @param allDisplays all displays to be free.
+ * @syscap SystemCapability.Window.SessionManager.Core
+ * @since 14
+ */
+void OH_NativeDisplayManager_DestroyAllDisplays(NativeDisplayManager_DisplaysInfo *allDisplays);
+
+/**
+ * @brief Create display information by display id.
+ *
+ * @param displayId The display id.
+ * @param displayInfo The pointer to the display information.
+ * @return { @link DISPLAY_MANAGER_OK } If the operation is successful.
+ * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
+ * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
+ * @syscap SystemCapability.Window.SessionManager.Core
+ * @since 14
+ */
+NativeDisplayManager_ErrorCode OH_NativeDisplayManager_CreateDisplayById(uint32_t displayId,
+ NativeDisplayManager_DisplayInfo **displayInfo);
+
+/**
+ * @brief Destroy the display information.
+ *
+ * @param displayInfo the target display to be free.
+ * @syscap SystemCapability.Window.SessionManager.Core
+ * @since 14
+ */
+void OH_NativeDisplayManager_DestroyDisplay(NativeDisplayManager_DisplayInfo *displayInfo);
+
+/**
+ * @brief Create a primary display.
+ *
+ * @param displayInfo The information of the created display.
+ * @return { @link DISPLAY_MANAGER_OK } If the operation is successful.
+ * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
+ * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
+ * @syscap SystemCapability.Window.SessionManager.Core
+ * @since 14
+ */
+NativeDisplayManager_ErrorCode OH_NativeDisplayManager_CreatePrimaryDisplay(
+ NativeDisplayManager_DisplayInfo **displayInfo);
+
#ifdef __cplusplus
}
#endif