mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
refactoring enum declaration
This commit is contained in:
parent
bf8eb078ca
commit
589e7f28e0
@ -65,22 +65,24 @@ extern "C" {
|
||||
|
||||
struct _lv_obj_t;
|
||||
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_DESIGN_DRAW_MAIN,
|
||||
LV_DESIGN_DRAW_POST,
|
||||
LV_DESIGN_COVER_CHK,
|
||||
} lv_design_mode_t;
|
||||
};
|
||||
typedef uint8_t lv_design_mode_t;
|
||||
|
||||
typedef bool (* lv_design_func_t) (struct _lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode);
|
||||
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_RES_INV = 0, /*Typically indicates that the object is deleted (become invalid) in the action function or an operation was failed*/
|
||||
LV_RES_OK, /*The object is valid (no deleted) after the action*/
|
||||
} lv_res_t;
|
||||
};
|
||||
typedef uint8_t lv_res_t;
|
||||
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
/*General signals*/
|
||||
LV_SIGNAL_CLEANUP,
|
||||
@ -105,7 +107,8 @@ typedef enum
|
||||
LV_SIGNAL_DEFOCUS,
|
||||
LV_SIGNAL_CONTROLL,
|
||||
LV_SIGNAL_GET_EDITABLE,
|
||||
} lv_signal_t;
|
||||
};
|
||||
typedef uint8_t lv_signal_t;
|
||||
|
||||
typedef lv_res_t (* lv_signal_func_t) (struct _lv_obj_t * obj, lv_signal_t sign, void * param);
|
||||
|
||||
@ -150,7 +153,7 @@ typedef struct _lv_obj_t
|
||||
typedef lv_res_t (*lv_action_t) (struct _lv_obj_t * obj);
|
||||
|
||||
/*Protect some attributes (max. 8 bit)*/
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_PROTECT_NONE = 0x00,
|
||||
LV_PROTECT_CHILD_CHG = 0x01, /*Disable the child change signal. Used by the library*/
|
||||
@ -159,7 +162,8 @@ typedef enum
|
||||
LV_PROTECT_FOLLOW = 0x08, /*Prevent the object be followed in automatic ordering (e.g. in lv_cont PRETTY layout)*/
|
||||
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*/
|
||||
} lv_protect_t;
|
||||
};
|
||||
typedef uint16_t lv_protect_t;
|
||||
|
||||
|
||||
/*Used by `lv_obj_get_type()`. The object's and its ancestor types are stored here*/
|
||||
@ -167,7 +171,7 @@ typedef struct {
|
||||
const char * type[LV_MAX_ANCESTOR_NUM]; /*[0]: the actual type, [1]: ancestor, [2] #1's ancestor ... [x]: "lv_obj" */
|
||||
} lv_obj_type_t;
|
||||
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_ALIGN_CENTER = 0,
|
||||
LV_ALIGN_IN_TOP_LEFT,
|
||||
@ -190,9 +194,10 @@ typedef enum
|
||||
LV_ALIGN_OUT_RIGHT_TOP,
|
||||
LV_ALIGN_OUT_RIGHT_MID,
|
||||
LV_ALIGN_OUT_RIGHT_BOTTOM,
|
||||
} lv_align_t;
|
||||
};
|
||||
typedef uint8_t lv_align_t;
|
||||
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_ANIM_NONE = 0,
|
||||
LV_ANIM_FLOAT_TOP, /*Float from/to the top*/
|
||||
@ -201,7 +206,8 @@ typedef enum
|
||||
LV_ANIM_FLOAT_RIGHT, /*Float from/to the right*/
|
||||
LV_ANIM_GROW_H, /*Grow/shrink horizontally*/
|
||||
LV_ANIM_GROW_V, /*Grow/shrink vertically*/
|
||||
} lv_anim_builtin_t;
|
||||
};
|
||||
typedef uint8_t lv_anim_builtin_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -29,7 +29,7 @@ extern "C" {
|
||||
**********************/
|
||||
|
||||
/*Border types (Use 'OR'ed values)*/
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_BORDER_NONE = 0x00,
|
||||
LV_BORDER_BOTTOM = 0x01,
|
||||
@ -37,14 +37,16 @@ typedef enum
|
||||
LV_BORDER_LEFT = 0x04,
|
||||
LV_BORDER_RIGHT = 0x08,
|
||||
LV_BORDER_FULL = 0x0F,
|
||||
} lv_border_part_t;
|
||||
};
|
||||
typedef uint8_t lv_border_part_t;
|
||||
|
||||
/*Shadow types*/
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_SHADOW_BOTTOM = 0,
|
||||
LV_SHADOW_FULL,
|
||||
} lv_shadow_type_t;
|
||||
};
|
||||
typedef uint8_t lv_shadow_type_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@ -66,7 +68,7 @@ typedef struct
|
||||
struct {
|
||||
lv_color_t color;
|
||||
lv_coord_t width;
|
||||
uint8_t type;
|
||||
lv_shadow_type_t type;
|
||||
} shadow;
|
||||
|
||||
struct {
|
||||
|
@ -20,11 +20,12 @@
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_VDB_STATE_FREE = 0, /*Not used*/
|
||||
LV_VDB_STATE_ACTIVE, /*Being used to render*/
|
||||
LV_VDB_STATE_FLUSH, /*Flushing pixels from it*/
|
||||
} lv_vdb_state_t;
|
||||
};
|
||||
typedef uint8_t lv_vdb_state_t;
|
||||
|
||||
/**********************
|
||||
* STATIC PROTOTYPES
|
||||
|
@ -38,12 +38,13 @@ extern "C" {
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_IMG_SRC_VARIABLE,
|
||||
LV_IMG_SRC_FILE,
|
||||
LV_IMG_SRC_SYMBOL,
|
||||
LV_IMG_SRC_UNKNOWN,
|
||||
} lv_img_src_t;
|
||||
};
|
||||
typedef uint8_t lv_img_src_t;
|
||||
|
||||
|
||||
/**********************
|
||||
|
@ -40,7 +40,7 @@ typedef struct {
|
||||
}lv_img_header_t;
|
||||
|
||||
/*Image color format*/
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_IMG_CF_UNKOWN = 0,
|
||||
|
||||
LV_IMG_CF_RAW, /*Contains the file as it is. Needs custom decoder function*/
|
||||
@ -60,7 +60,8 @@ typedef enum {
|
||||
LV_IMG_CF_ALPHA_2BIT, /*Can have one color but 4 different alpha value*/
|
||||
LV_IMG_CF_ALPHA_4BIT, /*Can have one color but 16 different alpha value*/
|
||||
LV_IMG_CF_ALPHA_8BIT, /*Can have one color but 256 different alpha value*/
|
||||
} lv_img_cf_t;
|
||||
};
|
||||
typedef uint8_t lv_img_cf_t;
|
||||
|
||||
/* Image header it is compatible with
|
||||
* the result image converter utility*/
|
||||
|
@ -17,11 +17,12 @@
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
typedef enum {
|
||||
enum {
|
||||
CMD_STATE_WAIT,
|
||||
CMD_STATE_PAR,
|
||||
CMD_STATE_IN,
|
||||
} cmd_state_t;
|
||||
};
|
||||
typedef uint8_t cmd_state_t;
|
||||
|
||||
/**********************
|
||||
* STATIC PROTOTYPES
|
||||
|
@ -29,18 +29,20 @@ extern "C" {
|
||||
**********************/
|
||||
|
||||
/*Possible input device types*/
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_INDEV_TYPE_NONE, /*Show uninitialized state*/
|
||||
LV_INDEV_TYPE_POINTER, /*Touch pad, mouse, external button*/
|
||||
LV_INDEV_TYPE_KEYPAD, /*Keypad or keyboard*/
|
||||
LV_INDEV_TYPE_BUTTON, /*External (hardware button) which is assinged to a specific point of the screen*/
|
||||
} lv_hal_indev_type_t;
|
||||
};
|
||||
typedef uint8_t lv_hal_indev_type_t;
|
||||
|
||||
/*States for input devices*/
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_INDEV_STATE_REL = 0,
|
||||
LV_INDEV_STATE_PR
|
||||
} lv_indev_state_t;
|
||||
};
|
||||
typedef uint8_t lv_indev_state_t;
|
||||
|
||||
/*Data type when an input device is read */
|
||||
typedef struct {
|
||||
@ -49,8 +51,8 @@ typedef struct {
|
||||
uint32_t key; /*For LV_INDEV_TYPE_KEYPAD the currently pressed key*/
|
||||
uint32_t btn; /*For LV_INDEV_TYPE_BUTTON the currently pressed button*/
|
||||
};
|
||||
lv_indev_state_t state; /*LV_INDEV_STATE_REL or LV_INDEV_STATE_PR*/
|
||||
void *user_data; /*'lv_indev_drv_t.priv' for this driver*/
|
||||
lv_indev_state_t state; /*LV_INDEV_STATE_REL or LV_INDEV_STATE_PR*/
|
||||
} lv_indev_data_t;
|
||||
|
||||
/*Initialized by the user and registered by 'lv_indev_add()'*/
|
||||
|
@ -33,7 +33,7 @@ extern "C" {
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_FS_RES_OK = 0,
|
||||
LV_FS_RES_HW_ERR, /*Low level hardware error*/
|
||||
@ -48,7 +48,8 @@ typedef enum
|
||||
LV_FS_RES_OUT_OF_MEM, /*Not enough memory for an internal operation*/
|
||||
LV_FS_RES_INV_PARAM, /*Invalid parameter among arguments*/
|
||||
LV_FS_RES_UNKNOWN, /*Other unknown error*/
|
||||
} lv_fs_res_t;
|
||||
};
|
||||
typedef uint8_t lv_fs_res_t;
|
||||
|
||||
struct __lv_fs_drv_t;
|
||||
|
||||
@ -65,11 +66,12 @@ typedef struct
|
||||
struct __lv_fs_drv_t * drv;
|
||||
} lv_fs_dir_t;
|
||||
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_FS_MODE_WR = 0x01,
|
||||
LV_FS_MODE_RD = 0x02,
|
||||
} lv_fs_mode_t;
|
||||
};
|
||||
typedef uint8_t lv_fs_mode_t;
|
||||
|
||||
typedef struct __lv_fs_drv_t
|
||||
{
|
||||
|
@ -29,14 +29,15 @@ extern "C" {
|
||||
**********************/
|
||||
|
||||
/*Possible log level. For compatibility declare it independently from `USE_LV_LOG`*/
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_LOG_LEVEL_TRACE, /*A lot of logs to give detailed information*/
|
||||
LV_LOG_LEVEL_INFO, /*Log important events*/
|
||||
LV_LOG_LEVEL_WARN, /*Log if something unwanted happened but didn't caused problem*/
|
||||
LV_LOG_LEVEL_ERROR, /*Only critical issue, when the system may fail*/
|
||||
_LV_LOG_LEVEL_NUM
|
||||
}lv_log_level_t;
|
||||
};
|
||||
typedef uint8_t lv_log_level_t;
|
||||
|
||||
#if USE_LV_LOG
|
||||
|
||||
|
@ -37,7 +37,7 @@ extern "C" {
|
||||
/**
|
||||
* Possible priorities for lv_tasks
|
||||
*/
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_TASK_PRIO_OFF = 0,
|
||||
LV_TASK_PRIO_LOWEST,
|
||||
@ -46,7 +46,8 @@ typedef enum
|
||||
LV_TASK_PRIO_HIGH,
|
||||
LV_TASK_PRIO_HIGHEST,
|
||||
LV_TASK_PRIO_NUM,
|
||||
} lv_task_prio_t;
|
||||
};
|
||||
typedef uint8_t lv_task_prio_t;
|
||||
|
||||
/**
|
||||
* Descriptor of a lv_task
|
||||
|
@ -32,21 +32,23 @@ extern "C" {
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_TXT_FLAG_NONE = 0x00,
|
||||
LV_TXT_FLAG_RECOLOR = 0x01, /*Enable parsing of recolor command*/
|
||||
LV_TXT_FLAG_EXPAND = 0x02, /*Ignore width (Used by the library)*/
|
||||
LV_TXT_FLAG_CENTER = 0x04, /*Align the text to the middle*/
|
||||
LV_TXT_FLAG_RIGHT = 0x08, /*Align the text to the right*/
|
||||
} lv_txt_flag_t;
|
||||
};
|
||||
typedef uint8_t lv_txt_flag_t;
|
||||
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_TXT_CMD_STATE_WAIT, /*Waiting for command*/
|
||||
LV_TXT_CMD_STATE_PAR, /*Processing the parameter*/
|
||||
LV_TXT_CMD_STATE_IN, /*Processing the command*/
|
||||
} lv_txt_cmd_state_t;
|
||||
};
|
||||
typedef uint8_t lv_txt_cmd_state_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -40,9 +40,11 @@ typedef struct {
|
||||
|
||||
|
||||
/*Styles*/
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_ARC_STYLE_MAIN,
|
||||
} lv_arc_style_t;
|
||||
};
|
||||
typedef uint8_t lv_arc_style_t;
|
||||
|
||||
|
||||
|
||||
/**********************
|
||||
|
@ -45,10 +45,11 @@ typedef struct
|
||||
lv_style_t *style_indic; /*Style of the indicator*/
|
||||
} lv_bar_ext_t;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_BAR_STYLE_BG,
|
||||
LV_BAR_STYLE_INDIC,
|
||||
} lv_bar_style_t;
|
||||
};
|
||||
typedef uint8_t lv_bar_style_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -39,7 +39,7 @@ extern "C" {
|
||||
|
||||
/* Button states
|
||||
* It can be used not only by buttons but other button-like objects too*/
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_BTN_STATE_REL,
|
||||
LV_BTN_STATE_PR,
|
||||
@ -47,16 +47,19 @@ typedef enum
|
||||
LV_BTN_STATE_TGL_PR,
|
||||
LV_BTN_STATE_INA,
|
||||
LV_BTN_STATE_NUM,
|
||||
} lv_btn_state_t;
|
||||
};
|
||||
typedef uint8_t lv_btn_state_t;
|
||||
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_BTN_ACTION_CLICK,
|
||||
LV_BTN_ACTION_PR,
|
||||
LV_BTN_ACTION_LONG_PR,
|
||||
LV_BTN_ACTION_LONG_PR_REPEAT,
|
||||
LV_BTN_ACTION_NUM,
|
||||
} lv_btn_action_t;
|
||||
};
|
||||
typedef uint8_t lv_btn_action_t;
|
||||
|
||||
|
||||
/*Data of button*/
|
||||
typedef struct
|
||||
@ -76,13 +79,14 @@ typedef struct
|
||||
} lv_btn_ext_t;
|
||||
|
||||
/*Styles*/
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_BTN_STYLE_REL,
|
||||
LV_BTN_STYLE_PR,
|
||||
LV_BTN_STYLE_TGL_REL,
|
||||
LV_BTN_STYLE_TGL_PR,
|
||||
LV_BTN_STYLE_INA,
|
||||
} lv_btn_style_t;
|
||||
};
|
||||
typedef uint8_t lv_btn_style_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -62,14 +62,15 @@ typedef struct
|
||||
uint8_t toggle :1; /*Enable toggling*/
|
||||
} lv_btnm_ext_t;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_BTNM_STYLE_BG,
|
||||
LV_BTNM_STYLE_BTN_REL,
|
||||
LV_BTNM_STYLE_BTN_PR,
|
||||
LV_BTNM_STYLE_BTN_TGL_REL,
|
||||
LV_BTNM_STYLE_BTN_TGL_PR,
|
||||
LV_BTNM_STYLE_BTN_INA,
|
||||
} lv_btnm_style_t;
|
||||
};
|
||||
typedef uint8_t lv_btnm_style_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -22,11 +22,12 @@
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
typedef enum {
|
||||
enum {
|
||||
DAY_DRAW_PREV_MONTH,
|
||||
DAY_DRAW_ACT_MONTH,
|
||||
DAY_DRAW_NEXT_MONTH,
|
||||
} day_draw_state_t;
|
||||
};
|
||||
typedef uint8_t day_draw_state_t;
|
||||
|
||||
/**********************
|
||||
* STATIC PROTOTYPES
|
||||
|
@ -60,7 +60,7 @@ typedef struct {
|
||||
} lv_calendar_ext_t;
|
||||
|
||||
/*Styles*/
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_CALENDAR_STYLE_BG, /*Also the style of the "normal" date numbers*/
|
||||
LV_CALENDAR_STYLE_HEADER,
|
||||
LV_CALENDAR_STYLE_HEADER_PR,
|
||||
@ -69,7 +69,9 @@ typedef enum {
|
||||
LV_CALENDAR_STYLE_INACTIVE_DAYS,
|
||||
LV_CALENDAR_STYLE_WEEK_BOX,
|
||||
LV_CALENDAR_STYLE_TODAY_BOX,
|
||||
} lv_calendar_style_t;
|
||||
};
|
||||
typedef uint8_t lv_calendar_style_t;
|
||||
|
||||
|
||||
|
||||
/**********************
|
||||
|
@ -51,14 +51,15 @@ typedef struct
|
||||
lv_obj_t * label; /*Pointer to label*/
|
||||
} lv_cb_ext_t;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_CB_STYLE_BG,
|
||||
LV_CB_STYLE_BOX_REL,
|
||||
LV_CB_STYLE_BOX_PR,
|
||||
LV_CB_STYLE_BOX_TGL_REL,
|
||||
LV_CB_STYLE_BOX_TGL_PR,
|
||||
LV_CB_STYLE_BOX_INA,
|
||||
} lv_cb_style_t;
|
||||
};
|
||||
typedef uint8_t lv_cb_style_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -58,12 +58,13 @@ typedef struct
|
||||
} lv_chart_ext_t;
|
||||
|
||||
/*Chart types*/
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_CHART_TYPE_LINE = 0x01,
|
||||
LV_CHART_TYPE_COLUMN = 0x02,
|
||||
LV_CHART_TYPE_POINT = 0x04,
|
||||
} lv_chart_type_t;
|
||||
};
|
||||
typedef uint8_t lv_chart_type_t;
|
||||
|
||||
|
||||
/**********************
|
||||
|
@ -32,7 +32,7 @@ extern "C" {
|
||||
**********************/
|
||||
|
||||
/*Layout options*/
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_LAYOUT_OFF = 0,
|
||||
LV_LAYOUT_CENTER,
|
||||
@ -44,7 +44,8 @@ typedef enum
|
||||
LV_LAYOUT_ROW_B, /*Row bottom align*/
|
||||
LV_LAYOUT_PRETTY, /*Put as many object as possible in row and begin a new row*/
|
||||
LV_LAYOUT_GRID, /*Align same-sized object into a grid*/
|
||||
} lv_layout_t;
|
||||
};
|
||||
typedef uint8_t lv_layout_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -57,11 +57,12 @@ typedef struct
|
||||
lv_coord_t fix_height; /*Height of the ddlist when opened. (0: auto-size)*/
|
||||
} lv_ddlist_ext_t;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_DDLIST_STYLE_BG,
|
||||
LV_DDLIST_STYLE_SEL,
|
||||
LV_DDLIST_STYLE_SB,
|
||||
} lv_ddlist_style_t;
|
||||
};
|
||||
typedef uint8_t lv_ddlist_style_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -47,13 +47,14 @@ typedef struct {
|
||||
|
||||
|
||||
/*Styles*/
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_IMGBTN_STYLE_REL,
|
||||
LV_IMGBTN_STYLE_PR,
|
||||
LV_IMGBTN_STYLE_TGL_REL,
|
||||
LV_IMGBTN_STYLE_TGL_PR,
|
||||
LV_IMGBTN_STYLE_INA,
|
||||
} lv_imgbtn_style_t;
|
||||
};
|
||||
typedef uint8_t lv_imgbtn_style_t;
|
||||
|
||||
|
||||
/**********************
|
||||
|
@ -41,11 +41,11 @@ extern "C" {
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_KB_MODE_TEXT,
|
||||
LV_KB_MODE_NUM,
|
||||
} lv_kb_mode_t;
|
||||
|
||||
};
|
||||
typedef uint8_t lv_kb_mode_t;
|
||||
|
||||
/*Data of keyboard*/
|
||||
typedef struct {
|
||||
@ -58,14 +58,16 @@ typedef struct {
|
||||
lv_action_t hide_action; /*Called when the "Hide" button is clicked*/
|
||||
} lv_kb_ext_t;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_KB_STYLE_BG,
|
||||
LV_KB_STYLE_BTN_REL,
|
||||
LV_KB_STYLE_BTN_PR,
|
||||
LV_KB_STYLE_BTN_TGL_REL,
|
||||
LV_KB_STYLE_BTN_TGL_PR,
|
||||
LV_KB_STYLE_BTN_INA,
|
||||
} lv_kb_style_t;
|
||||
};
|
||||
typedef uint8_t lv_kb_style_t;
|
||||
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -37,21 +37,23 @@ extern "C" {
|
||||
**********************/
|
||||
|
||||
/*Long mode behaviors. Used in 'lv_label_ext_t' */
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_LABEL_LONG_EXPAND, /*Expand the object size to the text size*/
|
||||
LV_LABEL_LONG_BREAK, /*Keep the object width, break the too long lines and expand the object height*/
|
||||
LV_LABEL_LONG_SCROLL, /*Expand the object size and scroll the text on the parent (move the label object)*/
|
||||
LV_LABEL_LONG_DOT, /*Keep the size and write dots at the end if the text is too long*/
|
||||
LV_LABEL_LONG_ROLL, /*Keep the size and roll the text infinitely*/
|
||||
} lv_label_long_mode_t;
|
||||
};
|
||||
typedef uint8_t lv_label_long_mode_t;
|
||||
|
||||
/*Label align policy*/
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_LABEL_ALIGN_LEFT,
|
||||
LV_LABEL_ALIGN_CENTER,
|
||||
LV_LABEL_ALIGN_RIGHT,
|
||||
} lv_label_align_t;
|
||||
};
|
||||
typedef uint8_t lv_label_align_t;
|
||||
|
||||
/*Data of label*/
|
||||
typedef struct
|
||||
|
@ -61,7 +61,7 @@ typedef struct
|
||||
#endif
|
||||
} lv_list_ext_t;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_LIST_STYLE_BG,
|
||||
LV_LIST_STYLE_SCRL,
|
||||
LV_LIST_STYLE_SB,
|
||||
@ -70,7 +70,9 @@ typedef enum {
|
||||
LV_LIST_STYLE_BTN_TGL_REL,
|
||||
LV_LIST_STYLE_BTN_TGL_PR,
|
||||
LV_LIST_STYLE_BTN_INA,
|
||||
} lv_list_style_t;
|
||||
};
|
||||
typedef uint8_t lv_list_style_t;
|
||||
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -58,7 +58,7 @@ typedef struct
|
||||
uint16_t anim_time; /*Duration of close animation [ms] (0: no animation)*/
|
||||
} lv_mbox_ext_t;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_MBOX_STYLE_BG,
|
||||
LV_MBOX_STYLE_BTN_BG,
|
||||
LV_MBOX_STYLE_BTN_REL,
|
||||
@ -66,7 +66,8 @@ typedef enum {
|
||||
LV_MBOX_STYLE_BTN_TGL_REL,
|
||||
LV_MBOX_STYLE_BTN_TGL_PR,
|
||||
LV_MBOX_STYLE_BTN_INA,
|
||||
} lv_mbox_style_t;
|
||||
};
|
||||
typedef uint8_t lv_mbox_style_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -46,10 +46,11 @@ typedef struct {
|
||||
|
||||
|
||||
/*Styles*/
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_TEMPL_STYLE_X,
|
||||
LV_TEMPL_STYLE_Y,
|
||||
} lv_templ_style_t;
|
||||
};
|
||||
typedef uint8_t lv_templ_style_t;
|
||||
|
||||
|
||||
/**********************
|
||||
|
@ -38,7 +38,7 @@ extern "C" {
|
||||
**********************/
|
||||
|
||||
/*Scrollbar modes: shows when should the scrollbars be visible*/
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_SB_MODE_OFF = 0x0, /*Never show scrollbars*/
|
||||
LV_SB_MODE_ON = 0x1, /*Always show scrollbars*/
|
||||
@ -46,7 +46,8 @@ typedef enum
|
||||
LV_SB_MODE_AUTO = 0x3, /*Show scrollbars when the scrollable container is large enough to be scrolled*/
|
||||
LV_SB_MODE_HIDE = 0x4, /*Hide the scroll bar temporally*/
|
||||
LV_SB_MODE_UNHIDE = 0x5, /*Unhide the previously hidden scrollbar. Recover it's type too*/
|
||||
} lv_sb_mode_t;
|
||||
};
|
||||
typedef uint8_t lv_sb_mode_t;
|
||||
|
||||
/*Data of page*/
|
||||
typedef struct
|
||||
@ -62,17 +63,17 @@ 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)*/
|
||||
uint8_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;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_PAGE_STYLE_BG,
|
||||
LV_PAGE_STYLE_SCRL,
|
||||
LV_PAGE_STYLE_SB,
|
||||
} lv_page_style_t;
|
||||
|
||||
};
|
||||
typedef uint8_t lv_page_style_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -41,9 +41,10 @@ extern "C" {
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_PRELOAD_TYPE_SPINNING_ARC,
|
||||
} lv_preloader_type_t;
|
||||
};
|
||||
typedef uint8_t lv_preloader_type_t;
|
||||
|
||||
/*Data of pre loader*/
|
||||
typedef struct {
|
||||
@ -55,10 +56,10 @@ typedef struct {
|
||||
|
||||
|
||||
/*Styles*/
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_PRELOAD_STYLE_MAIN,
|
||||
} lv_preload_style_t;
|
||||
|
||||
};
|
||||
typedef uint8_t lv_preload_style_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -42,10 +42,11 @@ typedef struct {
|
||||
/*New data for this type */
|
||||
} lv_roller_ext_t;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_ROLLER_STYLE_BG,
|
||||
LV_ROLLER_STYLE_SEL,
|
||||
} lv_roller_style_t;
|
||||
};
|
||||
typedef uint8_t lv_roller_style_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -48,12 +48,13 @@ typedef struct
|
||||
} lv_slider_ext_t;
|
||||
|
||||
/*Built-in styles of slider*/
|
||||
typedef enum
|
||||
enum
|
||||
{
|
||||
LV_SLIDER_STYLE_BG,
|
||||
LV_SLIDER_STYLE_INDIC,
|
||||
LV_SLIDER_STYLE_KNOB,
|
||||
} lv_slider_style_t;
|
||||
};
|
||||
typedef uint8_t lv_slider_style_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -46,12 +46,13 @@ typedef struct
|
||||
uint8_t changed :1; /*Indicates the switch explicitly changed by drag*/
|
||||
} lv_sw_ext_t;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_SW_STYLE_BG,
|
||||
LV_SW_STYLE_INDIC,
|
||||
LV_SW_STYLE_KNOB_OFF,
|
||||
LV_SW_STYLE_KNOB_ON,
|
||||
} lv_sw_style_t;
|
||||
};
|
||||
typedef uint8_t lv_sw_style_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -43,14 +43,15 @@ extern "C" {
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_CURSOR_NONE,
|
||||
LV_CURSOR_LINE,
|
||||
LV_CURSOR_BLOCK,
|
||||
LV_CURSOR_OUTLINE,
|
||||
LV_CURSOR_UNDERLINE,
|
||||
LV_CURSOR_HIDDEN = 0x10, /*Or it to any value to hide the cursor temporally*/
|
||||
} lv_cursor_type_t;
|
||||
};
|
||||
typedef uint16_t lv_cursor_type_t;
|
||||
|
||||
/*Data of text area*/
|
||||
typedef struct
|
||||
@ -72,11 +73,12 @@ typedef struct
|
||||
} cursor;
|
||||
} lv_ta_ext_t;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_TA_STYLE_BG,
|
||||
LV_TA_STYLE_SB,
|
||||
LV_TA_STYLE_CURSOR,
|
||||
} lv_ta_style_t;
|
||||
};
|
||||
typedef uint16_t lv_ta_style_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -65,7 +65,7 @@ typedef struct
|
||||
lv_tabview_action_t tab_load_action;
|
||||
} lv_tabview_ext_t;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_TABVIEW_STYLE_BG,
|
||||
LV_TABVIEW_STYLE_INDIC,
|
||||
LV_TABVIEW_STYLE_BTN_BG,
|
||||
@ -73,12 +73,14 @@ typedef enum {
|
||||
LV_TABVIEW_STYLE_BTN_PR,
|
||||
LV_TABVIEW_STYLE_BTN_TGL_REL,
|
||||
LV_TABVIEW_STYLE_BTN_TGL_PR,
|
||||
} lv_tabview_style_t;
|
||||
};
|
||||
typedef uint8_t lv_tabview_style_t;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_TABVIEW_BTNS_POS_TOP,
|
||||
LV_TABVIEW_BTNS_POS_BOTTOM,
|
||||
} lv_tabview_btns_pos_t;
|
||||
};
|
||||
typedef uint8_t lv_tabview_btns_pos_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
@ -68,7 +68,7 @@ typedef struct
|
||||
lv_coord_t btn_size; /*Size of the control buttons (square)*/
|
||||
} lv_win_ext_t;
|
||||
|
||||
typedef enum {
|
||||
enum {
|
||||
LV_WIN_STYLE_BG,
|
||||
LV_WIN_STYLE_CONTENT_BG,
|
||||
LV_WIN_STYLE_CONTENT_SCRL,
|
||||
@ -76,7 +76,8 @@ typedef enum {
|
||||
LV_WIN_STYLE_HEADER,
|
||||
LV_WIN_STYLE_BTN_REL,
|
||||
LV_WIN_STYLE_BTN_PR,
|
||||
} lv_win_style_t;
|
||||
};
|
||||
typedef uint8_t lv_win_style_t;
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
|
Loading…
x
Reference in New Issue
Block a user