Not only GTK+, but all headers written in the style of GObject.
typedef struct _XClass XClass; // <- stops here
It could be a huge problem to users who use SWIG with GObject (like me).
The above code works fine in SWIG. I don't know what you are doing wrong, but 'stops here' doesn't indicate what the problem is. This code should work with all versions of SWIG, but you could at least provide the version number you are using.