1 /** 2 * @file lv_obj_class.h 3 * 4 */ 5 6 #ifndef LV_OBJ_CLASS_H 7 #define LV_OBJ_CLASS_H 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /********************* 14 * INCLUDES 15 *********************/ 16 #include "../misc/lv_types.h" 17 #include "../misc/lv_area.h" 18 #include "lv_obj_property.h" 19 20 /********************* 21 * DEFINES 22 *********************/ 23 24 /********************** 25 * TYPEDEFS 26 **********************/ 27 28 typedef enum { 29 LV_OBJ_CLASS_EDITABLE_INHERIT, /**< Check the base class. Must have 0 value to let zero initialized class inherit*/ 30 LV_OBJ_CLASS_EDITABLE_TRUE, 31 LV_OBJ_CLASS_EDITABLE_FALSE, 32 } lv_obj_class_editable_t; 33 34 typedef enum { 35 LV_OBJ_CLASS_GROUP_DEF_INHERIT, /**< Check the base class. Must have 0 value to let zero initialized class inherit*/ 36 LV_OBJ_CLASS_GROUP_DEF_TRUE, 37 LV_OBJ_CLASS_GROUP_DEF_FALSE, 38 } lv_obj_class_group_def_t; 39 40 typedef enum { 41 LV_OBJ_CLASS_THEME_INHERITABLE_FALSE, /**< Do not inherit theme from base class. */ 42 LV_OBJ_CLASS_THEME_INHERITABLE_TRUE, 43 } lv_obj_class_theme_inheritable_t; 44 45 typedef void (*lv_obj_class_event_cb_t)(lv_obj_class_t * class_p, lv_event_t * e); 46 /********************** 47 * GLOBAL PROTOTYPES 48 **********************/ 49 50 /** 51 * Create an object form a class descriptor 52 * @param class_p pointer to a class 53 * @param parent pointer to an object where the new object should be created 54 * @return pointer to the created object 55 */ 56 lv_obj_t * lv_obj_class_create_obj(const lv_obj_class_t * class_p, lv_obj_t * parent); 57 58 void lv_obj_class_init_obj(lv_obj_t * obj); 59 60 bool lv_obj_is_editable(lv_obj_t * obj); 61 62 bool lv_obj_is_group_def(lv_obj_t * obj); 63 64 /********************** 65 * MACROS 66 **********************/ 67 68 #ifdef __cplusplus 69 } /*extern "C"*/ 70 #endif 71 72 #endif /*LV_OBJ_CLASS_H*/ 73