1 /**
2  * @file lv_obj_class_private.h
3  *
4  */
5 
6 #ifndef LV_OBJ_CLASS_PRIVATE_H
7 #define LV_OBJ_CLASS_PRIVATE_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 
17 #include "lv_obj_class.h"
18 
19 /*********************
20  *      DEFINES
21  *********************/
22 
23 /**********************
24  *      TYPEDEFS
25  **********************/
26 
27 /**
28  * Describe the common methods of every object.
29  * Similar to a C++ class.
30  */
31 struct _lv_obj_class_t {
32     const lv_obj_class_t * base_class;
33     /** class_p is the final class while obj->class_p is the class currently being [de]constructed. */
34     void (*constructor_cb)(const lv_obj_class_t * class_p, lv_obj_t * obj);
35     void (*destructor_cb)(const lv_obj_class_t * class_p, lv_obj_t * obj);
36 
37     /** class_p is the class in which event is being processed. */
38     void (*event_cb)(const lv_obj_class_t * class_p, lv_event_t * e);  /**< Widget type specific event function*/
39 
40 #if LV_USE_OBJ_PROPERTY
41     uint32_t prop_index_start;
42     uint32_t prop_index_end;
43     const lv_property_ops_t * properties;
44     uint32_t properties_count;
45 
46 #if LV_USE_OBJ_PROPERTY_NAME
47     /* An array of property ID and name */
48     const lv_property_name_t * property_names;
49     uint32_t names_count;
50 #endif
51 #endif
52 
53     void * user_data;
54     const char * name;
55     int32_t width_def;
56     int32_t height_def;
57     uint32_t editable : 2;             /**< Value from ::lv_obj_class_editable_t*/
58     uint32_t group_def : 2;            /**< Value from ::lv_obj_class_group_def_t*/
59     uint32_t instance_size : 16;
60     uint32_t theme_inheritable : 1;    /**< Value from ::lv_obj_class_theme_inheritable_t*/
61 };
62 
63 
64 /**********************
65  * GLOBAL PROTOTYPES
66  **********************/
67 
68 void lv_obj_destruct(lv_obj_t * obj);
69 
70 /**********************
71  *      MACROS
72  **********************/
73 
74 #ifdef __cplusplus
75 } /*extern "C"*/
76 #endif
77 
78 #endif /*LV_OBJ_CLASS_PRIVATE_H*/
79