lv_event_code_t code = lv_event_get_code(e); lv_obj_t * obj = lv_event_get_target(e); if(code == LV_EVENT_VALUE_CHANGED) //当值切换时执行如下操作 { LV_LOG_USER("State: %s\n", lv_obj_has_state(obj, LV_STATE_CHECKED) ? "On" : "Off"); } } 然后给OBJ添加该回调函数...
lv_event_send(obj, LV_EVENT_USER_REFRESH_RESULT, dataTypedef); // 自定义信号,用于更新数据,参数为一个结构体数组 // 2.在控件的回调函数中接收该信号,并进行处理 static void RefreDataCbk(lv_event_t *event) { lv_event_code_t code = lv_event_get_code(event); lv_obj_t *obj = event->...
lv_event_code_tcode = lv_event_get_code(e);// 获取事件编码 lv_obj_t* ta = lv_event_get_target(e);// 获取文本对象 lv_obj_t* kb = (lv_obj_t*)lv_event_get_user_data(e);// 获取键盘对象 /* 获取文本点击事件 */ if(code == LV_EVENT_CLICKED) { lv_keyboard_set_textarea(kb...
lv_obj_add_event_cb(btn01, button_simple_cb, LV_EVENT_CLICKED, label01); 这里让按钮只对点击事件产生响应。如果要让按钮对多个事件响应的话,需要先让按钮对所有事件LV_EVENT_ALL产生响应的话,然后在回调函数内进一步判断事件类型: lv_event_code_tcode =lv_event_get_code(e);if(code == LV_EVENT_...
static void MUSIC_event_handler(lv_event_t * e)//菜单界面触发音乐 { lv_event_code_t code = lv_event_get_code(e); if(code == LV_EVENT_CLICKED) { lv_obj_add_flag(contanier1, LV_OBJ_FLAG_HIDDEN); lv_obj_clear_flag(contanier2, LV_OBJ_FLAG_HIDDEN); } } static void SETTINGS_...
完整版本视频教程:https://fnwcn.xetslk.com/s/18iJDa资料获取:https://gitee.com/weidongshan/lvgl_100ask_course_v9社区技术答疑交流:https://forums.100ask.net/c/13-category/13QQ技术交流群(如群满,请加qq:401684796 验证备注:LVGL):774083288微信交流, 视频
登录后复制#include"events_init.h"#include< stdio.h >#include"lvgl.h"#include"custom.h"staticlv_timer_t* timer_meter_speed;voidevents_init(lv_ui *ui){ }staticvoidscreen_event_handler(lv_event_t*e){lv_event_code_tcode =lv_event_get_code(e);switch(code) ...
2-8-2_基础对象的事件冒泡(event BUBBLE) 09:28 2-9-1_LVGL的定时器(lv_timer)-入门(上) 26:09 2-9-2_LVGL的定时器(lv_timer)-入门(下) 12:19 2-9-3_LVGL的定时器(lv_timer)-入门(课后思考) 03:51 3-0-1_阶段总结与后续学习 05:44 3-0-2_如何运行示例代码(重要) 10:19 3...
static void lv_textarea_event(const lv_obj_class_t * class_p, lv_event_t * e); static void cursor_blink_anim_cb(void * obj, int32_t show); static void pwd_char_hider_anim(void * obj, int32_t x); static void pwd_char_hider_anim_ready(lv_anim_t * a); ...
Search code, repositories, users, issues, pull requests... Provide feedback We read every piece of feedback, and take your input very seriously. Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Ca...