harmony 鸿蒙ohresmgr.h

2025-06-12 浏览 (1)

ohresmgr.h

Overview

Provides native APIs for obtaining resources.

System capability: SystemCapability.Global.ResourceManager

Library: libohresmgr.so

Since: 12

Related module: Resourcemanager

Summary

Callback

NameDescription
ResourceManager_ErrorCode OH_ResourceManager_GetMediaBase64 (const NativeResourceManager *mgr, uint32_t resId, char **resultValue, uint64_t *resultLen, uint32_t density=0)Obtains the Base64 code of the media resource with the specified screen density based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetMediaBase64Data (const NativeResourceManager *mgr, uint32_t resId, char **resultValue, uint64_t *resultLen, uint32_t density)Obtains the Base64 code of the media resource with the specified screen density based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetMediaBase64ByName (const NativeResourceManager *mgr, const char *resName, char **resultValue, uint64_t *resultLen, uint32_t density=0)Obtains the Base64 code of the media resource with the specified screen density based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_GetMediaBase64DataByName (const NativeResourceManager *mgr, const char *resName, char **resultValue, uint64_t *resultLen, uint32_t density)Obtains the Base64 code of the media resource with the specified screen density based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_GetMedia (const NativeResourceManager *mgr, uint32_t resId, uint8_t **resultValue, uint64_t *resultLen, uint32_t density=0)Obtains the content of the media resource with the specified screen density based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetMediaData (const NativeResourceManager *mgr, uint32_t resId, uint8_t **resultValue, uint64_t *resultLen, uint32_t density)Obtains the content of the media resource with the specified screen density based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetMediaByName (const NativeResourceManager *mgr, const char *resName, uint8_t **resultValue, uint64_t *resultLen, uint32_t density=0)Obtains the content of the media resource with the specified screen density based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_GetMediaDataByName (const NativeResourceManager *mgr, const char *resName, uint8_t **resultValue, uint64_t *resultLen, uint32_t density)Obtains the content of the media resource with the specified screen density based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_GetDrawableDescriptor (const NativeResourceManager *mgr, uint32_t resId, ArkUI_DrawableDescriptor **drawableDescriptor, uint32_t density=0, uint32_t type=0)Obtains the DrawableDescriptor object of the icon resource with the specified screen density based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetDrawableDescriptorData (const NativeResourceManager *mgr, uint32_t resId, ArkUI_DrawableDescriptor **drawableDescriptor, uint32_t density, uint32_t type)Obtains the DrawableDescriptor object of the icon resource with the specified screen density based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetDrawableDescriptorByName (const NativeResourceManager *mgr, const char *resName, ArkUI_DrawableDescriptor **drawableDescriptor, uint32_t density=0, uint32_t type=0)Obtains the DrawableDescriptor object of the icon resource with the specified screen density based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_GetDrawableDescriptorDataByName (const NativeResourceManager *mgr, const char *resName, ArkUI_DrawableDescriptor **drawableDescriptor, uint32_t density, uint32_t type)Obtains the DrawableDescriptor object of the icon resource with the specified screen density based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_GetSymbol (const NativeResourceManager *mgr, uint32_t resId, uint32_t *resultValue)Obtains a symbol resource based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetSymbolByName (const NativeResourceManager *mgr, const char *resName, uint32_t *resultValue)Obtains a symbol resource based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_GetLocales (const NativeResourceManager *mgr, char ***resultValue, uint32_t *resultLen, bool includeSystem=false)Obtains the language list.
ResourceManager_ErrorCode OH_ResourceManager_GetLocalesData (const NativeResourceManager *mgr, char ***resultValue, uint32_t *resultLen, bool includeSystem)Obtains the language list.
ResourceManager_ErrorCode OH_ResourceManager_GetConfiguration (const NativeResourceManager *mgr, ResourceManager_Configuration *configuration)Obtains the device configuration.
ResourceManager_ErrorCode OH_ResourceManager_ReleaseConfiguration (ResourceManager_Configuration *configuration)Releases the memory requested by using OH_ResourceManager_GetConfiguration().
ResourceManager_ErrorCode OH_ResourceManager_GetString (const NativeResourceManager *mgr, uint32_t resId, char **resultValue,...)Obtains a string resource based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetStringByName (const NativeResourceManager *mgr, const char *resName, char **resultValue,...)Obtains a string resource based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_GetStringArray (const NativeResourceManager *mgr, uint32_t resId, char ***resultValue, uint32_t *resultLen)Obtains a string array based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetStringArrayByName (const NativeResourceManager *mgr, const char *resName, char ***resultValue, uint32_t *resultLen)Obtains a string array based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_ReleaseStringArray (char ***resValue, uint32_t len)Releases the memory of the string array.
ResourceManager_ErrorCode OH_ResourceManager_GetPluralString (const NativeResourceManager *mgr, uint32_t resId, uint32_t num, char **resultValue)Obtains singular and plural strings based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetPluralStringByName (const NativeResourceManager *mgr, const char *resName, uint32_t num, char **resultValue)Obtains singular and plural strings based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_GetIntPluralString (const NativeResourceManager *mgr, uint32_t resId, uint32_t num, char **resultValue,...)Obtains singular and plural strings based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetDoublePluralString (const NativeResourceManager *mgr, uint32_t resId, double num, char **resultValue,...)Obtains singular and plural strings based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetIntPluralStringByName (const NativeResourceManager *mgr, const char *resName, uint32_t num, char **resultValue,...)Obtains singular and plural strings based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_GetDoublePluralStringByName (const NativeResourceManager *mgr, const char *resName, double num, char **resultValue,...)Obtains singular and plural strings based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_GetColor (const NativeResourceManager *mgr, uint32_t resId, uint32_t *resultValue)Obtains a color value based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetColorByName (const NativeResourceManager *mgr, const char *resName, uint32_t *resultValue)Obtains a color value based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetInt (const NativeResourceManager *mgr, uint32_t resId, int *resultValue)Obtains an int value based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetIntByName (const NativeResourceManager *mgr, const char *resName, int *resultValue)Obtains an int value based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_GetFloat (const NativeResourceManager *mgr, uint32_t resId, float *resultValue)Obtains a float value based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetFloatByName (const NativeResourceManager *mgr, const char *resName, float *resultValue)Obtains a float value based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_GetBool (const NativeResourceManager *mgr, uint32_t resId, bool *resultValue)Obtains a bool value based on the specified resource ID.
ResourceManager_ErrorCode OH_ResourceManager_GetBoolByName (const NativeResourceManager *mgr, const char *resName, bool *resultValue)Obtains a bool value based on the specified resource name.
ResourceManager_ErrorCode OH_ResourceManager_AddResource (const NativeResourceManager *mgr, const char *path)Adds overlay resources when an application is running.
ResourceManager_ErrorCode OH_ResourceManager_RemoveResource (const NativeResourceManager *mgr, const char *path)Removes overlay resources when an application is running.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Localization Kit

harmony 鸿蒙RawFileDescriptor

harmony 鸿蒙RawFileDescriptor64

harmony 鸿蒙ResourceManager_Configuration

harmony 鸿蒙Font Management Error Codes

harmony 鸿蒙I18N Error Codes

harmony 鸿蒙Resource Manager Error Codes

harmony 鸿蒙@ohos.fontManager (Font Management)

harmony 鸿蒙@ohos.i18n (Internationalization) (System API)

harmony 鸿蒙@ohos.i18n (Internationalization)

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