Gnome2::ZvtTerm.3pm

Langue: en

Version: 2003-12-27 (mandriva - 01/05/08)

Section: 3 (Bibliothèques de fonctions)

NAME

Gnome2::ZvtTerm - Perl interface to the 2.x series of Zed's Virtual Terminal library

SYNOPSIS

   use Gnome2::ZvtTerm;
   Gtk2->init;
   use constant TRUE  => 1;
   use constant FALSE => 0;
 
   $window = Gtk2::Window->new;
   $window->signal_connect (delete_event => sub {
           $term->closepty;
           Gtk2->main_quit;
           FALSE
   });
 
   $term = Gnome2::ZvtTerm->new_with_size (80, 24);
   $vsb = Gtk2::VScrollbar->new ($term->adjustment);
 
   $hbox = Gtk2::HBox->new;
   $window->add ($hbox);
   $hbox->pack_start ($term, TRUE, TRUE, 0);
   $hbox->pack_start ($vsb, FALSE, FALSE, 0);
 
   $pid = $term->forkpty (FALSE);
   if ($pid == 0) {
           $ENV{COLUMNS} = 80;
           $ENV{ROWS} = 24;
           $ENV{TERM} = 'xterm';
           exec 'bash';
   }
   # destroy the window when the client exits.
   $term->signal_connect (child_died => sub {
           $window->destroy;
           Gtk2->main_quit;
   });
 
   $window->show_all;
   Gtk2->main;
 
 

DESCRIPTION

Zed's Virtual Terminal is a fast terminal emulator library that was part of the Gnome 1.x desktop; this module provides the Perl developer with access to the Gtk2 port of libzvt.

Exports

Unlike most gtk2-perl modules, this module exports some traditional constants rather than using the string-based enums and flags (because libzvt doesn't support them). These use the full C names in an attempt to avoid namespace conflicts.

   ZVT_TERM_DO_UTMP_LOG
   ZVT_TERM_DO_WTMP_LOG
   ZVT_TERM_DO_LASTLOG
     flags for $term->forkpty.
 
   ZVT_BACKGROUND_SHADED
   ZVT_BACKGROUND_SCROLL
     flags for $term->set_background; scroll cannot be used with
     transparency.
 
 

SEE ALSO

perl(1), Glib(3pm), Gtk2(3pm).

AUTHORS

muppet <scott at asofyet dot org>, Leon Strong <leon dot strong at staff dot ihug dot co dot nz> Copyright 2003 by the gtk2-perl team.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.