BigW Consortium Gitlab

Commit 8bd9ab7b by Gabor Kiss-Vamosi

LV_GROUP rename

parent 266487fd
...@@ -72,9 +72,6 @@ ...@@ -72,9 +72,6 @@
#define LV_TXT_UTF8 1 #define LV_TXT_UTF8 1
#define LV_TXT_BREAK_CHARS " ,.;:-_" /*Can break texts on these chars*/ #define LV_TXT_BREAK_CHARS " ,.;:-_" /*Can break texts on these chars*/
/*Group settings*/
#define LV_GROUP 1 /*Enable object groups (for keyboards)*/
/*Graphics feature usage*/ /*Graphics feature usage*/
#define LV_NO_ANIM 0 /*1: disable all animations*/ #define LV_NO_ANIM 0 /*1: disable all animations*/
#define LV_NO_SHADOW 0 /*1: disable shadows*/ #define LV_NO_SHADOW 0 /*1: disable shadows*/
...@@ -155,6 +152,7 @@ ...@@ -155,6 +152,7 @@
*==================*/ *==================*/
#define LV_OBJ_FREE_NUM_TYPE uint32_t /*Type of free number attribute (comment out disable free number)*/ #define LV_OBJ_FREE_NUM_TYPE uint32_t /*Type of free number attribute (comment out disable free number)*/
#define LV_OBJ_FREE_PTR 1 /*Enable the free pointer attribute*/ #define LV_OBJ_FREE_PTR 1 /*Enable the free pointer attribute*/
#define LV_OBJ_GROUP 1 /*Enable object groups (for keyboards)*/
/*================== /*==================
* LV OBJ X USAGE * LV OBJ X USAGE
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* INCLUDES * INCLUDES
*********************/ *********************/
#include "lv_group.h" #include "lv_group.h"
#if LV_GROUP != 0 #if LV_OBJ_GROUP != 0
#include <stddef.h> #include <stddef.h>
/********************* /*********************
...@@ -267,4 +267,4 @@ static void style_mod_def(lv_style_t * style) ...@@ -267,4 +267,4 @@ static void style_mod_def(lv_style_t * style)
style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70); style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70);
} }
#endif /*LV_GROUP != 0*/ #endif /*LV_OBJ_GROUP != 0*/
...@@ -30,7 +30,7 @@ extern "C" { ...@@ -30,7 +30,7 @@ extern "C" {
#define LV_GROUP_KEY_NEXT 9 /*0x09, '\t'*/ #define LV_GROUP_KEY_NEXT 9 /*0x09, '\t'*/
#define LV_GROUP_KEY_PREV 11 /*0x0B, '*/ #define LV_GROUP_KEY_PREV 11 /*0x0B, '*/
#if LV_GROUP != 0 #if LV_OBJ_GROUP != 0
/********************** /**********************
* TYPEDEFS * TYPEDEFS
**********************/ **********************/
...@@ -125,7 +125,7 @@ lv_obj_t * lv_group_get_focused(lv_group_t * group); ...@@ -125,7 +125,7 @@ lv_obj_t * lv_group_get_focused(lv_group_t * group);
* MACROS * MACROS
**********************/ **********************/
#endif /*LV_GROUP != 0*/ #endif /*LV_OBJ_GROUP != 0*/
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
......
...@@ -128,7 +128,7 @@ void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj) ...@@ -128,7 +128,7 @@ void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj)
lv_obj_set_pos(indev->cursor, indev->proc.act_point.x, indev->proc.act_point.y); lv_obj_set_pos(indev->cursor, indev->proc.act_point.x, indev->proc.act_point.y);
} }
#if LV_GROUP #if LV_OBJ_GROUP
/** /**
* Set a destination group for a keypad input device * Set a destination group for a keypad input device
* @param indev pointer to an input device (type: 'LV_INDEV_TYPE_KEYPAD') * @param indev pointer to an input device (type: 'LV_INDEV_TYPE_KEYPAD')
...@@ -239,7 +239,7 @@ static void indev_proc_task(void * param) ...@@ -239,7 +239,7 @@ static void indev_proc_task(void * param)
indev_proc_point(&i->proc); indev_proc_point(&i->proc);
} }
else if (i->driver.type == LV_INDEV_TYPE_KEYPAD) { else if (i->driver.type == LV_INDEV_TYPE_KEYPAD) {
#if LV_GROUP != 0 #if LV_OBJ_GROUP
if(i->group != NULL && data.key != 0 && if(i->group != NULL && data.key != 0 &&
data.state == LV_INDEV_STATE_PR && i->proc.last_state == LV_INDEV_STATE_REL) data.state == LV_INDEV_STATE_PR && i->proc.last_state == LV_INDEV_STATE_REL)
{ {
......
...@@ -66,7 +66,7 @@ void lv_indev_enable(lv_hal_indev_type_t type, bool enable); ...@@ -66,7 +66,7 @@ void lv_indev_enable(lv_hal_indev_type_t type, bool enable);
*/ */
void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj); void lv_indev_set_cursor(lv_indev_t *indev, lv_obj_t *cur_obj);
#if LV_GROUP #if LV_OBJ_GROUP
/** /**
* Set a destination group for a keypad input device * Set a destination group for a keypad input device
* @param indev pointer to an input device (type: 'LV_INDEV_TYPE_KEYPAD') * @param indev pointer to an input device (type: 'LV_INDEV_TYPE_KEYPAD')
......
...@@ -146,7 +146,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy) ...@@ -146,7 +146,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy)
new_obj->free_ptr = NULL; new_obj->free_ptr = NULL;
#endif #endif
#if LV_GROUP != 0 #if LV_OBJ_GROUP
new_obj->group_p = NULL; new_obj->group_p = NULL;
#endif #endif
/*Set attributes*/ /*Set attributes*/
...@@ -191,7 +191,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy) ...@@ -191,7 +191,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy)
#if LV_OBJ_FREE_PTR != 0 #if LV_OBJ_FREE_PTR != 0
new_obj->free_ptr = NULL; new_obj->free_ptr = NULL;
#endif #endif
#if LV_GROUP != 0 #if LV_OBJ_GROUP
new_obj->group_p = NULL; new_obj->group_p = NULL;
#endif #endif
...@@ -229,7 +229,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy) ...@@ -229,7 +229,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy)
new_obj->style_p = copy->style_p; new_obj->style_p = copy->style_p;
#if LV_GROUP != 0 #if LV_OBJ_GROUP
/*Add to the same group*/ /*Add to the same group*/
if(copy->group_p != NULL) { if(copy->group_p != NULL) {
lv_group_add_obj(copy->group_p, new_obj); lv_group_add_obj(copy->group_p, new_obj);
...@@ -1204,7 +1204,7 @@ lv_style_t * lv_obj_get_style(lv_obj_t * obj) ...@@ -1204,7 +1204,7 @@ lv_style_t * lv_obj_get_style(lv_obj_t * obj)
par = par->par; par = par->par;
} }
} }
#if LV_GROUP != 0 #if LV_OBJ_GROUP
if(obj->group_p) { if(obj->group_p) {
if(lv_group_get_focused(obj->group_p) == obj) { if(lv_group_get_focused(obj->group_p) == obj) {
style_act = lv_group_mod_style(obj->group_p, style_act); style_act = lv_group_mod_style(obj->group_p, style_act);
...@@ -1361,7 +1361,7 @@ void * lv_obj_get_free_ptr(lv_obj_t * obj) ...@@ -1361,7 +1361,7 @@ void * lv_obj_get_free_ptr(lv_obj_t * obj)
} }
#endif #endif
#if LV_GROUP != 0 #if LV_OBJ_GROUP
/** /**
* Get the group of the object * Get the group of the object
* @param obj pointer to an object * @param obj pointer to an object
...@@ -1537,7 +1537,7 @@ static void delete_children(lv_obj_t * obj) ...@@ -1537,7 +1537,7 @@ static void delete_children(lv_obj_t * obj)
#endif #endif
/*Delete from the group*/ /*Delete from the group*/
#if LV_GROUP != 0 #if LV_OBJ_GROUP
if(obj->group_p != NULL) lv_group_remove_obj(obj); if(obj->group_p != NULL) lv_group_remove_obj(obj);
#endif #endif
......
...@@ -774,7 +774,7 @@ LV_OBJ_FREE_NUM_TYPE lv_obj_get_free_num(lv_obj_t * obj); ...@@ -774,7 +774,7 @@ LV_OBJ_FREE_NUM_TYPE lv_obj_get_free_num(lv_obj_t * obj);
void * lv_obj_get_free_ptr(lv_obj_t * obj); void * lv_obj_get_free_ptr(lv_obj_t * obj);
#endif #endif
#if LV_GROUP != 0 #if LV_OBJ_GROUP
/** /**
* Get the group of the object * Get the group of the object
* @param obj pointer to an object * @param obj pointer to an object
......
...@@ -454,12 +454,14 @@ void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p, ...@@ -454,12 +454,14 @@ void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p,
lv_coord_t map_col_end = masked_a.x2 >> 1; lv_coord_t map_col_end = masked_a.x2 >> 1;
lv_coord_t vdb_col; /*Col. in this row*/ lv_coord_t vdb_col; /*Col. in this row*/
lv_coord_t vdb_col2; /*Col. in next row*/ lv_coord_t vdb_col2; /*Col. in next row*/
for(row = masked_a.y1; row <= masked_a.y2; row += 2) { for(row = masked_a.y1; row <= masked_a.y2; row += 2) {
map_col_start = masked_a.x1 >> 1; map_col_start = masked_a.x1 >> 1;
map_col_end = masked_a.x2 >> 1; map_col_end = masked_a.x2 >> 1;
vdb_col = masked_a.x1; vdb_col = masked_a.x1;
vdb_col2 = masked_a.x1 + vdb_width; vdb_col2 = masked_a.x1 + vdb_width;
for(map_col = map_col_start; map_col <= map_col_end; map_col ++, vdb_col += 2, vdb_col2 += 2) { for(map_col = map_col_start; map_col <= map_col_end; map_col ++, vdb_col += 2, vdb_col2 += 2) {
vdb_buf_tmp[vdb_col].full = map_p[map_col].full; vdb_buf_tmp[vdb_col].full = map_p[map_col].full;
vdb_buf_tmp[vdb_col + 1].full = map_p[map_col].full; vdb_buf_tmp[vdb_col + 1].full = map_p[map_col].full;
vdb_buf_tmp[vdb_col2].full = map_p[map_col].full; vdb_buf_tmp[vdb_col2].full = map_p[map_col].full;
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
/********************* /*********************
* DEFINES * DEFINES
*********************/ *********************/
#define LV_MEM_ADD_JUNK 1 /*Add memory junk on alloc (0xaa) and free(0xbb) (just for testing purposes)*/ #define LV_MEM_ADD_JUNK 0 /*Add memory junk on alloc (0xaa) and free(0xbb) (just for testing purposes)*/
/********************** /**********************
* TYPEDEFS * TYPEDEFS
......
...@@ -247,7 +247,7 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig ...@@ -247,7 +247,7 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig
if(mode == LV_DESIGN_COVER_CHK) { if(mode == LV_DESIGN_COVER_CHK) {
return ancestor_bullet_design(bullet, mask, mode); return ancestor_bullet_design(bullet, mask, mode);
} else if(mode == LV_DESIGN_DRAW_MAIN) { } else if(mode == LV_DESIGN_DRAW_MAIN) {
#if LV_GROUP != 0 #if LV_OBJ_GROUP
/* If the check box is the active in a group and /* If the check box is the active in a group and
* the background is not visible (transparent or empty) * the background is not visible (transparent or empty)
* then activate the style of the bullet*/ * then activate the style of the bullet*/
...@@ -265,7 +265,7 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig ...@@ -265,7 +265,7 @@ static bool lv_bullet_design(lv_obj_t * bullet, const lv_area_t * mask, lv_desig
#endif #endif
ancestor_bullet_design(bullet, mask, mode); ancestor_bullet_design(bullet, mask, mode);
#if LV_GROUP != 0 #if LV_OBJ_GROUP
bullet->style_p = style_ori; /*Revert the style*/ bullet->style_p = style_ori; /*Revert the style*/
#endif #endif
} else if(mode == LV_DESIGN_DRAW_POST) { } else if(mode == LV_DESIGN_DRAW_POST) {
......
...@@ -629,7 +629,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_ ...@@ -629,7 +629,7 @@ static bool lv_label_design(lv_obj_t * label, const lv_area_t * mask, lv_design_
lv_style_t * style = lv_obj_get_style(label); lv_style_t * style = lv_obj_get_style(label);
lv_obj_get_coords(label, &cords); lv_obj_get_coords(label, &cords);
#if LV_GROUP != 0 #if LV_OBJ_GROUP
lv_group_t * g = lv_obj_get_group(label); lv_group_t * g = lv_obj_get_group(label);
if(lv_group_get_focused(g) == label) { if(lv_group_get_focused(g) == label) {
lv_draw_rect(&cords, mask, style); lv_draw_rect(&cords, mask, style);
......
...@@ -242,7 +242,7 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig ...@@ -242,7 +242,7 @@ static bool lv_lmeter_design(lv_obj_t * lmeter, const lv_area_t * mask, lv_desig
memcpy(&style_tmp, style, sizeof(lv_style_t)); memcpy(&style_tmp, style, sizeof(lv_style_t));
#if LV_GROUP #if LV_OBJ_GROUP
lv_group_t *g = lv_obj_get_group(lmeter); lv_group_t *g = lv_obj_get_group(lmeter);
if(lv_group_get_focused(g) == lmeter) { if(lv_group_get_focused(g) == lmeter) {
style_tmp.line.width += 1 << LV_ANTIALIAS; style_tmp.line.width += 1 << LV_ANTIALIAS;
......
...@@ -412,7 +412,7 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo ...@@ -412,7 +412,7 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo
if(mode == LV_DESIGN_COVER_CHK) { if(mode == LV_DESIGN_COVER_CHK) {
return ancestor_design(scrl, mask, mode); return ancestor_design(scrl, mask, mode);
} else if(mode == LV_DESIGN_DRAW_MAIN) { } else if(mode == LV_DESIGN_DRAW_MAIN) {
#if LV_GROUP != 0 #if LV_OBJ_GROUP
/* If the page is the active in a group and /* If the page is the active in a group and
* the background (page) is not visible (transparent or empty) * the background (page) is not visible (transparent or empty)
* then activate the style of the scrollable*/ * then activate the style of the scrollable*/
...@@ -430,7 +430,7 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo ...@@ -430,7 +430,7 @@ static bool lv_scrl_design(lv_obj_t * scrl, const lv_area_t * mask, lv_design_mo
#endif #endif
ancestor_design(scrl, mask, mode); ancestor_design(scrl, mask, mode);
#if LV_GROUP != 0 #if LV_OBJ_GROUP
scrl->style_p = style_ori; /*Revert the style*/ scrl->style_p = style_ori; /*Revert the style*/
#endif #endif
} else if(mode == LV_DESIGN_DRAW_POST) { } else if(mode == LV_DESIGN_DRAW_POST) {
......
...@@ -78,7 +78,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, lv_obj_t * copy) ...@@ -78,7 +78,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, lv_obj_t * copy)
/*Initialize the allocated 'ext' */ /*Initialize the allocated 'ext' */
ext->drag_hor = 0; ext->drag_hor = 0;
ext->draging = 0;; ext->draging = 0;
ext->slide_enable = 1; ext->slide_enable = 1;
ext->tab_cur = 0; ext->tab_cur = 0;
ext->point_last.x = 0; ext->point_last.x = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment