Re: anyone here yet?




What I've been working on recently is a Perl interface to
gtk. It's not quite ready for release yet, but I have a
good chunk done. (A Perl port of the entire testgtk program
works stably in Perl.) As a teaser, 'simple.c' in Perl follows.

You can see that by mapping gtk's object oriented design onto
the objected oriented features of Perl, I've been able to make
the interface considerably more concise.

The clean design of gtk really made programming the interface
quite easy. I hope people will find it useful, at the least for
creating quick interfaces.

                                        Owen

-------
#!/usr/bin/perl -w

use Gtk;

Gtk::init ($0,\@ARGV);

my $window = Gtk::window('toplevel');
$window->connect("destroy", sub { Gtk::exit(0) });
$window->border_width(10);

my $button = Gtk::button_with_label("Hello World");
$button->connect("clicked", sub { print "Hello World\n"; Gtk:exit(0) });
$window->add($button);

$button->show;
$window->show;

Gtk::main();



--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null



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