1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

fix incosistent function parameter names. See #681

This commit is contained in:
Gabor Kiss-Vamosi 2019-01-01 01:32:16 +01:00
parent bf43316942
commit 639edca434
8 changed files with 38 additions and 31 deletions

View File

@ -1609,7 +1609,7 @@ bool lv_obj_get_drag_parent(const lv_obj_t * obj)
/** /**
* Get the opa scale enable parameter * Get the opa scale enable parameter
* @param obj pointer to an object * @param obj pointer to an object
* @return true: opa scaling is enabled for this object and all children false: no opa scaling * @return true: opa scaling is enabled for this object and all children; false: no opa scaling
*/ */
lv_opa_t lv_obj_get_opa_scale_enable(const lv_obj_t * obj) lv_opa_t lv_obj_get_opa_scale_enable(const lv_obj_t * obj)
{ {

View File

@ -726,6 +726,14 @@ bool lv_obj_get_drag_throw(const lv_obj_t * obj);
*/ */
bool lv_obj_get_drag_parent(const lv_obj_t * obj); bool lv_obj_get_drag_parent(const lv_obj_t * obj);
/**
* Get the opa scale enable parameter
* @param obj pointer to an object
* @return true: opa scaling is enabled for this object and all children; false: no opa scaling
*/
lv_opa_t lv_obj_get_opa_scale_enable(const lv_obj_t * obj);
/** /**
* Get the opa scale parameter of an object * Get the opa scale parameter of an object
* @param obj pointer to an object * @param obj pointer to an object

View File

@ -174,7 +174,7 @@ void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv
**********************/ **********************/
static void line_draw_hor(line_draw_t * line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale)
{ {
lv_coord_t width = style->line.width - 1; lv_coord_t width = style->line.width - 1;
lv_coord_t width_half = width >> 1; lv_coord_t width_half = width >> 1;
@ -182,10 +182,10 @@ static void line_draw_hor(line_draw_t * line, const lv_area_t * mask, const lv_s
lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t) style->line.opa * opa_scale) >> 8; lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t) style->line.opa * opa_scale) >> 8;
lv_area_t act_area; lv_area_t act_area;
act_area.x1 = line->p1.x; act_area.x1 = main_line->p1.x;
act_area.x2 = line->p2.x; act_area.x2 = main_line->p2.x;
act_area.y1 = line->p1.y - width_half - width_1; act_area.y1 = main_line->p1.y - width_half - width_1;
act_area.y2 = line->p2.y + width_half ; act_area.y2 = main_line->p2.y + width_half ;
lv_area_t draw_area; lv_area_t draw_area;
draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2); draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2);
@ -195,7 +195,7 @@ static void line_draw_hor(line_draw_t * line, const lv_area_t * mask, const lv_s
fill_fp(&draw_area, mask, style->line.color, opa); fill_fp(&draw_area, mask, style->line.color, opa);
} }
static void line_draw_ver(line_draw_t * line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale) static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale)
{ {
lv_coord_t width = style->line.width - 1; lv_coord_t width = style->line.width - 1;
lv_coord_t width_half = width >> 1; lv_coord_t width_half = width >> 1;
@ -204,10 +204,10 @@ static void line_draw_ver(line_draw_t * line, const lv_area_t * mask, const lv_s
lv_area_t act_area; lv_area_t act_area;
act_area.x1 = line->p1.x - width_half; act_area.x1 = main_line->p1.x - width_half;
act_area.x2 = line->p2.x + width_half + width_1; act_area.x2 = main_line->p2.x + width_half + width_1;
act_area.y1 = line->p1.y; act_area.y1 = main_line->p1.y;
act_area.y2 = line->p2.y; act_area.y2 = main_line->p2.y;
lv_area_t draw_area; lv_area_t draw_area;
draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2); draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2);

View File

@ -45,27 +45,27 @@ static void node_set_next(lv_ll_t * ll_p, lv_ll_node_t * act, lv_ll_node_t * nex
/** /**
* Initialize linked list * Initialize linked list
* @param ll_dsc pointer to ll_dsc variable * @param ll_dsc pointer to ll_dsc variable
* @param n_size the size of 1 node in bytes * @param node_size the size of 1 node in bytes
*/ */
void lv_ll_init(lv_ll_t * ll_p, uint32_t n_size) void lv_ll_init(lv_ll_t * ll_p, uint32_t node_size)
{ {
ll_p->head = NULL; ll_p->head = NULL;
ll_p->tail = NULL; ll_p->tail = NULL;
#ifdef LV_MEM_ENV64 #ifdef LV_MEM_ENV64
/*Round the size up to 8*/ /*Round the size up to 8*/
if(n_size & 0x7) { if(node_size & 0x7) {
n_size = n_size & (~0x7); node_size = node_size & (~0x7);
n_size += 8; node_size += 8;
} }
#else #else
/*Round the size up to 4*/ /*Round the size up to 4*/
if(n_size & 0x3) { if(node_size & 0x3) {
n_size = n_size & (~0x3); node_size = node_size & (~0x3);
n_size += 4; node_size += 4;
} }
#endif #endif
ll_p->n_size = n_size; ll_p->n_size = node_size;
} }
/** /**

View File

@ -70,14 +70,14 @@ void lv_txt_get_size(lv_point_t * size_res, const char * text, const lv_font_t *
/** /**
* Get the next line of text. Check line length and break chars too. * Get the next line of text. Check line length and break chars too.
* @param txt a '\0' terminated string * @param txt a '\0' terminated string
* @param font_p pointer to a font * @param font pointer to a font
* @param letter_space letter space * @param letter_space letter space
* @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid line breaks * @param max_width max with of the text (break the lines to fit this size) Set CORD_MAX to avoid line breaks
* @param flags settings for the text from 'txt_flag_t' enum * @param flags settings for the text from 'txt_flag_type' enum
* @return the index of the first char of the new line * @return the index of the first char of the new line (in byte index not letter index. With UTF-8 they are different)
*/ */
uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font_p, uint16_t lv_txt_get_next_line(const char * txt, const lv_font_t * font,
lv_coord_t letter_space, lv_coord_t max_l, lv_txt_flag_t flag); lv_coord_t letter_space, lv_coord_t max_width, lv_txt_flag_t flag);
/** /**
* Give the length of a text with a given font * Give the length of a text with a given font

View File

@ -31,7 +31,7 @@
/********************** /**********************
* STATIC PROTOTYPES * STATIC PROTOTYPES
**********************/ **********************/
static bool lv_btn_design(lv_obj_t * ddlist, const lv_area_t * mask, lv_design_mode_t mode); static bool lv_btn_design(lv_obj_t * btn, const lv_area_t * mask, lv_design_mode_t mode);
static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param); static lv_res_t lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param);
#if USE_LV_ANIMATION && LV_BTN_INK_EFFECT #if USE_LV_ANIMATION && LV_BTN_INK_EFFECT

View File

@ -243,14 +243,14 @@ lv_label_align_t lv_ddlist_get_align(const lv_obj_t *ddlist);
* @param ddlist pointer to drop down list object * @param ddlist pointer to drop down list object
* @param anim_en true: use animation; false: not use animations * @param anim_en true: use animation; false: not use animations
*/ */
void lv_ddlist_open(lv_obj_t * ddlist, bool anim); void lv_ddlist_open(lv_obj_t * ddlist, bool anim_en);
/** /**
* Close (Collapse) the drop down list * Close (Collapse) the drop down list
* @param ddlist pointer to drop down list object * @param ddlist pointer to drop down list object
* @param anim true: use animation; false: not use animations * @param anim_en true: use animation; false: not use animations
*/ */
void lv_ddlist_close(lv_obj_t * ddlist, bool anim); void lv_ddlist_close(lv_obj_t * ddlist, bool anim_en);
/********************** /**********************
* MACROS * MACROS

View File

@ -32,7 +32,7 @@
/********************** /**********************
* STATIC PROTOTYPES * STATIC PROTOTYPES
**********************/ **********************/
static void lv_page_sb_refresh(lv_obj_t * main); static void lv_page_sb_refresh(lv_obj_t * page);
static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mode_t mode); static bool lv_page_design(lv_obj_t * page, const lv_area_t * mask, lv_design_mode_t mode);
static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mode_t mode); static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mode_t mode);
static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param); static lv_res_t lv_page_signal(lv_obj_t * page, lv_signal_t sign, void * param);
@ -1042,7 +1042,6 @@ static lv_res_t lv_page_scrollable_signal(lv_obj_t * scrl, lv_signal_t sign, voi
*/ */
static void lv_page_sb_refresh(lv_obj_t * page) static void lv_page_sb_refresh(lv_obj_t * page)
{ {
lv_page_ext_t * ext = lv_obj_get_ext_attr(page); lv_page_ext_t * ext = lv_obj_get_ext_attr(page);
lv_style_t * style = lv_obj_get_style(page); lv_style_t * style = lv_obj_get_style(page);
lv_obj_t * scrl = ext->scrl; lv_obj_t * scrl = ext->scrl;