Lines Matching refs:ginfo
25 } ginfo; variable
53 lv_anim_init(&ginfo.a); in lv_example_anim_3()
54 lv_anim_set_var(&ginfo.a, ginfo.anim_obj); in lv_example_anim_3()
56 lv_obj_get_style_width(ginfo.anim_obj, LV_PART_MAIN) - 10; in lv_example_anim_3()
57 lv_anim_set_values(&ginfo.a, 5, end); in lv_example_anim_3()
58 lv_anim_set_duration(&ginfo.a, 2000); in lv_example_anim_3()
59 lv_anim_set_exec_cb(&ginfo.a, anim_x_cb); in lv_example_anim_3()
60 lv_anim_set_path_cb(&ginfo.a, anim_path_bezier3_cb); in lv_example_anim_3()
68 int32_t step = lv_bezier3(t, 0, ginfo.p1, ginfo.p2, 1024); in anim_path_bezier3_cb()
80 int32_t step = lv_bezier3(t, 0, ginfo.p1, ginfo.p2, 1024); in refer_chart_cubic_bezier()
81 lv_chart_set_value_by_id2(ginfo.chart, ginfo.ser1, i, t, step); in refer_chart_cubic_bezier()
83 lv_chart_refresh(ginfo.chart); in refer_chart_cubic_bezier()
95 lv_anim_start(&ginfo.a); in run_button_event_handler()
105 if(slider == ginfo.p1_slider) { in slider_event_cb()
106 label = ginfo.p1_label; in slider_event_cb()
107 ginfo.p1 = lv_slider_get_value(slider); in slider_event_cb()
108 lv_snprintf(buf, sizeof(buf), "p1:%d", ginfo.p1); in slider_event_cb()
111 label = ginfo.p2_label; in slider_event_cb()
112 ginfo.p2 = lv_slider_get_value(slider); in slider_event_cb()
113 lv_snprintf(buf, sizeof(buf), "p2:%d", ginfo.p2); in slider_event_cb()
122 ginfo.anim_obj = lv_obj_create(par); in page_obj_init()
123 lv_obj_set_size(ginfo.anim_obj, 30, 30); in page_obj_init()
124 lv_obj_set_align(ginfo.anim_obj, LV_ALIGN_TOP_LEFT); in page_obj_init()
125 lv_obj_remove_flag(ginfo.anim_obj, LV_OBJ_FLAG_SCROLLABLE); in page_obj_init()
126 lv_obj_set_style_bg_color(ginfo.anim_obj, lv_palette_main(LV_PALETTE_RED), LV_PART_MAIN); in page_obj_init()
127 lv_obj_set_grid_cell(ginfo.anim_obj, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_START, 0, 1); in page_obj_init()
129 ginfo.p1_label = lv_label_create(par); in page_obj_init()
130 ginfo.p2_label = lv_label_create(par); in page_obj_init()
131 lv_label_set_text(ginfo.p1_label, "p1:0"); in page_obj_init()
132 lv_label_set_text(ginfo.p2_label, "p2:0"); in page_obj_init()
133 lv_obj_set_grid_cell(ginfo.p1_label, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_START, 1, 1); in page_obj_init()
134 lv_obj_set_grid_cell(ginfo.p2_label, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_START, 2, 1); in page_obj_init()
136 ginfo.p1_slider = lv_slider_create(par); in page_obj_init()
137 ginfo.p2_slider = lv_slider_create(par); in page_obj_init()
138 lv_slider_set_range(ginfo.p1_slider, 0, 1024); in page_obj_init()
139 lv_slider_set_range(ginfo.p2_slider, 0, 1024); in page_obj_init()
140 lv_obj_set_style_pad_all(ginfo.p1_slider, 2, LV_PART_KNOB); in page_obj_init()
141 lv_obj_set_style_pad_all(ginfo.p2_slider, 2, LV_PART_KNOB); in page_obj_init()
142 lv_obj_add_event_cb(ginfo.p1_slider, slider_event_cb, LV_EVENT_VALUE_CHANGED, NULL); in page_obj_init()
143 lv_obj_add_event_cb(ginfo.p2_slider, slider_event_cb, LV_EVENT_VALUE_CHANGED, NULL); in page_obj_init()
144 lv_obj_set_grid_cell(ginfo.p1_slider, LV_GRID_ALIGN_STRETCH, 1, 1, LV_GRID_ALIGN_START, 1, 1); in page_obj_init()
145 lv_obj_set_grid_cell(ginfo.p2_slider, LV_GRID_ALIGN_STRETCH, 1, 1, LV_GRID_ALIGN_START, 2, 1); in page_obj_init()
147 ginfo.run_btn = lv_button_create(par); in page_obj_init()
148 lv_obj_add_event_cb(ginfo.run_btn, run_button_event_handler, LV_EVENT_CLICKED, NULL); in page_obj_init()
149 lv_obj_t * btn_label = lv_label_create(ginfo.run_btn); in page_obj_init()
152 lv_obj_set_grid_cell(ginfo.run_btn, LV_GRID_ALIGN_STRETCH, 2, 1, LV_GRID_ALIGN_STRETCH, 1, 2); in page_obj_init()
154 ginfo.chart = lv_chart_create(par); in page_obj_init()
155 lv_obj_set_style_pad_all(ginfo.chart, 0, LV_PART_MAIN); in page_obj_init()
156 lv_obj_set_style_size(ginfo.chart, 0, 0, LV_PART_INDICATOR); in page_obj_init()
157 lv_chart_set_type(ginfo.chart, LV_CHART_TYPE_SCATTER); in page_obj_init()
158 …ginfo.ser1 = lv_chart_add_series(ginfo.chart, lv_palette_main(LV_PALETTE_RED), LV_CHART_AXIS_PRIMA… in page_obj_init()
159 lv_chart_set_range(ginfo.chart, LV_CHART_AXIS_PRIMARY_Y, 0, 1024); in page_obj_init()
160 lv_chart_set_range(ginfo.chart, LV_CHART_AXIS_PRIMARY_X, 0, 1024); in page_obj_init()
161 lv_chart_set_point_count(ginfo.chart, CHART_POINTS_NUM); in page_obj_init()
162 lv_obj_set_grid_cell(ginfo.chart, LV_GRID_ALIGN_STRETCH, 0, 3, LV_GRID_ALIGN_STRETCH, 3, 1); in page_obj_init()