• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# oh_display_info.h
2
3## Overview
4
5The file declares the common enums and definitions of the display.
6
7**File to include**: <window_manager/oh_display_info.h>
8
9**Library**: libnative_display_manager.so
10
11**System capability**: SystemCapability.WindowManager.WindowManager.Core
12
13**Since**: 12
14
15**Related module**: [OH_DisplayManager](capi-oh-displaymanager.md)
16
17## Summary
18
19### Structs
20
21| Name| typedef Keyword| Description|
22| -- | -- | -- |
23| [NativeDisplayManager_Rect](capi-nativedisplaymanager-rect.md) | NativeDisplayManager_Rect | Describes a rectangle.|
24| [NativeDisplayManager_WaterfallDisplayAreaRects](capi-nativedisplaymanager-waterfalldisplayarearects.md) | NativeDisplayManager_WaterfallDisplayAreaRects | Describes the curved area on a waterfall display.|
25| [NativeDisplayManager_CutoutInfo](capi-nativedisplaymanager-cutoutinfo.md) | NativeDisplayManager_CutoutInfo | Describes the unusable area of a display, including punch hole, notch, and curved area of a waterfall display.|
26| [NativeDisplayManager_DisplayHdrFormat](capi-nativedisplaymanager-displayhdrformat.md) | NativeDisplayManager_DisplayHdrFormat | Describes all the HDR formats supported by a display.|
27| [NativeDisplayManager_DisplayColorSpace](capi-nativedisplaymanager-displaycolorspace.md) | NativeDisplayManager_DisplayColorSpace | Describes all the color spaces supported by a display.|
28| [NativeDisplayManager_DisplayInfo](capi-nativedisplaymanager-displayinfo.md) | NativeDisplayManager_DisplayInfo | Describes the information about a display.|
29| [NativeDisplayManager_DisplaysInfo](capi-nativedisplaymanager-displaysinfo.md) | NativeDisplayManager_DisplaysInfo | Describes the information about displays of a device with multiple screens.|
30
31### Enums
32
33| Name| typedef Keyword| Description|
34| -- | -- | -- |
35| [NativeDisplayManager_Rotation](#nativedisplaymanager_rotation) | NativeDisplayManager_Rotation | Enumerates the clockwise rotation angles of a display.|
36| [NativeDisplayManager_Orientation](#nativedisplaymanager_orientation) | NativeDisplayManager_Orientation | Enumerates the orientations of a display.|
37| [NativeDisplayManager_ErrorCode](#nativedisplaymanager_errorcode) | NativeDisplayManager_ErrorCode | Enumerates the status codes returned by the display manager interface.|
38| [NativeDisplayManager_FoldDisplayMode](#nativedisplaymanager_folddisplaymode) | NativeDisplayManager_FoldDisplayMode | Enumerates the display modes of a foldable device.|
39| [NativeDisplayManager_DisplayState](#nativedisplaymanager_displaystate) | NativeDisplayManager_DisplayState | Enumerates the states of a display.|
40| [NativeDisplayManager_SourceMode](#nativedisplaymanager_sourcemode) | NativeDisplayManager_SourceMode | Enumerates the source modes of a device.|
41
42## Enum Description
43
44### NativeDisplayManager_Rotation
45
46```
47enum NativeDisplayManager_Rotation
48```
49
50**Description**
51
52Enumerates the clockwise rotation angles of a display.
53
54**System capability**: SystemCapability.WindowManager.WindowManager.Core
55
56**Since**: 12
57
58| Enum Item| Description|
59| -- | -- |
60| DISPLAY_MANAGER_ROTATION_0 = 0 | The display is rotated clockwise by 0 degrees.|
61| DISPLAY_MANAGER_ROTATION_90 = 1 | The display is rotated clockwise by 90 degrees.|
62| DISPLAY_MANAGER_ROTATION_180 = 2 | The display is rotated clockwise by 180 degrees.|
63| DISPLAY_MANAGER_ROTATION_270 = 3 | The display is rotated clockwise by 270 degrees.|
64
65### NativeDisplayManager_Orientation
66
67```
68enum NativeDisplayManager_Orientation
69```
70
71**Description**
72
73Enumerates the orientations of a display.
74
75**System capability**: SystemCapability.WindowManager.WindowManager.Core
76
77**Since**: 12
78
79| Enum Item| Description|
80| -- | -- |
81| DISPLAY_MANAGER_PORTRAIT = 0 | The display is in portrait mode.|
82| DISPLAY_MANAGER_LANDSCAPE = 1 | The display is in landscape mode.|
83| DISPLAY_MANAGER_PORTRAIT_INVERTED = 2 | The display is in reverse portrait mode.|
84| DISPLAY_MANAGER_LANDSCAPE_INVERTED = 3 | The display is in reverse landscape mode.|
85| DISPLAY_MANAGER_UNKNOWN | The screen orientation is unknown.|
86
87### NativeDisplayManager_ErrorCode
88
89```
90enum NativeDisplayManager_ErrorCode
91```
92
93**Description**
94
95Enumerates the status codes returned by the display manager interface.
96
97**System capability**: SystemCapability.WindowManager.WindowManager.Core
98
99**Since**: 12
100
101| Enum Item| Description|
102| -- | -- |
103| DISPLAY_MANAGER_OK = 0 | Success.|
104| DISPLAY_MANAGER_ERROR_NO_PERMISSION = 201 | Permission verification fails. The application does not have the permission to use the API.|
105| DISPLAY_MANAGER_ERROR_NOT_SYSTEM_APP = 202 | Permission verification fails. A non-system application attempts to call a system API.|
106| DISPLAY_MANAGER_ERROR_INVALID_PARAM = 401 | Parameter check fails.|
107| DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED = 801 | The device does not support the API.|
108| DISPLAY_MANAGER_ERROR_INVALID_SCREEN = 1400001 | The display is invalid.|
109| DISPLAY_MANAGER_ERROR_INVALID_CALL = 1400002 | The current operation object does not have the operation permission.|
110| DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL = 1400003 | The system service is abnormal.|
111| DISPLAY_MANAGER_ERROR_ILLEGAL_PARAM = 1400004 |  Invalid parameter.<br>**Since**: 20|
112
113### NativeDisplayManager_FoldDisplayMode
114
115```
116enum NativeDisplayManager_FoldDisplayMode
117```
118
119**Description**
120
121Enumerates the display modes of a foldable device.
122
123**System capability**: SystemCapability.WindowManager.WindowManager.Core
124
125**Since**: 12
126
127| Enum Item| Description|
128| -- | -- |
129| DISPLAY_MANAGER_FOLD_DISPLAY_MODE_UNKNOWN = 0 | The display mode of the device is unknown.|
130| DISPLAY_MANAGER_FOLD_DISPLAY_MODE_FULL = 1 | The device is displayed in full screen.|
131| DISPLAY_MANAGER_FOLD_DISPLAY_MODE_MAIN = 2 | The main screen of the device is displayed.|
132| DISPLAY_MANAGER_FOLD_DISPLAY_MODE_SUB = 3 | The subscreen of the device is displayed.|
133| DISPLAY_MANAGER_FOLD_DISPLAY_MODE_COORDINATION = 4 | Both screens of the device are displayed in collaborative mode.|
134
135### NativeDisplayManager_DisplayState
136
137```
138enum NativeDisplayManager_DisplayState
139```
140
141**Description**
142
143Enumerates the states of a display.
144
145**Since**: 14
146
147| Enum Item| Description|
148| -- | -- |
149| DISPLAY_MANAGER_DISPLAY_STATE_UNKNOWN = 0 | Unknown.|
150| DISPLAY_MANAGER_DISPLAY_STATE_OFF = 1 | The display is shut down.|
151| DISPLAY_MANAGER_DISPLAY_STATE_ON = 2 | The display is powered on.|
152| DISPLAY_MANAGER_DISPLAY_STATE_DOZE = 3 | The display is in sleep mode.|
153| DISPLAY_MANAGER_DISPLAY_STATE_DOZE_SUSPEND = 4 | The display is in sleep mode, and the CPU is suspended.|
154| DISPLAY_MANAGER_DISPLAY_STATE_VR = 5 | The display is in VR mode.|
155| DISPLAY_MANAGER_DISPLAY_STATE_ON_SUSPEND = 6 | The display is powered on, and the CPU is suspended.|
156
157### NativeDisplayManager_SourceMode
158
159```
160enum NativeDisplayManager_SourceMode
161```
162
163**Description**
164
165Enumerates the source modes of a device.
166
167**Since**: 20
168
169| Enum Item| Description|
170| -- | -- |
171| DISPLAY_SOURCE_MODE_NONE = 0 | The device is currently not in use.|
172| DISPLAY_SOURCE_MODE_MAIN = 1 | The primary screen of the device is currently in use.|
173| DISPLAY_SOURCE_MODE_MIRROR = 2 | The device is currently in mirror display mode.|
174| DISPLAY_SOURCE_MODE_EXTEND = 3 | The device is currently in extended display mode.|
175| DISPLAY_SOURCE_MODE_ALONE = 4 | The device is currently in independent display mode.|
176