oh_display_info.h

Overview

The oh_display_info.h file declares the common enums and definitions of the display.

File to include: <window_manager/oh_display_info.h>

Library: libnative_display_manager.so

System capability: SystemCapability.WindowManager.WindowManager.Core

Since: 12

Related module: OH_DisplayManager

Summary

Structs

Name Description
struct NativeDisplayManager_Rect Describes a rectangle.
struct NativeDisplayManager_WaterfallDisplayAreaRects Describes the curved area on a waterfall display.
struct NativeDisplayManager_CutoutInfo Describes the unusable area of a display, including punch hole, notch, and curved area of a waterfall display.
struct NativeDisplayManager_DisplayHdrFormat Encapsulates all the HDR formats supported by a display.
struct NativeDisplayManager_DisplayColorSpace Encapsulates all the color spaces supported by a display.
struct NativeDisplayManager_DisplayInfo Encapsulates the information about a display.
struct NativeDisplayManager_DisplaysInfo Encapsulates the information about displays of a device with multiple screens.

Macros

Name Description
OH_DISPLAY_NAME_LENGTH 32 Maximum length of a display name.

Types

Name Description
typedef enum NativeDisplayManager_Rotation NativeDisplayManager_Rotation Defines an enum for the clockwise rotation angles of a display.
typedef enum NativeDisplayManager_Orientation NativeDisplayManager_Orientation Defines an enum for the orientations of a display.
typedef enum NativeDisplayManager_ErrorCode NativeDisplayManager_ErrorCode Defines an enum for the status codes returned by the display manager interface.
typedef enum NativeDisplayManager_FoldDisplayMode NativeDisplayManager_FoldDisplayMode Defines an enum for the display modes of a foldable device.
typedef struct NativeDisplayManager_Rect NativeDisplayManager_Rect Defines a struct for a rectangle.
typedef struct NativeDisplayManager_WaterfallDisplayAreaRects NativeDisplayManager_WaterfallDisplayAreaRects Defines a struct for the curved area on a waterfall display.
typedef struct NativeDisplayManager_CutoutInfo NativeDisplayManager_CutoutInfo Defines a struct for the unusable area of a display, including punch hole, notch, and curved area of a waterfall display.
typedef enum NativeDisplayManager_DisplayState NativeDisplayManager_DisplayState Defines an enum for the states of a display.
typedef struct NativeDisplayManager_DisplayHdrFormat NativeDisplayManager_DisplayHdrFormat Defines a struct that encapsulates all the HDR formats supported by a display.
typedef struct NativeDisplayManager_DisplayColorSpace NativeDisplayManager_DisplayColorSpace Defines a struct that encapsulates all the color spaces supported by a display.
typedef struct NativeDisplayManager_DisplayInfo NativeDisplayManager_DisplayInfo Defines a struct that encapsulates the information about a display.
typedef struct NativeDisplayManager_DisplaysInfo NativeDisplayManager_DisplaysInfo Defines a struct that encapsulates the information about displays of a device with multiple screens.

Enums

Name Description
NativeDisplayManager_Rotation { DISPLAY_MANAGER_ROTATION_0 = 0, DISPLAY_MANAGER_ROTATION_90 = 1, DISPLAY_MANAGER_ROTATION_180 = 2, DISPLAY_MANAGER_ROTATION_270 = 3 } Enumerates the clockwise rotation angles of a display.
NativeDisplayManager_Orientation {
DISPLAY_MANAGER_PORTRAIT = 0, DISPLAY_MANAGER_LANDSCAPE = 1, DISPLAY_MANAGER_PORTRAIT_INVERTED = 2, DISPLAY_MANAGER_LANDSCAPE_INVERTED = 3,
DISPLAY_MANAGER_UNKNOWN
}
Enumerates the orientations of a display.
NativeDisplayManager_ErrorCode {
DISPLAY_MANAGER_OK = 0, DISPLAY_MANAGER_ERROR_NO_PERMISSION = 201, DISPLAY_MANAGER_ERROR_NOT_SYSTEM_APP = 202, DISPLAY_MANAGER_ERROR_INVALID_PARAM = 401,
DISPLAY_MANAGER_ERROR_DEVICE_NOT_SUPPORTED = 801, DISPLAY_MANAGER_ERROR_INVALID_SCREEN = 1400001, DISPLAY_MANAGER_ERROR_INVALID_CALL = 1400002, DISPLAY_MANAGER_ERROR_SYSTEM_ABNORMAL = 1400003
}
Enumerates the status codes returned by the display manager interface.
NativeDisplayManager_FoldDisplayMode {
DISPLAY_MANAGER_FOLD_DISPLAY_MODE_UNKNOWN = 0, DISPLAY_MANAGER_FOLD_DISPLAY_MODE_FULL = 1, DISPLAY_MANAGER_FOLD_DISPLAY_MODE_MAIN = 2, DISPLAY_MANAGER_FOLD_DISPLAY_MODE_SUB = 3,
DISPLAY_MANAGER_FOLD_DISPLAY_MODE_COORDINATION = 4
}
Enumerates the display modes of a foldable device.
NativeDisplayManager_DisplayState {
DISPLAY_MANAGER_DISPLAY_STATE_UNKNOWN = 0, DISPLAY_MANAGER_DISPLAY_STATE_OFF = 1, DISPLAY_MANAGER_DISPLAY_STATE_ON = 2, DISPLAY_MANAGER_DISPLAY_STATE_DOZE = 3,
DISPLAY_MANAGER_DISPLAY_STATE_DOZE_SUSPEND = 4, DISPLAY_MANAGER_DISPLAY_STATE_VR = 5, DISPLAY_MANAGER_DISPLAY_STATE_ON_SUSPEND = 6
}
Enumerates the states of a display.