--- rxvt-unicode/doc/rxvtperl.3.html 2006/01/19 19:26:31 1.33 +++ rxvt-unicode/doc/rxvtperl.3.html 2006/01/20 16:02:20 1.34 @@ -30,6 +30,8 @@
  • The urxvt::popup Class
  • The urxvt::timer Class
  • The urxvt::iow Class
  • +
  • The urxvt::iw Class
  • +
  • The urxvt::pw Class
  • ENVIRONMENT
  • @@ -82,6 +84,9 @@

    You can activate them like this:

       rxvt -pe <extensionname>
    +

    Or by adding them to the resource for extensions loaded by default:

    +
    +  URxvt.perl-ext-common: default,automove-background,selection-autotransform
    selection (enabled by default)
    @@ -243,6 +248,19 @@ the message into vi commands to load the file.

    +
    tabbed
    +
    +
    +This transforms the terminal into a tabbar with additional terminals, that +is, it implements what is commonly refered to as ``tabbed terminal''. The topmost line +displays a ``[NEW]'' button, which, when clicked, will add a new tab, followed by one +button per tab. +
    +
    +

    Clicking a button will activate that tab. Pressing Shift-Left and +Shift-Right will switch to the tab left or right of the current one.

    +
    +

    mark-urls
    @@ -410,9 +428,9 @@ called whenever the relevant event happens.

    The first argument passed to them is an extension oject as described in the in the Extension Objects section.

    -

    All of these hooks 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.

    +

    All of these hooks must return a boolean value. If any of the called +hooks returns true, then the event counts as being consumed, and the +relevant action might not be carried out by the C++ code.

    When in doubt, return a false value (preferably ()). >

    on_init $term
    @@ -421,23 +439,32 @@ Called after a new terminal object has been initialized, but before windows are created or the command gets run. Most methods are unsafe to call or deliver senseless data, as terminal size and other characteristics -have not yet been determined. You can safely query and change resources, -though. +have not yet been determined. You can safely query and change resources +and options, though. For many purposes the on_start hook is a better +place.

    -
    on_reset $term
    +
    on_start $term
    -Called after the screen is ``reset'' for any reason, such as resizing or -control sequences. Here is where you can react on changes to size-related -variables. +Called at the very end of initialisation of a new terminal, just before +trying to map (display) the toplevel and returning to the mainloop.

    -
    on_start $term
    +
    on_destroy $term
    -Called at the very end of initialisation of a new terminal, just before -returning to the mainloop. +Called whenever something tries to destroy terminal, before doing anything +yet. If this hook returns true, then destruction is skipped, but this is +rarely a good idea. +
    +

    +
    on_reset $term
    +
    +
    +Called after the screen is ``reset'' for any reason, such as resizing or +control sequences. Here is where you can react on changes to size-related +variables.

    on_child_start $term, $pid
    @@ -639,6 +666,17 @@

    subwindow.

    +

    +
    on_client_message $term, $event
    +
    +
    on_wm_protocols $term, $event
    +
    +
    on_wm_delete_window $term, $event
    +
    +
    +Called when various types of ClientMessage events are received (all with +format=32, WM_PROTOCOLS or WM_PROTOCOLS:WM_DELETE_WINDOW). +

    @@ -669,6 +707,27 @@ The current terminal. This variable stores the current urxvt::term object, whenever a callback/hook is executing. +

    +
    @urxvt::TERM_INIT
    +
    +
    +All coderefs in this array will be called as methods of the next newly +created urxvt::term object (during the on_init phase). The array +gets cleared before the codereferences that were in it are being executed, +so coderefs can push themselves onto it again if they so desire. +
    +
    +

    This complements to the perl-eval commandline option, but gets executed +first.

    +
    +

    +
    @urxvt::TERM_EXT
    +
    +
    +Works similar to @TERM_INIT, but contains perl package/class names, which +get registered as normal extensions after calling the hooks in @TERM_INIT +but before other extensions. Gets cleared just like @TERM_INIT. +

    @@ -1542,6 +1601,77 @@

    +

    +

    The urxvt::iw Class

    +

    This class implements idle watchers, that get called automatically when +the process is idle. They should return as fast as possible, after doing +some useful work.

    +
    +
    $iw = new urxvt::iw
    +
    +
    +Create a new idle watcher object in stopped state. +
    +

    +
    $iw = $iw->cb (sub { my ($iw) = @_; ... })
    +
    +
    +Set the callback to be called when the watcher triggers. +
    +

    +
    $timer = $timer->start
    +
    +
    +Start the watcher. +
    +

    +
    $timer = $timer->stop
    +
    +
    +Stop the watcher. +
    +

    +

    +

    +

    The urxvt::pw Class

    +

    This class implements process watchers. They create an event whenever a +process exits, after which they stop automatically.

    +
    +   my $pid = fork;
    +   ...
    +   $term->{pw} = urxvt::pw
    +                    ->new
    +                    ->start ($pid)
    +                    ->cb (sub {
    +                       my ($pw, $exit_status) = @_;
    +                       ...
    +                    });
    +
    +
    $pw = new urxvt::pw
    +
    +
    +Create a new process watcher in stopped state. +
    +

    +
    $pw = $pw->cb (sub { my ($pw, $exit_status) = @_; ... })
    +
    +
    +Set the callback to be called when the timer triggers. +
    +

    +
    $pw = $timer->start ($pid)
    +
    +
    +Tells the wqtcher to start watching for process $pid. +
    +

    +
    $pw = $pw->stop
    +
    +
    +Stop the watcher. +
    +

    +


    ENVIRONMENT