*** empty log message ***
authorroot <root>
Fri, 10 Oct 2008 00:21:15 +0000 (00:21 +0000)
committerroot <root>
Fri, 10 Oct 2008 00:21:15 +0000 (00:21 +0000)
src/perl/overlay-osc
src/urxvt.pm

index 88918f1e1622cf5bc69e6be603457c6885fd7352..aee671f477405c9a7cc5d246f00771e2aaacd32d 100644 (file)
@@ -3,15 +3,19 @@
 # allows programs to open popups
 # printf "\033]777;overlay;action;args\007"
 #
-# action "simple;<id>;<x>;<y>;<h|t>;<text>"
+# action "simple;<id>;<timeout>;<x>;<y>;<h|t>;<text>"
 #   printf "\033]777;overlay;simple;ov1;0;0;t;test\007"
 #
-## action "complex;<id>;<x>;<y>;<w>;<h>;<rstyle>;<border>;<h|t>;<text>"
 
 # action "timeout;<id>;<seconds>"
 #   printf "\033]777;overlay;timeout;ov1;6\007"
 
 # action "destroy;<id>"
+#   printf "\033]777;overlay;destroy;ov1\007"
+
+# TODO:
+## action "complex;<id>;<timeout>;<x>;<y>;<width>;<height>;<rstyle>;<border>"
+## action "set;<id>;<x>;<y>;<h|t>;<hextext>;<rendition...>"
 
 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};
             }),
index 75d8e7fdff9766ef22679043c110acbeea3564e2..1b149b5060dc77c1c4c3d9e4940cf8be237874dc 100644 (file)
@@ -1388,12 +1388,14 @@ The methods currently supported on C<urxvt::overlay> 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.