harmony 鸿蒙Display Management Overview

  • 2025-06-12
  • 浏览 (7)

Display Management Overview

Display management is centered around the oversight of a device’s displays, which includes physical, virtual, and foldable displays. It involves managing their properties and serving as a broadcaster to relay monitored information to services that have subscribed to display information.

Display management includes the following capabilities:

  • Obtaining the display properties, such as resolution, physical pixel density, and dimensions.
  • Listening for various display events, including rotation, resolution changes, refresh rate changes, and folding state changes.
  • Creating and using virtual screens. This capability is available only for system applications.

For details about how to obtain display properties and listen for status changes, see Using OH_DisplayManager to Obtain Basic Display Information and Listen for Status Changes (C/C++) and Using Display to Obtain Display Properties and Listen for Status Changes (ArkTS). For details about how to use virtual screens, see Creating and Using a Virtual Screen (ArkTS) (for System Applications Only).

Constraints

  • The Display and Screen APIs must be used in the system that supports the SystemCapability.Window.SessionManager capability. For details, see SystemCapability.
  • In multi-display implementation, the Screen API is available only for system applications only, and certain APIs require the ohos.permission.CAPTURE_SCREEN permission.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Display Management

harmony 鸿蒙Using OH_DisplayManager to Obtain Basic Display Information and Listen for Status Changes (C/C++)

harmony 鸿蒙Using Display to Obtain Display Properties and Listen for Status Changes (ArkTS)

harmony 鸿蒙Creating and Using a Virtual Screen (ArkTS) (for System Applications Only)

0  赞