--- rxvt-unicode/src/urxvt.pm 2006/01/06 03:40:19 1.37 +++ rxvt-unicode/src/urxvt.pm 2006/01/07 04:19:43 1.43 @@ -64,7 +64,13 @@ =item mark-urls -Uses per-line filtering (C) to underline urls. +Uses per-line display filtering (C) to underline urls. + +=item block-graphics-to-ascii + +A not very useful example of filtering all text output to the terminal, +by replacing all line-drawing characters (U+2500 .. U+259F) by a +similar-looking ascii character. =item example-refresh-hooks @@ -72,13 +78,6 @@ window. Illustrates overwriting the refresh callbacks to create your own overlays or changes. -=item example-filter-input - -A not very useful example of filtering all text output to the terminal, by -underlining all urls that matches a certain regex (i.e. some urls :). It -is not very useful because urls that are output in multiple steps (e.g. -when typing them) do not get marked. - =back =head2 General API Considerations @@ -119,7 +118,7 @@ =head2 Hooks -The following subroutines can be declared in loaded scripts, and will be +The following subroutines can be declared in extension files, and will be called whenever the relevant event happens. The first argument passed to them is an object private to each terminal @@ -263,7 +262,7 @@ C action bound to it (see description of the B resource in the @@RXVT_NAME@@(1) manpage). -=item on_key_press $term, $event +=item on_key_press $term, $event, $octets =item on_key_release $term, $event @@ -273,9 +272,16 @@ =item on_motion_notify $term, $event -Called whenever the corresponding X event is received for the terminal. If +Called whenever the corresponding X event is received for the terminal If the hook returns true, then the even will be ignored by rxvt-unicode. +The event is a hash with most values as named by Xlib (see the XEvent +manpage), with the additional members C and C, which are the row +and column under the mouse cursor. + +C additionally receives the string rxvt-unicode would +output, if any, in locale-specific encoding. + subwindow. =back @@ -286,8 +292,8 @@ =item $urxvt::TERM -The current terminal. Whenever a callback/Hook is bein executed, this -variable stores the current C object. +The current terminal. This variable stores the current C +object, whenever a callback/hook is executing. =back @@ -460,7 +466,7 @@ if ($htype == 0) { # INIT my @dirs = ((split /:/, $TERM->resource ("perl_lib")), "$LIBDIR/perl"); - for my $ext (map { split /:/, $TERM->resource ("perl_ext_$_") } 1, 2) { + for my $ext (map { split /,/, $TERM->resource ("perl_ext_$_") } 1, 2) { my @files = grep -f $_, map "$_/$ext", @dirs; if (@files) { @@ -658,16 +664,16 @@ =back -=item $cellwidth = $term->strwidth $string +=item $cellwidth = $term->strwidth ($string) Returns the number of screen-cells this string would need. Correctly accounts for wide and combining characters. -=item $octets = $term->locale_encode $string +=item $octets = $term->locale_encode ($string) Convert the given text string into the corresponding locale encoding. -=item $string = $term->locale_decode $octets +=item $string = $term->locale_decode ($octets) Convert the given locale-encoded octets into a perl string. @@ -694,6 +700,14 @@ pass characters instead of octets, you should convert your strings first to the locale-specific encoding using C<< $term->locale_encode >>. +=item $windowid = $term->parent + +Return the window id of the toplevel window. + +=item $windowid = $term->vt + +Return the window id of the terminal window. + =item $window_width = $term->width =item $window_height = $term->height