[Gtk-sharp-list] Native GtkWindow handle on MAX OS X (Lion)

Michael Hutchinson m.j.hutchinson at gmail.com
Mon Oct 24 08:39:41 EDT 2011


On 22 September 2011 03:38, look4awhile <bbatkin at gmail.com> wrote:
> I'm trying to make GLWidget work with the latest everything.
>
> Internally it creates custom graphics context
> (http://www.opentk.com/book/export/html/1057) which requires native window
> handle.
>
> It used to run like this
>
> IntPtr windowHandle = gdk_x11_drawable_get_xid(GdkWindow.Handle);
> bool ownHandle = true;
> bool isControl = true;
> windowInfo =
> OpenTK.Platform.Utilities.CreateMacOSCarbonWindowInfo(windowHandle,
> ownHandle, isControl);
>
> but now there is no gdk_x11_drawable_get_xid. Even the library
> (libgdk-x11-2.0.so.0) is missing. I got the impression Gtk# is now built
> against Quartz, and not X11. But I'm pretty new to both of those systems,
> and could be completely wrong.
>
> Now, my question is, how do I get native window handle under Quartz?

gdk_quartz_window_get_nswindow

E.g.
https://github.com/mono/monodevelop/blob/master/main/src/addins/MacPlatform/MacInterop/GtkQuartz.cs#L63

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Gtk-sharp-list mailing list