2005-03-25 Mike Kestner <mkestner@novell.com>

* generator/CallbackGen.cs : add CDeclCallback attrs to native dels.
	* generator/Signal.cs : add CDeclCallback attrs to native dels.

svn path=/trunk/gtk-sharp/; revision=42256
This commit is contained in:
Mike Kestner 2005-03-25 18:13:00 +00:00
parent 4caefdec00
commit a7c49200ee
3 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-03-25 Mike Kestner <mkestner@novell.com>
* generator/CallbackGen.cs : add CDeclCallback attrs to native dels.
* generator/Signal.cs : add CDeclCallback attrs to native dels.
2005-03-25 Mike Kestner <mkestner@novell.com>
* */*.cs : tag native callback delegates with [CDeclCallback].

View File

@ -69,6 +69,7 @@ namespace GtkSharp.Generation {
sw.WriteLine ("\tusing System;");
sw.WriteLine ();
sw.WriteLine ("#region Autogenerated code");
sw.WriteLine ("\t[GLib.CDeclCallback]");
sw.WriteLine ("\tinternal delegate " + retval.MarshalType + " " + wrapper + "(" + isig + ");");
sw.WriteLine ();
sw.WriteLine ("\tinternal class " + Name + "Wrapper {");

View File

@ -192,6 +192,7 @@ namespace GtkSharp.Generation {
{
SymbolTable table = SymbolTable.Table;
sw.WriteLine ("\t\t[GLib.CDeclCallback]");
sw.WriteLine ("\t\tdelegate " + retval.ToNativeType + " " + DelegateName + " (" + CallbackSig + ");");
sw.WriteLine ();
sw.WriteLine ("\t\tstatic " + retval.ToNativeType + " " + CallbackName + " (" + CallbackSig + ")");
@ -321,6 +322,7 @@ namespace GtkSharp.Generation {
{
ImportSignature isig = new ImportSignature (parms, container_type.NS);
ManagedCallString call = new ManagedCallString (parms);
sw.WriteLine ("\t\t[GLib.CDeclCallback]");
sw.WriteLine ("\t\tdelegate " + retval.ToNativeType + " " + Name + "VMDelegate (" + isig.ToString () + ");\n");
sw.WriteLine ("\t\tstatic {0} {1};\n", Name + "VMDelegate", Name + "VMCallback");
sw.WriteLine ("\t\tstatic " + retval.ToNativeType + " " + Name.ToLower() + "_cb (" + isig.ToString () + ")");