diff options
author | Lluis Sanchez <slluis.devel@gmail.com> | 2013-11-12 18:35:09 +0400 |
---|---|---|
committer | Lluis Sanchez <slluis.devel@gmail.com> | 2013-11-12 18:35:09 +0400 |
commit | 459bb278e5ea484d6c7904ba176ef632e4d95436 (patch) | |
tree | a6e76a1d57a47c06f1cf6c2adc556565227b898d /main/src/tools | |
parent | c1bb9c711c1d4beeea98bace3c8cce9438bf0917 (diff) | |
parent | ff079bacf7789afa724cebc98ae42a74c1821cbe (diff) |
Merge pull request #429 from mono/streamlineDllImport
[Cleanup] Try and streamline most DllImports by using shared lib names.
Diffstat (limited to 'main/src/tools')
-rw-r--r-- | main/src/tools/mdmonitor/MacIntegration/MacIntegration.cs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/main/src/tools/mdmonitor/MacIntegration/MacIntegration.cs b/main/src/tools/mdmonitor/MacIntegration/MacIntegration.cs index 5ee1f6ef5a..b7b0df91fe 100644 --- a/main/src/tools/mdmonitor/MacIntegration/MacIntegration.cs +++ b/main/src/tools/mdmonitor/MacIntegration/MacIntegration.cs @@ -31,9 +31,11 @@ using System.IO; namespace MacIntegration { - public class IgeMacMenu + public static class IgeMacMenu { - [DllImport("libigemacintegration.dylib")] + internal const string maclib = "libigemacintegration.dylib"; + + [DllImport(maclib)] static extern void ige_mac_menu_connect_window_key_handler (IntPtr window); public static void ConnectWindowKeyHandler (Gtk.Window window) @@ -41,7 +43,7 @@ namespace MacIntegration ige_mac_menu_connect_window_key_handler (window.Handle); } - [DllImport("libigemacintegration.dylib")] + [DllImport(maclib)] static extern void ige_mac_menu_set_global_key_handler_enabled (bool enabled); public static bool GlobalKeyHandlerEnabled { @@ -50,7 +52,7 @@ namespace MacIntegration } } - [DllImport("libigemacintegration.dylib")] + [DllImport(maclib)] static extern void ige_mac_menu_set_menu_bar (IntPtr menu_shell); public static Gtk.MenuShell MenuBar { @@ -59,7 +61,7 @@ namespace MacIntegration } } - [DllImport("libigemacintegration.dylib")] + [DllImport(maclib)] static extern void ige_mac_menu_set_quit_menu_item (IntPtr quit_item); public static Gtk.MenuItem QuitMenuItem { @@ -68,7 +70,7 @@ namespace MacIntegration } } - [DllImport("libigemacintegration.dylib")] + [DllImport(maclib)] static extern IntPtr ige_mac_menu_add_app_menu_group (); public static IgeMacMenuGroup AddAppMenuGroup () @@ -81,7 +83,7 @@ namespace MacIntegration public class IgeMacMenuGroup : GLib.Opaque { - [DllImport("libigemacintegration.dylib")] + [DllImport(IgeMacMenu.maclib)] static extern void ige_mac_menu_add_app_menu_item (IntPtr raw, IntPtr menu_item, IntPtr label); public void AddMenuItem (Gtk.MenuItem menu_item, string label) |