mirror of
https://github.com/lvgl/lvgl.git
synced 2024-11-27 03:33:48 +08:00
style(comment): remove the word signal from the comments
This commit is contained in:
parent
bf2deded51
commit
c1f8a844bc
@ -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 <stdint.h>
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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*/
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user