1 /** 2 * @file lv_obj_private.h 3 * 4 */ 5 6 #ifndef LV_OBJ_PRIVATE_H 7 #define LV_OBJ_PRIVATE_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 17 #include "lv_obj.h" 18 19 /********************* 20 * DEFINES 21 *********************/ 22 23 /********************** 24 * TYPEDEFS 25 **********************/ 26 27 /** 28 * Special, rarely used attributes. 29 * They are allocated automatically if any elements is set. 30 */ 31 struct _lv_obj_spec_attr_t { 32 lv_obj_t ** children; /**< Store the pointer of the children in an array.*/ 33 lv_group_t * group_p; 34 #if LV_DRAW_TRANSFORM_USE_MATRIX 35 lv_matrix_t * matrix; /**< The transform matrix*/ 36 #endif 37 lv_event_list_t event_list; 38 39 lv_point_t scroll; /**< The current X/Y scroll offset*/ 40 41 int32_t ext_click_pad; /**< Extra click padding in all direction*/ 42 int32_t ext_draw_size; /**< EXTend the size in every direction for drawing.*/ 43 44 uint16_t child_cnt; /**< Number of children*/ 45 uint16_t scrollbar_mode : 2; /**< How to display scrollbars, see `lv_scrollbar_mode_t`*/ 46 uint16_t scroll_snap_x : 2; /**< Where to align the snappable children horizontally, see `lv_scroll_snap_t`*/ 47 uint16_t scroll_snap_y : 2; /**< Where to align the snappable children vertically*/ 48 uint16_t scroll_dir : 4; /**< The allowed scroll direction(s), see `lv_dir_t`*/ 49 uint16_t layer_type : 2; /**< Cache the layer type here. Element of lv_intermediate_layer_type_t */ 50 }; 51 52 struct _lv_obj_t { 53 const lv_obj_class_t * class_p; 54 lv_obj_t * parent; 55 lv_obj_spec_attr_t * spec_attr; 56 lv_obj_style_t * styles; 57 #if LV_OBJ_STYLE_CACHE 58 uint32_t style_main_prop_is_set; 59 uint32_t style_other_prop_is_set; 60 #endif 61 void * user_data; 62 #if LV_USE_OBJ_ID 63 void * id; 64 #endif 65 lv_area_t coords; 66 lv_obj_flag_t flags; 67 lv_state_t state; 68 uint16_t layout_inv : 1; 69 uint16_t readjust_scroll_after_layout : 1; 70 uint16_t scr_layout_inv : 1; 71 uint16_t skip_trans : 1; 72 uint16_t style_cnt : 6; 73 uint16_t h_layout : 1; 74 uint16_t w_layout : 1; 75 uint16_t is_deleting : 1; 76 }; 77 78 79 /********************** 80 * GLOBAL PROTOTYPES 81 **********************/ 82 83 /********************** 84 * MACROS 85 **********************/ 86 87 #ifdef __cplusplus 88 } /*extern "C"*/ 89 #endif 90 91 #endif /*LV_OBJ_PRIVATE_H*/ 92