--- rxvt-unicode/doc/rxvtperl.3.html 2006/01/03 04:20:37 1.8 +++ rxvt-unicode/doc/rxvtperl.3.html 2006/01/04 21:37:55 1.13 @@ -20,6 +20,7 @@
  • Prepackaged Extensions
  • General API Considerations
  • Hooks
  • +
  • Variables in the urxvt Package
  • Functions in the urxvt Package
  • RENDITION
  • The urxvt::term Class
  • @@ -80,7 +81,13 @@
    selection
    -Miscellaneous selection modifications. +Intelligent selection. This extension tries to be more intelligent when +the user extends selections (double-click). Right now, it tries to select +urls and complete shell-quoted arguments, which is very convenient, too, +if your ls supports --quoting-style=shell. +
    +
    +

    It also offers the following bindable event:

    rot13
    @@ -113,7 +120,7 @@

    All objects (such as terminals, time watchers etc.) are typical reference-to-hash objects. The hash can be used to store anything you like. All members starting with an underscore (such as _ptr or -_hook) are reserved for internal uses and must not be accessed or +_hook) are reserved for internal uses and MUST NOT be accessed or modified).

    When objects are destroyed on the C++ side, the perl object hashes are emptied, so its best to store related objects such as time watchers and @@ -122,8 +129,13 @@

    Hooks

    -

    The following subroutines can be declared in loaded scripts, and will be called -whenever the relevant event happens.

    +

    The following subroutines can be declared in loaded scripts, and will be +called whenever the relevant event happens.

    +

    The first argument passed to them is an object private to each terminal +and extension package. You can call all urxvt::term methods on it, but +its not a real urxvt::term object. Instead, the real urxvt::term +object that is shared between all packages is stored in the term +member.

    All of them must return a boolean value. If it is true, then the event counts as being consumed, and the invocation of other hooks is skipped, and the relevant action might not be carried out by the C++ code.

    @@ -174,6 +186,18 @@

    Returning a true value aborts selection grabbing. It will still be hilighted.

    +
    on_sel_extend $term
    +
    +
    +Called whenever the user tries to extend the selection (e.g. with a double +click) and is either supposed to return false (normal operation), or +should extend the selection itelf and return true to suppress the built-in +processing. +
    +
    +

    See the selection example extension.

    +
    +

    on_focus_in $term
    @@ -215,6 +239,22 @@ Called whenever the program(s) running in the urxvt window send output.

    +
    on_osc_seq $term, $string
    +
    +
    +Called whenever the ESC ] 777 ; string ST command sequence (OSC = +operating system command) is processed. Cursor position and other state +information is up-to-date when this happens. For interoperability, the +string should start with the extension name and a colon, to distinguish +it from commands for other extensions, and this might be enforced in the +future. +
    +
    +

    Be careful not ever to trust (in a security sense) the data you receive, +as its source can not easily be controleld (e-mail content, messages from +other users on the same system etc.).

    +
    +

    on_refresh_begin $term
    @@ -240,6 +280,17 @@

    +

    Variables in the urxvt Package

    +
    +
    $urxvt::TERM
    +
    +
    +The current terminal. Whenever a callback/Hook is bein executed, this +variable stores the current urxvt::term object. +
    +

    +

    +

    Functions in the urxvt Package

    urxvt::fatal $errormessage
    @@ -367,7 +418,7 @@ display_name embed ext_bwidth fade font geometry hold iconName imFont imLocale inputMethod insecure int_bwidth intensityStyles italicFont jumpScroll lineSpace loginShell mapAlert menu meta8 modifier - mouseWheelScrollPage name pastableTabs path perl_eval perl_ext + mouseWheelScrollPage name pastableTabs path perl_eval perl_ext_1 perl_ext_2 perl_lib pointerBlank pointerBlankDelay preeditType print_pipe pty_fd reverseVideo saveLines scrollBar scrollBar_align scrollBar_floating scrollBar_right scrollBar_thickness scrollTtyKeypress scrollTtyOutput @@ -376,6 +427,20 @@ utmpInhibit visualBell

    +
    $rend = $term->screen_rstyle ([$new_rstyle])
    +
    +
    +Return and optionally change the current rendition. Text thta is output by +the temrianl application will use this style. +
    +

    +
    ($row, $col) = $term->screen_cur ([$row, $col])
    +
    +
    +Return the current coordinates of the text cursor position and optionally +set it (which is usually bad as applications don't expect that). +
    +

    ($row, $col) = $term->selection_mark ([$row, $col])
    ($row, $col) = $term->selection_beg ([$row, $col])
    @@ -449,9 +514,9 @@ as long as the perl object is referenced.

    -

    Currently, the only method on the urxvt::overlay object is set:

    +

    The methods currently supported on urxvt::overlay objects are:

    -

    +
    $overlay->set ($x, $y, $text, $rend)
    @@ -460,6 +525,18 @@ at a specific position inside the overlay.

    +
    $overlay->hide
    +
    +
    +If visible, hide the overlay, but do not destroy it. +
    +

    +
    $overlay->show
    +
    +
    +If hidden, display the overlay again. +
    +

    $cellwidth = $term->strwidth $string
    @@ -487,19 +564,32 @@ to the locale-specific encoding using $term->locale_encode.

    -
    $nrow = $term->nrow
    +
    $window_width = $term->width
    -
    $ncol = $term->ncol
    +
    $window_height = $term->height
    -
    -Return the number of rows/columns of the terminal window (i.e. as -specified by -geometry, excluding any scrollback). -
    -

    -
    $nsaved = $term->nsaved
    +
    $font_width = $term->fwidth
    +
    +
    $font_height = $term->fheight
    +
    +
    $font_ascent = $term->fbase
    +
    +
    $terminal_rows = $term->nrow
    +
    +
    $terminal_columns = $term->ncol
    +
    +
    $has_focus = $term->focus
    +
    +
    $is_mapped = $term->mapped
    +
    +
    $max_scrollback = $term->saveLines
    +
    +
    $nrow_plus_saveLines = $term->total_rows
    +
    +
    $lines_in_scrollback = $term->nsaved
    -Returns the number of lines in the scrollback buffer. +Return various integers describing terminal characteristics.

    $view_start = $term->view_start ([$newvalue])
    @@ -527,7 +617,8 @@ Returns the text of the entire row with number $row_number. Row 0 is the topmost terminal line, row $term->$ncol-1 is the bottommost terminal line. The scrollback buffer starts at line -1 and extends to -line -$term->nsaved. +line -$term->nsaved. Nothing will be returned if a nonexistent line +is requested.

    If $new_text is specified, it will replace characters in the current @@ -548,7 +639,7 @@ characters.

    -

    The methods $term->special_encode and $term->special_decode +

    The methods $term->special_encode and $term->special_decode can be used to convert normal strings into this encoding and vice versa.

    @@ -569,12 +660,69 @@
    $length = $term->ROW_l ($row_number[, $new_length])
    -Returns the number of screen cells that are in use (``the line length''). If -it is -1, then the line is part of a multiple-row logical ``line'', which -means all characters are in use and it is continued on the next row. +Returns the number of screen cells that are in use (``the line +length''). Unlike the urxvt core, this returns $term->ncol if the +line is joined with the following one. +
    +

    +
    $bool = $term->is_longer ($row_number)
    +
    +
    +Returns true if the row is part of a multiple-row logical ``line'' (i.e. +joined with the following row), which means all characters are in use +and it is continued on the next row (and possibly a continuation of the +previous row(s)). +
    +

    +
    $line = $term->line ($row_number)
    +
    +
    +Create and return a new urxvt::line object that stores information +about the logical line that row $row_number is part of. It supports the +following methods: +
    +
    +
    $text = $line->t
    +
    +
    +Returns the full text of the line, similar to ROW_t +
    +

    +
    $rend = $line->r
    +
    +
    +Returns the full rendition array of the line, similar to ROW_r +
    +

    +
    $length = $line->l
    +
    +
    +Returns the length of the line in cells, similar to ROW_l. +
    +

    +
    $rownum = $line->beg
    +
    +
    $rownum = $line->end
    +
    +
    +Return the row number of the first/last row of the line, respectively. +
    +

    +
    $offset = $line->offset_of ($row, $col)
    +
    +
    +Returns the character offset of the given row|col pair within the logical +line.

    -
    $text = $term->special_encode $string
    +
    ($row, $col) = $line->coord_of ($offset)
    +
    +
    +Translates a string offset into terminal coordinates again. +
    +

    +
    ($row, $col) = $line->coord_of ($offset) +=item $text = $term->special_encode $string
    Converts a perl string into the special encoding used by rxvt-unicode, @@ -720,14 +868,14 @@

    URXVT_PERL_VERBOSITY

    This variable controls the verbosity level of the perl extension. Higher numbers indicate more verbose output.

    -
      -
    1. - only fatal messages
      -
    2. -
    3. - script loading and management
      -
    4. -
    5. - all events received
      -
    6. -
    +
    +
    =0 - only fatal messages
    +
    +
    =3 - script loading and management
    +
    +
    =10 - all events received
    +
    +