lv_obj_t*lv_indev_get_obj_act(void) Function Documentation void lv_indev_init(void) Initialize the display input device subsystem §lv_indev_read_task() void lv_indev_read_task(lv_task_t*task) Called periodically to read the input devices ...
()indev.get_vect(vect)x=obj.get_x()+vect.xy=obj.get_y()+vect.yobj.set_pos(x,y)mem.now()## Make an object dragable.#obj=lv.obj(lv.scr_act())obj.set_size(150,100)obj.add_event_cb(drag_event_handler,lv.EVENT.PRESSING,None)label=lv.label(obj)label.set_text("Drag me")...
/*GUI初始化*/ lv_init(); lv_port_disp_init(); lv_port_indev_init(); lv_fs_if_init(); while(1) { lv_task_handler(); rt_thread_mdelay(1); } 代码中如果屏蔽 ‘lv_fs_if_init();’,系统可以正常启动,加上则系统跳转失败,串口输出一串乱码 [10:50:54.524]收←◆KQ@|@X`X@Ve4 ...
- `LV_EVENT_GESTURE` A gesture is detected. Get the gesture with `lv_indev_get_gesture_dir(lv_indev_get_act());` Expand Down 1 change: 1 addition & 0 deletions1examples/widgets/lv_example_widgets.h Original file line numberDiff line numberDiff line change ...
lv_init_lv_group_initlv_indev_drv_registerlv_timer_create(lv_indev_read_timer_cb, LV_INDEV_DEF_READ_PERIOD,indev);lv_indev_read_timer_cb_lv_indev_read(indev_act, &data);// 读取按键数据indev->driver->read_cb(indev->driver,data);indev_keypad_proclv_group_send_data(g, LV_KEY_......
LV_EVENT_GESTURE, /**< A gesture is detected. Get the gesture with `lv_indev_get_gesture_dir(lv_indev_get_act());` */ LV_EVENT_KEY, /**< A key is sent to the object. Get the key with `lv_indev_get_key(lv_indev_get_act());`*/ ...
//输入设备注册staticlv_indev_drv_t indev_drv;lv_indev_drv_init(&indev_drv);indev_drv.type=LV_INDEV_TYPE_POINTER;indev_drv.read_cb=LvTouchRead;lv_indev_drv_register(&indev_drv); 这其中,我们定义输入设备类型是POINTER,同时设置了回调函数。回调函数如下: ...
void * param = lv_event_get_param(e); invalidate_button_area(obj, btnm->btn_id_sel); lv_indev_type_t indev_type = lv_indev_get_type(lv_indev_get_act()); if(indev_type == LV_INDEV_TYPE_POINTER || indev_type == LV_INDEV_TYPE_BUTTON) { uint16_t btn_pr; ...
(&indev_drv);//图像声明LV_IMG_DECLARE(mouse_cursor_icon);//创建光标对象lv_obj_t*cursor_obj=lv_img_create(lv_scr_act(),NULL);//设置光标图像的来源lv_img_set_src(cursor_obj,&mouse_cursor_icon);//链接显示驱动lv_indev_set_cursor(mouse_indev,cursor_obj);//设置光标点击lv_obj_set_click...
(lv_indev_get_act())!=LV_INDEV_TYPE_KEYPAD){lv_keyboard_set_textarea(kb,ta);lv_obj_set_style_max_height(kb,LV_HOR_RES*2/3,0);lv_obj_clear_flag(kb,LV_OBJ_FLAG_HIDDEN);lv_obj_scroll_to_view_recursive(ta,LV_ANIM_OFF);}}elseif(code==LV_EVENT_READY||code==LV_EVENT_CANCEL)...