1 /**
2 * @file lv_rnd_unicodes.h
3 *
4 */
5 #if LV_BUILD_TEST
6 
7 #ifndef LV_RND_UNICODES_H
8 #define LV_RND_UNICODES_H
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 /*********************
15  *      INCLUDES
16  *********************/
17 #include "../../../../lvgl.h"
18 
19 /*********************
20  *      DEFINES
21  *********************/
22 
23 /**********************
24  *      TYPEDEFS
25  **********************/
26 
27 extern const uint32_t LV_RND_UNICODE_ALPHANUM_AND_CJK_TABLE[];
28 extern const uint32_t LV_RND_UNICODE_ALPHANUM_AND_CJK_TABLE_LEN;
29 
30 /**********************
31  * GLOBAL PROTOTYPES
32  **********************/
33 
34 /**
35  * Generate random UTF-8 characters in the given ranges.
36  * @param buf         buffer to store the generated characters
37  * @param buf_len     length of the buffer
38  * @param ranges      array of ranges to choose from
39  * @param range_num   number of ranges
40  * @param char_num    number of characters to generate
41  * @return number of generated characters in bytes
42  */
43 int lv_random_utf8_chars(uint8_t * buf, int buf_len, const uint32_t * ranges, uint32_t range_num, int char_num);
44 
45 /*************************
46  *    GLOBAL VARIABLES
47  *************************/
48 
49 /**********************
50  *      MACROS
51  **********************/
52 
53 #ifdef __cplusplus
54 } /*extern "C"*/
55 #endif
56 
57 #endif /*LV_RND_UNICODES_H*/
58 
59 #endif /*LV_BUILD_TEST*/
60