--- rxvt-unicode/src/urxvt.pm 2009/07/18 06:11:57 1.177 +++ rxvt-unicode/src/urxvt.pm 2009/12/26 09:42:16 1.180 @@ -1126,7 +1126,7 @@ =cut -our $VERSION = '3.4'; +our $VERSION = '5.23'; $INC{"urxvt/anyevent.pm"} = 1; # mark us as there push @AnyEvent::REGISTRY, [urxvt => urxvt::anyevent::]; @@ -1138,11 +1138,8 @@ urxvt::timer ->new - ->after ($arg{after}) - ->interval ($arg{interval}) - ->start - ->cb (sub { - #TODO interval? + ->after ($arg{after}, $arg{interval}) + ->cb ($arg{interval} ? $cb : sub { $_[0]->stop; # need to cancel manually $cb->(); }) @@ -1173,11 +1170,7 @@ urxvt::iw ->new ->start - ->cb (sub { - #TODO really cancel? - $_[0]->stop; # need to cancel manually - $cb->(); - }) + ->cb ($cb) } sub child { @@ -1189,7 +1182,6 @@ ->new ->start ($arg{pid}) ->cb (sub { - #TODO really cancel? $_[0]->stop; # need to cancel manually $cb->($_[0]->rpid, $_[0]->rstatus); }) @@ -1382,8 +1374,15 @@ =item ($row, $col) = $term->selection_end ([$row, $col]) -Return the current values of the selection mark, begin or end positions, -and optionally set them to new values. +Return the current values of the selection mark, begin or end positions. + +When arguments are given, then the selection coordinates are set to +C<$row> and C<$col>, and the selection screen is set to the current +screen. + +=item $screen = $term->selection_screen ([$screen]) + +Returns the current selection screen, and then optionally sets it. =item $term->selection_make ($eventtime[, $rectangular]) @@ -2063,17 +2062,14 @@ Set the callback to be called when the timer triggers. -=item $tstamp = $timer->at - -Return the time this watcher will fire next. - -=item $timer = $timer->set ($tstamp) +=item $timer = $timer->set ($tstamp[, $interval]) -Set the time the event is generated to $tstamp. +Set the time the event is generated to $tstamp (and optionally specifies a +new $interval). =item $timer = $timer->interval ($interval) -Normally (and when C<$interval> is C<0>), the timer will automatically +By default (and when C<$interval> is C<0>), the timer will automatically stop after it has fired once. If C<$interval> is non-zero, then the timer is automatically rescheduled at the given intervals. @@ -2081,11 +2077,12 @@ Start the timer. -=item $timer = $timer->start ($tstamp) +=item $timer = $timer->start ($tstamp[, $interval]) -Set the event trigger time to C<$tstamp> and start the timer. +Set the event trigger time to C<$tstamp> and start the timer. Optionally +also replaces the interval. -=item $timer = $timer->after ($delay) +=item $timer = $timer->after ($delay[, $interval]) Like C, but sets the expiry timer to c.