• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NativeDisplayManager_DisplayInfo
2
3## Overview
4
5The struct describes the information about a display.
6
7**Since**: 14
8
9**Related module**: [OH_DisplayManager](capi-oh-displaymanager.md)
10
11**Header file**: [oh_display_info.h](capi-oh-display-info-h.md)
12
13## Summary
14
15### Member Variables
16
17| Name| Description|
18| -- | -- |
19| uint32_t id | ID of the display. The value must be a non-negative integer.|
20| char name[OH_DISPLAY_NAME_LENGTH + 1] | Name of the display.|
21| bool isAlive | Whether the display is active. **true** if active, **false** otherwise.|
22| int32_t width | Width of the display, in px. The value must be a non-negative integer.|
23| int32_t height | Height of the display, in px. The value must be a non-negative integer.|
24| int32_t physicalWidth | Physical width of the display, in px. The value must be a non-negative integer.|
25| int32_t physicalHeight | Physical height of the display, in px. The value must be a non-negative integer.|
26| uint32_t refreshRate | Refresh rate of the display, in Hz. The value must be a non-negative integer.|
27| uint32_t availableWidth | Width of the available area on a 2-in-1 device, in px. The value must be a non-negative integer.|
28| uint32_t availableHeight | Height of the available area on a 2-in-1 device, in px. The value is an integer greater than 0.|
29| float 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.|
30| float 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.|
31| float 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**.|
32| float xDPI | Exact physical pixels per inch of the display in the X dimension. The value must be a floating-point number greater than 0.|
33| float yDPI | Exact physical pixels per inch of the display in the Y dimension. The value must be a floating-point number greater than 0.|
34| [NativeDisplayManager_Rotation](capi-oh-display-info-h.md#nativedisplaymanager_rotation) rotation | Clockwise rotation angle of the display.|
35| [NativeDisplayManager_DisplayState](capi-oh-display-info-h.md#nativedisplaymanager_displaystate) state | State of the display.|
36| [NativeDisplayManager_Rotation](capi-oh-display-info-h.md#nativedisplaymanager_rotation) orientation | Orientation of the display.|
37| [NativeDisplayManager_DisplayHdrFormat](capi-nativedisplaymanager-displayhdrformat.md)* hdrFormat | All the HDR formats supported by the display.|
38| [NativeDisplayManager_DisplayColorSpace](capi-nativedisplaymanager-displaycolorspace.md)* colorSpace | All the color spaces supported by the display.|
39