_Eina_Model_Interface_Children Struct Reference
[Data Model Type management]
Interface to manage model's children.
More...
Data Fields | |
Eina_Model_Interface | base |
common interface methods | |
unsigned int | version |
must be EINA_MODEL_INTERFACE_CHILDREN_VERSION | |
Eina_Bool(* | compare )(const Eina_Model *a, const Eina_Model *b, int *cmp) |
How to compare children of this model. | |
Eina_Bool(* | load )(Eina_Model *model) |
How to load children of this model. | |
Eina_Bool(* | unload )(Eina_Model *model) |
How to unload children of this model. | |
int(* | count )(const Eina_Model *model) |
How many children of this model. | |
Eina_Model *(* | get )(const Eina_Model *model, unsigned int position) |
Retrieve a child of this model, returned child must have reference increased! | |
Eina_Bool(* | set )(Eina_Model *model, unsigned int position, Eina_Model *child) |
Set (replace) a child of this model, given child will have reference increased! | |
Eina_Bool(* | del )(Eina_Model *model, unsigned int position) |
Delete a child of this model. | |
Eina_Bool(* | insert_at )(Eina_Model *model, unsigned int position, Eina_Model *child) |
Insert a child into this model, given child will have reference increased! All elements towards the end of the internal list will be shifted to the end to make room for the new child. | |
void(* | sort )(Eina_Model *model, Eina_Compare_Cb compare) |
Reorder children to be sorted respecting comparison function compare() . |
Detailed Description
Interface to manage model's children.This extends Eina_Model_Interface as expected by interface name EINA_MODEL_INTERFACE_NAME_CHILDREN.
This interface is meant to help managing properties of a model, it is used by EINA_MODEL_TYPE_MIXIN in order to configure methods for children independently from properties.
- Since:
- 1.2
Field Documentation
Eina_Bool(* _Eina_Model_Interface_Children::del)(Eina_Model *model, unsigned int position) |
Delete a child of this model.
Existing child will have reference decreased!
Eina_Bool(* _Eina_Model_Interface_Children::insert_at)(Eina_Model *model, unsigned int position, Eina_Model *child) |
Insert a child into this model, given child will have reference increased! All elements towards the end of the internal list will be shifted to the end to make room for the new child.