1 /** 2 * @file lv_obj_style_private.h 3 * 4 */ 5 6 #ifndef LV_OBJ_STYLE_PRIVATE_H 7 #define LV_OBJ_STYLE_PRIVATE_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 17 #include "lv_obj_style.h" 18 19 /********************* 20 * DEFINES 21 *********************/ 22 23 /********************** 24 * TYPEDEFS 25 **********************/ 26 27 struct _lv_obj_style_t { 28 const lv_style_t * style; 29 uint32_t selector : 24; 30 uint32_t is_local : 1; 31 uint32_t is_trans : 1; 32 }; 33 34 struct _lv_obj_style_transition_dsc_t { 35 uint16_t time; 36 uint16_t delay; 37 lv_style_selector_t selector; 38 lv_style_prop_t prop; 39 lv_anim_path_cb_t path_cb; 40 void * user_data; 41 }; 42 43 44 /********************** 45 * GLOBAL PROTOTYPES 46 **********************/ 47 48 /** 49 * Initialize the object related style manager module. 50 * Called by LVGL in `lv_init()` 51 */ 52 void lv_obj_style_init(void); 53 54 /** 55 * Deinitialize the object related style manager module. 56 * Called by LVGL in `lv_deinit()` 57 */ 58 void lv_obj_style_deinit(void); 59 60 /** 61 * Used internally to create a style transition 62 * @param obj 63 * @param part 64 * @param prev_state 65 * @param new_state 66 * @param tr 67 */ 68 void lv_obj_style_create_transition(lv_obj_t * obj, lv_part_t part, lv_state_t prev_state, 69 lv_state_t new_state, const lv_obj_style_transition_dsc_t * tr); 70 71 /** 72 * Used internally to compare the appearance of an object in 2 states 73 * @param obj 74 * @param state1 75 * @param state2 76 * @return 77 */ 78 lv_style_state_cmp_t lv_obj_style_state_compare(lv_obj_t * obj, lv_state_t state1, lv_state_t state2); 79 80 /** 81 * Update the layer type of a widget bayed on its current styles. 82 * The result will be stored in `obj->spec_attr->layer_type` 83 * @param obj the object whose layer should be updated 84 */ 85 void lv_obj_update_layer_type(lv_obj_t * obj); 86 87 /********************** 88 * MACROS 89 **********************/ 90 91 #ifdef __cplusplus 92 } /*extern "C"*/ 93 #endif 94 95 #endif /*LV_OBJ_STYLE_PRIVATE_H*/ 96