[vala] girwriter: Fix output of interface structs



commit 6f5bf0eceda8f735a2f276d2e32ecf9477863929
Author: Michal Hruby <michal mhr gmail com>
Date:   Mon Jan 31 18:20:33 2011 +0100

    girwriter: Fix output of interface structs

 codegen/valagirwriter.vala |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala
index 60ab49e..55fc523 100644
--- a/codegen/valagirwriter.vala
+++ b/codegen/valagirwriter.vala
@@ -416,9 +416,24 @@ public class Vala.GIRWriter : CodeVisitor {
 		buffer.append_printf (">\n");
 		indent++;
 
+		write_indent ();
+		buffer.append_printf ("<field name=\"parent_iface\">\n");
+		indent++;
+		write_indent ();
+		buffer.append_printf ("<type name=\"GObject.TypeInterface\" c:type=\"GTypeInterface\"/>\n");
+		indent--;
+		write_indent ();
+		buffer.append_printf ("</field>\n");
+
 		foreach (Method m in iface.get_methods ()) {
 			if (m.is_abstract || m.is_virtual) {
+				write_indent ();
+				buffer.append_printf("<field name=\"%s\">\n", m.name);
+				indent++;
 				write_signature(m, "callback", true);
+				indent--;
+				write_indent ();
+				buffer.append_printf ("</field>\n");
 			}
 		}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]