enum refactor fixes
This commit is contained in:
@@ -163,7 +163,7 @@ enum
|
||||
LV_PROTECT_PRESS_LOST= 0x10, /*If the `indev` was pressing this object but swiped out while pressing do not search other object.*/
|
||||
LV_PROTECT_CLICK_FOCUS= 0x20,/*Prevent focusing the object by clicking on it*/
|
||||
};
|
||||
typedef uint16_t lv_protect_t;
|
||||
typedef uint8_t lv_protect_t;
|
||||
|
||||
|
||||
/*Used by `lv_obj_get_type()`. The object's and its ancestor types are stored here*/
|
||||
|
||||
@@ -63,7 +63,7 @@ typedef struct
|
||||
lv_area_t ver_area; /*Vertical scrollbar area relative to the page (Handled by the library)*/
|
||||
uint8_t hor_draw :1; /*1: horizontal scrollbar is visible now (Handled by the library)*/
|
||||
uint8_t ver_draw :1; /*1: vertical scrollbar is visible now (Handled by the library)*/
|
||||
lv_sb_mode_t mode :3; /*Scrollbar visibility from 'lv_page_sb_mode_t'*/
|
||||
lv_sb_mode_t mode:3; /*Scrollbar visibility from 'lv_page_sb_mode_t'*/
|
||||
} sb;
|
||||
uint8_t arrow_scroll :1; /*1: Enable scrolling with LV_GROUP_KEY_LEFT/RIGHT/UP/DOWN*/
|
||||
} lv_page_ext_t;
|
||||
|
||||
@@ -51,7 +51,7 @@ enum {
|
||||
LV_CURSOR_UNDERLINE,
|
||||
LV_CURSOR_HIDDEN = 0x10, /*Or it to any value to hide the cursor temporally*/
|
||||
};
|
||||
typedef uint16_t lv_cursor_type_t;
|
||||
typedef uint8_t lv_cursor_type_t;
|
||||
|
||||
/*Data of text area*/
|
||||
typedef struct
|
||||
@@ -68,7 +68,7 @@ typedef struct
|
||||
lv_style_t *style; /*Style of the cursor (NULL to use label's style)*/
|
||||
lv_coord_t valid_x; /*Used when stepping up/down in text area when stepping to a shorter line. (Handled by the library)*/
|
||||
uint16_t pos; /*The current cursor position (0: before 1. letter; 1: before 2. letter etc.)*/
|
||||
lv_cursor_type_t type; /*Shape of the cursor*/
|
||||
lv_cursor_type_t type:2; /*Shape of the cursor*/
|
||||
uint8_t state :1; /*Indicates that the cursor is visible now or not (Handled by the library)*/
|
||||
} cursor;
|
||||
} lv_ta_ext_t;
|
||||
@@ -78,7 +78,7 @@ enum {
|
||||
LV_TA_STYLE_SB,
|
||||
LV_TA_STYLE_CURSOR,
|
||||
};
|
||||
typedef uint16_t lv_ta_style_t;
|
||||
typedef uint8_t lv_ta_style_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
||||
@@ -90,6 +90,7 @@ lv_obj_t * lv_tabview_create(lv_obj_t * par, const lv_obj_t * copy)
|
||||
ext->indic = NULL;
|
||||
ext->btns = NULL;
|
||||
ext->tab_load_action = NULL;
|
||||
ext->btns_pos = LV_TABVIEW_BTNS_POS_TOP;
|
||||
ext->anim_time = LV_TABVIEW_ANIM_TIME;
|
||||
|
||||
|
||||
|
||||
@@ -45,6 +45,13 @@ extern "C" {
|
||||
/* parametes: pointer to a tabview object, tab_id*/
|
||||
typedef void (*lv_tabview_action_t)(lv_obj_t *, uint16_t);
|
||||
|
||||
|
||||
enum {
|
||||
LV_TABVIEW_BTNS_POS_TOP,
|
||||
LV_TABVIEW_BTNS_POS_BOTTOM,
|
||||
};
|
||||
typedef uint8_t lv_tabview_btns_pos_t;
|
||||
|
||||
/*Data of tab*/
|
||||
typedef struct
|
||||
{
|
||||
@@ -61,7 +68,7 @@ typedef struct
|
||||
uint8_t slide_enable :1; /*1: enable horizontal sliding by touch pad*/
|
||||
uint8_t draging :1;
|
||||
uint8_t drag_hor :1;
|
||||
uint8_t btns_pos : 1;
|
||||
lv_tabview_btns_pos_t btns_pos :1;
|
||||
lv_tabview_action_t tab_load_action;
|
||||
} lv_tabview_ext_t;
|
||||
|
||||
@@ -76,12 +83,6 @@ enum {
|
||||
};
|
||||
typedef uint8_t lv_tabview_style_t;
|
||||
|
||||
enum {
|
||||
LV_TABVIEW_BTNS_POS_TOP,
|
||||
LV_TABVIEW_BTNS_POS_BOTTOM,
|
||||
};
|
||||
typedef uint8_t lv_tabview_btns_pos_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
Reference in New Issue
Block a user