30typedef struct _lv_fragment_manager_t lv_fragment_manager_t;
32typedef struct _lv_fragment_t lv_fragment_t;
33typedef struct _lv_fragment_class_t lv_fragment_class_t;
34typedef struct _lv_fragment_managed_states_t lv_fragment_managed_states_t;
36struct _lv_fragment_t {
40 const lv_fragment_class_t * cls;
46 lv_fragment_managed_states_t * managed;
50 lv_fragment_manager_t * child_manager;
58struct _lv_fragment_class_t {
64 void (*constructor_cb)(lv_fragment_t * self,
void * args);
70 void (*destructor_cb)(lv_fragment_t * self);
76 void (*attached_cb)(lv_fragment_t * self);
82 void (*detached_cb)(lv_fragment_t * self);
97 void (*obj_created_cb)(lv_fragment_t * self,
lv_obj_t * obj);
105 void (*obj_will_delete_cb)(lv_fragment_t * self,
lv_obj_t * obj);
112 void (*obj_deleted_cb)(lv_fragment_t * self,
lv_obj_t * obj);
121 bool (*event_cb)(lv_fragment_t * self,
int code,
void * userdata);
126 size_t instance_size;
132typedef struct _lv_fragment_managed_states_t {
136 const lv_fragment_class_t * cls;
140 lv_fragment_manager_t * manager;
148 lv_fragment_t * instance;
161} lv_fragment_managed_states_t;
172lv_fragment_manager_t * lv_fragment_manager_create(lv_fragment_t * parent);
178void lv_fragment_manager_del(lv_fragment_manager_t * manager);
184void lv_fragment_manager_create_obj(lv_fragment_manager_t * manager);
190void lv_fragment_manager_del_obj(lv_fragment_manager_t * manager);
198void lv_fragment_manager_add(lv_fragment_manager_t * manager, lv_fragment_t * fragment,
lv_obj_t *
const * container);
205void lv_fragment_manager_remove(lv_fragment_manager_t * manager, lv_fragment_t * fragment);
213void lv_fragment_manager_push(lv_fragment_manager_t * manager, lv_fragment_t * fragment,
lv_obj_t *
const * container);
220bool lv_fragment_manager_pop(lv_fragment_manager_t * manager);
228void lv_fragment_manager_replace(lv_fragment_manager_t * manager, lv_fragment_t * fragment,
238bool lv_fragment_manager_send_event(lv_fragment_manager_t * manager,
int code,
void * userdata);
245size_t lv_fragment_manager_get_stack_size(lv_fragment_manager_t * manager);
252lv_fragment_t * lv_fragment_manager_get_top(lv_fragment_manager_t * manager);
260lv_fragment_t * lv_fragment_manager_find_by_container(lv_fragment_manager_t * manager,
const lv_obj_t * container);
267lv_fragment_t * lv_fragment_manager_get_parent_fragment(lv_fragment_manager_t * manager);
277lv_fragment_t * lv_fragment_create(
const lv_fragment_class_t * cls,
void * args);
283void lv_fragment_del(lv_fragment_t * fragment);
290lv_fragment_manager_t * lv_fragment_get_manager(lv_fragment_t * fragment);
297lv_obj_t *
const * lv_fragment_get_container(lv_fragment_t * fragment);
304lv_fragment_t * lv_fragment_get_parent(lv_fragment_t * fragment);
313lv_obj_t * lv_fragment_create_obj(lv_fragment_t * fragment,
lv_obj_t * container);
320void lv_fragment_del_obj(lv_fragment_t * fragment);
326void lv_fragment_recreate_obj(lv_fragment_t * fragment);