Compare commits
9 Commits
master
...
release/v6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
416fa2a6ae | ||
|
|
1bd1b874a1 | ||
|
|
963c156e92 | ||
|
|
81e72236e5 | ||
|
|
4b7fc8f2b3 | ||
|
|
01c15a2b2c | ||
|
|
baee02266e | ||
|
|
0814185a4d | ||
|
|
b22f1f5b14 |
@@ -396,3 +396,4 @@ It should be useful to read the
|
||||
If you are pleased with the library, found it useful, or you are happy with the support you got, please help its further development:
|
||||
|
||||
[](https://littlevgl.com/donate)
|
||||
|
||||
|
||||
@@ -158,8 +158,7 @@ void lv_group_remove_obj(lv_obj_t * obj)
|
||||
{
|
||||
lv_group_t * g = obj->group_p;
|
||||
if(g == NULL) return;
|
||||
if(g->obj_focus == NULL) return; /*Just to be sure (Not possible if there is at least one object in the group)*/
|
||||
|
||||
|
||||
/*Focus on the next object*/
|
||||
if(*g->obj_focus == obj) {
|
||||
/*If this is the only object in the group then focus to nothing.*/
|
||||
|
||||
@@ -307,14 +307,14 @@ void lv_indev_wait_release(lv_indev_t * indev)
|
||||
* @param indev pointer to an input device
|
||||
* @return pointer to the indev read refresher task. (NULL on error)
|
||||
*/
|
||||
lv_task_t * lv_indev_get_read_task(lv_disp_t * indev)
|
||||
lv_task_t * lv_indev_get_read_task(lv_indev_t * indev)
|
||||
{
|
||||
if(!indev) {
|
||||
LV_LOG_WARN("lv_indev_get_read_task: indev was NULL");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return indev->refr_task;
|
||||
return indev->driver.read_task;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -139,7 +139,7 @@ void lv_indev_wait_release(lv_indev_t * indev);
|
||||
* @param indev pointer to an inout device
|
||||
* @return pointer to the indev read refresher task. (NULL on error)
|
||||
*/
|
||||
lv_task_t * lv_indev_get_read_task(lv_disp_t * indev);
|
||||
lv_task_t * lv_indev_get_read_task(lv_indev_t * indev);
|
||||
|
||||
/**
|
||||
* Gets a pointer to the currently active object in indev proc functions.
|
||||
|
||||
@@ -43,7 +43,7 @@ static void point_swap(lv_point_t * p1, lv_point_t * p2);
|
||||
* @param style style for of the triangle
|
||||
* @param opa_scale scale down all opacities by the factor (0..255)
|
||||
*/
|
||||
void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale)
|
||||
void lv_draw_triangle(const lv_point_t points[], const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale)
|
||||
{
|
||||
/*Return if the triangle is degenerated*/
|
||||
if(points[0].x == points[1].x && points[0].y == points[1].y) return;
|
||||
@@ -85,7 +85,7 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l
|
||||
* @param style style of the polygon
|
||||
* @param opa_scale scale down all opacities by the factor (0..255)
|
||||
*/
|
||||
void lv_draw_polygon(const lv_point_t * points, uint32_t point_cnt, const lv_area_t * mask, const lv_style_t * style,
|
||||
void lv_draw_polygon(const lv_point_t points[], uint32_t point_cnt, const lv_area_t * mask, const lv_style_t * style,
|
||||
lv_opa_t opa_scale)
|
||||
{
|
||||
if(point_cnt < 3) return;
|
||||
|
||||
@@ -34,7 +34,7 @@ extern "C" {
|
||||
* @param style style for of the triangle
|
||||
* @param opa_scale scale down all opacities by the factor (0..255)
|
||||
*/
|
||||
void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale);
|
||||
void lv_draw_triangle(const lv_point_t points[], const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale);
|
||||
|
||||
/**
|
||||
* Draw a polygon from triangles. Only convex polygons are supported
|
||||
@@ -44,7 +44,7 @@ void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, const l
|
||||
* @param style style of the polygon
|
||||
* @param opa_scale scale down all opacities by the factor (0..255)
|
||||
*/
|
||||
void lv_draw_polygon(const lv_point_t * points, uint32_t point_cnt, const lv_area_t * mask, const lv_style_t * style,
|
||||
void lv_draw_polygon(const lv_point_t points[], uint32_t point_cnt, const lv_area_t * mask, const lv_style_t * style,
|
||||
lv_opa_t opa_scale);
|
||||
|
||||
/**********************
|
||||
|
||||
@@ -152,10 +152,6 @@ lv_res_t lv_img_decoder_open(lv_img_decoder_dsc_t * dsc, const void * src, const
|
||||
if(res == LV_RES_OK) break;
|
||||
}
|
||||
|
||||
if(res == LV_RES_INV) {
|
||||
memset(dsc, 0, sizeof(lv_img_decoder_dsc_t));
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -127,9 +127,16 @@ bool lv_bidi_letter_is_weak(uint32_t letter)
|
||||
|
||||
bool lv_bidi_letter_is_rtl(uint32_t letter)
|
||||
{
|
||||
if(letter >= 0x5d0 && letter <= 0x5ea) return true;
|
||||
if(letter == 0x202E) return true; /*Unicode of LV_BIDI_RLO*/
|
||||
// if(letter >= 'a' && letter <= 'z') return true;
|
||||
|
||||
/*Check for Persian and Arabic characters [https://en.wikipedia.org/wiki/Arabic_script_in_Unicode]*/
|
||||
if(letter >= 0x600 && letter <= 0x6FF) return true;
|
||||
if(letter >= 0xFB50 && letter <= 0xFDFF) return true;
|
||||
if(letter >= 0xFE70 && letter <= 0xFEFF) return true;
|
||||
|
||||
/*Check for Hebrew characters [https://en.wikipedia.org/wiki/Unicode_and_HTML_for_the_Hebrew_alphabet]*/
|
||||
if(letter >= 0x590 && letter <= 0x5FF) return true;
|
||||
if(letter >= 0xFB1D && letter <= 0xFB4F) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -299,7 +306,7 @@ static void fill_pos_conv(uint16_t * out, uint16_t len, uint16_t index)
|
||||
out[i] = SET_RTL_POS(index, false);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static lv_bidi_dir_t get_next_run(const char * txt, lv_bidi_dir_t base_dir, uint32_t max_len, uint32_t * len, uint16_t * pos_conv_len)
|
||||
{
|
||||
@@ -421,7 +428,7 @@ static void rtl_reverse(char * dest, const char * src, uint32_t len, uint16_t *p
|
||||
}
|
||||
|
||||
if (dest) memcpy(&dest[wr], &src[first_weak], last_weak - first_weak + 1);
|
||||
if (pos_conv_out) fill_pos_conv(&pos_conv_out[pos_conv_wr], pos_conv_last_weak - pos_conv_first_weak + 1, pos_conv_rd_base + pos_conv_first_weak);
|
||||
if (pos_conv_out) fill_pos_conv(&pos_conv_out[pos_conv_wr], pos_conv_last_weak - pos_conv_first_weak + 1, pos_conv_rd_base + pos_conv_first_weak);
|
||||
wr += last_weak - first_weak + 1;
|
||||
pos_conv_wr += pos_conv_last_weak - pos_conv_first_weak + 1;
|
||||
}
|
||||
|
||||
@@ -658,7 +658,7 @@ void lv_canvas_draw_img(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, const voi
|
||||
* @param point_cnt number of points
|
||||
* @param style style of the line (`line` properties are used)
|
||||
*/
|
||||
void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t * points, uint32_t point_cnt, const lv_style_t * style)
|
||||
void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t points[], uint32_t point_cnt, const lv_style_t * style)
|
||||
{
|
||||
LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
|
||||
LV_ASSERT_NULL(style);
|
||||
@@ -742,7 +742,7 @@ void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t * points, uint32_t
|
||||
* @param point_cnt number of points
|
||||
* @param style style of the polygon (`body.main_color` and `body.opa` is used)
|
||||
*/
|
||||
void lv_canvas_draw_polygon(lv_obj_t * canvas, const lv_point_t * points, uint32_t point_cnt, const lv_style_t * style)
|
||||
void lv_canvas_draw_polygon(lv_obj_t * canvas, const lv_point_t points[], uint32_t point_cnt, const lv_style_t * style)
|
||||
{
|
||||
LV_ASSERT_OBJ(canvas, LV_OBJX_NAME);
|
||||
LV_ASSERT_NULL(style);
|
||||
|
||||
@@ -213,7 +213,7 @@ void lv_canvas_draw_img(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, const voi
|
||||
* @param point_cnt number of points
|
||||
* @param style style of the line (`line` properties are used)
|
||||
*/
|
||||
void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t * points, uint32_t point_cnt, const lv_style_t * style);
|
||||
void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t points[], uint32_t point_cnt, const lv_style_t * style);
|
||||
|
||||
/**
|
||||
* Draw a polygon on the canvas
|
||||
@@ -222,7 +222,7 @@ void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t * points, uint32_t
|
||||
* @param point_cnt number of points
|
||||
* @param style style of the polygon (`body.main_color` and `body.opa` is used)
|
||||
*/
|
||||
void lv_canvas_draw_polygon(lv_obj_t * canvas, const lv_point_t * points, uint32_t point_cnt, const lv_style_t * style);
|
||||
void lv_canvas_draw_polygon(lv_obj_t * canvas, const lv_point_t points[], uint32_t point_cnt, const lv_style_t * style);
|
||||
|
||||
/**
|
||||
* Draw an arc on the canvas
|
||||
|
||||
@@ -277,6 +277,10 @@ bool lv_list_remove(const lv_obj_t * list, uint16_t index)
|
||||
lv_obj_t * e = lv_list_get_next_btn(list, NULL);
|
||||
while(e != NULL) {
|
||||
if(count == index) {
|
||||
#if LV_USE_GROUP
|
||||
if(e == ext->last_sel) ext->last_sel = NULL;
|
||||
if(e == ext->last_clicked_btn) ext->last_clicked_btn = NULL;
|
||||
#endif
|
||||
lv_obj_del(e);
|
||||
ext->size--;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user