Eo: Add eo_finalize. A func that's called at the end of eo_add.
authorTom Hacohen <tom@stosb.com>
Fri, 30 May 2014 10:17:36 +0000 (11:17 +0100)
committerTom Hacohen <tom@stosb.com>
Fri, 30 May 2014 10:22:36 +0000 (11:22 +0100)
commitf92e5d50f920720ea21146156b82ee422e77a0c1
treea9a4837fc25afbc7f30e9be63f121922486a6f1c
parenta3e58b7618ad72517f89fefe5a04491f04a68584
Eo: Add eo_finalize. A func that's called at the end of eo_add.

This function lets you hook at the end of eo_add and override it for a
class. This is essentially the first step towards killing custom
constructors. Instead of having a custom constructor, you should just
do:
eo_add(CLASS, parent, a_set(3), b_set("eou"));
eo_constructor is called at the beginning for pre-init things.
eo_finalize is called at the end, for actually finalizing and doing
things. This cleans up the API and possibly saves a lot of things that
would have been stupid and slow in the past, like loading an elm widget
with an existing theme, and then changing the theme.

** This breaks Eo ABI, please recompile elementary and everything else that
creates eo objects.

@feature
src/lib/eo/Eo.h
src/lib/eo/eo.c
src/lib/eo/eo_base.eo
src/lib/eo/eo_base_class.c
src/lib/eo/eo_private.h
src/tests/eo/suite/eo_test_general.c