A couple of things:
When I run this script:
#!/usr/bin/perl
use Gtk2;
use Data::Dumper;
use strict;
Gtk2->init;
my $window = Gtk2::Window->new('toplevel');
$window->signal_connect('delete_event', sub { exit });
my $button = Gtk2::Button->new('Click here');
$button->signal_connect('clicked', sub {
my $screen = $window->get_screen;
print $screen->get_width()."\n";
});
$window->add($button);
$window->show_all;
Gtk2->main;
exit;
I get this error message:
GType 'GdkScreenX11' is not registered with GPerl; representing this
object as first known parent type 'GdkScreen' instead at
gdkscreentest.pl line 13.
Can't locate object method "get_width" via package "Gtk2::Gdk::Screen"
at gdkscreentest.pl line 14.
Secondly, the GTK docs suggest that I can call size_request() on a
realized widget to get the on-screen dimensions, but I get a "can't
locate object method" error.
Are these parts of the API that haven't been implemented yet? Or am I
doing something wrong?
I don't know the first thing about XS and have never written a line of
C, so I'd appreciate some insights.
Finally, there used to be a gtk-perl channel on irc.gnome.org. Maybe it
could be resurrected? I'm sure there are lots of people who have silly
little questions like those above who don't want to post to a mailing
list to have answered.
Gavin.
--
Gavin Brown
e: gavin brown uk com
w: http://jodrell.net/
PGP/GPG key ID: 891D8FCA
Attachment:
signature.asc
Description: This is a digitally signed message part