Re: X11 widget of a gtk window
- From: John Cupitt ng-london org uk
- To: Thomas_Krebs gmx de
- Cc: gtk-list gnome org
- Subject: Re: X11 widget of a gtk window
- Date: Wed, 4 Jun 2003 23:59:27 +0100
Sorry, not sure. Have you checked that the display and window look sensible?
For example, until a gtk widget is realized, it has no window (you'll get
zero back from GDK_WINDOW_XWINDOW).
>>> I'm using gtk and I need to get the X11 Widget of a window created with
>>> gtk. I can get the GtkWidget by using:
>>> GtkWidget* gtk_widget = GTK_WIDGET(window);
>>>
>>> But I need the X11 Widget (the WidgetRec struture) of that window. Is
>>> there a way to access that? Does it exist at all in gtk?
>>
>>
>>
>> There's no Xt under gtk, so there's no widget to get. You can get the
>> X11 window if that's any help; something like (untested):
>>
>> #include <gdk/gdkx.h>
>>
>> Window xid = GDK_WINDOW_XWINDOW( GTK_WIDGET( foo )->window );
>
>
> Ok, I'm using that and GDK_WINDOW_XDISPLAY for use in a lib that is
> expecting either a X11 Widget or a X11 Display and a X11 Window,
> but apparently the Display and Window info I get is not usable:
> I get:
> Error: Couldn't find per display information
> If I create a X11 Widget within the application, take its Window und use
> its Display and Window everything works fine.
==========================================================
Coming Soon:
A PRIVATE PASSION
Harvard's Winthrop Collection
25 June - 14 September 2003
For information and tickets:
http://www.nationalgallery.org.uk/exhibitions/winthrop
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]