Support versioned GType names
@alexl
Submitted by Alexander Larsson Link to original bug (#762063)
Description
Its becoming increasingly common to bundle internal libraries (like libglnx and libegg things) in your modules. If any two modules does this and we end up with two different versions of such an internal library then things will break pretty bad due to the type name collision.
One way to allow this is to add support for versioned gtypes. I'm attaching a work in progress proposal to this bug (also in the wip/alexl/versioned-types bracnh).
Another interesting advantage of this is that you can combine it with ELF symbol versioning, or RTLD_LOCAL to link gtk2 and gtk3 into the same process. I've made branches of gtk2 and gtk3 to demo this here: https://git.gnome.org/browse/gtk+/log/?h=wip/alexl/versioned-types-gtk2 https://git.gnome.org/browse/gtk+/log/?h=wip/alexl/versioned-types-gtk3
A minimal example app using both gtk2 and gtk3 is here: https://github.com/alexlarsson/test-multi-gtk