2009-08-19 Christian Hoff <christian_hoff@gmx.net>

* generator/*.cs: Add the "partial" keyword to each generated class, 
	struct and interface.

svn path=/trunk/gtk-sharp/; revision=140257
This commit is contained in:
Christian Hoff 2009-08-19 16:13:17 +00:00
parent ed804756cc
commit 50355ad102
6 changed files with 12 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2009-08-19 Christian Hoff <christian_hoff@gmx.net>
* generator/*.cs: Add the "partial" keyword to each generated class,
struct and interface.
2009-08-19 Christian Hoff <christian_hoff@gmx.net>
* glib/MainContext.cs: Add API to create new MainContexts. Add a few

View File

@ -73,7 +73,7 @@ namespace GtkSharp.Generation {
sw.WriteLine ("#region Autogenerated code");
if (IsDeprecated)
sw.WriteLine ("\t[Obsolete]");
sw.Write ("\t{0} class " + Name, IsInternal ? "internal" : "public");
sw.Write ("\t{0} partial class " + Name, IsInternal ? "internal" : "public");
sw.WriteLine (" {");
sw.WriteLine ();

View File

@ -230,7 +230,7 @@ namespace GtkSharp.Generation {
sw.WriteLine ("\tusing System.Runtime.InteropServices;");
sw.WriteLine ();
sw.WriteLine ("#region Autogenerated code");
sw.WriteLine ("\tpublic class " + Name + "Adapter : GLib.GInterfaceAdapter, " + QualifiedName + " {");
sw.WriteLine ("\tpublic partial class " + Name + "Adapter : GLib.GInterfaceAdapter, " + QualifiedName + " {");
sw.WriteLine ();
if (!IsConsumeOnly) {
@ -277,7 +277,7 @@ namespace GtkSharp.Generation {
sw.WriteLine ();
sw.WriteLine ("\t[GLib.GInterface (typeof (" + Name + "Adapter))]");
string access = IsInternal ? "internal" : "public";
sw.WriteLine ("\t" + access + " interface " + Name + "Implementor : GLib.IWrapper {");
sw.WriteLine ("\t" + access + " partial interface " + Name + "Implementor : GLib.IWrapper {");
sw.WriteLine ();
Hashtable vm_table = new Hashtable ();
foreach (InterfaceVM vm in interface_vms) {
@ -323,7 +323,7 @@ namespace GtkSharp.Generation {
sw.WriteLine ();
sw.WriteLine ("#region Autogenerated code");
string access = IsInternal ? "internal" : "public";
sw.WriteLine ("\t" + access + " interface " + Name + " : GLib.IWrapper {");
sw.WriteLine ("\t" + access + " partial interface " + Name + " : GLib.IWrapper {");
sw.WriteLine ();
foreach (Signal sig in sigs.Values) {

View File

@ -150,7 +150,7 @@ namespace GtkSharp.Generation {
sw.WriteLine ("\t[Obsolete]");
foreach (string attr in custom_attrs)
sw.WriteLine ("\t" + attr);
sw.Write ("\t{0} {1}class " + Name, IsInternal ? "internal" : "public", IsAbstract ? "abstract " : "");
sw.Write ("\t{0} partial {1}class " + Name, IsInternal ? "internal" : "public", IsAbstract ? "abstract " : "");
string cs_parent = table.GetCSType(Elem.GetAttribute("parent"));
if (cs_parent != "") {
di.objects.Add (CName, QualifiedName);

View File

@ -63,7 +63,7 @@ namespace GtkSharp.Generation {
if (IsDeprecated)
sw.WriteLine ("\t[Obsolete]");
sw.Write ("\t{0}{1}class " + Name, IsInternal ? "internal " : "public ", IsAbstract ? "abstract " : String.Empty);
sw.Write ("\t{0} partial {1}class " + Name, IsInternal ? "internal" : "public", IsAbstract ? "abstract " : String.Empty);
string cs_parent = table.GetCSType(Elem.GetAttribute("parent"));
if (cs_parent != "")
sw.Write (" : " + cs_parent);

View File

@ -160,7 +160,7 @@ namespace GtkSharp.Generation {
sw.WriteLine ("\t[Obsolete]");
sw.WriteLine ("\t[StructLayout(LayoutKind.Sequential)]");
string access = IsInternal ? "internal" : "public";
sw.WriteLine ("\t" + access + " struct " + Name + " {");
sw.WriteLine ("\t" + access + " partial struct " + Name + " {");
sw.WriteLine ();
need_read_native = false;