spuug can be used for 'plain' GObjects, but also for GTK+-widgets etc., and tries to be a bit smart with the code in spits out. I've been using it myself for a while, and it has been very helpful. However, a code generator is no more than that -- you still need to understand GObjects/GtkWidgets to use it. So, I would recommend writing a couple 'by hand' before using a tool like this one.
If you find any problems or you have improvements, please report them to meĀ·
Update: 24.12.2008: a new version 0.3 is available, mostly due to a patch from Viktor Nagy -- thanks!
$ spuug --help Copyright (c) 2006,2007,2008 Dirk-Jan C. Binnema. spuug is free software covered by the GNU General Public License v3 spuug is a script to generate GObject boilerplate code usage: spuug [OPTIONS] where options are: --class= ,-c : the classname (e.g. MyFooBar) --interface= ,-i : the interface name (e.g. MyFooBarIFace) --parent= ,-p : the parent classname (e.g. Bar) --namespace= ,-n : the namespace (e.g. My) --test,-t : generate test code as well --force,-f : overwrite existing files --help,-h : show this help text Example: $ spuug --class=FunkyFooBar --namespace=Funky --parent=GtkWidget will generate funky-foo-bar.c and funky-foo-bar.h with the boilerplate code and $ spuug --class=CuteThing --namespace=Cute --parent=GObject --test will generate cute-thing.c and cute-thing.h with the boilerplate code, and test-cute-thing.c and Makefile for testing