/AliOS-Things-master/components/littlevgl/src/lv_objx/ |
A D | lv_tabview.c | 119 ext->indic = lv_obj_create(ext->btns, NULL); in lv_tabview_create() 167 lv_btnm_set_map(ext->btns, ext->tab_name_ptr); in lv_tabview_create() 237 … ext->tab_name_ptr = lv_mem_realloc(ext->tab_name_ptr, sizeof(char *) * (ext->tab_cnt + 1)); in lv_tabview_add_tab() 241 … ext->tab_name_ptr = lv_mem_realloc(ext->tab_name_ptr, sizeof(char *) * (ext->tab_cnt * 2)); in lv_tabview_add_tab() 255 ext->tab_name_ptr[ext->tab_cnt - 1] = name_dm; in lv_tabview_add_tab() 256 ext->tab_name_ptr[ext->tab_cnt] = ""; in lv_tabview_add_tab() 266 ext->tab_name_ptr[ext->tab_cnt * 2 - 1] = ""; in lv_tabview_add_tab() 276 lv_btnm_set_map(ext->btns, ext->tab_name_ptr); in lv_tabview_add_tab() 338 if(id >= ext->tab_cnt) id = ext->tab_cnt - 1; in lv_tabview_set_tab_act() 708 ext->btns->signal_cb(ext->btns, sign, param); in lv_tabview_signal() [all …]
|
A D | lv_spinbox.c | 184 if(ext->value > ext->range_max) { in lv_spinbox_set_range() 185 ext->value = ext->range_max; in lv_spinbox_set_range() 188 if(ext->value < ext->range_min) { in lv_spinbox_set_range() 189 ext->value = ext->range_min; in lv_spinbox_set_range() 266 if(ext->value + ext->step <= ext->range_max) { in lv_spinbox_increment() 268 if((ext->value + ext->step) > 0 && ext->value < 0) ext->value = -ext->value; in lv_spinbox_increment() 269 ext->value += ext->step; in lv_spinbox_increment() 272 ext->value = ext->range_max; in lv_spinbox_increment() 286 if(ext->value - ext->step >= ext->range_min) { in lv_spinbox_decrement() 288 if((ext->value - ext->step) < 0 && ext->value > 0) ext->value = -ext->value; in lv_spinbox_decrement() [all …]
|
A D | lv_calendar.c | 325 return ext->pressed_date.year != 0 ? &ext->pressed_date : NULL; in lv_calendar_get_pressed_date() 589 ext->pressed_date.year = ext->showed_date.year - (ext->showed_date.month == 1 ? 1 : 0); in calculate_touched_day() 590 … ext->pressed_date.month = ext->showed_date.month == 1 ? 12 : (ext->showed_date.month - 1); in calculate_touched_day() 591 … ext->pressed_date.day = get_month_length(ext->pressed_date.year, ext->pressed_date.month) - in calculate_touched_day() 595 ext->pressed_date.year = ext->showed_date.year; in calculate_touched_day() 596 ext->pressed_date.month = ext->showed_date.month; in calculate_touched_day() 599 … ext->pressed_date.year = ext->showed_date.year + (ext->showed_date.month == 12 ? 1 : 0); in calculate_touched_day() 600 … ext->pressed_date.month = ext->showed_date.month == 12 ? 1 : (ext->showed_date.month + 1); in calculate_touched_day() 664 … const lv_style_t * arrow_style = ext->btn_pressing < 0 ? ext->style_header_pr : ext->style_header; in draw_header() 669 arrow_style = ext->btn_pressing > 0 ? ext->style_header_pr : ext->style_header; in draw_header() [all …]
|
A D | lv_bar.c | 152 ext->anim_start = ext->cur_value; in lv_bar_set_value() 157 ext->anim_start = ext->anim_end; in lv_bar_set_value() 380 if(ext->cur_value != ext->min_value || ext->sym in lv_bar_design() 402 … (int32_t)((int32_t)w * (ext->anim_start - ext->min_value)) / (ext->max_value - ext->min_value); in lv_bar_design() 404 … (int32_t)((int32_t)w * (ext->anim_end - ext->min_value)) / (ext->max_value - ext->min_value); in lv_bar_design() 414 … (int32_t)((int32_t)w * (ext->cur_value - ext->min_value)) / (ext->max_value - ext->min_value); in lv_bar_design() 418 if(ext->sym && ext->min_value < 0 && ext->max_value > 0) { in lv_bar_design() 434 … (int32_t)((int32_t)h * (ext->anim_start - ext->min_value)) / (ext->max_value - ext->min_value); in lv_bar_design() 436 … (int32_t)((int32_t)h * (ext->anim_end - ext->min_value)) / (ext->max_value - ext->min_value); in lv_bar_design() 446 … (int32_t)((int32_t)h * (ext->cur_value - ext->min_value)) / (ext->max_value - ext->min_value); in lv_bar_design() [all …]
|
A D | lv_table.c | 136 if(row >= ext->row_cnt || col >= ext->col_cnt) { in lv_table_set_cell_value() 172 if(ext->row_cnt > 0 && ext->col_cnt > 0) { in lv_table_set_row_cnt() 173 … ext->cell_data = lv_mem_realloc(ext->cell_data, ext->row_cnt * ext->col_cnt * sizeof(char *)); in lv_table_set_row_cnt() 206 if(ext->row_cnt > 0 && ext->col_cnt > 0) { in lv_table_set_col_cnt() 207 … ext->cell_data = lv_mem_realloc(ext->cell_data, ext->row_cnt * ext->col_cnt * sizeof(char *)); in lv_table_set_col_cnt() 250 if(row >= ext->row_cnt || col >= ext->col_cnt) { in lv_table_set_cell_align() 278 if(row >= ext->row_cnt || col >= ext->col_cnt) { in lv_table_set_cell_type() 309 if(row >= ext->row_cnt || col >= ext->col_cnt) { in lv_table_set_cell_crop() 337 if(row >= ext->row_cnt || col >= ext->col_cnt) { in lv_table_set_cell_merge_right() 405 if(row >= ext->row_cnt || col >= ext->col_cnt) { in lv_table_get_cell_value() [all …]
|
A D | lv_btnm.c | 836 ext->btn_id_act = ext->btn_id_pr; in lv_btnm_signal() 845 if(ext->btn_id_pr >= ext->btn_cnt - 1) ext->btn_id_pr = ext->btn_cnt - 1; in lv_btnm_signal() 846 ext->btn_id_act = ext->btn_id_pr; in lv_btnm_signal() 850 if(ext->btn_id_pr > 0) ext->btn_id_pr--; in lv_btnm_signal() 851 ext->btn_id_act = ext->btn_id_pr; in lv_btnm_signal() 861 …ext->button_areas[ext->btn_id_pr].x1 + (lv_area_get_width(&ext->button_areas[ext->btn_id_pr]) >> 1… in lv_btnm_signal() 864 if(ext->button_areas[area_below].y1 > ext->button_areas[ext->btn_id_pr].y1 && in lv_btnm_signal() 873 ext->btn_id_act = ext->btn_id_pr; in lv_btnm_signal() 883 …ext->button_areas[ext->btn_id_pr].x1 + (lv_area_get_width(&ext->button_areas[ext->btn_id_pr]) >> 1… in lv_btnm_signal() 886 if(ext->button_areas[area_above].y1 < ext->button_areas[ext->btn_id_pr].y1 && in lv_btnm_signal() [all …]
|
A D | lv_img.c | 71 lv_mem_assert(ext); in lv_img_create() 74 ext->src = NULL; in lv_img_create() 79 ext->auto_size = 1; in lv_img_create() 80 ext->offset.x = 0; in lv_img_create() 81 ext->offset.y = 0; in lv_img_create() 190 lv_obj_set_size(img, ext->w, ext->h); in lv_img_set_src() 219 if(x < ext->w - 1) { in lv_img_set_offset_x() 235 if(y < ext->h - 1) { in lv_img_set_offset_y() 254 return ext->src; in lv_img_get_src() 267 return ext->src; in lv_img_get_file_name() [all …]
|
A D | lv_tileview.c | 73 lv_mem_assert(ext); in lv_tileview_create() 154 lv_tileview_set_tile_act(tileview, ext->act_id.x, ext->act_id.y, false); in lv_tileview_add_element() 177 if(valid_pos->x == ext->act_id.x && valid_pos->y == ext->act_id.y) { in lv_tileview_set_valid_positions() 206 if(ext->valid_pos[tile_id].x == x && ext->valid_pos[tile_id].y == y) { in lv_tileview_set_tile_act() 213 ext->act_id.x = x; in lv_tileview_set_tile_act() 214 ext->act_id.y = y; in lv_tileview_set_tile_act() 503 if(ext->drag_hor) { in drag_end_handler() 556 …if(ext->valid_pos[i].x == ext->act_id.x && ext->valid_pos[i].y == ext->act_id.y - 1) ext->drag_top… in set_valid_drag_dirs() 557 …if(ext->valid_pos[i].x == ext->act_id.x && ext->valid_pos[i].y == ext->act_id.y + 1) ext->drag_bot… in set_valid_drag_dirs() 558 …if(ext->valid_pos[i].x == ext->act_id.x - 1 && ext->valid_pos[i].y == ext->act_id.y) ext->drag_lef… in set_valid_drag_dirs() [all …]
|
A D | lv_label.c | 84 lv_mem_assert(ext); in lv_label_create() 97 ext->offset.x = 0; in lv_label_create() 98 ext->offset.y = 0; in lv_label_create() 147 memcpy(ext->dot.tmp, copy_ext->dot.tmp, sizeof(ext->dot.tmp)); in lv_label_create() 184 ext->text = lv_mem_realloc(ext->text, strlen(ext->text) + 1); in lv_label_set_text() 190 if(ext->text != NULL && ext->static_txt == 0) { in lv_label_set_text() 226 if(ext->text != NULL && ext->static_txt == 0) { in lv_label_set_array_text() 250 if(ext->static_txt == 0 && ext->text != NULL) { in lv_label_set_static_text() 406 return ext->text; in lv_label_get_text() 762 ext->text = lv_mem_realloc(ext->text, new_len + 1); in lv_label_ins_text() [all …]
|
A D | lv_ta.c | 252 … ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + 2); /*+2: the new char + \0 */ in lv_ta_add_char() 329 lv_label_ins_text(ext->label, ext->cursor.pos, txt); in lv_ta_add_text() 333 ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + strlen(txt) + 1); in lv_ta_add_text() 337 lv_txt_ins(ext->pwd_tmp, ext->cursor.pos, txt); in lv_ta_add_text() 412 ext->pwd_tmp = lv_mem_realloc(ext->pwd_tmp, strlen(ext->pwd_tmp) + 1); in lv_ta_del_char() 667 lv_label_set_text(ext->label, ext->pwd_tmp); in lv_ta_set_pwd_mode() 920 if(ext->placeholder) txt = lv_label_get_text(ext->label); in lv_ta_get_placeholder_text() 1319 if(ext->pwd_tmp != NULL) lv_mem_free(ext->pwd_tmp); in lv_ta_signal() 1644 …if(letter_pos.x + ext->label->coords.x1 + letter_w > ext->label->coords.x2 && ext->one_line == 0 && in refr_cursor_area() 1804 if(ext->tmp_sel_start > ext->tmp_sel_end) { in update_cursor_position_on_click() [all …]
|
A D | lv_ddlist.c | 200 ext->sel_opt_id = sel_opt < ext->option_cnt ? sel_opt : ext->option_cnt - 1; in lv_ddlist_set_selected() 201 ext->sel_opt_id_ori = ext->sel_opt_id; in lv_ddlist_set_selected() 508 if(ext->opened != 0 || ext->force_sel) { in lv_ddlist_design() 533 if(ext->opened || ext->force_sel) { in lv_ddlist_design() 629 ext->sel_opt_id_ori = ext->sel_opt_id; in lv_ddlist_signal() 635 ext->sel_opt_id = ext->sel_opt_id_ori; in lv_ddlist_signal() 653 ext->sel_opt_id = ext->sel_opt_id_ori; in lv_ddlist_signal() 664 if(ext->sel_opt_id + 1 < ext->option_cnt) { in lv_ddlist_signal() 682 ext->sel_opt_id = ext->sel_opt_id_ori; in lv_ddlist_signal() 756 ext->sel_opt_id_ori = ext->sel_opt_id; in release_handler() [all …]
|
A D | lv_chart.c | 97 memset(&ext->x_axis, 0, sizeof(ext->x_axis)); in lv_chart_create() 98 memset(&ext->y_axis, 0, sizeof(ext->y_axis)); in lv_chart_create() 221 if(ext->hdiv_cnt == hdiv && ext->vdiv_cnt == vdiv) return; in lv_chart_set_div_line_count() 238 if(ext->ymin == ymin && ext->ymax == ymax) return; in lv_chart_set_range() 778 y_tmp = y_tmp / (ext->ymax - ext->ymin); in lv_chart_draw_lines() 790 y_tmp = y_tmp / (ext->ymax - ext->ymin); in lv_chart_draw_lines() 844 y_tmp = y_tmp / (ext->ymax - ext->ymin); in lv_chart_draw_points() 959 y_tmp = y_tmp / (ext->ymax - ext->ymin); in lv_chart_draw_vertical_lines() 967 y_tmp = y_tmp / (ext->ymax - ext->ymin); in lv_chart_draw_vertical_lines() 1019 y_tmp = y_tmp / (ext->ymax - ext->ymin); in lv_chart_draw_areas() [all …]
|
A D | lv_win.c | 61 lv_mem_assert(ext); in lv_win_create() 94 ext->title = lv_label_create(ext->header, NULL); in lv_win_create() 119 ext->title = lv_label_create(ext->header, copy_ext->title); in lv_win_create() 174 lv_obj_set_size(btn, ext->btn_size, ext->btn_size); in lv_win_add_btn() 226 ext->btn_size = size; in lv_win_set_btn_size() 338 return ext->page; in lv_win_get_content() 349 return ext->btn_size; in lv_win_get_btn_size() 500 ext->page->signal_cb(ext->page, sign, param); in lv_win_signal() 521 if(ext->page == NULL || ext->header == NULL || ext->title == NULL) return; in lv_win_realign() 534 lv_obj_set_size(btn, ext->btn_size, ext->btn_size); in lv_win_realign() [all …]
|
A D | lv_kb.c | 107 lv_mem_assert(ext); in lv_kb_create() 114 ext->cursor_mng = 0; in lv_kb_create() 177 if(ext->ta && ext->cursor_mng) { in lv_kb_set_ta() 182 ext->ta = ta; in lv_kb_set_ta() 185 if(ext->ta && ext->cursor_mng) { in lv_kb_set_ta() 201 ext->mode = mode; in lv_kb_set_mode() 223 if(ext->ta) { in lv_kb_set_cursor_manage() 265 return ext->ta; in lv_kb_get_ta() 276 return ext->mode; in lv_kb_get_mode() 428 if(ext->ta && ext->cursor_mng) { in lv_kb_signal() [all …]
|
A D | lv_lmeter.c | 67 lv_mem_assert(ext); in lv_lmeter_create() 71 ext->min_value = 0; in lv_lmeter_create() 72 ext->max_value = 100; in lv_lmeter_create() 73 ext->cur_value = 0; in lv_lmeter_create() 125 ext->cur_value = value > ext->max_value ? ext->max_value : value; in lv_lmeter_set_value() 126 ext->cur_value = ext->cur_value < ext->min_value ? ext->min_value : ext->cur_value; in lv_lmeter_set_value() 139 if(ext->min_value == min && ext->max_value == max) return; in lv_lmeter_set_range() 141 ext->max_value = max; in lv_lmeter_set_range() 142 ext->min_value = min; in lv_lmeter_set_range() 163 if(ext->scale_angle == angle && ext->line_cnt == line_cnt) return; in lv_lmeter_set_scale() [all …]
|
A D | lv_btn.c | 87 lv_mem_assert(ext); in lv_btn_create() 98 ext->toggle = 0; in lv_btn_create() 100 ext->ink_in_time = 0; in lv_btn_create() 101 ext->ink_wait_time = 0; in lv_btn_create() 102 ext->ink_out_time = 0; in lv_btn_create() 139 memcpy(ext->styles, copy_ext->styles, sizeof(ext->styles)); in lv_btn_create() 175 ext->state = state; in lv_btn_set_state() 187 switch(ext->state) { in lv_btn_toggle() 270 lv_obj_set_style(btn, ext->styles[ext->state]); in lv_btn_set_style() 285 return ext->state; in lv_btn_get_state() [all …]
|
A D | lv_mbox.c | 78 lv_mem_assert(ext); in lv_mbox_create() 81 ext->text = NULL; in lv_mbox_create() 82 ext->btnm = NULL; in lv_mbox_create() 300 if(ext->btnm) lv_btnm_set_recolor(ext->btnm, en); in lv_mbox_set_recolor() 328 if(ext->btnm) in lv_mbox_get_active_btn() 343 if(ext->btnm) in lv_mbox_get_active_btn_text() 413 return ext->btnm; in lv_mbox_get_btnm() 453 if(ext->btnm) { in lv_mbox_signal() 460 ext->btnm->signal_cb(ext->btnm, sign, param); in lv_mbox_signal() 502 if(ext->text) { in mbox_realign() [all …]
|
A D | lv_imgbtn.c | 59 lv_mem_assert(ext); in lv_imgbtn_create() 66 memset(ext->img_src, 0, sizeof(ext->img_src)); in lv_imgbtn_create() 68 memset(ext->img_src_left, 0, sizeof(ext->img_src_left)); in lv_imgbtn_create() 69 memset(ext->img_src_mid, 0, sizeof(ext->img_src_mid)); in lv_imgbtn_create() 70 memset(ext->img_src_right, 0, sizeof(ext->img_src_right)); in lv_imgbtn_create() 87 memcpy(ext->img_src, copy_ext->img_src, sizeof(ext->img_src)); in lv_imgbtn_create() 89 memcpy(ext->img_src_left, copy_ext->img_src_left, sizeof(ext->img_src_left)); in lv_imgbtn_create() 90 memcpy(ext->img_src_mid, copy_ext->img_src_mid, sizeof(ext->img_src_mid)); in lv_imgbtn_create() 91 memcpy(ext->img_src_right, copy_ext->img_src_right, sizeof(ext->img_src_right)); in lv_imgbtn_create() 117 ext->img_src[state] = src; in lv_imgbtn_set_src() [all …]
|
A D | lv_page.c | 88 lv_mem_assert(ext); in lv_page_create() 296 return ext->scrl; in lv_page_get_scrl() 665 if(ext->sb.hor_draw && (ext->sb.mode & LV_SB_MODE_HIDE) == 0) { in lv_page_design() 675 if(ext->sb.ver_draw && (ext->sb.mode & LV_SB_MODE_HIDE) == 0) { in lv_page_design() 714 if(ext->edge_flash.left_ip || ext->edge_flash.right_ip || ext->edge_flash.top_ip || in lv_page_design() 824 ext->scrl->signal_cb(ext->scrl, LV_SIGNAL_CORD_CHG, &ext->scrl->coords); in lv_page_signal() 836 ext->scrl->signal_cb(ext->scrl, LV_SIGNAL_CORD_CHG, &ext->scrl->coords); in lv_page_signal() 1151 if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.hor_draw = 0; in lv_page_sb_refresh() 1166 if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.hor_draw = 1; in lv_page_sb_refresh() 1174 if(ext->sb.mode == LV_SB_MODE_AUTO || ext->sb.mode == LV_SB_MODE_DRAG) ext->sb.ver_draw = 0; in lv_page_sb_refresh() [all …]
|
A D | lv_sw.c | 66 lv_mem_assert(ext); in lv_sw_create() 67 if(ext == NULL) return NULL; in lv_sw_create() 70 ext->changed = 0; in lv_sw_create() 72 ext->anim_time = 0; in lv_sw_create() 74 ext->style_knob_off = ext->slider.style_knob; in lv_sw_create() 75 ext->style_knob_on = ext->slider.style_knob; in lv_sw_create() 242 return ext->anim_time; in lv_sw_get_anim_time() 295 ext->slided = 0; in lv_sw_signal() 296 ext->changed = 0; in lv_sw_signal() 303 if(LV_MATH_ABS(p.x - ext->start_x) > LV_INDEV_DEF_DRAG_LIMIT) ext->slided = 1; in lv_sw_signal() [all …]
|
A D | lv_preload.c | 74 lv_mem_assert(ext); in lv_preload_create() 75 if(ext == NULL) return NULL; in lv_preload_create() 82 ext->anim_type = LV_PRELOAD_DEF_ANIM; in lv_preload_create() 134 ext->arc_length = deg; in lv_preload_set_arc_length() 146 ext->time = time; in lv_preload_set_spin_time() 194 a.time = ext->time; in lv_preload_set_type() 255 ext->anim_dir = dir; in lv_preload_set_dir() 270 return ext->arc_length; in lv_preload_get_arc_length() 280 return ext->time; in lv_preload_get_spin_time() 309 return ext->anim_type; in lv_preload_get_type() [all …]
|
A D | lv_roller.c | 76 lv_mem_assert(ext); in lv_roller_create() 179 lv_mem_assert(ext); in lv_roller_set_align() 258 lv_mem_assert(ext); in lv_roller_get_align() 423 if(ext->ddlist.sel_opt_id != ext->ddlist.sel_opt_id_ori) { in lv_roller_signal() 424 ext->ddlist.sel_opt_id = ext->ddlist.sel_opt_id_ori; in lv_roller_signal() 430 ext->ddlist.sel_opt_id_ori = ext->ddlist.sel_opt_id; in lv_roller_signal() 440 if(ext->ddlist.sel_opt_id != ext->ddlist.sel_opt_id_ori) { in lv_roller_signal() 441 ext->ddlist.sel_opt_id = ext->ddlist.sel_opt_id_ori; in lv_roller_signal() 448 if(ext->ddlist.sel_opt_id + 1 < ext->ddlist.option_cnt) { in lv_roller_signal() 509 if(id >= ext->ddlist.option_cnt) id = ext->ddlist.option_cnt - 1; in lv_roller_scrl_signal() [all …]
|
A D | lv_gauge.c | 73 lv_mem_assert(ext); in lv_gauge_create() 74 if(ext == NULL) return NULL; in lv_gauge_create() 77 ext->needle_count = 0; in lv_gauge_create() 78 ext->values = NULL; in lv_gauge_create() 79 ext->needle_colors = NULL; in lv_gauge_create() 139 ext->values = NULL; in lv_gauge_set_needle_count() 142 ext->values = lv_mem_realloc(ext->values, needle_cnt * sizeof(int16_t)); in lv_gauge_set_needle_count() 220 return ext->values[needle]; in lv_gauge_get_value() 231 return ext->needle_count; in lv_gauge_get_needle_count() 242 return ext->label_count; in lv_gauge_get_label_count() [all …]
|
A D | lv_line.c | 63 lv_mem_assert(ext); in lv_line_create() 64 if(ext == NULL) return NULL; in lv_line_create() 66 ext->point_num = 0; in lv_line_create() 67 ext->point_array = NULL; in lv_line_create() 68 ext->auto_size = 1; in lv_line_create() 69 ext->y_inv = 0; in lv_line_create() 111 ext->point_array = point_a; in lv_line_set_points() 144 if(en) lv_line_set_points(line, ext->point_array, ext->point_num); in lv_line_set_auto_size() 157 if(ext->y_inv == en) return; in lv_line_set_y_invert() 214 if(ext->point_num == 0 || ext->point_array == NULL) return false; in lv_line_design() [all …]
|
A D | lv_slider.c | 68 lv_mem_assert(ext); in lv_slider_create() 69 if(ext == NULL) return NULL; in lv_slider_create() 74 ext->knob_in = 0; in lv_slider_create() 122 if(ext->knob_in == in) return; in lv_slider_set_knob_in() 142 ext->style_knob = style; in lv_slider_set_style() 162 return ext->drag_value; in lv_slider_get_value() 318 if(ext->drag_value != LV_SLIDER_NOT_PRESSED) cur_value = ext->drag_value; in lv_slider_design() 388 if(ext->knob_in == 0) { in lv_slider_design() 417 if(ext->knob_in == 0) { in lv_slider_design() 499 ext->drag_value = tmp; in lv_slider_signal() [all …]
|