From: Jarl Gullberg Date: Sat, 20 May 2017 23:45:12 +0000 (+0200) Subject: Added preproccessor switching for Win32 GTK3. X-Git-Tag: v3.0.0~96^2~47 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80f8cdc63ff36e84dea5d6c61fb4509d0b1c6535;p=platform%2Fcore%2Fcsapi%2Fopentk.git Added preproccessor switching for Win32 GTK3. --- diff --git a/src/OpenTK.GLWidget/GLWidget.cs b/src/OpenTK.GLWidget/GLWidget.cs index 90b11d4..41c2b42 100644 --- a/src/OpenTK.GLWidget/GLWidget.cs +++ b/src/OpenTK.GLWidget/GLWidget.cs @@ -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