Added preprocessor switching for Mac GTK3.

This commit is contained in:
Jarl Gullberg 2017-05-21 01:48:00 +02:00
parent 80f8cdc63f
commit a85dd49178
No known key found for this signature in database
GPG key ID: FBB69BD7CAE095A0

View file

@ -357,10 +357,16 @@ namespace OpenTK
return Utilities.CreateMacOSWindowInfo(windowHandle, viewHandle); return Utilities.CreateMacOSWindowInfo(windowHandle, viewHandle);
} }
[SuppressUnmanagedCodeSecurity, DllImport("libgdk-quartz-2.0.0.dylib")] #if GTK3
const string MacLibGdkName = "libgtk-3.dylib";
#else
const string MacLibGdkName = "libgdk-quartz-2.0.0.dylib";
#endif
[SuppressUnmanagedCodeSecurity, DllImport(MacLibGdkName)]
static extern IntPtr gdk_quartz_window_get_nswindow(IntPtr handle); static extern IntPtr gdk_quartz_window_get_nswindow(IntPtr handle);
[SuppressUnmanagedCodeSecurity, DllImport("libgdk-quartz-2.0.0.dylib")] [SuppressUnmanagedCodeSecurity, DllImport(MacLibGdkName)]
static extern IntPtr gdk_quartz_window_get_nsview(IntPtr handle); static extern IntPtr gdk_quartz_window_get_nsview(IntPtr handle);
#endregion #endregion