LV_INDEV_TYPE_BUTTON added
This commit is contained in:
@@ -33,22 +33,24 @@ typedef 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;
|
||||
|
||||
/*States for input devices*/
|
||||
typedef enum {
|
||||
LV_INDEV_STATE_REL,
|
||||
LV_INDEV_STATE_REL = 0,
|
||||
LV_INDEV_STATE_PR
|
||||
}lv_indev_state_t;
|
||||
|
||||
/*Data type when an input device is read */
|
||||
typedef struct {
|
||||
union {
|
||||
lv_point_t point; /*For INDEV_TYPE_POINTER*/
|
||||
uint32_t key; /*For INDEV_TYPE_KEYPAD*/
|
||||
lv_point_t point; /*For LV_INDEV_TYPE_POINTER the currently pressed point*/
|
||||
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_EVENT_REL or LV_INDEV_EVENT_PR*/
|
||||
void *user_data; /*'lv_indev_drv_t.priv' for this driver*/
|
||||
lv_indev_state_t state; /*LV_INDEV_EVENT_REL or LV_INDEV_EVENT_PR*/
|
||||
void *user_data; /*'lv_indev_drv_t.priv' for this driver*/
|
||||
}lv_indev_data_t;
|
||||
|
||||
/*Initialized by the user and registered by 'lv_indev_add()'*/
|
||||
@@ -60,10 +62,11 @@ typedef struct {
|
||||
|
||||
struct _lv_obj_t;
|
||||
|
||||
typedef struct _lv_indev_state_t {
|
||||
/*Run time data of input devices*/
|
||||
typedef struct _lv_indev_proc_t {
|
||||
lv_indev_state_t state;
|
||||
union {
|
||||
struct { /*Pointer data*/
|
||||
struct { /*Pointer and button data*/
|
||||
lv_point_t act_point;
|
||||
lv_point_t last_point;
|
||||
lv_point_t vect;
|
||||
@@ -94,13 +97,16 @@ typedef struct _lv_indev_state_t {
|
||||
struct _lv_obj_t;
|
||||
struct _lv_group_t;
|
||||
|
||||
/*The main input device descriptor with driver, runtime data ('proc') and some additional information*/
|
||||
typedef struct _lv_indev_t {
|
||||
lv_indev_drv_t driver;
|
||||
lv_indev_proc_t proc;
|
||||
uint32_t last_activity_time;
|
||||
union {
|
||||
struct _lv_obj_t *cursor;
|
||||
struct _lv_obj_t *cursor; /*Cursor for LV_INPUT_TYPE_POINTER*/
|
||||
struct _lv_group_t *group; /*Keypad destination group*/
|
||||
lv_point_t * btn_points; /*Array points assigned to the button ()screen will be pressed here by the buttons*/
|
||||
|
||||
};
|
||||
struct _lv_indev_t *next;
|
||||
} lv_indev_t;
|
||||
|
||||
Reference in New Issue
Block a user