1 /** 2 * @file lv_txt_ap.h 3 * 4 */ 5 6 #ifndef LV_TXT_AP_H 7 #define LV_TXT_AP_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 #include <stddef.h> 17 #include "lv_txt.h" 18 #include "../lv_draw/lv_draw.h" 19 20 #if LV_USE_ARABIC_PERSIAN_CHARS == 1 21 22 /********************* 23 * DEFINES 24 *********************/ 25 26 #define LV_UNDEF_ARABIC_PERSIAN_CHARS (UINT32_MAX) 27 #define LV_AP_ALPHABET_BASE_CODE 0x0622 28 #define LV_AP_END_CHARS_LIST {0,0,0,0,0,{0,0}} 29 /********************** 30 * TYPEDEFS 31 **********************/ 32 typedef struct { 33 uint8_t char_offset; 34 uint16_t char_end_form; 35 int8_t char_begining_form_offset; 36 int8_t char_middle_form_offset; 37 int8_t char_isolated_form_offset; 38 struct { 39 uint8_t conj_to_previous; 40 uint8_t conj_to_next; 41 } ap_chars_conjunction; 42 } ap_chars_map_t; 43 44 /********************** 45 * GLOBAL PROTOTYPES 46 **********************/ 47 uint32_t _lv_txt_ap_calc_bytes_cnt(const char * txt); 48 void _lv_txt_ap_proc(const char * txt, char * txt_out); 49 50 /********************** 51 * MACROS 52 **********************/ 53 54 #endif // LV_USE_ARABIC_PERSIAN_CHARS 55 56 #ifdef __cplusplus 57 } /* extern "C" */ 58 #endif 59 60 #endif /*LV_TXT_AP_H*/ 61