mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
LV_GROUP rename
This commit is contained in:
parent
266487fdab
commit
8bd9ab7b84
@ -72,9 +72,6 @@
|
||||
#define LV_TXT_UTF8 1
|
||||
#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*/
|
||||
#define LV_NO_ANIM 0 /*1: disable all animations*/
|
||||
#define LV_NO_SHADOW 0 /*1: disable shadows*/
|
||||
@ -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_PTR 1 /*Enable the free pointer attribute*/
|
||||
#define LV_OBJ_GROUP 1 /*Enable object groups (for keyboards)*/
|
||||
|
||||
/*==================
|
||||
* LV OBJ X USAGE
|
||||
|
@ -7,7 +7,7 @@
|
||||
* INCLUDES
|
||||
*********************/
|
||||
#include "lv_group.h"
|
||||
#if LV_GROUP != 0
|
||||
#if LV_OBJ_GROUP != 0
|
||||
#include <stddef.h>
|
||||
|
||||
/*********************
|
||||
@ -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);
|
||||
}
|
||||
|
||||
#endif /*LV_GROUP != 0*/
|
||||
#endif /*LV_OBJ_GROUP != 0*/
|
||||
|
@ -30,7 +30,7 @@ extern "C" {
|
||||
#define LV_GROUP_KEY_NEXT 9 /*0x09, '\t'*/
|
||||
#define LV_GROUP_KEY_PREV 11 /*0x0B, '*/
|
||||
|
||||
#if LV_GROUP != 0
|
||||
#if LV_OBJ_GROUP != 0
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
@ -125,7 +125,7 @@ lv_obj_t * lv_group_get_focused(lv_group_t * group);
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#endif /*LV_GROUP != 0*/
|
||||
#endif /*LV_OBJ_GROUP != 0*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
#if LV_GROUP
|
||||
#if LV_OBJ_GROUP
|
||||
/**
|
||||
* Set a destination group for a keypad input device
|
||||
* @param indev pointer to an input device (type: 'LV_INDEV_TYPE_KEYPAD')
|
||||
@ -239,7 +239,7 @@ static void indev_proc_task(void * param)
|
||||
indev_proc_point(&i->proc);
|
||||
}
|
||||
else if (i->driver.type == LV_INDEV_TYPE_KEYPAD) {
|
||||
#if LV_GROUP != 0
|
||||
#if LV_OBJ_GROUP
|
||||
if(i->group != NULL && data.key != 0 &&
|
||||
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);
|
||||
*/
|
||||
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
|
||||
* @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)
|
||||
new_obj->free_ptr = NULL;
|
||||
#endif
|
||||
|
||||
#if LV_GROUP != 0
|
||||
#if LV_OBJ_GROUP
|
||||
new_obj->group_p = NULL;
|
||||
#endif
|
||||
/*Set attributes*/
|
||||
@ -191,7 +191,7 @@ lv_obj_t * lv_obj_create(lv_obj_t * parent, lv_obj_t * copy)
|
||||
#if LV_OBJ_FREE_PTR != 0
|
||||
new_obj->free_ptr = NULL;
|
||||
#endif
|
||||
#if LV_GROUP != 0
|
||||
#if LV_OBJ_GROUP
|
||||
new_obj->group_p = NULL;
|
||||
#endif
|
||||
|
||||
@ -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;
|
||||
|
||||
#if LV_GROUP != 0
|
||||
#if LV_OBJ_GROUP
|
||||
/*Add to the same group*/
|
||||
if(copy->group_p != NULL) {
|
||||
lv_group_add_obj(copy->group_p, new_obj);
|
||||
@ -1204,7 +1204,7 @@ lv_style_t * lv_obj_get_style(lv_obj_t * obj)
|
||||
par = par->par;
|
||||
}
|
||||
}
|
||||
#if LV_GROUP != 0
|
||||
#if LV_OBJ_GROUP
|
||||
if(obj->group_p) {
|
||||
if(lv_group_get_focused(obj->group_p) == obj) {
|
||||
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)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LV_GROUP != 0
|
||||
#if LV_OBJ_GROUP
|
||||
/**
|
||||
* Get the group of the object
|
||||
* @param obj pointer to an object
|
||||
@ -1537,7 +1537,7 @@ static void delete_children(lv_obj_t * obj)
|
||||
#endif
|
||||
|
||||
/*Delete from the group*/
|
||||
#if LV_GROUP != 0
|
||||
#if LV_OBJ_GROUP
|
||||
if(obj->group_p != NULL) lv_group_remove_obj(obj);
|
||||
#endif
|
||||
|
||||
|
@ -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);
|
||||
#endif
|
||||
|
||||
#if LV_GROUP != 0
|
||||
#if LV_OBJ_GROUP
|
||||
/**
|
||||
* Get the group of the 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,
|
||||
lv_coord_t map_col_end = masked_a.x2 >> 1;
|
||||
lv_coord_t vdb_col; /*Col. in this row*/
|
||||
lv_coord_t vdb_col2; /*Col. in next row*/
|
||||
|
||||
for(row = masked_a.y1; row <= masked_a.y2; row += 2) {
|
||||
map_col_start = masked_a.x1 >> 1;
|
||||
map_col_end = masked_a.x2 >> 1;
|
||||
vdb_col = masked_a.x1;
|
||||
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) {
|
||||
|
||||
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_col2].full = map_p[map_col].full;
|
||||
|
@ -19,7 +19,7 @@
|
||||
/*********************
|
||||
* 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
|
||||
|
@ -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) {
|
||||
return ancestor_bullet_design(bullet, mask, mode);
|
||||
} 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
|
||||
* the background is not visible (transparent or empty)
|
||||
* 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
|
||||
#endif
|
||||
ancestor_bullet_design(bullet, mask, mode);
|
||||
|
||||
#if LV_GROUP != 0
|
||||
#if LV_OBJ_GROUP
|
||||
bullet->style_p = style_ori; /*Revert the style*/
|
||||
#endif
|
||||
} 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_
|
||||
lv_style_t * style = lv_obj_get_style(label);
|
||||
lv_obj_get_coords(label, &cords);
|
||||
|
||||
#if LV_GROUP != 0
|
||||
#if LV_OBJ_GROUP
|
||||
lv_group_t * g = lv_obj_get_group(label);
|
||||
if(lv_group_get_focused(g) == label) {
|
||||
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
|
||||
memcpy(&style_tmp, style, sizeof(lv_style_t));
|
||||
|
||||
|
||||
#if LV_GROUP
|
||||
#if LV_OBJ_GROUP
|
||||
lv_group_t *g = lv_obj_get_group(lmeter);
|
||||
if(lv_group_get_focused(g) == lmeter) {
|
||||
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
|
||||
if(mode == LV_DESIGN_COVER_CHK) {
|
||||
return ancestor_design(scrl, mask, mode);
|
||||
} 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
|
||||
* the background (page) is not visible (transparent or empty)
|
||||
* 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
|
||||
#endif
|
||||
ancestor_design(scrl, mask, mode);
|
||||
|
||||
#if LV_GROUP != 0
|
||||
#if LV_OBJ_GROUP
|
||||
scrl->style_p = style_ori; /*Revert the style*/
|
||||
#endif
|
||||
} 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)
|
||||
|
||||
/*Initialize the allocated 'ext' */
|
||||
ext->drag_hor = 0;
|
||||
ext->draging = 0;;
|
||||
ext->draging = 0;
|
||||
ext->slide_enable = 1;
|
||||
ext->tab_cur = 0;
|
||||
ext->point_last.x = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user