Go to file
openharmony_ci 3800369328
!99 将innerkits修改为inner_api
Merge pull request !99 from maoziduanl/master
2022-05-09 02:46:38 +00:00
.gitee add issue and pr template 2021-04-07 14:47:15 +08:00
frameworks/resmgr_lite 将innerkits修改为inner_api 2022-05-07 17:28:51 +08:00
interfaces/inner_api/include 将innerkits修改为inner_api 2022-05-07 17:28:51 +08:00
test/resource/data Optimize code 2022-03-12 21:48:20 +08:00
bundle.json 资源resource_management_lite部件名修改 2022-05-05 22:09:37 +08:00
LICENSE modify test 2021-06-15 09:00:12 +08:00
OAT.xml Optimize code 2022-03-12 21:48:20 +08:00
README_zh.md 将innerkits修改为inner_api 2022-05-07 17:28:51 +08:00
README.md 将innerkits修改为inner_api 2022-05-07 17:28:51 +08:00

resmgr

Introduction

The resource management module, namely, resmgr, provides the function of loading multi-language GUI resources for applications, for example, displaying the application names or icons specific to a certain language.

Directory Structure

The directory structure for the resource management module is as follows:

/base/global/
├── resource_management_lite                # Code repository for the resource management module
│   ├──  frameworks                         # Core code of the resource management module
│   │   ├── resource_management_lite        # Core code for resource parsing
│   │   │   ├── include                     # Header files of the resource management module
│   │   │   ├── src                         # Implementation code of the resource management module
│   │   │   └── test                        # Test code
│   ├──  interfaces                         # APIs of the resource management module
│   │   └── inner_api                       # APIs of the resource management module for internal subsystems

Usage

Call the GLOBAL_GetValueById API to obtain the resource information of the application.

#include <stdint.h>
#include <stdio.h>
#include "global.h"

uint32_t id = 0x16777216;
char *values = NULL;
int32_t re = GLOBAL_GetValueById(id, "/system/data/resources.index", &values); // Obtain the resource of a specified application and write the resource to values.
std::count << values << std::endl;
if (values != NULL) {
    free(values);
}

Constraints

Programming language: C/C++

Repositories Involved

Globalization subsystem

global_resmgr_lite

global_i18n_lite