From: cedlemo <ce...@gm...> - 2017-02-21 21:38:48
|
Hi John, It seems that it is not yet supported in the Gdk gem. Maybe we will just have to create a GObjectIntrospection loader for GdkX11. grep get_xid /usr/share/gir-1.0/* /usr/share/gir-1.0/GdkX11-2.0.gir: <function name="x11_drawable_get_xid" /usr/share/gir-1.0/GdkX11-2.0.gir: c:identifier="gdk_x11_drawable_get_xid"> /usr/share/gir-1.0/GdkX11-3.0.gir: <method name="get_xid" c:identifier="gdk_x11_window_get_xid"> /usr/share/gir-1.0/Wnck-3.0.gir: <method name="get_xid" c:identifier="wnck_application_get_xid"> /usr/share/gir-1.0/Wnck-3.0.gir: <method name="get_xid" c:identifier="wnck_window_get_xid"> Could you open an issue in github : https://github.com/ruby-gnome2/ruby-gnome2/issues ? Cedlemo On 21/02/2017 21:53, John Lane wrote: > I'm porting some code from Python to Ruby and need to get the xid of a > window. I have the following original line of code (in Python): > > self.get_toplevel().get_window().get_xid() > > which I have coded in Ruby as > > toplevel.window.xid > > However I get > > undefined method `xid' for #<#<Class:0x000000038e40b0>:0x3975b00 > ptr=0x28a64d0> (NoMethodError) > > The class is a subclass of Gtk::Window. > > I've seen other posts that indicate this should work. I can see xid > defined in rbgdkx11x11window.c but surrounded by #ifdef > GDK_WINDOWING_X11. I don't know if this is an issue with how the code > was built ? > > I installed using `gem install gtk3`, have gdk3 (3.1.1). This is on an > Arch Linux box with Ruby ruby 2.3.3p222 (2016-11-21 revision 56859) > > Thanks for any help. > > John > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > ruby-gnome2-devel-en mailing list > rub...@li... > https://lists.sourceforge.net/lists/listinfo/ruby-gnome2-devel-en |