… | |
… | |
70 | terminal is destroyed. |
70 | terminal is destroyed. |
71 | |
71 | |
72 | Argument names also often indicate the type of a parameter. Here are some |
72 | Argument names also often indicate the type of a parameter. Here are some |
73 | hints on what they mean: |
73 | hints on what they mean: |
74 | |
74 | |
75 | =over 4 |
75 | =over |
76 | |
76 | |
77 | =item $text |
77 | =item $text |
78 | |
78 | |
79 | Rxvt-unicode's special way of encoding text, where one "unicode" character |
79 | Rxvt-unicode's special way of encoding text, where one "unicode" character |
80 | always represents one screen cell. See L<ROW_t> for a discussion of this format. |
80 | always represents one screen cell. See L<ROW_t> for a discussion of this format. |
… | |
… | |
121 | terminal is created and are typically used to autoload extensions when |
121 | terminal is created and are typically used to autoload extensions when |
122 | their resources or command line parameters are used. |
122 | their resources or command line parameters are used. |
123 | |
123 | |
124 | Currently, it recognises only one such comment: |
124 | Currently, 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 | |
130 | The RESOURCE comment defines a resource used by the extension, where |
130 | The RESOURCE comment defines a resource used by the extension, where |
131 | C<name> is the resource name, C<type> is the resource type, C<boolean> |
131 | C<name> is the resource name, C<type> is the resource type, C<boolean> |
… | |
… | |
148 | hooks returns true, then the event counts as being I<consumed>, and the |
148 | hooks returns true, then the event counts as being I<consumed>, and the |
149 | relevant action might not be carried out by the C++ code. |
149 | relevant action might not be carried out by the C++ code. |
150 | |
150 | |
151 | I<< When in doubt, return a false value (preferably C<()>). >> |
151 | I<< 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 | |
157 | Called after a new terminal object has been initialized, but before |
157 | Called after a new terminal object has been initialized, but before |
158 | windows are created or the command gets run. Most methods are unsafe to |
158 | windows are created or the command gets run. Most methods are unsafe to |
… | |
… | |
422 | |
422 | |
423 | our $NOCHAR = chr 0xffff; |
423 | our $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 | |
431 | The rxvt-unicode library directory, where, among other things, the perl |
431 | The rxvt-unicode library directory, where, among other things, the perl |
432 | modules and scripts are stored. |
432 | modules 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 | |
471 | Fatally aborts execution with the given error message (which should |
471 | Fatally aborts execution with the given error message (which should |
472 | include a trailing newline). Avoid at all costs! The only time this |
472 | include a trailing newline). Avoid at all costs! The only time this |
… | |
… | |
541 | The following "macros" deal with changes in rendition sets. You should |
541 | The following "macros" deal with changes in rendition sets. You should |
542 | never just create a bitset, you should always modify an existing one, |
542 | never just create a bitset, you should always modify an existing one, |
543 | as they contain important information required for correct operation of |
543 | as they contain important information required for correct operation of |
544 | rxvt-unicode. |
544 | rxvt-unicode. |
545 | |
545 | |
546 | =over 4 |
546 | =over |
547 | |
547 | |
548 | =item $rend = urxvt::DEFAULT_RSTYLE |
548 | =item $rend = urxvt::DEFAULT_RSTYLE |
549 | |
549 | |
550 | Returns the default rendition, as used when the terminal is starting up or |
550 | Returns the default rendition, as used when the terminal is starting up or |
551 | being reset. Useful as a base to start when creating renditions. |
551 | being reset. Useful as a base to start when creating renditions. |
… | |
… | |
858 | |
858 | |
859 | The methods (And data members) documented below can be called on extension |
859 | The methods (And data members) documented below can be called on extension |
860 | objects, in addition to call methods documented for the <urxvt::term> |
860 | objects, in addition to call methods documented for the <urxvt::term> |
861 | class. |
861 | class. |
862 | |
862 | |
863 | =over 4 |
863 | =over |
864 | |
864 | |
865 | =item $urxvt_term = $self->{term} |
865 | =item $urxvt_term = $self->{term} |
866 | |
866 | |
867 | Returns the C<urxvt::term> object associated with this instance of the |
867 | Returns the C<urxvt::term> object associated with this instance of the |
868 | extension. This member I<must not> be changed in any way. |
868 | extension. This member I<must not> be changed in any way. |
… | |
… | |
1109 | |
1109 | |
1110 | package urxvt::term; |
1110 | package 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 |
… | |
… | |
1477 | This method returns an urxvt::overlay object. The overlay will be visible |
1477 | This method returns an urxvt::overlay object. The overlay will be visible |
1478 | as long as the perl object is referenced. |
1478 | as long as the perl object is referenced. |
1479 | |
1479 | |
1480 | The methods currently supported on C<urxvt::overlay> objects are: |
1480 | The 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 | |
1486 | Similar to C<< $term->ROW_t >> and C<< $term->ROW_r >> in that it puts |
1486 | Similar to C<< $term->ROW_t >> and C<< $term->ROW_r >> in that it puts |
1487 | text in rxvt-unicode's special encoding and an array of rendition values |
1487 | text in rxvt-unicode's special encoding and an array of rendition values |
… | |
… | |
1793 | |
1793 | |
1794 | Create and return a new C<urxvt::line> object that stores information |
1794 | Create and return a new C<urxvt::line> object that stores information |
1795 | about the logical line that row C<$row_number> is part of. It supports the |
1795 | about the logical line that row C<$row_number> is part of. It supports the |
1796 | following methods: |
1796 | following 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 | |
1802 | Returns or replaces the full text of the line, similar to C<ROW_t> |
1802 | Returns or replaces the full text of the line, similar to C<ROW_t> |
1803 | |
1803 | |
… | |
… | |
1983 | |
1983 | |
1984 | package urxvt::popup; |
1984 | package 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 | |
1992 | sub add_item { |
1992 | sub 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 | |
2138 | Create a new timer object in started state. It is scheduled to fire |
2138 | Create a new timer object in started state. It is scheduled to fire |
2139 | immediately. |
2139 | immediately. |
… | |
… | |
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 | |
2197 | Create a new io watcher object in stopped state. |
2197 | Create a new io watcher object in stopped state. |
2198 | |
2198 | |
… | |
… | |
2225 | |
2225 | |
2226 | This class implements idle watchers, that get called automatically when |
2226 | This class implements idle watchers, that get called automatically when |
2227 | the process is idle. They should return as fast as possible, after doing |
2227 | the process is idle. They should return as fast as possible, after doing |
2228 | some useful work. |
2228 | some 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 | |
2234 | Create a new idle watcher object in stopped state. |
2234 | Create 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 | |
2269 | Create a new process watcher in stopped state. |
2269 | Create a new process watcher in stopped state. |
2270 | |
2270 | |
… | |
… | |
2287 | =head2 URXVT_PERL_VERBOSITY |
2287 | =head2 URXVT_PERL_VERBOSITY |
2288 | |
2288 | |
2289 | This variable controls the verbosity level of the perl extension. Higher |
2289 | This variable controls the verbosity level of the perl extension. Higher |
2290 | numbers indicate more verbose output. |
2290 | numbers 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 | |