Re: [PATCH] make Gtk2::Gdk->get_default_root_window() usable



Thierry Vignaud said:
but since you added a class parameter whereas we have no object
Gtk2::Gdk, we have :
- either to add a stupid dummy arg such as in
  Gtk2::Gdk->get_default_root_window('');
- or to remove that stupid class parameter that does not exists so
  that wa can call:
  Gtk2::Gdk->get_default_root_window();

i guess i don't understand what you're saying.  let me back up:

i just wrote a test program:

  #!/usr/bin/perl -w

  use strict;
  use Gtk2 -init;
  use Data::Dumper;

  my $root = Gtk2::Gdk->get_default_root_window;
  print Dumper($root);

and it showed me

  $VAR1 = bless( {}, 'Gtk2::Gdk::Window' );

then i changed the line to

  my $root = Gtk2::Gdk->get_default_root_window ('');

and it died with

  Usage: Gtk2::Gdk::get_default_root_window(class) at test.pl line 7.


the class parameter in the usage statement is the one on the left side of the
arrow when called as a method.  whatever's on the left side of the arrow gets
passed as the first parameter, and in this instance, the actual XS function
ignores its only parameter, which is required only to allow the method syntax.
 if i remove the argument from the XS declaration, the method syntax ceases to
work.

do you not see this behavior?  are you sure that the XS declaration in
GdkWindow.xs is the only one you have?  (you earlier sent a patch which
included that function in Gdk.xs)


-- 
muppet <scott at asofyet dot org>





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