Re-namespacing Pidgin's API for Introspection

Ankit Vani a at
Fri Feb 7 14:22:34 EST 2014


I've been working on gtk-doc conversion for a few days now, and I'm done
with the initial conversion. What I need to do now is to add all the
annotations etc. so as to make introspection work properly. So I started
by fixing warnings generated by g-ir-scanner, and I noticed quite a lot of
our symbols are getting skipped out of introspection due to them not
conforming to a particular namespace.

For instance, in pidgin, we have a lot of our code in the 'Gtk' namespace
(Gtk* structs and gtk_* functions), which introspection finds bad --
putting things into gtk's namespace. We also have stuff in the 'Pidgin'
namespace, which are not a problem (can be used as eg. Pidgin.StatusBox
from other langs). There are some such problems with libpurple, libgnt and
finch as well, but most of these issues are in pidgin. The nice solution
to this would be to move everything to 'Pidgin' namespace, or, we could
change it all into Gtk if you guys suggest so. This would require some big
changes (basically just some global replacements, so shouldn't break
anything major, if at all).

If we go forward with the re-namespacing, I'm thinking of doing it
directly in the default branch. If we decide against re-namespacing, then
introspection support for pidgin would be a terribly crippled (or it can
be disabled, which would be bad because non-C plugins won't be able to do
stuff with the UI).

Also, I have made some changes in libgnt to get gtk-doc and introspection
work -- one in particular that breaks ABI (renaming _get_gtype() funcs
to _get_type()). Is this alright? We have the version for GNT currently at

Please let me know your opinions, so I can move ahead accordingly with

Ankit Vani

More information about the Devel mailing list