/* gcc -o types types.c $(pkg-config --cflags --libs gobject-2.0) */

#include <glib-object.h>

int
main(int argc, char **argv)
{
    GType cnt, type, last_type;

    g_type_init();

    last_type = 0;

    g_print("IS_DERIVABLE\tIS_DEEP_DERIVABLE\n");

    for (cnt = 1; cnt < g_type_fundamental_next(); ++cnt) {
        type = G_TYPE_FUNDAMENTAL(cnt);
        if (type != last_type) {
            g_print("\t%c\t\t%c\t\t %s (%d)\n",
                    G_TYPE_IS_DERIVABLE(type) ? 'x' : ' ',
                    G_TYPE_IS_DEEP_DERIVABLE(type) ? 'x' : ' ',
                    g_type_name(type), type);
            last_type = type;
        }
    }

    return 0;
}
