#!/usr/bin/perl -w

use strict;

use Gtk2 -init;
use MIME::Base64 qw(decode_base64);

my $app_win = Gtk2::Window->new;
$app_win->signal_connect(destroy => sub { Gtk2->main_quit; });

my $button = Gtk2::Button->new;
$button->signal_connect(clicked => sub { Gtk2->main_quit; });

my $pixbuf = exit_logo();
my $image  = Gtk2::Image->new_from_pixbuf($pixbuf);
$button->set_image($image);

$app_win->add($button);

$app_win->show_all;

Gtk2->main;

exit;


sub exit_logo {
  my $png_data = decode_base64(<<'EOF');
iVBORw0KGgoAAAANSUhEUgAAAFoAAAAwBAMAAABj6XANAAAAMFBMVEUAAgAaHBkfJCFIT0d4hHdR
r0tPvUhGxkVpr2ZbwVeBrIByzmyVvpSS1I+0wrO027LXNm46AAAACXBIWXMAAAsTAAALEwEAmpwY
AAAAB3RJTUUH2AMGCRQH72lolwAAAAh0RVh0Q29tbWVudAD2zJa/AAACAklEQVRIx+2Vv0/CUBDH
r5bREOMfQIxxctAmdTJGHBw1TK38A/hICGtfGmZJxcHNDupu0FkTHRxk8UdcMCTEiKCLA/UnA6ai
3mufAkbbmjj6HeD1+hne3X3vCvQ3gn/6b2htvi3CAxSP7WgHrcUNLsUwFogbUOPG4mfcIB30mexq
7OJAnjUp1QvyxFJRPi7yuDy+06b1IrgKtR4hkqU0WYPo3oOAT1y939LnpxCyqbY/BdaqB90/yDRU
XpYEi2iVvpCdQrqIsQHAn+Fu+i7PtKGuVyG2nWpApJR5EOxcPr9VFev4wuyiLYVJJaknBNdrEFth
dEJR4vdiE1/Qbprwylf6xOay1HNDGI2BzL1od3enk8YE65jqMw1C03QNJq8hmg1G6w0IV8EyvWkn
S7SDdjkgSqJNPOm7I1bBRXxYmwKIlKkn7WoW75N8Aix5UDrzCgJeOyjdAPCjxxxjbiKdvgKI+tyk
7ng+67YHwj5ZWh9TpqP/JLFJgnUHbTVShRkzGM0sew2jpUC0hv5roasOA9H6KYQP99kA+Wc5T5NX
WD70YWzbv4KGii6xTGxQuORFT7sq4+jYxBmglG/nxVaDdeZjQ/jRLzXHf3z7fE9rn/SbJNywhhZw
Ef1I7+a5cu5EaOw/5xz1k9vyl42cUNqa4wGScI64btVfbHu+u/+/gH9BvwONxuCHXfbzdAAAAABJ
RU5ErkJggg==
EOF
  my $loader = Gtk2::Gdk::PixbufLoader->new;
  $loader->write ($png_data);
  $loader->close;
  return $loader->get_pixbuf;
}

