From 691de4e606c34a77af841ac3d20e4ba9b6602ff9 Mon Sep 17 00:00:00 2001 From: Bertrand Lorentz Date: Sun, 23 Feb 2014 15:12:20 +0100 Subject: [PATCH] gtk: Fix dll name and use a const for all DllImports in custom code In Windows builds of GTK+ 3.x, the dll filename is libgtk-3-0.dll. We use this opportunity to use a common const in the DllImport statement for all custom code. --- gtk/Accel.cs | 22 +++++++++++----------- gtk/Action.cs | 2 +- gtk/ActionGroup.cs | 2 +- gtk/Adjustment.cs | 2 +- gtk/Application.cs | 16 ++++++++-------- gtk/Bin.cs | 2 +- gtk/Builder.cs | 2 +- gtk/Button.cs | 2 +- gtk/CellRenderer.cs | 4 ++-- gtk/CheckMenuItem.cs | 2 +- gtk/Clipboard.cs | 8 ++++---- gtk/ColorSelection.cs | 8 ++++---- gtk/Container.cs | 4 ++-- gtk/Dialog.cs | 2 +- gtk/Drag.cs | 2 +- gtk/FileChooserDialog.cs | 2 +- gtk/Global.cs | 2 ++ gtk/HScale.cs | 2 +- gtk/IconFactory.cs | 2 +- gtk/IconSet.cs | 2 +- gtk/IconTheme.cs | 12 ++++++------ gtk/IconView.cs | 2 +- gtk/Image.cs | 4 ++-- gtk/ImageMenuItem.cs | 2 +- gtk/Key.cs | 4 ++-- gtk/ListStore.cs | 8 ++++---- gtk/Menu.cs | 4 ++-- gtk/MenuItem.cs | 2 +- gtk/MessageDialog.cs | 4 ++-- gtk/Notebook.cs | 2 +- gtk/Plug.cs | 4 ++-- gtk/Printer.cs | 2 +- gtk/RadioAction.cs | 4 ++-- gtk/RadioButton.cs | 6 +++--- gtk/RadioMenuItem.cs | 6 +++--- gtk/RadioToolButton.cs | 8 ++++---- gtk/SelectionData.cs | 8 ++++---- gtk/SpinButton.cs | 2 +- gtk/StatusIcon.cs | 4 ++-- gtk/Stock.cs | 4 ++-- gtk/StockManager.cs | 8 ++++---- gtk/Target.cs | 2 +- gtk/TargetList.cs | 2 +- gtk/TextBuffer.cs | 16 ++++++++-------- gtk/TextChildAnchor.cs | 2 +- gtk/TextIter.cs | 8 ++++---- gtk/TextView.cs | 2 +- gtk/TreeModelAdapter.cs | 4 ++-- gtk/TreeModelFilter.cs | 8 ++++---- gtk/TreeModelSort.cs | 4 ++-- gtk/TreePath.cs | 2 +- gtk/TreeSelection.cs | 4 ++-- gtk/TreeStore.cs | 30 +++++++++++++++--------------- gtk/TreeView.cs | 4 ++-- gtk/UIManager.cs | 6 +++--- gtk/VScale.cs | 2 +- gtk/Widget.cs | 12 ++++++------ gtk/Window.cs | 8 ++++---- gtk/gtk-api.raw | 2 +- gtk/gtk-sharp.dll.config.in | 2 +- sources/sources.xml | 2 +- 61 files changed, 157 insertions(+), 155 deletions(-) diff --git a/gtk/Accel.cs b/gtk/Accel.cs index 2e7ec8ef7..098782234 100644 --- a/gtk/Accel.cs +++ b/gtk/Accel.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class Accel { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_accel_map_save(IntPtr file_name); [Obsolete("Moved to AccelMap class. Use AccelMap.Save instead")] @@ -35,7 +35,7 @@ namespace Gtk { GLib.Marshaller.Free (native); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_accel_map_add_filter(IntPtr filter_pattern); [Obsolete("Moved to AccelMap class. Use AccelMap.AddFilter instead")] @@ -45,7 +45,7 @@ namespace Gtk { GLib.Marshaller.Free (native); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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")] @@ -54,7 +54,7 @@ namespace Gtk { gtk_accel_map_foreach_unfiltered(data, foreach_func_wrapper.NativeDelegate); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_accel_map_save_fd(int fd); [Obsolete("Moved to AccelMap class. Use AccelMap.SaveFd instead")] @@ -62,7 +62,7 @@ namespace Gtk { gtk_accel_map_save_fd(fd); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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")] @@ -72,7 +72,7 @@ namespace Gtk { GLib.Marshaller.Free (native); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_accel_map_load_fd(int fd); [Obsolete("Moved to AccelMap class. Use AccelMap.LoadFd instead")] @@ -80,7 +80,7 @@ namespace Gtk { gtk_accel_map_load_fd(fd); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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")] @@ -91,7 +91,7 @@ namespace Gtk { return ret; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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")] @@ -102,7 +102,7 @@ namespace Gtk { return ret; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_accel_map_load (IntPtr file_name); [Obsolete("Moved to AccelMap class. Use AccelMap.Load instead")] @@ -112,7 +112,7 @@ namespace Gtk { GLib.Marshaller.Free (native); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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")] @@ -121,7 +121,7 @@ namespace Gtk { gtk_accel_map_foreach(data, foreach_func_wrapper.NativeDelegate); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/Action.cs index 65335e860..c2aaf4456 100644 --- a/gtk/Action.cs +++ b/gtk/Action.cs @@ -28,7 +28,7 @@ namespace Gtk { public Action (string name, string label) : this (name, label, null, null) {} - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_action_get_proxies (IntPtr raw); public Gtk.Widget[] Proxies { diff --git a/gtk/ActionGroup.cs b/gtk/ActionGroup.cs index 09306caf3..702279cc7 100644 --- a/gtk/ActionGroup.cs +++ b/gtk/ActionGroup.cs @@ -80,7 +80,7 @@ namespace Gtk { actions[0].Changed += changed; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_action_group_list_actions (IntPtr raw); public Gtk.Action[] ListActions() { diff --git a/gtk/Adjustment.cs b/gtk/Adjustment.cs index 77171be5b..4912a3711 100644 --- a/gtk/Adjustment.cs +++ b/gtk/Adjustment.cs @@ -23,7 +23,7 @@ namespace Gtk { public partial class Adjustment { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) diff --git a/gtk/Application.cs b/gtk/Application.cs index 1aaebb7ce..ea4bb145c 100755 --- a/gtk/Application.cs +++ b/gtk/Application.cs @@ -56,10 +56,10 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_init (ref int argc, ref IntPtr argv); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_init_check (ref int argc, ref IntPtr argv); static void SetPrgname () @@ -125,7 +125,7 @@ namespace Gtk { return do_init (progname, ref args, true); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_main (); public static void Run () @@ -133,7 +133,7 @@ namespace Gtk { gtk_main (); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_events_pending (); @@ -142,10 +142,10 @@ namespace Gtk { return gtk_events_pending (); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_main_iteration (); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_main_iteration_do (bool blocking); public static void RunIteration () @@ -158,7 +158,7 @@ namespace Gtk { return gtk_main_iteration_do (blocking); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_main_quit (); public static void Quit () @@ -167,7 +167,7 @@ namespace Gtk { } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_get_current_event (); public static Gdk.Event CurrentEvent { diff --git a/gtk/Bin.cs b/gtk/Bin.cs index 61349c324..39c74b748 100644 --- a/gtk/Bin.cs +++ b/gtk/Bin.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class Bin { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_bin_get_child(IntPtr raw); public new Gtk.Widget Child { diff --git a/gtk/Builder.cs b/gtk/Builder.cs index df2e8cbef..de7d8c37d 100644 --- a/gtk/Builder.cs +++ b/gtk/Builder.cs @@ -231,7 +231,7 @@ namespace Gtk { this.handler_type = handler_type; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/Button.cs index dbdfd8fb7..6087437fa 100644 --- a/gtk/Button.cs +++ b/gtk/Button.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class Button { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/CellRenderer.cs index 456bb181e..889f8e459 100644 --- a/gtk/CellRenderer.cs +++ b/gtk/CellRenderer.cs @@ -28,7 +28,7 @@ namespace Gtk { public partial class CellRenderer { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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 ICellEditable StartEditing (Widget widget, Gdk.Event evnt, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, CellRendererState flags) @@ -40,7 +40,7 @@ namespace Gtk { return ret; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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 (Cairo.Context context, Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, CellRendererState flags) diff --git a/gtk/CheckMenuItem.cs b/gtk/CheckMenuItem.cs index 6794aee39..f45973e64 100644 --- a/gtk/CheckMenuItem.cs +++ b/gtk/CheckMenuItem.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class CheckMenuItem { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/Clipboard.cs index 93766d4f6..9d3bfc96a 100644 --- a/gtk/Clipboard.cs +++ b/gtk/Clipboard.cs @@ -25,10 +25,10 @@ namespace Gtk { public partial class Clipboard { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) @@ -73,7 +73,7 @@ namespace Gtk { Text = text; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) @@ -115,7 +115,7 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/ColorSelection.cs index 9e7e323dd..317fac2c9 100644 --- a/gtk/ColorSelection.cs +++ b/gtk/ColorSelection.cs @@ -23,7 +23,7 @@ namespace Gtk { public partial class ColorSelection { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_color_selection_palette_to_string(Gdk.Color[] colors, int n_colors); /// PaletteToString Method @@ -34,7 +34,7 @@ namespace Gtk { return ret; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) { @@ -59,10 +59,10 @@ namespace Gtk { return colors; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_color_selection_set_previous_color(IntPtr raw, ref Gdk.Color color); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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/Container.cs b/gtk/Container.cs index 28ca2514c..5bf74712b 100644 --- a/gtk/Container.cs +++ b/gtk/Container.cs @@ -60,10 +60,10 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_container_get_focus_chain (IntPtr raw, out IntPtr list_ptr); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_container_set_focus_chain (IntPtr raw, IntPtr list_ptr); public Widget[] FocusChain { diff --git a/gtk/Dialog.cs b/gtk/Dialog.cs index b33fdddf3..3f01060c8 100644 --- a/gtk/Dialog.cs +++ b/gtk/Dialog.cs @@ -26,7 +26,7 @@ namespace Gtk { using System.Runtime.InteropServices; public partial class Dialog { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/Drag.cs index 787b62a42..6a389009b 100644 --- a/gtk/Drag.cs +++ b/gtk/Drag.cs @@ -23,7 +23,7 @@ namespace Gtk { public partial class Drag { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/FileChooserDialog.cs index d492d925f..c2657662b 100644 --- a/gtk/FileChooserDialog.cs +++ b/gtk/FileChooserDialog.cs @@ -28,7 +28,7 @@ namespace Gtk { public partial class FileChooserDialog { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) diff --git a/gtk/Global.cs b/gtk/Global.cs index 8b795cd74..b5ae6c364 100644 --- a/gtk/Global.cs +++ b/gtk/Global.cs @@ -20,6 +20,8 @@ namespace Gtk { public partial class Global { + internal const string GtkNativeDll = "libgtk-3-0.dll"; + public static bool ShowUri (string uri) { return ShowUri (null, uri); diff --git a/gtk/HScale.cs b/gtk/HScale.cs index e1cefd08b..aec10b5b4 100644 --- a/gtk/HScale.cs +++ b/gtk/HScale.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class HScale { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/IconFactory.cs index 8cdcbcf5c..327000127 100644 --- a/gtk/IconFactory.cs +++ b/gtk/IconFactory.cs @@ -20,7 +20,7 @@ namespace Gtk { public partial class IconFactory { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/IconSet.cs index 09a6719ce..22ec69d99 100644 --- a/gtk/IconSet.cs +++ b/gtk/IconSet.cs @@ -20,7 +20,7 @@ namespace Gtk { public partial class IconSet { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] unsafe static extern void gtk_icon_set_get_sizes ( IntPtr raw, out int *pointer_to_enum, out int n_sizes); diff --git a/gtk/IconTheme.cs b/gtk/IconTheme.cs index 346e575cd..31a95a6da 100644 --- a/gtk/IconTheme.cs +++ b/gtk/IconTheme.cs @@ -28,7 +28,7 @@ namespace Gtk { public partial class IconTheme { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_icon_theme_list_icons (IntPtr raw, IntPtr context); public string[] ListIcons (string context) @@ -47,16 +47,16 @@ namespace Gtk { return result; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_icon_theme_get_search_path(IntPtr raw, out IntPtr path, out int n_elements); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_icon_theme_set_search_path(IntPtr raw, IntPtr[] path, int n_elements); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_icon_theme_get_search_path_utf8(IntPtr raw, out IntPtr path, out int n_elements); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_icon_theme_set_search_path_utf8(IntPtr raw, IntPtr[] path, int n_elements); bool IsWindowsPlatform { @@ -107,7 +107,7 @@ namespace Gtk { SearchPath = path; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/IconView.cs index f7dde9293..8ab23a092 100644 --- a/gtk/IconView.cs +++ b/gtk/IconView.cs @@ -36,7 +36,7 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/Image.cs index 79f33c78c..df4225625 100644 --- a/gtk/Image.cs +++ b/gtk/Image.cs @@ -27,7 +27,7 @@ namespace Gtk { public partial class Image { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) @@ -45,7 +45,7 @@ namespace Gtk { Raw = gtk_image_new_from_icon_set(icon_set.Handle, (int) size); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/ImageMenuItem.cs index 46eb5c689..6379efe12 100644 --- a/gtk/ImageMenuItem.cs +++ b/gtk/ImageMenuItem.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class ImageMenuItem { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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/Key.cs b/gtk/Key.cs index 90f5e5cba..254c65cc2 100644 --- a/gtk/Key.cs +++ b/gtk/Key.cs @@ -28,7 +28,7 @@ namespace Gtk { static Hashtable wrappers = new Hashtable (); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/ListStore.cs index 8e60f504d..694beb26f 100644 --- a/gtk/ListStore.cs +++ b/gtk/ListStore.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class ListStore : IEnumerable { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) { @@ -42,7 +42,7 @@ namespace Gtk { return ret; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) { @@ -122,7 +122,7 @@ namespace Gtk { return AppendValues ((Array) values); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) @@ -148,7 +148,7 @@ namespace Gtk { return iter; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) diff --git a/gtk/Menu.cs b/gtk/Menu.cs index 8bfa6b085..eb8d226a3 100644 --- a/gtk/Menu.cs +++ b/gtk/Menu.cs @@ -35,7 +35,7 @@ namespace Gtk { Popup (null, null, null, 3, Global.CurrentEventTime); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_menu_set_screen (IntPtr raw, IntPtr screen); public new Gdk.Screen Screen { @@ -47,7 +47,7 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_menu_set_active (IntPtr raw, uint index_); public void SetActive (uint index_) diff --git a/gtk/MenuItem.cs b/gtk/MenuItem.cs index 1151ace0a..618dabb85 100644 --- a/gtk/MenuItem.cs +++ b/gtk/MenuItem.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class MenuItem { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/MessageDialog.cs index b9e8d8547..0480931df 100644 --- a/gtk/MessageDialog.cs +++ b/gtk/MessageDialog.cs @@ -20,10 +20,10 @@ namespace Gtk { public partial class MessageDialog { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/Notebook.cs index 56aafca41..812b340c4 100644 --- a/gtk/Notebook.cs +++ b/gtk/Notebook.cs @@ -32,7 +32,7 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern int gtk_notebook_page_num (IntPtr handle, IntPtr child); public int PageNum (Widget child) diff --git a/gtk/Plug.cs b/gtk/Plug.cs index 97ab156d3..f2c1cba9f 100644 --- a/gtk/Plug.cs +++ b/gtk/Plug.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class Plug { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_plug_new(UIntPtr socket_id); public Plug (ulong socket_id) : base (IntPtr.Zero) @@ -39,7 +39,7 @@ namespace Gtk { Raw = gtk_plug_new (new UIntPtr (socket_id)); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_plug_new_for_display(IntPtr display, UIntPtr socket_id); public Plug (Gdk.Display display, ulong socket_id) : base (IntPtr.Zero) diff --git a/gtk/Printer.cs b/gtk/Printer.cs index 22a59d04d..18eab7b88 100644 --- a/gtk/Printer.cs +++ b/gtk/Printer.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class Printer { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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/RadioAction.cs b/gtk/RadioAction.cs index 7bc4826b2..a033f7b87 100644 --- a/gtk/RadioAction.cs +++ b/gtk/RadioAction.cs @@ -25,10 +25,10 @@ namespace Gtk public partial class RadioAction { - [DllImport("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport(Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_radio_action_get_group(IntPtr raw); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_radio_action_set_group(IntPtr raw, IntPtr list); [GLib.Property ("group")] diff --git a/gtk/RadioButton.cs b/gtk/RadioButton.cs index 38c0e6553..6fb7a8836 100644 --- a/gtk/RadioButton.cs +++ b/gtk/RadioButton.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class RadioButton { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_radio_button_new_with_mnemonic (IntPtr group, IntPtr label); // creates a new group for this RadioButton @@ -36,10 +36,10 @@ namespace Gtk { GLib.Marshaller.Free (native); } - [DllImport("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport(Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_radio_button_get_group(IntPtr raw); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_radio_button_set_group(IntPtr raw, IntPtr list); [GLib.Property ("group")] diff --git a/gtk/RadioMenuItem.cs b/gtk/RadioMenuItem.cs index 094a44a21..eddb569b6 100644 --- a/gtk/RadioMenuItem.cs +++ b/gtk/RadioMenuItem.cs @@ -43,7 +43,7 @@ namespace Gtk { GLib.Marshaller.Free (label_as_native); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_radio_menu_item_new_with_mnemonic(IntPtr group, IntPtr label); public RadioMenuItem (RadioMenuItem[] group, string label) : base (IntPtr.Zero) @@ -71,10 +71,10 @@ namespace Gtk { GLib.Marshaller.Free (native_label); } - [DllImport("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport(Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_radio_menu_item_get_group(IntPtr raw); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_radio_menu_item_set_group(IntPtr raw, IntPtr list); [GLib.Property ("group")] diff --git a/gtk/RadioToolButton.cs b/gtk/RadioToolButton.cs index d70b04ae5..7fc1bc4ef 100644 --- a/gtk/RadioToolButton.cs +++ b/gtk/RadioToolButton.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class RadioToolButton { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_radio_tool_button_new (IntPtr group); public RadioToolButton (RadioToolButton[] group) : base (IntPtr.Zero) @@ -46,7 +46,7 @@ namespace Gtk { Raw = gtk_radio_tool_button_new(native_group); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_radio_tool_button_new_from_stock (IntPtr group, IntPtr stock_id); public RadioToolButton (RadioToolButton[] group, string stock_id) : base (IntPtr.Zero) @@ -72,10 +72,10 @@ namespace Gtk { GLib.Marshaller.Free (stock_id_as_native); } - [DllImport("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport(Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_radio_tool_button_get_group(IntPtr raw); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_radio_tool_button_set_group(IntPtr raw, IntPtr list); [GLib.Property ("group")] diff --git a/gtk/SelectionData.cs b/gtk/SelectionData.cs index 49e8cd4a5..dd5d46c6a 100644 --- a/gtk/SelectionData.cs +++ b/gtk/SelectionData.cs @@ -25,10 +25,10 @@ namespace Gtk { public partial class SelectionData { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr gtk_selection_data_get_text (IntPtr selection_data); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] private static extern void gtk_selection_data_set_text (IntPtr selection_data, IntPtr str, int len); public string Text { @@ -45,7 +45,7 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] private static extern IntPtr gtk_selection_data_get_data (IntPtr selection_data); public byte[] Data { @@ -61,7 +61,7 @@ namespace Gtk { Set(type, format, data, data.Length); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/SpinButton.cs index 280145c66..b6d215089 100644 --- a/gtk/SpinButton.cs +++ b/gtk/SpinButton.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class SpinButton { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/StatusIcon.cs index 5422b1773..86c11b771 100644 --- a/gtk/StatusIcon.cs +++ b/gtk/StatusIcon.cs @@ -38,7 +38,7 @@ namespace Gtk { static MenuPositionFuncNative StatusIconPositionMenuFunc = null; - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) @@ -84,7 +84,7 @@ namespace Gtk { } } - [DllImport("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport(Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_status_icon_get_geometry(IntPtr raw, out IntPtr screen, IntPtr area, out int orientation); public bool GetGeometry(out Gdk.Screen screen, out Gdk.Rectangle area, out Gtk.Orientation orientation) diff --git a/gtk/Stock.cs b/gtk/Stock.cs index a5b7f3495..2dc4c0b52 100644 --- a/gtk/Stock.cs +++ b/gtk/Stock.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class Stock { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_stock_list_ids (); public static string[] ListIds () @@ -49,7 +49,7 @@ namespace Gtk { public IntPtr TranslationDomain; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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 096a380dc..34e4b1a4a 100644 --- a/gtk/StockManager.cs +++ b/gtk/StockManager.cs @@ -26,7 +26,7 @@ namespace Gtk { public class StockManager { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_stock_add(ref Gtk.StockItem item, uint n_items); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/Target.cs index 90e516440..bf35d6db2 100644 --- a/gtk/Target.cs +++ b/gtk/Target.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class Target { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/TargetList.cs index 511a2b3a5..e906f8bab 100644 --- a/gtk/TargetList.cs +++ b/gtk/TargetList.cs @@ -23,7 +23,7 @@ namespace Gtk { public partial class TargetList { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/TextBuffer.cs index df8b567c7..531fcaca7 100644 --- a/gtk/TextBuffer.cs +++ b/gtk/TextBuffer.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class TextBuffer { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_text_buffer_set_text (IntPtr raw, IntPtr text, int len); public void Clear () @@ -46,7 +46,7 @@ namespace Gtk { gtk_text_buffer_paste_clipboard(Handle, clipboard.Handle, IntPtr.Zero, true); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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")] @@ -109,7 +109,7 @@ namespace Gtk { Text = text; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) @@ -120,7 +120,7 @@ namespace Gtk { return result; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) @@ -131,7 +131,7 @@ namespace Gtk { return result; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_text_buffer_insert_at_cursor(IntPtr raw, IntPtr text, int len); public void InsertAtCursor(string text) @@ -141,7 +141,7 @@ namespace Gtk { GLib.Marshaller.Free (native); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) @@ -156,10 +156,10 @@ namespace Gtk { return ret; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_buffer_get_serialize_formats(IntPtr raw, out int n_formats); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/TextChildAnchor.cs index 419333d97..1de538dc0 100644 --- a/gtk/TextChildAnchor.cs +++ b/gtk/TextChildAnchor.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class TextChildAnchor { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_child_anchor_get_widgets (IntPtr raw); public Widget[] Widgets { diff --git a/gtk/TextIter.cs b/gtk/TextIter.cs index 346543db7..a27b09edd 100755 --- a/gtk/TextIter.cs +++ b/gtk/TextIter.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial struct TextIter { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern uint gtk_text_iter_get_char(ref Gtk.TextIter raw); public string Char { @@ -34,7 +34,7 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_iter_get_marks (ref TextIter iter); public TextMark[] Marks { @@ -50,7 +50,7 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_iter_get_tags (ref TextIter iter); public TextTag[] Tags { @@ -66,7 +66,7 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/TextView.cs index 736dde309..0172716ba 100644 --- a/gtk/TextView.cs +++ b/gtk/TextView.cs @@ -26,7 +26,7 @@ namespace Gtk { public partial class TextView { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_text_view_new_with_buffer (IntPtr buffer); public TextView (TextBuffer buffer) : base (IntPtr.Zero) diff --git a/gtk/TreeModelAdapter.cs b/gtk/TreeModelAdapter.cs index 2a461425c..3a17f344e 100644 --- a/gtk/TreeModelAdapter.cs +++ b/gtk/TreeModelAdapter.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class TreeModelAdapter { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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); @@ -39,7 +39,7 @@ namespace Gtk { return ret; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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); diff --git a/gtk/TreeModelFilter.cs b/gtk/TreeModelFilter.cs index 22f621444..438141308 100644 --- a/gtk/TreeModelFilter.cs +++ b/gtk/TreeModelFilter.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class TreeModelFilter { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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); @@ -39,7 +39,7 @@ namespace Gtk { return ret; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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); @@ -83,7 +83,7 @@ namespace Gtk { return ret; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) @@ -96,7 +96,7 @@ namespace Gtk { gtk_tree_model_filter_set_modify_func (Handle, n_columns, native_types, func_wrapper.NativeDelegate, (IntPtr) gch, GLib.DestroyHelper.NotifyHandler); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) diff --git a/gtk/TreeModelSort.cs b/gtk/TreeModelSort.cs index 19eb4066e..1bfe76d7e 100644 --- a/gtk/TreeModelSort.cs +++ b/gtk/TreeModelSort.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class TreeModelSort { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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); @@ -39,7 +39,7 @@ namespace Gtk { return ret; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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); diff --git a/gtk/TreePath.cs b/gtk/TreePath.cs index 28a98eb65..42fe9d47f 100644 --- a/gtk/TreePath.cs +++ b/gtk/TreePath.cs @@ -21,7 +21,7 @@ namespace Gtk { public partial class TreePath { // Patch submitted by malte on bug #49518 - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_tree_path_get_indices(IntPtr raw); public int [] Indices { diff --git a/gtk/TreeSelection.cs b/gtk/TreeSelection.cs index 2910dae35..d03b55883 100644 --- a/gtk/TreeSelection.cs +++ b/gtk/TreeSelection.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class TreeSelection { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_tree_selection_get_selected_rows (IntPtr raw, IntPtr model); public TreePath[] GetSelectedRows () @@ -38,7 +38,7 @@ namespace Gtk { return (TreePath[]) GLib.Marshaller.ListToArray (list, typeof (Gtk.TreePath)); } - [DllImport ("libgtk-win32-3.0-0.dll", EntryPoint="gtk_tree_selection_get_selected", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/TreeStore.cs index d2b52c40f..2ecc91e90 100644 --- a/gtk/TreeStore.cs +++ b/gtk/TreeStore.cs @@ -27,10 +27,10 @@ namespace Gtk { public partial class TreeStore { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_append (IntPtr raw, out TreeIter iter, ref TreeIter parent); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_append (IntPtr raw, out TreeIter iter, IntPtr parent); public TreeIter AppendNode () @@ -47,10 +47,10 @@ namespace Gtk { return iter; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert (IntPtr raw, out TreeIter iter, ref TreeIter parent, int position); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert (IntPtr raw, out TreeIter iter, IntPtr parent, int position); public TreeIter InsertNode (TreeIter parent, int position) @@ -67,10 +67,10 @@ namespace Gtk { return iter; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_prepend (IntPtr raw, out TreeIter iter, ref TreeIter parent); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_prepend (IntPtr raw, out TreeIter iter, IntPtr parent); public TreeIter PrependNode (TreeIter parent) @@ -87,10 +87,10 @@ namespace Gtk { return iter; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert_before (IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling); public TreeIter InsertNodeBefore (TreeIter sibling) @@ -107,10 +107,10 @@ namespace Gtk { return iter; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_tree_store_insert_after (IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling); public TreeIter InsertNodeAfter (TreeIter sibling) @@ -127,7 +127,7 @@ namespace Gtk { return iter; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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); @@ -141,7 +141,7 @@ namespace Gtk { return ret; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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); @@ -227,10 +227,10 @@ namespace Gtk { return AppendValues ((Array) values); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) @@ -269,7 +269,7 @@ namespace Gtk { return iter; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) diff --git a/gtk/TreeView.cs b/gtk/TreeView.cs index 11aa49ae5..b5754d268 100644 --- a/gtk/TreeView.cs +++ b/gtk/TreeView.cs @@ -46,7 +46,7 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern bool gtk_tree_view_get_path_at_pos (IntPtr raw, int x, int y, @@ -55,7 +55,7 @@ namespace Gtk { out int cell_x, out int cell_y); - [DllImport ("libgtk-win32-3.0-0.dll", EntryPoint="gtk_tree_view_get_path_at_pos", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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/UIManager.cs b/gtk/UIManager.cs index 25489c04a..2e7c68664 100644 --- a/gtk/UIManager.cs +++ b/gtk/UIManager.cs @@ -37,7 +37,7 @@ namespace Gtk { return AddUiFromString (new System.IO.StreamReader (s).ReadToEnd ()); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern uint gtk_ui_manager_new_merge_id (IntPtr raw); public uint NewMergeId () @@ -45,7 +45,7 @@ namespace Gtk { return gtk_ui_manager_new_merge_id (Handle); } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_ui_manager_get_toplevels (IntPtr raw, int types); public Widget[] GetToplevels (Gtk.UIManagerItemType types) { @@ -58,7 +58,7 @@ namespace Gtk { return result; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_ui_manager_get_action_groups (IntPtr raw); public ActionGroup[] ActionGroups { diff --git a/gtk/VScale.cs b/gtk/VScale.cs index ddff11347..70620ccb2 100644 --- a/gtk/VScale.cs +++ b/gtk/VScale.cs @@ -25,7 +25,7 @@ namespace Gtk { public partial class VScale { - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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.cs b/gtk/Widget.cs index 84c840978..540072aee 100644 --- a/gtk/Widget.cs +++ b/gtk/Widget.cs @@ -165,10 +165,10 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_binding_set_by_class (IntPtr class_ptr); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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)] @@ -237,10 +237,10 @@ namespace Gtk { return ret; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_widget_class_find_style_property (IntPtr class_ptr, IntPtr property_name); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, 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) @@ -259,7 +259,7 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_widget_list_mnemonic_labels (IntPtr raw); public Widget[] ListMnemonicLabels () @@ -397,7 +397,7 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] private static extern void gtk_widget_destroy (IntPtr raw); public virtual void Destroy () diff --git a/gtk/Window.cs b/gtk/Window.cs index 61b5c9627..7e0831b19 100755 --- a/gtk/Window.cs +++ b/gtk/Window.cs @@ -31,10 +31,10 @@ namespace Gtk { this.Title = title; } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_window_get_default_icon_list(); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_window_set_default_icon_list(IntPtr list); public static Gdk.Pixbuf[] DefaultIconList { @@ -56,10 +56,10 @@ namespace Gtk { } } - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gtk_window_get_icon_list(IntPtr raw); - [DllImport ("libgtk-win32-3.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] static extern void gtk_window_set_icon_list(IntPtr raw, IntPtr list); public Gdk.Pixbuf[] IconList { diff --git a/gtk/gtk-api.raw b/gtk/gtk-api.raw index 72587bc9e..2a84e3eda 100644 --- a/gtk/gtk-api.raw +++ b/gtk/gtk-api.raw @@ -6,7 +6,7 @@ Please DO NOT MODIFY THIS FILE, modify .metadata files instead. --> - + diff --git a/gtk/gtk-sharp.dll.config.in b/gtk/gtk-sharp.dll.config.in index 6c0723158..88ad417c3 100644 --- a/gtk/gtk-sharp.dll.config.in +++ b/gtk/gtk-sharp.dll.config.in @@ -2,5 +2,5 @@ - + diff --git a/sources/sources.xml b/sources/sources.xml index f22a014c0..9cae2a09b 100644 --- a/sources/sources.xml +++ b/sources/sources.xml @@ -113,7 +113,7 @@ - +