/lvgl-3.5.0/src/misc/ |
D | lv_txt.c | 34 static uint32_t lv_txt_utf8_next(const char * txt, uint32_t * i); 35 static uint32_t lv_txt_utf8_prev(const char * txt, uint32_t * i_start); 36 static uint32_t lv_txt_utf8_get_byte_id(const char * txt, uint32_t utf8_id); 37 static uint32_t lv_txt_utf8_get_char_id(const char * txt, uint32_t byte_id); 38 static uint32_t lv_txt_utf8_get_length(const char * txt); 43 static uint32_t lv_txt_iso8859_1_next(const char * txt, uint32_t * i); 44 static uint32_t lv_txt_iso8859_1_prev(const char * txt, uint32_t * i_start); 45 static uint32_t lv_txt_iso8859_1_get_byte_id(const char * txt, uint32_t utf8_id); 46 static uint32_t lv_txt_iso8859_1_get_char_id(const char * txt, uint32_t byte_id); 47 static uint32_t lv_txt_iso8859_1_get_length(const char * txt); [all …]
|
D | lv_bidi.c | 38 static uint32_t lv_bidi_get_next_paragraph(const char * txt); 44 static lv_base_dir_t get_next_run(const char * txt, lv_base_dir_t base_dir, uint32_t max_len, uint3… 49 static lv_base_dir_t bracket_process(const char * txt, uint32_t next_pos, uint32_t len, uint32_t le… 52 static uint32_t get_txt_len(const char * txt, uint32_t max_len); 108 lv_base_dir_t _lv_bidi_detect_base_dir(const char * txt) in _lv_bidi_detect_base_dir() argument 112 while(txt[i] != '\0') { in _lv_bidi_detect_base_dir() 113 letter = _lv_txt_encoded_next(txt, &i); in _lv_bidi_detect_base_dir() 308 void lv_bidi_calculate_align(lv_text_align_t * align, lv_base_dir_t * base_dir, const char * txt) in lv_bidi_calculate_align() argument 310 if(*base_dir == LV_BASE_DIR_AUTO) *base_dir = _lv_bidi_detect_base_dir(txt); in lv_bidi_calculate_align() 327 static uint32_t lv_bidi_get_next_paragraph(const char * txt) in lv_bidi_get_next_paragraph() argument [all …]
|
D | lv_bidi.h | 63 lv_base_dir_t _lv_bidi_detect_base_dir(const char * txt); 114 void lv_bidi_calculate_align(lv_text_align_t * align, lv_base_dir_t * base_dir, const char * txt); 129 …e void lv_bidi_calculate_align(lv_text_align_t * align, lv_base_dir_t * base_dir, const char * txt) in lv_bidi_calculate_align() argument 131 LV_UNUSED(txt); in lv_bidi_calculate_align()
|
D | lv_txt.h | 99 uint32_t _lv_txt_get_next_line(const char * txt, const lv_font_t * font, lv_coord_t letter_space, 112 lv_coord_t lv_txt_get_width(const char * txt, uint32_t length, const lv_font_t * font, lv_coord_t l… 140 void _lv_txt_cut(char * txt, uint32_t pos, uint32_t len); 158 void _lv_txt_encoded_letter_next_2(const char * txt, uint32_t * letter, uint32_t * letter_next, uin…
|
D | lv_txt_ap.h | 36 uint32_t _lv_txt_ap_calc_bytes_cnt(const char * txt); 37 void _lv_txt_ap_proc(const char * txt, char * txt_out);
|
D | lv_txt_ap.c | 109 uint32_t _lv_txt_ap_calc_bytes_cnt(const char * txt) in _lv_txt_ap_calc_bytes_cnt() argument 117 txt_length = _lv_txt_get_encoded_length(txt); in _lv_txt_ap_calc_bytes_cnt() 122 ch_enc = _lv_txt_encoded_next(txt, &j); in _lv_txt_ap_calc_bytes_cnt() 143 void _lv_txt_ap_proc(const char * txt, char * txt_out) in _lv_txt_ap_proc() argument 151 txt_length = _lv_txt_get_encoded_length(txt); in _lv_txt_ap_proc() 159 ch_enc[j++] = _lv_txt_encoded_next(txt, &i); in _lv_txt_ap_proc()
|
/lvgl-3.5.0/examples/widgets/textarea/ |
D | lv_example_textarea_3.py | 3 txt = ta.get_text() 8 colon_pos= txt.find(":") 14 rest = txt[colon_pos:] 18 if len(txt) < 2: 20 if ":" in txt: 22 if txt[0] >= '0' and txt[0] <= '9' and \ 23 txt[1] >= '0' and txt[1] <= '9': 24 if len(txt) == 2 or txt[2] != ':' :
|
D | lv_example_textarea_3.c | 32 const char * txt = lv_textarea_get_text(ta); in ta_event_cb() local 33 if(txt[0] >= '0' && txt[0] <= '9' && in ta_event_cb() 34 txt[1] >= '0' && txt[1] <= '9' && in ta_event_cb() 35 txt[2] != ':') { in ta_event_cb()
|
D | lv_example_textarea_1.py | 7 txt = obj.get_btn_text(obj.get_selected_btn()) 8 if txt == lv.SYMBOL.BACKSPACE: 10 elif txt == lv.SYMBOL.NEW_LINE: 12 elif txt: 13 ta.add_text(txt)
|
D | lv_example_textarea_1.c | 14 const char * txt = lv_btnmatrix_get_btn_text(obj, lv_btnmatrix_get_selected_btn(obj)); in btnm_event_handler() local 16 if(strcmp(txt, LV_SYMBOL_BACKSPACE) == 0) lv_textarea_del_char(ta); in btnm_event_handler() 17 else if(strcmp(txt, LV_SYMBOL_NEW_LINE) == 0) lv_event_send(ta, LV_EVENT_READY, NULL); in btnm_event_handler() 18 else lv_textarea_add_text(ta, txt); in btnm_event_handler()
|
/lvgl-3.5.0/src/widgets/ |
D | lv_checkbox.c | 68 void lv_checkbox_set_text(lv_obj_t * obj, const char * txt) in lv_checkbox_set_text() argument 72 size_t len = _lv_txt_ap_calc_bytes_cnt(txt); in lv_checkbox_set_text() 74 size_t len = strlen(txt); in lv_checkbox_set_text() 77 if(!cb->static_txt) cb->txt = lv_mem_realloc(cb->txt, len + 1); in lv_checkbox_set_text() 78 else cb->txt = lv_mem_alloc(len + 1); in lv_checkbox_set_text() 80 _lv_txt_ap_proc(txt, cb->txt); in lv_checkbox_set_text() 82 strcpy(cb->txt, txt); in lv_checkbox_set_text() 91 void lv_checkbox_set_text_static(lv_obj_t * obj, const char * txt) in lv_checkbox_set_text_static() argument 95 if(!cb->static_txt) lv_mem_free(cb->txt); in lv_checkbox_set_text_static() 97 cb->txt = (char *)txt; in lv_checkbox_set_text_static() [all …]
|
D | lv_textarea.c | 58 static lv_res_t insert_handler(lv_obj_t * obj, const char * txt); 135 const char * txt = lv_label_get_text(ta->label); in lv_textarea_add_char() local 136 if(txt[0] == '\0') lv_obj_invalidate(obj); in lv_textarea_add_char() 161 void lv_textarea_add_text(lv_obj_t * obj, const char * txt) in lv_textarea_add_text() argument 164 LV_ASSERT_NULL(txt); in lv_textarea_add_text() 173 while(txt[i] != '\0') { in lv_textarea_add_text() 174 uint32_t c = _lv_txt_encoded_next(txt, &i); in lv_textarea_add_text() 180 lv_res_t res = insert_handler(obj, txt); in lv_textarea_add_text() 190 lv_label_ins_text(ta->label, ta->cursor.pos, txt); in lv_textarea_add_text() 194 size_t realloc_size = strlen(ta->pwd_tmp) + strlen(txt) + 1; in lv_textarea_add_text() [all …]
|
D | lv_checkbox.h | 31 char * txt; member 66 void lv_checkbox_set_text(lv_obj_t * obj, const char * txt); 74 void lv_checkbox_set_text_static(lv_obj_t * obj, const char * txt);
|
D | lv_label.c | 292 const char * txt = lv_label_get_text(obj); in lv_label_get_letter_pos() local 293 lv_text_align_t align = lv_obj_calculate_style_text_align(obj, LV_PART_MAIN, txt); in lv_label_get_letter_pos() 295 if(txt[0] == '\0') { in lv_label_get_letter_pos() 328 uint32_t byte_id = _lv_txt_encoded_get_byte_id(txt, char_id); in lv_label_get_letter_pos() 331 while(txt[new_line_start] != '\0') { in lv_label_get_letter_pos() 332 … new_line_start += _lv_txt_get_next_line(&txt[line_start], font, letter_space, max_w, NULL, flag); in lv_label_get_letter_pos() 333 if(byte_id < new_line_start || txt[new_line_start] == '\0') in lv_label_get_letter_pos() 342 if((txt[byte_id - 1] == '\n' || txt[byte_id - 1] == '\r') && txt[byte_id] == '\0') { in lv_label_get_letter_pos() 352 if(base_dir == LV_BASE_DIR_AUTO) base_dir = _lv_bidi_detect_base_dir(txt); in lv_label_get_letter_pos() 358 bidi_txt = &txt[line_start]; in lv_label_get_letter_pos() [all …]
|
D | lv_textarea.h | 103 void lv_textarea_add_text(lv_obj_t * obj, const char * txt); 126 void lv_textarea_set_text(lv_obj_t * obj, const char * txt); 133 void lv_textarea_set_placeholder_text(lv_obj_t * obj, const char * txt); 193 void lv_textarea_set_insert_replace(lv_obj_t * obj, const char * txt);
|
/lvgl-3.5.0/src/draw/ |
D | lv_draw_label.c | 78 … const lv_area_t * coords, const char * txt, lv_draw_label_hint_t * hint) in lv_draw_label() argument 97 if(txt == NULL || txt[0] == '\0') in lv_draw_label() 107 lv_bidi_calculate_align(&align, &base_dir, txt); in lv_draw_label() 116 lv_txt_get_size(&p, txt, dsc->font, dsc->letter_space, dsc->line_space, LV_COORD_MAX, in lv_draw_label() 154 …uint32_t line_end = line_start + _lv_txt_get_next_line(&txt[line_start], font, dsc->letter_space, … in lv_draw_label() 160 … line_end += _lv_txt_get_next_line(&txt[line_start], font, dsc->letter_space, w, NULL, dsc->flag); in lv_draw_label() 170 if(txt[line_start] == '\0') return; in lv_draw_label() 175 …line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, font, dsc->letter_space, ds… in lv_draw_label() 182 …line_width = lv_txt_get_width(&txt[line_start], line_end - line_start, font, dsc->letter_space, ds… in lv_draw_label() 215 while(txt[line_start] != '\0') { in lv_draw_label() [all …]
|
/lvgl-3.5.0/src/extra/widgets/keyboard/ |
D | lv_keyboard.c | 282 const char * txt = lv_btnmatrix_get_btn_text(obj, lv_btnmatrix_get_selected_btn(obj)); in lv_keyboard_def_event_cb() local 283 if(txt == NULL) return; in lv_keyboard_def_event_cb() 285 if(strcmp(txt, "abc") == 0) { in lv_keyboard_def_event_cb() 291 else if(strcmp(txt, "ABC") == 0) { in lv_keyboard_def_event_cb() 297 else if(strcmp(txt, "1#") == 0) { in lv_keyboard_def_event_cb() 303 else if(strcmp(txt, LV_SYMBOL_CLOSE) == 0 || strcmp(txt, LV_SYMBOL_KEYBOARD) == 0) { in lv_keyboard_def_event_cb() 313 else if(strcmp(txt, LV_SYMBOL_OK) == 0) { in lv_keyboard_def_event_cb() 327 if(strcmp(txt, "Enter") == 0 || strcmp(txt, LV_SYMBOL_NEW_LINE) == 0) { in lv_keyboard_def_event_cb() 334 else if(strcmp(txt, LV_SYMBOL_LEFT) == 0) { in lv_keyboard_def_event_cb() 337 else if(strcmp(txt, LV_SYMBOL_RIGHT) == 0) { in lv_keyboard_def_event_cb() [all …]
|
/lvgl-3.5.0/src/extra/widgets/list/ |
D | lv_list.c | 65 lv_obj_t * lv_list_add_text(lv_obj_t * list, const char * txt) in lv_list_add_text() argument 70 lv_label_set_text(obj, txt); in lv_list_add_text() 76 lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * icon, const char * txt) in lv_list_add_btn() argument 91 if(txt) { in lv_list_add_btn() 93 lv_label_set_text(label, txt); in lv_list_add_btn()
|
D | lv_list.h | 38 lv_obj_t * lv_list_add_text(lv_obj_t * list, const char * txt); 40 lv_obj_t * lv_list_add_btn(lv_obj_t * list, const void * icon, const char * txt);
|
/lvgl-3.5.0/examples/widgets/menu/ |
D | lv_example_menu_5.c | 13 static lv_obj_t * create_text(lv_obj_t * parent, const char * icon, const char * txt, 16 … const char * icon, const char * txt, int32_t min, int32_t max, int32_t val); 18 const char * icon, const char * txt, bool chk); 143 static lv_obj_t * create_text(lv_obj_t * parent, const char * icon, const char * txt, in create_text() argument 156 if(txt) { in create_text() 158 lv_label_set_text(label, txt); in create_text() 163 if(builder_variant == LV_MENU_ITEM_BUILDER_VARIANT_2 && icon && txt) { in create_text() 171 static lv_obj_t * create_slider(lv_obj_t * parent, const char * icon, const char * txt, int32_t min… in create_slider() argument 174 lv_obj_t * obj = create_text(parent, icon, txt, LV_MENU_ITEM_BUILDER_VARIANT_2); in create_slider() 188 static lv_obj_t * create_switch(lv_obj_t * parent, const char * icon, const char * txt, bool chk) in create_switch() argument [all …]
|
/lvgl-3.5.0/src/extra/others/ime/ |
D | lv_ime_pinyin.c | 647 const char * txt = lv_btnmatrix_get_btn_text(kb, lv_btnmatrix_get_selected_btn(kb)); in lv_ime_pinyin_kb_event() local 648 if(txt == NULL) return; in lv_ime_pinyin_kb_event() 657 strcat(pinyin_ime->input_char, txt); in lv_ime_pinyin_kb_event() 673 if(strcmp(txt, "Enter") == 0 || strcmp(txt, LV_SYMBOL_NEW_LINE) == 0) { in lv_ime_pinyin_kb_event() 677 else if(strcmp(txt, LV_SYMBOL_BACKSPACE) == 0) { in lv_ime_pinyin_kb_event() 709 … else if((strcmp(txt, "ABC") == 0) || (strcmp(txt, "abc") == 0) || (strcmp(txt, "1#") == 0)) { in lv_ime_pinyin_kb_event() 714 else if(strcmp(txt, LV_SYMBOL_KEYBOARD) == 0) { in lv_ime_pinyin_kb_event() 724 else if(strcmp(txt, LV_SYMBOL_OK) == 0) { in lv_ime_pinyin_kb_event() 727 …lse if((pinyin_ime->mode == LV_IME_PINYIN_MODE_K26) && ((txt[0] >= 'a' && txt[0] <= 'z') || (txt[0… in lv_ime_pinyin_kb_event() 728 … txt[0] <= 'Z'))) { in lv_ime_pinyin_kb_event() [all …]
|
/lvgl-3.5.0/src/extra/widgets/span/ |
D | lv_span.c | 25 const char * txt; member 56 static bool lv_txt_get_snippet(const char * txt, const lv_font_t * font, lv_coord_t letter_space, 108 span->txt = (char *)""; in lv_spangroup_new_span() 129 if(cur_span->txt && cur_span->static_flag == 0) { in lv_spangroup_del_span() 130 lv_mem_free(cur_span->txt); in lv_spangroup_del_span() 151 if(span->txt == NULL || span->static_flag == 1) { in lv_span_set_text() 152 span->txt = lv_mem_alloc(strlen(text) + 1); in lv_span_set_text() 155 span->txt = lv_mem_realloc(span->txt, strlen(text) + 1); in lv_span_set_text() 158 strcpy(span->txt, text); in lv_span_set_text() 169 if(span->txt && span->static_flag == 0) { in lv_span_set_text_static() [all …]
|
/lvgl-3.5.0/src/draw/nxp/pxp/ |
D | lv_gpu_nxp_pxp.h | 128 #define PXP_COND_STOP(cond, txt) \ argument 131 LV_LOG_ERROR("%s. STOP!", txt); \
|
/lvgl-3.5.0/examples/widgets/btnmatrix/ |
D | lv_example_btnmatrix_1.c | 10 const char * txt = lv_btnmatrix_get_btn_text(obj, id); in event_handler() local 12 LV_LOG_USER("%s was pressed\n", txt); in event_handler()
|
D | lv_example_btnmatrix_1.py | 7 txt = obj.get_btn_text(id) 9 print("%s was pressed"%txt)
|