1 /** 2 * @file lv_api_map.h 3 * 4 */ 5 6 #ifndef LV_API_MAP_H 7 #define LV_API_MAP_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 #include "../lvgl.h" 17 18 /********************* 19 * DEFINES 20 *********************/ 21 22 #define LV_NO_TASK_READY LV_NO_TIMER_READY 23 #define LV_INDEV_STATE_REL LV_INDEV_STATE_RELEASED 24 #define LV_INDEV_STATE_PR LV_INDEV_STATE_PRESSED 25 #define LV_OBJ_FLAG_SNAPABLE LV_OBJ_FLAG_SNAPPABLE /*Fixed typo*/ 26 27 /********************** 28 * TYPEDEFS 29 **********************/ 30 31 /********************** 32 * GLOBAL PROTOTYPES 33 **********************/ 34 lv_task_handler(void)35static inline LV_ATTRIBUTE_TIMER_HANDLER uint32_t lv_task_handler(void) 36 { 37 return lv_timer_handler(); 38 } 39 40 /********************** 41 * MACROS 42 **********************/ 43 44 45 /********************** 46 * INLINE FUNCTIONS 47 **********************/ 48 49 /** 50 * Move the object to the foreground. 51 * It will look like if it was created as the last child of its parent. 52 * It also means it can cover any of the siblings. 53 * @param obj pointer to an object 54 */ lv_obj_move_foreground(lv_obj_t * obj)55static inline void lv_obj_move_foreground(lv_obj_t * obj) 56 { 57 lv_obj_t * parent = lv_obj_get_parent(obj); 58 lv_obj_move_to_index(obj, lv_obj_get_child_cnt(parent) - 1); 59 } 60 61 /** 62 * Move the object to the background. 63 * It will look like if it was created as the first child of its parent. 64 * It also means any of the siblings can cover the object. 65 * @param obj pointer to an object 66 */ lv_obj_move_background(lv_obj_t * obj)67static inline void lv_obj_move_background(lv_obj_t * obj) 68 { 69 lv_obj_move_to_index(obj, 0); 70 } 71 72 73 74 /********************** 75 * DEPRECATED FUNCTIONS 76 **********************/ 77 lv_obj_get_child_id(const struct _lv_obj_t * obj)78static inline uint32_t lv_obj_get_child_id(const struct _lv_obj_t * obj) 79 { 80 LV_LOG_WARN("lv_obj_get_child_id(obj) is deprecated, please use lv_obj_get_index(obj)."); 81 return lv_obj_get_index(obj); 82 } 83 84 #ifdef __cplusplus 85 } /*extern "C"*/ 86 #endif 87 88 #endif /*LV_API_MAP_H*/ 89