lv_obj_class.h

Typedefs

typedef void (*lv_obj_class_event_cb_t)(struct _lv_obj_class_t *class_p, struct _lv_event_t *e)
typedef struct _lv_obj_class_t lv_obj_class_t

Describe the common methods of every object. Similar to a C++ class.

Enums

enum lv_obj_class_editable_t

Values:

enumerator LV_OBJ_CLASS_EDITABLE_INHERIT

Check the base class. Must have 0 value to let zero initialized class inherit

enumerator LV_OBJ_CLASS_EDITABLE_TRUE
enumerator LV_OBJ_CLASS_EDITABLE_FALSE
enum lv_obj_class_group_def_t

Values:

enumerator LV_OBJ_CLASS_GROUP_DEF_INHERIT

Check the base class. Must have 0 value to let zero initialized class inherit

enumerator LV_OBJ_CLASS_GROUP_DEF_TRUE
enumerator LV_OBJ_CLASS_GROUP_DEF_FALSE
enum lv_obj_class_theme_inheritable_t

Values:

enumerator LV_OBJ_CLASS_THEME_INHERITABLE_FALSE

Do not inherit theme from base class.

enumerator LV_OBJ_CLASS_THEME_INHERITABLE_TRUE

Functions

struct _lv_obj_t *lv_obj_class_create_obj(const struct _lv_obj_class_t *class_p, struct _lv_obj_t *parent)

Create an object form a class descriptor

Parameters:
  • class_p -- pointer to a class

  • parent -- pointer to an object where the new object should be created

Returns:

pointer to the created object

void lv_obj_class_init_obj(struct _lv_obj_t *obj)
void _lv_obj_destruct(struct _lv_obj_t *obj)
bool lv_obj_is_editable(struct _lv_obj_t *obj)
bool lv_obj_is_group_def(struct _lv_obj_t *obj)
struct _lv_obj_class_t
#include <lv_obj_class.h>

Describe the common methods of every object. Similar to a C++ class.

Public Members

const struct _lv_obj_class_t *base_class
void (*constructor_cb)(const struct _lv_obj_class_t *class_p, struct _lv_obj_t *obj)
void (*destructor_cb)(const struct _lv_obj_class_t *class_p, struct _lv_obj_t *obj)
void (*event_cb)(const struct _lv_obj_class_t *class_p, struct _lv_event_t *e)

Widget type specific event function

void *user_data
const char *name
lv_coord_t width_def
lv_coord_t height_def
uint32_t editable

Value from lv_obj_class_editable_t

uint32_t group_def

Value from lv_obj_class_group_def_t

uint32_t instance_size
uint32_t theme_inheritable

Value from lv_obj_class_theme_inheritable_t