feat(obj_class) separate lv_obj_class_create_obj into lv_obj_class_create_obj and lv_obj_class_init_obj

It allows using the new object reference somewhere before initializing it. Usuful for the Micropython binding.
This commit is contained in:
Gabor Kiss-Vamosi
2021-05-11 13:05:42 +02:00
parent 21a1dca21e
commit a46f20de91
32 changed files with 143 additions and 62 deletions

View File

@@ -73,7 +73,9 @@ const lv_obj_class_t lv_label_class = {
lv_obj_t * lv_label_create(lv_obj_t * parent)
{
LV_LOG_INFO("begin")
return lv_obj_class_create_obj(&lv_label_class, parent, NULL);
lv_obj_t * obj = lv_obj_class_create_obj(MY_CLASS, parent);
lv_obj_class_init_obj(obj);
return obj;
}
/*=====================