diff --git a/lv_conf_template.h b/lv_conf_template.h index 80c19ea9a..b1ecea022 100644 --- a/lv_conf_template.h +++ b/lv_conf_template.h @@ -137,7 +137,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/ *-----------*/ /*Enable the log module*/ -#define LV_USE_LOG 1 +#define LV_USE_LOG 0 #if LV_USE_LOG /*How important log should be added: @@ -151,7 +151,7 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/ /*1: Print the log with 'printf'; *0: User need to register a callback with `lv_log_register_print_cb()`*/ -# define LV_LOG_PRINTF 1 +# define LV_LOG_PRINTF 0 /*Enable/disable LV_LOG_TRACE in modules that produces a huge number of logs*/ # define LV_LOG_TRACE_MEM 1 @@ -159,7 +159,6 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/ # define LV_LOG_TRACE_INDEV 1 # define LV_LOG_TRACE_DISP_REFR 1 # define LV_LOG_TRACE_EVENT 1 -# define LV_LOG_TRACE_SIGNAL 1 # define LV_LOG_TRACE_OBJ_CREATE 1 # define LV_LOG_TRACE_LAYOUT 1 # define LV_LOG_TRACE_ANIM 1 @@ -174,9 +173,9 @@ e.g. "stm32f769xx.h" or "stm32f429xx.h"*/ *If LV_USE_LOG is enabled an error message will be printed on failure*/ #define LV_USE_ASSERT_NULL 1 /*Check if the parameter is NULL. (Very fast, recommended)*/ #define LV_USE_ASSERT_MALLOC 1 /*Checks is the memory is successfully allocated or no. (Very fast, recommended)*/ -#define LV_USE_ASSERT_STYLE 1 /*Check if the styles are properly initialized. (Very fast, recommended)*/ -#define LV_USE_ASSERT_MEM_INTEGRITY 1 /*Check the integrity of `lv_mem` after critical operations. (Slow)*/ -#define LV_USE_ASSERT_OBJ 1 /*Check the object's type and existence (e.g. not deleted). (Slow)*/ +#define LV_USE_ASSERT_STYLE 0 /*Check if the styles are properly initialized. (Very fast, recommended)*/ +#define LV_USE_ASSERT_MEM_INTEGRITY 0 /*Check the integrity of `lv_mem` after critical operations. (Slow)*/ +#define LV_USE_ASSERT_OBJ 0 /*Check the object's type and existence (e.g. not deleted). (Slow)*/ /*Add a custom handler when assert happens e.g. to restart the MCU*/ #define LV_ASSERT_HANDLER_INCLUDE diff --git a/src/core/lv_indev.c b/src/core/lv_indev.c index 97026108c..60a671b01 100644 --- a/src/core/lv_indev.c +++ b/src/core/lv_indev.c @@ -380,11 +380,11 @@ static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data) uint32_t prev_key = i->proc.types.keypad.last_key; /*Save the last key. - *It must be done here else `lv_indev_get_key` will return the last key in events and signals*/ + *It must be done here else `lv_indev_get_key` will return the last key in events*/ i->proc.types.keypad.last_key = data->key; /*Save the previous state so we can detect state changes below and also set the last state now - *so if any signal/event handler on the way returns `LV_RES_INV` the last state is remembered + *so if any event handler on the way returns `LV_RES_INV` the last state is remembered *for the next time*/ uint32_t prev_state = i->proc.types.keypad.last_state; i->proc.types.keypad.last_state = data->state; @@ -587,7 +587,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data) lv_group_set_editing(g, lv_group_get_editing(g) ? false : true); /*Toggle edit mode on long press*/ } } - /*If not editable then just send a long press signal*/ + /*If not editable then just send a long press Call the ancestor's event handler*/ else { lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL); if(indev_reset_check(&i->proc)) return; @@ -788,14 +788,14 @@ static void indev_proc_press(lv_indev_proc_t * proc) if(indev_reset_check(proc)) return; } - /*If a new object was found reset some variables and send a pressed signal*/ + /*If a new object was found reset some variables and send a pressed Call the ancestor's event handler*/ if(indev_obj_act != proc->types.pointer.act_obj) { proc->types.pointer.last_point.x = proc->types.pointer.act_point.x; proc->types.pointer.last_point.y = proc->types.pointer.act_point.y; - /*If a new object found the previous was lost, so send a signal*/ + /*If a new object found the previous was lost, so send a Call the ancestor's event handler*/ if(proc->types.pointer.act_obj != NULL) { - /*Save the obj because in special cases `act_obj` can change in the signal function*/ + /*Save the obj because in special cases `act_obj` can change in the Call the ancestor's event handler function*/ lv_obj_t * last_obj = proc->types.pointer.act_obj; lv_event_send(last_obj, LV_EVENT_PRESS_LOST, NULL); @@ -818,7 +818,7 @@ static void indev_proc_press(lv_indev_proc_t * proc) proc->types.pointer.vect.x = 0; proc->types.pointer.vect.y = 0; - /*Send a signal about the press*/ + /*Send a Call the ancestor's event handler about the press*/ lv_event_send(indev_obj_act, LV_EVENT_PRESSED, NULL); if(indev_reset_check(proc)) return; @@ -856,12 +856,12 @@ static void indev_proc_press(lv_indev_proc_t * proc) /*If there is no scrolling then check for long press time*/ if(proc->types.pointer.scroll_obj == NULL && proc->long_pr_sent == 0) { - /*Send a signal about the long press if enough time elapsed*/ + /*Send a Call the ancestor's event handler about the long press if enough time elapsed*/ if(lv_tick_elaps(proc->pr_timestamp) > indev_act->driver->long_press_time) { lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED, NULL); if(indev_reset_check(proc)) return; - /*Mark the signal sending to do not send it again*/ + /*Mark the Call the ancestor's event handler sending to do not send it again*/ proc->long_pr_sent = 1; /*Save the long press time stamp for the long press repeat handler*/ @@ -869,9 +869,9 @@ static void indev_proc_press(lv_indev_proc_t * proc) } } - /*Send long press repeated signal*/ + /*Send long press repeated Call the ancestor's event handler*/ if(proc->types.pointer.scroll_obj == NULL && proc->long_pr_sent == 1) { - /*Send a signal about the long press repeat if enough time elapsed*/ + /*Send a Call the ancestor's event handler about the long press repeat if enough time elapsed*/ if(lv_tick_elaps(proc->longpr_rep_timestamp) > indev_act->driver->long_press_rep_time) { lv_event_send(indev_obj_act, LV_EVENT_LONG_PRESSED_REPEAT, NULL); if(indev_reset_check(proc)) return; @@ -897,11 +897,11 @@ static void indev_proc_release(lv_indev_proc_t * proc) indev_obj_act = proc->types.pointer.act_obj; lv_obj_t * scroll_obj = proc->types.pointer.scroll_obj; - /*Forget the act obj and send a released signal*/ + /*Forget the act obj and send a released Call the ancestor's event handler*/ if(indev_obj_act) { LV_LOG_INFO("released"); - /*Send RELEASE signal and event*/ + /*Send RELEASE Call the ancestor's event handler and event*/ lv_event_send(indev_obj_act, LV_EVENT_RELEASED, NULL); if(indev_reset_check(proc)) return; @@ -922,7 +922,7 @@ static void indev_proc_release(lv_indev_proc_t * proc) } - /*The reset can be set in the signal function. + /*The reset can be set in the Call the ancestor's event handler function. * In case of reset query ignore the remaining parts.*/ if(scroll_obj) { _lv_indev_scroll_throw_handler(proc); diff --git a/src/core/lv_obj.c b/src/core/lv_obj.c index 02760f260..b13380074 100644 --- a/src/core/lv_obj.c +++ b/src/core/lv_obj.c @@ -93,12 +93,6 @@ const lv_obj_class_t lv_obj_class = { # define EVENT_TRACE(...) #endif -#if LV_LOG_TRACE_SIGNAL -# define SIGNAL_TRACE(...) LV_LOG_TRACE( __VA_ARGS__) -#else -# define SIGNAL_TRACE(...) -#endif - /********************** * GLOBAL FUNCTIONS **********************/ @@ -272,7 +266,7 @@ lv_res_t lv_obj_event_base(const lv_obj_class_t * class_p, struct _lv_obj_t * ob if(class_p == NULL) base = obj->class_p; else base = class_p->base_class; - /*Find a base in which signal_cb is set*/ + /*Find a base in which Call the ancestor's event handler_cb is set*/ while(base && base->event_cb == NULL) base = base->base_class; if(base == NULL) return LV_RES_OK; diff --git a/src/core/lv_obj_class.c b/src/core/lv_obj_class.c index 4cb8356cf..e8939c20a 100644 --- a/src/core/lv_obj_class.c +++ b/src/core/lv_obj_class.c @@ -55,7 +55,7 @@ lv_obj_t * lv_obj_create_from_class(const lv_obj_class_t * class_p, lv_obj_t * p lv_obj_construct(obj, parent, copy); if(parent) { - /*Send a signal to the parent to notify it about the new child. + /*Send a Call the ancestor's event handler to the parent to notify it about the new child. *Also triggers layout update*/ lv_event_send(parent, LV_EVENT_CHILD_CHANGED, obj); diff --git a/src/core/lv_obj_draw.h b/src/core/lv_obj_draw.h index 9c0432809..182753826 100644 --- a/src/core/lv_obj_draw.h +++ b/src/core/lv_obj_draw.h @@ -123,7 +123,7 @@ lv_coord_t lv_obj_calculate_ext_draw_size(struct _lv_obj_t * obj, uint8_t part); void lv_obj_draw_dsc_init(lv_obj_draw_dsc_t * dsc, const lv_area_t * clip_area); /** - * Send a 'LV_SIGNAL_REFR_EXT_DRAW_SIZE' signal to the object to refresh the value of the extended draw size. + * Send a 'LV_EVENT_REFR_EXT_DRAW_SIZE' Call the ancestor's event handler to the object to refresh the value of the extended draw size. * The result will be saved in `obj`. * @param obj pointer to an object */ diff --git a/src/core/lv_obj_pos.c b/src/core/lv_obj_pos.c index 8bd86270e..fa19744a0 100644 --- a/src/core/lv_obj_pos.c +++ b/src/core/lv_obj_pos.c @@ -506,7 +506,7 @@ void lv_obj_move_to(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, bool notify) /*Inform the object about its new coordinates*/ lv_event_send(obj, LV_EVENT_COORD_CHANGED, &ori); - /*Send a signal to the parent too*/ + /*Send a Call the ancestor's event handler to the parent too*/ if(parent && notify) lv_event_send(parent, LV_EVENT_CHILD_CHANGED, obj); /*Invalidate the new area*/ @@ -713,10 +713,10 @@ static bool refr_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h) obj->coords.x2 = obj->coords.x1 + w - 1; } - /*Send a signal to the object with its new coordinates*/ + /*Send a Call the ancestor's event handler to the object with its new coordinates*/ lv_event_send(obj, LV_EVENT_COORD_CHANGED, &ori); - /*Send a signal to the parent too*/ + /*Send a Call the ancestor's event handler to the parent too*/ if(parent != NULL) lv_event_send(parent, LV_EVENT_CHILD_CHANGED, obj); /*Invalidate the new area*/ diff --git a/src/core/lv_obj_tree.c b/src/core/lv_obj_tree.c index 7f213f267..555facc65 100644 --- a/src/core/lv_obj_tree.c +++ b/src/core/lv_obj_tree.c @@ -64,7 +64,7 @@ void lv_obj_del(lv_obj_t * obj) obj_del_core(obj); - /*Send a signal to the parent to notify it about the child delete*/ + /*Send a Call the ancestor's event handler to the parent to notify it about the child delete*/ if(par) { /*Just to remove scroll animations if any*/ lv_obj_scroll_to(par, 0, 0, LV_ANIM_OFF); diff --git a/src/extra/widgets/colorwheel/lv_colorwheel.c b/src/extra/widgets/colorwheel/lv_colorwheel.c index a4d77a0f0..3f335737d 100644 --- a/src/extra/widgets/colorwheel/lv_colorwheel.c +++ b/src/extra/widgets/colorwheel/lv_colorwheel.c @@ -338,7 +338,7 @@ static lv_area_t get_knob_area(lv_obj_t * obj) static void lv_colorwheel_event(lv_obj_t * obj, lv_event_t e) { - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ lv_res_t res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; diff --git a/src/extra/widgets/led/lv_led.c b/src/extra/widgets/led/lv_led.c index 897feed1c..ef1f6c38e 100644 --- a/src/extra/widgets/led/lv_led.c +++ b/src/extra/widgets/led/lv_led.c @@ -164,7 +164,7 @@ static void lv_led_event(lv_obj_t * obj, lv_event_t e) { lv_res_t res; - /* Include the ancient signal function */ + /* Call the ancestor's event handler */ res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; diff --git a/src/extra/widgets/spinbox/lv_spinbox.c b/src/extra/widgets/spinbox/lv_spinbox.c index 3ffc5d48c..f7c5589eb 100644 --- a/src/extra/widgets/spinbox/lv_spinbox.c +++ b/src/extra/widgets/spinbox/lv_spinbox.c @@ -303,7 +303,7 @@ static void lv_spinbox_constructor(lv_obj_t * obj, const lv_obj_t * copy) static void lv_spinbox_event(lv_obj_t * obj, lv_event_t e) { - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ lv_res_t res = LV_RES_OK; res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; diff --git a/src/widgets/lv_arc.c b/src/widgets/lv_arc.c index 17e1c8865..e78cf258e 100644 --- a/src/widgets/lv_arc.c +++ b/src/widgets/lv_arc.c @@ -533,7 +533,7 @@ static void lv_arc_event(lv_obj_t * obj, lv_event_t e) { lv_res_t res; - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; diff --git a/src/widgets/lv_bar.c b/src/widgets/lv_bar.c index 40fb357b0..5e96b496a 100644 --- a/src/widgets/lv_bar.c +++ b/src/widgets/lv_bar.c @@ -489,7 +489,7 @@ static void lv_bar_event(lv_obj_t * obj, lv_event_t e) LV_ASSERT_OBJ(obj, MY_CLASS); lv_res_t res; - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; diff --git a/src/widgets/lv_btnmatrix.c b/src/widgets/lv_btnmatrix.c index a64da0a9a..bc049af9d 100644 --- a/src/widgets/lv_btnmatrix.c +++ b/src/widgets/lv_btnmatrix.c @@ -393,7 +393,7 @@ static void lv_btnmatrix_event(lv_obj_t * obj, lv_event_t e) { lv_res_t res; - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; diff --git a/src/widgets/lv_chart.c b/src/widgets/lv_chart.c index 5dcdfd474..b4891b4ff 100644 --- a/src/widgets/lv_chart.c +++ b/src/widgets/lv_chart.c @@ -619,7 +619,7 @@ static void lv_chart_destructor(lv_obj_t * obj) static void lv_chart_event(lv_obj_t * obj, lv_event_t e) { - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ lv_res_t res; res = lv_obj_event_base(MY_CLASS, obj, e); diff --git a/src/widgets/lv_checkbox.c b/src/widgets/lv_checkbox.c index 17fc609a8..f20690fdd 100644 --- a/src/widgets/lv_checkbox.c +++ b/src/widgets/lv_checkbox.c @@ -141,7 +141,7 @@ static void lv_checkbox_destructor(lv_obj_t * obj) static void lv_checkbox_event(lv_obj_t * obj, lv_event_t e) { lv_res_t res; - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; diff --git a/src/widgets/lv_dropdown.c b/src/widgets/lv_dropdown.c index ad8e6571e..96a80100e 100644 --- a/src/widgets/lv_dropdown.c +++ b/src/widgets/lv_dropdown.c @@ -613,7 +613,7 @@ static void lv_dropdown_event(lv_obj_t * obj, lv_event_t e) { lv_res_t res; - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; @@ -705,7 +705,7 @@ static void lv_dropdown_list_event(lv_obj_t * list, lv_event_t e) { lv_res_t res; - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ res = lv_obj_event_base(MY_CLASS_LIST, list, e); if(res != LV_RES_OK) return; diff --git a/src/widgets/lv_img.c b/src/widgets/lv_img.c index 9e8d96ff9..833e65079 100644 --- a/src/widgets/lv_img.c +++ b/src/widgets/lv_img.c @@ -413,7 +413,7 @@ static void lv_img_event(lv_obj_t * obj, lv_event_t e) { /*Ancestor events will be called during drawing*/ if(e != LV_EVENT_DRAW_MAIN && e != LV_EVENT_DRAW_POST) { - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ lv_res_t res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; } diff --git a/src/widgets/lv_label.c b/src/widgets/lv_label.c index 8bbc9324a..49ef9b57e 100644 --- a/src/widgets/lv_label.c +++ b/src/widgets/lv_label.c @@ -741,7 +741,7 @@ static void lv_label_event_cb(lv_obj_t * obj, lv_event_t e) { lv_res_t res; - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; diff --git a/src/widgets/lv_line.c b/src/widgets/lv_line.c index 8599dfdd1..1589d6fe7 100644 --- a/src/widgets/lv_line.c +++ b/src/widgets/lv_line.c @@ -132,7 +132,7 @@ static void lv_line_event(lv_obj_t * obj, lv_event_t e) { lv_res_t res; - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; diff --git a/src/widgets/lv_objx_templ.c b/src/widgets/lv_objx_templ.c index 2b9875bc2..6b36d1d9b 100644 --- a/src/widgets/lv_objx_templ.c +++ b/src/widgets/lv_objx_templ.c @@ -220,7 +220,7 @@ static lv_res_t lv_templ_signal(lv_obj_t * templ, lv_signal_t sign, void * param { lv_res_t res; - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ res = ancestor_signal(templ, sign, param); if(res != LV_RES_OK) return res; if(sign == LV_SIGNAL_GET_TYPE) return lv_obj_handle_get_type_signal(param, MY_CLASS); diff --git a/src/widgets/lv_roller.c b/src/widgets/lv_roller.c index 9b80d65e8..d34c425e4 100644 --- a/src/widgets/lv_roller.c +++ b/src/widgets/lv_roller.c @@ -149,7 +149,7 @@ void lv_roller_set_selected(lv_obj_t * obj, uint16_t sel_opt, lv_anim_enable_t a LV_ASSERT_OBJ(obj, MY_CLASS); /*Set the value even if it's the same as the current value because - *if moving to the next option with an animation which was just deleted in the PRESS signal + *if moving to the next option with an animation which was just deleted in the PRESS Call the ancestor's event handler *nothing will continue the animation.*/ lv_roller_t * roller = (lv_roller_t*)obj; @@ -317,7 +317,7 @@ static void lv_roller_event(lv_obj_t * obj, lv_event_t e) { lv_res_t res; - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; @@ -419,7 +419,7 @@ static void lv_roller_label_event(lv_obj_t * label, lv_event_t e) /*LV_EVENT_DRAW_MAIN will be called in the draw function*/ if(e != LV_EVENT_DRAW_MAIN) { - /* Include the ancient signal function */ + /* Call the ancestor's event handler */ res = lv_obj_event_base(MY_CLASS_LABEL, label, e); if(res != LV_RES_OK) return; } diff --git a/src/widgets/lv_slider.c b/src/widgets/lv_slider.c index 566b80163..20c4afca5 100644 --- a/src/widgets/lv_slider.c +++ b/src/widgets/lv_slider.c @@ -100,7 +100,7 @@ static void lv_slider_event(lv_obj_t * obj, lv_event_t e) { lv_res_t res; - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; diff --git a/src/widgets/lv_switch.c b/src/widgets/lv_switch.c index 22dbbb7af..9ce7cde86 100644 --- a/src/widgets/lv_switch.c +++ b/src/widgets/lv_switch.c @@ -90,7 +90,7 @@ static void lv_switch_event(lv_obj_t * obj, lv_event_t e) { lv_res_t res; - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; diff --git a/src/widgets/lv_table.c b/src/widgets/lv_table.c index c120e038e..1dd766f86 100644 --- a/src/widgets/lv_table.c +++ b/src/widgets/lv_table.c @@ -450,7 +450,7 @@ static void lv_table_event(lv_obj_t * obj, lv_event_t e) { lv_res_t res; - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return; diff --git a/src/widgets/lv_textarea.c b/src/widgets/lv_textarea.c index fd4da2311..dde94d407 100644 --- a/src/widgets/lv_textarea.c +++ b/src/widgets/lv_textarea.c @@ -1023,7 +1023,7 @@ static void lv_textarea_destructor(lv_obj_t * obj) static void lv_textarea_event(lv_obj_t * obj, lv_event_t e) { lv_res_t res; - /*Include the ancient signal function*/ + /*Call the ancestor's event handler*/ res = lv_obj_event_base(MY_CLASS, obj, e); if(res != LV_RES_OK) return;