2004-11-05 Tambet Ingo <tambet@ximian.com>

* generator/OpaqueGen.cs: Add optional "parent" attribute to Opaque
	types.

svn path=/trunk/gtk-sharp/; revision=35681
This commit is contained in:
Tambet Ingo 2004-11-05 07:18:14 +00:00
parent fa86814e94
commit 2a3d6563db
2 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2004-11-05 Tambet Ingo <tambet@ximian.com>
* generator/OpaqueGen.cs: Add optional "parent" attribute to Opaque
types.
2004-11-04 Jeroen Zwartepoorte <jeroen@xs4all.nl>
* gnomevfs/Directory.cs: Add async GetEntries Uri alias.

View File

@ -66,10 +66,18 @@ namespace GtkSharp.Generation {
sw.WriteLine ();
sw.WriteLine ("#region Autogenerated code");
sw.Write ("\tpublic class {0} : GLib.Opaque", Name);
SymbolTable table = SymbolTable.Table;
sw.Write ("\tpublic class " + Name);
string cs_parent = table.GetCSType(Elem.GetAttribute("parent"));
if (cs_parent != "")
sw.Write (" : " + cs_parent);
else
sw.Write (" : GLib.Opaque");
sw.WriteLine (" {");
sw.WriteLine ();
GenMethods (gen_info, null, null);
GenCtors (gen_info);
sw.WriteLine ("#endregion");