2003-05-13 Mike Kestner <mkestner@speakeasy.net>

* configure.in : bump the version to 0.10
	* generator/CallbackGen.cs (GenWrapper): Update sig preparing for
	external assembly wrapper generation. Kill doc comment generation.
	Make marshaling delegate internal.

svn path=/trunk/gtk-sharp/; revision=14564
This commit is contained in:
Mike Kestner 2003-05-14 00:27:00 +00:00
parent 2efbf0e96a
commit b09f7e3679
3 changed files with 22 additions and 12 deletions

View file

@ -1,3 +1,10 @@
2003-05-13 Mike Kestner <mkestner@speakeasy.net>
* configure.in : bump the version to 0.10
* generator/CallbackGen.cs (GenWrapper): Update sig preparing for
external assembly wrapper generation. Kill doc comment generation.
Make marshaling delegate internal.
2003-05-07 Mike Kestner <mkestner@speakeasy.net>
* generator/ClassBase.cs (GenSignals): remove doc comment param

View file

@ -2,7 +2,7 @@
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(gtk-sharp, 0.9)
AM_INIT_AUTOMAKE(gtk-sharp, 0.10)
AM_MAINTAINER_MODE
AC_CHECK_TOOL(CC, gcc, gcc)

View file

@ -49,44 +49,47 @@ namespace GtkSharp.Generation {
return FromNative (var);
}
private void GenWrapper (string s_ret, string sig)
public void GenWrapper (string ns)
{
char sep = Path.DirectorySeparatorChar;
string dir = ".." + sep + NS.ToLower() + sep + "generated";
string dir = ".." + sep + ns.ToLower() + sep + "generated";
if (!Directory.Exists (dir))
Directory.CreateDirectory (dir);
string wrapper = Name + "Native";
string filename = dir + sep + NS + "Sharp." + wrapper + ".cs";
string filename = dir + sep + ns + "Sharp." + wrapper + ".cs";
FileStream stream = new FileStream (filename, FileMode.Create, FileAccess.Write);
StreamWriter sw = new StreamWriter (stream);
sw.WriteLine ("// Generated File. Do not modify.");
sw.WriteLine ("// <c> 2001-2002 Mike Kestner");
sw.WriteLine ("// This file was generated by the Gtk# code generator.");
sw.WriteLine ("// Any changes made will be lost on regeneration.");
sw.WriteLine ();
sw.WriteLine ("namespace " + NS + "Sharp {");
sw.WriteLine ("namespace " + ns + "Sharp {");
sw.WriteLine ();
sw.WriteLine ("\tusing System;");
sw.WriteLine ();
sw.WriteLine ("#region Autogenerated code");
string import_sig;
string import_sig = "";
string sig = "";
if (parms != null)
{
parms.HideData = true;
parms.CreateSignature (false);
import_sig = parms.ImportSig;
} else
import_sig = "";
sig = parms.Signature;
}
XmlElement ret_elem = Elem["return-type"];
string rettype = ret_elem.GetAttribute("type");
string m_ret = SymbolTable.GetMarshalReturnType (rettype);
string s_ret = SymbolTable.GetCSType (rettype);
ClassBase ret_wrapper = SymbolTable.GetClassGen (rettype);
sw.WriteLine ("\tpublic delegate " + m_ret + " " + wrapper + "(" + import_sig + ");");
sw.WriteLine ("\tinternal delegate " + m_ret + " " + wrapper + "(" + import_sig + ");");
sw.WriteLine ();
sw.WriteLine ("\tpublic class " + Name + "Wrapper : GLib.DelegateWrapper {");
@ -220,7 +223,7 @@ namespace GtkSharp.Generation {
CloseWriter (sw);
GenWrapper (s_ret, sig);
GenWrapper (NS);
Statistics.CBCount++;
}