2008-09-18 Mike Kestner <mkestner@novell.com>

* bootstrap-2.12: bump svn version.
	* generator/Signal.cs: add a workaround for G_TYPE_POINTER usage
	in the GtkEditable::text_inserted signal.  The signal parameter
	received by the closure will be an IntPtr, which we then have to
	use to read/write the value directly from unmanaged memory.
	[Fixes #427588]

svn path=/trunk/gtk-sharp/; revision=113547
This commit is contained in:
Mike Kestner 2008-09-19 16:29:23 +00:00
parent 667b1462d6
commit eae4bed64f
3 changed files with 23 additions and 1 deletions

View file

@ -1,3 +1,12 @@
2008-09-18 Mike Kestner <mkestner@novell.com>
* bootstrap-2.12: bump svn version.
* generator/Signal.cs: add a workaround for G_TYPE_POINTER usage
in the GtkEditable::text_inserted signal. The signal parameter
received by the closure will be an IntPtr, which we then have to
use to read/write the value directly from unmanaged memory.
[Fixes #427588]
2008-09-18 Mike Kestner <mkestner@novell.com>
* generator/LPGen.cs: remove WIN64LONGS hackery.

View file

@ -1,7 +1,7 @@
#!/bin/sh
# Run this to set configure.in up for an API version.
GTK_SHARP_VERSION=2.12.3
GTK_SHARP_VERSION=2.12.4
ASSEMBLY_VERSION=2.12.0.0
POLICY_VERSIONS="2.4 2.6 2.8 2.10"
GTK_REQUIRED_VERSION=2.12.0

View file

@ -201,6 +201,19 @@ namespace GtkSharp.Generation {
sw.WriteLine ("\tpublic class " + EventArgsName + " : GLib.SignalArgs {");
for (int i = 1; i < parms.Count; i++) {
sw.WriteLine ("\t\tpublic " + parms[i].CSType + " " + parms[i].StudlyName + "{");
if (parms[i].PassAs == "ref" && parms[i].CSType == "int") {
// Special hack around GtkEditable::text_inserted G_TYPE_POINTER usage
sw.WriteLine ("\t\t\tget {");
sw.WriteLine ("\t\t\t\treturn System.Runtime.InteropServices.Marshal.ReadInt32 ((IntPtr) Args[" + (i - 1) + "]);");
sw.WriteLine ("\t\t\t}");
sw.WriteLine ("\t\t\tset {");
sw.WriteLine ("\t\t\t\tSystem.Runtime.InteropServices.Marshal.WriteInt32 ((IntPtr) Args[" + (i - 1) + "], value);");
sw.WriteLine ("\t\t\t}");
sw.WriteLine ("\t\t}");
sw.WriteLine ();
continue;
}
if (parms[i].PassAs != "out") {
sw.WriteLine ("\t\t\tget {");
sw.WriteLine ("\t\t\t\treturn (" + parms[i].CSType + ") Args[" + (i - 1) + "];");