|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Name this module TestModuleTerminal, make it executable and place in ModulePath:
#!/usr/bin/perl -w
use lib `fvwm-perllib dir`;
use FVWM::Module::Terminal;
my $module = new FVWM::Module::Terminal(
XTerm => 'rxvt', Debug => 2, Name => "TestModuleTerminal",
);
my $id = undef;
$module->send('Next (TestModuleTerminal) SendToModule myid $[w.id]');
$module->addDefaultErrorHandler;
$module->addHandler(M_STRING, sub {
$[1]->_text =~ /^myid (.*)$/ && $id = eval $1;
};
$module->addHandler(M_ICONIFY, sub {
return unless defined $id;
my $id0 = $_[1]->_win_id;
$module->send("WindowId $id Iconify off") if $id0 == $id;
});
$module->track('Scheduler')->schedule(60, sub {
$module->showMessage("You run this module for 1 minute")
});
$module->eventLoop;
The FVWM::Module::Terminal class is a sub-class of FVWM::Module::Toolkit that overloads the methods waitPacket, showError, showMessage and showDebug to manage terminal functionality.
This manual page details only those differences. For details on the API itself, see FVWM::Module.
Useful for diagnostics of a Terminal based module.
Useful for notices by a Terminal based module.
Useful for debugging a Terminal based module.
Last modified on August 26, 2005