… | |
… | |
271 | |
271 | |
272 | =item on_button_release $term, $event |
272 | =item on_button_release $term, $event |
273 | |
273 | |
274 | =item on_motion_notify $term, $event |
274 | =item on_motion_notify $term, $event |
275 | |
275 | |
276 | Called whenever the corresponding X event is received for the terminal |
276 | Called whenever the corresponding X event is received for the terminal If |
277 | (see the XEvent manpage) If the hook returns true, then the even will be |
277 | the hook returns true, then the even will be ignored by rxvt-unicode. |
278 | 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. |
279 | |
282 | |
280 | C<on_key_press> additionally receives the string rxvt-unicode would |
283 | C<on_key_press> additionally receives the string rxvt-unicode would |
281 | output, if any, in locale-specific encoding. |
284 | output, if any, in locale-specific encoding. |
282 | |
285 | |
283 | subwindow. |
286 | subwindow. |
… | |
… | |
462 | my $htype = shift; |
465 | my $htype = shift; |
463 | |
466 | |
464 | if ($htype == 0) { # INIT |
467 | if ($htype == 0) { # INIT |
465 | my @dirs = ((split /:/, $TERM->resource ("perl_lib")), "$LIBDIR/perl"); |
468 | my @dirs = ((split /:/, $TERM->resource ("perl_lib")), "$LIBDIR/perl"); |
466 | |
469 | |
467 | for my $ext (map { split /:/, $TERM->resource ("perl_ext_$_") } 1, 2) { |
470 | for my $ext (map { split /,/, $TERM->resource ("perl_ext_$_") } 1, 2) { |
468 | my @files = grep -f $_, map "$_/$ext", @dirs; |
471 | my @files = grep -f $_, map "$_/$ext", @dirs; |
469 | |
472 | |
470 | if (@files) { |
473 | if (@files) { |
471 | register_package script_package $files[0]; |
474 | register_package script_package $files[0]; |
472 | } else { |
475 | } else { |
… | |
… | |
660 | |
663 | |
661 | If hidden, display the overlay again. |
664 | If hidden, display the overlay again. |
662 | |
665 | |
663 | =back |
666 | =back |
664 | |
667 | |
665 | =item $cellwidth = $term->strwidth $string |
668 | =item $cellwidth = $term->strwidth ($string) |
666 | |
669 | |
667 | Returns the number of screen-cells this string would need. Correctly |
670 | Returns the number of screen-cells this string would need. Correctly |
668 | accounts for wide and combining characters. |
671 | accounts for wide and combining characters. |
669 | |
672 | |
670 | =item $octets = $term->locale_encode $string |
673 | =item $octets = $term->locale_encode ($string) |
671 | |
674 | |
672 | Convert the given text string into the corresponding locale encoding. |
675 | Convert the given text string into the corresponding locale encoding. |
673 | |
676 | |
674 | =item $string = $term->locale_decode $octets |
677 | =item $string = $term->locale_decode ($octets) |
675 | |
678 | |
676 | Convert the given locale-encoded octets into a perl string. |
679 | Convert the given locale-encoded octets into a perl string. |
677 | |
680 | |
678 | =item $term->scr_add_lines ($string) |
681 | =item $term->scr_add_lines ($string) |
679 | |
682 | |
… | |
… | |
695 | =item $term->tt_write ($octets) |
698 | =item $term->tt_write ($octets) |
696 | |
699 | |
697 | 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 |
698 | pass characters instead of octets, you should convert your strings first |
701 | pass characters instead of octets, you should convert your strings first |
699 | 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. |
700 | |
711 | |
701 | =item $window_width = $term->width |
712 | =item $window_width = $term->width |
702 | |
713 | |
703 | =item $window_height = $term->height |
714 | =item $window_height = $term->height |
704 | |
715 | |