mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-01-11 13:55:40 +00:00
2003-10-04 Mike Kestner <mkestner@ximian.com>
* generator/CallbackGen.cs : remove CloseWriter call. * generator/GenBase.cs : kill CreateWriter and CloseWriter. svn path=/trunk/gtk-sharp/; revision=18616
This commit is contained in:
parent
460b3e5623
commit
be9946dca2
|
@ -1,3 +1,8 @@
|
||||||
|
2003-10-04 Mike Kestner <mkestner@ximian.com>
|
||||||
|
|
||||||
|
* generator/CallbackGen.cs : remove CloseWriter call.
|
||||||
|
* generator/GenBase.cs : kill CreateWriter and CloseWriter.
|
||||||
|
|
||||||
2003-10-04 Mike Kestner <mkestner@ximian.com>
|
2003-10-04 Mike Kestner <mkestner@ximian.com>
|
||||||
|
|
||||||
* generator/AliasGen.cs : stub new Generate overload.
|
* generator/AliasGen.cs : stub new Generate overload.
|
||||||
|
|
|
@ -170,11 +170,10 @@ namespace GtkSharp.Generation {
|
||||||
sw.WriteLine ("\t\t\tNativeDelegate = new {0} (NativeCallback);", wrapper);
|
sw.WriteLine ("\t\t\tNativeDelegate = new {0} (NativeCallback);", wrapper);
|
||||||
sw.WriteLine ("\t\t\t_managed = managed;");
|
sw.WriteLine ("\t\t\t_managed = managed;");
|
||||||
sw.WriteLine ("\t\t}");
|
sw.WriteLine ("\t\t}");
|
||||||
|
|
||||||
sw.WriteLine ("\t}");
|
sw.WriteLine ("\t}");
|
||||||
|
|
||||||
sw.WriteLine ("#endregion");
|
sw.WriteLine ("#endregion");
|
||||||
CloseWriter (sw);
|
sw.WriteLine ("}");
|
||||||
|
sw.Close ();
|
||||||
return ns + "Sharp." + Name + "Wrapper";
|
return ns + "Sharp." + Name + "Wrapper";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,39 +63,6 @@ namespace GtkSharp.Generation {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected StreamWriter CreateWriter ()
|
|
||||||
{
|
|
||||||
char sep = Path.DirectorySeparatorChar;
|
|
||||||
string dir = ".." + sep + NS.ToLower() + sep + "generated";
|
|
||||||
if (!Directory.Exists(dir)) {
|
|
||||||
Console.WriteLine ("creating " + dir);
|
|
||||||
Directory.CreateDirectory(dir);
|
|
||||||
}
|
|
||||||
String filename = dir + sep + Name + ".cs";
|
|
||||||
// Console.WriteLine ("creating " + filename);
|
|
||||||
|
|
||||||
FileStream stream = new FileStream (filename, FileMode.Create, FileAccess.Write);
|
|
||||||
StreamWriter sw = new StreamWriter (stream);
|
|
||||||
|
|
||||||
sw.WriteLine ("// This file was generated by the Gtk# code generator.");
|
|
||||||
sw.WriteLine ("// Any changes made will be lost if regenerated.");
|
|
||||||
sw.WriteLine ();
|
|
||||||
sw.WriteLine ("namespace " + NS + " {");
|
|
||||||
sw.WriteLine ();
|
|
||||||
sw.WriteLine ("\tusing System;");
|
|
||||||
sw.WriteLine ();
|
|
||||||
|
|
||||||
return sw;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void CloseWriter (StreamWriter sw)
|
|
||||||
{
|
|
||||||
sw.WriteLine ();
|
|
||||||
sw.WriteLine ("}");
|
|
||||||
sw.Flush();
|
|
||||||
sw.Close();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void AppendCustom (StreamWriter sw, string custom_dir)
|
public void AppendCustom (StreamWriter sw, string custom_dir)
|
||||||
{
|
{
|
||||||
char sep = Path.DirectorySeparatorChar;
|
char sep = Path.DirectorySeparatorChar;
|
||||||
|
|
Loading…
Reference in a new issue