Re: Q: Embedding a window inside a GTK Widget
- From: Owen Taylor <otaylor gtk org>
- To: Lynx <lynx HK Super NET>
- Cc: gtk-list redhat com
- Subject: Re: Q: Embedding a window inside a GTK Widget
- Date: 28 Apr 1998 17:45:34 -0400
Lynx <lynx@HK.Super.NET> writes:
> Hi,
> I am looking for examples in embedding a window created by
> Xlib function(say XCreateSimpleWindow()) inside a GTK widget. Is it
> possible? Any pointers would be appreciated!
It is possible. You can get the XWindow corresponding to a
GDK window with GDK_WINDOW_XWINDOW in gdkx.h:
So, something like:
darea = gtk_drawing_area_new ();
gtk_drawing_area_size (darea, 200, 200);
gtk_widget_realize (darea);
XCreateSimpleWindow (GDK_WINDOW_XDISPLAY (darea->window),
GDK_WINDOW_XWINDOW (darea->window),
0, 0, 200, 200, 0, 0);
You might also be able to just use GDK_WINDOW_XWINDOW (darea->window),
depending on what you want it for.
[ The Plug/Socket widgets allow embedding X windows from other
applications into GTK widgets, also ]
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]