ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/urxvt.pm
(Generate patch)

Comparing rxvt-unicode/src/urxvt.pm (file contents):
Revision 1.134 by root, Sat Feb 11 02:31:13 2006 UTC vs.
Revision 1.142 by root, Thu Jul 6 18:56:10 2006 UTC

151bottom. C<Escape> leaves search mode and returns to the point where search 151bottom. C<Escape> leaves search mode and returns to the point where search
152was started, while C<Enter> or C<Return> stay at the current position and 152was started, while C<Enter> or C<Return> stay at the current position and
153additionally stores the first match in the current line into the primary 153additionally stores the first match in the current line into the primary
154selection. 154selection.
155 155
156The regex defaults to "(?i)", resulting in a case-insensitive search. To
157get a case-sensitive search you can delete this prefix using C<BackSpace>
158or simply use an uppercase character which removes the "(?i)" prefix.
159
160See L<perlre> for more info about perl regular expression syntax.
161
156=item readline (enabled by default) 162=item readline (enabled by default)
157 163
158A support package that tries to make editing with readline easier. At the 164A support package that tries to make editing with readline easier. At
159moment, it reacts to clicking with the left mouse button by trying to 165the moment, it reacts to clicking shift-left mouse button by trying to
160move the text cursor to this position. It does so by generating as many 166move the text cursor to this position. It does so by generating as many
161cursor-left or cursor-right keypresses as required (the this only works 167cursor-left or cursor-right keypresses as required (the this only works
162for programs that correctly support wide characters). 168for programs that correctly support wide characters).
163 169
164To avoid too many false positives, this is only done when: 170To avoid too many false positives, this is only done when:
255 261
256 @@RXVT_NAME@@ -pt OnTheSpot -pe xim-onthespot 262 @@RXVT_NAME@@ -pt OnTheSpot -pe xim-onthespot
257 263
258=item automove-background 264=item automove-background
259 265
260This is basically a one-line extension that dynamically changes the background pixmap offset 266This is basically a very small extension that dynamically changes the
261to the window position, in effect creating the same effect as pseudo transparency with 267background pixmap offset to the window position, in effect creating the
262a custom pixmap. No scaling is supported in this mode. Exmaple: 268same effect as pseudo transparency with a custom pixmap. No scaling is
269supported in this mode. Exmaple:
263 270
264 @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background 271 @@RXVT_NAME@@ -pixmap background.xpm -pe automove-background
265 272
266=item block-graphics-to-ascii 273=item block-graphics-to-ascii
267 274
268A not very useful example of filtering all text output to the terminal, 275A not very useful example of filtering all text output to the terminal
269by replacing all line-drawing characters (U+2500 .. U+259F) by a 276by replacing all line-drawing characters (U+2500 .. U+259F) by a
270similar-looking ascii character. 277similar-looking ascii character.
271 278
272=item digital-clock 279=item digital-clock
273 280
368 375
369=back 376=back
370 377
371=head2 Extension Objects 378=head2 Extension Objects
372 379
373Very perl extension is a perl class. A separate perl object is created 380Every perl extension is a perl class. A separate perl object is created
374for each terminal and each extension and passed as the first parameter to 381for each terminal and each extension and passed as the first parameter to
375hooks. So extensions can use their C<$self> object without having to think 382hooks. So extensions can use their C<$self> object without having to think
376about other extensions, with the exception of methods and members that 383about other extensions, with the exception of methods and members that
377begin with an underscore character C<_>: these are reserved for internal 384begin with an underscore character C<_>: these are reserved for internal
378use. 385use.
493 500
494It is called before lines are scrolled out (so rows 0 .. min ($lines - 1, 501It is called before lines are scrolled out (so rows 0 .. min ($lines - 1,
495$nrow - 1) represent the lines to be scrolled out). C<$saved> is the total 502$nrow - 1) represent the lines to be scrolled out). C<$saved> is the total
496number of lines that will be in the scrollback buffer. 503number of lines that will be in the scrollback buffer.
497 504
505=item on_osc_seq $term, $op, $args
506
507Called on every OSC sequence and can be used to suppress it or modify its
508behaviour. The default should be to return an empty list. A true value
509suppresses execution of the request completely. Make sure you don't get
510confused by recursive invocations when you output an osc sequence within
511this callback.
512
513C<on_osc_seq_perl> should be used for new behaviour.
514
498=item on_osc_seq $term, $string 515=item on_osc_seq_perl $term, $string
499 516
500Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = 517Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC =
501operating system command) is processed. Cursor position and other state 518operating system command) is processed. Cursor position and other state
502information is up-to-date when this happens. For interoperability, the 519information is up-to-date when this happens. For interoperability, the
503string should start with the extension name and a colon, to distinguish 520string should start with the extension name and a colon, to distinguish
897 914
898 if (my $cb = $TERM->{_hook}[$htype]) { 915 if (my $cb = $TERM->{_hook}[$htype]) {
899 verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")" 916 verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")"
900 if $verbosity >= 10; 917 if $verbosity >= 10;
901 918
902 keys %$cb; 919 for my $pkg (keys %$cb) {
903
904 while (my ($pkg, $cb) = each %$cb) {
905 my $retval_ = eval { $cb->($TERM->{_pkg}{$pkg}, @_) }; 920 my $retval_ = eval { $cb->{$pkg}->($TERM->{_pkg}{$pkg}, @_) };
906 $retval ||= $retval_; 921 $retval ||= $retval_;
907 922
908 if ($@) { 923 if ($@) {
909 $TERM->ungrab; # better to lose the grab than the session 924 $TERM->ungrab; # better to lose the grab than the session
910 warn $@; 925 warn $@;
1474=item $env = $term->env 1489=item $env = $term->env
1475 1490
1476Returns a copy of the environment in effect for the terminal as a hashref 1491Returns a copy of the environment in effect for the terminal as a hashref
1477similar to C<\%ENV>. 1492similar to C<\%ENV>.
1478 1493
1494=item @envv = $term->envv
1495
1496Returns the environment as array of strings of the form C<VAR=VALUE>.
1497
1498=item @argv = $term->argv
1499
1500Return the argument vector as this terminal, similar to @ARGV, but
1501includes the program name as first element.
1502
1479=cut 1503=cut
1480 1504
1481sub env { 1505sub env {
1482 if (my $env = $_[0]->_env) {
1483 +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), @$env } 1506 +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), $_[0]->envv }
1484 } else {
1485 +{ %ENV }
1486 }
1487} 1507}
1488 1508
1489=item $modifiermask = $term->ModLevel3Mask 1509=item $modifiermask = $term->ModLevel3Mask
1490 1510
1491=item $modifiermask = $term->ModMetaMask 1511=item $modifiermask = $term->ModMetaMask

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines