eina_model: change the way extensions are done.
authorbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 31 Jan 2012 15:26:48 +0000 (15:26 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 31 Jan 2012 15:26:48 +0000 (15:26 +0000)
commit588e205dd9fe779096438718b413f1ba2d91e44a
tree2d1895b6c14c2dddfd3f191508b82073d560578e
parente43012465f423b6e28e1cf06574255e5d799c176
eina_model: change the way extensions are done.

Thanks to Tasn review it was noticed that subclasses using "const void *value"
with sub-structure would have to resolve their methods manually, quite bad.

Then the extension will happen with structures inside structures, as
previously used in Evas_Smart_Class. To allow the system to resolve
the methods and keep it, it is now specificed the type_size.

A new function is added to help extensions:
eina_model_type_method_resolve(), together with few helper macros.

To allow Eina_Model_Type to be augmented with more methods without
breaking the ABI, 4 slots are left there. We expect we got it right
from beginning and these will never be used, but we can never be sure
;-)

Last but not least, similar changes were done to Eina_Model_Interface
for consistency matters.

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@67635 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
src/include/eina_model.h
src/lib/eina_model.c