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

Boris Batkin bbatkin at gmail.com
Thu Sep 29 23:20:39 EDT 2011


My experience with GTK and OSX is very limited.
So it'll be an interesting learning curve.

I have done some digging though so at least I can save you some quality google time :)

Let's start at the end. OpenTK samples don't work for me on OSX.
They start, window updates, but no controls work, and menu is not responding.
The reason being message loop is not organized correctly.
There is a related post on the subject
http://www.opentk.com/node/2683
So once you get access to Mac it would be interesting to know, if samples work for you.
This situation gives me an impression that there is not much user base for OpenTK on OSX.
And I'm not sure if it is because of broken GLWidget, or the widget is broken because none cares.

Now, more to the point of X11 and OSX. I think it's currently using Quartz.
The reason I think so is I found several related bugs\issues on other projects.
Examples are
http://mono.1490590.n4.nabble.com/RFC-Add-API-to-get-Drawable-xid-for-user-with-GStreamer-td1546519.html
http://code.haskell.org/gtk2hs/INSTALL
there was one more link, which I can no longer find - stating that GTK# is now built against Quartz on OSX.

I think asking Gtk-OSX and GTK-Quartz people is probably good idea.
Please, keep me posted. The least I can do is to help you test stuff.

Thanks


On Sep 29, 2011, at 4:44 PM, Markus Henschel wrote:

> 2011/9/22 look4awhile <bbatkin at gmail.com>:
>> 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?
>> 
>> 
>> 
>> --
> 
> Hi there. I'm also interested in this as I recently did some changes
> to GLwidget but could not test under OSX because I don't have a Mac.
> Just want to let you know that GLWidget has serious issues epsecially
> under X11 or when using a docking library that reparents it's windows.
> The OSX related code in GLWidget looked suspicious to me as I read
> that GTK runs natively now on OSX but I saw a lot of X11 calls being
> made.
> 
> GLWidget doesn't seem to be very actively maintained. I shared my
> changes with the author on his request but I saw no updates to the
> sourceforge site lately. I got email from others though who read my
> bug reports so there seems to be at least some interest in the
> project. So may be you/me/we should fork this project to create
> something that works or request permisson from the author to get
> access to the sourceforge repository. I'll get access to a Mac in the
> next couple of days. If I figure out how to get the OSX part working
> I'll let you know. It would be very kind of you if you could do the
> same.
> 
> Any info on how GTK works on OSX would be helpful. But maybe this
> question would be better suited for the GTK mailing list or may be
> there is even a mailing list for the OSC port of GTK.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20110929/c13e3dd8/attachment.html 


More information about the Gtk-sharp-list mailing list