[Gtk-sharp-list] How to get X11 window (for OpenGL rendering)?

J. Perkins jason@sim8.com
Fri, 16 Apr 2004 18:22:23 -0400


Bruno Fernandez-Ruiz wrote:
> I think what you need is to use the macro:
> GDK_DRAWABLE_XID(GdkDrawable)
> (snip)
> You can take a look in the CVS of GtkGL# (module "gtkgl-sharp", password
> "anonymous").
> :ext:anonymous@forgecvs1.novell.com:/cvsroot/simetron

Thanks for the info, this got me to an acceptable solution. P/Invoke 
wasn't an option, so I hunted around the GDK headers and came up with this:

   [DllImport("gdk-x11-2.0")]
   static extern int gdk_x11_drawable_get_xid(IntPtr drawable);

...which does the job nicely. Thanks for the help!

Jason