1 /** 2 * @file lv_event_private.h 3 * 4 */ 5 6 #ifndef LV_EVENT_PRIVATE_H 7 #define LV_EVENT_PRIVATE_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 17 #include "lv_event.h" 18 19 /********************* 20 * DEFINES 21 *********************/ 22 23 /********************** 24 * TYPEDEFS 25 **********************/ 26 27 struct _lv_event_dsc_t { 28 lv_event_cb_t cb; 29 void * user_data; 30 uint32_t filter; 31 }; 32 33 struct _lv_event_t { 34 void * current_target; 35 void * original_target; 36 lv_event_code_t code; 37 void * user_data; 38 void * param; 39 lv_event_t * prev; 40 uint8_t deleted : 1; 41 uint8_t stop_processing : 1; 42 uint8_t stop_bubbling : 1; 43 }; 44 45 46 /********************** 47 * GLOBAL PROTOTYPES 48 **********************/ 49 50 /********************** 51 * GLOBAL PROTOTYPES 52 **********************/ 53 54 void lv_event_push(lv_event_t * e); 55 56 void lv_event_pop(lv_event_t * e); 57 58 /** 59 * Nested events can be called and one of them might belong to an object that is being deleted. 60 * Mark this object's `event_temp_data` deleted to know that its `lv_obj_send_event` should return `LV_RESULT_INVALID` 61 * @param target pointer to an event target which was deleted 62 */ 63 void lv_event_mark_deleted(void * target); 64 65 /********************** 66 * MACROS 67 **********************/ 68 69 #ifdef __cplusplus 70 } /*extern "C"*/ 71 #endif 72 73 #endif /*LV_EVENT_PRIVATE_H*/ 74