*** empty log message ***
authorroot <root>
Sun, 29 Jan 2006 21:45:47 +0000 (21:45 +0000)
committerroot <root>
Sun, 29 Jan 2006 21:45:47 +0000 (21:45 +0000)
Changes
doc/rxvt.1.html
doc/rxvt.1.man.in
doc/rxvt.1.pod
doc/rxvt.1.txt
doc/rxvtperl.3.html
doc/rxvtperl.3.man.in
doc/rxvtperl.3.txt
src/command.C
src/rxvttoolkit.C

diff --git a/Changes b/Changes
index a7921a2f6038a91278e7c90abab23553f643cc01..5ce565891a74a01004376b012aded26ebe5cb63d 100644 (file)
--- a/Changes
+++ b/Changes
@@ -18,6 +18,8 @@ DUMB: support tex fonts
         - added the OSC sequence 702 to detect the urxvt version number.
         - small configure updates.
         - overhauled color management: smaller codesize, alpha support.
+        - support rgba:r/g/b/a, #argb, #aarrggbb and #aaaarrrrggggbbbb
+          colour "names".
         - do not include X11/Intrinsic.h anymore, directly use
           Xlib/Xutil/Xresource directly.
 
index a59c573ce77b17ce9ee5e212f334b4def2c3f472..b22295ed40909bfc044d28daa23e6c3d783a25a4 100644 (file)
@@ -48,7 +48,7 @@
 </p>
 <hr />
 <h1><a name="description">DESCRIPTION</a></h1>
-<p><strong>rxvt-unicode</strong>, version <strong>7.3a</strong>, is a colour vt102 terminal
+<p><strong>rxvt-unicode</strong>, version <strong>7.4</strong>, is a colour vt102 terminal
 emulator intended as an <em>xterm</em>(1) replacement for users who do not
 require features such as Tektronix 4014 emulation and toolkit-style
 configurability. As a result, <strong>rxvt-unicode</strong> uses much less swap space --
@@ -1704,7 +1704,7 @@ on some systems or setgid to root or to some other group on others.</p>
 <p>In addition to the default foreground and background colours,
 <strong>rxvt</strong> can display up to 16 colours (8 ANSI colours plus
 high-intensity bold/blink versions of the same). Here is a list of the
-colours with their <strong>rgb.txt</strong> names.</p>
+colours with their names.</p>
 <table>
 <tr><td>color0</td><td>(black)</td><td>= Black</td></tr>
 <tr><td>color1</td><td>(red)</td><td>= Red3</td></tr>
@@ -1728,6 +1728,15 @@ colours with their <strong>rgb.txt</strong> names.</p>
 <strong>background</strong>, <strong>cursorColor</strong>, <strong>cursorColor2</strong>, <strong>colorBD</strong>, <strong>colorUL</strong> as
 a number 0-15, as a convenient shorthand to reference the colour name of
 color0-color15.</p>
+<p>If Xft support has been compiled in and as long as Xft/Xrender/X don't get
+their act together, rxvt-unicode will support <code>rgba:rrrr/gggg/bbbb/aaaa</code>
+(recommended, but <strong>MUST</strong> have 4 digits/component), <code>#ARGB</code>, <code>#AARRGGBB</code>
+and <code>#AAAARRRRGGGGBBBB</code> colour specifications, in addition to the ones
+provided by X, where the additional A component specifies alpha (opacity)
+values (0 is completely transparent and the maximum is opaque). You
+probably need to specify <strong>``-depth 32''</strong>, too, and have the luck that your
+X-server uses ARGB pixel layout, as X is far from just supporting ARGB
+visuals out of the box, and rxvt-unicode just fudges around.</p>
 <p>Note that <strong>-rv</strong> (<strong>``reverseVideo: True''</strong>) simulates reverse video by
 always swapping the foreground/background colours. This is in contrast to
 <em>xterm</em>(1) where the colours are only swapped if they have not otherwise
index b435a051efe0a2900909238af0c6048e07bbdc34..800e5eef763dc5a226b809440e0fbe9ff978f61f 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\" ========================================================================
 .\"
 .IX Title "rxvt 1"
-.TH rxvt 1 "2006-01-26" "7.3a" "RXVT-UNICODE"
+.TH rxvt 1 "2006-01-29" "7.4" "RXVT-UNICODE"
 .SH "NAME"
 rxvt\-unicode (ouR XVT, unicode) \- (a VT102 emulator for the X window system)
 .SH "SYNOPSIS"
@@ -1309,7 +1309,7 @@ on some systems or setgid to root or to some other group on others.
 In addition to the default foreground and background colours,
 \&\fB@@RXVT_NAME@@\fR can display up to 16 colours (8 \s-1ANSI\s0 colours plus
 high-intensity bold/blink versions of the same). Here is a list of the
-colours with their \fBrgb.txt\fR names.
+colours with their names.
 .TS
 l l l .
 color0 (black) = Black
@@ -1338,6 +1338,16 @@ It is also possible to specify the colour values of \fBforeground\fR,
 a number 0\-15, as a convenient shorthand to reference the colour name of
 color0\-color15.
 .PP
+If Xft support has been compiled in and as long as Xft/Xrender/X don't get
+their act together, rxvt-unicode will support \f(CW\*(C`rgba:rrrr/gggg/bbbb/aaaa\*(C'\fR
+(recommended, but \fB\s-1MUST\s0\fR have 4 digits/component), \f(CW\*(C`#ARGB\*(C'\fR, \f(CW\*(C`#AARRGGBB\*(C'\fR
+and \f(CW\*(C`#AAAARRRRGGGGBBBB\*(C'\fR colour specifications, in addition to the ones
+provided by X, where the additional A component specifies alpha (opacity)
+values (0 is completely transparent and the maximum is opaque). You
+probably need to specify \fB\*(L"\-depth 32\*(R"\fR, too, and have the luck that your
+X\-server uses \s-1ARGB\s0 pixel layout, as X is far from just supporting \s-1ARGB\s0
+visuals out of the box, and rxvt-unicode just fudges around.
+.PP
 Note that \fB\-rv\fR (\fB\*(L"reverseVideo: True\*(R"\fR) simulates reverse video by
 always swapping the foreground/background colours. This is in contrast to
 \&\fIxterm\fR(1) where the colours are only swapped if they have not otherwise
index 5ed8b6508dd767ca78783df3407c09ed630f8d59..86fb907488f16d7d82b7411b5e5f8ccc2b2ee509 100644 (file)
@@ -1342,13 +1342,15 @@ B<background>, B<cursorColor>, B<cursorColor2>, B<colorBD>, B<colorUL> as
 a number 0-15, as a convenient shorthand to reference the colour name of
 color0-color15.
 
-If Xft support has been compiled in and as long as Xft/Xrender don't get
-their act together, rxvt-unicode will support C<#ARGB>, C<#AARRGGBB>
+If Xft support has been compiled in and as long as Xft/Xrender/X don't get
+their act together, rxvt-unicode will support C<rgba:rrrr/gggg/bbbb/aaaa>
+(recommended, but B<MUST> have 4 digits/component), C<#ARGB>, C<#AARRGGBB>
 and C<#AAAARRRRGGGGBBBB> colour specifications, in addition to the ones
 provided by X, where the additional A component specifies alpha (opacity)
 values (0 is completely transparent and the maximum is opaque). You
-probably need to specify B<"-depth 32">, too, as X is far from just
-supporting ARGB visuals out of the box.
+probably need to specify B<"-depth 32">, too, and have the luck that your
+X-server uses ARGB pixel layout, as X is far from just supporting ARGB
+visuals out of the box, and rxvt-unicode just fudges around.
 
 Note that B<-rv> (B<"reverseVideo: True">) simulates reverse video by
 always swapping the foreground/background colours. This is in contrast to
index 031d78470df3227e765e26e812ca374715929590..e23c5aafa1da75df01966688de464436c75f0378 100644 (file)
@@ -6,7 +6,7 @@ SYNOPSIS
     rxvt [options] [-e command [ args ]]
 
 DESCRIPTION
-    rxvt-unicode, version 7.3a, is a colour vt102 terminal emulator intended
+    rxvt-unicode, version 7.4, is a colour vt102 terminal emulator intended
     as an *xterm*(1) replacement for users who do not require features such
     as Tektronix 4014 emulation and toolkit-style configurability. As a
     result, rxvt-unicode uses much less swap space -- a significant
@@ -1145,8 +1145,7 @@ LOGIN STAMP
 COLORS AND GRAPHICS
     In addition to the default foreground and background colours, rxvt can
     display up to 16 colours (8 ANSI colours plus high-intensity bold/blink
-    versions of the same). Here is a list of the colours with their rgb.txt
-    names.
+    versions of the same). Here is a list of the colours with their names.
 
        color0          (black)         = Black         
        color1          (red)           = Red3          
@@ -1172,6 +1171,17 @@ COLORS AND GRAPHICS
     0-15, as a convenient shorthand to reference the colour name of
     color0-color15.
 
+    If Xft support has been compiled in and as long as Xft/Xrender/X don't
+    get their act together, rxvt-unicode will support
+    "rgba:rrrr/gggg/bbbb/aaaa" (recommended, but MUST have 4
+    digits/component), "#ARGB", "#AARRGGBB" and "#AAAARRRRGGGGBBBB" colour
+    specifications, in addition to the ones provided by X, where the
+    additional A component specifies alpha (opacity) values (0 is completely
+    transparent and the maximum is opaque). You probably need to specify
+    "-depth 32", too, and have the luck that your X-server uses ARGB pixel
+    layout, as X is far from just supporting ARGB visuals out of the box,
+    and rxvt-unicode just fudges around.
+
     Note that -rv ("reverseVideo: True") simulates reverse video by always
     swapping the foreground/background colours. This is in contrast to
     *xterm*(1) where the colours are only swapped if they have not otherwise
index 295cbd31268cbcb76e8eb2a2edfba3047c88c9ae..efca8e1d4e9ca8edb4174e8d1961a486ef900316 100644 (file)
@@ -840,6 +840,15 @@ correct place, e.g. on stderr of the connecting urxvtc client.</p>
 <p>Messages have a size limit of 1023 bytes currently.</p>
 </dd>
 <p></p>
+<dt><strong><a name="item__40terms__3d_urxvt_3a_3atermlist">@terms = urxvt::termlist</a></strong><br />
+</dt>
+<dd>
+Returns all urxvt::term objects that exist in this process, regardless of
+wether they are started, being destroyed etc., so be careful. Only term
+objects that have perl extensions attached will be returned (because there
+is no urxvt::term objet associated with others).
+</dd>
+<p></p>
 <dt><strong><a name="item__24time__3d_urxvt_3a_3anow">$time = urxvt::NOW</a></strong><br />
 </dt>
 <dd>
@@ -958,7 +967,8 @@ hash which defines the environment of the new terminal.
 <p>Croaks (and probably outputs an error message) if the new instance
 couldn't be created.  Returns <code>undef</code> if the new instance didn't
 initialise perl, and the terminal object otherwise. The <code>init</code> and
-<a href="#item_start"><code>start</code></a> hooks will be called during this call.</p>
+<a href="#item_start"><code>start</code></a> hooks will be called before this call returns, and are free to
+refer to global data (which is race free).</p>
 </dd>
 <p></p>
 <dt><strong><a name="item_destroy">$term-&gt;destroy</a></strong><br />
@@ -1503,10 +1513,13 @@ Converts rxvt-unicodes text reprsentation into a perl string. See
 <a href="#item_row_t"><code>$term-&gt;ROW_t</code></a> for details.
 </dd>
 <p></p>
-<dt><strong><a name="item_grab_button">$success = $term-&gt;grab_button ($button, $modifiermask)</a></strong><br />
+<dt><strong><a name="item_grab_button">$success = $term-&gt;grab_button ($button, $modifiermask[, $window = $term-&gt;vt])</a></strong><br />
+</dt>
+<dt><strong><a name="item_ungrab_button">$term-&gt;ungrab_button ($button, $modifiermask[, $window = $term-&gt;vt])</a></strong><br />
 </dt>
 <dd>
-Registers a synchronous button grab. See the XGrabButton manpage.
+Register/unregister a synchronous button grab. See the XGrabButton
+manpage.
 </dd>
 <p></p>
 <dt><strong><a name="item_grab">$success = $term-&gt;grab ($eventtime[, $sync])</a></strong><br />
index 4ba9d92ad5491e12818946f8639021412dc3ebb3..d63647184d4eec487ed492e28f49efff874fb354 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3
+.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\" ========================================================================
 .\"
 .IX Title "rxvt 3"
-.TH rxvt 3 "2006-01-26" "7.3a" "RXVT-UNICODE"
+.TH rxvt 3 "2006-01-29" "7.4" "RXVT-UNICODE"
 .SH "NAME"
 @@RXVT_NAME@@perl \- rxvt\-unicode's embedded perl interpreter
 .SH "SYNOPSIS"
@@ -780,6 +780,12 @@ Using this function has the advantage that its output ends up in the
 correct place, e.g. on stderr of the connecting urxvtc client.
 .Sp
 Messages have a size limit of 1023 bytes currently.
+.IP "@terms = urxvt::termlist" 4
+.IX Item "@terms = urxvt::termlist"
+Returns all urxvt::term objects that exist in this process, regardless of
+wether they are started, being destroyed etc., so be careful. Only term
+objects that have perl extensions attached will be returned (because there
+is no urxvt::term objet associated with others).
 .IP "$time = urxvt::NOW" 4
 .IX Item "$time = urxvt::NOW"
 Returns the \*(L"current time\*(R" (as per the event loop).
@@ -866,7 +872,8 @@ hash which defines the environment of the new terminal.
 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 instance didn't
 initialise perl, and the terminal object otherwise. The \f(CW\*(C`init\*(C'\fR and
-\&\f(CW\*(C`start\*(C'\fR hooks will be called during this call.
+\&\f(CW\*(C`start\*(C'\fR hooks will be called before this call returns, and are free to
+refer to global data (which is race free).
 .IP "$term\->destroy" 4
 .IX Item "$term->destroy"
 Destroy the terminal object (close the window, free resources
@@ -1302,10 +1309,16 @@ where one character corresponds to one screen cell. See
 .IX Item "$string = $term->special_decode $text"
 Converts rxvt-unicodes text reprsentation into a perl string. See
 \&\f(CW\*(C`$term\->ROW_t\*(C'\fR for details.
-.ie n .IP "$success = $term\fR\->grab_button ($button, \f(CW$modifiermask)" 4
-.el .IP "$success = \f(CW$term\fR\->grab_button ($button, \f(CW$modifiermask\fR)" 4
-.IX Item "$success = $term->grab_button ($button, $modifiermask)"
-Registers a synchronous button grab. See the XGrabButton manpage.
+.ie n .IP "$success = $term\fR\->grab_button ($button, \f(CW$modifiermask\fR[, \f(CW$window\fR = \f(CW$term\->vt])" 4
+.el .IP "$success = \f(CW$term\fR\->grab_button ($button, \f(CW$modifiermask\fR[, \f(CW$window\fR = \f(CW$term\fR\->vt])" 4
+.IX Item "$success = $term->grab_button ($button, $modifiermask[, $window = $term->vt])"
+.PD 0
+.ie n .IP "$term\->ungrab_button ($button, $modifiermask\fR[, \f(CW$window\fR = \f(CW$term\->vt])" 4
+.el .IP "$term\->ungrab_button ($button, \f(CW$modifiermask\fR[, \f(CW$window\fR = \f(CW$term\fR\->vt])" 4
+.IX Item "$term->ungrab_button ($button, $modifiermask[, $window = $term->vt])"
+.PD
+Register/unregister a synchronous button grab. See the XGrabButton
+manpage.
 .ie n .IP "$success = $term\fR\->grab ($eventtime[, \f(CW$sync])" 4
 .el .IP "$success = \f(CW$term\fR\->grab ($eventtime[, \f(CW$sync\fR])" 4
 .IX Item "$success = $term->grab ($eventtime[, $sync])"
index 9e11351e424545dd4590e84b14c7f5e01af948c3..e2f034f3c5cd214ebb24cf8961e5862d5af19cba 100644 (file)
@@ -553,6 +553,13 @@ API DOCUMENTATION
 
         Messages have a size limit of 1023 bytes currently.
 
+    @terms = urxvt::termlist
+        Returns all urxvt::term objects that exist in this process,
+        regardless of wether they are started, being destroyed etc., so be
+        careful. Only term objects that have perl extensions attached will
+        be returned (because there is no urxvt::term objet associated with
+        others).
+
     $time = urxvt::NOW
         Returns the "current time" (as per the event loop).
 
@@ -633,7 +640,8 @@ API DOCUMENTATION
         Croaks (and probably outputs an error message) if the new instance
         couldn't be created. Returns "undef" if the new instance didn't
         initialise perl, and the terminal object otherwise. The "init" and
-        "start" hooks will be called during this call.
+        "start" hooks will be called before this call returns, and are free
+        to refer to global data (which is race free).
 
     $term->destroy
         Destroy the terminal object (close the window, free resources etc.).
@@ -987,8 +995,11 @@ API DOCUMENTATION
         Converts rxvt-unicodes text reprsentation into a perl string. See
         "$term->ROW_t" for details.
 
-    $success = $term->grab_button ($button, $modifiermask)
-        Registers a synchronous button grab. See the XGrabButton manpage.
+    $success = $term->grab_button ($button, $modifiermask[, $window =
+    $term->vt])
+    $term->ungrab_button ($button, $modifiermask[, $window = $term->vt])
+        Register/unregister a synchronous button grab. See the XGrabButton
+        manpage.
 
     $success = $term->grab ($eventtime[, $sync])
         Calls XGrabPointer and XGrabKeyboard in asynchronous (default) or
index f5db1c2112a657970b755d5b0b02521f67655f91..d4838d54d64f1aa2f917a1d1335931cd2c6cb65c 100644 (file)
@@ -3721,7 +3721,7 @@ rxvt_term::process_color_seq (int report, int color, const char *str, char resp)
 
 #if XFT
       if (c.a != rxvt_rgba::MAX_CC)
-        tt_printf ("\033]%d;#%04x%04x%04x%04x%c", report, c.a, c.r, c.g, c.b, resp);
+        tt_printf ("\033]%d;rgba:%04x/%04x/%04x/%04x%c", report, c.a, c.r, c.g, c.b, resp);
       else
 #endif
         tt_printf ("\033]%d;rgb:%04x/%04x/%04x%c", report, c.r, c.g, c.b, resp);
index 972f6fa871150a214fb380d9ce8e6c8369056829..f6dac54286cb79b3a444c6eb83eae1130e727bc7 100644 (file)
@@ -545,11 +545,13 @@ rxvt_color::set (rxvt_screen *screen, const char *name)
   int mult;
 
   if (     l == 1+4*1 && 4 == sscanf (name, "#%1hx%1hx%1hx%1hx%c", &r.a, &r.r, &r.g, &r.b, &eos))
-    mult = 0x1111;
+    mult = rxvt_rgba::MAX_CC / 0x000f;
   else if (l == 1+4*2 && 4 == sscanf (name, "#%2hx%2hx%2hx%2hx%c", &r.a, &r.r, &r.g, &r.b, &eos))
-    mult = 0x0101;
+    mult = rxvt_rgba::MAX_CC / 0x00ff;
   else if (l == 1+4*4 && 4 == sscanf (name, "#%4hx%4hx%4hx%4hx%c", &r.a, &r.r, &r.g, &r.b, &eos))
-    mult = 0x0001;
+    mult = rxvt_rgba::MAX_CC / 0xffff;
+  else if (l == 4+5*4 && 4 == sscanf (name, "rgba:%hx/%hx/%hx/%hx%c", &r.r, &r.g, &r.b, &r.a, &eos))
+    mult = rxvt_rgba::MAX_CC / 0xffff;
   else
     return XftColorAllocName (screen->xdisp, screen->visual, screen->cmap, name, &c);
 
@@ -576,7 +578,22 @@ rxvt_color::set (rxvt_screen *screen, rxvt_rgba rgba)
   d.blue  = rgba.b;
   d.alpha = rgba.a;
 
-  return XftColorAllocValue (screen->xdisp, screen->visual, screen->cmap, &d, &c);
+  if (XftColorAllocValue (screen->xdisp, screen->visual, screen->cmap, &d, &c))
+    {
+      // FUCKING Xft gets it wrong, of course, fix it for the common case
+      // transparency users should eat shit and die, and then
+      // XRenderQueryPictIndexValues themselves plenty.
+      if (screen->depth == 32
+          && screen->visual->c_class == TrueColor
+          && screen->visual->red_mask   == 0x00ff0000
+          && screen->visual->green_mask == 0x0000ff00
+          && screen->visual->blue_mask  == 0x000000ff)
+        c.pixel = c.pixel & 0x00ffffffUL | ((rgba.a >> 8) << 24);
+
+      return true;
+    }
+
+  return false;
 #else
   XColor xc;