openharmony 鸿蒙 capi-nativedisplaymanager-displayinfo

2025-06-12 浏览 (1)

NativeDisplayManager_DisplayInfo

Overview

The NativeDisplayManager_DisplayInfo struct describes the information about a display.

Since: 14

Related module: OH_DisplayManager

Header file: oh_display_info.h

Summary

Member Variables

NameDescription
uint32_t idID of the display. The value must be a non-negative integer.
char nameName of the display.
bool isAliveWhether the display is active. The value true means that the display is active, and false means the opposite.
int32_t widthWidth of the display, in px. The value must be a non-negative integer.
int32_t heightHeight of the display, in px. The value must be a non-negative integer.
int32_t physicalWidthPhysical width of the display, in px. The value must be a non-negative integer.
int32_t physicalHeightPhysical height of the display, in px. The value must be a non-negative integer.
uint32_t refreshRateRefresh rate of the display, in Hz. The value must be a non-negative integer.
uint32_t availableWidthWidth of the available area on a 2-in-1 device, in px. The value must be a non-negative integer.
uint32_t availableHeightHeight of the available area on a 2-in-1 device, in px. The value is an integer greater than 0.
float densityDPIPhysical 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.
float densityPixelsLogical 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.
float scaledDensityScaling 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.
float xDPIExact physical pixels per inch of the display in the X dimension. The value must be a floating point number greater than 0.
float yDPIExact physical pixels per inch of the display in the Y dimension. The value must be a floating point number greater than 0.
NativeDisplayManager_Rotation rotationClockwise rotation angle of the display.
NativeDisplayManager_DisplayState stateState of the display.
NativeDisplayManager_Rotation orientationOrientation of the display.
NativeDisplayManager_DisplayHdrFormat* hdrFormatAll the HDR formats supported by the display.
NativeDisplayManager_DisplayColorSpace* colorSpaceAll the color spaces supported by the display.

你可能感兴趣的鸿蒙文章

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/QmsQpj