Priprava na vyhradni mod
[mirrors/Programs.git] / perl / gtk2 / xterm-embed.pl
... / ...
CommitLineData
1#!/usr/bin/env perl
2use strict;
3use warnings;
4use Gtk2 -init;
5
6my $window = Gtk2::Window->new ('toplevel');
7$window->set_default_size(640, 480);
8#$window->set_decorated(0);
9$window->signal_connect( destroy => sub {
10 Gtk2->main_quit();
11});
12
13my $xterm = new Gtk2::Socket;
14$xterm->signal_connect_after( realize => sub {
15 my $xid = $_[0]->window->get_xid;
16 system "xterm -bg black -fg white -into $xid -e 'ls -l; bash' &";
17});
18
19$window->add($xterm);
20$window->show_all;
21Gtk2->main;
This page took 0.339775 seconds and 4 git commands to generate.