- 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.
</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 --
<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>
<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
-.\" 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"
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
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
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
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
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
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
<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>
<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->destroy</a></strong><br />
<a href="#item_row_t"><code>$term->ROW_t</code></a> for details.
</dd>
<p></p>
-<dt><strong><a name="item_grab_button">$success = $term->grab_button ($button, $modifiermask)</a></strong><br />
+<dt><strong><a name="item_grab_button">$success = $term->grab_button ($button, $modifiermask[, $window = $term->vt])</a></strong><br />
+</dt>
+<dt><strong><a name="item_ungrab_button">$term->ungrab_button ($button, $modifiermask[, $window = $term->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->grab ($eventtime[, $sync])</a></strong><br />
-.\" 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"
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).
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
.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])"
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).
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.).
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
#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);
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);
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;