lv_text_private.h
API reference for lv_text_private.h
Functions
lv_text_set_text_vfmt
Return a new formatted text. Memory will be allocated to store the text.
char * lv_text_set_text_vfmt(const char *fmt, va_list ap)| Name | Type | Description |
|---|---|---|
fmt | const char * | printf-like format |
ap | va_list | items to print |
Returns: char * — pointer to the allocated text string.
Enums
lv_text_cmd_state_t
State machine for text renderer.
| Name | Description |
|---|---|
LV_TEXT_CMD_STATE_WAIT | Waiting for command |
LV_TEXT_CMD_STATE_PAR | Processing the parameter |
LV_TEXT_CMD_STATE_IN | Processing the command |
Used by 1 function
lv_text_is_cmd— paramstate
Structs
lv_text_attributes_t
| Member | Type | Description |
|---|---|---|
letter_space | int32_t | Letter space between letters |
line_space | int32_t | Space between lines of text |
max_width | int32_t | Max width of the text (break the lines to fit this size). Set COORD_MAX to avoid |
text_flags | lv_text_flag_t |
Used by 4 functions
lv_text_attributes_init— paramattributeslv_text_get_size_attributes— paramattributeslv_text_get_width— paramattributeslv_text_get_next_line— paramattributes
Macros
LV_TXT_ENC_UTF8
#define LV_TXT_ENC_UTF8 1LV_TXT_ENC_ASCII
#define LV_TXT_ENC_ASCII 2LV_TEXT_LEN_MAX
#define LV_TEXT_LEN_MAX UINT32_MAXVariables
lv_text_encoded_size
uint8_t(*const lv_text_encoded_sizeGive the size of an encoded character
lv_text_unicode_to_encoded
uint32_t(*const lv_text_unicode_to_encodedConvert a Unicode letter to encoded
lv_text_encoded_conv_wc
uint32_t(*const lv_text_encoded_conv_wcConvert a wide character, e.g. 'Á' little endian to be compatible with the encoded format.
lv_text_encoded_next
uint32_t(*const lv_text_encoded_nextDecode the next encoded character from a string.
lv_text_encoded_prev
uint32_t(*const lv_text_encoded_prevGet the previous encoded character form a string.
lv_text_encoded_get_byte_id
uint32_t(*const lv_text_encoded_get_byte_idConvert a letter index (in the encoded text) to byte index. E.g. in UTF-8 "AÁRT" index of 'R' is 2 but start at byte 3 because 'Á' is 2 bytes long
lv_text_encoded_get_char_id
uint32_t(*const lv_text_encoded_get_char_idConvert a byte index (in an encoded text) to character index. E.g. in UTF-8 "AÁRT" index of 'R' is 2 but start at byte 3 because 'Á' is 2 bytes long
lv_text_get_encoded_length
uint32_t(*const lv_text_get_encoded_lengthGet the number of characters (and NOT bytes) in a string. E.g. in UTF-8 "ÁBC" is 3 characters (but 4 bytes)
Dependencies
How is this guide?
Last updated on