On Wed, 22 Jan 2003, Peter F Bradshaw wrote:

> Hi Brett;
>
> On Wed, 22 Jan 2003, Brett Granger wrote:
>
> >
> >
> > [EMAIL PROTECTED] wrote:
> > > Peter F Bradshaw wrote:
> > >
> > >>I'm new to Gtk. I'm looking for a way to get the underlying X11 Window
> > >>value from a Gtk widget. The Gtk library version is 1,2.
> > >
> > >
> > > Hi, something like (untested):
> > >
> > > #include <gdk/gdkprivate.h>
> > >
> > > Window
> > > get_xwin( GtkWidget *widget )
> > > {
> > >   GdkWindow *gwin = widget->window;
> > >   GdkWindowPrivate *pgwin = (GdkWindowPrivate *) gwin;
> > >
> > >   return( pgwin->xwindow );
> > > }
> >
> > There is already a macro defined that will do this for you:
> >
> > #include <gdk/gdkx.h>
> >
> > win = GDK_WINDOW_XWINDOW(widget->window);
>
> Tried that. Unfortunately it returns 0 after the widget has sent a
> realize signal (at which time I assume the xid would be valid).

Cancel that. It works one I fixed the obvious finger problem :-)
Thanks.

>
> >
> >
> > --Brett
> >
>
> Cheers
>
>

Cheers

-- 
Peter F Bradshaw, [EMAIL PROTECTED], ICQ 75431157 (exadios).
PGP public key at http://dingoblue.net.au/public_key.html
"Needs more salt" - Archimedes


_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to