mikroSDK Reference Manual
lv_obj_class.h
Go to the documentation of this file.
1
6#ifndef LV_OBJ_CLASS_H
7#define LV_OBJ_CLASS_H
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13/*********************
14 * INCLUDES
15 *********************/
16#include <stdint.h>
17#include <stdbool.h>
18
19/*********************
20 * DEFINES
21 *********************/
22
23
24/**********************
25 * TYPEDEFS
26 **********************/
27
28struct _lv_obj_t;
29struct _lv_obj_class_t;
30struct _lv_event_t;
31
32typedef enum {
34 LV_OBJ_CLASS_EDITABLE_TRUE,
35 LV_OBJ_CLASS_EDITABLE_FALSE,
37
38typedef enum {
40 LV_OBJ_CLASS_GROUP_DEF_TRUE,
41 LV_OBJ_CLASS_GROUP_DEF_FALSE,
43
44typedef void (*lv_obj_class_event_cb_t)(struct _lv_obj_class_t * class_p, struct _lv_event_t * e);
49typedef struct _lv_obj_class_t {
50 const struct _lv_obj_class_t * base_class;
51 void (*constructor_cb)(const struct _lv_obj_class_t * class_p, struct _lv_obj_t * obj);
52 void (*destructor_cb)(const struct _lv_obj_class_t * class_p, struct _lv_obj_t * obj);
53#if LV_USE_USER_DATA
54 void * user_data;
55#endif
56 void (*event_cb)(const struct _lv_obj_class_t * class_p,
57 struct _lv_event_t * e);
58 lv_coord_t width_def;
59 lv_coord_t height_def;
60 uint32_t editable : 2;
61 uint32_t group_def : 2;
62 uint32_t instance_size : 16;
64
65/**********************
66 * GLOBAL PROTOTYPES
67 **********************/
68
75struct _lv_obj_t * lv_obj_class_create_obj(const struct _lv_obj_class_t * class_p, struct _lv_obj_t * parent);
76
77void lv_obj_class_init_obj(struct _lv_obj_t * obj);
78
79void _lv_obj_destruct(struct _lv_obj_t * obj);
80
81bool lv_obj_is_editable(struct _lv_obj_t * obj);
82
83bool lv_obj_is_group_def(struct _lv_obj_t * obj);
84
85/**********************
86 * MACROS
87 **********************/
88
89
90#ifdef __cplusplus
91} /*extern "C"*/
92#endif
93
94#endif /*LV_OBJ_CLASS_H*/
struct _lv_obj_t * lv_obj_class_create_obj(const struct _lv_obj_class_t *class_p, struct _lv_obj_t *parent)
struct _lv_obj_class_t lv_obj_class_t
lv_obj_class_editable_t
Definition lv_obj_class.h:32
@ LV_OBJ_CLASS_EDITABLE_INHERIT
Definition lv_obj_class.h:33
lv_obj_class_group_def_t
Definition lv_obj_class.h:38
@ LV_OBJ_CLASS_GROUP_DEF_INHERIT
Definition lv_obj_class.h:39
Definition lv_event.h:94
Definition lv_obj_class.h:49
void(* event_cb)(const struct _lv_obj_class_t *class_p, struct _lv_event_t *e)
Definition lv_obj_class.h:56
uint32_t editable
Definition lv_obj_class.h:60
uint32_t group_def
Definition lv_obj_class.h:61
Definition lv_obj.h:174