GTK xwindows id

Hello,
I would like to grab the x windows id to a GTK Drawing Area object. I
have
seen that is possible to do that easily in python, but I am not be able
to
retrieve this info on ruby.
In Python I can grab like this : myDrawingAreaObject.window.xid
Can somone has an idea please?
Thanks for help,
Erwan Masson

Hi,

On Thu, 21 Jun 2007 10:45:13 +0200
“Erwan Masson” [email protected] wrote:

Hello,
I would like to grab the x windows id to a GTK Drawing Area object. I have
seen that is possible to do that easily in python, but I am not be able to
retrieve this info on ruby.
In Python I can grab like this : myDrawingAreaObject.window.xid
Can somone has an idea please?

If you compile Ruby-GNOME2 on X11(not Windows), there is a
Gdk::Drawable#xid.

Here is a sample:

require ‘gtk2’
win = Gtk::Window.new
draw = Gtk::DrawingArea.new
win.add draw
win.show_all # or realize draw.
p draw.window.xid


This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/