Lines Matching refs:tileview
35 static lv_res_t lv_tileview_signal(lv_obj_t * tileview, lv_signal_t sign, void * param);
38 static void drag_end_handler(lv_obj_t * tileview);
39 static bool set_valid_drag_dirs(lv_obj_t * tileview);
106 lv_page_set_style(new_tileview, LV_PAGE_STYLE_BG, th->style.tileview.bg); in lv_tileview_create()
107 lv_page_set_style(new_tileview, LV_PAGE_STYLE_SCRL, th->style.tileview.scrl); in lv_tileview_create()
108 lv_page_set_style(new_tileview, LV_PAGE_STYLE_SB, th->style.tileview.sb); in lv_tileview_create()
143 void lv_tileview_add_element(lv_obj_t * tileview, lv_obj_t * element) in lv_tileview_add_element() argument
153 lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); in lv_tileview_add_element()
154 lv_tileview_set_tile_act(tileview, ext->act_id.x, ext->act_id.y, false); in lv_tileview_add_element()
168 void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t * valid_pos, uint16_t va… in lv_tileview_set_valid_positions() argument
170 lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); in lv_tileview_set_valid_positions()
184 lv_tileview_set_tile_act(tileview, valid_pos[0].x, valid_pos[0].y, LV_ANIM_OFF); in lv_tileview_set_valid_positions()
195 void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, lv_anim_enable_t ani… in lv_tileview_set_tile_act() argument
201 lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); in lv_tileview_set_tile_act()
216 lv_coord_t x_coord = -x * lv_obj_get_width(tileview); in lv_tileview_set_tile_act()
217 lv_coord_t y_coord = -y * lv_obj_get_height(tileview); in lv_tileview_set_tile_act()
218 lv_obj_t * scrl = lv_page_get_scrl(tileview); in lv_tileview_set_tile_act()
254 res = lv_event_send(tileview, LV_EVENT_VALUE_CHANGED, &tile_id); in lv_tileview_set_tile_act()
264 void lv_tileview_set_style(lv_obj_t * tileview, lv_tileview_style_t type, const lv_style_t * style) in lv_tileview_set_style() argument
268 case LV_TILEVIEW_STYLE_MAIN: lv_obj_set_style(tileview, style); break; in lv_tileview_set_style()
286 const lv_style_t * lv_tileview_get_style(const lv_obj_t * tileview, lv_tileview_style_t type) in lv_tileview_get_style() argument
290 case LV_TILEVIEW_STYLE_MAIN: style = lv_obj_get_style(tileview); break; in lv_tileview_get_style()
316 static lv_res_t lv_tileview_signal(lv_obj_t * tileview, lv_signal_t sign, void * param) in lv_tileview_signal() argument
321 res = ancestor_signal(tileview, sign, param); in lv_tileview_signal()
354 lv_obj_t * tileview = lv_obj_get_parent(scrl); in lv_tileview_scrl_signal() local
355 const lv_style_t * style_bg = lv_tileview_get_style(tileview, LV_TILEVIEW_STYLE_MAIN); in lv_tileview_scrl_signal()
361 lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); in lv_tileview_scrl_signal()
392 lv_coord_t h = lv_obj_get_height(tileview); in lv_tileview_scrl_signal()
393 lv_coord_t w = lv_obj_get_width(tileview); in lv_tileview_scrl_signal()
401 lv_page_start_edge_flash(tileview); in lv_tileview_scrl_signal()
415 lv_page_start_edge_flash(tileview); in lv_tileview_scrl_signal()
429 lv_page_start_edge_flash(tileview); in lv_tileview_scrl_signal()
443 lv_page_start_edge_flash(tileview); in lv_tileview_scrl_signal()
453 … lv_obj_set_y(scrl, -ext->act_id.y * lv_obj_get_height(tileview) + style_bg->body.padding.top); in lv_tileview_scrl_signal()
455 … lv_obj_set_x(scrl, -ext->act_id.x * lv_obj_get_width(tileview) + style_bg->body.padding.left); in lv_tileview_scrl_signal()
463 lv_obj_t * tileview = lv_obj_get_parent(scrl); in tileview_scrl_event_cb() local
467 lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); in tileview_scrl_event_cb()
470 set_valid_drag_dirs(tileview); in tileview_scrl_event_cb()
477 lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); in tileview_scrl_event_cb()
482 drag_end_handler(tileview); in tileview_scrl_event_cb()
490 static void drag_end_handler(lv_obj_t * tileview) in drag_end_handler() argument
492 lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); in drag_end_handler()
496 lv_obj_t * scrl = lv_page_get_scrl(tileview); in drag_end_handler()
499 p.x = -(scrl->coords.x1 - lv_obj_get_width(tileview) / 2); in drag_end_handler()
500 p.y = -(scrl->coords.y1 - lv_obj_get_height(tileview) / 2); in drag_end_handler()
528 p.x = p.x / lv_obj_get_width(tileview); in drag_end_handler()
529 p.y = p.y / lv_obj_get_height(tileview); in drag_end_handler()
540 lv_tileview_set_tile_act(tileview, ext->act_id.x + x_move, ext->act_id.y + y_move, true); in drag_end_handler()
543 static bool set_valid_drag_dirs(lv_obj_t * tileview) in set_valid_drag_dirs() argument
546 lv_tileview_ext_t * ext = lv_obj_get_ext_attr(tileview); in set_valid_drag_dirs()