Added preproccessor switching for Win32 GTK3.

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

View file

@ -331,13 +331,21 @@ namespace OpenTK
IWindowInfo InitializeWindows()
{
#if GTK3
IntPtr windowHandle = gdk_win32_window_get_handle(this.Window.Handle);
#else
IntPtr windowHandle = gdk_win32_drawable_get_handle(GdkWindow.Handle);
#endif
return Utilities.CreateWindowsWindowInfo(windowHandle);
}
#if GTK3
[SuppressUnmanagedCodeSecurity, DllImport("libgdk-3-0.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr gdk_win32_window_get_handle(IntPtr w);
#else
[SuppressUnmanagedCodeSecurity, DllImport("libgdk-win32-2.0-0.dll")]
public static extern IntPtr gdk_win32_drawable_get_handle(IntPtr d);
#endif
#endregion
#region OSX Specific Initialization