aboutsummaryrefslogtreecommitdiff
path: root/tests/src/test_libs/rnd_unicodes/lv_rnd_unicodes.h
blob: 7f36041cd0568bfdaf0205491f84cbba56d01bb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/**
* @file lv_rnd_unicodes.h
*
*/
#if LV_BUILD_TEST

#ifndef LV_RND_UNICODES_H
#define LV_RND_UNICODES_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/
#include "../../../../lvgl.h"

/*********************
 *      DEFINES
 *********************/

/**********************
 *      TYPEDEFS
 **********************/

extern const uint32_t LV_RND_UNICODE_ALPHANUM_AND_CJK_TABLE[];
extern const uint32_t LV_RND_UNICODE_ALPHANUM_AND_CJK_TABLE_LEN;

/**********************
 * GLOBAL PROTOTYPES
 **********************/

/**
 * Generate random UTF-8 characters in the given ranges.
 * @param buf         buffer to store the generated characters
 * @param buf_len     length of the buffer
 * @param ranges      array of ranges to choose from
 * @param range_num   number of ranges
 * @param char_num    number of characters to generate
 * @return number of generated characters in bytes
 */
int lv_random_utf8_chars(uint8_t * buf, int buf_len, const uint32_t * ranges, uint32_t range_num, int char_num);

/*************************
 *    GLOBAL VARIABLES
 *************************/

/**********************
 *      MACROS
 **********************/

#ifdef __cplusplus
} /*extern "C"*/
#endif

#endif /*LV_RND_UNICODES_H*/

#endif /*LV_BUILD_TEST*/