Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/perl -w
- use strict;
- use Gtk2 -init;
- use Glib qw{ TRUE FALSE };
- my $window = Gtk2::Window->new ('toplevel');
- $window->set_default_size(100,100);
- $window->set_position('center');
- $window->signal_connect (delete_event => sub { Gtk2->main_quit });
- #$window->signal_connect( configure_event => sub{print $_[1]->x . "\n"; return TRUE} );
- my $button = Gtk2::Button->new ('Action');
- $button->signal_connect (clicked => sub {
- print("Hello Gtk2-Perl\n");
- });
- $window->add ($button);
- $window->show_all;
- Gtk2->main;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement