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.165 by root, Sat May 10 22:36:46 2008 UTC vs.
Revision 1.171 by root, Fri Oct 10 00:11:44 2008 UTC

108reference. The string will be used as button text and the code reference 108reference. The string will be used as button text and the code reference
109will be called when the toggle changes, with the new boolean value as 109will be called when the toggle changes, with the new boolean value as
110first argument. 110first argument.
111 111
112The following will add an entry C<myoption> that changes 112The following will add an entry C<myoption> that changes
113C<$self->{myoption}>: 113C<< $self->{myoption} >>:
114 114
115 push @{ $self->{term}{option_popup_hook} }, sub { 115 push @{ $self->{term}{option_popup_hook} }, sub {
116 ("my option" => $myoption, sub { $self->{myoption} = $_[0] }) 116 ("my option" => $myoption, sub { $self->{myoption} = $_[0] })
117 }; 117 };
118 118
541 541
542It is called before lines are scrolled out (so rows 0 .. min ($lines - 1, 542It is called before lines are scrolled out (so rows 0 .. min ($lines - 1,
543$nrow - 1) represent the lines to be scrolled out). C<$saved> is the total 543$nrow - 1) represent the lines to be scrolled out). C<$saved> is the total
544number of lines that will be in the scrollback buffer. 544number of lines that will be in the scrollback buffer.
545 545
546=item on_osc_seq $term, $op, $args 546=item on_osc_seq $term, $op, $args, $resp
547 547
548Called on every OSC sequence and can be used to suppress it or modify its 548Called on every OSC sequence and can be used to suppress it or modify its
549behaviour. The default should be to return an empty list. A true value 549behaviour. The default should be to return an empty list. A true value
550suppresses execution of the request completely. Make sure you don't get 550suppresses execution of the request completely. Make sure you don't get
551confused by recursive invocations when you output an osc sequence within 551confused by recursive invocations when you output an OSC sequence within
552this callback. 552this callback.
553 553
554C<on_osc_seq_perl> should be used for new behaviour. 554C<on_osc_seq_perl> should be used for new behaviour.
555 555
556=item on_osc_seq_perl $term, $string 556=item on_osc_seq_perl $term, $args, $resp
557 557
558Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC = 558Called whenever the B<ESC ] 777 ; string ST> command sequence (OSC =
559operating system command) is processed. Cursor position and other state 559operating system command) is processed. Cursor position and other state
560information is up-to-date when this happens. For interoperability, the 560information is up-to-date when this happens. For interoperability, the
561string should start with the extension name and a colon, to distinguish 561string should start with the extension name (sans -osc) and a semicolon,
562it from commands for other extensions, and this might be enforced in the 562to distinguish it from commands for other extensions, and this might be
563future. 563enforced in the future.
564
565For example, C<overlay-osc> uses this:
566
567 sub on_osc_seq_perl {
568 my ($self, $osc, $resp) = @_;
569
570 return unless $osc =~ s/^overlay;//;
571
572 ... process remaining $osc string
573 }
564 574
565Be careful not ever to trust (in a security sense) the data you receive, 575Be careful not ever to trust (in a security sense) the data you receive,
566as its source can not easily be controlled (e-mail content, messages from 576as its source can not easily be controlled (e-mail content, messages from
567other users on the same system etc.). 577other users on the same system etc.).
578
579For responses, C<$resp> contains the end-of-args separator used by the
580sender.
568 581
569=item on_add_lines $term, $string 582=item on_add_lines $term, $string
570 583
571Called whenever text is about to be output, with the text as argument. You 584Called whenever text is about to be output, with the text as argument. You
572can filter/change and output the text yourself by returning a true value 585can filter/change and output the text yourself by returning a true value
593later with the already-modified line (e.g. if unrelated parts change), so 606later with the already-modified line (e.g. if unrelated parts change), so
594you cannot just toggle rendition bits, but only set them. 607you cannot just toggle rendition bits, but only set them.
595 608
596=item on_refresh_begin $term 609=item on_refresh_begin $term
597 610
598Called just before the screen gets redrawn. Can be used for overlay 611Called just before the screen gets redrawn. Can be used for overlay or
599or similar effects by modify terminal contents in refresh_begin, and 612similar effects by modifying the terminal contents in refresh_begin, and
600restoring them in refresh_end. The built-in overlay and selection display 613restoring them in refresh_end. The built-in overlay and selection display
601code is run after this hook, and takes precedence. 614code is run after this hook, and takes precedence.
602 615
603=item on_refresh_end $term 616=item on_refresh_end $term
604 617
1262Here is a likely non-exhaustive list of resource names, not all of which 1275Here is a likely non-exhaustive list of resource names, not all of which
1263are supported in every build, please see the source file F</src/rsinc.h> 1276are supported in every build, please see the source file F</src/rsinc.h>
1264to see the actual list: 1277to see the actual list:
1265 1278
1266 answerbackstring backgroundPixmap backspace_key boldFont boldItalicFont 1279 answerbackstring backgroundPixmap backspace_key boldFont boldItalicFont
1267 borderLess color cursorBlink cursorUnderline cutchars delete_key 1280 borderLess chdir color cursorBlink cursorUnderline cutchars delete_key
1268 display_name embed ext_bwidth fade font geometry hold iconName 1281 display_name embed ext_bwidth fade font geometry hold iconName
1269 imFont imLocale inputMethod insecure int_bwidth intensityStyles 1282 imFont imLocale inputMethod insecure int_bwidth intensityStyles
1270 italicFont jumpScroll lineSpace loginShell mapAlert meta8 modifier 1283 italicFont jumpScroll lineSpace loginShell mapAlert meta8 modifier
1271 mouseWheelScrollPage name override_redirect pastableTabs path perl_eval 1284 mouseWheelScrollPage name override_redirect pastableTabs path perl_eval
1272 perl_ext_1 perl_ext_2 perl_lib pointerBlank pointerBlankDelay 1285 perl_ext_1 perl_ext_2 perl_lib pointerBlank pointerBlankDelay
1280=cut 1293=cut
1281 1294
1282sub resource($$;$) { 1295sub resource($$;$) {
1283 my ($self, $name) = (shift, shift); 1296 my ($self, $name) = (shift, shift);
1284 unshift @_, $self, $name, ($name =~ s/\s*\+\s*(\d+)$// ? $1 : 0); 1297 unshift @_, $self, $name, ($name =~ s/\s*\+\s*(\d+)$// ? $1 : 0);
1285 &urxvt::term::_resource 1298 goto &urxvt::term::_resource
1286} 1299}
1287 1300
1288=item $value = $term->x_resource ($pattern) 1301=item $value = $term->x_resource ($pattern)
1289 1302
1290Returns the X-Resource for the given pattern, excluding the program or 1303Returns the X-Resource for the given pattern, excluding the program or
1597 1610
1598Used after changing terminal contents to display them. 1611Used after changing terminal contents to display them.
1599 1612
1600=item $text = $term->ROW_t ($row_number[, $new_text[, $start_col]]) 1613=item $text = $term->ROW_t ($row_number[, $new_text[, $start_col]])
1601 1614
1602Returns the text of the entire row with number C<$row_number>. Row C<0> 1615Returns the text of the entire row with number C<$row_number>. Row C<< $term->top_row >>
1603is the topmost terminal line, row C<< $term->$ncol-1 >> is the bottommost 1616is the topmost terminal line, row C<< $term->nrow-1 >> is the bottommost
1604terminal line. The scrollback buffer starts at line C<-1> and extends to
1605line C<< -$term->nsaved >>. Nothing will be returned if a nonexistent line 1617terminal line. Nothing will be returned if a nonexistent line
1606is requested. 1618is requested.
1607 1619
1608If C<$new_text> is specified, it will replace characters in the current 1620If C<$new_text> is specified, it will replace characters in the current
1609line, starting at column C<$start_col> (default C<0>), which is useful 1621line, starting at column C<$start_col> (default C<0>), which is useful
1610to replace only parts of a line. The font index in the rendition will 1622to replace only parts of a line. The font index in the rendition will
1808 1820
1809=item @atoms = $term->XListProperties ($window) 1821=item @atoms = $term->XListProperties ($window)
1810 1822
1811=item ($type,$format,$octets) = $term->XGetWindowProperty ($window, $property) 1823=item ($type,$format,$octets) = $term->XGetWindowProperty ($window, $property)
1812 1824
1813=item $term->XChangeWindowProperty ($window, $property, $type, $format, $octets) 1825=item $term->XChangeProperty ($window, $property, $type, $format, $octets)
1814 1826
1815=item $term->XDeleteProperty ($window, $property) 1827=item $term->XDeleteProperty ($window, $property)
1816 1828
1817=item $window = $term->DefaultRootWindow 1829=item $window = $term->DefaultRootWindow
1818 1830

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines