1 /** 2 * @file lv_tileview.h 3 * 4 */ 5 6 #ifndef LV_TILEVIEW_H 7 #define LV_TILEVIEW_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 #include "../../../core/lv_obj.h" 17 18 #if LV_USE_TILEVIEW 19 20 /********************* 21 * DEFINES 22 *********************/ 23 24 /********************** 25 * TYPEDEFS 26 **********************/ 27 typedef struct { 28 lv_obj_t obj; 29 lv_obj_t * tile_act; 30 } lv_tileview_t; 31 32 typedef struct { 33 lv_obj_t obj; 34 lv_dir_t dir; 35 } lv_tileview_tile_t; 36 37 extern const lv_obj_class_t lv_tileview_class; 38 extern const lv_obj_class_t lv_tileview_tile_class; 39 40 /********************** 41 * GLOBAL PROTOTYPES 42 **********************/ 43 44 /** 45 * Create a Tileview object 46 * @param parent pointer to an object, it will be the parent of the new tileview 47 * @return pointer to the created tileview 48 */ 49 lv_obj_t * lv_tileview_create(lv_obj_t * parent); 50 51 lv_obj_t * lv_tileview_add_tile(lv_obj_t * tv, uint8_t col_id, uint8_t row_id, lv_dir_t dir); 52 53 void lv_obj_set_tile(lv_obj_t * tv, lv_obj_t * tile_obj, lv_anim_enable_t anim_en); 54 void lv_obj_set_tile_id(lv_obj_t * tv, uint32_t col_id, uint32_t row_id, lv_anim_enable_t anim_en); 55 56 lv_obj_t * lv_tileview_get_tile_act(lv_obj_t * obj); 57 58 /*===================== 59 * Other functions 60 *====================*/ 61 62 /********************** 63 * MACROS 64 **********************/ 65 66 #endif /*LV_USE_TILEVIEW*/ 67 68 #ifdef __cplusplus 69 } /*extern "C"*/ 70 #endif 71 72 #endif /*LV_TILEVIEW_H*/ 73