Commit | Line | Data |
---|---|---|
21c4e167 H |
1 | #!/usr/bin/env perl |
2 | # Sample Gtk2-Perl Glade app | |
3 | # check http://code.google.com/p/camelbox/ for running on windows | |
4 | ||
5 | use strict; | |
6 | use warnings; | |
7 | use utf8; | |
8 | use Gtk2 qw{ -init }; | |
9 | ||
10 | ||
11 | my $builder; | |
12 | my $window; | |
13 | ||
14 | $builder = Gtk2::Builder->new(); | |
15 | $builder->add_from_file( "sample.builder" ); | |
16 | ||
17 | $window = $builder->get_object( "window1" ); | |
18 | $builder->connect_signals( undef ); | |
19 | ||
20 | $window->show(); | |
21 | ||
22 | $builder = undef; | |
23 | ||
24 | Gtk2->main(); | |
25 | ||
26 | exit; | |
27 | ||
28 | ||
29 | sub cb_destroy | |
30 | { | |
31 | Gtk2->main_quit(); | |
32 | } |