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.133 by root, Mon Feb 6 06:14:08 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
552a C<perl:string> action bound to a key, see description of the B<keysym> 569a C<perl:string> action bound to a key, see description of the B<keysym>
553resource in the @@RXVT_NAME@@(1) manpage). 570resource in the @@RXVT_NAME@@(1) manpage).
554 571
555The event is simply the action string. This interface is assumed to change 572The event is simply the action string. This interface is assumed to change
556slightly in the future. 573slightly in the future.
574
575=item on_resize_all_windows $tern, $new_width, $new_height
576
577Called just after the new window size has been calculcated, but before
578windows are actually being resized or hints are being set. If this hook
579returns TRUE, setting of the window hints is being skipped.
557 580
558=item on_x_event $term, $event 581=item on_x_event $term, $event
559 582
560Called on every X event received on the vt window (and possibly other 583Called on every X event received on the vt window (and possibly other
561windows). Should only be used as a last resort. Most event structure 584windows). Should only be used as a last resort. Most event structure
891 914
892 if (my $cb = $TERM->{_hook}[$htype]) { 915 if (my $cb = $TERM->{_hook}[$htype]) {
893 verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")" 916 verbose 10, "$HOOKNAME[$htype] (" . (join ", ", $TERM, @_) . ")"
894 if $verbosity >= 10; 917 if $verbosity >= 10;
895 918
896 keys %$cb; 919 for my $pkg (keys %$cb) {
897
898 while (my ($pkg, $cb) = each %$cb) {
899 my $retval_ = eval { $cb->($TERM->{_pkg}{$pkg}, @_) }; 920 my $retval_ = eval { $cb->{$pkg}->($TERM->{_pkg}{$pkg}, @_) };
900 $retval ||= $retval_; 921 $retval ||= $retval_;
901 922
902 if ($@) { 923 if ($@) {
903 $TERM->ungrab; # better to lose the grab than the session 924 $TERM->ungrab; # better to lose the grab than the session
904 warn $@; 925 warn $@;
1468=item $env = $term->env 1489=item $env = $term->env
1469 1490
1470Returns 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
1471similar to C<\%ENV>. 1492similar to C<\%ENV>.
1472 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
1473=cut 1503=cut
1474 1504
1475sub env { 1505sub env {
1476 if (my $env = $_[0]->_env) {
1477 +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), @$env } 1506 +{ map /^([^=]+)(?:=(.*))?$/s && ($1 => $2), $_[0]->envv }
1478 } else {
1479 +{ %ENV }
1480 }
1481} 1507}
1482 1508
1483=item $modifiermask = $term->ModLevel3Mask 1509=item $modifiermask = $term->ModLevel3Mask
1484 1510
1485=item $modifiermask = $term->ModMetaMask 1511=item $modifiermask = $term->ModMetaMask

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines