• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# NativeDisplayManager_DisplayInfo
2<!--Kit: ArkUI-->
3<!--Subsystem: Window-->
4<!--Owner: @oh_wangxk; @logn-->
5<!--Designer: @hejunfei1991-->
6<!--Tester: @qinliwen0417-->
7<!--Adviser: @ge-yafang-->
8
9## 概述
10
11显示设备的对象属性。
12
13**起始版本:** 14
14
15**相关模块:** [OH_DisplayManager](capi-oh-displaymanager.md)
16
17**所在头文件:** [oh_display_info.h](capi-oh-display-info-h.md)
18
19## 汇总
20
21### 成员变量
22
23| 名称 | 描述 |
24| -- | -- |
25| uint32_t id | 显示设备的屏幕id号,为非负整数。 |
26| char name[OH_DISPLAY_NAME_LENGTH + 1] | 显示设备的名称。 |
27| bool isAlive | 显示设备是否启用:true表示设备启动,false表示设备未启用。 |
28| int32_t width | 显示设备的屏幕宽度,单位为px,该参数应为非负整数。 |
29| int32_t height | 显示设备的屏幕高度,单位为px,该参数应为非负整数。 |
30| int32_t physicalWidth | 显示设备的物理宽度,单位为px,该参数应为非负整数。 |
31| int32_t physicalHeight | 显示设备的物理高度,单位为px,该参数应为非负整数。 |
32| uint32_t refreshRate | 显示设备的刷新率,单位为Hz,该参数应为非负整数。 |
33| uint32_t availableWidth | 2in1设备上屏幕的可用区域宽度,单位为px,该参数为非负整数。 |
34| uint32_t availableHeight | 2in1设备上屏幕的可用区域高度,单位为px,该参数为大于0的整数。 |
35| float densityDPI | 显示设备屏幕的物理像素密度,表示每英寸上的像素点数。该参数为大于0的浮点数,单位为px。一般取值160.0、480.0等,实际能取到的值取决于不同设备设置里提供的可选值。 |
36| float densityPixels | 显示设备逻辑像素的密度,代表物理像素与逻辑像素的缩放系数。该参数为大于0的浮点数,受densityDPI范围限制,取值范围在[0.5,4.0]。一般取值1.0、3.0等,实际取值取决于不同设备提供的densityDPI。 |
37| float scaledDensity | 显示设备的显示字体的缩放因子。该参数为大于0的浮点数,通常与densityPixels相同。 |
38| float xDPI | 显示设备x方向中每英寸屏幕的确切物理像素值,该参数为大于0的浮点数。 |
39| float yDPI | 显示设备y方向中每英寸屏幕的确切物理像素值,该参数为大于0的浮点数。 |
40| [NativeDisplayManager_Rotation](capi-oh-display-info-h.md#nativedisplaymanager_rotation) rotation | 显示设备的屏幕顺时针旋转角度。 |
41| [NativeDisplayManager_DisplayState](capi-oh-display-info-h.md#nativedisplaymanager_displaystate) state | 显示设备的状态。 |
42| [NativeDisplayManager_Orientation](capi-oh-display-info-h.md#nativedisplaymanager_orientation) orientation | 表示屏幕当前显示的方向。 |
43| [NativeDisplayManager_DisplayHdrFormat](capi-nativedisplaymanager-displayhdrformat.md)* hdrFormat | 显示设备支持的所有HDR格式。 |
44| [NativeDisplayManager_DisplayColorSpace](capi-nativedisplaymanager-displaycolorspace.md)* colorSpace | 显示设备支持的所有色域类型。 |
45
46
47