openharmony 鸿蒙 capi-oh-display-info-h

2025-06-12 浏览 (1)

oh_display_info.h

Overview

The oh_display_info.h file declares the common enums and definitions of the display.

File to include: <window_manager/oh_display_info.h>

Library: libnative_display_manager.so

System capability: SystemCapability.WindowManager.WindowManager.Core

Since: 12

Related module: OH_DisplayManager

Summary

Structs

Nametypedef KeywordDescription
NativeDisplayManager_RectNativeDisplayManager_RectDescribes a rectangle.
NativeDisplayManager_WaterfallDisplayAreaRectsNativeDisplayManager_WaterfallDisplayAreaRectsDescribes the curved area on a waterfall display.
NativeDisplayManager_CutoutInfoNativeDisplayManager_CutoutInfoDescribes the unusable area of a display, including punch hole, notch, and curved area of a waterfall display.
NativeDisplayManager_DisplayHdrFormatNativeDisplayManager_DisplayHdrFormatDescribes all the HDR formats supported by a display.
NativeDisplayManager_DisplayColorSpaceNativeDisplayManager_DisplayColorSpaceDescribes all the color spaces supported by a display.
NativeDisplayManager_DisplayInfoNativeDisplayManager_DisplayInfoDescribes the information about a display.
NativeDisplayManager_DisplaysInfoNativeDisplayManager_DisplaysInfoDescribes the information about displays of a device with multiple screens.

Enums

Nametypedef KeywordDescription
NativeDisplayManager_RotationNativeDisplayManager_RotationEnumerates the clockwise rotation angles of a display.
NativeDisplayManager_OrientationNativeDisplayManager_OrientationEnumerates the orientations of a display.
NativeDisplayManager_ErrorCodeNativeDisplayManager_ErrorCodeEnumerates the status codes returned by the display manager interface.
NativeDisplayManager_FoldDisplayModeNativeDisplayManager_FoldDisplayModeEnumerates the display modes of a foldable device.
NativeDisplayManager_DisplayStateNativeDisplayManager_DisplayStateEnumerates the states of a display.
NativeDisplayManager_SourceModeNativeDisplayManager_SourceModeEnumerates the source modes of a device.

Enum Description

NativeDisplayManager_Rotation

enum NativeDisplayManager_Rotation

Description

Enumerates the clockwise rotation angles of a display.

System capability: SystemCapability.WindowManager.WindowManager.Core

Since: 12

Enum ItemDescription
DISPLAY_MANAGER_ROTATION_0 = 0The display is rotated clockwise by 0 degrees.
DISPLAY_MANAGER_ROTATION_90 = 1The display is rotated clockwise by 90 degrees.
DISPLAY_MANAGER_ROTATION_180 = 2The display is rotated clockwise by 180 degrees.
DISPLAY_MANAGER_ROTATION_270 = 3The display is rotated clockwise by 270 degrees.

NativeDisplayManager_Orientation

enum NativeDisplayManager_Orientation

Description

Enumerates the orientations of a display.

System capability: SystemCapability.WindowManager.WindowManager.Core

Since: 12

Enum ItemDescription
DISPLAY_MANAGER_PORTRAIT = 0The display is in portrait mode.
DISPLAY_MANAGER_LANDSCAPE = 1The display is in landscape mode.
DISPLAY_MANAGER_PORTRAIT_INVERTED = 2The display is in reverse portrait mode.
DISPLAY_MANAGER_LANDSCAPE_INVERTED = 3The display is in reverse landscape mode.
DISPLAY_MANAGER_UNKNOWNThe screen orientation is unknown.

NativeDisplayManager_ErrorCode

enum NativeDisplayManager_ErrorCode

Description

Enumerates the status codes returned by the display manager interface.

System capability: SystemCapability.WindowManager.WindowManager.Core

Since: 12

Enum ItemDescription
DISPLAY_MANAGER_OK = 0Success.
DISPLAY_MANAGER_ERROR_NO_PERMISSION = 201Permission verification fails. The application does not have the permission to use the API.
DISPLAY_MANAGER_ERROR_NOT_SYSTEM_APP = 202Permission verification fails. A non-system application attempts to call a system API.
DISPLAY_MANAGER_ERROR_INVALID_PARAM = 401Parameter check fails.
DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED = 801The device does not support the API.
DISPLAY_MANAGER_ERROR_INVALID_SCREEN = 1400001The display is invalid.
DISPLAY_MANAGER_ERROR_INVALID_CALL = 1400002The current operation object does not have the operation permission.
DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL = 1400003The system service is abnormal.
DISPLAY_MANAGER_ERROR_ILLEGAL_PARAM = 1400004Invalid parameter.
Since: 20

NativeDisplayManager_FoldDisplayMode

enum NativeDisplayManager_FoldDisplayMode

Description

Enumerates the display modes of a foldable device.

System capability: SystemCapability.WindowManager.WindowManager.Core

Since: 12

Enum ItemDescription
DISPLAY_MANAGER_FOLD_DISPLAY_MODE_UNKNOWN = 0The display mode of the device is unknown.
DISPLAY_MANAGER_FOLD_DISPLAY_MODE_FULL = 1The device is displayed in full screen.
DISPLAY_MANAGER_FOLD_DISPLAY_MODE_MAIN = 2The main screen of the device is displayed.
DISPLAY_MANAGER_FOLD_DISPLAY_MODE_SUB = 3The subscreen of the device is displayed.
DISPLAY_MANAGER_FOLD_DISPLAY_MODE_COORDINATION = 4Both screens of the device are displayed in collaborative mode.

NativeDisplayManager_DisplayState

enum NativeDisplayManager_DisplayState

Description

Enumerates the states of a display.

Since: 14

Enum ItemDescription
DISPLAY_MANAGER_DISPLAY_STATE_UNKNOWN = 0Unknown.
DISPLAY_MANAGER_DISPLAY_STATE_OFF = 1The display is shut down.
DISPLAY_MANAGER_DISPLAY_STATE_ON = 2The display is powered on.
DISPLAY_MANAGER_DISPLAY_STATE_DOZE = 3The display is in sleep mode.
DISPLAY_MANAGER_DISPLAY_STATE_DOZE_SUSPEND = 4The display is in sleep mode, and the CPU is suspended.
DISPLAY_MANAGER_DISPLAY_STATE_VR = 5The display is in VR mode.
DISPLAY_MANAGER_DISPLAY_STATE_ON_SUSPEND = 6The display is powered on, and the CPU is suspended.

NativeDisplayManager_SourceMode

enum NativeDisplayManager_SourceMode

Description

Enumerates the source modes of a device.

Since: 20

Enum ItemDescription
DISPLAY_SOURCE_MODE_NONE = 0The device is currently not in use.
DISPLAY_SOURCE_MODE_MAIN = 1The primary screen of the device is currently in use.
DISPLAY_SOURCE_MODE_MIRROR = 2The device is currently in mirror display mode.
DISPLAY_SOURCE_MODE_EXTEND = 3The device is currently in extended display mode.
DISPLAY_SOURCE_MODE_ALONE = 4The device is currently in independent display mode.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙ArkUI

harmony 鸿蒙ARKUI_TextPickerCascadeRangeContent

harmony 鸿蒙ARKUI_TextPickerRangeContent

harmony 鸿蒙ArkUI_AnimateCompleteCallback

harmony 鸿蒙ArkUI_AttributeItem

harmony 鸿蒙ArkUI_ColorStop

harmony 鸿蒙ArkUI_ContextCallback

harmony 鸿蒙ArkUI_EventModule

harmony 鸿蒙ArkUI_ExpectedFrameRateRange

harmony 鸿蒙ArkUI_IntOffset

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/YQ0n7D