mikroSDK Reference Manual
lv_event.h
Go to the documentation of this file.
1
6#ifndef LV_EVENT_H
7#define LV_EVENT_H
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13/*********************
14 * INCLUDES
15 *********************/
16#include <stdbool.h>
17
18/*********************
19 * DEFINES
20 *********************/
21
22/**********************
23 * TYPEDEFS
24 **********************/
25
26struct _lv_obj_t;
27struct _lv_event_dsc_t;
28
93
94typedef struct _lv_event_t {
95 struct _lv_obj_t * target;
96 struct _lv_obj_t * current_target;
97 lv_event_code_t code;
98 void * user_data;
99 void * param;
100 struct _lv_event_t * prev;
101 uint8_t deleted : 1;
102 uint8_t stop_processing : 1;
103 uint8_t stop_bubbling : 1;
104} lv_event_t;
105
111typedef void (*lv_event_cb_t)(lv_event_t * e);
112
120typedef struct {
122 bool res;
124
130typedef struct {
131 lv_cover_res_t res;
132 const lv_area_t * area;
134
135/**********************
136 * GLOBAL PROTOTYPES
137 **********************/
138
146lv_res_t lv_event_send(struct _lv_obj_t * obj, lv_event_code_t event_code, void * param);
147
154lv_res_t lv_obj_event_base(const lv_obj_class_t * class_p, lv_event_t * e);
155
162
170
177
184
191
198
205
217uint32_t lv_event_register_id(void);
218
225
226
237struct _lv_event_dsc_t * lv_obj_add_event_cb(struct _lv_obj_t * obj, lv_event_cb_t event_cb, lv_event_code_t filter,
238 void * user_data);
239
246bool lv_obj_remove_event_cb(struct _lv_obj_t * obj, lv_event_cb_t event_cb);
247
256 const void * event_user_data);
257
265bool lv_obj_remove_event_dsc(struct _lv_obj_t * obj, struct _lv_event_dsc_t * event_dsc);
266
274
281
288
296
303
310
317
323void lv_event_set_ext_draw_size(lv_event_t * e, lv_coord_t size);
324
332
339
347
354
355/**********************
356 * MACROS
357 **********************/
358
359#ifdef __cplusplus
360} /*extern "C"*/
361#endif
362
363#endif /*LV_EVENT_H*/
bool lv_obj_remove_event_cb_with_user_data(struct _lv_obj_t *obj, lv_event_cb_t event_cb, const void *event_user_data)
void lv_event_set_cover_res(lv_event_t *e, lv_cover_res_t res)
void(* lv_event_cb_t)(lv_event_t *e)
Event callback. Events are used to notify the user of some action being taken on the object....
Definition lv_event.h:111
lv_anim_t * lv_event_get_scroll_anim(lv_event_t *e)
void lv_event_stop_bubbling(lv_event_t *e)
const lv_area_t * lv_event_get_old_size(lv_event_t *e)
void * lv_event_get_param(lv_event_t *e)
void * lv_obj_get_event_user_data(struct _lv_obj_t *obj, lv_event_cb_t event_cb)
lv_event_code_t
Definition lv_event.h:32
@ LV_EVENT_PREPROCESS
Definition lv_event.h:90
@ LV_EVENT_SIZE_CHANGED
Definition lv_event.h:82
@ LV_EVENT_GESTURE
Definition lv_event.h:47
@ LV_EVENT_DRAW_MAIN_BEGIN
Definition lv_event.h:57
@ LV_EVENT_READY
Definition lv_event.h:70
@ LV_EVENT_KEY
Definition lv_event.h:48
@ LV_EVENT_DELETE
Definition lv_event.h:74
@ LV_EVENT_REFR_EXT_DRAW_SIZE
Definition lv_event.h:56
@ LV_EVENT_CHILD_CREATED
Definition lv_event.h:76
@ LV_EVENT_LEAVE
Definition lv_event.h:51
@ LV_EVENT_DRAW_MAIN_END
Definition lv_event.h:59
@ LV_EVENT_VALUE_CHANGED
Definition lv_event.h:67
@ LV_EVENT_GET_SELF_SIZE
Definition lv_event.h:85
@ LV_EVENT_PRESSING
Definition lv_event.h:37
@ LV_EVENT_DRAW_PART_BEGIN
Definition lv_event.h:63
@ LV_EVENT_RELEASED
Definition lv_event.h:43
@ LV_EVENT_CHILD_DELETED
Definition lv_event.h:77
@ LV_EVENT_COVER_CHECK
Definition lv_event.h:55
@ LV_EVENT_REFRESH
Definition lv_event.h:69
@ LV_EVENT_DEFOCUSED
Definition lv_event.h:50
@ LV_EVENT_SCROLL_BEGIN
Definition lv_event.h:44
@ LV_EVENT_DRAW_POST
Definition lv_event.h:61
@ LV_EVENT_PRESSED
Definition lv_event.h:36
@ LV_EVENT_SCROLL
Definition lv_event.h:46
@ LV_EVENT_LAYOUT_CHANGED
Definition lv_event.h:84
@ LV_EVENT_PRESS_LOST
Definition lv_event.h:38
@ LV_EVENT_SCREEN_UNLOADED
Definition lv_event.h:81
@ LV_EVENT_INSERT
Definition lv_event.h:68
@ LV_EVENT_SCREEN_LOADED
Definition lv_event.h:80
@ LV_EVENT_CLICKED
Definition lv_event.h:42
@ LV_EVENT_FOCUSED
Definition lv_event.h:49
@ LV_EVENT_LONG_PRESSED
Definition lv_event.h:40
@ LV_EVENT_DRAW_POST_BEGIN
Definition lv_event.h:60
@ LV_EVENT_SCREEN_LOAD_START
Definition lv_event.h:79
@ LV_EVENT_SCREEN_UNLOAD_START
Definition lv_event.h:78
@ LV_EVENT_DRAW_MAIN
Definition lv_event.h:58
@ LV_EVENT_HIT_TEST
Definition lv_event.h:52
@ LV_EVENT_SCROLL_END
Definition lv_event.h:45
@ LV_EVENT_DRAW_PART_END
Definition lv_event.h:64
@ LV_EVENT_STYLE_CHANGED
Definition lv_event.h:83
@ LV_EVENT_SHORT_CLICKED
Definition lv_event.h:39
@ LV_EVENT_LONG_PRESSED_REPEAT
Definition lv_event.h:41
@ LV_EVENT_CHILD_CHANGED
Definition lv_event.h:75
@ LV_EVENT_DRAW_POST_END
Definition lv_event.h:62
@ LV_EVENT_CANCEL
Definition lv_event.h:71
lv_point_t * lv_event_get_self_size_info(lv_event_t *e)
lv_obj_draw_part_dsc_t * lv_event_get_draw_part_dsc(lv_event_t *e)
void lv_event_set_ext_draw_size(lv_event_t *e, lv_coord_t size)
void lv_event_stop_processing(lv_event_t *e)
lv_indev_t * lv_event_get_indev(lv_event_t *e)
bool lv_obj_remove_event_cb(struct _lv_obj_t *obj, lv_event_cb_t event_cb)
struct _lv_event_dsc_t * lv_obj_add_event_cb(struct _lv_obj_t *obj, lv_event_cb_t event_cb, lv_event_code_t filter, void *user_data)
bool lv_obj_remove_event_dsc(struct _lv_obj_t *obj, struct _lv_event_dsc_t *event_dsc)
const lv_area_t * lv_event_get_cover_area(lv_event_t *e)
lv_draw_ctx_t * lv_event_get_draw_ctx(lv_event_t *e)
lv_event_code_t lv_event_get_code(lv_event_t *e)
lv_res_t lv_event_send(struct _lv_obj_t *obj, lv_event_code_t event_code, void *param)
uint32_t lv_event_get_key(lv_event_t *e)
lv_hit_test_info_t * lv_event_get_hit_test_info(lv_event_t *e)
struct _lv_obj_t * lv_event_get_target(lv_event_t *e)
void _lv_event_mark_deleted(struct _lv_obj_t *obj)
struct _lv_obj_t * lv_event_get_current_target(lv_event_t *e)
void * lv_event_get_user_data(lv_event_t *e)
lv_res_t lv_obj_event_base(const lv_obj_class_t *class_p, lv_event_t *e)
lv_cover_res_t
Definition lv_obj_draw.h:30
Definition lv_anim.h:73
Definition lv_draw.h:59
Definition lv_event.h:94
Definition lv_hal_indev.h:176
Definition lv_obj_class.h:49
Definition lv_obj.h:174
Definition lv_area.h:43
Definition lv_event.h:130
Definition lv_event.h:120
bool res
Definition lv_event.h:122
const lv_point_t * point
Definition lv_event.h:121
Definition lv_obj_draw.h:42
Definition lv_area.h:37