mirror of
https://github.com/lvgl/lvgl.git
synced 2026-06-02 17:47:28 +08:00
use array[] instead of pointer in API function parameters where required
This commit is contained in:
@@ -114,7 +114,7 @@ enum {
|
|||||||
# define LV_COLOR_GET_B8(c) (c).ch.blue
|
# define LV_COLOR_GET_B8(c) (c).ch.blue
|
||||||
# define LV_COLOR_GET_A8(c) 0xFF
|
# define LV_COLOR_GET_A8(c) 0xFF
|
||||||
|
|
||||||
# define LV_COLOR_SET_R16(c, v) (c).ch.red = (uint8_t)((v) & 0x1F);
|
# define LV_COLOR_SET_R16(c, v) (c).ch.red = (uint8_t)(((uint8_t)(v)) & 0x1F);
|
||||||
# define LV_COLOR_SET_G16(c, v) (c).ch.green = (uint8_t)((v) & 0x3F);
|
# define LV_COLOR_SET_G16(c, v) (c).ch.green = (uint8_t)((v) & 0x3F);
|
||||||
# define LV_COLOR_SET_G16_SWAP(c, v) {(c).ch.green_h = (uint8_t)(((v) >> 3) & 0x7); (c).ch.green_l = (uint8_t)((v) & 0x7);}
|
# define LV_COLOR_SET_G16_SWAP(c, v) {(c).ch.green_h = (uint8_t)(((v) >> 3) & 0x7); (c).ch.green_l = (uint8_t)((v) & 0x7);}
|
||||||
# define LV_COLOR_SET_B16(c, v) (c).ch.blue = (uint8_t)((v) & 0x1F);
|
# define LV_COLOR_SET_B16(c, v) (c).ch.blue = (uint8_t)((v) & 0x1F);
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ void lv_calendar_set_showed_date(lv_obj_t * calendar, lv_calendar_date_t * showe
|
|||||||
* WILL BE SAVED! CAN'T BE LOCAL ARRAY.
|
* WILL BE SAVED! CAN'T BE LOCAL ARRAY.
|
||||||
* @param date_num number of dates in the array
|
* @param date_num number of dates in the array
|
||||||
*/
|
*/
|
||||||
void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t * highlighted, uint16_t date_num)
|
void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t highlighted[], uint16_t date_num)
|
||||||
{
|
{
|
||||||
LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
|
LV_ASSERT_OBJ(calendar, LV_OBJX_NAME);
|
||||||
LV_ASSERT_NULL(highlighted);
|
LV_ASSERT_NULL(highlighted);
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ void lv_calendar_set_showed_date(lv_obj_t * calendar, lv_calendar_date_t * showe
|
|||||||
* WILL BE SAVED! CAN'T BE LOCAL ARRAY.
|
* WILL BE SAVED! CAN'T BE LOCAL ARRAY.
|
||||||
* @param date_num number of dates in the array
|
* @param date_num number of dates in the array
|
||||||
*/
|
*/
|
||||||
void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t * highlighted, uint16_t date_num);
|
void lv_calendar_set_highlighted_dates(lv_obj_t * calendar, lv_calendar_date_t highlighted[], uint16_t date_num);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the name of the days
|
* Set the name of the days
|
||||||
|
|||||||
@@ -167,11 +167,11 @@ void lv_tileview_add_element(lv_obj_t * tileview, lv_obj_t * element)
|
|||||||
/**
|
/**
|
||||||
* Set the valid position's indices. The scrolling will be possible only to these positions.
|
* Set the valid position's indices. The scrolling will be possible only to these positions.
|
||||||
* @param tileview pointer to a Tileview object
|
* @param tileview pointer to a Tileview object
|
||||||
* @param valid_pos array width the indices. E.g. `lv_point_t p[] = {{0,0}, {1,0}, {1,1}`. Only the
|
* @param valid_pos array width the indices. E.g. `lv_point_t p[] = {{0,0}, {1,0}, {1,1}`.
|
||||||
* pointer is saved so can't be a local variable.
|
* Only the pointer is saved so can't be a local variable.
|
||||||
* @param valid_pos_cnt numner of elements in `valid_pos` array
|
* @param valid_pos_cnt numner of elements in `valid_pos` array
|
||||||
*/
|
*/
|
||||||
void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t * valid_pos, uint16_t valid_pos_cnt)
|
void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t valid_pos[], uint16_t valid_pos_cnt)
|
||||||
{
|
{
|
||||||
LV_ASSERT_OBJ(tileview, LV_OBJX_NAME);
|
LV_ASSERT_OBJ(tileview, LV_OBJX_NAME);
|
||||||
LV_ASSERT_NULL(valid_pos);
|
LV_ASSERT_NULL(valid_pos);
|
||||||
|
|||||||
@@ -86,11 +86,11 @@ void lv_tileview_add_element(lv_obj_t * tileview, lv_obj_t * element);
|
|||||||
/**
|
/**
|
||||||
* Set the valid position's indices. The scrolling will be possible only to these positions.
|
* Set the valid position's indices. The scrolling will be possible only to these positions.
|
||||||
* @param tileview pointer to a Tileview object
|
* @param tileview pointer to a Tileview object
|
||||||
* @param valid_pos array width the indices. E.g. `lv_point_t p[] = {{0,0}, {1,0}, {1,1}`. Only the
|
* @param valid_pos array width the indices. E.g. `lv_point_t p[] = {{0,0}, {1,0}, {1,1}`.
|
||||||
* pointer is saved so can't be a local variable.
|
* Only the pointer is saved so can't be a local variable.
|
||||||
* @param valid_pos_cnt numner of elements in `valid_pos` array
|
* @param valid_pos_cnt numner of elements in `valid_pos` array
|
||||||
*/
|
*/
|
||||||
void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t * valid_pos, uint16_t valid_pos_cnt);
|
void lv_tileview_set_valid_positions(lv_obj_t * tileview, const lv_point_t valid_pos[], uint16_t valid_pos_cnt);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the tile to be shown
|
* Set the tile to be shown
|
||||||
|
|||||||
Reference in New Issue
Block a user