#!/usr/bin/perl
use strict;
use warnings;

use Glib qw(TRUE FALSE);
use Gtk2 -init;

use Foo qw(Gtk2::Button Gtk2::Widget);

my $window = Gtk2::Window -> new();
my $button = Gtk2::Button -> new("Ha!");

sub clicked {
  warn "Ahem";
}

$button -> Clicked += \&clicked;

$window -> DeleteEvent += sub {
  Gtk2 -> main_quit();
  return FALSE;
};

$window -> add($button);
$window -> set_default_size(200, 50);
$window -> set_title("Ha!");
$window -> show_all();

Gtk2 -> main();
