Commit Graph

25 Commits

Author SHA1 Message Date
Carsten Haitzler a82f27e2f0 tone down mempool chunk sizes
SVN revision: 72252
2012-06-17 01:51:27 +00:00
Gustavo Sverzut Barbieri 4626ec4435 note the bug spotted by Tasn.
SVN revision: 68824
2012-03-06 12:35:24 +00:00
Vincent Torri b10e9943ce Eina: remove ugly FMT_* compatibility strings as Evil has now POSIX printf family functions
SVN revision: 68087
2012-02-17 20:53:36 +00:00
Gustavo Sverzut Barbieri 88d6b934aa eina_model: new events for load/unload.
Added the events: loaded and unloaded to notify eina_model_load() and
eina_model_unload() were called.

To be more specific, the interfaces used by EINA_MODEL_TYPE_MIXIN
(Eina_Model_Interface_Properties and Eina_Model_Interface_Children)
also do:
 * properties,loaded
 * properties,unloaded
 * children,loaded
 * children,unloaded



SVN revision: 68035
2012-02-16 19:48:13 +00:00
Gustavo Sverzut Barbieri ca2db67b69 2/3 eina_model: properly eliminate duplicates.
We must check for duplicates otherwise we'll have remaining entries
after topological sort.



SVN revision: 68033
2012-02-16 19:31:56 +00:00
Gustavo Sverzut Barbieri 769d2e2210 1/3 eina_model: lookup interfaces in the correct order.
We should lookup then in forward order, as they are sorted from
most-specific first, with parents at the end.

This breaks test, will fix in the last commit (3/3).



SVN revision: 68032
2012-02-16 19:30:23 +00:00
Tom Hacohen b1bb770688 Eina model: Fix issues with interface inheritance.
The ptr comparison had issues.
Order of interface overrides was wrong.

SVN revision: 67915
2012-02-14 09:48:00 +00:00
Gustavo Sverzut Barbieri 4915aeb8db model: add helper for common pattern
SVN revision: 67845
2012-02-11 00:48:42 +00:00
Gustavo Sverzut Barbieri 687e59a102 eina_model: add xref/xunref, xrefs_get and models_usage_dump!
Let's try to help debug by allowing extended reference management that
takes in account an identifier. This identifier is accounted on xref
and xunref and must match.

xrefs_get will return the list of such references, for debugging purposes.

eina_models_list_get() was added to return all live models, just
tracked when EINA_MODEL_DEBUG is enabled.

eina_models_usage_dump() was added and use the same infrastructure as
eina_models_list_get() and eina_model_xrefs_get() to aid debugging :-)




SVN revision: 67821
2012-02-10 10:48:39 +00:00
Gustavo Sverzut Barbieri 0bcae96ccb eina_model: rename all "search" to "criteria_match"
SVN revision: 67796
2012-02-09 16:29:50 +00:00
Gustavo Sverzut Barbieri 013c986c40 eina_model: helper function to setup subclass during runtime.
SVN revision: 67795
2012-02-09 16:20:16 +00:00
Tom Hacohen 29c291ff3b Eina model: Made i_method_resolve a macro (for interface as well)
Same as the previous commit about "Type" this time about Interface.
This will also hopefully remove the likelihood for hacks.
Previous functions are still available as method_offset_resolve.

SVN revision: 67786
2012-02-09 10:32:14 +00:00
Tom Hacohen 1dbab17f64 Eina model: Made _method_resolve a macro to remove the need for offsetof.
This will also hopefully remove the likelihood for hacks.
Previous functions are still available as method_offset_resolve.

SVN revision: 67765
2012-02-08 15:37:07 +00:00
Gustavo Sverzut Barbieri 68d5bb81bc eina_model: correctly retrieve the memory from value.
val->value.ptr is just valid on 64bits platforms, as on 32bits both
pointers of the Eina_Value_Struct fits in the 8bytes of val->value.buf.

Always use the function to correctly retrieve it.



SVN revision: 67764
2012-02-08 15:13:25 +00:00
Tom Hacohen b5de0cf46b Eina model: Fix another issue with the method resolve functios.
Make it possible to resolve foo (the last item).
struct _My_Object_Type
{
   Eina_Model_Type parent_class;
   ...
   void (*foo)(Eina_Model *, int);
};

SVN revision: 67733
2012-02-07 13:24:27 +00:00
Tom Hacohen c0ab80f047 Eina Model: Fix wrong error checking in the method resolve functions.
This enables resolving method foo...
struct _My_Object_Type
{
   Eina_Model_Type parent;
   void (*foo)(Eina_Model *, int);
   ...
}

SVN revision: 67732
2012-02-07 13:17:13 +00:00
Jonas M. Gastal 90f5f268dc Change eina_mode_child_search to more descriptive
eina_model_child_criteria_match.

Patch by: "Jonas M. Gastal" <jgastal@profusion.mobi>



SVN revision: 67688
2012-02-02 12:32:13 +00:00
Gustavo Sverzut Barbieri 088ab8dd2b 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.




SVN revision: 67635
2012-01-31 15:26:48 +00:00
Tom Hacohen a45dd94b03 Eina model: fix a memory leak in the model's "to_string" function.
SVN revision: 67551
2012-01-26 16:42:00 +00:00
Gustavo Sverzut Barbieri 73b1d45d15 value got the helper, will be useful in other cases as well.
SVN revision: 67518
2012-01-24 22:56:17 +00:00
Gustavo Sverzut Barbieri 73b595df2f more efficient model properties based on struct.
this is a killer, should be very efficient in memory and speed to
set/get items: instead of a hash of properties, keep them in a C
struct!

The constraint is that properties have fixed types defined at compile
time and cannot be deleted, but this is expected in many cases (ie:
esql rows).




SVN revision: 67517
2012-01-24 22:17:57 +00:00
Iván Briano e4178ad8e6 dereference pointer before using
SVN revision: 67479
2012-01-23 16:51:02 +00:00
Vincent Torri 37ccabf61c Eina "Fix" printf conversion format on Windows. printf family on Windows is just plain weirdness
SVN revision: 67443
2012-01-22 08:55:02 +00:00
Gustavo Sverzut Barbieri 8fb1d6e036 eina_model: fix uninitialized bit
SVN revision: 67416
2012-01-21 06:26:32 +00:00
Gustavo Sverzut Barbieri 7c0357ddeb welcome eina_model.
This is a simple to use generic hierarchical data access. It includes
properties, children, reference counting and notifications (callbacks).

It can be understood in the same lines as GObject or PyObject, but I
believe the best usage is just to provide data models, not generic
Object Oriented Programming in C.

It misses most of documentation, although the important bits are
there. Need help here :-/



SVN revision: 67405
2012-01-21 01:30:09 +00:00