Basic Model abstraction.
A model in EFL can have a set of key-value properties, where key can only be a string. The value can be anything within an Eina_Value. If a property is not yet available EAGAIN is returned.
Additionally a model can have a list of children. The fetching of the children is asynchronous, this has the advantage of having as few data sets as possible in the memory itself.
Since 1.23
Add a new child.
Efl_Object *efl_model_child_add(Eo *obj);
Remove a child.
void efl_model_child_del(Eo *obj, Efl_Object *child);
children_count (get)
unsigned int efl_model_children_count_get(const Eo *obj);
Get children slice OR full range.
Eina_Future *efl_model_children_slice_get(Eo *obj, unsigned int start, unsigned int count);
properties (get)
Eina_Iterator *efl_model_properties_get(const Eo *obj);
property (get, set)
Eina_Value *efl_model_property_get(const Eo *obj, const char *property); Eina_Future *efl_model_property_set(Eo *obj, const char *property, Eina_Value *value);
Get a future value when it changes to something that is not error:EAGAIN
Eina_Future *efl_model_property_ready_get(Eo *obj, const char *property);
Event dispatched when new child is added.
EFL_MODEL_EVENT_CHILD_ADDED(Efl_Model_Children_Event, @beta)
Event dispatched when child is removed.
EFL_MODEL_EVENT_CHILD_REMOVED(Efl_Model_Children_Event, @beta)
Event dispatched when children count is finished.
EFL_MODEL_EVENT_CHILDREN_COUNT_CHANGED(void)
Event dispatched when properties list is available.
EFL_MODEL_EVENT_PROPERTIES_CHANGED(Efl_Model_Property_Event)