1# NativeDisplayManager_DisplayInfo
2
3
4## Overview
5
6The NativeDisplayManager_DisplayInfo struct encapsulates the information about a display.
7
8**Since**: 14
9
10**Related module**: [OH_DisplayManager](_o_h___display_manager.md)
11
12
13## Summary
14
15
16### Member Variables
17
18| Name| Description|
19| -------- | -------- |
20| uint32_t [id](#id) | ID of the display. The value must be a non-negative integer.|
21| char [name](#name) [OH_DISPLAY_NAME_LENGTH+1] | Name of the display.|
22| bool [isAlive](#isalive) | Whether the display is active. The value **true** means that the display is active, and **false** means the opposite.|
23| int32_t [width](#width) | Width of the display, in px. The value must be a non-negative integer.|
24| int32_t [height](#height) | Height of the display, in px. The value must be a non-negative integer.|
25| int32_t [physicalWidth](#physicalwidth) | Physical width of the display, in px. The value must be a non-negative integer.|
26| int32_t [physicalHeight](#physicalheight) | Physical height of the display, in px. The value must be a non-negative integer.|
27| uint32_t [refreshRate](#refreshrate) | Refresh rate of the display, in Hz. The value must be a non-negative integer.|
28| uint32_t [availableWidth](#availablewidth) | Width of the available area on a 2-in-1 device, in px. The value must be a non-negative integer.|
29| uint32_t [availableHeight](#availableheight) | Height of the available area on a 2-in-1 device, in px. The value must be a non-negative integer.|
30| float [densityDPI](#densitydpi) | Physical pixel density of the display, that is, the number of pixels per inch. The value must be a floating point number greater than 0. The unit is px. Generally, the value is **160.0** or **480.0**. The actual value depends on the optional values provided by the device in use.|
31| float [densityPixels](#densitypixels) | Logical pixel density of the display, which is the scaling coefficient between physical pixels and logical pixels. The value is a floating point number greater than 0 and is restricted by the range of **densityDPI**. The value range is [0.5, 4.0]. Generally, the value is **1.0** or **3.0**. The actual value depends on the density DPI provided by the device in use.|
32| float [scaledDensity](#scaleddensity) | Scaling factor for fonts displayed on the display. The value must be a floating point number greater than 0. Generally, the value is the same as that of **densityPixels**.|
33| float [xDPI](#xdpi) | Exact physical pixels per inch of the display in the X dimension. The value must be a floating point number greater than 0.|
34| float [yDPI](#ydpi) | Exact physical pixels per inch of the display in the Y dimension. The value must be a floating point number greater than 0.|
35| [NativeDisplayManager_Rotation](_o_h___display_manager.md#nativedisplaymanager_rotation)[rotation](#rotation) | Clockwise rotation angle of the display.|
36| [NativeDisplayManager_DisplayState](_o_h___display_manager.md#nativedisplaymanager_displaystate)[state](#state) | State of the display.|
37| [NativeDisplayManager_Orientation](_o_h___display_manager.md#nativedisplaymanager_orientation)[orientation](#orientation) | Orientation of the display.|
38| [NativeDisplayManager_DisplayHdrFormat](_native_display_manager___display_hdr_format.md) \* [hdrFormat](#hdrformat) | All the HDR formats supported by the display.|
39| [NativeDisplayManager_DisplayColorSpace](_native_display_manager___display_color_space.md) \* [colorSpace](#colorspace) | All the color spaces supported by the display.|
40
41
42## Member Variable Description
43
44
45### availableHeight
46
47```
48uint32_t NativeDisplayManager_DisplayInfo::availableHeight
49```
50
51**Description**
52
53Height of the available area on a 2-in-1 device, in px. The value must be a non-negative integer.
54
55
56### availableWidth
57
58```
59uint32_t NativeDisplayManager_DisplayInfo::availableWidth
60```
61
62**Description**
63
64Width of the available area on a 2-in-1 device, in px. The value must be a non-negative integer.
65
66
67### colorSpace
68
69```
70NativeDisplayManager_DisplayColorSpace* NativeDisplayManager_DisplayInfo::colorSpace
71```
72
73**Description**
74
75All the color spaces supported by the display.
76
77
78### densityDPI
79
80```
81float NativeDisplayManager_DisplayInfo::densityDPI
82```
83
84**Description**
85
86Physical pixel density of the display, that is, the number of pixels per inch. The value must be a floating point number greater than 0. The unit is px. Generally, the value is **160.0** or **480.0**. The actual value depends on the optional values provided by the device in use.
87
88
89### densityPixels
90
91```
92float NativeDisplayManager_DisplayInfo::densityPixels
93```
94
95**Description**
96
97Logical pixel density of the display, which is the scaling coefficient between physical pixels and logical pixels. The value is a floating point number greater than 0 and is restricted by the range of **densityDPI**. The value range is [0.5, 4.0]. Generally, the value is **1.0** or **3.0**. The actual value depends on the density DPI provided by the device in use.
98
99
100### hdrFormat
101
102```
103NativeDisplayManager_DisplayHdrFormat* NativeDisplayManager_DisplayInfo::hdrFormat
104```
105
106**Description**
107
108All the HDR formats supported by the display.
109
110
111### height
112
113```
114int32_t NativeDisplayManager_DisplayInfo::height
115```
116
117**Description**
118
119Height of the display, in px. The value must be a non-negative integer.
120
121
122### id
123
124```
125uint32_t NativeDisplayManager_DisplayInfo::id
126```
127
128**Description**
129
130ID of the display. The value must be a non-negative integer.
131
132
133### isAlive
134
135```
136bool NativeDisplayManager_DisplayInfo::isAlive
137```
138
139**Description**
140
141Whether the display is active. The value **true** means that the display is active, and **false** means the opposite.
142
143
144### name
145
146```
147char NativeDisplayManager_DisplayInfo::name[OH_DISPLAY_NAME_LENGTH+1]
148```
149
150**Description**
151
152Name of the display.
153
154
155### orientation
156
157```
158NativeDisplayManager_Orientation NativeDisplayManager_DisplayInfo::orientation
159```
160
161**Description**
162
163Orientation of the display.
164
165
166### physicalHeight
167
168```
169int32_t NativeDisplayManager_DisplayInfo::physicalHeight
170```
171
172**Description**
173
174Physical height of the display, in px. The value must be a non-negative integer.
175
176
177### physicalWidth
178
179```
180int32_t NativeDisplayManager_DisplayInfo::physicalWidth
181```
182
183**Description**
184
185Physical width of the display, in px. The value must be a non-negative integer.
186
187
188### refreshRate
189
190```
191uint32_t NativeDisplayManager_DisplayInfo::refreshRate
192```
193
194**Description**
195
196Refresh rate of the display, in Hz. The value must be a non-negative integer.
197
198
199### rotation
200
201```
202NativeDisplayManager_Rotation NativeDisplayManager_DisplayInfo::rotation
203```
204
205**Description**
206
207Clockwise rotation angle of the display.
208
209
210### scaledDensity
211
212```
213float NativeDisplayManager_DisplayInfo::scaledDensity
214```
215
216**Description**
217
218Scaling factor for fonts displayed on the display. The value must be a floating point number greater than 0. Generally, the value is the same as that of **densityPixels**.
219
220
221### state
222
223```
224NativeDisplayManager_DisplayState NativeDisplayManager_DisplayInfo::state
225```
226
227**Description**
228
229State of the display.
230
231
232### width
233
234```
235int32_t NativeDisplayManager_DisplayInfo::width
236```
237
238**Description**
239
240Width of the display, in px. The value must be a non-negative integer.
241
242
243### xDPI
244
245```
246float NativeDisplayManager_DisplayInfo::xDPI
247```
248
249**Description**
250
251Exact physical pixels per inch of the display in the X dimension. The value must be a floating point number greater than 0.
252
253
254### yDPI
255
256```
257float NativeDisplayManager_DisplayInfo::yDPI
258```
259
260**Description**
261
262Exact physical pixels per inch of the display in the Y dimension. The value must be a floating point number greater than 0.
263