17777dab0Sopenharmony_ci/* 27777dab0Sopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd. 37777dab0Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 47777dab0Sopenharmony_ci * you may not use this file except in compliance with the License. 57777dab0Sopenharmony_ci * You may obtain a copy of the License at 67777dab0Sopenharmony_ci * 77777dab0Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 87777dab0Sopenharmony_ci * 97777dab0Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 107777dab0Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 117777dab0Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 127777dab0Sopenharmony_ci * See the License for the specific language governing permissions and 137777dab0Sopenharmony_ci * limitations under the License. 147777dab0Sopenharmony_ci */ 157777dab0Sopenharmony_ci 167777dab0Sopenharmony_ci#ifndef OH_NATIVE_DISPLAY_MANAGER_H 177777dab0Sopenharmony_ci#define OH_NATIVE_DISPLAY_MANAGER_H 187777dab0Sopenharmony_ci 197777dab0Sopenharmony_ci/** 207777dab0Sopenharmony_ci * @addtogroup OH_DisplayManager 217777dab0Sopenharmony_ci * @{ 227777dab0Sopenharmony_ci * 237777dab0Sopenharmony_ci * @brief Defines the data structures for the C APIs of the display module. 247777dab0Sopenharmony_ci * 257777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 267777dab0Sopenharmony_ci * @since 12 277777dab0Sopenharmony_ci * @version 1.0 287777dab0Sopenharmony_ci */ 297777dab0Sopenharmony_ci 307777dab0Sopenharmony_ci/** 317777dab0Sopenharmony_ci * @file oh_display_manager.h 327777dab0Sopenharmony_ci * 337777dab0Sopenharmony_ci * @brief Defines the data structures for the C APIs of the display module. 347777dab0Sopenharmony_ci * 357777dab0Sopenharmony_ci * @kit ArkUI 367777dab0Sopenharmony_ci * @library libnative_display_manager.so. 377777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 387777dab0Sopenharmony_ci * @since 12 397777dab0Sopenharmony_ci * @version 1.0 407777dab0Sopenharmony_ci */ 417777dab0Sopenharmony_ci 427777dab0Sopenharmony_ci#include "oh_display_info.h" 437777dab0Sopenharmony_ci 447777dab0Sopenharmony_ci#ifdef __cplusplus 457777dab0Sopenharmony_ciextern "C" { 467777dab0Sopenharmony_ci#endif 477777dab0Sopenharmony_ci 487777dab0Sopenharmony_ci/** 497777dab0Sopenharmony_ci * @brief Obtain the default display Id. 507777dab0Sopenharmony_ci * 517777dab0Sopenharmony_ci * @param { *displayId } Indicates the pointer to an <b>uint64_t</b> object. 527777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 537777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 547777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 557777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 567777dab0Sopenharmony_ci * @since 12 577777dab0Sopenharmony_ci */ 587777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayId(uint64_t *displayId); 597777dab0Sopenharmony_ci 607777dab0Sopenharmony_ci/** 617777dab0Sopenharmony_ci * @brief Obtain the default display width. 627777dab0Sopenharmony_ci * 637777dab0Sopenharmony_ci * @param { *displayWidth } Indicates the pointer to an <b>int32_t</b> object. 647777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 657777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 667777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 677777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 687777dab0Sopenharmony_ci * @since 12 697777dab0Sopenharmony_ci */ 707777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayWidth(int32_t *displayWidth); 717777dab0Sopenharmony_ci 727777dab0Sopenharmony_ci/** 737777dab0Sopenharmony_ci * @brief Obtain the default display height. 747777dab0Sopenharmony_ci * 757777dab0Sopenharmony_ci * @param { *displayHeight } Indicates the pointer to an <b>int32_t</b> object. 767777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 777777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 787777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 797777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 807777dab0Sopenharmony_ci * @since 12 817777dab0Sopenharmony_ci */ 827777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayHeight(int32_t *displayHeight); 837777dab0Sopenharmony_ci 847777dab0Sopenharmony_ci/** 857777dab0Sopenharmony_ci * @brief Obtain the default display rotation. 867777dab0Sopenharmony_ci * 877777dab0Sopenharmony_ci * @param { *displayRotation } Indicates the pointer to an <b>NativeDisplayManager_Rotation</b> object. 887777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 897777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 907777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 917777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 927777dab0Sopenharmony_ci * @since 12 937777dab0Sopenharmony_ci */ 947777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayRotation( 957777dab0Sopenharmony_ci NativeDisplayManager_Rotation *displayRotation); 967777dab0Sopenharmony_ci 977777dab0Sopenharmony_ci/** 987777dab0Sopenharmony_ci * @brief Obtain the default display orientation. 997777dab0Sopenharmony_ci * 1007777dab0Sopenharmony_ci * @param { *displayOrientation } Indicates the pointer to an <b>NativeDisplayManager_Orientation</b> object. 1017777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 1027777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 1037777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 1047777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 1057777dab0Sopenharmony_ci * @since 12 1067777dab0Sopenharmony_ci */ 1077777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayOrientation( 1087777dab0Sopenharmony_ci NativeDisplayManager_Orientation *displayOrientation); 1097777dab0Sopenharmony_ci 1107777dab0Sopenharmony_ci/** 1117777dab0Sopenharmony_ci * @brief Obtain the default display virtualPixels. 1127777dab0Sopenharmony_ci * 1137777dab0Sopenharmony_ci * @param { *virtualPixels } Indicates the pointer to an <b>float</b> object. 1147777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 1157777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 1167777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 1177777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 1187777dab0Sopenharmony_ci * @since 12 1197777dab0Sopenharmony_ci */ 1207777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayVirtualPixelRatio(float *virtualPixels); 1217777dab0Sopenharmony_ci 1227777dab0Sopenharmony_ci/** 1237777dab0Sopenharmony_ci * @brief Obtain the default display refreshRate. 1247777dab0Sopenharmony_ci * 1257777dab0Sopenharmony_ci * @param { *refreshRate } Indicates the pointer to an <b>uint32_t</b> object. 1267777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 1277777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 1287777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 1297777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 1307777dab0Sopenharmony_ci * @since 12 1317777dab0Sopenharmony_ci */ 1327777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayRefreshRate(uint32_t *refreshRate); 1337777dab0Sopenharmony_ci 1347777dab0Sopenharmony_ci/** 1357777dab0Sopenharmony_ci * @brief Obtain the default display densityDpi. 1367777dab0Sopenharmony_ci * 1377777dab0Sopenharmony_ci * @param { *densityDpi } Indicates the pointer to an <b>int32_t</b> object. 1387777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 1397777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 1407777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 1417777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 1427777dab0Sopenharmony_ci * @since 12 1437777dab0Sopenharmony_ci */ 1447777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayDensityDpi(int32_t *densityDpi); 1457777dab0Sopenharmony_ci 1467777dab0Sopenharmony_ci/** 1477777dab0Sopenharmony_ci * @brief Obtain the default display densityPixels. 1487777dab0Sopenharmony_ci * 1497777dab0Sopenharmony_ci * @param { *densityPixels } Indicates the pointer to an <b>float</b> object. 1507777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 1517777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 1527777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 1537777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 1547777dab0Sopenharmony_ci * @since 12 1557777dab0Sopenharmony_ci */ 1567777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayDensityPixels(float *densityPixels); 1577777dab0Sopenharmony_ci 1587777dab0Sopenharmony_ci/** 1597777dab0Sopenharmony_ci * @brief Obtain the default display scaledDensity. 1607777dab0Sopenharmony_ci * 1617777dab0Sopenharmony_ci * @param { *scaledDensity } Indicates the pointer to an <b>float</b> object. 1627777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 1637777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 1647777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 1657777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 1667777dab0Sopenharmony_ci * @since 12 1677777dab0Sopenharmony_ci */ 1687777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayScaledDensity(float *scaledDensity); 1697777dab0Sopenharmony_ci 1707777dab0Sopenharmony_ci/** 1717777dab0Sopenharmony_ci * @brief Obtain the default display xDpi. 1727777dab0Sopenharmony_ci * 1737777dab0Sopenharmony_ci * @param { *xDpi } Indicates the pointer to an <b>float</b> object. 1747777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 1757777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 1767777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 1777777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 1787777dab0Sopenharmony_ci * @since 12 1797777dab0Sopenharmony_ci */ 1807777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayDensityXdpi(float *xDpi); 1817777dab0Sopenharmony_ci 1827777dab0Sopenharmony_ci/** 1837777dab0Sopenharmony_ci * @brief Obtain the default display yDpi. 1847777dab0Sopenharmony_ci * 1857777dab0Sopenharmony_ci * @param { *yDpi } Indicates the pointer to an <b>float</b> object. 1867777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 1877777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 1887777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 1897777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 1907777dab0Sopenharmony_ci * @since 12 1917777dab0Sopenharmony_ci */ 1927777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetDefaultDisplayDensityYdpi(float *yDpi); 1937777dab0Sopenharmony_ci 1947777dab0Sopenharmony_ci/** 1957777dab0Sopenharmony_ci * @brief Create the cutout info of the device. 1967777dab0Sopenharmony_ci * 1977777dab0Sopenharmony_ci * @param { **cutoutInfo } Indicates the pointer to an <b>NativeDisplayManager_CutoutInfo</b> object. 1987777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 1997777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 2007777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 2017777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 2027777dab0Sopenharmony_ci * @since 12 2037777dab0Sopenharmony_ci */ 2047777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_CreateDefaultDisplayCutoutInfo( 2057777dab0Sopenharmony_ci NativeDisplayManager_CutoutInfo **cutoutInfo); 2067777dab0Sopenharmony_ci 2077777dab0Sopenharmony_ci/** 2087777dab0Sopenharmony_ci * @brief Destroy an <b>NativeDisplayManager_CutoutInfo</b> object and reclaims the memory occupied by the object. 2097777dab0Sopenharmony_ci * 2107777dab0Sopenharmony_ci * @param { **cutoutInfo } Indicates the pointer to an <b>NativeDisplayManager_CutoutInfo</b> object. 2117777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 2127777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 2137777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 2147777dab0Sopenharmony_ci * @since 12 2157777dab0Sopenharmony_ci */ 2167777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_DestroyDefaultDisplayCutoutInfo( 2177777dab0Sopenharmony_ci NativeDisplayManager_CutoutInfo *cutoutInfo); 2187777dab0Sopenharmony_ci 2197777dab0Sopenharmony_ci/** 2207777dab0Sopenharmony_ci * @brief Check whether the device is foldable. 2217777dab0Sopenharmony_ci * 2227777dab0Sopenharmony_ci * @return { bool } true means the device is foldable. 2237777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 2247777dab0Sopenharmony_ci * @since 12 2257777dab0Sopenharmony_ci */ 2267777dab0Sopenharmony_cibool OH_NativeDisplayManager_IsFoldable(); 2277777dab0Sopenharmony_ci 2287777dab0Sopenharmony_ci/** 2297777dab0Sopenharmony_ci * @brief Get the display mode of the foldable device. 2307777dab0Sopenharmony_ci * 2317777dab0Sopenharmony_ci * @param { *displayMode } Indicates the pointer to an <b>NativeDisplayManager_FoldDisplayMode</b> object. 2327777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 2337777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 2347777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support. 2357777dab0Sopenharmony_ci * @syscap SystemCapability.Window.SessionManager 2367777dab0Sopenharmony_ci * @since 12 2377777dab0Sopenharmony_ci */ 2387777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_GetFoldDisplayMode( 2397777dab0Sopenharmony_ci NativeDisplayManager_FoldDisplayMode *displayMode); 2407777dab0Sopenharmony_ci 2417777dab0Sopenharmony_ci/** 2427777dab0Sopenharmony_ci * @brief the callback function type when display change. 2437777dab0Sopenharmony_ci * 2447777dab0Sopenharmony_ci * @param { *displayId } change display id. 2457777dab0Sopenharmony_ci * @syscap SystemCapability.Window.SessionManager 2467777dab0Sopenharmony_ci * @since 12 2477777dab0Sopenharmony_ci */ 2487777dab0Sopenharmony_citypedef void (*OH_NativeDisplayManager_DisplayChangeCallback)(uint64_t displayId); 2497777dab0Sopenharmony_ci 2507777dab0Sopenharmony_ci/** 2517777dab0Sopenharmony_ci * @brief Register the callback for display change listener. 2527777dab0Sopenharmony_ci * 2537777dab0Sopenharmony_ci * @param { displayChangeCallback } display change callback. 2547777dab0Sopenharmony_ci * @param { *listenerIndex } Indicates the pointer to an <b>uint32_t</b> object. used in unregister call. 2557777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 2567777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 2577777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 2587777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 2597777dab0Sopenharmony_ci * @since 12 2607777dab0Sopenharmony_ci */ 2617777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_RegisterDisplayChangeListener( 2627777dab0Sopenharmony_ci OH_NativeDisplayManager_DisplayChangeCallback displayChangeCallback, uint32_t *listenerIndex); 2637777dab0Sopenharmony_ci 2647777dab0Sopenharmony_ci/** 2657777dab0Sopenharmony_ci * @brief Unregister the callback for display changes listener. 2667777dab0Sopenharmony_ci * 2677777dab0Sopenharmony_ci * @param { listenerIndex } display changed listener index. 2687777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 2697777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 2707777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 2717777dab0Sopenharmony_ci * @syscap SystemCapability.WindowManager.WindowManager.Core 2727777dab0Sopenharmony_ci * @since 12 2737777dab0Sopenharmony_ci */ 2747777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_UnregisterDisplayChangeListener(uint32_t listenerIndex); 2757777dab0Sopenharmony_ci 2767777dab0Sopenharmony_ci/** 2777777dab0Sopenharmony_ci * @brief the callback function type when display fold change. 2787777dab0Sopenharmony_ci * 2797777dab0Sopenharmony_ci * @param { displayMode } current fold display mode. 2807777dab0Sopenharmony_ci * @syscap SystemCapability.Window.SessionManager 2817777dab0Sopenharmony_ci * @since 12 2827777dab0Sopenharmony_ci */ 2837777dab0Sopenharmony_citypedef void (*OH_NativeDisplayManager_FoldDisplayModeChangeCallback)( 2847777dab0Sopenharmony_ci NativeDisplayManager_FoldDisplayMode displayMode); 2857777dab0Sopenharmony_ci 2867777dab0Sopenharmony_ci/** 2877777dab0Sopenharmony_ci * @brief Register the callback for display mode change listener. 2887777dab0Sopenharmony_ci * 2897777dab0Sopenharmony_ci * @param { displayModeChangeCallback } display mode change callback. 2907777dab0Sopenharmony_ci * @param { *listenerIndex } Indicates the pointer to an <b>uint32_t</b> object. used in unregister call. 2917777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 2927777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 2937777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support. 2947777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 2957777dab0Sopenharmony_ci * @syscap SystemCapability.Window.SessionManager 2967777dab0Sopenharmony_ci * @since 12 2977777dab0Sopenharmony_ci */ 2987777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_RegisterFoldDisplayModeChangeListener( 2997777dab0Sopenharmony_ci OH_NativeDisplayManager_FoldDisplayModeChangeCallback displayModeChangeCallback, uint32_t *listenerIndex); 3007777dab0Sopenharmony_ci 3017777dab0Sopenharmony_ci/** 3027777dab0Sopenharmony_ci * @brief Unregister the callback for display mode change listener. 3037777dab0Sopenharmony_ci * 3047777dab0Sopenharmony_ci * @param { listenerIndex } display mode change listener index. 3057777dab0Sopenharmony_ci * @return { @link DISPLAY_MANAGER_OK } If the operation is successful 3067777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_INVALID_PARAM } If Parameter error. 3077777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED } device not support. 3087777dab0Sopenharmony_ci * { @link DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL } If display manager service works abnormally. 3097777dab0Sopenharmony_ci * @syscap SystemCapability.Window.SessionManager 3107777dab0Sopenharmony_ci * @since 12 3117777dab0Sopenharmony_ci */ 3127777dab0Sopenharmony_ciNativeDisplayManager_ErrorCode OH_NativeDisplayManager_UnregisterFoldDisplayModeChangeListener(uint32_t listenerIndex); 3137777dab0Sopenharmony_ci 3147777dab0Sopenharmony_ci#ifdef __cplusplus 3157777dab0Sopenharmony_ci} 3167777dab0Sopenharmony_ci#endif 3177777dab0Sopenharmony_ci/** @} */ 3187777dab0Sopenharmony_ci#endif // OH_NATIVE_DISPLAY_MANAGER_H 319