mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-02-25 11:07:06 +00:00
2003-01-05 Duncan Mak <duncan@ximian.com>
* generator/GenBase.cs (AppendCustom): Add #region to code from .custom files. * generator/*Gen.cs: Add #region markers. svn path=/trunk/gtk-sharp/; revision=10188
This commit is contained in:
parent
20160aa0fd
commit
fb60c23e4a
|
@ -1,3 +1,10 @@
|
||||||
|
2003-01-05 Duncan Mak <duncan@ximian.com>
|
||||||
|
|
||||||
|
* generator/GenBase.cs (AppendCustom): Add #region to code from
|
||||||
|
.custom files.
|
||||||
|
|
||||||
|
* generator/*Gen.cs: Add #region markers.
|
||||||
|
|
||||||
2003-01-05 Duncan Mak <duncan@ximian.com>
|
2003-01-05 Duncan Mak <duncan@ximian.com>
|
||||||
|
|
||||||
* sources/Gtk.metadata (TextIter.ForwardSearch): Add out param
|
* sources/Gtk.metadata (TextIter.ForwardSearch): Add out param
|
||||||
|
|
|
@ -72,6 +72,7 @@ namespace GtkSharp.Generation {
|
||||||
sw.WriteLine ("\tusing System;");
|
sw.WriteLine ("\tusing System;");
|
||||||
sw.WriteLine ();
|
sw.WriteLine ();
|
||||||
|
|
||||||
|
sw.WriteLine ("#region Autogenerated code");
|
||||||
string import_sig;
|
string import_sig;
|
||||||
if (parms != null)
|
if (parms != null)
|
||||||
{
|
{
|
||||||
|
@ -153,6 +154,7 @@ namespace GtkSharp.Generation {
|
||||||
|
|
||||||
sw.WriteLine ("\t}");
|
sw.WriteLine ("\t}");
|
||||||
|
|
||||||
|
sw.WriteLine ("#endregion");
|
||||||
CloseWriter (sw);
|
CloseWriter (sw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,8 @@ namespace GtkSharp.Generation {
|
||||||
if (Elem.GetAttribute("type") == "flags")
|
if (Elem.GetAttribute("type") == "flags")
|
||||||
sw.WriteLine ("\t[Flags]");
|
sw.WriteLine ("\t[Flags]");
|
||||||
|
|
||||||
|
sw.WriteLine ("#region Autogenerated code");
|
||||||
|
|
||||||
sw.WriteLine ("\tpublic enum " + Name + " {");
|
sw.WriteLine ("\tpublic enum " + Name + " {");
|
||||||
sw.WriteLine ();
|
sw.WriteLine ();
|
||||||
|
|
||||||
|
@ -84,6 +86,7 @@ namespace GtkSharp.Generation {
|
||||||
}
|
}
|
||||||
|
|
||||||
sw.WriteLine ("\t}");
|
sw.WriteLine ("\t}");
|
||||||
|
sw.WriteLine ("#endregion");
|
||||||
CloseWriter (sw);
|
CloseWriter (sw);
|
||||||
Statistics.EnumCount++;
|
Statistics.EnumCount++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,9 +99,11 @@ namespace GtkSharp.Generation {
|
||||||
char sep = Path.DirectorySeparatorChar;
|
char sep = Path.DirectorySeparatorChar;
|
||||||
string custom = ".." + sep + NS.ToLower() + sep + Name + ".custom";
|
string custom = ".." + sep + NS.ToLower() + sep + Name + ".custom";
|
||||||
if (File.Exists(custom)) {
|
if (File.Exists(custom)) {
|
||||||
|
sw.WriteLine ("#region Customized extensions");
|
||||||
FileStream custstream = new FileStream(custom, FileMode.Open, FileAccess.Read);
|
FileStream custstream = new FileStream(custom, FileMode.Open, FileAccess.Read);
|
||||||
StreamReader sr = new StreamReader(custstream);
|
StreamReader sr = new StreamReader(custstream);
|
||||||
sw.WriteLine (sr.ReadToEnd ());
|
sw.WriteLine (sr.ReadToEnd ());
|
||||||
|
sw.WriteLine ("#endregion");
|
||||||
sr.Close ();
|
sr.Close ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ namespace GtkSharp.Generation {
|
||||||
sw.WriteLine("\t\t/// <remarks>");
|
sw.WriteLine("\t\t/// <remarks>");
|
||||||
sw.WriteLine("\t\t/// </remarks>");
|
sw.WriteLine("\t\t/// </remarks>");
|
||||||
|
|
||||||
|
sw.WriteLine ("#region Autogenerated code");
|
||||||
sw.WriteLine ("\tpublic interface " + Name + " : GLib.IWrapper {");
|
sw.WriteLine ("\tpublic interface " + Name + " : GLib.IWrapper {");
|
||||||
sw.WriteLine ();
|
sw.WriteLine ();
|
||||||
|
|
||||||
|
@ -47,6 +48,7 @@ namespace GtkSharp.Generation {
|
||||||
AppendCustom (sw);
|
AppendCustom (sw);
|
||||||
|
|
||||||
sw.WriteLine ("\t}");
|
sw.WriteLine ("\t}");
|
||||||
|
sw.WriteLine ("#endregion");
|
||||||
CloseWriter (sw);
|
CloseWriter (sw);
|
||||||
Statistics.IFaceCount++;
|
Statistics.IFaceCount++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,8 @@ namespace GtkSharp.Generation {
|
||||||
sw.WriteLine("\t\t/// <summary> " + Name + " Class</summary>");
|
sw.WriteLine("\t\t/// <summary> " + Name + " Class</summary>");
|
||||||
sw.WriteLine("\t\t/// <remarks>");
|
sw.WriteLine("\t\t/// <remarks>");
|
||||||
sw.WriteLine("\t\t/// </remarks>");
|
sw.WriteLine("\t\t/// </remarks>");
|
||||||
|
|
||||||
|
sw.WriteLine ("#region Autogenerated code");
|
||||||
sw.Write ("\tpublic class " + Name);
|
sw.Write ("\tpublic class " + Name);
|
||||||
string cs_parent = SymbolTable.GetCSType(Elem.GetAttribute("parent"));
|
string cs_parent = SymbolTable.GetCSType(Elem.GetAttribute("parent"));
|
||||||
if (cs_parent != "")
|
if (cs_parent != "")
|
||||||
|
@ -129,6 +131,7 @@ namespace GtkSharp.Generation {
|
||||||
sw.WriteLine (" {\n\t\t\t get { return \"" + str.GetAttribute ("value") + "\"; }\n\t\t}");
|
sw.WriteLine (" {\n\t\t\t get { return \"" + str.GetAttribute ("value") + "\"; }\n\t\t}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sw.WriteLine ("#endregion");
|
||||||
AppendCustom(sw);
|
AppendCustom(sw);
|
||||||
|
|
||||||
sw.WriteLine ("\t}");
|
sw.WriteLine ("\t}");
|
||||||
|
@ -267,7 +270,6 @@ namespace GtkSharp.Generation {
|
||||||
sw.WriteLine ("\t}");
|
sw.WriteLine ("\t}");
|
||||||
sw.WriteLine ("}");
|
sw.WriteLine ("}");
|
||||||
sw.WriteLine ("}");
|
sw.WriteLine ("}");
|
||||||
|
|
||||||
sw.Flush ();
|
sw.Flush ();
|
||||||
sw.Close ();
|
sw.Close ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,12 +42,15 @@ namespace GtkSharp.Generation {
|
||||||
sw.WriteLine("\t\t/// <summary> " + Name + " Opaque Struct</summary>");
|
sw.WriteLine("\t\t/// <summary> " + Name + " Opaque Struct</summary>");
|
||||||
sw.WriteLine("\t\t/// <remarks>");
|
sw.WriteLine("\t\t/// <remarks>");
|
||||||
sw.WriteLine("\t\t/// </remarks>");
|
sw.WriteLine("\t\t/// </remarks>");
|
||||||
|
|
||||||
|
sw.WriteLine ("#region Autogenerated code");
|
||||||
sw.Write ("\tpublic class {0} : GLib.Opaque", Name);
|
sw.Write ("\tpublic class {0} : GLib.Opaque", Name);
|
||||||
sw.WriteLine (" {");
|
sw.WriteLine (" {");
|
||||||
sw.WriteLine ();
|
sw.WriteLine ();
|
||||||
|
|
||||||
GenMethods (sw, null, null, true);
|
GenMethods (sw, null, null, true);
|
||||||
GenCtors (sw);
|
GenCtors (sw);
|
||||||
|
sw.WriteLine ("#endregion");
|
||||||
|
|
||||||
AppendCustom(sw);
|
AppendCustom(sw);
|
||||||
|
|
||||||
|
|
|
@ -219,6 +219,7 @@ namespace GtkSharp.Generation {
|
||||||
sw.WriteLine("\t\t/// <remarks>");
|
sw.WriteLine("\t\t/// <remarks>");
|
||||||
sw.WriteLine("\t\t/// </remarks>");
|
sw.WriteLine("\t\t/// </remarks>");
|
||||||
|
|
||||||
|
sw.WriteLine ("#region Autogenerated code");
|
||||||
sw.WriteLine ("\t[StructLayout(LayoutKind.Sequential)]");
|
sw.WriteLine ("\t[StructLayout(LayoutKind.Sequential)]");
|
||||||
sw.WriteLine ("\tpublic struct " + Name + " {");
|
sw.WriteLine ("\tpublic struct " + Name + " {");
|
||||||
sw.WriteLine ();
|
sw.WriteLine ();
|
||||||
|
@ -227,6 +228,8 @@ namespace GtkSharp.Generation {
|
||||||
sw.WriteLine ();
|
sw.WriteLine ();
|
||||||
GenCtors (sw);
|
GenCtors (sw);
|
||||||
GenMethods (sw, null, null, true);
|
GenMethods (sw, null, null, true);
|
||||||
|
|
||||||
|
sw.WriteLine ("#endregion");
|
||||||
AppendCustom(sw);
|
AppendCustom(sw);
|
||||||
|
|
||||||
sw.WriteLine ("\t}");
|
sw.WriteLine ("\t}");
|
||||||
|
|
Loading…
Reference in a new issue