And then “Iface” got removed, and the API was ready …

Tuesday, January 17th, 2006, I first mentioned that I was building this tinymail thing. Somewhere early that month I had announced the idea of implementing a better E-mail client for the Nokia 770. My idea was based around the proxy design pattern in combination with model view controller.

Today, almost nine months later, I proudly present you the birth of the API that actually really looks like what will be the API when I will release tinymail. I finally started caring enough about those “Iface” suffixes to remove them. I did the monkey work of renaming all the types that now conflicted with the interface name to have a detail prefix after the namespace thing. Now you have a naming scheme like this: TnyGpeDevice implements the interface TnyDevice which has a class struct called TnyDeviceIface. This is exactly like the API of GtkTreeModel interface which has GtkTreeModelIface as class struct and is implemented by GtkTreeModelSort, GtkTreeModelFilter, GtkTreeStore and GtkListStore. And in tinymail by TnyGtkAccountTreeModel, TnyGtkHeaderListModel and TnyGtkAttachListModel in libtinymailui-gtk

As a result of this monkey work, the gtk-doc API reference manual gets generated more clean AND people will actually stop whining about it. Which is great.

I only have one regression, and that is the Python bindings. The problem is that I generate the .defs files using some autotool tricks and the well known pygtk tools. The thing that reads the .h files doesn’t detect the difference between a GObject and a GTypeInterface it seems (I hinted the code generator using a regex that matched “.*Iface” on the type’s name, but that doesn’t work anymore of course). But I will probably fix this very soon (don’t worry, nor is the release ready yet anyway). Oh feel free to fix this for me if you are bored today. And here is a pointer to those bindings.