Lines Matching refs:fragment
39 void lv_fragment_del(lv_fragment_t * fragment) in lv_fragment_del() argument
41 LV_ASSERT_NULL(fragment); in lv_fragment_del()
42 if(fragment->managed) { in lv_fragment_del()
43 lv_fragment_manager_remove(fragment->managed->manager, fragment); in lv_fragment_del()
46 if(fragment->obj) { in lv_fragment_del()
47 lv_fragment_del_obj(fragment); in lv_fragment_del()
50 const lv_fragment_class_t * cls = fragment->cls; in lv_fragment_del()
52 cls->destructor_cb(fragment); in lv_fragment_del()
54 lv_fragment_manager_del(fragment->child_manager); in lv_fragment_del()
55 lv_mem_free(fragment); in lv_fragment_del()
58 lv_fragment_manager_t * lv_fragment_get_manager(lv_fragment_t * fragment) in lv_fragment_get_manager() argument
60 LV_ASSERT_NULL(fragment); in lv_fragment_get_manager()
61 LV_ASSERT_NULL(fragment->managed); in lv_fragment_get_manager()
62 return fragment->managed->manager; in lv_fragment_get_manager()
65 lv_obj_t * const * lv_fragment_get_container(lv_fragment_t * fragment) in lv_fragment_get_container() argument
67 LV_ASSERT_NULL(fragment); in lv_fragment_get_container()
68 LV_ASSERT_NULL(fragment->managed); in lv_fragment_get_container()
69 return fragment->managed->container; in lv_fragment_get_container()
72 lv_fragment_t * lv_fragment_get_parent(lv_fragment_t * fragment) in lv_fragment_get_parent() argument
74 LV_ASSERT_NULL(fragment); in lv_fragment_get_parent()
75 LV_ASSERT_NULL(fragment->managed); in lv_fragment_get_parent()
76 return lv_fragment_manager_get_parent_fragment(fragment->managed->manager); in lv_fragment_get_parent()
79 lv_obj_t * lv_fragment_create_obj(lv_fragment_t * fragment, lv_obj_t * container) in lv_fragment_create_obj() argument
81 lv_fragment_managed_states_t * states = fragment->managed; in lv_fragment_create_obj()
85 const lv_fragment_class_t * cls = fragment->cls; in lv_fragment_create_obj()
86 lv_obj_t * obj = cls->create_obj_cb(fragment, container); in lv_fragment_create_obj()
88 fragment->obj = obj; in lv_fragment_create_obj()
89 lv_fragment_manager_create_obj(fragment->child_manager); in lv_fragment_create_obj()
95 cls->obj_created_cb(fragment, obj); in lv_fragment_create_obj()
100 void lv_fragment_del_obj(lv_fragment_t * fragment) in lv_fragment_del_obj() argument
102 LV_ASSERT_NULL(fragment); in lv_fragment_del_obj()
103 lv_fragment_manager_del_obj(fragment->child_manager); in lv_fragment_del_obj()
104 lv_fragment_managed_states_t * states = fragment->managed; in lv_fragment_del_obj()
108 bool cb_removed = lv_obj_remove_event_cb(fragment->obj, cb_delete_assertion); in lv_fragment_del_obj()
111 LV_ASSERT_NULL(fragment->obj); in lv_fragment_del_obj()
112 const lv_fragment_class_t * cls = fragment->cls; in lv_fragment_del_obj()
114 cls->obj_will_delete_cb(fragment, fragment->obj); in lv_fragment_del_obj()
116 lv_obj_del(fragment->obj); in lv_fragment_del_obj()
118 cls->obj_deleted_cb(fragment, fragment->obj); in lv_fragment_del_obj()
123 fragment->obj = NULL; in lv_fragment_del_obj()
126 void lv_fragment_recreate_obj(lv_fragment_t * fragment) in lv_fragment_recreate_obj() argument
128 LV_ASSERT_NULL(fragment); in lv_fragment_recreate_obj()
129 LV_ASSERT_NULL(fragment->managed); in lv_fragment_recreate_obj()
130 lv_fragment_del_obj(fragment); in lv_fragment_recreate_obj()
131 lv_fragment_create_obj(fragment, *fragment->managed->container); in lv_fragment_recreate_obj()