summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorroot <root>2005-02-19 01:07:57 +0000
committerroot <root>2005-02-19 01:07:57 +0000
commit3234802df86a281f484ea4dd870e5473b48c2379 (patch)
treec0d3fe9b3ea7f2dc5a5fa05f7192144f0e102fc0 /doc
parente92b4a498418f31384803a66c5fbc885fbea9806 (diff)
*** empty log message ***
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/embed30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/embed b/doc/embed
new file mode 100755
index 0000000..7566ecc
--- /dev/null
+++ b/doc/embed
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+
+# sample script to illustrate the -embed option
+
+# embed a rxvt inside another X app
+# see also pty-fd
+
+# doesn't handle sigchld
+
+use Gtk2;
+
+init Gtk2;
+
+my $window = new Gtk2::Window 'toplevel';
+
+my $frame = new Gtk2::Frame "embedded rxvt-unicode terminal";
+
+$window->add ($frame);
+
+my $rxvt = new Gtk2::Socket;
+$frame->add ($rxvt);
+$frame->set_size_request (700, 400);
+$window->show_all;
+my $xid = $rxvt->window->get_xid;
+
+system "rxvt -embed $xid &";
+
+$window->show_all;
+
+main Gtk2;