diff --git a/ChangeLog b/ChangeLog index e1d36290f..aca99f3d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2009-07-02 Christian Hoff + + * configure.in.in: Target .net 2.0 profile + * gapi-cdecl-insert: Kill. We are now using the UnmanagedFunctionPointerAttribute + for callbacks. + * glib/CdeclCallback: Mark obsolete. + * generator/*.cs: + * *.custom: Use [UnmanagedFunctionPointer (CallingConvention.Cdecl)] instead of + [GLib.CDeclCallback]. + 2009-06-15 Christian Hoff * gtk/Widget.custom: Don't use [MarshalAs] for struct fields since diff --git a/Makefile.am b/Makefile.am index d580f3f74..3af68cce7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,6 @@ SUBDIRS = sources generator parser glib gio cairo pango atk gdk gtk glade gtkdot EXTRA_DIST = \ mono.snk \ gtk-sharp.snk \ - gapi-cdecl-insert \ makefile.win32 \ policy.config.in \ AssemblyInfo.cs.in \ diff --git a/Makefile.include b/Makefile.include index 424b6e596..32481d024 100644 --- a/Makefile.include +++ b/Makefile.include @@ -55,16 +55,9 @@ $(POLICY_ASSEMBLIES) : policy.%.$(ASSEMBLY): policy.%.config $(SNK) build_sources = $(addprefix $(srcdir)/, $(sources)) AssemblyInfo.cs build_references = $(addprefix /r:, $(references)) $(MONO_CAIRO_LIBS) -if PLATFORM_WIN32 -GAPI_CDECL_INSERT=$(top_srcdir)/gapi-cdecl-insert --keyfile=$(SNK) $(ASSEMBLY) -else -GAPI_CDECL_INSERT= -endif - $(ASSEMBLY): generated-stamp $(SNK) $(build_sources) $(references) @rm -f $(ASSEMBLY).mdb $(CSC) $(CSFLAGS) -nowarn:0169,0612,0618 -unsafe -out:$(ASSEMBLY) -target:library $(build_references) $(GENERATED_SOURCES) $(build_sources) - $(GAPI_CDECL_INSERT) install-data-local: @if test -n '$(pkg)'; then \ diff --git a/atk/Util.custom b/atk/Util.custom index 8013a9793..30078fcf1 100644 --- a/atk/Util.custom +++ b/atk/Util.custom @@ -22,7 +22,7 @@ // Boston, MA 02111-1307, USA. - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate uint AddGlobalEventListenerNativeDelegate (GLib.Signal.EmissionHookNative hook, IntPtr event_type); static AddGlobalEventListenerDelegate add_global_event_listener_handler; @@ -51,7 +51,7 @@ } } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RemoveListenerNativeDelegate (uint listener_id); static RemoveListenerDelegate remove_global_event_listener_handler; diff --git a/cairo/Makefile.am b/cairo/Makefile.am index c73e03082..952592f68 100644 --- a/cairo/Makefile.am +++ b/cairo/Makefile.am @@ -1,17 +1,15 @@ ASSEMBLY_NAME = Mono.Cairo ASSEMBLY = $(ASSEMBLY_NAME).dll -POLICY_ASSEMBLY = policy.1.0.$(ASSEMBLY) -POLICY_CONFIG = policy.1.0.config if ENABLE_MONO_CAIRO -TARGET=$(ASSEMBLY) $(POLICY_ASSEMBLY) +TARGET=$(ASSEMBLY) else TARGET= endif noinst_DATA = $(TARGET) -CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb $(POLICY_ASSEMBLY) mono.snk +CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb mono.snk sources = \ Antialias.cs \ @@ -73,25 +71,17 @@ $(ASSEMBLY): $(build_sources) mono.snk @rm -f $(ASSEMBLY).mdb $(CSC) $(CSFLAGS) -nowarn:0169,0612,0618 -out:$(ASSEMBLY) -target:library $(references) $(build_sources) -$(POLICY_ASSEMBLY): $(srcdir)/$(POLICY_CONFIG) mono.snk - echo "Creating policy.1.0.$(ASSEMBLY)"; - $(AL) -link:$(POLICY_CONFIG) -out:$@ -keyfile:mono.snk; - install-data-local: @if test -n '$(TARGET)'; then \ echo "$(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS)"; \ $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) || exit 1; \ - echo "$(GACUTIL) /i $(POLICY_ASSEMBLY) /f $(GACUTIL_FLAGS)"; \ - $(GACUTIL) /i $(POLICY_ASSEMBLY) /f $(GACUTIL_FLAGS) || exit 1; \ fi uninstall-local: @if test -n '$(TARGET)'; then \ echo "$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \ $(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1; \ - echo "$(GACUTIL) /u policy.1.0.$(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \ - $(GACUTIL) /u policy.1.0.$(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1; \ fi -EXTRA_DIST = $(sources) $(POLICY_CONFIG) +EXTRA_DIST = $(sources) diff --git a/cairo/policy.1.0.config b/cairo/policy.1.0.config deleted file mode 100644 index 67533d21c..000000000 --- a/cairo/policy.1.0.config +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/configure.in.in b/configure.in.in index ee83e24df..f1c7c4667 100644 --- a/configure.in.in +++ b/configure.in.in @@ -122,7 +122,7 @@ if test "x$RUNTIME" != "no" ; then RUNTIME=mono fi -AC_PATH_PROG(CSC, mcs, no) +AC_PATH_PROG(CSC, gmcs, no) if test `uname -s` = "Darwin"; then LIB_PREFIX= LIB_SUFFIX=.dylib diff --git a/gapi-cdecl-insert b/gapi-cdecl-insert deleted file mode 100755 index ab40892c6..000000000 --- a/gapi-cdecl-insert +++ /dev/null @@ -1,67 +0,0 @@ -#!/bin/sh -# -# gapi-cdecl-insert : Inserts il into an assembly for CDecl callback delegates. -# -# Author: Christian Hoff -# -# Copyright (c) 2005 Novell, Inc. -# Copyright (c) 2009 Christian Hoff -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public -# License as published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write to the -# Free Software Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - -usage="Usage: gapi-cdecl-insert [--keyfile=] "; -while [ $1 ]; do - arg=`expr "$1" : '--keyfile=\(.*\)'` - if [ $? -eq 0 ]; then # check whether "expr" has returned an error code - if [ -z $keyfile ]; then - keyfile=$arg - else - echo -e "--keyfile option cannot be defined multiple times\n${usage}" - fi - else - if [ -z $assembly ]; then - assembly=$1 - else - echo -e "Only one input file allowed\n${usage}" - exit 1 - fi - fi - shift # Replaces $1 with next param -done -if [ -n "$keyfile" -a ! -r "$keyfile" ]; then - echo -e "${0}: ERROR: Assembly key file \"$keyfile\" does not exist" - exit 2 -fi -if [ ! -r "$assembly" ]; then - echo -e "${0}: ERROR: Assembly \"$assembly\" does not exist" - exit 3 -fi - -echo -e "${0}: Executing ildasm" -echo `ildasm ${assembly} /out:${assembly}.raw` - -echo -e "${0}: Parsing generated IL" -sed 's/^[ \t]*\.custom instance void .*GLib\.CDeclCallbackAttribute::\.ctor.*$/.custom instance void [mscorlib]System\.Runtime\.InteropServices\.UnmanagedFunctionPointerAttribute::\.ctor\(valuetype [mscorlib]System\.Runtime\.InteropServices\.CallingConvention\) = \( 01 00 02 00 00 00 00 00 \) /' < ${assembly}.raw > ${assembly}.il - -rm "$assembly" -echo -e "${0}: Executing ilasm" -if [ -z $keyfile ]; then - echo `ilasm /quiet /dll /output=${assembly} /resource=${assembly}.res ${assembly}.il` -else - echo `ilasm /quiet /dll /output=${assembly} /resource=${assembly}.res /key=${keyfile} ${assembly}.il` -fi -rm "${assembly}.raw" -rm "${assembly}.il" -rm "${assembly}.res" diff --git a/gdk/Pixbuf.custom b/gdk/Pixbuf.custom index 4594f734f..04d1077b7 100644 --- a/gdk/Pixbuf.custom +++ b/gdk/Pixbuf.custom @@ -188,7 +188,7 @@ this.notify = notify; } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] public delegate void NativeDelegate (IntPtr buf, IntPtr data); void ReleaseHandles (IntPtr buf, IntPtr data) diff --git a/generator/CallbackGen.cs b/generator/CallbackGen.cs index eff4cffb1..9bbf61b24 100644 --- a/generator/CallbackGen.cs +++ b/generator/CallbackGen.cs @@ -201,7 +201,7 @@ namespace GtkSharp.Generation { sw.WriteLine ("\tusing System.Runtime.InteropServices;"); sw.WriteLine (); sw.WriteLine ("#region Autogenerated code"); - sw.WriteLine ("\t[GLib.CDeclCallback]"); + sw.WriteLine ("\t[UnmanagedFunctionPointer (CallingConvention.Cdecl)]"); sw.WriteLine ("\tinternal delegate " + retval.MarshalType + " " + wrapper + "(" + parms.ImportSignature + ");"); sw.WriteLine (); GenInvoker (gen_info, sw); diff --git a/generator/Signal.cs b/generator/Signal.cs index f5def07f6..a3be2772e 100644 --- a/generator/Signal.cs +++ b/generator/Signal.cs @@ -219,7 +219,7 @@ namespace GtkSharp.Generation { native_signature += ", " + CallbackSig; native_signature += ", IntPtr gch"; - sw.WriteLine ("\t\t[GLib.CDeclCallback]"); + sw.WriteLine ("\t\t[UnmanagedFunctionPointer (CallingConvention.Cdecl)]"); sw.WriteLine ("\t\tdelegate {0} {1} ({2});", retval.ToNativeType, DelegateName, native_signature); sw.WriteLine (); sw.WriteLine ("\t\tstatic {0} {1} ({2})", retval.ToNativeType, CallbackName, native_signature); diff --git a/generator/VirtualMethod.cs b/generator/VirtualMethod.cs index 670eb2401..275662028 100644 --- a/generator/VirtualMethod.cs +++ b/generator/VirtualMethod.cs @@ -73,7 +73,7 @@ namespace GtkSharp.Generation { if (parms.Count > 0) native_signature += parms.ImportSignature; - sw.WriteLine ("\t\t[GLib.CDeclCallback]"); + sw.WriteLine ("\t\t[UnmanagedFunctionPointer (CallingConvention.Cdecl)]"); sw.WriteLine ("\t\tdelegate {0} {1}NativeDelegate ({2});", retval.ToNativeType, this.Name, native_signature); sw.WriteLine (); sw.WriteLine ("\t\tstatic {0} {1}_cb ({2})", retval.ToNativeType, this.Name, native_signature); diff --git a/glade/XML.custom b/glade/XML.custom index d713e4ffd..50a3f075a 100644 --- a/glade/XML.custom +++ b/glade/XML.custom @@ -182,7 +182,7 @@ this.handler_type = type; } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RawXMLConnectFunc (IntPtr handler_name, IntPtr objekt, IntPtr signal_name, IntPtr signal_data, IntPtr connect_object, int after, IntPtr user_data); diff --git a/glib/CDeclCallbackAttribute.cs b/glib/CDeclCallbackAttribute.cs index 533dbe427..43897292d 100644 --- a/glib/CDeclCallbackAttribute.cs +++ b/glib/CDeclCallbackAttribute.cs @@ -23,6 +23,7 @@ namespace GLib { using System; + [Obsolete ("Use System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute instead")] public sealed class CDeclCallbackAttribute : Attribute { } diff --git a/glib/DelegateWrapper.cs b/glib/DelegateWrapper.cs index c02060212..841d554fc 100644 --- a/glib/DelegateWrapper.cs +++ b/glib/DelegateWrapper.cs @@ -69,7 +69,7 @@ namespace GLib { } } - [CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] private delegate void DestroyNotify (IntPtr data); [DllImport("libgobject-2.0-0.dll")] diff --git a/glib/DestroyNotify.cs b/glib/DestroyNotify.cs index 820c6f573..f11dbc5dc 100644 --- a/glib/DestroyNotify.cs +++ b/glib/DestroyNotify.cs @@ -23,7 +23,7 @@ namespace GLib { using System; using System.Runtime.InteropServices; - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] public delegate void DestroyNotify (IntPtr data); public class DestroyHelper { diff --git a/glib/IOChannel.cs b/glib/IOChannel.cs index d41ce36bc..05ec27140 100644 --- a/glib/IOChannel.cs +++ b/glib/IOChannel.cs @@ -25,7 +25,7 @@ namespace GLibSharp { using System.Runtime.InteropServices; using GLib; - [CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] internal delegate bool IOFuncNative(IntPtr source, int condition, IntPtr data); internal class IOFuncWrapper { diff --git a/glib/Idle.cs b/glib/Idle.cs index 1bf8aa006..589eb8686 100755 --- a/glib/Idle.cs +++ b/glib/Idle.cs @@ -34,7 +34,7 @@ namespace GLib { public class Idle { - [CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool IdleHandlerInternal (); diff --git a/glib/Makefile.am b/glib/Makefile.am index 89c3b6358..0b8929335 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -92,16 +92,9 @@ gtk-sharp.snk: $(top_srcdir)/gtk-sharp.snk AssemblyInfo.cs: $(top_builddir)/AssemblyInfo.cs cp $(top_builddir)/AssemblyInfo.cs . -if PLATFORM_WIN32 -GAPI_CDECL_INSERT=$(top_srcdir)/gapi-cdecl-insert --keyfile=gtk-sharp.snk $(ASSEMBLY) -else -GAPI_CDECL_INSERT= -endif - $(ASSEMBLY): $(build_sources) gtk-sharp.snk AssemblyInfo.cs @rm -f $(ASSEMBLY).mdb $(CSC) $(CSFLAGS) -unsafe -nowarn:0169,0612,0618 -out:$(ASSEMBLY) -target:library $(references) $(build_sources) - $(GAPI_CDECL_INSERT) policy.%.config: $(top_builddir)/policy.config sed -e "s/@ASSEMBLY_NAME@/$(ASSEMBLY_NAME)/" -e "s/@POLICY@/$*/" $(top_builddir)/policy.config > $@ diff --git a/glib/ManagedValue.cs b/glib/ManagedValue.cs index 908da459b..19ac3a21f 100644 --- a/glib/ManagedValue.cs +++ b/glib/ManagedValue.cs @@ -58,9 +58,9 @@ namespace GLib { } } - [CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate IntPtr CopyFunc (IntPtr gch); - [CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void FreeFunc (IntPtr gch); static CopyFunc copy; diff --git a/glib/Object.cs b/glib/Object.cs index 61d1e61d7..f018cb5e4 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -257,7 +257,7 @@ namespace GLib { } } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void GetPropertyDelegate (IntPtr GObject, uint property_id, ref GLib.Value value, IntPtr pspec); static void GetPropertyCallback (IntPtr handle, uint property_id, ref GLib.Value value, IntPtr param_spec) @@ -275,7 +275,7 @@ namespace GLib { } } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void SetPropertyDelegate (IntPtr GObject, uint property_id, ref GLib.Value value, IntPtr pspec); static void SetPropertyCallback(IntPtr handle, uint property_id, ref GLib.Value value, IntPtr param_spec) @@ -475,7 +475,7 @@ namespace GLib { } } - [CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void NotifyDelegate (IntPtr handle, IntPtr pspec, IntPtr gch); void NotifyCallback (IntPtr handle, IntPtr pspec, IntPtr gch) diff --git a/glib/Signal.cs b/glib/Signal.cs index e8038c258..7dc3dbbe1 100644 --- a/glib/Signal.cs +++ b/glib/Signal.cs @@ -63,7 +63,7 @@ namespace GLib { public IntPtr param_types; } - [CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] public delegate bool EmissionHookNative (ref InvocationHint hint, uint n_pvals, IntPtr pvals, IntPtr data); public delegate bool EmissionHook (InvocationHint ihint, object[] inst_and_param_values); diff --git a/glib/SignalClosure.cs b/glib/SignalClosure.cs index 8402d09db..2fd4cfb14 100644 --- a/glib/SignalClosure.cs +++ b/glib/SignalClosure.cs @@ -136,7 +136,7 @@ namespace GLib { } } - [CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void ClosureMarshal (IntPtr closure, IntPtr return_val, uint n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data); static void MarshalCallback (IntPtr raw_closure, IntPtr return_val, uint n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) @@ -183,7 +183,7 @@ namespace GLib { } } - [CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void ClosureNotify (IntPtr data, IntPtr closure); static void NotifyCallback (IntPtr data, IntPtr raw_closure) diff --git a/glib/Spawn.cs b/glib/Spawn.cs index 9c1166ef8..32b78d21b 100644 --- a/glib/Spawn.cs +++ b/glib/Spawn.cs @@ -60,7 +60,7 @@ namespace GLib { public delegate void SpawnChildSetupFunc (); - [CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] internal delegate void SpawnChildSetupFuncNative (IntPtr gch); internal class SpawnChildSetupWrapper { diff --git a/glib/Timeout.cs b/glib/Timeout.cs index 082e6f7da..9cecc01cd 100755 --- a/glib/Timeout.cs +++ b/glib/Timeout.cs @@ -32,7 +32,7 @@ namespace GLib { public class Timeout { - [CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool TimeoutHandlerInternal (); internal class TimeoutProxy : SourceProxy { diff --git a/glib/ToggleRef.cs b/glib/ToggleRef.cs index a0235f495..1a16c8623 100644 --- a/glib/ToggleRef.cs +++ b/glib/ToggleRef.cs @@ -120,7 +120,7 @@ namespace GLib { } } - [CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void ToggleNotifyHandler (IntPtr data, IntPtr handle, bool is_last_ref); static void RefToggled (IntPtr data, IntPtr handle, bool is_last_ref) diff --git a/gtk/CellRenderer.custom b/gtk/CellRenderer.custom index c60215d97..dcfa6f437 100644 --- a/gtk/CellRenderer.custom +++ b/gtk/CellRenderer.custom @@ -46,7 +46,7 @@ // We have to implement this VM manually because x_offset, y_offset, width and height params may be NULL and therefore cannot be treated as "out int" // TODO: Implement "nullable" attribute for value type parameters in GAPI - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void OnGetSizeDelegate (IntPtr item, IntPtr widget, IntPtr cell_area_ptr, IntPtr x_offset, IntPtr y_offset, IntPtr width, IntPtr height); static void OnGetSize_cb (IntPtr item, IntPtr widget, IntPtr cell_area_ptr, IntPtr x_offset, IntPtr y_offset, IntPtr width, IntPtr height) diff --git a/gtk/Clipboard.custom b/gtk/Clipboard.custom index 4199427bb..817159865 100644 --- a/gtk/Clipboard.custom +++ b/gtk/Clipboard.custom @@ -88,7 +88,7 @@ static RichTextReceivedFuncNative rt_rcvd_marshaler; - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RichTextReceivedFuncNative (IntPtr clipboard, IntPtr format, IntPtr text, UIntPtr length, IntPtr data); diff --git a/gtk/Container.custom b/gtk/Container.custom index ba596679f..17e3ded3c 100644 --- a/gtk/Container.custom +++ b/gtk/Container.custom @@ -90,7 +90,7 @@ static extern void gtksharp_container_override_forall (IntPtr gtype, ForallDeleg [DllImport("gtksharpglue-2")] static extern void gtksharp_container_invoke_gtk_callback (IntPtr cb, IntPtr handle, IntPtr data); -[GLib.CDeclCallback] +[UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void ForallDelegate (IntPtr container, bool include_internals, IntPtr cb, IntPtr data); static ForallDelegate ForallOldCallback; diff --git a/gtk/Input.custom b/gtk/Input.custom index 15e5e5f9d..4052f6e6a 100644 --- a/gtk/Input.custom +++ b/gtk/Input.custom @@ -22,7 +22,7 @@ [DllImport("libgtk-win32-2.0-0.dll")] static extern uint gtk_input_add_full(int source, int condition, InputFunctionNative function, GtkSharp.CallbackMarshalNative marshal, IntPtr data, GLib.DestroyNotify destroy); - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void InputFunctionNative(IntPtr data, int source, int condition); class InputFunctionWrapper { diff --git a/gtk/ListStore.custom b/gtk/ListStore.custom index 7d7b553d8..951497b7d 100644 --- a/gtk/ListStore.custom +++ b/gtk/ListStore.custom @@ -223,7 +223,7 @@ return new TreeEnumerator(this); } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedSignalDelegate (IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr arg3, IntPtr gch); static void RowsReorderedSignalCallback (IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr arg3, IntPtr gch) @@ -249,7 +249,7 @@ } } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter, IntPtr new_order); static RowsReorderedVMDelegate RowsReorderedVMCallback; diff --git a/gtk/TextView.custom b/gtk/TextView.custom index 6ffebf4c4..756141aa6 100644 --- a/gtk/TextView.custom +++ b/gtk/TextView.custom @@ -35,7 +35,7 @@ Raw = gtk_text_view_new_with_buffer (buffer.Handle); } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void MoveFocusSignalDelegate (IntPtr arg0, int arg1, IntPtr gch); static void MoveFocusSignalCallback (IntPtr arg0, int arg1, IntPtr gch) @@ -55,7 +55,7 @@ } } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void MoveFocusVMDelegate (IntPtr text_view, int direction); static MoveFocusVMDelegate MoveFocusVMCallback; diff --git a/gtk/TreeModelAdapter.custom b/gtk/TreeModelAdapter.custom index 9d206e260..c5276e35d 100644 --- a/gtk/TreeModelAdapter.custom +++ b/gtk/TreeModelAdapter.custom @@ -77,7 +77,7 @@ return ret; } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedSignalDelegate (IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr arg3, IntPtr gch); static void RowsReorderedSignalCallback (IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr arg3, IntPtr gch) @@ -104,7 +104,7 @@ } #if false - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter, IntPtr new_order); static RowsReorderedVMDelegate RowsReorderedVMCallback; diff --git a/gtk/TreeModelFilter.custom b/gtk/TreeModelFilter.custom index b14602b3e..c18df86e2 100644 --- a/gtk/TreeModelFilter.custom +++ b/gtk/TreeModelFilter.custom @@ -81,7 +81,7 @@ return TreeIter.Zero; } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedSignalDelegate (IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr arg3, IntPtr gch); static void RowsReorderedSignalCallback (IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr arg3, IntPtr gch) @@ -107,7 +107,7 @@ } } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter, IntPtr new_order); static RowsReorderedVMDelegate RowsReorderedVMCallback; diff --git a/gtk/TreeModelSort.custom b/gtk/TreeModelSort.custom index c34b3dba2..b6d9aa36f 100644 --- a/gtk/TreeModelSort.custom +++ b/gtk/TreeModelSort.custom @@ -105,7 +105,7 @@ DefaultSortFunc = sort_func; } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedSignalDelegate (IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr arg3, IntPtr gch); static void RowsReorderedSignalCallback (IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr arg3, IntPtr gch) @@ -131,7 +131,7 @@ } } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter, IntPtr new_order); static RowsReorderedVMDelegate RowsReorderedVMCallback; diff --git a/gtk/TreeStore.custom b/gtk/TreeStore.custom index 1d82be605..ef7990079 100644 --- a/gtk/TreeStore.custom +++ b/gtk/TreeStore.custom @@ -403,7 +403,7 @@ DefaultSortFunc = sort_func; } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedSignalDelegate (IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr arg3, IntPtr gch); static void RowsReorderedSignalCallback (IntPtr arg0, IntPtr arg1, IntPtr arg2, IntPtr arg3, IntPtr gch) @@ -429,7 +429,7 @@ } } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter, IntPtr new_order); static RowsReorderedVMDelegate RowsReorderedVMCallback; diff --git a/gtk/Widget.custom b/gtk/Widget.custom index 94eefd5ec..b29c32ef0 100644 --- a/gtk/Widget.custom +++ b/gtk/Widget.custom @@ -191,7 +191,7 @@ struct GClosure { IntPtr notifiers; } -[GLib.CDeclCallback] +[UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void ClosureMarshal (IntPtr closure, IntPtr return_val, uint n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data); [DllImport("libgobject-2.0-0.dll")] diff --git a/gtk/Window.custom b/gtk/Window.custom index 81a218500..dbc628350 100755 --- a/gtk/Window.custom +++ b/gtk/Window.custom @@ -86,7 +86,7 @@ } } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void MoveFocusSignalDelegate (IntPtr arg0, int arg1, IntPtr gch); static void MoveFocusSignalCallback (IntPtr arg0, int arg1, IntPtr gch) @@ -106,7 +106,7 @@ } } - [GLib.CDeclCallback] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void MoveFocusVMDelegate (IntPtr window, int direction); static MoveFocusVMDelegate MoveFocusVMCallback;