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.264 by root, Sat Jul 24 09:42:15 2021 UTC vs.
Revision 1.265 by root, Sat Jul 24 09:48:43 2021 UTC

70terminal is destroyed. 70terminal is destroyed.
71 71
72Argument names also often indicate the type of a parameter. Here are some 72Argument names also often indicate the type of a parameter. Here are some
73hints on what they mean: 73hints on what they mean:
74 74
75=over 4 75=over
76 76
77=item $text 77=item $text
78 78
79Rxvt-unicode's special way of encoding text, where one "unicode" character 79Rxvt-unicode's special way of encoding text, where one "unicode" character
80always represents one screen cell. See L<ROW_t> for a discussion of this format. 80always represents one screen cell. See L<ROW_t> for a discussion of this format.
121terminal is created and are typically used to autoload extensions when 121terminal is created and are typically used to autoload extensions when
122their resources or command line parameters are used. 122their resources or command line parameters are used.
123 123
124Currently, it recognises only one such comment: 124Currently, it recognises only one such comment:
125 125
126=over 4 126=over
127 127
128=item #:META:RESOURCE:name:type:desc 128=item #:META:RESOURCE:name:type:desc
129 129
130The RESOURCE comment defines a resource used by the extension, where 130The RESOURCE comment defines a resource used by the extension, where
131C<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>
148hooks returns true, then the event counts as being I<consumed>, and the 148hooks returns true, then the event counts as being I<consumed>, and the
149relevant action might not be carried out by the C++ code. 149relevant action might not be carried out by the C++ code.
150 150
151I<< When in doubt, return a false value (preferably C<()>). >> 151I<< When in doubt, return a false value (preferably C<()>). >>
152 152
153=over 4 153=over
154 154
155=item on_init $term 155=item on_init $term
156 156
157Called after a new terminal object has been initialized, but before 157Called after a new terminal object has been initialized, but before
158windows are created or the command gets run. Most methods are unsafe to 158windows are created or the command gets run. Most methods are unsafe to
422 422
423our $NOCHAR = chr 0xffff; 423our $NOCHAR = chr 0xffff;
424 424
425=head2 Variables in the C<urxvt> Package 425=head2 Variables in the C<urxvt> Package
426 426
427=over 4 427=over
428 428
429=item $urxvt::LIBDIR 429=item $urxvt::LIBDIR
430 430
431The rxvt-unicode library directory, where, among other things, the perl 431The rxvt-unicode library directory, where, among other things, the perl
432modules and scripts are stored. 432modules and scripts are stored.
462 462
463=back 463=back
464 464
465=head2 Functions in the C<urxvt> Package 465=head2 Functions in the C<urxvt> Package
466 466
467=over 4 467=over
468 468
469=item urxvt::fatal $errormessage 469=item urxvt::fatal $errormessage
470 470
471Fatally aborts execution with the given error message (which should 471Fatally aborts execution with the given error message (which should
472include a trailing newline). Avoid at all costs! The only time this 472include a trailing newline). Avoid at all costs! The only time this
541The following "macros" deal with changes in rendition sets. You should 541The following "macros" deal with changes in rendition sets. You should
542never just create a bitset, you should always modify an existing one, 542never just create a bitset, you should always modify an existing one,
543as they contain important information required for correct operation of 543as they contain important information required for correct operation of
544rxvt-unicode. 544rxvt-unicode.
545 545
546=over 4 546=over
547 547
548=item $rend = urxvt::DEFAULT_RSTYLE 548=item $rend = urxvt::DEFAULT_RSTYLE
549 549
550Returns the default rendition, as used when the terminal is starting up or 550Returns the default rendition, as used when the terminal is starting up or
551being reset. Useful as a base to start when creating renditions. 551being reset. Useful as a base to start when creating renditions.
858 858
859The methods (And data members) documented below can be called on extension 859The methods (And data members) documented below can be called on extension
860objects, in addition to call methods documented for the <urxvt::term> 860objects, in addition to call methods documented for the <urxvt::term>
861class. 861class.
862 862
863=over 4 863=over
864 864
865=item $urxvt_term = $self->{term} 865=item $urxvt_term = $self->{term}
866 866
867Returns the C<urxvt::term> object associated with this instance of the 867Returns the C<urxvt::term> object associated with this instance of the
868extension. This member I<must not> be changed in any way. 868extension. This member I<must not> be changed in any way.
1109 1109
1110package urxvt::term; 1110package urxvt::term;
1111 1111
1112=head2 The C<urxvt::term> Class 1112=head2 The C<urxvt::term> Class
1113 1113
1114=over 4 1114=over
1115 1115
1116=cut 1116=cut
1117 1117
1118# find on_xxx subs in the package and register them 1118# find on_xxx subs in the package and register them
1119# as hooks 1119# as hooks
1477This method returns an urxvt::overlay object. The overlay will be visible 1477This method returns an urxvt::overlay object. The overlay will be visible
1478as long as the perl object is referenced. 1478as long as the perl object is referenced.
1479 1479
1480The methods currently supported on C<urxvt::overlay> objects are: 1480The methods currently supported on C<urxvt::overlay> objects are:
1481 1481
1482=over 4 1482=over
1483 1483
1484=item $overlay->set ($x, $y, $text[, $rend]) 1484=item $overlay->set ($x, $y, $text[, $rend])
1485 1485
1486Similar to C<< $term->ROW_t >> and C<< $term->ROW_r >> in that it puts 1486Similar to C<< $term->ROW_t >> and C<< $term->ROW_r >> in that it puts
1487text in rxvt-unicode's special encoding and an array of rendition values 1487text in rxvt-unicode's special encoding and an array of rendition values
1793 1793
1794Create and return a new C<urxvt::line> object that stores information 1794Create and return a new C<urxvt::line> object that stores information
1795about the logical line that row C<$row_number> is part of. It supports the 1795about the logical line that row C<$row_number> is part of. It supports the
1796following methods: 1796following methods:
1797 1797
1798=over 4 1798=over
1799 1799
1800=item $text = $line->t ([$new_text]) 1800=item $text = $line->t ([$new_text])
1801 1801
1802Returns or replaces the full text of the line, similar to C<ROW_t> 1802Returns or replaces the full text of the line, similar to C<ROW_t>
1803 1803
1983 1983
1984package urxvt::popup; 1984package urxvt::popup;
1985 1985
1986=head2 The C<urxvt::popup> Class 1986=head2 The C<urxvt::popup> Class
1987 1987
1988=over 4 1988=over
1989 1989
1990=cut 1990=cut
1991 1991
1992sub add_item { 1992sub add_item {
1993 my ($self, $item) = @_; 1993 my ($self, $item) = @_;
2129 ->cb (sub { 2129 ->cb (sub {
2130 $term->{overlay}->set (0, 0, 2130 $term->{overlay}->set (0, 0,
2131 sprintf "%2d:%02d:%02d", (localtime urxvt::NOW)[2,1,0]); 2131 sprintf "%2d:%02d:%02d", (localtime urxvt::NOW)[2,1,0]);
2132 }); 2132 });
2133 2133
2134=over 4 2134=over
2135 2135
2136=item $timer = new urxvt::timer 2136=item $timer = new urxvt::timer
2137 2137
2138Create a new timer object in started state. It is scheduled to fire 2138Create a new timer object in started state. It is scheduled to fire
2139immediately. 2139immediately.
2188 sysread $term->{socket}, my $buf, 8192 2188 sysread $term->{socket}, my $buf, 8192
2189 or end-of-file; 2189 or end-of-file;
2190 }); 2190 });
2191 2191
2192 2192
2193=over 4 2193=over
2194 2194
2195=item $iow = new urxvt::iow 2195=item $iow = new urxvt::iow
2196 2196
2197Create a new io watcher object in stopped state. 2197Create a new io watcher object in stopped state.
2198 2198
2225 2225
2226This class implements idle watchers, that get called automatically when 2226This class implements idle watchers, that get called automatically when
2227the process is idle. They should return as fast as possible, after doing 2227the process is idle. They should return as fast as possible, after doing
2228some useful work. 2228some useful work.
2229 2229
2230=over 4 2230=over
2231 2231
2232=item $iw = new urxvt::iw 2232=item $iw = new urxvt::iw
2233 2233
2234Create a new idle watcher object in stopped state. 2234Create a new idle watcher object in stopped state.
2235 2235
2260 ->cb (sub { 2260 ->cb (sub {
2261 my ($pw, $exit_status) = @_; 2261 my ($pw, $exit_status) = @_;
2262 ... 2262 ...
2263 }); 2263 });
2264 2264
2265=over 4 2265=over
2266 2266
2267=item $pw = new urxvt::pw 2267=item $pw = new urxvt::pw
2268 2268
2269Create a new process watcher in stopped state. 2269Create a new process watcher in stopped state.
2270 2270
2287=head2 URXVT_PERL_VERBOSITY 2287=head2 URXVT_PERL_VERBOSITY
2288 2288
2289This variable controls the verbosity level of the perl extension. Higher 2289This variable controls the verbosity level of the perl extension. Higher
2290numbers indicate more verbose output. 2290numbers indicate more verbose output.
2291 2291
2292=over 4 2292=over
2293 2293
2294=item == 0 - fatal messages 2294=item == 0 - fatal messages
2295 2295
2296=item >= 3 - script loading and management 2296=item >= 3 - script loading and management
2297 2297

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines