… | |
… | |
260 | =item on_keyboard_command $term, $string |
260 | =item on_keyboard_command $term, $string |
261 | |
261 | |
262 | Called whenever the user presses a key combination that has a |
262 | Called whenever the user presses a key combination that has a |
263 | C<perl:string> action bound to it (see description of the B<keysym> |
263 | C<perl:string> action bound to it (see description of the B<keysym> |
264 | resource in the @@RXVT_NAME@@(1) manpage). |
264 | resource in the @@RXVT_NAME@@(1) manpage). |
|
|
265 | |
|
|
266 | =item on_key_press $term, $event, $octets |
|
|
267 | |
|
|
268 | =item on_key_release $term, $event |
|
|
269 | |
|
|
270 | =item on_button_press $term, $event |
|
|
271 | |
|
|
272 | =item on_button_release $term, $event |
|
|
273 | |
|
|
274 | =item on_motion_notify $term, $event |
|
|
275 | |
|
|
276 | Called whenever the corresponding X event is received for the terminal If |
|
|
277 | the hook returns true, then the even will be ignored by rxvt-unicode. |
|
|
278 | |
|
|
279 | The event is a hash with most values as named by Xlib (see the XEvent |
|
|
280 | manpage), with the additional members C<row> and C<col>, which are the row |
|
|
281 | and column under the mouse cursor. |
|
|
282 | |
|
|
283 | C<on_key_press> additionally receives the string rxvt-unicode would |
|
|
284 | output, if any, in locale-specific encoding. |
|
|
285 | |
|
|
286 | subwindow. |
265 | |
287 | |
266 | =back |
288 | =back |
267 | |
289 | |
268 | =head2 Variables in the C<urxvt> Package |
290 | =head2 Variables in the C<urxvt> Package |
269 | |
291 | |
… | |
… | |
443 | my $htype = shift; |
465 | my $htype = shift; |
444 | |
466 | |
445 | if ($htype == 0) { # INIT |
467 | if ($htype == 0) { # INIT |
446 | my @dirs = ((split /:/, $TERM->resource ("perl_lib")), "$LIBDIR/perl"); |
468 | my @dirs = ((split /:/, $TERM->resource ("perl_lib")), "$LIBDIR/perl"); |
447 | |
469 | |
448 | for my $ext (map { split /:/, $TERM->resource ("perl_ext_$_") } 1, 2) { |
470 | for my $ext (map { split /,/, $TERM->resource ("perl_ext_$_") } 1, 2) { |
449 | my @files = grep -f $_, map "$_/$ext", @dirs; |
471 | my @files = grep -f $_, map "$_/$ext", @dirs; |
450 | |
472 | |
451 | if (@files) { |
473 | if (@files) { |
452 | register_package script_package $files[0]; |
474 | register_package script_package $files[0]; |
453 | } else { |
475 | } else { |
… | |
… | |
641 | |
663 | |
642 | If hidden, display the overlay again. |
664 | If hidden, display the overlay again. |
643 | |
665 | |
644 | =back |
666 | =back |
645 | |
667 | |
646 | =item $cellwidth = $term->strwidth $string |
668 | =item $cellwidth = $term->strwidth ($string) |
647 | |
669 | |
648 | Returns the number of screen-cells this string would need. Correctly |
670 | Returns the number of screen-cells this string would need. Correctly |
649 | accounts for wide and combining characters. |
671 | accounts for wide and combining characters. |
650 | |
672 | |
651 | =item $octets = $term->locale_encode $string |
673 | =item $octets = $term->locale_encode ($string) |
652 | |
674 | |
653 | Convert the given text string into the corresponding locale encoding. |
675 | Convert the given text string into the corresponding locale encoding. |
654 | |
676 | |
655 | =item $string = $term->locale_decode $octets |
677 | =item $string = $term->locale_decode ($octets) |
656 | |
678 | |
657 | Convert the given locale-encoded octets into a perl string. |
679 | Convert the given locale-encoded octets into a perl string. |
658 | |
680 | |
659 | =item $term->scr_add_lines ($string) |
681 | =item $term->scr_add_lines ($string) |
660 | |
682 | |
… | |
… | |
676 | =item $term->tt_write ($octets) |
698 | =item $term->tt_write ($octets) |
677 | |
699 | |
678 | Write the octets given in C<$data> to the tty (i.e. as program input). To |
700 | Write the octets given in C<$data> to the tty (i.e. as program input). To |
679 | pass characters instead of octets, you should convert your strings first |
701 | pass characters instead of octets, you should convert your strings first |
680 | to the locale-specific encoding using C<< $term->locale_encode >>. |
702 | to the locale-specific encoding using C<< $term->locale_encode >>. |
|
|
703 | |
|
|
704 | =item $windowid = $term->parent |
|
|
705 | |
|
|
706 | Return the window id of the toplevel window. |
|
|
707 | |
|
|
708 | =item $windowid = $term->vt |
|
|
709 | |
|
|
710 | Return the window id of the terminal window. |
681 | |
711 | |
682 | =item $window_width = $term->width |
712 | =item $window_width = $term->width |
683 | |
713 | |
684 | =item $window_height = $term->height |
714 | =item $window_height = $term->height |
685 | |
715 | |