add widget_ev_to_str(); Pass 'ed' through to EV_WIDGET_TOUCH_{UP,DOWN} calls

This commit is contained in:
Pim van Pelt
2017-11-26 19:27:57 +01:00
parent e826324244
commit 3cb5fc18e7
6 changed files with 51 additions and 12 deletions

View File

@ -11,8 +11,8 @@ struct widget_t;
#define EV_WIDGET_DRAW 3
#define EV_WIDGET_REDRAW 4
#define EV_WIDGET_TIMER 5
#define EV_WIDGET_TOUCH_UP 6
#define EV_WIDGET_TOUCH_DOWN 7
#define EV_WIDGET_TOUCH_UP 6 // struct mgos_stmpe610_event_data *
#define EV_WIDGET_TOUCH_DOWN 7 // struct mgos_stmpe610_event_data *
enum widget_type_t {
WIDGET_TYPE_NONE =0,
@ -53,5 +53,8 @@ struct widget_t *widget_create_from_json(const char *json);
struct widget_t *widget_create_from_file(const char *fn);
void widget_destroy(struct widget_t **widget);
// Convert ev in EV_WIDGET_* to string
void widget_ev_to_str(int ev, char *s, int slen);
#endif // __WIDGET_H