This repository has been archived on 2023-07-17. You can view files and clone it, but cannot push or open issues or pull requests.
bl_mcu_sdk/components/lvgl/lv_misc/lv_txt_ap.h
2021-06-20 12:25:46 +08:00

69 lines
1.3 KiB
C

/**
* @file lv_txt_ap.h
*
*/
#ifndef LV_TXT_AP_H
#define LV_TXT_AP_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include <stddef.h>
#include "lv_txt.h"
#include "../lv_draw/lv_draw.h"
#if LV_USE_ARABIC_PERSIAN_CHARS == 1
/*********************
* DEFINES
*********************/
#define LV_UNDEF_ARABIC_PERSIAN_CHARS (UINT32_MAX)
#define LV_AP_ALPHABET_BASE_CODE 0x0622
#define LV_AP_END_CHARS_LIST \
{ \
0, 0, 0, 0, 0, \
{ \
0, 0 \
} \
}
/**********************
* TYPEDEFS
**********************/
typedef struct
{
uint8_t char_offset;
uint16_t char_end_form;
int8_t char_begining_form_offset;
int8_t char_middle_form_offset;
int8_t char_isolated_form_offset;
struct
{
uint8_t conj_to_previous;
uint8_t conj_to_next;
} ap_chars_conjunction;
} ap_chars_map_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
uint32_t _lv_txt_ap_calc_bytes_cnt(const char *txt);
void _lv_txt_ap_proc(const char *txt, char *txt_out);
/**********************
* MACROS
**********************/
#endif // LV_USE_ARABIC_PERSIAN_CHARS
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_TXT_AP_H*/