Re: [gtk-list] Getting the WindowID of a GtkWidget



On Sun, May 03, 1998 at 02:11:15PM -0300, Claudemir Todo Bom wrote:
> I'm beggining with Gtk+ (and with C too), and I'm trying to interface a
> Gtk+ application with xanim, to make a video appear inside an
> application, to do this, I need the window id of a widget, so I can pass
> it as a parameter to xanim.

I've used the following method to retrieve the X window id before.
But be aware that this is considered a no-no and may break in future
versions of GTK+.  (Because I am using GdkWindowPrivate).

#include <gtk/gtk.h>
#include <gdk/gdkprivate.h>

void DoSomething(GtkWindow *window) {
  GdkWindowPrivate *private;
  private = (GdkWindowPrivate *)window->window;

  DoSomethingWithXWindowHandle(private->xwindow);
}

-- 
Matt Kimball
mkimball@xmission.com



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