ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/doc/rxvtperl.3.man.in
(Generate patch)

Comparing rxvt-unicode/doc/rxvtperl.3.man.in (file contents):
Revision 1.34 by root, Thu Jan 19 19:26:31 2006 UTC vs.
Revision 1.35 by root, Fri Jan 20 16:02:20 2006 UTC

127.\} 127.\}
128.rm #[ #] #H #V #F C 128.rm #[ #] #H #V #F C
129.\" ======================================================================== 129.\" ========================================================================
130.\" 130.\"
131.IX Title "rxvt 3" 131.IX Title "rxvt 3"
132.TH rxvt 3 "2006-01-19" "7.1" "RXVT-UNICODE" 132.TH rxvt 3 "2006-01-20" "7.1" "RXVT-UNICODE"
133.SH "NAME" 133.SH "NAME"
134@@RXVT_NAME@@perl \- rxvt\-unicode's embedded perl interpreter 134@@RXVT_NAME@@perl \- rxvt\-unicode's embedded perl interpreter
135.SH "SYNOPSIS" 135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS" 136.IX Header "SYNOPSIS"
137.Vb 1 137.Vb 1
169.PP 169.PP
170You can activate them like this: 170You can activate them like this:
171.PP 171.PP
172.Vb 1 172.Vb 1
173\& @@RXVT_NAME@@ -pe <extensionname> 173\& @@RXVT_NAME@@ -pe <extensionname>
174.Ve
175.PP
176Or by adding them to the resource for extensions loaded by default:
177.PP
178.Vb 1
179\& URxvt.perl-ext-common: default,automove-background,selection-autotransform
174.Ve 180.Ve
175.IP "selection (enabled by default)" 4 181.IP "selection (enabled by default)" 4
176.IX Item "selection (enabled by default)" 182.IX Item "selection (enabled by default)"
177(More) intelligent selection. This extension tries to be more intelligent 183(More) intelligent selection. This extension tries to be more intelligent
178when the user extends selections (double\-click and further clicks). Right 184when the user extends selections (double\-click and further clicks). Right
301.Ve 307.Ve
302.Sp 308.Sp
303The first line tells the selection code to treat the unchanging part of 309The first line tells the selection code to treat the unchanging part of
304every error message as a selection pattern, and the second line transforms 310every error message as a selection pattern, and the second line transforms
305the message into vi commands to load the file. 311the message into vi commands to load the file.
312.IP "tabbed" 4
313.IX Item "tabbed"
314This transforms the terminal into a tabbar with additional terminals, that
315is, it implements what is commonly refered to as \*(L"tabbed terminal\*(R". The topmost line
316displays a \*(L"[\s-1NEW\s0]\*(R" button, which, when clicked, will add a new tab, followed by one
317button per tab.
318.Sp
319Clicking a button will activate that tab. Pressing Shift-Left and
320Shift-Right will switch to the tab left or right of the current one.
306.IP "mark-urls" 4 321.IP "mark-urls" 4
307.IX Item "mark-urls" 322.IX Item "mark-urls"
308Uses per-line display filtering (\f(CW\*(C`on_line_update\*(C'\fR) to underline urls and 323Uses per-line display filtering (\f(CW\*(C`on_line_update\*(C'\fR) to underline urls and
309make them clickable. When middle\-clicked, the program specified in the 324make them clickable. When middle\-clicked, the program specified in the
310resource \f(CW\*(C`urlLauncher\*(C'\fR (default \f(CW\*(C`x\-www\-browser\*(C'\fR) will be started with 325resource \f(CW\*(C`urlLauncher\*(C'\fR (default \f(CW\*(C`x\-www\-browser\*(C'\fR) will be started with
429called whenever the relevant event happens. 444called whenever the relevant event happens.
430.PP 445.PP
431The first argument passed to them is an extension oject as described in 446The first argument passed to them is an extension oject as described in
432the in the \f(CW\*(C`Extension Objects\*(C'\fR section. 447the in the \f(CW\*(C`Extension Objects\*(C'\fR section.
433.PP 448.PP
434\&\fBAll\fR of these hooks must return a boolean value. If it is true, then the 449\&\fBAll\fR of these hooks must return a boolean value. If any of the called
435event counts as being \fIconsumed\fR, and the invocation of other hooks is 450hooks returns true, then the event counts as being \fIconsumed\fR, and the
436skipped, and the relevant action might not be carried out by the \*(C+ code. 451relevant action might not be carried out by the \*(C+ code.
437.PP 452.PP
438\&\fIWhen in doubt, return a false value (preferably \f(CI\*(C`()\*(C'\fI).\fR 453\&\fIWhen in doubt, return a false value (preferably \f(CI\*(C`()\*(C'\fI).\fR
439.ie n .IP "on_init $term" 4 454.ie n .IP "on_init $term" 4
440.el .IP "on_init \f(CW$term\fR" 4 455.el .IP "on_init \f(CW$term\fR" 4
441.IX Item "on_init $term" 456.IX Item "on_init $term"
442Called after a new terminal object has been initialized, but before 457Called after a new terminal object has been initialized, but before
443windows are created or the command gets run. Most methods are unsafe to 458windows are created or the command gets run. Most methods are unsafe to
444call or deliver senseless data, as terminal size and other characteristics 459call or deliver senseless data, as terminal size and other characteristics
445have not yet been determined. You can safely query and change resources, 460have not yet been determined. You can safely query and change resources
446though. 461and options, though. For many purposes the \f(CW\*(C`on_start\*(C'\fR hook is a better
462place.
463.ie n .IP "on_start $term" 4
464.el .IP "on_start \f(CW$term\fR" 4
465.IX Item "on_start $term"
466Called at the very end of initialisation of a new terminal, just before
467trying to map (display) the toplevel and returning to the mainloop.
468.ie n .IP "on_destroy $term" 4
469.el .IP "on_destroy \f(CW$term\fR" 4
470.IX Item "on_destroy $term"
471Called whenever something tries to destroy terminal, before doing anything
472yet. If this hook returns true, then destruction is skipped, but this is
473rarely a good idea.
447.ie n .IP "on_reset $term" 4 474.ie n .IP "on_reset $term" 4
448.el .IP "on_reset \f(CW$term\fR" 4 475.el .IP "on_reset \f(CW$term\fR" 4
449.IX Item "on_reset $term" 476.IX Item "on_reset $term"
450Called after the screen is \*(L"reset\*(R" for any reason, such as resizing or 477Called after the screen is \*(L"reset\*(R" for any reason, such as resizing or
451control sequences. Here is where you can react on changes to size-related 478control sequences. Here is where you can react on changes to size-related
452variables. 479variables.
453.ie n .IP "on_start $term" 4
454.el .IP "on_start \f(CW$term\fR" 4
455.IX Item "on_start $term"
456Called at the very end of initialisation of a new terminal, just before
457returning to the mainloop.
458.ie n .IP "on_child_start $term\fR, \f(CW$pid" 4 480.ie n .IP "on_child_start $term\fR, \f(CW$pid" 4
459.el .IP "on_child_start \f(CW$term\fR, \f(CW$pid\fR" 4 481.el .IP "on_child_start \f(CW$term\fR, \f(CW$pid\fR" 4
460.IX Item "on_child_start $term, $pid" 482.IX Item "on_child_start $term, $pid"
461Called just after the child process has been \f(CW\*(C`fork\*(C'\fRed. 483Called just after the child process has been \f(CW\*(C`fork\*(C'\fRed.
462.ie n .IP "on_child_exit $term\fR, \f(CW$status" 4 484.ie n .IP "on_child_exit $term\fR, \f(CW$status" 4
616.Sp 638.Sp
617\&\f(CW\*(C`on_key_press\*(C'\fR additionally receives the string rxvt-unicode would 639\&\f(CW\*(C`on_key_press\*(C'\fR additionally receives the string rxvt-unicode would
618output, if any, in locale-specific encoding. 640output, if any, in locale-specific encoding.
619.Sp 641.Sp
620subwindow. 642subwindow.
643.ie n .IP "on_client_message $term\fR, \f(CW$event" 4
644.el .IP "on_client_message \f(CW$term\fR, \f(CW$event\fR" 4
645.IX Item "on_client_message $term, $event"
646.PD 0
647.ie n .IP "on_wm_protocols $term\fR, \f(CW$event" 4
648.el .IP "on_wm_protocols \f(CW$term\fR, \f(CW$event\fR" 4
649.IX Item "on_wm_protocols $term, $event"
650.ie n .IP "on_wm_delete_window $term\fR, \f(CW$event" 4
651.el .IP "on_wm_delete_window \f(CW$term\fR, \f(CW$event\fR" 4
652.IX Item "on_wm_delete_window $term, $event"
653.PD
654Called when various types of ClientMessage events are received (all with
655format=32, \s-1WM_PROTOCOLS\s0 or \s-1WM_PROTOCOLS:WM_DELETE_WINDOW\s0).
621.ie n .Sh "Variables in the ""urxvt"" Package" 656.ie n .Sh "Variables in the ""urxvt"" Package"
622.el .Sh "Variables in the \f(CWurxvt\fP Package" 657.el .Sh "Variables in the \f(CWurxvt\fP Package"
623.IX Subsection "Variables in the urxvt Package" 658.IX Subsection "Variables in the urxvt Package"
624.IP "$urxvt::LIBDIR" 4 659.IP "$urxvt::LIBDIR" 4
625.IX Item "$urxvt::LIBDIR" 660.IX Item "$urxvt::LIBDIR"
634The basename of the installed binaries, usually \f(CW\*(C`urxvt\*(C'\fR. 669The basename of the installed binaries, usually \f(CW\*(C`urxvt\*(C'\fR.
635.IP "$urxvt::TERM" 4 670.IP "$urxvt::TERM" 4
636.IX Item "$urxvt::TERM" 671.IX Item "$urxvt::TERM"
637The current terminal. This variable stores the current \f(CW\*(C`urxvt::term\*(C'\fR 672The current terminal. This variable stores the current \f(CW\*(C`urxvt::term\*(C'\fR
638object, whenever a callback/hook is executing. 673object, whenever a callback/hook is executing.
674.IP "@urxvt::TERM_INIT" 4
675.IX Item "@urxvt::TERM_INIT"
676All coderefs in this array will be called as methods of the next newly
677created \f(CW\*(C`urxvt::term\*(C'\fR object (during the \f(CW\*(C`on_init\*(C'\fR phase). The array
678gets cleared before the codereferences that were in it are being executed,
679so coderefs can push themselves onto it again if they so desire.
680.Sp
681This complements to the perl-eval commandline option, but gets executed
682first.
683.IP "@urxvt::TERM_EXT" 4
684.IX Item "@urxvt::TERM_EXT"
685Works similar to \f(CW@TERM_INIT\fR, but contains perl package/class names, which
686get registered as normal extensions after calling the hooks in \f(CW@TERM_INIT\fR
687but before other extensions. Gets cleared just like \f(CW@TERM_INIT\fR.
639.ie n .Sh "Functions in the ""urxvt"" Package" 688.ie n .Sh "Functions in the ""urxvt"" Package"
640.el .Sh "Functions in the \f(CWurxvt\fP Package" 689.el .Sh "Functions in the \f(CWurxvt\fP Package"
641.IX Subsection "Functions in the urxvt Package" 690.IX Subsection "Functions in the urxvt Package"
642.ie n .IP "urxvt::fatal $errormessage" 4 691.ie n .IP "urxvt::fatal $errormessage" 4
643.el .IP "urxvt::fatal \f(CW$errormessage\fR" 4 692.el .IP "urxvt::fatal \f(CW$errormessage\fR" 4
1306Start watching for requested events on the given handle. 1355Start watching for requested events on the given handle.
1307.ie n .IP "$iow = $iow\->stop" 4 1356.ie n .IP "$iow = $iow\->stop" 4
1308.el .IP "$iow = \f(CW$iow\fR\->stop" 4 1357.el .IP "$iow = \f(CW$iow\fR\->stop" 4
1309.IX Item "$iow = $iow->stop" 1358.IX Item "$iow = $iow->stop"
1310Stop watching for events on the given filehandle. 1359Stop watching for events on the given filehandle.
1360.ie n .Sh "The ""urxvt::iw"" Class"
1361.el .Sh "The \f(CWurxvt::iw\fP Class"
1362.IX Subsection "The urxvt::iw Class"
1363This class implements idle watchers, that get called automatically when
1364the process is idle. They should return as fast as possible, after doing
1365some useful work.
1366.IP "$iw = new urxvt::iw" 4
1367.IX Item "$iw = new urxvt::iw"
1368Create a new idle watcher object in stopped state.
1369.ie n .IP "$iw = $iw\fR\->cb (sub { my ($iw) = \f(CW@_; ... })" 4
1370.el .IP "$iw = \f(CW$iw\fR\->cb (sub { my ($iw) = \f(CW@_\fR; ... })" 4
1371.IX Item "$iw = $iw->cb (sub { my ($iw) = @_; ... })"
1372Set the callback to be called when the watcher triggers.
1373.ie n .IP "$timer = $timer\->start" 4
1374.el .IP "$timer = \f(CW$timer\fR\->start" 4
1375.IX Item "$timer = $timer->start"
1376Start the watcher.
1377.ie n .IP "$timer = $timer\->stop" 4
1378.el .IP "$timer = \f(CW$timer\fR\->stop" 4
1379.IX Item "$timer = $timer->stop"
1380Stop the watcher.
1381.ie n .Sh "The ""urxvt::pw"" Class"
1382.el .Sh "The \f(CWurxvt::pw\fP Class"
1383.IX Subsection "The urxvt::pw Class"
1384This class implements process watchers. They create an event whenever a
1385process exits, after which they stop automatically.
1386.PP
1387.Vb 9
1388\& my $pid = fork;
1389\& ...
1390\& $term->{pw} = urxvt::pw
1391\& ->new
1392\& ->start ($pid)
1393\& ->cb (sub {
1394\& my ($pw, $exit_status) = @_;
1395\& ...
1396\& });
1397.Ve
1398.IP "$pw = new urxvt::pw" 4
1399.IX Item "$pw = new urxvt::pw"
1400Create a new process watcher in stopped state.
1401.ie n .IP "$pw = $pw\fR\->cb (sub { my ($pw, \f(CW$exit_status\fR) = \f(CW@_; ... })" 4
1402.el .IP "$pw = \f(CW$pw\fR\->cb (sub { my ($pw, \f(CW$exit_status\fR) = \f(CW@_\fR; ... })" 4
1403.IX Item "$pw = $pw->cb (sub { my ($pw, $exit_status) = @_; ... })"
1404Set the callback to be called when the timer triggers.
1405.ie n .IP "$pw = $timer\->start ($pid)" 4
1406.el .IP "$pw = \f(CW$timer\fR\->start ($pid)" 4
1407.IX Item "$pw = $timer->start ($pid)"
1408Tells the wqtcher to start watching for process \f(CW$pid\fR.
1409.ie n .IP "$pw = $pw\->stop" 4
1410.el .IP "$pw = \f(CW$pw\fR\->stop" 4
1411.IX Item "$pw = $pw->stop"
1412Stop the watcher.
1311.SH "ENVIRONMENT" 1413.SH "ENVIRONMENT"
1312.IX Header "ENVIRONMENT" 1414.IX Header "ENVIRONMENT"
1313.Sh "\s-1URXVT_PERL_VERBOSITY\s0" 1415.Sh "\s-1URXVT_PERL_VERBOSITY\s0"
1314.IX Subsection "URXVT_PERL_VERBOSITY" 1416.IX Subsection "URXVT_PERL_VERBOSITY"
1315This variable controls the verbosity level of the perl extension. Higher 1417This variable controls the verbosity level of the perl extension. Higher

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines