Compare commits

...

9 Commits

Author SHA1 Message Date
Mattia Maldini
416fa2a6ae fix(bidi): updated BIDI text support to include persian and arabic (#6105) 2024-04-28 12:12:27 +02:00
Gabor Kiss-Vamosi
1bd1b874a1 chore: kick CI to rebuild the docs 2024-04-23 15:59:53 +02:00
Wielebny
963c156e92 fix(indev) return the correct task from lv_indev_get_read_task (#2585)
Co-authored-by: Pawel Kurzawa <pawel.kurzawa@gc5.pl>
2021-09-23 21:43:01 +02:00
nazar01
81e72236e5 Fix dangling pointers after deletion of list buttons (#1909) 2020-11-17 08:04:27 -05:00
Gabor Kiss-Vamosi
4b7fc8f2b3 group: fix in lv_group_remove_obj to handle deleting hidden objects correctly
Fixes: https://forum.lvgl.io/t/deleting-hidden-subobjs-in-groups-may-lead-to-crash/3590
2020-11-02 12:26:31 +01:00
Gabor Kiss-Vamosi
01c15a2b2c Merge pull request #1641 from rabbitsaviola/release/v6
Fix memory leak if image file open fails
2020-07-07 12:57:09 +02:00
rabbitsaviola
baee02266e Fix memory leak if image file open fails 2020-07-07 10:16:44 +08:00
Gabor Kiss-Vamosi
0814185a4d Merge pull request #1633 from amirgon/release/v6
Replace lv_point_t* to lv_point_t[] to represent point array
2020-07-03 09:59:07 +02:00
Amir Gonnen
b22f1f5b14 Replace lv_point_t* to lv_point_t[] to represent point array
Same as https://github.com/lvgl/lvgl/pull/1495 for v6
2020-07-03 01:31:22 +03:00
11 changed files with 28 additions and 21 deletions

View File

@@ -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:
[![Donate](https://littlevgl.com/donate_dir/donate_btn.png)](https://littlevgl.com/donate)

View File

@@ -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.*/

View File

@@ -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;
}
/**

View File

@@ -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.

View File

@@ -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;

View File

@@ -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);
/**********************

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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

View File

@@ -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;