diff --git a/ChangeLog b/ChangeLog index 31389a053..35f2c84e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-09-18 Mike Kestner + + * 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 * generator/LPGen.cs: remove WIN64LONGS hackery. diff --git a/bootstrap-2.12 b/bootstrap-2.12 index 9e6adcaa0..192438f0d 100755 --- a/bootstrap-2.12 +++ b/bootstrap-2.12 @@ -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 diff --git a/generator/Signal.cs b/generator/Signal.cs index 2629c346b..868394683 100644 --- a/generator/Signal.cs +++ b/generator/Signal.cs @@ -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) + "];");