diff --git a/arkui/display_manager/libdm.ndk.json b/arkui/display_manager/libdm.ndk.json
index 117063d6a2cadfe86efb78fc4c093cf6f567cdd4..73f2204c2e22eeac47be7f42abe9b5ec38996b33 100644
--- a/arkui/display_manager/libdm.ndk.json
+++ b/arkui/display_manager/libdm.ndk.json
@@ -113,7 +113,11 @@
},
{
"first_instroduced":"20",
- "name":"OH_NativeDisplayManager_GetAvailableArea"
+ "name":"OH_NativeDisplayManager_CreateAvailableArea"
+ },
+ {
+ "first_instroduced":"20",
+ "name":"OH_NativeDisplayManager_DestroyAvailableArea"
},
{
"first_instroduced":"20",
diff --git a/arkui/display_manager/oh_display_info.h b/arkui/display_manager/oh_display_info.h
index dca5c52f02cffc53b027200930de4fcd07f9a441..641a72486c76bce540d5d469a83682e51370d0fc 100644
--- a/arkui/display_manager/oh_display_info.h
+++ b/arkui/display_manager/oh_display_info.h
@@ -126,6 +126,9 @@ typedef enum {
/** @error Operation system abnormal */
DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL = 1400003,
+
+ /** @error Operation illegal param */
+ DISPLAY_MANAGER_ERROR_ILLEGAL_PARAM = 1400004,
} NativeDisplayManager_ErrorCode;
/**
diff --git a/arkui/display_manager/oh_display_manager.h b/arkui/display_manager/oh_display_manager.h
index 484fcbe929f110b9548a3009631777befd72ffc7..176f9c9cd3b16d6eca484a5842e71a57dc67f24b 100644
--- a/arkui/display_manager/oh_display_manager.h
+++ b/arkui/display_manager/oh_display_manager.h
@@ -347,7 +347,6 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_CreatePrimaryDisplay(
* @brief the callback function type when available area change.
*
* @param displayId The changed display id.
- * @syscap SystemCapability.Window.SessionManager
* @since 20
*/
typedef void (*OH_NativeDisplayManager_AvailableAreaChangeCallback)(uint64_t displayId);
@@ -358,10 +357,9 @@ typedef void (*OH_NativeDisplayManager_AvailableAreaChangeCallback)(uint64_t dis
* @param availableAreaChangeCallback Available area 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_ILLEGAL_PARAM } If Parameter illegal.
* { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
- * @syscap SystemCapability.Window.SessionManager
* @since 20
*/
NativeDisplayManager_ErrorCode OH_NativeDisplayManager_RegisterAvailableAreaChangeListener(
@@ -372,16 +370,15 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_RegisterAvailableAreaChan
*
* @param listenerIndex The 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_ILLEGAL_PARAM } If Parameter illegal.
* { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
- * @syscap SystemCapability.Window.SessionManager
* @since 20
*/
NativeDisplayManager_ErrorCode OH_NativeDisplayManager_UnregisterAvailableAreaChangeListener(uint32_t listenerIndex);
/**
- * @brief Obtain the available area.
+ * @brief Create the available area.
*
* @param displayId The display id.
* @param availableArea Indicates the pointer to an NativeDisplayManager_Rect object.
@@ -389,16 +386,24 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_UnregisterAvailableAreaCh
* { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support.
* { @link DISPLAY_MANAGER_ERROR_INVALID_SCREEN } Invalid screen.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
- * @syscap SystemCapability.Window.SessionManager
* @since 20
*/
-NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetAvailableArea(uint64_t displayId, NativeDisplayManager_Rect **availableArea);
+NativeDisplayManager_ErrorCode OH_NativeDisplayManager_CreateAvailableArea(uint64_t displayId, NativeDisplayManager_Rect **availableArea);
+
+/**
+ * @brief Destroy an NativeDisplayManager_Rect object and reclaims the memory occupied by the object.
+ *
+ * @param availableArea Indicates the pointer to an NativeDisplayManager_Rect object.
+ * @return { @link DISPLAY_MANAGER_OK } If the operation is successful
+ * { @link DISPLAY_MANAGER_ERROR_ILLEGAL_PARAM } If Parameter illegal.
+ * @since 20
+ */
+NativeDisplayManager_ErrorCode OH_NativeDisplayManager_DestroyAvailableArea(NativeDisplayManager_Rect *availableArea);
/**
* @brief the callback function type when display connect.
*
* @param displayId The added display id.
- * @syscap SystemCapability.Window.SessionManager
* @since 20
*/
typedef void (*OH_NativeDisplayManager_DisplayAddCallback)(uint64_t displayId);
@@ -410,9 +415,8 @@ typedef void (*OH_NativeDisplayManager_DisplayAddCallback)(uint64_t displayId);
* @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_DEVICE_NOT_SUPPORTED } device not support.
- * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
+ * { @link DISPLAY_MANAGER_ERROR_ILLEGAL_PARAM } If Parameter illegal.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
- * @syscap SystemCapability.Window.SessionManager
* @since 20
*/
NativeDisplayManager_ErrorCode OH_NativeDisplayManager_RegisterDisplayAddListener(
@@ -424,9 +428,8 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_RegisterDisplayAddListene
* @param listenerIndex The display add listener index.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support.
- * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
+ * { @link DISPLAY_MANAGER_ERROR_ILLEGAL_PARAM } If Parameter illegal.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
- * @syscap SystemCapability.Window.SessionManager
* @since 20
*/
NativeDisplayManager_ErrorCode OH_NativeDisplayManager_UnregisterDisplayAddListener(uint32_t listenerIndex);
@@ -435,7 +438,6 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_UnregisterDisplayAddListe
* @brief the callback function type when display disconnect.
*
* @param displayId The removed display id.
- * @syscap SystemCapability.Window.SessionManager
* @since 20
*/
typedef void (*OH_NativeDisplayManager_DisplayRemoveCallback)(uint64_t displayId);
@@ -447,9 +449,8 @@ typedef void (*OH_NativeDisplayManager_DisplayRemoveCallback)(uint64_t displayId
* @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_DEVICE_NOT_SUPPORTED } device not support.
- * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
+ * { @link DISPLAY_MANAGER_ERROR_ILLEGAL_PARAM } If Parameter illegal.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
- * @syscap SystemCapability.Window.SessionManager
* @since 20
*/
NativeDisplayManager_ErrorCode OH_NativeDisplayManager_RegisterDisplayRemoveListener(
@@ -461,9 +462,8 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_RegisterDisplayRemoveList
* @param listenerIndex The display remove listener index.
* @return { @link DISPLAY_MANAGER_OK } If the operation is successful
* { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support.
- * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error.
+ * { @link DISPLAY_MANAGER_ERROR_ILLEGAL_PARAM } If Parameter illegal.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
- * @syscap SystemCapability.Window.SessionManager
* @since 20
*/
NativeDisplayManager_ErrorCode OH_NativeDisplayManager_UnregisterDisplayRemoveListener(uint32_t listenerIndex);
@@ -477,7 +477,6 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_UnregisterDisplayRemoveLi
* { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support.
* { @link DISPLAY_MANAGER_ERROR_INVALID_SCREEN } Invalid screen.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
- * @syscap SystemCapability.Window.SessionManager
* @since 20
*/
NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDisplaySourceMode(uint64_t displayId, NativeDisplayManager_SourceMode *sourceMode);
@@ -492,7 +491,6 @@ NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDisplaySourceMode(uint
* { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support.
* { @link DISPLAY_MANAGER_ERROR_INVALID_SCREEN } Invalid screen.
* { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally.
- * @syscap SystemCapability.Window.SessionManager
* @since 20
*/
NativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDisplayPosition(uint64_t displayId, int32_t *x, int32_t *y);