Skip to main content

Crate ohos_resource_manager_sys

Crate ohos_resource_manager_sys 

Source

Structs§

ArkUI_DrawableDescriptor
NativeResourceManager
RawDir
RawFile
RawFile64
@brief Provides access to a raw file.
RawFileDescriptor
@brief Represent the raw file descriptor’s info.
RawFileDescriptor64
@brief Represent the raw file descriptor’s info.
ResourceManager_Configuration
@brief Enumerates device configuration.

Constants§

ResourceManager_ColorMode_COLOR_MODE_DARK
Indicates dark mode.
ResourceManager_ColorMode_COLOR_MODE_LIGHT
Indicates light mode.
ResourceManager_DeviceType_DEVICE_TYPE_2IN1
Indicates a 2in1 device.
ResourceManager_DeviceType_DEVICE_TYPE_CAR
Indicates a car.
ResourceManager_DeviceType_DEVICE_TYPE_PC
Indicates a PC.
ResourceManager_DeviceType_DEVICE_TYPE_PHONE
Indicates a phone.
ResourceManager_DeviceType_DEVICE_TYPE_TABLET
Indicates a tablet.
ResourceManager_DeviceType_DEVICE_TYPE_TV
Indicates a smart TV.
ResourceManager_DeviceType_DEVICE_TYPE_WEARABLE
Indicates a wearable device.
ResourceManager_Direction_DIRECTION_HORIZONTAL
Indicates the horizontal direction.
ResourceManager_Direction_DIRECTION_VERTICAL
Indicates the vertical direction.
ResourceManager_ErrorCode_ERROR_CODE_INVALID_INPUT_PARAMETER
@error Invalid input parameter
ResourceManager_ErrorCode_ERROR_CODE_OUT_OF_MEMORY
@error Out of memory
ResourceManager_ErrorCode_ERROR_CODE_OVERLAY_RES_PATH_INVALID
@error Invalid overlay path
ResourceManager_ErrorCode_ERROR_CODE_RES_ID_FORMAT_ERROR
@error Failed to format the resource obtained based on the resource ID
ResourceManager_ErrorCode_ERROR_CODE_RES_ID_NOT_FOUND
@error Invalid resource ID
ResourceManager_ErrorCode_ERROR_CODE_RES_NAME_FORMAT_ERROR
@error Failed to format the resource obtained based on the resource Name
ResourceManager_ErrorCode_ERROR_CODE_RES_NAME_NOT_FOUND
@error No matching resource is found based on the resource ID
ResourceManager_ErrorCode_ERROR_CODE_RES_NOT_FOUND_BY_ID
@error Invalid resource name
ResourceManager_ErrorCode_ERROR_CODE_RES_NOT_FOUND_BY_NAME
@error No matching resource is found based on the resource name
ResourceManager_ErrorCode_ERROR_CODE_RES_PATH_INVALID
@error Invalid relative path
ResourceManager_ErrorCode_ERROR_CODE_RES_REF_TOO_MUCH
@error The resource is referenced cyclically
ResourceManager_ErrorCode_ERROR_CODE_SYSTEM_RES_MANAGER_GET_FAILED
@error Failed to access the system resource
ResourceManager_ErrorCode_SUCCESS
@error Success
ScreenDensity_SCREEN_LDPI
Indicates large screen density.
ScreenDensity_SCREEN_MDPI
Indicates medium screen density.
ScreenDensity_SCREEN_SDPI
Indicates small screen density.
ScreenDensity_SCREEN_XLDPI
Indicates extra-large screen density.
ScreenDensity_SCREEN_XXLDPI
Indicates extra-extra-large screen density.
ScreenDensity_SCREEN_XXXLDPI
Indicates extra-extra-extra-large screen density.

Functions§

OH_ResourceManager_AddResource
@brief Add overlay resources during application runtime. @param mgr Indicates the pointer to {@link NativeResourceManager} {@link OH_ResourceManager_InitNativeResourceManager}. @param path Indicates the application overlay path. @return {@link SUCCESS} 0 - Success. {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: Incorrect parameter types. {@link ERROR_CODE_OVERLAY_RES_PATH_INVALID} 9001010 - Invalid overlay path. @since 12
OH_ResourceManager_CloseRawDir
@brief Closes an opened {@link RawDir} and releases all associated resources.
OH_ResourceManager_CloseRawFile
@brief Closes an opened {@link RawFile} and releases all associated resources.
OH_ResourceManager_CloseRawFile64
@brief Closes an opened {@link RawFile64} and releases all associated resources.
OH_ResourceManager_GetBool
@brief Obtains the boolean result.
OH_ResourceManager_GetBoolByName
@brief Obtains the boolean result.
OH_ResourceManager_GetColor
@brief Obtains the color resource.
OH_ResourceManager_GetColorByName
@brief Obtains the color resource.
OH_ResourceManager_GetConfiguration
@brief Obtains the device configuration.
OH_ResourceManager_GetDrawableDescriptor
@brief Obtains the DrawableDescriptor of the media file.
OH_ResourceManager_GetDrawableDescriptorByName
@brief Obtains the DrawableDescriptor of the media file.
OH_ResourceManager_GetDrawableDescriptorData
@brief Obtains the DrawableDescriptor of the media file.
OH_ResourceManager_GetDrawableDescriptorDataByName
@brief Obtains the DrawableDescriptor of the media file.
OH_ResourceManager_GetFloat
@brief Obtains the Float resource.
OH_ResourceManager_GetFloatByName
@brief Obtains the Float resource.
OH_ResourceManager_GetInt
@brief Obtains the Int resource.
OH_ResourceManager_GetIntByName
@brief Obtains the Int resource.
OH_ResourceManager_GetLocales
@brief Obtains locales list.
OH_ResourceManager_GetLocalesData
@brief Obtains locales list.
OH_ResourceManager_GetMedia
@brief Obtains the content of the image resource.
OH_ResourceManager_GetMediaBase64
@brief Obtains the Base64 code of the image resource.
OH_ResourceManager_GetMediaBase64ByName
@brief Obtains the Base64 code of the image resource.
OH_ResourceManager_GetMediaBase64Data
@brief Obtains the Base64 code of the image resource.
OH_ResourceManager_GetMediaBase64DataByName
@brief Obtains the Base64 code of the image resource.
OH_ResourceManager_GetMediaByName
@brief Obtains the content of the image resource.
OH_ResourceManager_GetMediaData
@brief Obtains the content of the image resource.
OH_ResourceManager_GetMediaDataByName
@brief Obtains the content of the image resource.
OH_ResourceManager_GetPluralString
@brief Obtains the singular-plural character string represented.
OH_ResourceManager_GetPluralStringByName
@brief Obtains the singular-plural character string represented.
OH_ResourceManager_GetRawFileCount
@brief get the count of the raw files in {@link RawDir}.
OH_ResourceManager_GetRawFileDescriptor
@brief Opens the file descriptor of a raw file based on the long offset and file length.
OH_ResourceManager_GetRawFileDescriptor64
@brief Opens the file descriptor of a raw file based on the int64_t offset and file length.
OH_ResourceManager_GetRawFileDescriptorData
@brief Obtains the file descriptor of a raw file based on the long offset and file length.
OH_ResourceManager_GetRawFileName
@brief Obtains the name of the file according to the index.
OH_ResourceManager_GetRawFileOffset
@brief Obtains the current offset of a raw file, represented by an long.
OH_ResourceManager_GetRawFileOffset64
@brief Obtains the current offset of a raw file, represented by an int64_t.
OH_ResourceManager_GetRawFileRemainingLength
@brief Obtains the remaining raw file length represented by an long.
OH_ResourceManager_GetRawFileRemainingLength64
@brief Obtains the remaining raw file length represented by an int64_t.
OH_ResourceManager_GetRawFileSize
@brief Obtains the raw file length represented by an long.
OH_ResourceManager_GetRawFileSize64
@brief Obtains the raw file length represented by an int64_t.
OH_ResourceManager_GetString
@brief Obtains the character string.
OH_ResourceManager_GetStringArray
@brief Obtains the array of character strings.
OH_ResourceManager_GetStringArrayByName
@brief Obtains the array of character strings.
OH_ResourceManager_GetStringByName
@brief Obtains the character string.
OH_ResourceManager_GetSymbol
@brief Obtains the symbol resource.
OH_ResourceManager_GetSymbolByName
@brief Obtains the symbol resource.
OH_ResourceManager_InitNativeResourceManager
@brief Obtains the native resource manager based on the JavaScipt resource manager.
OH_ResourceManager_IsRawDir
@brief Whether the rawfile resource is a directory or not.
OH_ResourceManager_OpenRawDir
@brief Opens a raw file directory.
OH_ResourceManager_OpenRawFile
@brief Opens a raw file.
OH_ResourceManager_OpenRawFile64
@brief Opens a raw file.
OH_ResourceManager_ReadRawFile
@brief Reads a raw file.
OH_ResourceManager_ReadRawFile64
@brief Reads a raw file.
OH_ResourceManager_ReleaseConfiguration
@brief Release the device configuration. @param configuration the object need to release. @return {@link SUCCESS} 0 - Success. {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: Incorrect parameter types. @since 12
OH_ResourceManager_ReleaseNativeResourceManager
@brief Releases the native resource manager.
OH_ResourceManager_ReleaseRawFileDescriptor
@brief Closes the file descriptor of a raw file.
OH_ResourceManager_ReleaseRawFileDescriptor64
@brief Closes the file descriptor of a raw file.
OH_ResourceManager_ReleaseRawFileDescriptorData
@brief Release the file descriptor of a raw file.
OH_ResourceManager_ReleaseStringArray
@brief Release the array of character strings. @param resValue the array of character strings corresponding to the specified resource name. @param len the length of array. @return {@link SUCCESS} 0 - Success. {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: Incorrect parameter types. @since 12
OH_ResourceManager_RemoveResource
@brief Remove overlay resources during application runtime. @param mgr Indicates the pointer to {@link NativeResourceManager} {@link OH_ResourceManager_InitNativeResourceManager}. @param path Indicates the application overlay path. @return {@link SUCCESS} 0 - Success. {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: Incorrect parameter types. {@link ERROR_CODE_OVERLAY_RES_PATH_INVALID} 9001010 - Invalid overlay path. @since 12
OH_ResourceManager_SeekRawFile
@brief Uses the 32-bit data type to seek a data read position based on the specified offset within a raw file.
OH_ResourceManager_SeekRawFile64
@brief Uses the 64-bit data type to seek a data read position based on the specified offset within a raw file.

Type Aliases§

ResourceManager_ColorMode
@brief Enumerates color mode types.
ResourceManager_DeviceType
@brief Enumerates device types.
ResourceManager_Direction
@brief Enumerates screen directions.
ResourceManager_ErrorCode
@brief The error code of resource manager.
ScreenDensity
@brief Enumerates screen density types.