From: root Date: Fri, 10 Oct 2008 00:21:15 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=fff0184f5894cd4d96e87336dfc3af9c19943dc5;p=dana%2Furxvt.git *** empty log message *** --- diff --git a/src/perl/overlay-osc b/src/perl/overlay-osc index 88918f1e..aee671f4 100644 --- a/src/perl/overlay-osc +++ b/src/perl/overlay-osc @@ -3,15 +3,19 @@ # allows programs to open popups # printf "\033]777;overlay;action;args\007" # -# action "simple;;;;;" +# action "simple;;;;;;" # printf "\033]777;overlay;simple;ov1;0;0;t;test\007" # -## action "complex;;;;;;;;;" # action "timeout;;" # printf "\033]777;overlay;timeout;ov1;6\007" # action "destroy;" +# printf "\033]777;overlay;destroy;ov1\007" + +# TODO: +## action "complex;;;;;;;;" +## action "set;;;;;;" sub on_osc_seq_perl { my ($self, $osc, $resp) = @_; @@ -32,7 +36,7 @@ sub on_osc_seq_perl { } } elsif ($1 eq "simple") { - my ($id, $x, $y, $t, $txt) = split /;/, $osc, 5; + my ($id, $to, $x, $y, $t, $txt) = split /;/, $osc, 6; if ($t eq "h") { $txt = pack "H*", $txt; utf8::decode $txt; @@ -41,7 +45,7 @@ sub on_osc_seq_perl { ov => $self->overlay_simple ($x, $y, $txt), to => urxvt::timer ->new - ->start (urxvt::NOW + 60) + ->start (urxvt::NOW + $to) ->cb(sub { delete $self->{ov}{$id}; }), diff --git a/src/urxvt.pm b/src/urxvt.pm index 75d8e7fd..1b149b50 100644 --- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -1388,12 +1388,14 @@ The methods currently supported on C objects are: =over 4 -=item $overlay->set ($x, $y, $text, $rend) +=item $overlay->set ($x, $y, $text[, $rend]) Similar to C<< $term->ROW_t >> and C<< $term->ROW_r >> in that it puts text in rxvt-unicode's special encoding and an array of rendition values at a specific position inside the overlay. +If C<$rend> is missing, then the rendition will not be changed. + =item $overlay->hide If visible, hide the overlay, but do not destroy it.