*** empty log message ***
authorroot <root>
Tue, 10 Jan 2006 19:46:28 +0000 (19:46 +0000)
committerroot <root>
Tue, 10 Jan 2006 19:46:28 +0000 (19:46 +0000)
doc/rxvtperl.3.html
doc/rxvtperl.3.man.in
doc/rxvtperl.3.txt
src/urxvt.pm

index 03acad9..624de21 100644 (file)
@@ -453,13 +453,34 @@ output, if any, in locale-specific encoding.</p>
 </p>
 <h2><a name="variables_in_the_urxvt_package">Variables in the <code>urxvt</code> Package</a></h2>
 <dl>
+<dt><strong><a name="item__24urxvt_3a_3alibdir">$urxvt::LIBDIR</a></strong><br />
+</dt>
+<dd>
+The rxvt-unicode library directory, where, among other things, the perl
+modules and scripts are stored.
+</dd>
+<p></p>
+<dt><strong><a name="item__24urxvt_3a_3aresclass_2c__24urxvt_3a_3aresclass">$urxvt::RESCLASS, $urxvt::RESCLASS</a></strong><br />
+</dt>
+<dd>
+The resource class and name rxvt-unicode uses to look up X resources.
+</dd>
+<p></p>
+<dt><strong><a name="item__24urxvt_3a_3arxvtname">$urxvt::RXVTNAME</a></strong><br />
+</dt>
+<dd>
+The basename of the installed binaries, usually <code>urxvt</code>.
+</dd>
+<p></p>
 <dt><strong><a name="item__24urxvt_3a_3aterm">$urxvt::TERM</a></strong><br />
 </dt>
 <dd>
 The current terminal. This variable stores the current <code>urxvt::term</code>
 object, whenever a callback/hook is executing.
 </dd>
-<p></p></dl>
+<p></p>
+<dt></dt>
+</dl>
 <p>
 </p>
 <h2><a name="functions_in_the_urxvt_package">Functions in the <code>urxvt</code> Package</a></h2>
@@ -557,16 +578,16 @@ the bitset.
 Return the foreground/background colour index, respectively.
 </dd>
 <p></p>
-<dt><strong><a name="item_set_fgcolor">$rend = urxvt::SET_FGCOLOR ($rend, $new_colour)</a></strong><br />
+<dt><strong><a name="item__24rend__3d_urxvt_3a_3aset_fgcolor__24rend_2c__24n">$rend = urxvt::SET_FGCOLOR $rend, $new_colour</a></strong><br />
 </dt>
-<dt><strong><a name="item_set_bgcolor">$rend = urxvt::SET_BGCOLOR ($rend, $new_colour)</a></strong><br />
+<dt><strong><a name="item__24rend__3d_urxvt_3a_3aset_bgcolor__24rend_2c__24n">$rend = urxvt::SET_BGCOLOR $rend, $new_colour</a></strong><br />
 </dt>
 <dd>
 Replace the foreground/background colour in the rendition mask with the
 specified one.
 </dd>
 <p></p>
-<dt><strong><a name="item_get_custom">$value = urxvt::GET_CUSTOM ($rend)</a></strong><br />
+<dt><strong><a name="item__24value__3d_urxvt_3a_3aget_custom__24rend">$value = urxvt::GET_CUSTOM $rend</a></strong><br />
 </dt>
 <dd>
 Return the ``custom'' value: Every rendition has 5 bits for use by
@@ -574,7 +595,7 @@ extensions. They can be set and changed as you like and are initially
 zero.
 </dd>
 <p></p>
-<dt><strong><a name="item_set_custom">$rend = urxvt::SET_CUSTOM ($rend, $new_value)</a></strong><br />
+<dt><strong><a name="item__24rend__3d_urxvt_3a_3aset_custom__24rend_2c__24ne">$rend = urxvt::SET_CUSTOM $rend, $new_value</a></strong><br />
 </dt>
 <dd>
 Change the custom value.
@@ -585,9 +606,10 @@ Change the custom value.
 <h2><a name="the_urxvt__anyevent_class">The <code>urxvt::anyevent</code> Class</a></h2>
 <p>The sole purpose of this class is to deliver an interface to the
 <code>AnyEvent</code> module - any module using it will work inside urxvt without
-further work. The only exception is that you cannot wait on condition
-variables, but non-blocking condvar use is ok. What this means is that you
-cannot use blocking APIs, but the non-blocking variant should work.</p>
+further programming. The only exception is that you cannot wait on
+condition variables, but non-blocking condvar use is ok. What this means
+is that you cannot use blocking APIs, but the non-blocking variant should
+work.</p>
 <p>
 </p>
 <h2><a name="the_urxvt__term_class">The <code>urxvt::term</code> Class</a></h2>
@@ -595,7 +617,9 @@ cannot use blocking APIs, but the non-blocking variant should work.</p>
 <dt><strong><a name="item_destroy">$term-&gt;destroy</a></strong><br />
 </dt>
 <dd>
-Destroy the terminal object (close the window, free resources etc.).
+Destroy the terminal object (close the window, free resources
+etc.). Please note that rxvt will not exit as long as any event
+watchers (timers, io watchers) are still active.
 </dd>
 <p></p>
 <dt><strong><a name="item_option">$isset = $term-&gt;option ($optval[, $set])</a></strong><br />
@@ -1094,6 +1118,40 @@ the session.
 <p>
 </p>
 <h2><a name="the_urxvt__popup_class">The <code>urxvt::popup</code> Class</a></h2>
+<dl>
+<dt><strong><a name="item_add_title">$popup-&gt;add_title ($title)</a></strong><br />
+</dt>
+<dd>
+Adds a non-clickable title to the popup.
+</dd>
+<p></p>
+<dt><strong><a name="item_add_separator">$popup-&gt;add_separator ([$sepchr])</a></strong><br />
+</dt>
+<dd>
+Creates a separator, optionally using the character given as <code>$sepchr</code>.
+</dd>
+<p></p>
+<dt><strong><a name="item_add_button">$popup-&gt;add_button ($text, $cb)</a></strong><br />
+</dt>
+<dd>
+Adds a clickable button to the popup. <code>$cb</code> is called whenever it is
+selected.
+</dd>
+<p></p>
+<dt><strong><a name="item_add_toggle">$popup-&gt;add_toggle ($text, $cb, $initial_value)</a></strong><br />
+</dt>
+<dd>
+Adds a toggle/checkbox item to the popup. Teh callback gets called
+whenever it gets toggled, with a boolean indicating its value as its first
+argument.
+</dd>
+<p></p>
+<dt><strong>$popup-&gt;show</strong><br />
+</dt>
+<dd>
+Displays the popup (which is initially hidden).
+</dd>
+<p></p></dl>
 <p>
 </p>
 <h2><a name="the_urxvt__timer_class">The <code>urxvt::timer</code> Class</a></h2>
index 2189ba5..d5c939c 100644 (file)
@@ -462,15 +462,29 @@ subwindow.
 .ie n .Sh "Variables in the ""urxvt"" Package"
 .el .Sh "Variables in the \f(CWurxvt\fP Package"
 .IX Subsection "Variables in the urxvt Package"
+.IP "$urxvt::LIBDIR" 4
+.IX Item "$urxvt::LIBDIR"
+The rxvt-unicode library directory, where, among other things, the perl
+modules and scripts are stored.
+.ie n .IP "$urxvt::RESCLASS, $urxvt::RESCLASS" 4
+.el .IP "$urxvt::RESCLASS, \f(CW$urxvt::RESCLASS\fR" 4
+.IX Item "$urxvt::RESCLASS, $urxvt::RESCLASS"
+The resource class and name rxvt-unicode uses to look up X resources.
+.IP "$urxvt::RXVTNAME" 4
+.IX Item "$urxvt::RXVTNAME"
+The basename of the installed binaries, usually \f(CW\*(C`urxvt\*(C'\fR.
 .IP "$urxvt::TERM" 4
 .IX Item "$urxvt::TERM"
 The current terminal. This variable stores the current \f(CW\*(C`urxvt::term\*(C'\fR
 object, whenever a callback/hook is executing.
+.IP "*" 4
 .ie n .Sh "Functions in the ""urxvt"" Package"
 .el .Sh "Functions in the \f(CWurxvt\fP Package"
 .IX Subsection "Functions in the urxvt Package"
+.PD 0
 .IP "$term = new urxvt [arg...]" 4
 .IX Item "$term = new urxvt [arg...]"
+.PD
 Creates a new terminal, very similar as if you had started it with
 \&\f(CW\*(C`system $binfile, arg...\*(C'\fR. Croaks (and probably outputs an error message)
 if the new instance couldn't be created.  Returns \f(CW\*(C`undef\*(C'\fR if the new
@@ -536,39 +550,43 @@ the bitset.
 .IX Item "$background = urxvt::GET_BASEBG $rend"
 .PD
 Return the foreground/background colour index, respectively.
-.ie n .IP "$rend = urxvt::SET_FGCOLOR ($rend, $new_colour)" 4
-.el .IP "$rend = urxvt::SET_FGCOLOR ($rend, \f(CW$new_colour\fR)" 4
-.IX Item "$rend = urxvt::SET_FGCOLOR ($rend, $new_colour)"
+.ie n .IP "$rend = urxvt::SET_FGCOLOR $rend\fR, \f(CW$new_colour" 4
+.el .IP "$rend = urxvt::SET_FGCOLOR \f(CW$rend\fR, \f(CW$new_colour\fR" 4
+.IX Item "$rend = urxvt::SET_FGCOLOR $rend, $new_colour"
 .PD 0
-.ie n .IP "$rend = urxvt::SET_BGCOLOR ($rend, $new_colour)" 4
-.el .IP "$rend = urxvt::SET_BGCOLOR ($rend, \f(CW$new_colour\fR)" 4
-.IX Item "$rend = urxvt::SET_BGCOLOR ($rend, $new_colour)"
+.ie n .IP "$rend = urxvt::SET_BGCOLOR $rend\fR, \f(CW$new_colour" 4
+.el .IP "$rend = urxvt::SET_BGCOLOR \f(CW$rend\fR, \f(CW$new_colour\fR" 4
+.IX Item "$rend = urxvt::SET_BGCOLOR $rend, $new_colour"
 .PD
 Replace the foreground/background colour in the rendition mask with the
 specified one.
-.IP "$value = urxvt::GET_CUSTOM ($rend)" 4
-.IX Item "$value = urxvt::GET_CUSTOM ($rend)"
+.ie n .IP "$value = urxvt::GET_CUSTOM $rend" 4
+.el .IP "$value = urxvt::GET_CUSTOM \f(CW$rend\fR" 4
+.IX Item "$value = urxvt::GET_CUSTOM $rend"
 Return the \*(L"custom\*(R" value: Every rendition has 5 bits for use by
 extensions. They can be set and changed as you like and are initially
 zero.
-.ie n .IP "$rend = urxvt::SET_CUSTOM ($rend, $new_value)" 4
-.el .IP "$rend = urxvt::SET_CUSTOM ($rend, \f(CW$new_value\fR)" 4
-.IX Item "$rend = urxvt::SET_CUSTOM ($rend, $new_value)"
+.ie n .IP "$rend = urxvt::SET_CUSTOM $rend\fR, \f(CW$new_value" 4
+.el .IP "$rend = urxvt::SET_CUSTOM \f(CW$rend\fR, \f(CW$new_value\fR" 4
+.IX Item "$rend = urxvt::SET_CUSTOM $rend, $new_value"
 Change the custom value.
 .ie n .Sh "The ""urxvt::anyevent"" Class"
 .el .Sh "The \f(CWurxvt::anyevent\fP Class"
 .IX Subsection "The urxvt::anyevent Class"
 The sole purpose of this class is to deliver an interface to the
 \&\f(CW\*(C`AnyEvent\*(C'\fR module \- any module using it will work inside urxvt without
-further work. The only exception is that you cannot wait on condition
-variables, but non-blocking condvar use is ok. What this means is that you
-cannot use blocking APIs, but the non-blocking variant should work.
+further programming. The only exception is that you cannot wait on
+condition variables, but non-blocking condvar use is ok. What this means
+is that you cannot use blocking APIs, but the non-blocking variant should
+work.
 .ie n .Sh "The ""urxvt::term"" Class"
 .el .Sh "The \f(CWurxvt::term\fP Class"
 .IX Subsection "The urxvt::term Class"
 .IP "$term\->destroy" 4
 .IX Item "$term->destroy"
-Destroy the terminal object (close the window, free resources etc.).
+Destroy the terminal object (close the window, free resources
+etc.). Please note that @@RXVT_NAME@@ will not exit as long as any event
+watchers (timers, io watchers) are still active.
 .ie n .IP "$isset = $term\fR\->option ($optval[, \f(CW$set])" 4
 .el .IP "$isset = \f(CW$term\fR\->option ($optval[, \f(CW$set\fR])" 4
 .IX Item "$isset = $term->option ($optval[, $set])"
@@ -967,10 +985,29 @@ the session.
 .ie n .Sh "The ""urxvt::popup"" Class"
 .el .Sh "The \f(CWurxvt::popup\fP Class"
 .IX Subsection "The urxvt::popup Class"
+.IP "$popup\->add_title ($title)" 4
+.IX Item "$popup->add_title ($title)"
+Adds a non-clickable title to the popup.
+.IP "$popup\->add_separator ([$sepchr])" 4
+.IX Item "$popup->add_separator ([$sepchr])"
+Creates a separator, optionally using the character given as \f(CW$sepchr\fR.
+.ie n .IP "$popup\->add_button ($text, $cb)" 4
+.el .IP "$popup\->add_button ($text, \f(CW$cb\fR)" 4
+.IX Item "$popup->add_button ($text, $cb)"
+Adds a clickable button to the popup. \f(CW$cb\fR is called whenever it is
+selected.
+.ie n .IP "$popup\->add_toggle ($text, $cb\fR, \f(CW$initial_value)" 4
+.el .IP "$popup\->add_toggle ($text, \f(CW$cb\fR, \f(CW$initial_value\fR)" 4
+.IX Item "$popup->add_toggle ($text, $cb, $initial_value)"
+Adds a toggle/checkbox item to the popup. Teh callback gets called
+whenever it gets toggled, with a boolean indicating its value as its first
+argument.
+.IP "$popup\->show" 4
+.IX Item "$popup->show"
+Displays the popup (which is initially hidden).
 .ie n .Sh "The ""urxvt::timer"" Class"
 .el .Sh "The \f(CWurxvt::timer\fP Class"
 .IX Subsection "The urxvt::timer Class"
-.RS 4
 This class implements timer watchers/events. Time is represented as a
 fractional number of seconds since the epoch. Example:
 .Sp
@@ -984,6 +1021,7 @@ fractional number of seconds since the epoch. Example:
 \&                          sprintf "%2d:%02d:%02d", (localtime urxvt::NOW)[2,1,0]);
 \&                    });
 .Ve
+.RS 4
 .IP "$timer = new urxvt::timer" 4
 .IX Item "$timer = new urxvt::timer"
 Create a new timer object in started state. It is scheduled to fire
index ee4e5fe..713d8fb 100644 (file)
@@ -286,10 +286,23 @@ API DOCUMENTATION
         subwindow.
 
   Variables in the "urxvt" Package
+    $urxvt::LIBDIR
+        The rxvt-unicode library directory, where, among other things, the
+        perl modules and scripts are stored.
+
+    $urxvt::RESCLASS, $urxvt::RESCLASS
+        The resource class and name rxvt-unicode uses to look up X
+        resources.
+
+    $urxvt::RXVTNAME
+        The basename of the installed binaries, usually "urxvt".
+
     $urxvt::TERM
         The current terminal. This variable stores the current "urxvt::term"
         object, whenever a callback/hook is executing.
 
+    *
+
   Functions in the "urxvt" Package
     $term = new urxvt [arg...]
         Creates a new terminal, very similar as if you had started it with
@@ -352,29 +365,32 @@ API DOCUMENTATION
     $background = urxvt::GET_BASEBG $rend
         Return the foreground/background colour index, respectively.
 
-    $rend = urxvt::SET_FGCOLOR ($rend, $new_colour)
-    $rend = urxvt::SET_BGCOLOR ($rend, $new_colour)
+    $rend = urxvt::SET_FGCOLOR $rend, $new_colour
+    $rend = urxvt::SET_BGCOLOR $rend, $new_colour
         Replace the foreground/background colour in the rendition mask with
         the specified one.
 
-    $value = urxvt::GET_CUSTOM ($rend)
+    $value = urxvt::GET_CUSTOM $rend
         Return the "custom" value: Every rendition has 5 bits for use by
         extensions. They can be set and changed as you like and are
         initially zero.
 
-    $rend = urxvt::SET_CUSTOM ($rend, $new_value)
+    $rend = urxvt::SET_CUSTOM $rend, $new_value
         Change the custom value.
 
   The "urxvt::anyevent" Class
     The sole purpose of this class is to deliver an interface to the
     "AnyEvent" module - any module using it will work inside urxvt without
-    further work. The only exception is that you cannot wait on condition
-    variables, but non-blocking condvar use is ok. What this means is that
-    you cannot use blocking APIs, but the non-blocking variant should work.
+    further programming. The only exception is that you cannot wait on
+    condition variables, but non-blocking condvar use is ok. What this means
+    is that you cannot use blocking APIs, but the non-blocking variant
+    should work.
 
   The "urxvt::term" Class
     $term->destroy
         Destroy the terminal object (close the window, free resources etc.).
+        Please note that rxvt will not exit as long as any event watchers
+        (timers, io watchers) are still active.
 
     $isset = $term->option ($optval[, $set])
         Returns true if the option specified by $optval is enabled, and
@@ -693,6 +709,25 @@ API DOCUMENTATION
         case as the session.
 
   The "urxvt::popup" Class
+    $popup->add_title ($title)
+        Adds a non-clickable title to the popup.
+
+    $popup->add_separator ([$sepchr])
+        Creates a separator, optionally using the character given as
+        $sepchr.
+
+    $popup->add_button ($text, $cb)
+        Adds a clickable button to the popup. $cb is called whenever it is
+        selected.
+
+    $popup->add_toggle ($text, $cb, $initial_value)
+        Adds a toggle/checkbox item to the popup. Teh callback gets called
+        whenever it gets toggled, with a boolean indicating its value as its
+        first argument.
+
+    $popup->show
+        Displays the popup (which is initially hidden).
+
   The "urxvt::timer" Class
         This class implements timer watchers/events. Time is represented as
         a fractional number of seconds since the epoch. Example:
index 0cef7cb..c943bd8 100644 (file)
@@ -1313,6 +1313,28 @@ sub add_item {
    push @{ $self->{item} }, $item;
 }
 
+=item $popup->add_title ($title)
+
+Adds a non-clickable title to the popup.
+
+=cut
+
+sub add_title {
+   my ($self, $title) = @_;
+
+   $self->add_item ({
+      rend => { normal => "\x1b[38;5;11;44m", hover => "\x1b[38;5;11;44m", active => "\x1b[38;5;11;44m" },
+      text => $title,
+      activate => sub { },
+   });
+}
+
+=item $popup->add_separator ([$sepchr])
+
+Creates a separator, optionally using the character given as C<$sepchr>.
+
+=cut
+
 sub add_separator {
    my ($self, $sep) = @_;
 
@@ -1326,15 +1348,12 @@ sub add_separator {
    });
 }
 
-sub add_title {
-   my ($self, $title) = @_;
+=item $popup->add_button ($text, $cb)
 
-   $self->add_item ({
-      rend => { normal => "\x1b[38;5;11;44m", hover => "\x1b[38;5;11;44m", active => "\x1b[38;5;11;44m" },
-      text => $title,
-      activate => sub { },
-   });
-}
+Adds a clickable button to the popup. C<$cb> is called whenever it is
+selected.
+
+=cut
 
 sub add_button {
    my ($self, $text, $cb) = @_;
@@ -1342,6 +1361,14 @@ sub add_button {
    $self->add_item ({ type => "button", text => $text, activate => $cb});
 }
 
+=item $popup->add_toggle ($text, $cb, $initial_value)
+
+Adds a toggle/checkbox item to the popup. Teh callback gets called
+whenever it gets toggled, with a boolean indicating its value as its first
+argument.
+
+=cut
+
 sub add_toggle {
    my ($self, $text, $cb, $value) = @_;
 
@@ -1350,12 +1377,18 @@ sub add_toggle {
       text => "  $text",
       value => $value,
       render => sub { ($_[0]{value} ? "* " : "  ") . $text },
-      activate => sub { $cb->($_[0]{value} = !$_[0]{value}); },
+      activate => sub { $cb->($_[1]{value} = !$_[1]{value}); },
    };
 
    $self->add_item ($item);
 }
 
+=item $popup->show
+
+Displays the popup (which is initially hidden).
+
+=cut
+
 sub show {
    my ($self) = @_;