chore: many trivial spelling and layout fixes (#3008)

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
This commit is contained in:
ckielstra
2022-01-17 14:10:23 +01:00
committed by GitHub
parent a9a6cb8efd
commit febafd1cc7
128 changed files with 316 additions and 335 deletions

View File

@@ -66,7 +66,7 @@ lv_res_t lv_event_send(lv_obj_t * obj, lv_event_code_t event_code, void * param)
e.stop_processing = 0;
/*Build a simple linked list from the objects used in the events
*It's important to know if an this object was deleted by a nested event
*It's important to know if this object was deleted by a nested event
*called from this `event_cb`.*/
e.prev = event_head;
event_head = &e;

View File

@@ -87,7 +87,7 @@ typedef enum {
_LV_EVENT_LAST, /** Number of default events*/
LV_EVENT_PREPROCESS = 0x80, /** This is a flag that can be set with a event so it's processed
LV_EVENT_PREPROCESS = 0x80, /** This is a flag that can be set with an event so it's processed
before the class default event processing */
} lv_event_code_t;
@@ -149,7 +149,7 @@ lv_res_t lv_event_send(struct _lv_obj_t * obj, lv_event_code_t event_code, void
* Used by the widgets internally to call the ancestor widget types's event handler
* @param class_p pointer to the class of the widget (NOT the ancestor class)
* @param e pointer to the event descriptor
* @return LV_RES_OK: the taget object was not deleted in the event; LV_RES_INV: it was deleted in the event_code
* @return LV_RES_OK: the target object was not deleted in the event; LV_RES_INV: it was deleted in the event_code
*/
lv_res_t lv_obj_event_base(const lv_obj_class_t * class_p, lv_event_t * e);
@@ -191,14 +191,14 @@ void * lv_event_get_user_data(lv_event_t * e);
/**
* Stop the event from bubbling.
* This is only valid when called in the middle of a event processing chain.
* This is only valid when called in the middle of an event processing chain.
* @param e pointer to the event descriptor
*/
void lv_event_stop_bubbling(lv_event_t * e);
/**
* Stop processing this event.
* This is only valid when called in the middle of a event processing chain.
* This is only valid when called in the middle of an event processing chain.
* @param e pointer to the event descriptor
*/
void lv_event_stop_processing(lv_event_t * e);
@@ -240,7 +240,7 @@ struct _lv_event_dsc_t * lv_obj_add_event_cb(struct _lv_obj_t * obj, lv_event_cb
/**
* Remove an event handler function for an object.
* @param obj pointer to an object
* @param event_cb the event function to remove, or `NULL` to remove the the firstly added event callback
* @param event_cb the event function to remove, or `NULL` to remove the firstly added event callback
* @return true if any event handlers were removed
*/
bool lv_obj_remove_event_cb(struct _lv_obj_t * obj, lv_event_cb_t event_cb);
@@ -256,7 +256,7 @@ bool lv_obj_remove_event_cb_with_user_data(struct _lv_obj_t * obj, lv_event_cb_t
const void * event_user_data);
/**
* DEPRACTED because doesn't work if multiple event handlers are added to an object.
* DEPRECATED because doesn't work if multiple event handlers are added to an object.
* Remove an event handler function for an object.
* @param obj pointer to an object
* @param event_dsc pointer to an event descriptor to remove (returned by ::lv_obj_add_event_cb)
@@ -265,7 +265,7 @@ bool lv_obj_remove_event_cb_with_user_data(struct _lv_obj_t * obj, lv_event_cb_t
bool lv_obj_remove_event_dsc(struct _lv_obj_t * obj, struct _lv_event_dsc_t * event_dsc);
/**
* The the user data of an event obejct event callback. Always the first match with `event_cb` will be returned.
* The user data of an event object event callback. Always the first match with `event_cb` will be returned.
* @param obj pointer to an object
* @param event_cb the event function
* @return the user_data

View File

@@ -158,8 +158,8 @@ void lv_group_swap_obj(lv_obj_t * obj1, lv_obj_t * obj2)
/*Do not add the object twice*/
lv_obj_t ** obj_i;
_LV_LL_READ(&g1->obj_ll, obj_i) {
if((*obj_i) == obj1)(*obj_i) = obj2;
else if((*obj_i) == obj2)(*obj_i) = obj1;
if((*obj_i) == obj1)(*obj_i) = obj2;
else if((*obj_i) == obj2)(*obj_i) = obj1;
}
if(*g1->obj_focus == obj1) lv_group_focus_obj(obj2);

View File

@@ -724,7 +724,7 @@ static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data)
}
/**
* Process new points from a input device. indev->state.pressed has to be set
* Process new points from an input device. indev->state.pressed has to be set
* @param indev pointer to an input device state
* @param x x coordinate of the next point
* @param y y coordinate of the next point
@@ -1058,7 +1058,7 @@ static void indev_click_focus(_lv_indev_proc_t * proc)
/**
* Handle the gesture of indev_proc_p->types.pointer.act_obj
* @param indev pointer to a input device state
* @param indev pointer to an input device state
*/
void indev_gesture(_lv_indev_proc_t * proc)
{

View File

@@ -100,7 +100,7 @@ void _lv_indev_scroll_throw_handler(_lv_indev_proc_t * proc)
lv_indev_t * indev_act = lv_indev_get_act();
lv_coord_t scroll_throw = indev_act->driver->scroll_throw;
lv_coord_t scroll_throw = indev_act->driver->scroll_throw;
if(lv_obj_has_flag(scroll_obj, LV_OBJ_FLAG_SCROLL_MOMENTUM) == false) {
proc->types.pointer.scroll_throw_vect.y = 0;
@@ -244,7 +244,7 @@ static lv_obj_t * find_scroll_obj(_lv_indev_proc_t * proc)
lv_obj_t * obj_candidate = NULL;
lv_dir_t dir_candidate = LV_DIR_NONE;
lv_indev_t * indev_act = lv_indev_get_act();
lv_coord_t scroll_limit = indev_act->driver->scroll_limit;
lv_coord_t scroll_limit = indev_act->driver->scroll_limit;
/*Go until find a scrollable object in the current direction
*More precisely:
@@ -299,14 +299,14 @@ static lv_obj_t * find_scroll_obj(_lv_indev_proc_t * proc)
*is propagated to this object it can show at least elastic scroll effect.
*But if not hor/ver scrollable do not scroll it at all (so it's not a good candidate)*/
if((st > 0 || sb > 0) &&
((up_en && proc->types.pointer.scroll_sum.y >= scroll_limit) ||
((up_en && proc->types.pointer.scroll_sum.y >= scroll_limit) ||
(down_en && proc->types.pointer.scroll_sum.y <= - scroll_limit))) {
obj_candidate = obj_act;
dir_candidate = LV_DIR_VER;
}
if((sl > 0 || sr > 0) &&
((left_en && proc->types.pointer.scroll_sum.x >= scroll_limit) ||
((left_en && proc->types.pointer.scroll_sum.x >= scroll_limit) ||
(right_en && proc->types.pointer.scroll_sum.x <= - scroll_limit))) {
obj_candidate = obj_act;
dir_candidate = LV_DIR_HOR;
@@ -541,11 +541,11 @@ static void scroll_limit_diff(_lv_indev_proc_t * proc, lv_coord_t * diff_x, lv_c
static lv_coord_t scroll_throw_predict_y(_lv_indev_proc_t * proc)
{
lv_coord_t y = proc->types.pointer.scroll_throw_vect.y;
lv_coord_t y = proc->types.pointer.scroll_throw_vect.y;
lv_coord_t move = 0;
lv_indev_t * indev_act = lv_indev_get_act();
lv_coord_t scroll_throw = indev_act->driver->scroll_throw;
lv_coord_t scroll_throw = indev_act->driver->scroll_throw;
while(y) {
move += y;
@@ -557,11 +557,11 @@ static lv_coord_t scroll_throw_predict_y(_lv_indev_proc_t * proc)
static lv_coord_t scroll_throw_predict_x(_lv_indev_proc_t * proc)
{
lv_coord_t x = proc->types.pointer.scroll_throw_vect.x;
lv_coord_t x = proc->types.pointer.scroll_throw_vect.x;
lv_coord_t move = 0;
lv_indev_t * indev_act = lv_indev_get_act();
lv_coord_t scroll_throw = indev_act->driver->scroll_throw;
lv_coord_t scroll_throw = indev_act->driver->scroll_throw;
while(x) {
move += x;

View File

@@ -63,12 +63,12 @@ void lv_obj_init_draw_rect_dsc(lv_obj_t * obj, uint32_t part, lv_draw_rect_dsc_t
lv_memcpy(&draw_dsc->bg_grad, grad, sizeof(*grad));
}
else {
draw_dsc->bg_grad.dir = lv_obj_get_style_bg_grad_dir(obj, part);
draw_dsc->bg_grad.dir = lv_obj_get_style_bg_grad_dir(obj, part);
if(draw_dsc->bg_grad.dir != LV_GRAD_DIR_NONE) {
draw_dsc->bg_grad.stops[0].color = lv_obj_get_style_bg_color_filtered(obj, part);
draw_dsc->bg_grad.stops[1].color = lv_obj_get_style_bg_grad_color_filtered(obj, part);
draw_dsc->bg_grad.stops[0].frac = lv_obj_get_style_bg_main_stop(obj, part);
draw_dsc->bg_grad.stops[1].frac = lv_obj_get_style_bg_grad_stop(obj, part);
draw_dsc->bg_grad.stops[0].frac = lv_obj_get_style_bg_main_stop(obj, part);
draw_dsc->bg_grad.stops[1].frac = lv_obj_get_style_bg_grad_stop(obj, part);
}
draw_dsc->bg_grad.dither = lv_obj_get_style_bg_dither_mode(obj, part);
}

View File

@@ -202,7 +202,7 @@ bool lv_obj_refr_size(lv_obj_t * obj)
lv_obj_readjust_scroll(obj, LV_ANIM_OFF);
/*If the object was out of the parent invalidate the new scrollbar area too.
*If it wasn't out of the parent but out now, also invalidate the srollbars*/
*If it wasn't out of the parent but out now, also invalidate the scrollbars*/
bool on2 = _lv_area_is_in(&obj->coords, &parent_fit_area, 0);
if(on1 || (!on1 && on2)) lv_obj_scrollbar_invalidate(parent);
@@ -579,7 +579,7 @@ lv_coord_t lv_obj_get_content_height(const lv_obj_t * obj)
LV_ASSERT_OBJ(obj, MY_CLASS);
lv_coord_t top = lv_obj_get_style_pad_top(obj, LV_PART_MAIN);
lv_coord_t bottom = lv_obj_get_style_pad_bottom(obj, LV_PART_MAIN);
lv_coord_t bottom = lv_obj_get_style_pad_bottom(obj, LV_PART_MAIN);
lv_coord_t border_width = lv_obj_get_style_border_width(obj, LV_PART_MAIN);
return lv_obj_get_height(obj) - top - bottom - 2 * border_width;

View File

@@ -35,7 +35,7 @@ typedef struct {
**********************/
/**
* Set the the position of an object relative to the set alignment.
* Set the position of an object relative to the set alignment.
* @param obj pointer to an object
* @param x new x coordinate
* @param y new y coordinate
@@ -47,7 +47,7 @@ typedef struct {
void lv_obj_set_pos(struct _lv_obj_t * obj, lv_coord_t x, lv_coord_t y);
/**
* Set the x coordinate of a object
* Set the x coordinate of an object
* @param obj pointer to an object
* @param x new x coordinate
* @note With default alignment it's the distance from the top left corner
@@ -58,7 +58,7 @@ void lv_obj_set_pos(struct _lv_obj_t * obj, lv_coord_t x, lv_coord_t y);
void lv_obj_set_x(struct _lv_obj_t * obj, lv_coord_t x);
/**
* Set the y coordinate of a object
* Set the y coordinate of an object
* @param obj pointer to an object
* @param y new y coordinate
* @note With default alignment it's the distance from the top left corner
@@ -153,7 +153,7 @@ void lv_obj_mark_layout_as_dirty(struct _lv_obj_t * obj);
void lv_obj_update_layout(const struct _lv_obj_t * obj);
/**
* Regsiter a new layout
* Register a new layout
* @param cb the layout update callback
* @param user_data custom data that will be passed to `cb`
* @return the ID of the new layout

View File

@@ -269,7 +269,7 @@ lv_res_t lv_obj_get_local_style_prop(lv_obj_t * obj, lv_style_prop_t prop, lv_st
uint32_t i;
for(i = 0; i < obj->style_cnt; i++) {
if(obj->styles[i].is_local &&
obj->styles[i].selector == selector) {
obj->styles[i].selector == selector) {
return lv_style_get_prop(obj->styles[i].style, prop, value);
}
}

View File

@@ -214,13 +214,13 @@ static inline void lv_obj_set_style_pad_ver(struct _lv_obj_t * obj, lv_coord_t v
lv_obj_set_style_pad_bottom(obj, value, selector);
}
static inline void lv_obj_set_style_pad_gap(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
static inline void lv_obj_set_style_pad_gap(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
{
lv_obj_set_style_pad_row(obj, value, selector);
lv_obj_set_style_pad_column(obj, value, selector);
}
static inline void lv_obj_set_style_size(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
static inline void lv_obj_set_style_size(struct _lv_obj_t * obj, lv_coord_t value, lv_style_selector_t selector)
{
lv_obj_set_style_width(obj, value, selector);
lv_obj_set_style_height(obj, value, selector);

View File

@@ -48,7 +48,7 @@ typedef struct _lv_draw_ctx_t {
void * buf;
/**
* The the position and size of `buf` (absolute coordinates)
* The position and size of `buf` (absolute coordinates)
*/
lv_area_t * buf_area;
@@ -86,7 +86,7 @@ typedef struct _lv_draw_ctx_t {
void (*draw_bg)(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * draw_dsc, const lv_area_t * coords);
/**
* Wait until all background operation are finished. (E.g. GPU opertions)
* Wait until all background operations are finished. (E.g. GPU operations)
*/
void (*wait_for_finish)(struct _lv_draw_ctx_t * draw);

View File

@@ -111,7 +111,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_label(lv_draw_ctx_t * draw_ctx, const lv_draw
w = lv_area_get_width(coords);
}
else {
/*If EXAPND is enabled then not limit the text's width to the object's width*/
/*If EXPAND is enabled then not limit the text's width to the object's width*/
lv_point_t p;
lv_txt_get_size(&p, txt, dsc->font, dsc->letter_space, dsc->line_space, LV_COORD_MAX,
dsc->flag);

View File

@@ -259,10 +259,10 @@ bool lv_draw_mask_is_any(const lv_area_t * a)
uint8_t i;
for(i = 0; i < _LV_MASK_MAX_NUM; i++) {
_lv_draw_mask_common_dsc_t * comm_param = LV_GC_ROOT(_lv_draw_mask_list[i]).param;
_lv_draw_mask_common_dsc_t * comm_param = LV_GC_ROOT(_lv_draw_mask_list[i]).param;
if(comm_param == NULL) continue;
if(comm_param->type == LV_DRAW_MASK_TYPE_RADIUS) {
lv_draw_mask_radius_param_t * radius_param = LV_GC_ROOT(_lv_draw_mask_list[i]).param;
lv_draw_mask_radius_param_t * radius_param = LV_GC_ROOT(_lv_draw_mask_list[i]).param;
if(radius_param->cfg.outer) {
if(!_lv_area_is_out(a, &radius_param->cfg.rect, radius_param->cfg.radius)) return true;
}
@@ -1077,7 +1077,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_radius(lv_opa_t * m
(abs_y >= rect.y1 + radius && abs_y <= rect.y2 - radius)) {
if(outer == false) {
/*Remove the edges*/
int32_t last = rect.x1 - abs_x;
int32_t last = rect.x1 - abs_x;
if(last > len) return LV_DRAW_MASK_RES_TRANSP;
if(last >= 0) {
lv_memset_00(&mask_buf[0], last);
@@ -1095,7 +1095,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_draw_mask_res_t lv_draw_mask_radius(lv_opa_t * m
int32_t first = rect.x1 - abs_x;
if(first < 0) first = 0;
if(first <= len) {
int32_t last = rect.x2 - abs_x - first + 1;
int32_t last = rect.x2 - abs_x - first + 1;
if(first + last > len) last = len - first;
if(last >= 0) {
lv_memset_00(&mask_buf[first], last);
@@ -1380,10 +1380,10 @@ static void circ_calc_aa4(_lv_draw_mask_radius_circle_dsc_t * c, lv_coord_t radi
/*Special case, handle manually*/
if(radius == 1) {
c->cir_opa[0] = 180;
c->opa_start_on_y[0] = 0;
c->opa_start_on_y[1] = 1;
c->x_start_on_y[0] = 0;
c->cir_opa[0] = 180;
c->opa_start_on_y[0] = 0;
c->opa_start_on_y[1] = 1;
c->x_start_on_y[0] = 0;
return;
}

View File

@@ -667,7 +667,7 @@ bool _lv_img_buf_transform_anti_alias(lv_img_transform_dsc_t * dsc)
xr = xs_fract + 0x80;
}
else if(xs_fract > 0x90) {
xn = 1;
xn = 1;
if(dsc->tmp.xs_int + xn >= dsc->cfg.src_w) xn = 0;
xr = (0xFF - xs_fract) + 0x80;
}
@@ -686,7 +686,7 @@ bool _lv_img_buf_transform_anti_alias(lv_img_transform_dsc_t * dsc)
yr = ys_fract + 0x80;
}
else if(ys_fract > 0x90) {
yn = 1;
yn = 1;
if(dsc->tmp.ys_int + yn >= dsc->cfg.src_h) yn = 0;
yr = (0xFF - ys_fract) + 0x80;

View File

@@ -51,8 +51,7 @@ void lv_draw_sw_arc(lv_draw_ctx_t * draw_ctx, const lv_draw_arc_dsc_t * dsc, con
void lv_draw_sw_rect(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, const lv_area_t * coords);
void lv_draw_sw_bg(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc, const lv_area_t * coords);
void lv_draw_sw_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc, const lv_point_t * pos_p,
void lv_draw_sw_letter(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_t * dsc, const lv_point_t * pos_p,
uint32_t letter);
LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img_decoded(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_img_dsc_t * draw_dsc,

View File

@@ -147,7 +147,7 @@ void lv_draw_sw_arc(lv_draw_ctx_t * draw_ctx, const lv_draw_arc_dsc_t * dsc, con
q_dsc.start_quarter = (start_angle / 90) & 0x3;
q_dsc.end_quarter = (end_angle / 90) & 0x3;
q_dsc.width = width;
q_dsc.draw_dsc = &cir_dsc;
q_dsc.draw_dsc = &cir_dsc;
q_dsc.draw_area = &area_out;
q_dsc.draw_ctx = draw_ctx;

View File

@@ -411,7 +411,7 @@ static void fill_blended(lv_color_t * dest_buf, const lv_area_t * dest_area,
lv_opa_t last_mask = LV_OPA_TRANSP;
last_dest_color = dest_buf[0];
lv_opa_t opa_tmp = mask[0] >= LV_OPA_MAX ? opa : (uint32_t)((uint32_t)mask[0] * opa) >> 8;
last_res_color = blend_fp(color, last_dest_color, opa_tmp);
last_res_color = blend_fp(color, last_dest_color, opa_tmp);
for(y = 0; y < h; y++) {
for(x = 0; x < w; x++) {

View File

@@ -109,11 +109,11 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img_decoded(struct _lv_draw_ctx_t * draw_c
mask_buf[px_i] = px_opa;
if(px_opa) {
#if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1
src_buf_rgb[px_i].full = map_px[0];
src_buf_rgb[px_i].full = map_px[0];
#elif LV_COLOR_DEPTH == 16
src_buf_rgb[px_i].full = map_px[0] + (map_px[1] << 8);
src_buf_rgb[px_i].full = map_px[0] + (map_px[1] << 8);
#elif LV_COLOR_DEPTH == 32
src_buf_rgb[px_i].full = *((uint32_t *)map_px);
src_buf_rgb[px_i].full = *((uint32_t *)map_px);
#endif
}
#if LV_COLOR_DEPTH == 32
@@ -243,11 +243,11 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img_decoded(struct _lv_draw_ctx_t * draw_c
#if LV_COLOR_DEPTH == 1
c.full = map_px[0];
#elif LV_COLOR_DEPTH == 8
c.full = map_px[0];
c.full = map_px[0];
#elif LV_COLOR_DEPTH == 16
c.full = map_px[0] + (map_px[1] << 8);
c.full = map_px[0] + (map_px[1] << 8);
#elif LV_COLOR_DEPTH == 32
c.full = *((uint32_t *)map_px);
c.full = *((uint32_t *)map_px);
c.ch.alpha = 0xFF;
#endif
if(cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {

View File

@@ -470,7 +470,7 @@ static void draw_letter_subpx(lv_draw_ctx_t * draw_ctx, const lv_draw_label_dsc_
#endif
#if LV_COLOR_DEPTH == 32
res_color.ch.alpha = 0xff;
res_color.ch.alpha = 0xff;
#endif
if(font_rgb[0] == 0 && font_rgb[1] == 0 && font_rgb[2] == 0) mask_buf[mask_p] = LV_OPA_TRANSP;

View File

@@ -1,5 +1,5 @@
/**
* @file lv_draw_polygon.c
* @file lv_draw_sw_polygon.c
*
*/
@@ -154,9 +154,9 @@ void lv_draw_sw_polygon(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dra
if(i_next_right < 0) i_next_right = point_cnt + i_next_right;
}
if(p[i_next_left].y >= p[i_prev_left].y) {
if(p[i_next_left].y >= p[i_prev_left].y) {
if(p[i_next_left].y != p[i_prev_left].y &&
p[i_next_left].x != p[i_prev_left].x) {
p[i_next_left].x != p[i_prev_left].x) {
lv_draw_mask_line_points_init(mp_next, p[i_prev_left].x, p[i_prev_left].y,
p[i_next_left].x, p[i_next_left].y,
LV_DRAW_MASK_LINE_SIDE_RIGHT);
@@ -169,9 +169,9 @@ void lv_draw_sw_polygon(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dra
if(mask_cnt == point_cnt) break;
if(p[i_next_right].y >= p[i_prev_right].y) {
if(p[i_next_right].y >= p[i_prev_right].y) {
if(p[i_next_right].y != p[i_prev_right].y &&
p[i_next_right].x != p[i_prev_right].x) {
p[i_next_right].x != p[i_prev_right].x) {
lv_draw_mask_line_points_init(mp_next, p[i_prev_right].x, p[i_prev_right].y,
p[i_next_right].x, p[i_next_right].y,

View File

@@ -37,7 +37,7 @@ static void draw_outline(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * ds
#if LV_DRAW_COMPLEX
LV_ATTRIBUTE_FAST_MEM static void draw_shadow(lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * dsc,
const lv_area_t * coords);
LV_ATTRIBUTE_FAST_MEM static void shadow_draw_corner_buf(const lv_area_t * coords, uint16_t * sh_buf, lv_coord_t s,
LV_ATTRIBUTE_FAST_MEM static void shadow_draw_corner_buf(const lv_area_t * coords, uint16_t * sh_buf, lv_coord_t s,
lv_coord_t r);
LV_ATTRIBUTE_FAST_MEM static void shadow_blur_corner(lv_coord_t size, lv_coord_t sw, uint16_t * sh_ups_buf);
#endif

View File

@@ -22,7 +22,7 @@ Here some ideas as inspiration feel free to contribute with ideas too.
- Ruler, horizontal or vertical with major and minor ticks and labels
- New [List items types](https://github.com/lvgl/lvgl/tree/master/src/extra/widgets/list)
- [Preloaders](https://www.google.com/search?q=preloader&sxsrf=ALeKk01ddA4YB0WEgLLN1bZNSm8YER7pkg:1623080551559&source=lnms&tbm=isch&sa=X&ved=2ahUKEwiwoN6d7oXxAhVuw4sKHVedBB4Q_AUoAXoECAEQAw&biw=952&bih=940)
- Drop-down list with a container to which an content can be added
- Drop-down list with a container to which content can be added
- 9 patch button: Similar to [lv_imgbtn](https://docs.lvgl.io/8.0/widgets/extra/imgbtn.html) but 9 images for 4 corner, 4 sides and the center
## Contributors

View File

@@ -274,7 +274,7 @@ static void flex_update(lv_obj_t * cont, void * user_data)
place_content(track_cross_place, max_cross_size, total_track_cross_size, track_cnt, cross_pos, &gap);
}
track_first_item = f.rev ? cont->spec_attr->child_cnt - 1 : 0;
track_first_item = f.rev ? cont->spec_attr->child_cnt - 1 : 0;
if(rtl && !f.row) {
*cross_pos += total_track_cross_size;

View File

@@ -420,7 +420,7 @@ static void calc(lv_obj_t * cont, _lv_grid_calc_t * calc_out)
/**
* Free the a grid calculation's data
* @param calc pointer to the calculated gtrid cell coordinates
* @param calc pointer to the calculated grid cell coordinates
*/
static void calc_free(_lv_grid_calc_t * calc)
{

View File

@@ -82,7 +82,7 @@ void lv_calendar_set_today_date(lv_obj_t * obj, uint32_t year, uint32_t month, u
void lv_calendar_set_showed_date(lv_obj_t * obj, uint32_t year, uint32_t month);
/**
* Set the the highlighted dates
* Set the highlighted dates
* @param obj pointer to a calendar object
* @param highlighted pointer to an `lv_calendar_date_t` array containing the dates.
* Only the pointer will be saved so this variable can't be local which will be destroyed later.
@@ -126,7 +126,7 @@ const lv_calendar_date_t * lv_calendar_get_today_date(const lv_obj_t * calendar)
const lv_calendar_date_t * lv_calendar_get_showed_date(const lv_obj_t * calendar);
/**
* Get the the highlighted dates
* Get the highlighted dates
* @param calendar pointer to a calendar object
* @return pointer to an `lv_calendar_date_t` array containing the dates.
*/

View File

@@ -330,7 +330,7 @@ lv_chart_cursor_t * lv_chart_add_cursor(lv_obj_t * obj, lv_color_t color, lv_di
* Set the coordinate of the cursor with respect to the paddings
* @param obj pointer to a chart object
* @param cursor pointer to the cursor
* @param pos the new coordinate of cursor relative the the chart
* @param pos the new coordinate of cursor relative to the chart
*/
void lv_chart_set_cursor_pos(lv_obj_t * chart, lv_chart_cursor_t * cursor, lv_point_t * pos);

View File

@@ -141,7 +141,7 @@ static inline const char ** lv_keyboard_get_map_array(const lv_obj_t * kb)
/**
* Get the index of the lastly "activated" button by the user (pressed, released, focused etc)
* Useful in the the `event_cb` to get the text of the button, check if hidden etc.
* Useful in the `event_cb` to get the text of the button, check if hidden etc.
* @param obj pointer to button matrix object
* @return index of the last released button (LV_BTNMATRIX_BTN_NONE: if unset)
*/

View File

@@ -66,7 +66,7 @@ lv_obj_t * lv_led_create(lv_obj_t * parent)
/**
* Set the color of the LED
* @param led pointer to a LED object
* @param color the color of the the LED
* @param color the color of the LED
*/
void lv_led_set_color(lv_obj_t * obj, lv_color_t color)
{

View File

@@ -66,7 +66,7 @@ lv_obj_t * lv_led_create(lv_obj_t * parent);
/**
* Set the color of the LED
* @param led pointer to a LED object
* @param color the color of the the LED
* @param color the color of the LED
*/
void lv_led_set_color(lv_obj_t * led, lv_color_t color);

View File

@@ -724,7 +724,7 @@ static void lv_menu_back_event_cb(lv_event_t * e)
static void lv_menu_value_changed_event_cb(lv_event_t * e)
{
lv_obj_t * obj = lv_event_get_user_data(e);
lv_obj_t * obj = lv_event_get_user_data(e);
lv_menu_t * menu = (lv_menu_t *)obj;
lv_menu_page_t * main_page = (lv_menu_page_t *)lv_menu_get_cur_main_page(obj);

View File

@@ -209,7 +209,7 @@ lv_obj_t * lv_menu_get_sidebar_header(lv_obj_t * obj);
lv_obj_t * lv_menu_get_sidebar_header_back_btn(lv_obj_t * obj);
/**
* Check if a obj is a root back btn
* Check if an obj is a root back btn
* @param menu pointer to the menu
* @return true if it is a root back btn
*/

View File

@@ -830,7 +830,7 @@
#endif
#endif
/*Complier prefix for a big array declaration in RAM*/
/*Compiler prefix for a big array declaration in RAM*/
#ifndef LV_ATTRIBUTE_LARGE_RAM_ARRAY
#ifdef CONFIG_LV_ATTRIBUTE_LARGE_RAM_ARRAY
#define LV_ATTRIBUTE_LARGE_RAM_ARRAY CONFIG_LV_ATTRIBUTE_LARGE_RAM_ARRAY
@@ -1053,7 +1053,7 @@
#ifdef CONFIG_LV_FONT_DEJAVU_16_PERSIAN_HEBREW
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW CONFIG_LV_FONT_DEJAVU_16_PERSIAN_HEBREW
#else
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, Perisan letters and all their forms*/
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, Persian letters and all their forms*/
#endif
#endif
#ifndef LV_FONT_SIMSUN_16_CJK
@@ -2134,7 +2134,7 @@ LV_EXPORT_CONST_INT(LV_DPI_DEF);
#undef _LV_KCONFIG_PRESENT
/*Set some defines if a dependecy is disabled*/
/*Set some defines if a dependency is disabled*/
#if LV_USE_LOG == 0
#define LV_LOG_LEVEL LV_LOG_LEVEL_NONE
#define LV_LOG_TRACE_MEM 0

View File

@@ -205,7 +205,7 @@ static inline void lv_anim_set_start_cb(lv_anim_t * a, lv_anim_start_cb_t start_
/**
* Set a function to use the current value of the variable and make start and end value
* relative the the returned current value.
* relative to the returned current value.
* @param a pointer to an initialized `lv_anim_t` variable
* @param get_value_cb a function call when the animation starts
*/

View File

@@ -32,7 +32,7 @@ typedef struct _lv_anim_timeline_t lv_anim_timeline_t;
**********************/
/**
* Create a animation timeline.
* Create an animation timeline.
* @return pointer to the animation timeline.
*/
lv_anim_timeline_t * lv_anim_timeline_create(void);

View File

@@ -746,7 +746,7 @@ static uint32_t lv_txt_utf8_get_length(const char * txt)
#elif LV_TXT_ENC == LV_TXT_ENC_ASCII
/*******************************
* ASCII ENCODER/DECOER
* ASCII ENCODER/DECODER
******************************/
/**

View File

@@ -84,8 +84,8 @@ void lv_arc_set_start_angle(lv_obj_t * obj, uint16_t start)
if(start > 360) start -= 360;
int16_t old_delta = arc->indic_angle_end - arc->indic_angle_start;
int16_t new_delta = arc->indic_angle_end - start;
int16_t old_delta = arc->indic_angle_end - arc->indic_angle_start;
int16_t new_delta = arc->indic_angle_end - start;
if(old_delta < 0) old_delta = 360 + old_delta;
if(new_delta < 0) new_delta = 360 + new_delta;
@@ -103,8 +103,8 @@ void lv_arc_set_end_angle(lv_obj_t * obj, uint16_t end)
lv_arc_t * arc = (lv_arc_t *)obj;
if(end > 360) end -= 360;
int16_t old_delta = arc->indic_angle_end - arc->indic_angle_start;
int16_t new_delta = end - arc->indic_angle_start;
int16_t old_delta = arc->indic_angle_end - arc->indic_angle_start;
int16_t new_delta = end - arc->indic_angle_start;
if(old_delta < 0) old_delta = 360 + old_delta;
if(new_delta < 0) new_delta = 360 + new_delta;
@@ -129,8 +129,8 @@ void lv_arc_set_bg_start_angle(lv_obj_t * obj, uint16_t start)
if(start > 360) start -= 360;
int16_t old_delta = arc->bg_angle_end - arc->bg_angle_start;
int16_t new_delta = arc->bg_angle_end - start;
int16_t old_delta = arc->bg_angle_end - arc->bg_angle_start;
int16_t new_delta = arc->bg_angle_end - start;
if(old_delta < 0) old_delta = 360 + old_delta;
if(new_delta < 0) new_delta = 360 + new_delta;
@@ -151,8 +151,8 @@ void lv_arc_set_bg_end_angle(lv_obj_t * obj, uint16_t end)
if(end > 360) end -= 360;
int16_t old_delta = arc->bg_angle_end - arc->bg_angle_start;
int16_t new_delta = end - arc->bg_angle_start;
int16_t old_delta = arc->bg_angle_end - arc->bg_angle_start;
int16_t new_delta = end - arc->bg_angle_start;
if(old_delta < 0) old_delta = 360 + old_delta;
if(new_delta < 0) new_delta = 360 + new_delta;
@@ -372,13 +372,13 @@ static void lv_arc_event(const lv_obj_class_t * class_p, lv_event_t * e)
lv_coord_t r;
get_center(obj, &center, &r);
p.x -= center.x;
p.y -= center.y;
p.x -= center.x;
p.y -= center.y;
/*Enter dragging mode if pressed out of the knob*/
if(arc->dragging == false) {
lv_coord_t indic_width = lv_obj_get_style_arc_width(obj, LV_PART_INDICATOR);
r -= indic_width;
r -= indic_width;
/*Add some more sensitive area if there is no advanced git testing.
* (Advanced hit testing is more precise)*/
if(lv_obj_has_flag(obj, LV_OBJ_FLAG_ADV_HITTEST)) {

View File

@@ -584,7 +584,7 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e)
}
else if(c == LV_KEY_DOWN) {
lv_coord_t col_gap = lv_obj_get_style_pad_column(obj, LV_PART_MAIN);
/*Find the area below the the current*/
/*Find the area below the current*/
if(btnm->btn_id_sel == LV_BTNMATRIX_BTN_NONE) {
btnm->btn_id_sel = 0;
while(button_is_hidden(btnm->ctrl_bits[btnm->btn_id_sel]) || button_is_inactive(btnm->ctrl_bits[btnm->btn_id_sel])) {
@@ -612,7 +612,7 @@ static void lv_btnmatrix_event(const lv_obj_class_t * class_p, lv_event_t * e)
}
else if(c == LV_KEY_UP) {
lv_coord_t col_gap = lv_obj_get_style_pad_column(obj, LV_PART_MAIN);
/*Find the area below the the current*/
/*Find the area below the current*/
if(btnm->btn_id_sel == LV_BTNMATRIX_BTN_NONE) {
btnm->btn_id_sel = 0;
while(button_is_hidden(btnm->ctrl_bits[btnm->btn_id_sel]) || button_is_inactive(btnm->ctrl_bits[btnm->btn_id_sel])) {

View File

@@ -182,7 +182,7 @@ const char ** lv_btnmatrix_get_map(const lv_obj_t * obj);
/**
* Get the index of the lastly "activated" button by the user (pressed, released, focused etc)
* Useful in the the `event_cb` to get the text of the button, check if hidden etc.
* Useful in the `event_cb` to get the text of the button, check if hidden etc.
* @param obj pointer to button matrix object
* @return index of the last released button (LV_BTNMATRIX_BTN_NONE: if unset)
*/

View File

@@ -701,7 +701,7 @@ static void lv_dropdown_event(const lv_obj_class_t * class_p, lv_event_t * e)
}
else if(c == LV_KEY_ENTER) {
/* Handle the ENTER key only if it was send by an other object.
* Do no process it if ENTER is sent by the dropdown becasue it's handled in LV_EVENT_RELEASED */
* Do no process it if ENTER is sent by the dropdown because it's handled in LV_EVENT_RELEASED */
lv_obj_t * indev_obj = lv_indev_get_obj_act();
if(indev_obj != obj) {
res = btn_release_handler(obj);
@@ -947,7 +947,7 @@ static void draw_box_label(lv_obj_t * dropdown_obj, lv_draw_ctx_t * draw_ctx, ui
lv_state_t state_orig = list_obj->state;
if(state != list_obj->state) {
list_obj->state = state;
list_obj->state = state;
list_obj->skip_trans = 1;
}

View File

@@ -40,7 +40,7 @@ typedef struct {
lv_obj_t * list; /**< The dropped down list*/
const char * text; /**< Text to display on the dropdown's button*/
const void * symbol; /**< Arrow or other icon when the drop-down list is closed*/
char * options; /**< Options in a a '\n' separated list*/
char * options; /**< Options in a '\n' separated list*/
uint16_t option_cnt; /**< Number of options*/
uint16_t sel_opt_id; /**< Index of the currently selected option*/
uint16_t sel_opt_id_orig; /**< Store the original index on focus*/
@@ -76,7 +76,7 @@ lv_obj_t * lv_dropdown_create(lv_obj_t * parent);
/**
* Set text of the drop-down list's button.
* If set to `NULL` the selected option's text will be displayed on the button.
* If set to a specific text then that text will be shown regardless the selected option.
* If set to a specific text then that text will be shown regardless of the selected option.
* @param obj pointer to a drop-down list object
* @param txt the text as a string (Only its pointer is saved)
*/
@@ -107,7 +107,7 @@ void lv_dropdown_set_options_static(lv_obj_t * obj, const char * options);
void lv_dropdown_add_option(lv_obj_t * obj, const char * option, uint32_t pos);
/**
* Clear all options in a drop-down list. Works with both static and dynamic optins.
* Clear all options in a drop-down list. Works with both static and dynamic options.
* @param obj pointer to drop-down list object
*/
void lv_dropdown_clear_options(lv_obj_t * obj);
@@ -127,7 +127,7 @@ void lv_dropdown_set_selected(lv_obj_t * obj, uint16_t sel_opt);
void lv_dropdown_set_dir(lv_obj_t * obj, lv_dir_t dir);
/**
* Set an arrow or other symbol to display when on drop-down list's button. Typically a down caret or arrow.
* Set an arrow or other symbol to display when on drop-down list's button. Typically a down caret or arrow.
* @param obj pointer to drop-down list object
* @param symbol a text like `LV_SYMBOL_DOWN`, an image (pointer or path) or NULL to not draw symbol icon
* @note angle and zoom transformation can be applied if the symbol is an image.

View File

@@ -60,7 +60,7 @@ enum {
/** If the object size is set to SIZE_CONTENT, then object size equals zoomed image size.
* It causes layout recalculation.
* If the object size is set explicitly the the image will be cropped if zoomed in.*/
* If the object size is set explicitly, the image will be cropped when zoomed in.*/
LV_IMG_SIZE_MODE_REAL,
};
@@ -82,7 +82,7 @@ lv_obj_t * lv_img_create(lv_obj_t * parent);
*====================*/
/**
* Set the image data to display on the the object
* Set the image data to display on the object
* @param obj pointer to an image object
* @param src_img 1) pointer to an ::lv_img_dsc_t descriptor (converted by LVGL's image converter) (e.g. &my_img) or
* 2) path to an image file (e.g. "S:/dir/img.bin")or

View File

@@ -355,7 +355,7 @@ void lv_label_get_letter_pos(const lv_obj_t * obj, uint32_t char_id, lv_point_t
/*Handle Bidi*/
if(new_line_start == byte_id) {
visual_byte_pos = base_dir == LV_BASE_DIR_RTL ? 0 : byte_id - line_start;
bidi_txt = &txt[line_start];
bidi_txt = &txt[line_start];
}
else {
uint32_t line_char_id = _lv_txt_encoded_get_char_id(&txt[line_start], byte_id - line_start);

View File

@@ -325,7 +325,7 @@ static void lv_roller_event(const lv_obj_class_t * class_p, lv_event_t * e)
if(code == LV_EVENT_GET_SELF_SIZE) {
lv_point_t * p = lv_event_get_param(e);
p->x = get_selected_label_width(obj);
p->x = get_selected_label_width(obj);
}
else if(code == LV_EVENT_STYLE_CHANGED) {
lv_obj_t * label = get_label(obj);

View File

@@ -809,7 +809,7 @@ static void lv_textarea_constructor(const lv_obj_class_t * class_p, lv_obj_t * o
ta->accepted_chars = NULL;
ta->max_length = 0;
ta->cursor.show = 1;
/*It will be set to zero later (with zero value lv_textarea_set_cursor_pos(obj, 0); woldn't do anything as there is no difference)*/
/*It will be set to zero later (with zero value lv_textarea_set_cursor_pos(obj, 0); wouldn't do anything as there is no difference)*/
ta->cursor.pos = 1;
ta->cursor.click_pos = 1;
ta->cursor.valid_x = 0;