diff --git a/ChangeLog b/ChangeLog index 07c80cd3c..4d32f2a13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-09-03 Christian Hoff + + * glib/Global.cs: Kill the calling convention field again. + It breaks GLib 2.x compatibility in the generator and there is + probably no need to make the calling convention configurable. + * .cs, *.custom: Hardcode Cdecl calling convention instead of + using GLib's field. + 2009-09-02 Christian Hoff * glib/Global.cs: Add a public constant field specifying the diff --git a/atk/Global.custom b/atk/Global.custom index a7a7f9e48..9bed47cf2 100644 --- a/atk/Global.custom +++ b/atk/Global.custom @@ -22,7 +22,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libatk-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libatk-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint atk_add_global_event_listener (GLib.Signal.EmissionHookNative hook, IntPtr event_type); public static uint AddGlobalEventListener (GLib.Signal.EmissionHook hook, string event_type) diff --git a/atk/Util.custom b/atk/Util.custom index a46b59ef8..c0f2cad9d 100644 --- a/atk/Util.custom +++ b/atk/Util.custom @@ -22,7 +22,7 @@ // Boston, MA 02111-1307, USA. - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate uint AddGlobalEventListenerNativeDelegate (GLib.Signal.EmissionHookNative hook, IntPtr event_type); static AddGlobalEventListenerDelegate add_global_event_listener_handler; @@ -51,7 +51,7 @@ } } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RemoveListenerNativeDelegate (uint listener_id); static RemoveListenerDelegate remove_global_event_listener_handler; diff --git a/gdk/Color.custom b/gdk/Color.custom index 46f05673e..fc733032e 100644 --- a/gdk/Color.custom +++ b/gdk/Color.custom @@ -35,7 +35,7 @@ public Color (byte r, byte g, byte b) Pixel = 0; } -[DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint gdk_color_hash(ref Gdk.Color raw); public override int GetHashCode() { diff --git a/gdk/Device.custom b/gdk/Device.custom index f9f4a0ca8..c53d78891 100644 --- a/gdk/Device.custom +++ b/gdk/Device.custom @@ -25,7 +25,7 @@ [DllImport("gdksharpglue-3")] static extern DeviceKey gtksharp_gdk_device_get_device_key (IntPtr device, uint axis); - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_device_get_state(IntPtr device, IntPtr window, double [] axes, out int maskAsInt); @@ -44,10 +44,10 @@ return gtksharp_gdk_device_get_device_key (Handle, axis); } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_device_free_history(IntPtr events, int n_events); - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gdk_device_get_history(IntPtr device, IntPtr window, uint start, uint stop, out IntPtr events, out int n_events); public TimeCoord[] GetHistory (Gdk.Window window, uint start, uint stop) diff --git a/gdk/Display.custom b/gdk/Display.custom index 37894cfcb..41f5457e0 100644 --- a/gdk/Display.custom +++ b/gdk/Display.custom @@ -18,7 +18,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_display_get_pointer(IntPtr raw, IntPtr screen, out int x, out int y, out int mask); [Obsolete] @@ -28,7 +28,7 @@ mask = (Gdk.ModifierType) mask_as_int; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_display_get_pointer(IntPtr raw, out IntPtr screen, out int x, out int y, out int mask); public void GetPointer(out Gdk.Screen screen, out int x, out int y, out Gdk.ModifierType mask) { @@ -58,7 +58,7 @@ GetPointer (out screen, out x, out y, out mod); } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_display_list_devices (IntPtr raw); public Device[] ListDevices () @@ -73,7 +73,7 @@ return result; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_display_add_client_message_filter (IntPtr raw, IntPtr message_type, GdkSharp.FilterFuncNative func, IntPtr data); public void AddClientMessageFilter (Gdk.Atom message_type, Gdk.FilterFunc func) diff --git a/gdk/DisplayManager.custom b/gdk/DisplayManager.custom index 42cdeebbf..ceb783527 100644 --- a/gdk/DisplayManager.custom +++ b/gdk/DisplayManager.custom @@ -18,7 +18,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_display_manager_list_displays (IntPtr raw); public Display[] ListDisplays () diff --git a/gdk/Drawable.custom b/gdk/Drawable.custom index 03cb63aee..59cc166cd 100644 --- a/gdk/Drawable.custom +++ b/gdk/Drawable.custom @@ -24,7 +24,7 @@ public void DrawRectangle(Gdk.GC gc, bool filled, Gdk.Rectangle area) gdk_draw_rectangle(Handle, gc.Handle, filled, area.X, area.Y, area.Width, area.Height); } -[DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_draw_polygon(IntPtr raw, IntPtr gc, int filled, Gdk.Point[] points, int npoints); [Obsolete] @@ -38,7 +38,7 @@ public void DrawPolygon(Gdk.GC gc, bool filled, Gdk.Point[] points) gdk_draw_polygon(Handle, gc.Handle, filled ? 1 : 0, points, points.Length); } -[DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_draw_lines(IntPtr raw, IntPtr gc, Gdk.Point[] points, int npoints); public void DrawLines(Gdk.GC gc, Gdk.Point[] points) @@ -46,10 +46,10 @@ public void DrawLines(Gdk.GC gc, Gdk.Point[] points) gdk_draw_lines(Handle, gc.Handle, points, points.Length); } -[DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr gdk_x11_drawable_get_xdisplay (IntPtr raw); -[DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr gdk_x11_drawable_get_xid (IntPtr raw); #if MANLY_ENOUGH_TO_INCLUDE diff --git a/gdk/Event.cs b/gdk/Event.cs index 502a0b1d8..1e85d0b1b 100644 --- a/gdk/Event.cs +++ b/gdk/Event.cs @@ -39,7 +39,7 @@ namespace Gdk { get { return raw; } } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_event_get_type (); public static GLib.GType GType { diff --git a/gdk/Global.custom b/gdk/Global.custom index 1b17eabe3..05dc6c17d 100644 --- a/gdk/Global.custom +++ b/gdk/Global.custom @@ -19,7 +19,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_devices_list (); public static Device[] DevicesList () @@ -34,7 +34,7 @@ return result; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_list_visuals (); public static Visual[] ListVisuals () @@ -109,7 +109,7 @@ } } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gdk_init_check(ref int argc, ref IntPtr argv); public static bool InitCheck (ref string[] argv) @@ -123,7 +123,7 @@ return result; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_parse_args(ref int argc, ref IntPtr argv); public static void ParseArgs (ref string[] argv) @@ -136,7 +136,7 @@ argv = a.GetArgs (argc); } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_query_depths (out IntPtr depths, out int n_depths); public static int[] QueryDepths () @@ -148,7 +148,7 @@ Marshal.Copy (ptr, result, 0, count); return result; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_query_visual_types (out IntPtr types, out int n_types); public static VisualType[] QueryVisualTypes () diff --git a/gdk/Input.custom b/gdk/Input.custom index 05584fb68..44f2857ef 100644 --- a/gdk/Input.custom +++ b/gdk/Input.custom @@ -20,7 +20,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gdk_input_add_full (int source, int condition, GdkSharp.InputFunctionNative function, IntPtr data, GLib.DestroyNotify destroy); [Obsolete] diff --git a/gdk/Keymap.custom b/gdk/Keymap.custom index 9e1c9ccf2..8b7216cff 100644 --- a/gdk/Keymap.custom +++ b/gdk/Keymap.custom @@ -19,10 +19,10 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libglib-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_free(IntPtr ptr); - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gdk_keymap_get_entries_for_keycode(IntPtr raw, uint hardware_keycode, out IntPtr keys, out IntPtr keyvals, out int n_entries); public void GetEntriesForKeycode(uint hardware_keycode, out Gdk.KeymapKey[] keys, out uint[] keyvals) @@ -47,7 +47,7 @@ } } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gdk_keymap_get_entries_for_keyval(IntPtr raw, uint keyval, out IntPtr keys, out int n_keys); public KeymapKey[] GetEntriesForKeyval (uint keyval) diff --git a/gdk/Pixbuf.custom b/gdk/Pixbuf.custom index c00948942..eadc93929 100644 --- a/gdk/Pixbuf.custom +++ b/gdk/Pixbuf.custom @@ -32,7 +32,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_pixbuf_get_from_drawable(IntPtr raw, IntPtr src, IntPtr cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height); public Gdk.Pixbuf GetFromDrawable(Gdk.Drawable src, Gdk.Colormap cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height) { @@ -45,7 +45,7 @@ return ret; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_pixbuf_get_from_image(IntPtr raw, IntPtr src, IntPtr cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height); public Gdk.Pixbuf GetFromImage(Gdk.Image src, Gdk.Colormap cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height) { @@ -58,7 +58,7 @@ return ret; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_pixbuf_render_pixmap_and_mask (IntPtr raw, out IntPtr pixmap_return, out IntPtr mask_return, int alpha_threshold); public void RenderPixmapAndMask (out Pixmap pixmap_return, out Pixmap mask_return, int alpha_threshold) @@ -69,7 +69,7 @@ mask_return = GLib.Object.GetObject (mask_handle) as Pixmap; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_pixbuf_render_pixmap_and_mask_for_colormap (IntPtr raw, IntPtr colormap, out IntPtr pixmap_return, out IntPtr mask_return, int alpha_threshold); public void RenderPixmapAndMaskForColormap (Colormap colormap, out Pixmap pixmap_return, out Pixmap mask_return, int alpha_threshold) @@ -80,21 +80,21 @@ mask_return = GLib.Object.GetObject (mask_handle) as Pixmap; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_pixbuf_render_threshold_alpha(IntPtr raw, IntPtr bitmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_threshold); public void RenderThresholdAlpha(Gdk.Pixmap bitmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_threshold) { gdk_pixbuf_render_threshold_alpha(Handle, bitmap.Handle, src_x, src_y, dest_x, dest_y, width, height, alpha_threshold); } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_pixbuf_render_to_drawable(IntPtr raw, IntPtr drawable, IntPtr gc, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int dither, int x_dither, int y_dither); public void RenderToDrawable(Gdk.Drawable drawable, Gdk.GC gc, int src_x, int src_y, int dest_x, int dest_y, int width, int height, Gdk.RgbDither dither, int x_dither, int y_dither) { gdk_pixbuf_render_to_drawable(Handle, drawable.Handle, gc.Handle, src_x, src_y, dest_x, dest_y, width, height, (int) dither, x_dither, y_dither); } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_pixbuf_render_to_drawable_alpha(IntPtr raw, IntPtr drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_mode, int alpha_threshold, int dither, int x_dither, int y_dither); public void RenderToDrawableAlpha(Gdk.Drawable drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height, Gdk.PixbufAlphaMode alpha_mode, int alpha_threshold, Gdk.RgbDither dither, int x_dither, int y_dither) { @@ -148,7 +148,7 @@ return new Pixbuf (System.Reflection.Assembly.GetCallingAssembly (), resource); } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_pixbuf_scale_simple(IntPtr raw, int dest_width, int dest_height, int interp_type); public Gdk.Pixbuf ScaleSimple(int dest_width, int dest_height, Gdk.InterpType interp_type) { @@ -157,7 +157,7 @@ return ret; } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_pixbuf_composite_color_simple(IntPtr raw, int dest_width, int dest_height, int interp_type, int overall_alpha, int check_size, uint color1, uint color2); public Gdk.Pixbuf CompositeColorSimple(int dest_width, int dest_height, Gdk.InterpType interp_type, int overall_alpha, int check_size, uint color1, uint color2) { @@ -166,7 +166,7 @@ return ret; } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_pixbuf_add_alpha(IntPtr raw, bool substitute_color, byte r, byte g, byte b); public Gdk.Pixbuf AddAlpha(bool substitute_color, byte r, byte g, byte b) { @@ -188,7 +188,7 @@ this.notify = notify; } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] public delegate void NativeDelegate (IntPtr buf, IntPtr data); void ReleaseHandles (IntPtr buf, IntPtr data) @@ -208,7 +208,7 @@ } } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_pixbuf_new_from_data(byte[] data, int colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, DestroyHelper.NativeDelegate destroy_fn, IntPtr destroy_fn_data); public Pixbuf (byte[] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, Gdk.PixbufDestroyNotify destroy_fn) : base (IntPtr.Zero) @@ -234,7 +234,7 @@ if (error != IntPtr.Zero) throw new GLib.GException (error); } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern unsafe IntPtr gdk_pixbuf_new_from_inline(int len, IntPtr data, bool copy_pixels, out IntPtr error); public unsafe Pixbuf(int data_length, void *data, bool copy_pixels) : base (IntPtr.Zero) @@ -274,7 +274,7 @@ // // the 'Pixels' property // - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_pixbuf_get_pixels(IntPtr raw); public IntPtr Pixels { @@ -284,7 +284,7 @@ } } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_pixbuf_get_formats(); public static PixbufFormat[] Formats { @@ -300,7 +300,7 @@ } } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern unsafe bool gdk_pixbuf_save(IntPtr raw, IntPtr filename, IntPtr type, out IntPtr error, IntPtr dummy); public unsafe bool Save(string filename, string type) { @@ -314,10 +314,10 @@ return ret; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_free (IntPtr raw); - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern unsafe bool gdk_pixbuf_save_to_bufferv (IntPtr raw, out IntPtr buffer, out IntPtr buffer_size, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); IntPtr[] NullTerm (string[] src) @@ -365,7 +365,7 @@ return result; } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern unsafe bool gdk_pixbuf_save_to_callbackv (IntPtr raw, GdkSharp.PixbufSaveFuncNative save_func, IntPtr user_data, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); public unsafe void SaveToCallback (PixbufSaveFunc save_func, string type) diff --git a/gdk/PixbufLoader.custom b/gdk/PixbufLoader.custom index 0b87760b8..5e9e04ff0 100644 --- a/gdk/PixbufLoader.custom +++ b/gdk/PixbufLoader.custom @@ -21,7 +21,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgobject-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_object_ref (IntPtr handle); internal IntPtr PixbufHandle { diff --git a/gdk/Pixdata.custom b/gdk/Pixdata.custom index 6af613131..f87db1268 100644 --- a/gdk/Pixdata.custom +++ b/gdk/Pixdata.custom @@ -16,7 +16,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_pixdata_serialize (ref Gdk.Pixdata raw, out uint len); public byte [] Serialize () { diff --git a/gdk/Pixmap.custom b/gdk/Pixmap.custom index 1b55a0d42..75a8b3a38 100644 --- a/gdk/Pixmap.custom +++ b/gdk/Pixmap.custom @@ -20,7 +20,7 @@ public Pixmap (Gdk.Drawable drawable, int width, int height) : this (drawable, width, height, -1) {} - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_pixmap_colormap_create_from_xpm (IntPtr drawable, IntPtr colormap, IntPtr mask, IntPtr transparent_color, IntPtr filename); public static Gdk.Pixmap ColormapCreateFromXpm(Gdk.Drawable drawable, Gdk.Colormap colormap, string filename) @@ -31,7 +31,7 @@ return GLib.Object.GetObject (raw_ret) as Gdk.Pixmap; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_pixmap_colormap_create_from_xpm_d (IntPtr drawable, IntPtr colormap, IntPtr mask, IntPtr transparent_color, IntPtr data); public static Gdk.Pixmap ColormapCreateFromXpmD(Gdk.Drawable drawable, Gdk.Colormap colormap, string data) @@ -42,7 +42,7 @@ return GLib.Object.GetObject (raw_ret) as Gdk.Pixmap; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_pixmap_create_from_xpm (IntPtr drawable, IntPtr mask, IntPtr transparent_color, IntPtr filename); public static Gdk.Pixmap CreateFromXpm(Gdk.Drawable drawable, string filename) @@ -53,7 +53,7 @@ return GLib.Object.GetObject (raw_ret) as Gdk.Pixmap; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_pixmap_create_from_xpm_d (IntPtr drawable, IntPtr mask, IntPtr transparent_color, IntPtr data); public static Gdk.Pixmap CreateFromXpmD(Gdk.Drawable drawable, string data) diff --git a/gdk/Property.custom b/gdk/Property.custom index 773a37d4d..98a37639b 100644 --- a/gdk/Property.custom +++ b/gdk/Property.custom @@ -20,7 +20,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_property_change(IntPtr window, IntPtr property, IntPtr type, int format, int mode, out byte data, int nelements); [Obsolete ("Replaced by corrected overload with data parameter")] @@ -30,7 +30,7 @@ return data; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gdk_property_get(IntPtr window, IntPtr property, IntPtr type, UIntPtr offset, UIntPtr length, bool pdelete, out IntPtr actual_property_type, out int actual_format, out int actual_length, out IntPtr data); public static bool Get(Gdk.Window window, Gdk.Atom property, Gdk.Atom type, ulong offset, ulong length, int pdelete, out Gdk.Atom actual_property_type, out int actual_format, out int actual_length, out byte[] data) { diff --git a/gdk/Region.custom b/gdk/Region.custom index e4a7bb94c..c5e559672 100644 --- a/gdk/Region.custom +++ b/gdk/Region.custom @@ -20,10 +20,10 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. -[DllImport ("libglib-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_free (IntPtr mem); -[DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_region_get_rectangles(IntPtr raw, out IntPtr rectangles, out int n_rectangles); public Rectangle[] GetRectangles () diff --git a/gdk/Screen.custom b/gdk/Screen.custom index 6b33afafa..c769728e2 100644 --- a/gdk/Screen.custom +++ b/gdk/Screen.custom @@ -18,7 +18,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_screen_get_toplevel_windows (IntPtr raw); public Window[] ToplevelWindows @@ -35,7 +35,7 @@ } } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_screen_list_visuals (IntPtr raw); public Visual[] ListVisuals () @@ -50,10 +50,10 @@ return result; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_screen_get_font_options(IntPtr raw); - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_screen_set_font_options(IntPtr raw, IntPtr options); [GLib.Property ("font-options")] diff --git a/gdk/TextProperty.cs b/gdk/TextProperty.cs index 195f9bd3f..8cbad952f 100644 --- a/gdk/TextProperty.cs +++ b/gdk/TextProperty.cs @@ -26,10 +26,10 @@ namespace Gdk { public class TextProperty { - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_free_text_list(IntPtr ptr); - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gdk_text_property_to_utf8_list(IntPtr encoding, int format, byte[] text, int length, out IntPtr list); public static string[] ToStringList (Gdk.Atom encoding, int format, byte[] text, int length) @@ -49,7 +49,7 @@ namespace Gdk { return result; } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gdk_text_property_to_utf8_list_for_display(IntPtr display, IntPtr encoding, int format, byte[] text, int length, out IntPtr list); public static string[] ToStringListForDisplay (Gdk.Display display, Gdk.Atom encoding, int format, byte[] text, int length) diff --git a/gdk/Window.custom b/gdk/Window.custom index 735a8b866..59f356570 100644 --- a/gdk/Window.custom +++ b/gdk/Window.custom @@ -24,7 +24,7 @@ public Window (Gdk.Window parent, Gdk.WindowAttr attributes, Gdk.WindowAttributesType attributes_mask) : this (parent, attributes, (int)attributes_mask) {} - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_window_get_children(IntPtr raw); public Window[] Children { @@ -40,7 +40,7 @@ } } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_window_set_icon_list(IntPtr raw, IntPtr pixbufs); public Pixbuf[] IconList { @@ -52,7 +52,7 @@ } } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gdk_window_get_toplevels(); public static Window[] Toplevels { @@ -68,10 +68,10 @@ } } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_object_ref (IntPtr raw); - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_window_destroy(IntPtr raw); public void Destroy () @@ -95,10 +95,10 @@ gdk_window_clear_area (Handle, rect.X, rect.Y, rect.Width, rect.Height); } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_window_get_user_data (IntPtr raw, out IntPtr data); - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_window_set_user_data(IntPtr raw, IntPtr user_data); public IntPtr UserData { get { @@ -111,10 +111,10 @@ } } - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_window_add_filter (IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data); - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gdk_window_remove_filter (IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data); static Hashtable filter_all_hash; diff --git a/generator/CallbackGen.cs b/generator/CallbackGen.cs index 240b4d924..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[UnmanagedFunctionPointer (GLib.Global.CallingConvention)]"); + 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/Ctor.cs b/generator/Ctor.cs index 4ff2daae3..8b06d2089 100644 --- a/generator/Ctor.cs +++ b/generator/Ctor.cs @@ -66,7 +66,7 @@ namespace GtkSharp.Generation { void GenerateImport (StreamWriter sw) { - sw.WriteLine("\t\t[DllImport(\"" + LibraryName + "\", CallingConvention = GLib.Global.CallingConvention)]"); + sw.WriteLine("\t\t[DllImport(\"" + LibraryName + "\", CallingConvention = CallingConvention.Cdecl)]"); sw.WriteLine("\t\tstatic extern " + Safety + "IntPtr " + CName + "(" + Parameters.ImportSignature + ");"); sw.WriteLine(); } diff --git a/generator/EnumGen.cs b/generator/EnumGen.cs index f1c651c7f..ca781881b 100644 --- a/generator/EnumGen.cs +++ b/generator/EnumGen.cs @@ -112,7 +112,7 @@ namespace GtkSharp.Generation { if (Elem.HasAttribute ("gtype")) { sw.WriteLine (); sw.WriteLine ("\tinternal class " + Name + "GType {"); - sw.WriteLine ("\t\t[DllImport (\"" + LibraryName + "\", CallingConvention = GLib.Global.CallingConvention)]"); + sw.WriteLine ("\t\t[DllImport (\"" + LibraryName + "\", CallingConvention = CallingConvention.Cdecl)]"); sw.WriteLine ("\t\tstatic extern IntPtr " + Elem.GetAttribute ("gtype") + " ();"); sw.WriteLine (); sw.WriteLine ("\t\tpublic static GLib.GType GType {"); diff --git a/generator/Method.cs b/generator/Method.cs index 45a7fbf4e..516faa7bd 100644 --- a/generator/Method.cs +++ b/generator/Method.cs @@ -185,7 +185,7 @@ namespace GtkSharp.Generation { string import_sig = IsStatic ? "" : container_type.MarshalType + " raw"; import_sig += !IsStatic && Parameters.Count > 0 ? ", " : ""; import_sig += Parameters.ImportSignature.ToString(); - sw.WriteLine("\t\t[DllImport(\"" + LibraryName + "\", CallingConvention = GLib.Global.CallingConvention)]"); + sw.WriteLine("\t\t[DllImport(\"" + LibraryName + "\", CallingConvention = CallingConvention.Cdecl)]"); if (retval.MarshalType.StartsWith ("[return:")) sw.WriteLine("\t\t" + retval.MarshalType + " static extern " + Safety + retval.CSType + " " + CName + "(" + import_sig + ");"); else diff --git a/generator/Signal.cs b/generator/Signal.cs index 26e2ea624..bd6937b0b 100644 --- a/generator/Signal.cs +++ b/generator/Signal.cs @@ -221,7 +221,7 @@ namespace GtkSharp.Generation { native_signature += ", " + CallbackSig; native_signature += ", IntPtr gch"; - sw.WriteLine ("\t\t[UnmanagedFunctionPointer (GLib.Global.CallingConvention)]"); + 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 b46a739dd..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[UnmanagedFunctionPointer (GLib.Global.CallingConvention)]"); + 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/gio/AppInfoAdapter.custom b/gio/AppInfoAdapter.custom index f115b787d..aea897b12 100644 --- a/gio/AppInfoAdapter.custom +++ b/gio/AppInfoAdapter.custom @@ -18,7 +18,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgio-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_app_info_get_all(); public static GLib.AppInfo[] GetAll() { diff --git a/gio/FileAdapter.custom b/gio/FileAdapter.custom index c7fec328f..900366f82 100644 --- a/gio/FileAdapter.custom +++ b/gio/FileAdapter.custom @@ -32,7 +32,7 @@ public bool Delete () return Delete (null); } -[DllImport ("libgio-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_file_get_uri(IntPtr raw); public System.Uri Uri { diff --git a/gio/FileFactory.cs b/gio/FileFactory.cs index 4a4428b6b..163fa4265 100644 --- a/gio/FileFactory.cs +++ b/gio/FileFactory.cs @@ -27,7 +27,7 @@ namespace GLib { public class FileFactory { - [DllImport ("libgio-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr g_file_new_for_uri (string uri); public static File NewForUri (string uri) @@ -40,7 +40,7 @@ namespace GLib return GLib.FileAdapter.GetObject (g_file_new_for_uri (uri.ToString ()), false) as File; } - [DllImport ("libgio-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr g_file_new_for_path (string path); public static File NewForPath (string path) @@ -48,7 +48,7 @@ namespace GLib return GLib.FileAdapter.GetObject (g_file_new_for_path (path), false) as File; } - [DllImport ("libgio-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgio-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr g_file_new_for_commandline_arg (string arg); public static File NewFromCommandlineArg (string arg) diff --git a/glade/XML.custom b/glade/XML.custom index 37d005c28..526a173a7 100644 --- a/glade/XML.custom +++ b/glade/XML.custom @@ -27,7 +27,7 @@ // keep this around so it doesn't get GC'd static GladeSharp.XMLCustomWidgetHandlerWrapper callback_wrapper = null; - [DllImport ("libglade-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void glade_set_custom_handler (GladeSharp.XMLCustomWidgetHandlerNative handler, IntPtr user_data); public static Glade.XMLCustomWidgetHandler CustomHandler { @@ -69,7 +69,7 @@ } } - [DllImport ("libglade-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr glade_get_widget_name (IntPtr widget); static public string GetWidgetName (Gtk.Widget w) { @@ -82,7 +82,7 @@ return ret; } - [DllImport ("libglade-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr glade_get_widget_tree (IntPtr widget); static public Glade.XML GetWidgetTree (Gtk.Widget w) { @@ -93,7 +93,7 @@ /* a constructor that reads the XML from a Stream */ - [DllImport ("libglade-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr glade_xml_new_from_buffer(byte[] buffer, int size, IntPtr root, IntPtr domain); public XML (System.IO.Stream s, string root, string domain) : base (IntPtr.Zero) @@ -182,12 +182,12 @@ this.handler_type = type; } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [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); - [DllImport ("libglade-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void glade_xml_signal_autoconnect_full (IntPtr raw, RawXMLConnectFunc func, IntPtr user_data); @@ -417,7 +417,7 @@ System.Reflection.Assembly.GetCallingAssembly (), resource_name, root, domain); } - [DllImport ("libglade-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr glade_xml_get_widget_prefix(IntPtr raw, IntPtr name); public Gtk.Widget[] GetWidgetPrefix(string name) diff --git a/glib/Argv.cs b/glib/Argv.cs index c3c2a90e9..10893d218 100644 --- a/glib/Argv.cs +++ b/glib/Argv.cs @@ -30,10 +30,10 @@ namespace GLib { IntPtr handle; bool add_progname = false; - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_malloc(IntPtr size); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_free (IntPtr mem); ~Argv () diff --git a/glib/DelegateWrapper.cs b/glib/DelegateWrapper.cs index 803622b04..1dc473ed7 100644 --- a/glib/DelegateWrapper.cs +++ b/glib/DelegateWrapper.cs @@ -69,10 +69,10 @@ namespace GLib { } } - [UnmanagedFunctionPointer (Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] private delegate void DestroyNotify (IntPtr data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] private static extern void g_object_set_data_full (IntPtr obj, IntPtr name, IntPtr data, DestroyNotify destroy); private void AddDestroyNotify (GLib.Object o) { diff --git a/glib/DestroyNotify.cs b/glib/DestroyNotify.cs index e8c419f40..f11dbc5dc 100644 --- a/glib/DestroyNotify.cs +++ b/glib/DestroyNotify.cs @@ -23,7 +23,7 @@ namespace GLib { using System; using System.Runtime.InteropServices; - [UnmanagedFunctionPointer (Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] public delegate void DestroyNotify (IntPtr data); public class DestroyHelper { diff --git a/glib/FileUtils.cs b/glib/FileUtils.cs index 7d568ee1f..00e421543 100644 --- a/glib/FileUtils.cs +++ b/glib/FileUtils.cs @@ -27,7 +27,7 @@ namespace GLib { public class FileUtils { - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] extern static bool g_file_get_contents (IntPtr filename, out IntPtr contents, out int length, out IntPtr error); public static string GetFileContents (string filename) diff --git a/glib/Format.cs b/glib/Format.cs index 2e4f3b35f..d75fbe6d4 100644 --- a/glib/Format.cs +++ b/glib/Format.cs @@ -26,7 +26,7 @@ using System.Runtime.InteropServices; namespace GLib { #if GTK_SHARP_2_14 public class Format { - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_format_size_for_display (long size); static public string SizeForDisplay (long size) diff --git a/glib/GException.cs b/glib/GException.cs index 6bdae2563..fab3ba364 100644 --- a/glib/GException.cs +++ b/glib/GException.cs @@ -46,7 +46,7 @@ namespace GLib { } } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_clear_error (ref IntPtr errptr); ~GException () { diff --git a/glib/GString.cs b/glib/GString.cs index ed5618703..cb8c0c158 100644 --- a/glib/GString.cs +++ b/glib/GString.cs @@ -27,7 +27,7 @@ namespace GLib { IntPtr handle; - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_string_free (IntPtr mem, bool free_segments); ~GString () @@ -35,7 +35,7 @@ namespace GLib { g_string_free (handle, true); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_string_new (IntPtr text); public GString (string text) diff --git a/glib/GType.cs b/glib/GType.cs index 02a1d0a00..07c4bb42c 100755 --- a/glib/GType.cs +++ b/glib/GType.cs @@ -396,31 +396,31 @@ namespace GLib { return GType.Is (ValFromInstancePtr (raw), this); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_type_class_peek (IntPtr gtype); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_type_class_ref (IntPtr gtype); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_type_from_name (string name); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_type_init (); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_type_name (IntPtr raw); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_type_parent (IntPtr type); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_type_query (IntPtr type, out GTypeQuery query); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_type_register_static (IntPtr parent, IntPtr name, ref GTypeInfo info, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_type_is_a (IntPtr type, IntPtr is_a_type); } } diff --git a/glib/Global.cs b/glib/Global.cs index bb3e1bc60..918d48d2a 100644 --- a/glib/Global.cs +++ b/glib/Global.cs @@ -31,8 +31,6 @@ namespace GLib { //this is a static class private Global () {} - public const System.Runtime.InteropServices.CallingConvention CallingConvention = System.Runtime.InteropServices.CallingConvention.Cdecl; - public static string ProgramName { get { return GLib.Marshaller.PtrToStringGFree(g_get_prgname()); @@ -44,10 +42,10 @@ namespace GLib { } } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_set_prgname (IntPtr name); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_get_prgname (); public static string ApplicationName { @@ -61,10 +59,10 @@ namespace GLib { } } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_set_application_name (IntPtr name); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_get_application_name (); } } diff --git a/glib/IOChannel.cs b/glib/IOChannel.cs index e2aab7c37..0db0e3160 100644 --- a/glib/IOChannel.cs +++ b/glib/IOChannel.cs @@ -25,7 +25,7 @@ namespace GLibSharp { using System.Runtime.InteropServices; using GLib; - [UnmanagedFunctionPointer (Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] internal delegate bool IOFuncNative(IntPtr source, int condition, IntPtr data); internal class IOFuncWrapper { @@ -319,100 +319,100 @@ namespace GLib { return (IOChannelError) g_io_channel_error_from_errno (en); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_io_channel_unix_new (int fd); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_io_channel_new_file (IntPtr filename, IntPtr mode, out IntPtr error); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_error_quark (); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_error_from_errno (int en); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_flush (IntPtr raw, out IntPtr error); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_io_channel_init (IntPtr raw); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_read_chars (IntPtr raw, byte[] buf, UIntPtr count, out UIntPtr bytes_read, out IntPtr error); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_read_line (IntPtr raw, out IntPtr str_return, IntPtr length, out UIntPtr terminator_pos, out IntPtr error); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_read_to_end (IntPtr raw, out IntPtr str_return, out UIntPtr length, out IntPtr error); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_read_unichar (IntPtr raw, out uint thechar, out IntPtr error); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_seek_position (IntPtr raw, long offset, int type, out IntPtr error); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_shutdown (IntPtr raw, bool flush, out IntPtr err); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_write_chars (IntPtr raw, byte[] buf, IntPtr count, out UIntPtr bytes_written, out IntPtr error); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_write_unichar (IntPtr raw, uint thechar, out IntPtr error); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_get_buffer_condition (IntPtr raw); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_io_channel_get_buffered (IntPtr raw); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_io_channel_set_buffered (IntPtr raw, bool buffered); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern UIntPtr g_io_channel_get_buffer_size (IntPtr raw); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_io_channel_set_buffer_size (IntPtr raw, UIntPtr size); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_io_channel_get_close_on_unref (IntPtr raw); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_io_channel_set_close_on_unref (IntPtr raw, bool do_close); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_io_channel_get_encoding (IntPtr raw); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_set_encoding (IntPtr raw, IntPtr encoding, out IntPtr error); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_get_flags (IntPtr raw); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_set_flags (IntPtr raw, int flags, out IntPtr error); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_io_channel_get_line_term (IntPtr raw, out int length); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_io_channel_set_line_term (IntPtr raw, byte[] term, int length); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_io_channel_unix_get_fd (IntPtr raw); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_io_channel_ref (IntPtr raw); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_io_channel_unref (IntPtr raw); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_io_add_watch_full (IntPtr raw, int priority, int condition, IOFuncNative func, IntPtr user_data, DestroyNotify notify); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_io_create_watch (IntPtr raw, int condition); } diff --git a/glib/Idle.cs b/glib/Idle.cs index 2df66ace9..184a2fab9 100755 --- a/glib/Idle.cs +++ b/glib/Idle.cs @@ -34,7 +34,7 @@ namespace GLib { public class Idle { - [UnmanagedFunctionPointer (Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool IdleHandlerInternal (); @@ -65,7 +65,7 @@ namespace GLib { { } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_idle_add (IdleHandlerInternal d, IntPtr data); public static uint Add (IdleHandler hndlr) @@ -78,7 +78,7 @@ namespace GLib { return p.ID; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_idle_add_full (int priority, IdleHandlerInternal d, IntPtr data, DestroyNotify notify); public static uint Add (IdleHandler hndlr, Priority priority) @@ -91,7 +91,7 @@ namespace GLib { return p.ID; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_source_remove_by_funcs_user_data (Delegate d, IntPtr data); public static void Remove (uint id) diff --git a/glib/List.cs b/glib/List.cs index 97c9d5866..ed2de6170 100644 --- a/glib/List.cs +++ b/glib/List.cs @@ -26,7 +26,7 @@ namespace GLib { public class List : ListBase { - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_list_copy (IntPtr l); public override object Clone () @@ -34,7 +34,7 @@ namespace GLib { return new List (g_list_copy (Handle)); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_list_length (IntPtr l); internal override int Length (IntPtr list) @@ -42,7 +42,7 @@ namespace GLib { return g_list_length (list); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_list_free(IntPtr l); internal override void Free (IntPtr list) @@ -51,7 +51,7 @@ namespace GLib { g_list_free (list); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_list_append (IntPtr l, IntPtr raw); internal override IntPtr Append (IntPtr list, IntPtr raw) @@ -59,7 +59,7 @@ namespace GLib { return g_list_append (list, raw); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_list_prepend (IntPtr l, IntPtr raw); internal override IntPtr Prepend (IntPtr list, IntPtr raw) @@ -67,7 +67,7 @@ namespace GLib { return g_list_prepend (list, raw); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_list_nth_data (IntPtr l, uint n); internal override IntPtr NthData (uint n) diff --git a/glib/ListBase.cs b/glib/ListBase.cs index 48886fcf0..d5360a347 100644 --- a/glib/ListBase.cs +++ b/glib/ListBase.cs @@ -180,10 +180,10 @@ namespace GLib { return ret; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_free (IntPtr item); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_unref (IntPtr item); public void Empty () diff --git a/glib/Log.cs b/glib/Log.cs index 5623d4ae7..eeb1d23d8 100644 --- a/glib/Log.cs +++ b/glib/Log.cs @@ -58,7 +58,7 @@ namespace GLib { public class Log { - [UnmanagedFunctionPointer (Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void LogFuncNative (IntPtr log_domain, LogLevelFlags flags, IntPtr message, IntPtr user_data); static LogFuncNative native_handler; @@ -75,7 +75,7 @@ namespace GLib { func (log_domain, flags, message); } - [UnmanagedFunctionPointer (Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void PrintFuncNative (IntPtr message); class PrintHelper { @@ -124,7 +124,7 @@ namespace GLib { handlers = new System.Collections.Generic.Dictionary (); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_logv (IntPtr log_domain, LogLevelFlags flags, IntPtr message); public void WriteLog (string logDomain, LogLevelFlags flags, string format, params object [] args) @@ -136,7 +136,7 @@ namespace GLib { Marshaller.Free (nmessage); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_log_set_handler (IntPtr log_domain, LogLevelFlags flags, LogFuncNative log_func, IntPtr user_data); public static uint SetLogHandler (string logDomain, LogLevelFlags flags, LogFunc logFunc) @@ -153,7 +153,7 @@ namespace GLib { return result; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_log_remove_handler (IntPtr log_domain, uint handler_id); public static void RemoveLogHandler (string logDomain, uint handlerID) @@ -168,7 +168,7 @@ namespace GLib { Marshaller.Free (ndom); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern PrintFuncNative g_set_print_handler (PrintFuncNative handler); public static PrintFunc SetPrintHandler (PrintFunc handler) @@ -179,7 +179,7 @@ namespace GLib { return helper.Invoker; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern PrintFuncNative g_set_printerr_handler (PrintFuncNative handler); public static PrintFunc SetPrintErrorHandler (PrintFunc handler) @@ -190,7 +190,7 @@ namespace GLib { return helper.Invoker; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_log_default_handler (IntPtr log_domain, LogLevelFlags log_level, IntPtr message, IntPtr unused_data); public static void DefaultHandler (string logDomain, LogLevelFlags logLevel, string message) @@ -203,7 +203,7 @@ namespace GLib { Marshaller.Free (nmess); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] extern static LogLevelFlags g_log_set_always_fatal (LogLevelFlags fatal_mask); public static LogLevelFlags SetAlwaysFatal (LogLevelFlags fatalMask) @@ -211,7 +211,7 @@ namespace GLib { return g_log_set_always_fatal (fatalMask); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] extern static LogLevelFlags g_log_set_fatal_mask (IntPtr log_domain, LogLevelFlags fatal_mask); public static LogLevelFlags SetAlwaysFatal (string logDomain, LogLevelFlags fatalMask) @@ -245,7 +245,7 @@ namespace GLib { } } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] extern static LogFuncNative g_log_set_default_handler (LogFuncNative log_func, IntPtr user_data); public static LogFunc SetDefaultHandler (LogFunc log_func) diff --git a/glib/MainContext.cs b/glib/MainContext.cs index 259404c35..e46fa7847 100644 --- a/glib/MainContext.cs +++ b/glib/MainContext.cs @@ -27,7 +27,7 @@ namespace GLib { public class MainContext { IntPtr handle; - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_main_context_new (); public MainContext () @@ -35,7 +35,7 @@ namespace GLib { handle = g_main_context_new (); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_main_context_ref (IntPtr raw); internal MainContext (IntPtr raw) @@ -50,7 +50,7 @@ namespace GLib { } } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_main_context_unref (IntPtr raw); ~MainContext () @@ -59,7 +59,7 @@ namespace GLib { handle = IntPtr.Zero; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_main_context_default (); public static MainContext Default { @@ -68,7 +68,7 @@ namespace GLib { } } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_main_context_thread_default (); public MainContext ThreadDefault { @@ -79,7 +79,7 @@ namespace GLib { } } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_main_context_push_thread_default (IntPtr raw); public void PushThreadDefault () @@ -87,7 +87,7 @@ namespace GLib { g_main_context_push_thread_default (handle); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_main_context_pop_thread_default (IntPtr raw); public void PopThreadDefault () @@ -96,7 +96,7 @@ namespace GLib { } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_main_context_iteration (IntPtr raw, bool may_block); public bool RunIteration (bool may_block) @@ -109,7 +109,7 @@ namespace GLib { return RunIteration (false); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_main_context_pending (IntPtr raw); public bool HasPendingEvents @@ -119,7 +119,7 @@ namespace GLib { } } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_main_context_wakeup (IntPtr raw); public void Wakeup () @@ -142,7 +142,7 @@ namespace GLib { } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_main_depth (); public static int Depth { get { return g_main_depth (); } diff --git a/glib/MainLoop.cs b/glib/MainLoop.cs index b450b4446..62eaadbaa 100644 --- a/glib/MainLoop.cs +++ b/glib/MainLoop.cs @@ -25,7 +25,7 @@ namespace GLib { public class MainLoop { private IntPtr handle; - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_main_loop_new (IntPtr context, bool isRunning); public MainLoop () : this (MainContext.Default) { } @@ -37,7 +37,7 @@ namespace GLib { handle = g_main_loop_new (context.Handle, is_running); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_main_loop_unref (IntPtr loop); ~MainLoop () @@ -46,7 +46,7 @@ namespace GLib { handle = IntPtr.Zero; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_main_loop_is_running (IntPtr loop); public bool IsRunning { @@ -55,7 +55,7 @@ namespace GLib { } } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_main_loop_run (IntPtr loop); public void Run () @@ -63,7 +63,7 @@ namespace GLib { g_main_loop_run (handle); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_main_loop_quit (IntPtr loop); public void Quit () @@ -71,7 +71,7 @@ namespace GLib { g_main_loop_quit (handle); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_main_loop_get_context (IntPtr loop); public MainContext Context { diff --git a/glib/ManagedValue.cs b/glib/ManagedValue.cs index 16acfd839..dc96ad520 100644 --- a/glib/ManagedValue.cs +++ b/glib/ManagedValue.cs @@ -58,16 +58,16 @@ namespace GLib { } } - [UnmanagedFunctionPointer (Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate IntPtr CopyFunc (IntPtr gch); - [UnmanagedFunctionPointer (Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void FreeFunc (IntPtr gch); static CopyFunc copy; static FreeFunc free; static GType boxed_type = GType.Invalid; - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_boxed_type_register_static (IntPtr typename, CopyFunc copy_func, FreeFunc free_func); public static GType GType { diff --git a/glib/Markup.cs b/glib/Markup.cs index 6e68be8e0..e26db7935 100644 --- a/glib/Markup.cs +++ b/glib/Markup.cs @@ -29,7 +29,7 @@ namespace GLib { public class Markup { private Markup () {} - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_markup_escape_text (IntPtr text, int len); static public string EscapeText (string s) diff --git a/glib/Marshaller.cs b/glib/Marshaller.cs index dd806b52e..a3e7654ad 100644 --- a/glib/Marshaller.cs +++ b/glib/Marshaller.cs @@ -29,7 +29,7 @@ namespace GLib { private Marshaller () {} - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_free (IntPtr mem); public static void Free (IntPtr ptr) @@ -46,7 +46,7 @@ namespace GLib { g_free (ptrs [i]); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_filename_to_utf8 (IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error); public static string FilenamePtrToString (IntPtr ptr) @@ -114,7 +114,7 @@ namespace GLib { return ret; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_filename_from_utf8 (IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error); public static IntPtr StringToFilenamePtr (string str) @@ -161,7 +161,7 @@ namespace GLib { return result; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_strfreev (IntPtr mem); public static void StrFreeV (IntPtr null_term_array) @@ -215,7 +215,7 @@ namespace GLib { // transparently, since we need to alloc buffers of // [native pointer size] * [count] bytes. - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_malloc(UIntPtr size); public static IntPtr Malloc (ulong size) @@ -328,10 +328,10 @@ namespace GLib { return local_epoch.AddSeconds (time_t.ToInt64 () + utc_offset); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_malloc0 (UIntPtr size); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_unichar_to_utf8 (uint c, IntPtr buf); public static char GUnicharToChar (uint ucs4_char) @@ -356,7 +356,7 @@ namespace GLib { return PtrToStringGFree (buf); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_utf16_to_ucs4 (ref ushort c, IntPtr len, IntPtr d1, IntPtr d2, IntPtr d3); public static uint CharToGUnichar (char c) diff --git a/glib/NotifyHandler.cs b/glib/NotifyHandler.cs index ba8baaf0f..28b24f8ad 100644 --- a/glib/NotifyHandler.cs +++ b/glib/NotifyHandler.cs @@ -22,7 +22,7 @@ namespace GLib { public delegate void NotifyHandler (object o, NotifyArgs args); public class NotifyArgs : GLib.SignalArgs { - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_get_name (IntPtr pspec); public string Property { diff --git a/glib/Object.cs b/glib/Object.cs index 074dc02aa..86368d608 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -54,7 +54,7 @@ namespace GLib { } } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_unref (IntPtr raw); static bool PerformQueuedUnrefs () @@ -93,7 +93,7 @@ namespace GLib { GC.SuppressFinalize (this); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_object_ref (IntPtr raw); public static Object GetObject(IntPtr o, bool owned_ref) @@ -218,7 +218,7 @@ namespace GLib { Marshal.StructureToPtr (klass, class_ptr, false); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_class_install_property (IntPtr klass, uint prop_id, IntPtr param_spec); static IntPtr RegisterProperty (GType type, string name, string nick, string blurb, uint property_id, GType property_type, bool can_read, bool can_write) @@ -257,7 +257,7 @@ namespace GLib { } } - [UnmanagedFunctionPointer (Global.CallingConvention)] + [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 { } } - [UnmanagedFunctionPointer (Global.CallingConvention)] + [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) @@ -293,7 +293,7 @@ namespace GLib { } } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_type_add_interface_static (IntPtr gtype, IntPtr iface_type, ref GInterfaceInfo info); static void AddInterfaces (GType gtype, Type t) @@ -347,7 +347,7 @@ namespace GLib { CreateNativeObject (new string [0], new GLib.Value [0]); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_object_new (IntPtr gtype, IntPtr dummy); struct GParameter { @@ -355,7 +355,7 @@ namespace GLib { public GLib.Value val; } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_object_newv (IntPtr gtype, int n_params, GParameter[] parms); protected virtual void CreateNativeObject (string[] names, GLib.Value[] vals) @@ -469,7 +469,7 @@ namespace GLib { } } - [UnmanagedFunctionPointer (Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void NotifyDelegate (IntPtr handle, IntPtr pspec, IntPtr gch); void NotifyCallback (IntPtr handle, IntPtr pspec, IntPtr gch) @@ -545,7 +545,7 @@ namespace GLib { } } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_get_property (IntPtr obj, IntPtr name, ref GLib.Value val); protected GLib.Value GetProperty (string name) @@ -557,7 +557,7 @@ namespace GLib { return val; } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_set_property (IntPtr obj, IntPtr name, ref GLib.Value val); protected void SetProperty (string name, GLib.Value val) @@ -567,7 +567,7 @@ namespace GLib { GLib.Marshaller.Free (native_name); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_notify (IntPtr obj, IntPtr property_name); protected void Notify (string property_name) @@ -582,10 +582,10 @@ namespace GLib { Signal.OverrideDefaultHandler (gtype, name, cb); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] protected static extern void g_signal_chain_from_overridden (IntPtr args, ref GLib.Value retval); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_type_check_instance_is_a (IntPtr obj, IntPtr gtype); internal static bool IsObject (IntPtr obj) diff --git a/glib/ObjectManager.cs b/glib/ObjectManager.cs index 78adae350..937696473 100644 --- a/glib/ObjectManager.cs +++ b/glib/ObjectManager.cs @@ -83,7 +83,7 @@ namespace GLib { return result; } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_type_parent (IntPtr typ); } } diff --git a/glib/ParamSpec.cs b/glib/ParamSpec.cs index f9d6b33ff..427aa501a 100644 --- a/glib/ParamSpec.cs +++ b/glib/ParamSpec.cs @@ -126,58 +126,58 @@ namespace GLib { uint param_id; } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_char (IntPtr name, IntPtr nick, IntPtr blurb, sbyte min, sbyte max, sbyte dval, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_uchar (IntPtr name, IntPtr nick, IntPtr blurb, byte min, byte max, byte dval, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_boolean (IntPtr name, IntPtr nick, IntPtr blurb, bool dval, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_int (IntPtr name, IntPtr nick, IntPtr blurb, int min, int max, int dval, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_uint (IntPtr name, IntPtr nick, IntPtr blurb, uint min, uint max, uint dval, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_long (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr min, IntPtr max, IntPtr dval, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_ulong (IntPtr name, IntPtr nick, IntPtr blurb, UIntPtr min, UIntPtr max, UIntPtr dval, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_int64 (IntPtr name, IntPtr nick, IntPtr blurb, long min, long max, long dval, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_uint64 (IntPtr name, IntPtr nick, IntPtr blurb, ulong min, ulong max, ulong dval, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_float (IntPtr name, IntPtr nick, IntPtr blurb, float min, float max, float dval, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_double (IntPtr name, IntPtr nick, IntPtr blurb, double min, double max, double dval, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_string (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr dval, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_pointer (IntPtr name, IntPtr nick, IntPtr blurb, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_gtype (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr dval, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_boxed (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr return_type, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_param_spec_object (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr return_type, int flags); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_gtype_get_type (); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_type_is_a (IntPtr a, IntPtr b); } diff --git a/glib/PtrArray.cs b/glib/PtrArray.cs index ca71943b8..3ad5d137a 100644 --- a/glib/PtrArray.cs +++ b/glib/PtrArray.cs @@ -32,7 +32,7 @@ namespace GLib { internal bool elements_owned = false; protected System.Type element_type = null; - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_ptr_array_sized_new (uint n_preallocs); public PtrArray (uint n_preallocs, System.Type element_type, bool owned, bool elements_owned) @@ -43,7 +43,7 @@ namespace GLib { this.elements_owned = elements_owned; } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_ptr_array_new (); public PtrArray (System.Type element_type, bool owned, bool elements_owned) @@ -77,13 +77,13 @@ namespace GLib { GC.SuppressFinalize (this); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_ptr_array_free (IntPtr raw, bool free_seg); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_unref (IntPtr item); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_free (IntPtr item); void Dispose (bool disposing) @@ -120,7 +120,7 @@ namespace GLib { } } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_ptr_array_add (IntPtr raw, IntPtr val); public void Add (IntPtr val) @@ -128,7 +128,7 @@ namespace GLib { g_ptr_array_add (Handle, val); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_ptr_array_remove (IntPtr raw, IntPtr data); public void Remove (IntPtr data) @@ -136,7 +136,7 @@ namespace GLib { g_ptr_array_remove (Handle, data); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_ptr_array_remove_range (IntPtr raw, uint index, uint length); public void RemoveRange (IntPtr data, uint index, uint length) @@ -260,7 +260,7 @@ namespace GLib { return new ListEnumerator (this); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_ptr_array_copy (IntPtr raw); // ICloneable diff --git a/glib/SList.cs b/glib/SList.cs index cc9f65a21..16fdfa81f 100644 --- a/glib/SList.cs +++ b/glib/SList.cs @@ -26,7 +26,7 @@ namespace GLib { public class SList : ListBase { - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_slist_copy (IntPtr l); public override object Clone () @@ -34,7 +34,7 @@ namespace GLib { return new SList (g_slist_copy (Handle)); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_slist_length (IntPtr l); internal override int Length (IntPtr list) @@ -42,7 +42,7 @@ namespace GLib { return g_slist_length (list); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_slist_free(IntPtr l); internal override void Free (IntPtr list) @@ -51,7 +51,7 @@ namespace GLib { g_slist_free (list); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_slist_append (IntPtr l, IntPtr raw); internal override IntPtr Append (IntPtr list, IntPtr raw) @@ -59,7 +59,7 @@ namespace GLib { return g_slist_append (list, raw); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_slist_prepend (IntPtr l, IntPtr raw); internal override IntPtr Prepend (IntPtr list, IntPtr raw) @@ -68,7 +68,7 @@ namespace GLib { } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_slist_nth_data (IntPtr l, uint n); internal override IntPtr NthData (uint n) diff --git a/glib/Signal.cs b/glib/Signal.cs index faef33f37..7b98b003d 100644 --- a/glib/Signal.cs +++ b/glib/Signal.cs @@ -63,7 +63,7 @@ namespace GLib { public IntPtr param_types; } - [UnmanagedFunctionPointer (Global.CallingConvention)] + [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); @@ -388,32 +388,32 @@ namespace GLib { g_signal_override_class_closure (id, gtype.Val, closure); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_cclosure_new (Delegate cb, IntPtr data, IntPtr notify); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_signal_get_invocation_hint (IntPtr instance); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_signal_emitv (IntPtr instance_and_params, uint signal_id, uint gquark_detail, ref GLib.Value return_value); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_signal_emitv (IntPtr instance_and_params, uint signal_id, uint gquark_detail, IntPtr return_value); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_signal_lookup (IntPtr name, IntPtr itype); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_signal_override_class_closure (uint id, IntPtr gtype, IntPtr closure); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_signal_query (uint signal_id, out Query query); //better not to expose g_quark_from_static_string () due to memory allocation issues - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_quark_from_string (IntPtr str); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern ulong g_signal_add_emission_hook (uint signal_id, uint gquark_detail, EmissionHookNative hook_func, IntPtr hook_data, IntPtr data_destroy); } diff --git a/glib/SignalCallback.cs b/glib/SignalCallback.cs index 1db83e2f6..74820d22b 100644 --- a/glib/SignalCallback.cs +++ b/glib/SignalCallback.cs @@ -60,7 +60,7 @@ namespace GLib { _handler = Delegate.Remove (_handler, d); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_signal_connect_data(IntPtr obj, IntPtr name, Delegate cb, int key, IntPtr p, int flags); protected void Connect (string name, Delegate cb, int flags) @@ -70,10 +70,10 @@ namespace GLib { Marshaller.Free (native_name); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_signal_handler_disconnect (IntPtr instance, uint handler); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_signal_handler_is_connected (IntPtr instance, uint handler); protected void Disconnect () diff --git a/glib/SignalClosure.cs b/glib/SignalClosure.cs index fbd30aa74..8797bd7e7 100644 --- a/glib/SignalClosure.cs +++ b/glib/SignalClosure.cs @@ -136,7 +136,7 @@ namespace GLib { } } - [UnmanagedFunctionPointer (Global.CallingConvention)] + [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 { } } - [UnmanagedFunctionPointer (Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void ClosureNotify (IntPtr data, IntPtr closure); static void NotifyCallback (IntPtr data, IntPtr raw_closure) @@ -202,25 +202,25 @@ namespace GLib { } } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_cclosure_new (Delegate cb, IntPtr user_data, ClosureNotify notify); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_closure_new_simple (int closure_size, IntPtr dummy); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_closure_set_marshal (IntPtr closure, ClosureMarshal marshaler); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_closure_add_finalize_notifier (IntPtr closure, IntPtr dummy, ClosureNotify notify); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_signal_connect_closure (IntPtr obj, IntPtr name, IntPtr closure, bool is_after); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_signal_handler_disconnect (IntPtr instance, uint handler); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_signal_handler_is_connected (IntPtr instance, uint handler); } } diff --git a/glib/Source.cs b/glib/Source.cs index d2b88d66a..0e5b01b8f 100644 --- a/glib/Source.cs +++ b/glib/Source.cs @@ -49,7 +49,7 @@ namespace GLib { internal static Hashtable source_handlers = new Hashtable (); - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_source_remove (uint tag); public static bool Remove (uint tag) diff --git a/glib/Spawn.cs b/glib/Spawn.cs index 2206c7ea2..808a02737 100644 --- a/glib/Spawn.cs +++ b/glib/Spawn.cs @@ -60,7 +60,7 @@ namespace GLib { public delegate void SpawnChildSetupFunc (); - [UnmanagedFunctionPointer (Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] internal delegate void SpawnChildSetupFuncNative (IntPtr gch); internal class SpawnChildSetupWrapper { @@ -102,7 +102,7 @@ namespace GLib { this.pid = pid; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_spawn_close_pid (int pid); public void Close () @@ -110,7 +110,7 @@ namespace GLib { g_spawn_close_pid ((int) pid); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_spawn_async (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, out IntPtr error); public static bool SpawnAsync (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out Process child_process) @@ -130,7 +130,7 @@ namespace GLib { return result; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_spawn_async_with_pipes (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, IntPtr stdin, IntPtr stdout, IntPtr stderr, out IntPtr error); public static bool SpawnAsyncWithPipes (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out Process child_process, ref int stdin, ref int stdout, ref int stderr) @@ -165,7 +165,7 @@ namespace GLib { return result; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_spawn_sync (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); public static bool SpawnSync (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out string stdout, out string stderr, out int exit_status) @@ -185,7 +185,7 @@ namespace GLib { return result; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_spawn_command_line_async (IntPtr cmdline, out IntPtr error); public static bool SpawnCommandLineAsync (string command_line) @@ -198,7 +198,7 @@ namespace GLib { return result; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_spawn_command_line_sync (IntPtr cmdline, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); public static bool SpawnCommandLineSync (string command_line, out string stdout, out string stderr, out int exit_status) diff --git a/glib/Thread.cs b/glib/Thread.cs index 5841362ef..4895a582c 100644 --- a/glib/Thread.cs +++ b/glib/Thread.cs @@ -28,7 +28,7 @@ namespace GLib { private Thread () {} - [DllImport ("libgthread-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgthread-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_thread_init (IntPtr i); public static void Init () diff --git a/glib/Timeout.cs b/glib/Timeout.cs index f3d4ec845..9d1b5ea70 100755 --- a/glib/Timeout.cs +++ b/glib/Timeout.cs @@ -32,7 +32,7 @@ namespace GLib { public class Timeout { - [UnmanagedFunctionPointer (Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool TimeoutHandlerInternal (); internal class TimeoutProxy : SourceProxy { @@ -59,7 +59,7 @@ namespace GLib { } private Timeout () {} - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_timeout_add (uint interval, TimeoutHandlerInternal d, IntPtr data); public static uint Add (uint interval, TimeoutHandler hndlr) @@ -73,7 +73,7 @@ namespace GLib { return p.ID; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_timeout_add_full (int priority, uint interval, TimeoutHandlerInternal d, IntPtr data, DestroyNotify notify); public static uint Add (uint interval, TimeoutHandler hndlr, Priority priority) @@ -87,7 +87,7 @@ namespace GLib { return p.ID; } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_timeout_add_seconds (uint interval, TimeoutHandlerInternal d, IntPtr data); public static uint AddSeconds (uint interval, TimeoutHandler hndlr) @@ -106,7 +106,7 @@ namespace GLib { Source.Remove (id); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_source_remove_by_funcs_user_data (Delegate d, IntPtr data); public static bool Remove (TimeoutHandler hndlr) diff --git a/glib/ToggleRef.cs b/glib/ToggleRef.cs index e3ec8a302..00b8a253c 100644 --- a/glib/ToggleRef.cs +++ b/glib/ToggleRef.cs @@ -120,7 +120,7 @@ namespace GLib { } } - [UnmanagedFunctionPointer (Global.CallingConvention)] + [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) @@ -143,16 +143,16 @@ namespace GLib { } } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_add_toggle_ref (IntPtr raw, ToggleNotifyHandler notify_cb, IntPtr data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_remove_toggle_ref (IntPtr raw, ToggleNotifyHandler notify_cb, IntPtr data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_object_ref (IntPtr raw); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_unref (IntPtr raw); } diff --git a/glib/Value.cs b/glib/Value.cs index 6423d9f80..406253331 100755 --- a/glib/Value.cs +++ b/glib/Value.cs @@ -563,113 +563,113 @@ namespace GLib { g_value_init (ref this, spec.ValueType.Val); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_object_class_find_property (IntPtr klass, IntPtr name); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_type_check_value_holds (ref Value val, IntPtr gtype); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_init (ref GLib.Value val, IntPtr gtype); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_unset (ref GLib.Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_boolean (ref Value val, bool data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_uchar (ref Value val, byte data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_char (ref Value val, sbyte data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_boxed (ref Value val, IntPtr data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_double (ref Value val, double data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_float (ref Value val, float data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_int (ref Value val, int data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_int64 (ref Value val, long data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_uint64 (ref Value val, ulong data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_object (ref Value val, IntPtr data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_param (ref Value val, IntPtr data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_pointer (ref Value val, IntPtr data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_string (ref Value val, IntPtr data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_uint (ref Value val, uint data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_enum (ref Value val, int data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_set_flags (ref Value val, uint data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_value_get_boolean (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern byte g_value_get_uchar (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern sbyte g_value_get_char (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_value_get_boxed (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern double g_value_get_double (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern float g_value_get_float (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_value_get_int (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern long g_value_get_int64 (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern ulong g_value_get_uint64 (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_value_get_object (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_value_get_param (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_value_get_pointer (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_value_get_string (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_value_get_uint (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_value_get_enum (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_value_get_flags (ref Value val); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_strv_get_type (); } } diff --git a/glib/ValueArray.cs b/glib/ValueArray.cs index 7305e347a..4f42cb5f7 100644 --- a/glib/ValueArray.cs +++ b/glib/ValueArray.cs @@ -32,7 +32,7 @@ namespace GLib { static private ArrayList PendingFrees = new ArrayList (); static private bool idle_queued = false; - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_value_array_new (uint n_preallocs); public ValueArray (uint n_preallocs) @@ -57,7 +57,7 @@ namespace GLib { GC.SuppressFinalize (this); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_array_free (IntPtr raw); void Dispose (bool disposing) @@ -115,7 +115,7 @@ namespace GLib { get { return Native.values; } } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_array_append (IntPtr raw, ref GLib.Value val); public void Append (GLib.Value val) @@ -123,7 +123,7 @@ namespace GLib { g_value_array_append (Handle, ref val); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_array_insert (IntPtr raw, uint idx, ref GLib.Value val); public void Insert (uint idx, GLib.Value val) @@ -131,7 +131,7 @@ namespace GLib { g_value_array_insert (Handle, idx, ref val); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_array_prepend (IntPtr raw, ref GLib.Value val); public void Prepend (GLib.Value val) @@ -139,7 +139,7 @@ namespace GLib { g_value_array_prepend (Handle, ref val); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_value_array_remove (IntPtr raw, uint idx); public void Remove (uint idx) @@ -152,7 +152,7 @@ namespace GLib { get { return (int) Native.n_values; } } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_value_array_get_nth (IntPtr raw, uint idx); public object this [int index] { @@ -226,7 +226,7 @@ namespace GLib { return new ListEnumerator (this); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_value_array_copy (IntPtr raw); // ICloneable @@ -235,7 +235,7 @@ namespace GLib { return new ValueArray (g_value_array_copy (Handle)); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_value_array_get_type (); public static GLib.GType GType { diff --git a/gtk/Accel.custom b/gtk/Accel.custom index 5ade942bc..ca08851f7 100644 --- a/gtk/Accel.custom +++ b/gtk/Accel.custom @@ -18,7 +18,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_accel_map_save(IntPtr file_name); [Obsolete("Moved to AccelMap class. Use AccelMap.Save instead")] @@ -28,7 +28,7 @@ GLib.Marshaller.Free (native); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_accel_map_add_filter(IntPtr filter_pattern); [Obsolete("Moved to AccelMap class. Use AccelMap.AddFilter instead")] @@ -38,7 +38,7 @@ GLib.Marshaller.Free (native); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_accel_map_foreach_unfiltered(IntPtr data, GtkSharp.AccelMapForeachNative foreach_func); [Obsolete("Moved to AccelMap class. Use AccelMap.ForeachUnfiltered instead")] @@ -47,7 +47,7 @@ gtk_accel_map_foreach_unfiltered(data, foreach_func_wrapper.NativeDelegate); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_accel_map_save_fd(int fd); [Obsolete("Moved to AccelMap class. Use AccelMap.SaveFd instead")] @@ -55,7 +55,7 @@ gtk_accel_map_save_fd(fd); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_accel_map_add_entry(IntPtr accel_path, uint accel_key, int accel_mods); [Obsolete("Moved to AccelMap class. Use AccelMap.AddEntry instead")] @@ -65,7 +65,7 @@ GLib.Marshaller.Free (native); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_accel_map_load_fd(int fd); [Obsolete("Moved to AccelMap class. Use AccelMap.LoadFd instead")] @@ -73,7 +73,7 @@ gtk_accel_map_load_fd(fd); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_accel_map_lookup_entry(IntPtr accel_path, ref Gtk.AccelKey key); [Obsolete("Moved to AccelMap class. Use AccelMap.LookupEntry instead")] @@ -84,7 +84,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_accel_map_change_entry(IntPtr accel_path, uint accel_key, int accel_mods, bool replace); [Obsolete("Moved to AccelMap class. Use AccelMap.ChangeEntry instead")] @@ -95,7 +95,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_accel_map_load (IntPtr file_name); [Obsolete("Moved to AccelMap class. Use AccelMap.Load instead")] @@ -105,7 +105,7 @@ GLib.Marshaller.Free (native); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_accel_map_foreach(IntPtr data, GtkSharp.AccelMapForeachNative foreach_func); [Obsolete("Moved to AccelMap class. Use AccelMap.Foreach instead")] @@ -114,7 +114,7 @@ gtk_accel_map_foreach(data, foreach_func_wrapper.NativeDelegate); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_accel_groups_from_object (IntPtr obj); public static AccelGroup[] GroupsFromObject (GLib.Object obj) diff --git a/gtk/Action.custom b/gtk/Action.custom index 544fd1506..227e5eb4a 100644 --- a/gtk/Action.custom +++ b/gtk/Action.custom @@ -24,7 +24,7 @@ { } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_action_get_proxies (IntPtr raw); public Gtk.Widget[] Proxies { diff --git a/gtk/ActionGroup.custom b/gtk/ActionGroup.custom index 926553f08..680ac10ed 100644 --- a/gtk/ActionGroup.custom +++ b/gtk/ActionGroup.custom @@ -73,7 +73,7 @@ actions[0].Changed += changed; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_action_group_list_actions (IntPtr raw); public Gtk.Action[] ListActions() { diff --git a/gtk/Adjustment.custom b/gtk/Adjustment.custom index 2aeb6c678..21517f194 100644 --- a/gtk/Adjustment.custom +++ b/gtk/Adjustment.custom @@ -18,7 +18,7 @@ // Boston, MA 02111-1307, USA. // -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_adjustment_new(double value, double lower, double upper, double step_increment, double page_increment, double page_size); public Adjustment (double value, double lower, double upper, double step_increment, double page_increment, double page_size) : base (IntPtr.Zero) @@ -37,10 +37,10 @@ public Adjustment (double value, double lower, double upper, double step_increme Raw = gtk_adjustment_new(value, lower, upper, step_increment, page_increment, page_size); } -[DllImport ("libgobject-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_freeze_notify (IntPtr inst); -[DllImport ("libgobject-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_thaw_notify (IntPtr inst); public void SetBounds (double lower, double upper, double step_increment, double page_increment, double page_size) diff --git a/gtk/Application.cs b/gtk/Application.cs index 53b60d12e..e50405148 100755 --- a/gtk/Application.cs +++ b/gtk/Application.cs @@ -54,10 +54,10 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_init (ref int argc, ref IntPtr argv); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_init_check (ref int argc, ref IntPtr argv); static void SetPrgname () @@ -119,7 +119,7 @@ namespace Gtk { return do_init (progname, ref args, true); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_main (); public static void Run () @@ -127,7 +127,7 @@ namespace Gtk { gtk_main (); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_events_pending (); @@ -136,10 +136,10 @@ namespace Gtk { return gtk_events_pending (); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_main_iteration (); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_main_iteration_do (bool blocking); public static void RunIteration () @@ -152,7 +152,7 @@ namespace Gtk { return gtk_main_iteration_do (blocking); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_main_quit (); public static void Quit () @@ -161,7 +161,7 @@ namespace Gtk { } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_get_current_event (); public static Gdk.Event CurrentEvent { diff --git a/gtk/Bin.custom b/gtk/Bin.custom index 9d22c258a..bd2ee22b3 100644 --- a/gtk/Bin.custom +++ b/gtk/Bin.custom @@ -21,7 +21,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_bin_get_child(IntPtr raw); public new Gtk.Widget Child { diff --git a/gtk/Builder.custom b/gtk/Builder.custom index b982cc223..9d11df295 100644 --- a/gtk/Builder.custom +++ b/gtk/Builder.custom @@ -226,7 +226,7 @@ class SignalConnector this.handler_type = handler_type; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_builder_connect_signals_full(IntPtr raw, GtkSharp.BuilderConnectFuncNative func, IntPtr user_data); public void ConnectSignals() { diff --git a/gtk/Button.custom b/gtk/Button.custom index fc1e2b295..9e27ca1b4 100644 --- a/gtk/Button.custom +++ b/gtk/Button.custom @@ -21,7 +21,7 @@ // Boston, MA 02111-1307, USA. -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_button_new_from_stock(IntPtr stock_id); public Button (string stock_id) : base (IntPtr.Zero) diff --git a/gtk/CellRenderer.custom b/gtk/CellRenderer.custom index f9624e1ff..0e85e8110 100644 --- a/gtk/CellRenderer.custom +++ b/gtk/CellRenderer.custom @@ -24,7 +24,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_cell_renderer_start_editing (IntPtr handle, IntPtr evnt, IntPtr widget, IntPtr path, ref Gdk.Rectangle bg_area, ref Gdk.Rectangle cell_area, int flags); public CellEditable StartEditing (Widget widget, Gdk.Event evnt, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, CellRendererState flags) @@ -36,7 +36,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_cell_renderer_render (IntPtr handle, IntPtr drawable, IntPtr widget, ref Gdk.Rectangle bg_area, ref Gdk.Rectangle cell_area, ref Gdk.Rectangle expose_area, int flags); public void Render (Widget widget, Gdk.Drawable window, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, CellRendererState flags) @@ -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 - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [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/CheckMenuItem.custom b/gtk/CheckMenuItem.custom index 5e9b0920c..53b37ab48 100644 --- a/gtk/CheckMenuItem.custom +++ b/gtk/CheckMenuItem.custom @@ -21,7 +21,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_check_menu_item_new_with_mnemonic (IntPtr label); public CheckMenuItem (string label) : base (IntPtr.Zero) diff --git a/gtk/Clipboard.custom b/gtk/Clipboard.custom index dcbeb03c8..ad2833416 100644 --- a/gtk/Clipboard.custom +++ b/gtk/Clipboard.custom @@ -19,10 +19,10 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_clipboard_set_with_data(IntPtr raw, TargetEntry[] targets, int n_targets, GtkSharp.ClipboardGetFuncNative get_func, GtkSharp.ClipboardClearFuncNative clear_func, IntPtr data); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_clipboard_set_with_owner(IntPtr raw, TargetEntry[] targets, int n_targets, GtkSharp.ClipboardGetFuncNative get_func, GtkSharp.ClipboardClearFuncNative clear_func, IntPtr owner); void ClearProxy (Clipboard clipboard) @@ -67,7 +67,7 @@ Text = text; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_clipboard_wait_for_rich_text (IntPtr raw, IntPtr buffer, out IntPtr format, out UIntPtr length); public byte[] WaitForRichText(Gtk.TextBuffer buffer, out Gdk.Atom format) @@ -88,7 +88,7 @@ static RichTextReceivedFuncNative rt_rcvd_marshaler; - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RichTextReceivedFuncNative (IntPtr clipboard, IntPtr format, IntPtr text, UIntPtr length, IntPtr data); @@ -109,7 +109,7 @@ } } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_clipboard_request_rich_text(IntPtr raw, IntPtr buffer, RichTextReceivedFuncNative cb, IntPtr user_data); public void RequestRichText (Gtk.TextBuffer buffer, RichTextReceivedFunc cb) diff --git a/gtk/ColorSelection.custom b/gtk/ColorSelection.custom index ba27f0958..ab286b396 100644 --- a/gtk/ColorSelection.custom +++ b/gtk/ColorSelection.custom @@ -17,7 +17,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_color_selection_palette_to_string(Gdk.Color[] colors, int n_colors); /// PaletteToString Method @@ -28,7 +28,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_color_selection_palette_from_string(IntPtr str, out IntPtr colors, out int n_colors); public static Gdk.Color[] PaletteFromString(string str) { @@ -53,10 +53,10 @@ return colors; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_color_selection_set_previous_color(IntPtr raw, ref Gdk.Color color); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_color_selection_get_previous_color(IntPtr raw, out Gdk.Color color); // Create Gtk# property to replace two Gtk+ functions diff --git a/gtk/Combo.custom b/gtk/Combo.custom index 634a54d8f..aee07f1e2 100644 --- a/gtk/Combo.custom +++ b/gtk/Combo.custom @@ -14,7 +14,7 @@ // Boston, MA 02111-1307, USA. -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_combo_set_popdown_strings(IntPtr raw, IntPtr strings); public string[] PopdownStrings { diff --git a/gtk/Container.custom b/gtk/Container.custom index 2137b1d39..a4fe1ddba 100644 --- a/gtk/Container.custom +++ b/gtk/Container.custom @@ -53,10 +53,10 @@ public IEnumerable AllChildren { } } -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_container_get_focus_chain (IntPtr raw, out IntPtr list_ptr); -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_container_set_focus_chain (IntPtr raw, IntPtr list_ptr); public Widget[] FocusChain { @@ -90,7 +90,7 @@ static extern void gtksharp_container_override_forall (IntPtr gtype, ForallDeleg [DllImport("gtksharpglue-3")] static extern void gtksharp_container_invoke_gtk_callback (IntPtr cb, IntPtr handle, IntPtr data); -[UnmanagedFunctionPointer (GLib.Global.CallingConvention)] +[UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void ForallDelegate (IntPtr container, bool include_internals, IntPtr cb, IntPtr data); static ForallDelegate ForallOldCallback; diff --git a/gtk/Dialog.custom b/gtk/Dialog.custom index 0207e2eeb..7bc96463c 100644 --- a/gtk/Dialog.custom +++ b/gtk/Dialog.custom @@ -24,7 +24,7 @@ // Boston, MA 02111-1307, USA. -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_dialog_new_with_buttons (IntPtr title, IntPtr i, int flags, IntPtr dummy); public Dialog (string title, Gtk.Window parent, Gtk.DialogFlags flags, params object[] button_data) : base(IntPtr.Zero) { diff --git a/gtk/Drag.custom b/gtk/Drag.custom index 492cdce77..7e6daf375 100644 --- a/gtk/Drag.custom +++ b/gtk/Drag.custom @@ -18,7 +18,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_drag_set_icon_default(IntPtr context); public static void SetIconDefault(Gdk.DragContext context) diff --git a/gtk/FileChooserDialog.custom b/gtk/FileChooserDialog.custom index 4cd4d32f0..d034405e6 100644 --- a/gtk/FileChooserDialog.custom +++ b/gtk/FileChooserDialog.custom @@ -22,7 +22,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_file_chooser_dialog_new(IntPtr title, IntPtr parent, int action, IntPtr nil); public FileChooserDialog (string title, Window parent, FileChooserAction action, params object[] button_data) : base (IntPtr.Zero) @@ -43,7 +43,7 @@ AddButton ((string) button_data [i], (int) button_data [i + 1]); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_file_chooser_dialog_new_with_backend(IntPtr title, IntPtr parent, int action, IntPtr backend, IntPtr nil); public FileChooserDialog (string backend, string title, Window parent, FileChooserAction action, params object[] button_data) : base (IntPtr.Zero) diff --git a/gtk/FileSelection.custom b/gtk/FileSelection.custom index de1185566..53740acc2 100644 --- a/gtk/FileSelection.custom +++ b/gtk/FileSelection.custom @@ -36,10 +36,10 @@ public class FSButton : Gtk.Button { } } -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_file_selection_get_selections (IntPtr handle); -[DllImport ("libglib-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_strfreev (IntPtr handle); public string[] Selections { diff --git a/gtk/HScale.custom b/gtk/HScale.custom index e9add398c..9523648f7 100644 --- a/gtk/HScale.custom +++ b/gtk/HScale.custom @@ -21,7 +21,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_hscale_new_with_range (double min, double max, double step); public HScale (double min, double max, double step) : base (IntPtr.Zero) diff --git a/gtk/IconFactory.custom b/gtk/IconFactory.custom index ab3eff3b9..eca075d33 100644 --- a/gtk/IconFactory.custom +++ b/gtk/IconFactory.custom @@ -13,7 +13,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] extern static void gtk_icon_size_lookup (IconSize size, out int width, out int height); /// Query icon dimensions diff --git a/gtk/IconSet.custom b/gtk/IconSet.custom index 7a250715f..1d87473ef 100644 --- a/gtk/IconSet.custom +++ b/gtk/IconSet.custom @@ -13,11 +13,11 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] unsafe static extern void gtk_icon_set_get_sizes ( IntPtr raw, out int *pointer_to_enum, out int n_sizes); - [DllImport ("libglib-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] unsafe static extern void g_free (int *mem); /// Sizes Property diff --git a/gtk/IconTheme.custom b/gtk/IconTheme.custom index 2be9d9f92..17cc02c3d 100644 --- a/gtk/IconTheme.custom +++ b/gtk/IconTheme.custom @@ -21,7 +21,7 @@ - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_icon_theme_list_icons (IntPtr raw, IntPtr context); public string[] ListIcons (string context) @@ -40,13 +40,13 @@ return result; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_icon_theme_get_search_path(IntPtr raw, out IntPtr path, out int n_elements); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_icon_theme_set_search_path(IntPtr raw, IntPtr[] path, int n_elements); - [DllImport ("libglib-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_strfreev (IntPtr mem); public string[] SearchPath { @@ -87,7 +87,7 @@ } #if GTK_SHARP_2_6 - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_icon_theme_get_icon_sizes (IntPtr raw, IntPtr icon_name); public int[] GetIconSizes (string icon_name) diff --git a/gtk/IconView.custom b/gtk/IconView.custom index 6c0797e10..dbcc0fd48 100644 --- a/gtk/IconView.custom +++ b/gtk/IconView.custom @@ -31,7 +31,7 @@ } } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_icon_view_scroll_to_path(IntPtr raw, IntPtr path, bool use_align, float row_align, float col_align); public void ScrollToPath (Gtk.TreePath path) diff --git a/gtk/Image.custom b/gtk/Image.custom index 391892b28..19b92e585 100644 --- a/gtk/Image.custom +++ b/gtk/Image.custom @@ -19,7 +19,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_image_new_from_icon_set(IntPtr icon_set, int size); public Image (Gtk.IconSet icon_set, Gtk.IconSize size) : base (IntPtr.Zero) @@ -37,7 +37,7 @@ Raw = gtk_image_new_from_icon_set(icon_set.Handle, (int) size); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_image_new_from_stock(IntPtr stock_id, int size); public Image (string stock_id, Gtk.IconSize size) : base (IntPtr.Zero) diff --git a/gtk/ImageMenuItem.custom b/gtk/ImageMenuItem.custom index 9a668ea3f..ef72d82b0 100644 --- a/gtk/ImageMenuItem.custom +++ b/gtk/ImageMenuItem.custom @@ -21,7 +21,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_image_menu_item_new_with_mnemonic (IntPtr label); public ImageMenuItem (string label) : base (IntPtr.Zero) diff --git a/gtk/Input.custom b/gtk/Input.custom index 7c6146e10..bbfdfd06c 100644 --- a/gtk/Input.custom +++ b/gtk/Input.custom @@ -19,10 +19,10 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint gtk_input_add_full(int source, int condition, InputFunctionNative function, GtkSharp.CallbackMarshalNative marshal, IntPtr data, GLib.DestroyNotify destroy); - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void InputFunctionNative(IntPtr data, int source, int condition); class InputFunctionWrapper { diff --git a/gtk/ItemFactory.custom b/gtk/ItemFactory.custom index 577e375e3..78061b8e5 100644 --- a/gtk/ItemFactory.custom +++ b/gtk/ItemFactory.custom @@ -21,7 +21,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_item_factory_new(IntPtr container_type, IntPtr path, IntPtr accel_group); public ItemFactory (GLib.GType container_type, string path, Gtk.AccelGroup accel_group) : base (IntPtr.Zero) diff --git a/gtk/Key.cs b/gtk/Key.cs index c1e70142d..d4684abc6 100644 --- a/gtk/Key.cs +++ b/gtk/Key.cs @@ -28,7 +28,7 @@ namespace Gtk { static Hashtable wrappers = new Hashtable (); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint gtk_key_snooper_install (GtkSharp.KeySnoopFuncNative snooper, IntPtr func_data); public static uint SnooperInstall (Gtk.KeySnoopFunc snooper) @@ -39,7 +39,7 @@ namespace Gtk { return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_key_snooper_remove (uint snooper_handler_id); public static void SnooperRemove (uint snooper_handler_id) diff --git a/gtk/ListStore.custom b/gtk/ListStore.custom index 15e495a78..d873a95c7 100644 --- a/gtk/ListStore.custom +++ b/gtk/ListStore.custom @@ -27,7 +27,7 @@ return -1; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); public bool IterChildren (out Gtk.TreeIter iter) { @@ -43,7 +43,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_nth_child (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); public bool IterNthChild (out Gtk.TreeIter iter, int n) { @@ -123,7 +123,7 @@ return AppendValues ((Array) values); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_list_store_insert_with_valuesv(IntPtr raw, out TreeIter iter, int position, int[] columns, GLib.Value[] values, int n_values); public TreeIter InsertWithValues (int position, params object[] values) @@ -149,7 +149,7 @@ return iter; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_list_store_set_valuesv(IntPtr raw, ref TreeIter iter, int[] columns, GLib.Value[] values, int n_values); public void SetValues (TreeIter iter, params object[] values) @@ -223,7 +223,7 @@ return new TreeEnumerator(this); } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [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 @@ } } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter, IntPtr new_order); static RowsReorderedVMDelegate RowsReorderedVMCallback; diff --git a/gtk/Menu.custom b/gtk/Menu.custom index 55ad3d22b..4e7e8a6ee 100644 --- a/gtk/Menu.custom +++ b/gtk/Menu.custom @@ -30,7 +30,7 @@ Popup (null, null, null, 3, Global.CurrentEventTime); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_menu_set_screen (IntPtr raw, IntPtr screen); public new Gdk.Screen Screen { @@ -42,7 +42,7 @@ } } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_menu_set_active (IntPtr raw, uint index_); public void SetActive (uint index_) diff --git a/gtk/MenuItem.custom b/gtk/MenuItem.custom index c5a8f4bef..d8c55e3a6 100644 --- a/gtk/MenuItem.custom +++ b/gtk/MenuItem.custom @@ -21,7 +21,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_menu_item_new_with_mnemonic (IntPtr label); public MenuItem (string label) : base (IntPtr.Zero) diff --git a/gtk/MessageDialog.custom b/gtk/MessageDialog.custom index fdfbcd607..e68505e44 100644 --- a/gtk/MessageDialog.custom +++ b/gtk/MessageDialog.custom @@ -13,10 +13,10 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_message_dialog_new (IntPtr parent_window, DialogFlags flags, MessageType type, ButtonsType bt, IntPtr msg, IntPtr args); -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_message_dialog_new_with_markup (IntPtr parent_window, DialogFlags flags, MessageType type, ButtonsType bt, IntPtr msg, IntPtr args); public MessageDialog (Gtk.Window parent_window, DialogFlags flags, MessageType type, ButtonsType bt, bool use_markup, string format, params object[] args) diff --git a/gtk/Notebook.custom b/gtk/Notebook.custom index 0f82abdd2..c80b3e1b5 100644 --- a/gtk/Notebook.custom +++ b/gtk/Notebook.custom @@ -26,7 +26,7 @@ public Widget CurrentPageWidget { } } -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gtk_notebook_page_num (IntPtr handle, IntPtr child); public int PageNum (Widget child) diff --git a/gtk/Object.custom b/gtk/Object.custom index 0f95c0d9b..f76304cc5 100755 --- a/gtk/Object.custom +++ b/gtk/Object.custom @@ -105,7 +105,7 @@ base.Dispose (); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] private static extern void g_object_ref_sink (IntPtr raw); protected override IntPtr Raw { @@ -121,7 +121,7 @@ } } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] private static extern void gtk_object_destroy (IntPtr raw); public virtual void Destroy () @@ -132,13 +132,13 @@ InternalDestroyed -= NativeDestroyHandler; } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool g_object_is_floating (IntPtr raw); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_force_floating (IntPtr raw); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_unref (IntPtr raw); public bool IsFloating { diff --git a/gtk/Plug.custom b/gtk/Plug.custom index 5d818cc33..a83ffaf06 100644 --- a/gtk/Plug.custom +++ b/gtk/Plug.custom @@ -21,7 +21,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_plug_new(uint socket_id); public Plug (uint socket_id) : base (IntPtr.Zero) @@ -34,7 +34,7 @@ Raw = gtk_plug_new(socket_id); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_plug_new_for_display(IntPtr display, uint socket_id); public Plug (Gdk.Display display, uint socket_id) : base (IntPtr.Zero) diff --git a/gtk/PrintContext.custom b/gtk/PrintContext.custom index 3758c80e9..5c07c825e 100644 --- a/gtk/PrintContext.custom +++ b/gtk/PrintContext.custom @@ -19,10 +19,10 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_print_context_get_cairo_context(IntPtr raw); - [DllImport ("libcairo-2.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libcairo-2.dll", CallingConvention = CallingConvention.Cdecl)] static extern void cairo_reference (IntPtr raw); public Cairo.Context CairoContext { diff --git a/gtk/Printer.custom b/gtk/Printer.custom index ce091450b..f21e01a1f 100644 --- a/gtk/Printer.custom +++ b/gtk/Printer.custom @@ -18,7 +18,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_enumerate_printers (GtkSharp.PrinterFuncNative func, IntPtr func_data, GLib.DestroyNotify destroy, bool wait); public static void EnumeratePrinters (Gtk.PrinterFunc func, bool wait) diff --git a/gtk/Quit.custom b/gtk/Quit.custom index d39403d36..7751bcd84 100644 --- a/gtk/Quit.custom +++ b/gtk/Quit.custom @@ -52,7 +52,7 @@ } } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint gtk_quit_add_full(uint main_level, GtkSharp.FunctionNative function, GtkSharp.CallbackMarshalNative marshal, IntPtr data, GLib.DestroyNotify destroy); [Obsolete ("Replaced by Add method")] diff --git a/gtk/RadioButton.custom b/gtk/RadioButton.custom index e9e906de3..73359f845 100644 --- a/gtk/RadioButton.custom +++ b/gtk/RadioButton.custom @@ -19,7 +19,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_radio_button_new_with_mnemonic (IntPtr group, IntPtr label); // creates a new group for this RadioButton diff --git a/gtk/RadioMenuItem.custom b/gtk/RadioMenuItem.custom index a124f0490..ad8f86f99 100644 --- a/gtk/RadioMenuItem.custom +++ b/gtk/RadioMenuItem.custom @@ -38,7 +38,7 @@ } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_radio_menu_item_new_with_mnemonic(IntPtr group, IntPtr label); public RadioMenuItem (GLib.SList group, string label) : base (IntPtr.Zero) diff --git a/gtk/RadioToolButton.custom b/gtk/RadioToolButton.custom index 4e07e1602..edb1c9140 100644 --- a/gtk/RadioToolButton.custom +++ b/gtk/RadioToolButton.custom @@ -21,7 +21,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_radio_tool_button_new (IntPtr group); public RadioToolButton (GLib.SList group) : base (IntPtr.Zero) @@ -34,7 +34,7 @@ Raw = gtk_radio_tool_button_new(group == null ? IntPtr.Zero : group.Handle); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_radio_tool_button_new_from_stock (IntPtr group, IntPtr stock_id); public RadioToolButton (GLib.SList group, string stock_id) : base (IntPtr.Zero) diff --git a/gtk/SelectionData.custom b/gtk/SelectionData.custom index c4fe6f9ea..e78325be7 100644 --- a/gtk/SelectionData.custom +++ b/gtk/SelectionData.custom @@ -18,10 +18,10 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr gtk_selection_data_get_text (IntPtr selection_data); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] private static extern void gtk_selection_data_set_text (IntPtr selection_data, IntPtr str, int len); public string Text { @@ -38,7 +38,7 @@ } } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr gtk_selection_data_get_data (IntPtr selection_data); public byte[] Data { @@ -54,10 +54,10 @@ Set(type, format, data, data.Length); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_free (IntPtr ptr); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_selection_data_get_targets(IntPtr raw, out IntPtr targets, out int n_atoms); public Gdk.Atom [] Targets { diff --git a/gtk/SpinButton.custom b/gtk/SpinButton.custom index f05a8c141..0e6ebb2bc 100644 --- a/gtk/SpinButton.custom +++ b/gtk/SpinButton.custom @@ -21,7 +21,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_spin_button_new_with_range (double min, double max, double step); public SpinButton (double min, double max, double step) : base (IntPtr.Zero) diff --git a/gtk/StatusIcon.custom b/gtk/StatusIcon.custom index 602b3a842..61482e569 100644 --- a/gtk/StatusIcon.custom +++ b/gtk/StatusIcon.custom @@ -26,12 +26,12 @@ return GetGeometry (out junk, out area, out orientation); } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void MenuPositionFuncNative (IntPtr menu, out int x, out int y, out bool push_in, IntPtr user_data); static MenuPositionFuncNative StatusIconPositionMenuFunc = null; - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_menu_popup (IntPtr menu, IntPtr parent_menu_shell, IntPtr parent_menu_item, MenuPositionFuncNative func, IntPtr data, uint button, uint activate_time); public void PresentMenu (Menu menu, uint button, uint activate_time) diff --git a/gtk/Stock.custom b/gtk/Stock.custom index 38dc7abe1..0f21b16d4 100644 --- a/gtk/Stock.custom +++ b/gtk/Stock.custom @@ -19,7 +19,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_stock_list_ids (); public static string[] ListIds () @@ -43,7 +43,7 @@ public IntPtr TranslationDomain; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_stock_lookup (IntPtr stock_id, out ConstStockItem item); public static Gtk.StockItem Lookup (string stock_id) { diff --git a/gtk/StockManager.cs b/gtk/StockManager.cs index 5f73555fb..4d50b9815 100644 --- a/gtk/StockManager.cs +++ b/gtk/StockManager.cs @@ -26,7 +26,7 @@ namespace Gtk { public class StockManager { - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_stock_add_static(ref Gtk.StockItem items, uint n_items); [Obsolete ("Use StockManager.Add instead")] @@ -55,7 +55,7 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_stock_lookup (IntPtr stock_id, out ConstStockItem item); public static bool Lookup (string stock_id, ref Gtk.StockItem item) @@ -76,10 +76,10 @@ namespace Gtk { return Lookup (stock_id, ref item); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_stock_add(ref Gtk.StockItem item, uint n_items); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_stock_add(Gtk.StockItem[] items, uint n_items); [Obsolete ("Use the StockItem or StockItem[] overload instead.")] diff --git a/gtk/Target.custom b/gtk/Target.custom index 2e60d38ac..838d17c8c 100644 --- a/gtk/Target.custom +++ b/gtk/Target.custom @@ -20,7 +20,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_target_table_new_from_list(IntPtr list, out int n_targets); public static Gtk.TargetEntry[] TableNewFromList(Gtk.TargetList list) { diff --git a/gtk/TargetList.custom b/gtk/TargetList.custom index 115d3e464..3ed220566 100644 --- a/gtk/TargetList.custom +++ b/gtk/TargetList.custom @@ -16,7 +16,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_target_list_new(Gtk.TargetEntry[] targets, uint n_targets); public TargetList() : base(gtk_target_list_new(null, 0)) {} diff --git a/gtk/TextBuffer.custom b/gtk/TextBuffer.custom index cb3d66f2c..df74f2536 100644 --- a/gtk/TextBuffer.custom +++ b/gtk/TextBuffer.custom @@ -19,7 +19,7 @@ // Boston, MA 02111-1307, USA. -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_text_buffer_set_text (IntPtr raw, IntPtr text, int len); #if !GTK_SHARP_2_8 @@ -53,7 +53,7 @@ public void PasteClipboard (Gtk.Clipboard clipboard) gtk_text_buffer_paste_clipboard(Handle, clipboard.Handle, IntPtr.Zero, true); } -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_text_buffer_insert (IntPtr raw, ref Gtk.TextIter iter, IntPtr text, int len); [Obsolete ("Replaced by 'ref TextIter iter' overload")] @@ -116,7 +116,7 @@ public void SetText (string text) Text = text; } -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_text_buffer_insert_interactive(IntPtr raw, ref Gtk.TextIter iter, IntPtr text, int len, bool default_editable); public bool InsertInteractive(ref Gtk.TextIter iter, string text, bool default_editable) @@ -127,7 +127,7 @@ public bool InsertInteractive(ref Gtk.TextIter iter, string text, bool default_e return result; } -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_text_buffer_insert_interactive_at_cursor(IntPtr raw, IntPtr text, int len, bool default_editable); public bool InsertInteractiveAtCursor(string text, bool default_editable) @@ -138,7 +138,7 @@ public bool InsertInteractiveAtCursor(string text, bool default_editable) return result; } -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_text_buffer_insert_at_cursor(IntPtr raw, IntPtr text, int len); public void InsertAtCursor(string text) @@ -148,7 +148,7 @@ public void InsertAtCursor(string text) GLib.Marshaller.Free (native); } -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_buffer_serialize (IntPtr raw, IntPtr content_buffer, IntPtr format, ref Gtk.TextIter start, ref Gtk.TextIter end, out UIntPtr length); public byte[] Serialize(Gtk.TextBuffer content_buffer, Gdk.Atom format, Gtk.TextIter start, Gtk.TextIter end) @@ -163,10 +163,10 @@ public byte[] Serialize(Gtk.TextBuffer content_buffer, Gdk.Atom format, Gtk.Text return ret; } -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_buffer_get_serialize_formats(IntPtr raw, out int n_formats); -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_buffer_get_deserialize_formats(IntPtr raw, out int n_formats); public Gdk.Atom[] DeserializeFormats { diff --git a/gtk/TextChildAnchor.custom b/gtk/TextChildAnchor.custom index 187358f81..56988de55 100644 --- a/gtk/TextChildAnchor.custom +++ b/gtk/TextChildAnchor.custom @@ -19,7 +19,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_child_anchor_get_widgets (IntPtr raw); public Widget[] Widgets { diff --git a/gtk/TextIter.custom b/gtk/TextIter.custom index 6f0588e74..cff299543 100755 --- a/gtk/TextIter.custom +++ b/gtk/TextIter.custom @@ -19,7 +19,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint gtk_text_iter_get_char(ref Gtk.TextIter raw); public string Char { @@ -28,7 +28,7 @@ } } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_iter_get_marks (ref TextIter iter); public TextMark[] Marks { @@ -44,7 +44,7 @@ } } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_iter_get_tags (ref TextIter iter); public TextTag[] Tags { @@ -60,7 +60,7 @@ } } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_iter_get_toggled_tags (ref TextIter iter, bool toggled_on); public TextTag[] GetToggledTags (bool toggled_on) diff --git a/gtk/TextView.custom b/gtk/TextView.custom index 94e77b93f..5ae4e3a07 100644 --- a/gtk/TextView.custom +++ b/gtk/TextView.custom @@ -21,7 +21,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_view_new_with_buffer (IntPtr buffer); public TextView (TextBuffer buffer) : base (IntPtr.Zero) @@ -35,7 +35,7 @@ Raw = gtk_text_view_new_with_buffer (buffer.Handle); } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [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 @@ } } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void MoveFocusVMDelegate (IntPtr text_view, int direction); static MoveFocusVMDelegate MoveFocusVMCallback; diff --git a/gtk/Toolbar.custom b/gtk/Toolbar.custom index 327914d50..6bae38d87 100644 --- a/gtk/Toolbar.custom +++ b/gtk/Toolbar.custom @@ -20,7 +20,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libgobject-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_object_weak_ref (IntPtr raw, WeakNotify cb, IntPtr data); delegate void WeakNotify (IntPtr handle, IntPtr obj); @@ -40,7 +40,7 @@ } } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_toolbar_append_element (IntPtr raw, int type, IntPtr widget, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data); [Obsolete ("Replaced by ToolItem API")] @@ -64,7 +64,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_toolbar_insert_element (IntPtr raw, int type, IntPtr widget, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data, int position); [Obsolete ("Replaced by ToolItem API")] @@ -89,7 +89,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_toolbar_prepend_element (IntPtr raw, int type, IntPtr widget, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data); [Obsolete ("Replaced by ToolItem API")] @@ -113,7 +113,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_toolbar_append_item (IntPtr raw, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data); [Obsolete ("Replaced by ToolItem API")] @@ -137,7 +137,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_toolbar_insert_item (IntPtr raw, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data, int position); [Obsolete ("Replaced by ToolItem API")] @@ -161,7 +161,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_toolbar_prepend_item (IntPtr raw, IntPtr text, IntPtr tooltip_text, IntPtr tooltip_private_text, IntPtr icon, GtkSharp.SignalFuncNative cb, IntPtr user_data); [Obsolete ("Replaced by ToolItem API")] @@ -185,7 +185,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_toolbar_insert_stock (IntPtr raw, IntPtr stock_id, IntPtr tooltip_text, IntPtr tooltip_private_text, GtkSharp.SignalFuncNative cb, IntPtr user_data, int position); [Obsolete ("Replaced by ToolItem API")] diff --git a/gtk/TreeModelAdapter.custom b/gtk/TreeModelAdapter.custom index d011b04ef..7ef2d5b2b 100644 --- a/gtk/TreeModelAdapter.custom +++ b/gtk/TreeModelAdapter.custom @@ -19,7 +19,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); public bool IterChildren (out Gtk.TreeIter iter) { bool raw_ret = gtk_tree_model_iter_children (Handle, out iter, IntPtr.Zero); @@ -33,7 +33,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_nth_child (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); public bool IterNthChild (out Gtk.TreeIter iter, int n) { bool raw_ret = gtk_tree_model_iter_nth_child (Handle, out iter, IntPtr.Zero, n); @@ -77,7 +77,7 @@ return ret; } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [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 - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [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 bccbcb259..404c52d37 100644 --- a/gtk/TreeModelFilter.custom +++ b/gtk/TreeModelFilter.custom @@ -1,4 +1,4 @@ - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); public bool IterChildren (out Gtk.TreeIter iter) { bool raw_ret = gtk_tree_model_iter_children (Handle, out iter, IntPtr.Zero); @@ -12,7 +12,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_nth_child (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); public bool IterNthChild (out Gtk.TreeIter iter, int n) { bool raw_ret = gtk_tree_model_iter_nth_child (Handle, out iter, IntPtr.Zero, n); @@ -56,7 +56,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_model_filter_set_modify_func(IntPtr raw, int n_columns, IntPtr[] types, GtkSharp.TreeModelFilterModifyFuncNative func, IntPtr data, GLib.DestroyNotify destroy); public void SetModifyFunc (int n_columns, GLib.GType[] types, TreeModelFilterModifyFunc func) @@ -69,7 +69,7 @@ gtk_tree_model_filter_set_modify_func (Handle, n_columns, native_types, func_wrapper.NativeDelegate, (IntPtr) gch, GLib.DestroyHelper.NotifyHandler); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_filter_convert_child_iter_to_iter (IntPtr raw, out Gtk.TreeIter filter_iter, ref Gtk.TreeIter child_iter); public TreeIter ConvertChildIterToIter (Gtk.TreeIter child_iter) @@ -81,7 +81,7 @@ return TreeIter.Zero; } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [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 @@ } } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [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 3b8cb62a3..9e98ec3d6 100644 --- a/gtk/TreeModelSort.custom +++ b/gtk/TreeModelSort.custom @@ -21,7 +21,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); public bool IterChildren (out Gtk.TreeIter iter) { bool raw_ret = gtk_tree_model_iter_children (Handle, out iter, IntPtr.Zero); @@ -35,7 +35,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_nth_child (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); public bool IterNthChild (out Gtk.TreeIter iter, int n) { bool raw_ret = gtk_tree_model_iter_nth_child (Handle, out iter, IntPtr.Zero, n); @@ -105,7 +105,7 @@ DefaultSortFunc = sort_func; } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [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 @@ } } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter, IntPtr new_order); static RowsReorderedVMDelegate RowsReorderedVMCallback; diff --git a/gtk/TreePath.custom b/gtk/TreePath.custom index b0f351c8d..50de67225 100644 --- a/gtk/TreePath.custom +++ b/gtk/TreePath.custom @@ -14,7 +14,7 @@ // Boston, MA 02111-1307, USA. // Patch submitted by malte on bug #49518 - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_tree_path_get_indices(IntPtr raw); public int [] Indices { diff --git a/gtk/TreeSelection.custom b/gtk/TreeSelection.custom index 873597b6f..b85d0ec83 100644 --- a/gtk/TreeSelection.custom +++ b/gtk/TreeSelection.custom @@ -19,7 +19,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_tree_selection_get_selected_rows (IntPtr raw, IntPtr model); public TreePath[] GetSelectedRows () @@ -38,7 +38,7 @@ SelectFunction = func; } - [DllImport ("libgtk-win32-2.0-0.dll", EntryPoint="gtk_tree_selection_get_selected", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", EntryPoint="gtk_tree_selection_get_selected", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_selection_get_selected_without_model (IntPtr raw, IntPtr model, out Gtk.TreeIter iter); public bool GetSelected (out Gtk.TreeIter iter) diff --git a/gtk/TreeStore.custom b/gtk/TreeStore.custom index 3a2e1d7fb..486a3c401 100644 --- a/gtk/TreeStore.custom +++ b/gtk/TreeStore.custom @@ -23,10 +23,10 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_append (IntPtr raw, out TreeIter iter, ref TreeIter parent); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_append (IntPtr raw, out TreeIter iter, IntPtr parent); [Obsolete ("Replaced by AppendNode")] @@ -57,10 +57,10 @@ return iter; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert (IntPtr raw, out TreeIter iter, ref TreeIter parent, int position); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert (IntPtr raw, out TreeIter iter, IntPtr parent, int position); [Obsolete ("Replaced by InsertNode")] @@ -91,10 +91,10 @@ return iter; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_prepend (IntPtr raw, out TreeIter iter, ref TreeIter parent); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_prepend (IntPtr raw, out TreeIter iter, IntPtr parent); [Obsolete ("Replaced by PrependNode")] @@ -125,10 +125,10 @@ return iter; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert_before (IntPtr raw, out TreeIter iter, ref TreeIter parent, ref TreeIter sibling); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert_before (IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling); [Obsolete ("Replaced by InsertNodeBefore")] @@ -159,10 +159,10 @@ return iter; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert_after (IntPtr raw, out TreeIter iter, ref TreeIter parent, ref TreeIter sibling); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert_after (IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling); [Obsolete ("Replaced by InsertNodeAfter")] @@ -193,7 +193,7 @@ return iter; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); public bool IterChildren (out Gtk.TreeIter iter) { bool raw_ret = gtk_tree_model_iter_children (Handle, out iter, IntPtr.Zero); @@ -207,7 +207,7 @@ return ret; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_model_iter_nth_child (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); public bool IterNthChild (out Gtk.TreeIter iter, int n) { bool raw_ret = gtk_tree_model_iter_nth_child (Handle, out iter, IntPtr.Zero, n); @@ -293,10 +293,10 @@ return AppendValues ((Array) values); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert_with_valuesv(IntPtr raw, out TreeIter iter, IntPtr parent, int position, int[] columns, GLib.Value[] values, int n_values); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert_with_valuesv(IntPtr raw, out TreeIter iter, ref TreeIter parent, int position, int[] columns, GLib.Value[] values, int n_values); public TreeIter InsertWithValues (int position, params object[] values) @@ -335,7 +335,7 @@ return iter; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_set_valuesv(IntPtr raw, ref TreeIter iter, int[] columns, GLib.Value[] values, int n_values); public void SetValues (TreeIter iter, params object[] values) @@ -403,7 +403,7 @@ DefaultSortFunc = sort_func; } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [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 @@ } } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void RowsReorderedVMDelegate (IntPtr tree_model, IntPtr path, IntPtr iter, IntPtr new_order); static RowsReorderedVMDelegate RowsReorderedVMCallback; diff --git a/gtk/TreeView.custom b/gtk/TreeView.custom index a631f42b1..a971cab58 100644 --- a/gtk/TreeView.custom +++ b/gtk/TreeView.custom @@ -45,7 +45,7 @@ } } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_view_get_path_at_pos (IntPtr raw, int x, int y, @@ -54,7 +54,7 @@ out int cell_x, out int cell_y); - [DllImport ("libgtk-win32-2.0-0.dll", EntryPoint="gtk_tree_view_get_path_at_pos", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", EntryPoint="gtk_tree_view_get_path_at_pos", CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_view_get_path_at_pos_intptr (IntPtr raw, int x, int y, diff --git a/gtk/TreeViewColumn.custom b/gtk/TreeViewColumn.custom index 924dc7ce6..a5acfa1a6 100644 --- a/gtk/TreeViewColumn.custom +++ b/gtk/TreeViewColumn.custom @@ -50,7 +50,7 @@ _NewWithAttributes (title, cell, attrs); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_tree_view_column_get_cell_renderers (IntPtr raw); public CellRenderer[] CellRenderers { diff --git a/gtk/UIManager.custom b/gtk/UIManager.custom index 5cd5b313b..801ef32a0 100644 --- a/gtk/UIManager.custom +++ b/gtk/UIManager.custom @@ -32,7 +32,7 @@ return AddUiFromString (new System.IO.StreamReader (s).ReadToEnd ()); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint gtk_ui_manager_new_merge_id (IntPtr raw); public uint NewMergeId () @@ -40,7 +40,7 @@ return gtk_ui_manager_new_merge_id (Handle); } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_ui_manager_get_toplevels (IntPtr raw, int types); public Widget[] GetToplevels (Gtk.UIManagerItemType types) { @@ -52,7 +52,7 @@ return result; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_ui_manager_get_action_groups (IntPtr raw); public ActionGroup[] ActionGroups { diff --git a/gtk/VScale.custom b/gtk/VScale.custom index ef1b410bd..3a33f1fc0 100644 --- a/gtk/VScale.custom +++ b/gtk/VScale.custom @@ -21,7 +21,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_vscale_new_with_range (double min, double max, double step); public VScale (double min, double max, double step) : base (IntPtr.Zero) diff --git a/gtk/Widget.custom b/gtk/Widget.custom index 741908cf1..4934abf60 100644 --- a/gtk/Widget.custom +++ b/gtk/Widget.custom @@ -60,7 +60,7 @@ public void AddAccelerator (string accel_signal, AccelGroup accel_group, AccelKe } -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_widget_set_state (IntPtr raw, int state); [DllImport("gtksharpglue-3")] @@ -178,13 +178,13 @@ struct GClosure { IntPtr notifiers; } -[UnmanagedFunctionPointer (GLib.Global.CallingConvention)] +[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", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_closure_new_simple (int closure_size, IntPtr dummy); -[DllImport ("libgobject-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_closure_set_marshal (IntPtr closure, ClosureMarshal marshaler); static IntPtr CreateClosure (ClosureMarshal marshaler) { @@ -193,7 +193,7 @@ static IntPtr CreateClosure (ClosureMarshal marshaler) { return raw_closure; } -[DllImport ("libgobject-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern uint g_signal_newv (IntPtr signal_name, IntPtr gtype, GLib.Signal.Flags signal_flags, IntPtr closure, IntPtr accumulator, IntPtr accu_data, IntPtr c_marshaller, IntPtr return_type, uint n_params, [MarshalAs (UnmanagedType.LPArray)] IntPtr[] param_types); static uint RegisterSignal (string signal_name, GLib.GType gtype, GLib.Signal.Flags signal_flags, GLib.GType return_type, GLib.GType[] param_types, ClosureMarshal marshaler) @@ -303,7 +303,7 @@ private class BindingInvoker { */ static ArrayList binding_invokers; -[DllImport ("libgobject-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int g_value_get_long (ref GLib.Value val); static void BindingMarshal_cb (IntPtr raw_closure, IntPtr return_val, uint n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) @@ -331,10 +331,10 @@ static ClosureMarshal BindingDelegate { } } -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_binding_set_by_class (IntPtr class_ptr); -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_binding_entry_add_signall (IntPtr binding_set, uint keyval, Gdk.ModifierType modifiers, IntPtr signal_name, IntPtr binding_args); [StructLayout(LayoutKind.Sequential)] @@ -400,10 +400,10 @@ public object StyleGetProperty (string property_name) return ret; } -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_widget_class_find_style_property (IntPtr class_ptr, IntPtr property_name); -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_widget_style_get_property (IntPtr inst, IntPtr property_name, ref GLib.Value value); internal GLib.Value StyleGetPropertyValue (string property_name) @@ -422,7 +422,7 @@ internal GLib.Value StyleGetPropertyValue (string property_name) } } -[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_widget_list_mnemonic_labels (IntPtr raw); public Widget[] ListMnemonicLabels () diff --git a/gtk/Window.custom b/gtk/Window.custom index 94113c314..113610ebd 100755 --- a/gtk/Window.custom +++ b/gtk/Window.custom @@ -26,10 +26,10 @@ this.Title = title; } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_window_get_default_icon_list(); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_window_set_default_icon_list(IntPtr list); public static Gdk.Pixbuf[] DefaultIconList { @@ -51,10 +51,10 @@ } } - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_window_get_icon_list(IntPtr raw); - [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_window_set_icon_list(IntPtr raw, IntPtr list); public Gdk.Pixbuf[] IconList { @@ -86,7 +86,7 @@ } } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [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 @@ } } - [UnmanagedFunctionPointer (GLib.Global.CallingConvention)] + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void MoveFocusVMDelegate (IntPtr window, int direction); static MoveFocusVMDelegate MoveFocusVMCallback; diff --git a/gtkdotnet/Graphics.cs b/gtkdotnet/Graphics.cs index b9d0ff5b4..d27275d82 100644 --- a/gtkdotnet/Graphics.cs +++ b/gtkdotnet/Graphics.cs @@ -33,19 +33,19 @@ namespace Gtk.DotNet { private Graphics () {} - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr gdk_win32_drawable_get_handle(IntPtr raw); - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr gdk_win32_hdc_get(IntPtr drawable, IntPtr gc, int usage); - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] internal static extern void gdk_win32_hdc_release(IntPtr drawable,IntPtr gc,int usage); - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr gdk_x11_drawable_get_xdisplay (IntPtr raw); - [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libgdk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] internal static extern IntPtr gdk_x11_drawable_get_xid (IntPtr raw); public static System.Drawing.Graphics FromDrawable (Gdk.Drawable drawable) diff --git a/pango/AttrBackground.cs b/pango/AttrBackground.cs index fcd3251cb..d0538afdd 100644 --- a/pango/AttrBackground.cs +++ b/pango/AttrBackground.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrBackground : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_background_new (ushort red, ushort green, ushort blue); public AttrBackground (ushort red, ushort green, ushort blue) : this (pango_attr_background_new (red, green, blue)) {} diff --git a/pango/AttrFallback.cs b/pango/AttrFallback.cs index 1920ca035..9f23fef77 100644 --- a/pango/AttrFallback.cs +++ b/pango/AttrFallback.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrFallback : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_fallback_new (bool fallback); public AttrFallback (bool fallback) : this (pango_attr_fallback_new (fallback)) {} diff --git a/pango/AttrFamily.cs b/pango/AttrFamily.cs index 8a08aeac8..aa2a856bf 100644 --- a/pango/AttrFamily.cs +++ b/pango/AttrFamily.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrFamily : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_family_new (IntPtr family); public AttrFamily (string family) : base (NewAttrFamily (family)) {} diff --git a/pango/AttrFontDesc.cs b/pango/AttrFontDesc.cs index d15d68a54..0fe49374e 100644 --- a/pango/AttrFontDesc.cs +++ b/pango/AttrFontDesc.cs @@ -23,10 +23,10 @@ namespace Pango { public class AttrFontDesc : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_font_desc_new (IntPtr font_desc); - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_font_description_copy(IntPtr raw); public AttrFontDesc (Pango.FontDescription font_desc) : this (pango_attr_font_desc_new (pango_font_description_copy (font_desc.Handle))) {} diff --git a/pango/AttrForeground.cs b/pango/AttrForeground.cs index 41b3feeef..b02f641fe 100644 --- a/pango/AttrForeground.cs +++ b/pango/AttrForeground.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrForeground : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_foreground_new (ushort red, ushort green, ushort blue); public AttrForeground (ushort red, ushort green, ushort blue) : this (pango_attr_foreground_new (red, green, blue)) {} diff --git a/pango/AttrGravity.cs b/pango/AttrGravity.cs index 63f76d5bf..dc1c3fdca 100644 --- a/pango/AttrGravity.cs +++ b/pango/AttrGravity.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrGravity : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_gravity_new (int gravity); public AttrGravity (Gravity gravity) : this (pango_attr_gravity_new ((int) gravity)) {} diff --git a/pango/AttrGravityHint.cs b/pango/AttrGravityHint.cs index 4a74550b9..f37e11306 100644 --- a/pango/AttrGravityHint.cs +++ b/pango/AttrGravityHint.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrGravityHint : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_gravity_hint_new (int hint); public AttrGravityHint (GravityHint hint) : this (pango_attr_gravity_hint_new ((int) hint)) {} diff --git a/pango/AttrIterator.custom b/pango/AttrIterator.custom index 0c80e4d85..30d92c728 100644 --- a/pango/AttrIterator.custom +++ b/pango/AttrIterator.custom @@ -21,7 +21,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_attr_iterator_get_font(IntPtr raw, IntPtr desc, out IntPtr language, out IntPtr extra_attrs); public void GetFont (out Pango.FontDescription desc, out Pango.Language language, out Pango.Attribute[] extra_attrs) @@ -42,7 +42,7 @@ extra_attrs [i++] = Pango.Attribute.GetAttribute (raw_attr); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_iterator_get_attrs (IntPtr raw); public Pango.Attribute[] Attrs { diff --git a/pango/AttrLanguage.cs b/pango/AttrLanguage.cs index da2879bc9..49b5f3482 100644 --- a/pango/AttrLanguage.cs +++ b/pango/AttrLanguage.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrLanguage : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_language_new (IntPtr language); public AttrLanguage (Pango.Language language) : this (pango_attr_language_new (language.Handle)) {} diff --git a/pango/AttrLetterSpacing.cs b/pango/AttrLetterSpacing.cs index 108c3f688..34e23f2c0 100644 --- a/pango/AttrLetterSpacing.cs +++ b/pango/AttrLetterSpacing.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrLetterSpacing : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_letter_spacing_new (int letter_spacing); public AttrLetterSpacing (int letter_spacing) : this (pango_attr_letter_spacing_new (letter_spacing)) {} diff --git a/pango/AttrList.custom b/pango/AttrList.custom index 10c2113ba..8c415c798 100644 --- a/pango/AttrList.custom +++ b/pango/AttrList.custom @@ -20,10 +20,10 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attribute_copy (IntPtr raw); - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_attr_list_insert (IntPtr raw, IntPtr attr); public void Insert (Pango.Attribute attr) @@ -31,7 +31,7 @@ pango_attr_list_insert (Handle, pango_attribute_copy (attr.Handle)); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_attr_list_insert_before (IntPtr raw, IntPtr attr); public void InsertBefore (Pango.Attribute attr) diff --git a/pango/AttrRise.cs b/pango/AttrRise.cs index 5f0696f65..55eb732f4 100644 --- a/pango/AttrRise.cs +++ b/pango/AttrRise.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrRise : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_rise_new (int rise); public AttrRise (int rise) : this (pango_attr_rise_new (rise)) {} diff --git a/pango/AttrScale.cs b/pango/AttrScale.cs index 3d90ef67c..8055c7982 100644 --- a/pango/AttrScale.cs +++ b/pango/AttrScale.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrScale : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_scale_new (double scale); public AttrScale (double scale) : this (pango_attr_scale_new (scale)) {} diff --git a/pango/AttrShape.cs b/pango/AttrShape.cs index d117d96d1..090afb674 100644 --- a/pango/AttrShape.cs +++ b/pango/AttrShape.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrShape : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_shape_new (ref Pango.Rectangle ink_rect, ref Pango.Rectangle logical_rect); public AttrShape (Pango.Rectangle ink_rect, Pango.Rectangle logical_rect) : this (pango_attr_shape_new (ref ink_rect, ref logical_rect)) {} diff --git a/pango/AttrSize.cs b/pango/AttrSize.cs index ceecbd0df..f21bae40c 100644 --- a/pango/AttrSize.cs +++ b/pango/AttrSize.cs @@ -23,10 +23,10 @@ namespace Pango { public class AttrSize : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_size_new (int size); - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_size_new_absolute (int size); public AttrSize (int size) : this (pango_attr_size_new (size)) {} diff --git a/pango/AttrStretch.cs b/pango/AttrStretch.cs index 37a1c168b..ec39997aa 100644 --- a/pango/AttrStretch.cs +++ b/pango/AttrStretch.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrStretch : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_stretch_new (Pango.Stretch stretch); public AttrStretch (Pango.Stretch stretch) : this (pango_attr_stretch_new (stretch)) {} diff --git a/pango/AttrStrikethrough.cs b/pango/AttrStrikethrough.cs index e4b934eed..46b2b4301 100644 --- a/pango/AttrStrikethrough.cs +++ b/pango/AttrStrikethrough.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrStrikethrough : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_strikethrough_new (bool strikethrough); public AttrStrikethrough (bool strikethrough) : this (pango_attr_strikethrough_new (strikethrough)) {} diff --git a/pango/AttrStrikethroughColor.cs b/pango/AttrStrikethroughColor.cs index b51b5621a..3add21fcd 100644 --- a/pango/AttrStrikethroughColor.cs +++ b/pango/AttrStrikethroughColor.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrStrikethroughColor : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_strikethrough_color_new (ushort red, ushort green, ushort blue); public AttrStrikethroughColor (ushort red, ushort green, ushort blue) : this (pango_attr_strikethrough_color_new (red, green, blue)) {} diff --git a/pango/AttrStyle.cs b/pango/AttrStyle.cs index 94782fcdd..eeaa9fa0b 100644 --- a/pango/AttrStyle.cs +++ b/pango/AttrStyle.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrStyle : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_style_new (Pango.Style style); public AttrStyle (Pango.Style style) : this (pango_attr_style_new (style)) {} diff --git a/pango/AttrUnderline.cs b/pango/AttrUnderline.cs index a29f7398b..aaaf71c98 100644 --- a/pango/AttrUnderline.cs +++ b/pango/AttrUnderline.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrUnderline : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_underline_new (Pango.Underline underline); public AttrUnderline (Pango.Underline underline) : this (pango_attr_underline_new (underline)) {} diff --git a/pango/AttrUnderlineColor.cs b/pango/AttrUnderlineColor.cs index 25be14bc2..a9ccf8d19 100644 --- a/pango/AttrUnderlineColor.cs +++ b/pango/AttrUnderlineColor.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrUnderlineColor : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_underline_color_new (ushort red, ushort green, ushort blue); public AttrUnderlineColor (ushort red, ushort green, ushort blue) : this (pango_attr_underline_color_new (red, green, blue)) {} diff --git a/pango/AttrVariant.cs b/pango/AttrVariant.cs index 5fb31e2c6..dfd769aa1 100644 --- a/pango/AttrVariant.cs +++ b/pango/AttrVariant.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrVariant : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_variant_new (Pango.Variant variant); public AttrVariant (Pango.Variant variant) : this (pango_attr_variant_new (variant)) {} diff --git a/pango/AttrWeight.cs b/pango/AttrWeight.cs index 38dcc03f9..26420d8ef 100644 --- a/pango/AttrWeight.cs +++ b/pango/AttrWeight.cs @@ -23,7 +23,7 @@ namespace Pango { public class AttrWeight : Attribute { - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attr_weight_new (Pango.Weight weight); public AttrWeight (Pango.Weight weight) : this (pango_attr_weight_new (weight)) {} diff --git a/pango/Attribute.cs b/pango/Attribute.cs index 76183df7e..b44d785b7 100644 --- a/pango/Attribute.cs +++ b/pango/Attribute.cs @@ -97,7 +97,7 @@ namespace Pango { Dispose (); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_attribute_destroy (IntPtr raw); public void Dispose () @@ -153,14 +153,14 @@ namespace Pango { } } - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_attribute_copy (IntPtr raw); public Pango.Attribute Copy () { return GetAttribute (pango_attribute_copy (raw)); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool pango_attribute_equal (IntPtr raw1, IntPtr raw2); public bool Equal (Pango.Attribute attr2) { diff --git a/pango/Context.custom b/pango/Context.custom index 8d7269978..3fc230e4a 100644 --- a/pango/Context.custom +++ b/pango/Context.custom @@ -20,10 +20,10 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libglib-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_free (IntPtr raw); - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_context_list_families(IntPtr raw, out IntPtr families, out int n_families); public FontFamily [] Families { @@ -44,7 +44,7 @@ } } - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_context_list_families(IntPtr raw, IntPtr families, out int n_families); [Obsolete] diff --git a/pango/Coverage.custom b/pango/Coverage.custom index 9f4ee8085..8dc04fd04 100644 --- a/pango/Coverage.custom +++ b/pango/Coverage.custom @@ -20,10 +20,10 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libglib-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_free (IntPtr raw); - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_coverage_to_bytes (IntPtr raw, out IntPtr bytes, out int n_bytes); public void ToBytes(out byte[] bytes) diff --git a/pango/FontFamily.custom b/pango/FontFamily.custom index 7a3d83bf4..271a377bc 100644 --- a/pango/FontFamily.custom +++ b/pango/FontFamily.custom @@ -20,10 +20,10 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libglib-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_free (IntPtr raw); - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_font_family_list_faces(IntPtr raw, out IntPtr faces, out int n_faces); public FontFace [] Faces { @@ -44,7 +44,7 @@ } } - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_font_family_list_faces(IntPtr raw, IntPtr faces, out int n_faces); [Obsolete] diff --git a/pango/FontMap.custom b/pango/FontMap.custom index 8c7afd600..bfbc5acf3 100644 --- a/pango/FontMap.custom +++ b/pango/FontMap.custom @@ -20,10 +20,10 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libglib-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_free (IntPtr raw); - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_font_map_list_families(IntPtr raw, out IntPtr families, out int n_families); public FontFamily [] Families { @@ -44,7 +44,7 @@ } } - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_font_map_list_families(IntPtr raw, IntPtr families, out int n_families); [Obsolete] diff --git a/pango/Global.custom b/pango/Global.custom index 48162b5a1..9faa86097 100644 --- a/pango/Global.custom +++ b/pango/Global.custom @@ -20,7 +20,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool pango_scan_int(IntPtr pos, out int out_param); [Obsolete] @@ -32,7 +32,7 @@ return ret; } - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool pango_parse_markup (IntPtr markup, int length, uint accel_marker, out IntPtr attr_list_handle, out IntPtr text, out uint accel_char, IntPtr err); public static bool ParseMarkup (string markup, char accel_marker, out Pango.AttrList attrs, out string text, out char accel_char) diff --git a/pango/GlyphItem.custom b/pango/GlyphItem.custom index b9f7cfe38..ee81300c0 100644 --- a/pango/GlyphItem.custom +++ b/pango/GlyphItem.custom @@ -21,7 +21,7 @@ // Boston, MA 02111-1307, USA. - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_glyph_item_apply_attrs(ref Pango.GlyphItem raw, IntPtr text, IntPtr list); public GlyphItem[] ApplyAttrs (string text, Pango.AttrList list) diff --git a/pango/Layout.custom b/pango/Layout.custom index 8559a8215..ff4401afd 100644 --- a/pango/Layout.custom +++ b/pango/Layout.custom @@ -21,7 +21,7 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. -[DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_layout_get_lines(IntPtr raw); public LayoutLine[] Lines { @@ -37,7 +37,7 @@ public LayoutLine[] Lines { } } -[DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_layout_set_markup_with_accel (IntPtr raw, IntPtr markup, int length, uint accel_marker, out uint accel_char); public void SetMarkupWithAccel (string markup, char accel_marker, out char accel_char) @@ -49,10 +49,10 @@ public void SetMarkupWithAccel (string markup, char accel_marker, out char accel accel_char = GLib.Marshaller.GUnicharToChar (ucs4_accel_char); } - [DllImport ("libglib-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_free (IntPtr raw); - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_layout_get_log_attrs (IntPtr raw, out IntPtr attrs, out int n_attrs); public LogAttr [] LogAttrs { @@ -73,7 +73,7 @@ public void SetMarkupWithAccel (string markup, char accel_marker, out char accel } } - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_layout_set_text (IntPtr raw, IntPtr text, int length); public void SetText (string text) @@ -83,7 +83,7 @@ public void SetMarkupWithAccel (string markup, char accel_marker, out char accel GLib.Marshaller.Free (native_text); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_layout_set_markup (IntPtr raw, IntPtr markup, int length); public void SetMarkup (string markup) diff --git a/pango/LayoutLine.custom b/pango/LayoutLine.custom index 8e0ac2df8..8f59dbe03 100644 --- a/pango/LayoutLine.custom +++ b/pango/LayoutLine.custom @@ -22,7 +22,7 @@ // Boston, MA 02111-1307, USA. #if NOT_BROKEN -[DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] +[DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_layout_line_get_x_ranges(IntPtr raw, int start_index, int end_index, out IntPtr ranges_handle, out int n_ranges); #endif diff --git a/pango/ScriptIter.cs b/pango/ScriptIter.cs index 6f2d48147..e44502b2b 100644 --- a/pango/ScriptIter.cs +++ b/pango/ScriptIter.cs @@ -27,7 +27,7 @@ namespace Pango { public ScriptIter(IntPtr raw) : base(raw) {} - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr pango_script_iter_new(IntPtr text, int length); public ScriptIter (string text) @@ -36,7 +36,7 @@ namespace Pango { Raw = pango_script_iter_new (native_text, -1); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_script_iter_free (IntPtr raw); ~ScriptIter () @@ -46,10 +46,10 @@ namespace Pango { Raw = IntPtr.Zero; } - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_script_iter_get_range (IntPtr raw, out IntPtr start, out IntPtr end, out Pango.Script script); - [DllImport ("libglib-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_utf8_pointer_to_offset (IntPtr str, IntPtr pos); public void GetRange (out int start, out int len, out Pango.Script script) @@ -62,7 +62,7 @@ namespace Pango { len = (int)g_utf8_pointer_to_offset (start_ptr, end_ptr); } - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool pango_script_iter_next (IntPtr raw); public bool Next () diff --git a/pango/TabArray.custom b/pango/TabArray.custom index 8466963b3..755809263 100644 --- a/pango/TabArray.custom +++ b/pango/TabArray.custom @@ -20,10 +20,10 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. - [DllImport ("libglib-2.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libglib-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_free (IntPtr raw); - [DllImport ("libpango-1.0-0.dll", CallingConvention = GLib.Global.CallingConvention)] + [DllImport ("libpango-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void pango_tab_array_get_tabs (IntPtr raw, out IntPtr alignments, out IntPtr locations); public void GetTabs (out TabAlign[] alignments, out int[] locations)