当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
3 Star 0 Fork 2

OpenHarmony / global_resmgr_lite
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 2.29 KB
一键复制 编辑 原始数据 按行查看 历史
maoziduanl 提交于 2022-05-07 17:28 . 将innerkits修改为inner_api

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

1
https://gitee.com/openharmony/global_resmgr_lite.git
git@gitee.com:openharmony/global_resmgr_lite.git
openharmony
global_resmgr_lite
global_resmgr_lite
master

搜索帮助