escaped_printf (out, " <class name=\"%s\" get-type=\"%s\"",
g_type_name (type), symbol);
if (type != G_TYPE_OBJECT)
- escaped_printf (out, " parent=\"%s\"", g_type_name (g_type_parent (type)));
+ {
+ GString *parent_str;
+ GType parent;
+ gboolean first = TRUE;
+
+ parent = type;
+ parent_str = g_string_new ("");
+ do
+ {
+ parent = g_type_parent (parent);
+ if (first)
+ first = FALSE;
+ else
+ g_string_append_c (parent_str, ',');
+ g_string_append (parent_str, g_type_name (parent));
+ } while (parent != G_TYPE_OBJECT && parent != G_TYPE_INVALID);
+
+ escaped_printf (out, " parents=\"%s\"", parent_str->str);
+
+ g_string_free (parent_str, TRUE);
+ }
if (G_TYPE_IS_ABSTRACT (type))
escaped_printf (out, " abstract=\"1\"");
GType itype = interfaces[i];
if (itype == G_TYPE_OBJECT)
{
- /* This is implicit */
+ /* Treat this as implicit for now; in theory GInterfaces are
+ * supported on things like GstMiniObject, but right now
+ * the introspection system only supports GObject.
+ * http://bugzilla.gnome.org/show_bug.cgi?id=559706
+ */
continue;
}
escaped_printf (out, " <prerequisite name=\"%s\"/>\n",
/* GValue, etc. Just skip them. */
break;
default:
- g_warning ("unhandled gtype %s", g_type_name (type));
+ /* Other fundamental types such as the once GStreamer and Clutter registers
+ * are not yet interesting from an introspection perspective and should be
+ * ignored
+ */
+ break;
}
}
if (type == G_TYPE_INVALID)
{
- caught_error = TRUE;
+ g_printerr ("Invalid GType: '%s'\n", line);
+ caught_error = TRUE;
g_free (line);
break;
}