openharmony 鸿蒙 capi-resmgr-common-h

2026-08-25 浏览 (1)

resmgr_common.h

Overview

Provides the enum types and structures for resource manager APIs.

File to include: <resourcemanager/resmgr_common.h>

Library: libohresmgr.so

System capability: SystemCapability.Global.ResourceManager

Since: 12

Related module: resourcemanager

Summary

Structs

Nametypedef KeywordDescription
ResourceManager_ConfigurationResourceManager_ConfigurationEnumerates device states.

Enums

Nametypedef KeywordDescription
ResourceManager_ErrorCode-Enumerates resource manager error codes.
ScreenDensity-Enumerates screen density types.
ResourceManager_DirectionResourceManager_DirectionEnumerates screen orientations.
ResourceManager_ColorModeResourceManager_ColorModeEnumerates color modes.
ResourceManager_DeviceTypeResourceManager_DeviceTypeEnumerates device types.

Enum Description

ResourceManager_ErrorCode

enum ResourceManager_ErrorCode

Description

Enumerates resource manager error codes.

Since: 12

Enum ItemDescription
SUCCESS = 0Operation successful.
ERROR_CODE_INVALID_INPUT_PARAMETER = 401Invalid input parameter.
ERROR_CODE_RES_ID_NOT_FOUND = 9001001Invalid resource ID.
ERROR_CODE_RES_NOT_FOUND_BY_ID = 9001002Invalid resource name.
ERROR_CODE_RES_NAME_NOT_FOUND = 9001003No matching resource found based on the resource ID.
ERROR_CODE_RES_NOT_FOUND_BY_NAME = 9001004No matching resource found based on the resource name.
ERROR_CODE_RES_PATH_INVALID = 9001005Invalid relative path.
ERROR_CODE_RES_REF_TOO_MUCH = 9001006Resource referenced cyclically.
ERROR_CODE_RES_ID_FORMAT_ERROR = 9001007Failed to format the resource obtained based on the specified resource ID.
ERROR_CODE_RES_NAME_FORMAT_ERROR = 9001008Failed to format the resource obtained based on the specified resource name.
ERROR_CODE_SYSTEM_RES_MANAGER_GET_FAILED = 9001009Failed to access system resources.
ERROR_CODE_OVERLAY_RES_PATH_INVALID = 9001010Invalid overlay path.
ERROR_CODE_OUT_OF_MEMORY = 9001100A memory overflow occurs.

ScreenDensity

enum ScreenDensity

Description

Enumerates screen density types.

Since: 12

Enum ItemDescription
SCREEN_SDPI = 120Screen density with small-scale dots per inch (SDPI).
SCREEN_MDPI = 160Screen density with medium-scale dots per inch (MDPI).
SCREEN_LDPI = 240Screen density with large-scale dots per inch (LDPI).
SCREEN_XLDPI = 320Screen density with extra-large-scale dots per inch (XLDPI).
SCREEN_XXLDPI = 480Screen density with extra-extra-large-scale dots per inch (XXLDPI).
SCREEN_XXXLDPI = 640Screen density with extra-extra-extra-large-scale dots per inch (XXXLDPI).

ResourceManager_Direction

enum ResourceManager_Direction

Description

Enumerates screen orientations.

Since: 12

Enum ItemDescription
DIRECTION_VERTICAL = 0Vertical direction.
DIRECTION_HORIZONTAL = 1Horizontal direction.

ResourceManager_ColorMode

enum ResourceManager_ColorMode

Description

Enumerates color modes.

Since: 12

Enum ItemDescription
COLOR_MODE_DARK = 0Dark mode.
COLOR_MODE_LIGHT = 1Light mode.

ResourceManager_DeviceType

enum ResourceManager_DeviceType

Description

Enumerates device types.

Since: 12

Enum ItemDescription
DEVICE_TYPE_PHONE = 0X00Smartphone
DEVICE_TYPE_TABLET = 0x01Tablet
DEVICE_TYPE_CAR = 0x02Automobile
DEVICE_TYPE_PC = 0x03Computer
DEVICE_TYPE_TV = 0x04TV.
DEVICE_TYPE_WEARABLE = 0x06Wearable
DEVICE_TYPE_2IN1 = 0x072-in-1 device

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 capi-i18n-initialtimezonerule

openharmony 鸿蒙 capi-i18n-timezonerules

openharmony 鸿蒙 capi-i18n-annualtimezonerule

openharmony 鸿蒙 errorcode-font-manager

openharmony 鸿蒙 capi-raw-dir-h

openharmony 鸿蒙 capi-i18n-timezonerulequery

openharmony 鸿蒙 capi-errorcode-h

openharmony 鸿蒙 js-apis-resource-manager

openharmony 鸿蒙 js-apis-sendableResource

openharmony 鸿蒙 capi-rawfile

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/bfP5TUPK