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.256 by sf-exg, Thu Jul 14 05:10:06 2016 UTC vs.
Revision 1.261 by root, Fri Jun 18 12:35:38 2021 UTC

115the C<urxvt::extension> section below. 115the C<urxvt::extension> section below.
116 116
117=head2 META comments 117=head2 META comments
118 118
119Rxvt-unicode recognizes special meta comments in extensions that define 119Rxvt-unicode recognizes special meta comments in extensions that define
120different types of metadata. 120different types of metadata. These comments are scanned whenever a
121terminal is created and are typically used to autoload extensions when
122their resources or command line parameters are used.
121 123
122Currently, it recognises only one such comment: 124Currently, it recognises only one such comment:
123 125
124=over 4 126=over 4
125 127
126=item #:META:RESOURCE:name:type:desc 128=item #:META:RESOURCE:name:type:desc
127 129
128The RESOURCE comment defines a resource used by the extension, where 130The RESOURCE comment defines a resource used by the extension, where
129C<name> is the resource name, C<type> is the resource type, C<boolean> 131C<name> is the resource name, C<type> is the resource type, C<boolean>
130or C<string>, and C<desc> is the resource description. 132or C<string>, and C<desc> is the resource description.
133
134The extension will be autoloaded when this resource is specified or used
135as a command line parameter.
131 136
132=back 137=back
133 138
134=head2 Hooks 139=head2 Hooks
135 140
511ConfigureRequest, GravityNotify, ResizeRequest, CirculateNotify, 516ConfigureRequest, GravityNotify, ResizeRequest, CirculateNotify,
512CirculateRequest, PropertyNotify, SelectionClear, SelectionRequest, 517CirculateRequest, PropertyNotify, SelectionClear, SelectionRequest,
513SelectionNotify, ColormapNotify, ClientMessage, MappingNotify 518SelectionNotify, ColormapNotify, ClientMessage, MappingNotify
514 519
515Various constants for use in X calls and event processing. 520Various constants for use in X calls and event processing.
521
522=item urxvt::PrivMode_132, PrivMode_132OK, PrivMode_rVideo, PrivMode_relOrigin,
523PrivMode_Screen, PrivMode_Autowrap, PrivMode_aplCUR, PrivMode_aplKP,
524PrivMode_HaveBackSpace, PrivMode_BackSpace, PrivMode_ShiftKeys,
525PrivMode_VisibleCursor, PrivMode_MouseX10, PrivMode_MouseX11,
526PrivMode_scrollBar, PrivMode_TtyOutputInh, PrivMode_Keypress,
527PrivMode_smoothScroll, PrivMode_vt52, PrivMode_LFNL, PrivMode_MouseBtnEvent,
528PrivMode_MouseAnyEvent, PrivMode_BracketPaste, PrivMode_ExtMouseUTF8,
529PrivMode_ExtMouseUrxvt, PrivMode_BlinkingCursor, PrivMode_mouse_report,
530PrivMode_Default
531
532Constants for checking DEC private modes.
516 533
517=back 534=back
518 535
519=head2 RENDITION 536=head2 RENDITION
520 537
588sub parse_resource { 605sub parse_resource {
589 my ($term, $name, $isarg, $longopt, $flag, $value) = @_; 606 my ($term, $name, $isarg, $longopt, $flag, $value) = @_;
590 607
591 $term->scan_extensions; 608 $term->scan_extensions;
592 609
610 # iterating over all resources has quadratic time overhead
611 # overall, maybe this could be optimised?
593 my $r = $term->{meta}{resource}; 612 my $r = $term->{meta}{resource};
594 keys %$r; # reset iterator 613 keys %$r; # reset iterator
595 while (my ($k, $v) = each %$r) { 614 while (my ($k, $v) = each %$r) {
596 my $pattern = $k; 615 my $pattern = $k;
597 $pattern =~ y/./-/ if $isarg; 616 $pattern =~ y/./-/ if $isarg;
710 @TERM_EXT = (); 729 @TERM_EXT = ();
711 $TERM->register_package ($_) for @pkg; 730 $TERM->register_package ($_) for @pkg;
712 } 731 }
713 732
714 for ( 733 for (
734 @{ delete $TERM->{perl_ext_3} },
715 (grep $_, map { split /,/, $TERM->resource ("perl_ext_$_") } 1, 2), 735 (grep $_, map { split /,/, $TERM->resource ("perl_ext_$_") } 1, 2),
716 @{ delete $TERM->{perl_ext_3} }
717 ) { 736 ) {
718 if ($_ eq "default") { 737 if ($_ eq "default") {
719 738
720 $ext_arg{$_} = [] 739 $ext_arg{$_} = []
721 for qw(selection option-popup selection-popup readline searchable-scrollback); 740 for qw(selection option-popup selection-popup readline searchable-scrollback confirm-paste);
722 741
723 for ($TERM->_keysym_resources) { 742 for ($TERM->_keysym_resources) {
724 next if /^(?:string|command|builtin|builtin-string|perl)/; 743 next if /^(?:string|command|builtin|builtin-string|perl)/;
725 next unless /^([A-Za-z0-9_\-]+):/; 744 next unless /^([A-Za-z0-9_\-]+):/;
726 745
1691 1710
1692=item $cursor_is_hidden = $term->hidden_cursor 1711=item $cursor_is_hidden = $term->hidden_cursor
1693 1712
1694Returns whether the cursor is currently hidden or not. 1713Returns whether the cursor is currently hidden or not.
1695 1714
1715=item $priv_modes = $term->priv_modes
1716
1717Returns a bitset with the state of DEC private modes.
1718
1719Example:
1720
1721 if ($term->priv_modes & urxvt::PrivMode_mouse_report) {
1722 # mouse reporting is turned on
1723 }
1724
1696=item $view_start = $term->view_start ([$newvalue]) 1725=item $view_start = $term->view_start ([$newvalue])
1697 1726
1698Returns the row number of the topmost displayed line. Maximum value is 1727Returns the row number of the topmost displayed line. Maximum value is
1699C<0>, which displays the normal terminal contents. Lower values scroll 1728C<0>, which displays the normal terminal contents. Lower values scroll
1700this many lines into the scrollback buffer. 1729this many lines into the scrollback buffer.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines