Re: Possible to get GtkWindow from a GdkWindow




Jan-Marek Glogowski wrote:

Hi

I have access to a GdkWindow, and was wondering if it could be possible
to get tot he GtkWindow?

GdkWindow isn't really related to a "Window" (like GtkWindow). GDK knows
nothing about GTK. GdkWindow is something like an extended GdkDrawable.
Many GtkWidgets have their own "GdkWindow", where they draw to - see the
Docs -> GtkWidget struct.

As far as I know it's one way: GTK -> GDK -> X

The registered callbacks and Xatom/message/whatever filters just post
general messages, which the upper levels "interpret".

According to the docs:

http://developer.gnome.org/doc/API/2.0/gdk/gdk-Windows.html#gdk-window-get-user-data

the GtkWidget may be set as user data on the GdkWindow.

John





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]