Re: Getting an X11 Window associated with a Gtk widget
- From: Brett Granger <bdgranger alum mit edu>
- To: pfb users sourceforge net
- Cc: gtk-list gnome org
- Subject: Re: Getting an X11 Window associated with a Gtk widget
- Date: Wed, 22 Jan 2003 10:19:47 -0500
John Cupitt ng-london org uk 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);
--Brett
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]